This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathdefinitions.yaml
3646 lines (3641 loc) · 104 KB
/
definitions.yaml
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
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: Token
responses:
Forbidden:
description: Do not have appropriate permissions
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
Unauthorized:
description: No access token provided
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
BadRequest:
description: Invalid or missing parameters in URL or request body
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
TooLarge:
description: Content too large
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
NotImplemented:
description: Feature is disabled
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
TooManyRequests:
description: Too many requests
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
InternalServerError:
description: Something went wrong with the server
content:
application/json:
schema:
$ref: "#/components/schemas/AppError"
schemas:
User:
type: object
properties:
id:
type: string
create_at:
description: The time in milliseconds a user was created
type: integer
format: int64
update_at:
description: The time in milliseconds a user was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a user was deleted
type: integer
format: int64
username:
type: string
first_name:
type: string
last_name:
type: string
nickname:
type: string
email:
type: string
email_verified:
type: boolean
auth_service:
type: string
roles:
type: string
locale:
type: string
notify_props:
$ref: "#/components/schemas/UserNotifyProps"
props:
type: object
last_password_update:
type: integer
format: int64
last_picture_update:
type: integer
format: int64
failed_attempts:
type: integer
mfa_active:
type: boolean
timezone:
$ref: "#/components/schemas/Timezone"
terms_of_service_id:
description: ID of accepted terms of service, if any. This field is not present
if empty.
type: string
terms_of_service_create_at:
description: The time in milliseconds the user accepted the terms of service
type: integer
format: int64
UsersStats:
type: object
properties:
total_users_count:
type: integer
KnownUsers:
type: array
properties:
items:
type: string
Team:
type: object
properties:
id:
type: string
create_at:
description: The time in milliseconds a team was created
type: integer
format: int64
update_at:
description: The time in milliseconds a team was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a team was deleted
type: integer
format: int64
display_name:
type: string
name:
type: string
description:
type: string
email:
type: string
type:
type: string
allowed_domains:
type: string
invite_id:
type: string
allow_open_invite:
type: boolean
policy_id:
type: string
description: >-
The data retention policy to which this team has been assigned. If no such policy exists,
or the caller does not have the `sysconsole_read_compliance_data_retention` permission,
this field will be null.
TeamStats:
type: object
properties:
team_id:
type: string
total_member_count:
type: integer
active_member_count:
type: integer
TeamExists:
type: object
properties:
exists:
type: boolean
Channel:
type: object
properties:
id:
type: string
create_at:
description: The time in milliseconds a channel was created
type: integer
format: int64
update_at:
description: The time in milliseconds a channel was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a channel was deleted
type: integer
format: int64
team_id:
type: string
type:
type: string
display_name:
type: string
name:
type: string
header:
type: string
purpose:
type: string
last_post_at:
description: The time in milliseconds of the last post of a channel
type: integer
format: int64
total_msg_count:
type: integer
extra_update_at:
description: Deprecated in Mattermost 5.0 release
type: integer
format: int64
creator_id:
type: string
ChannelStats:
type: object
properties:
channel_id:
type: string
member_count:
type: integer
ChannelMember:
type: object
properties:
channel_id:
type: string
user_id:
type: string
roles:
type: string
last_viewed_at:
description: The time in milliseconds the channel was last viewed by the user
type: integer
format: int64
msg_count:
type: integer
mention_count:
type: integer
notify_props:
$ref: "#/components/schemas/ChannelNotifyProps"
last_update_at:
description: The time in milliseconds the channel member was last updated
type: integer
format: int64
ChannelMemberWithTeamData:
allOf:
- $ref: "#/components/schemas/ChannelMember"
- type: object
properties:
team_display_name:
type: string
description: The display name of the team to which this channel belongs.
team_name:
type: string
description: The name of the team to which this channel belongs.
team_update_at:
type: integer
description: The time at which the team to which this channel belongs was last updated.
ChannelData:
type: object
properties:
channel:
$ref: "#/components/schemas/Channel"
member:
$ref: "#/components/schemas/ChannelMember"
ChannelWithTeamData:
allOf:
- $ref: "#/components/schemas/Channel"
- type: object
properties:
team_display_name:
type: string
description: The display name of the team to which this channel belongs.
team_name:
type: string
description: The name of the team to which this channel belongs.
team_update_at:
type: integer
description: The time at which the team to which this channel belongs was last updated.
policy_id:
type: string
description: >-
The data retention policy to which this team has been assigned. If no such policy exists,
or the caller does not have the `sysconsole_read_compliance_data_retention` permission, this field
will be null.
ChannelListWithTeamData:
type: array
items:
$ref: "#/components/schemas/ChannelWithTeamData"
Post:
type: object
properties:
id:
type: string
create_at:
description: The time in milliseconds a post was created
type: integer
format: int64
update_at:
description: The time in milliseconds a post was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a post was deleted
type: integer
format: int64
edit_at:
type: integer
format: int64
user_id:
type: string
channel_id:
type: string
root_id:
type: string
original_id:
type: string
message:
type: string
type:
type: string
props:
type: object
hashtag:
type: string
file_ids:
type: array
items:
type: string
pending_post_id:
type: string
metadata:
$ref: "#/components/schemas/PostMetadata"
FileInfoList:
type: object
properties:
order:
type: array
items:
type: string
example:
- file_info_id1
- file_info_id2
file_infos:
type: object
additionalProperties:
$ref: "#/components/schemas/FileInfo"
next_file_id:
type: string
description: The ID of next file info. Not omitted when empty or not relevant.
prev_file_id:
type: string
description: The ID of previous file info. Not omitted when empty or not relevant.
PostList:
type: object
properties:
order:
type: array
items:
type: string
example:
- post_id1
- post_id12
posts:
type: object
additionalProperties:
$ref: "#/components/schemas/Post"
next_post_id:
type: string
description: The ID of next post. Not omitted when empty or not relevant.
prev_post_id:
type: string
description: The ID of previous post. Not omitted when empty or not relevant.
has_next:
type: boolean
description: Whether there are more items after this page.
PostListWithSearchMatches:
type: object
properties:
order:
type: array
items:
type: string
example:
- post_id1
- post_id12
posts:
type: object
additionalProperties:
$ref: "#/components/schemas/Post"
matches:
description: A mapping of post IDs to a list of matched terms within the post.
This field will only be populated on servers running version 5.1 or
greater with Elasticsearch enabled.
type: object
additionalProperties:
type: array
items:
type: string
example:
post_id1:
- search match 1
- search match 2
PostMetadata:
type: object
description: Additional information used to display a post.
properties:
embeds:
type: array
description: >
Information about content embedded in the post including OpenGraph
previews, image link previews, and message attachments.
This field will be null if the post does not contain embedded content.
items:
type: object
properties:
type:
type: string
description: The type of content that is embedded in this point.
enum:
- image
- message_attachment
- opengraph
- link
url:
type: string
description: The URL of the embedded content, if one exists.
data:
type: object
description: >
Any additional information about the embedded content. Only
used at this time to store OpenGraph metadata.
This field will be null for non-OpenGraph embeds.
emojis:
type: array
description: >
The custom emojis that appear in this point or have been used in
reactions to this post. This field will be null if the post does not contain custom emojis.
items:
$ref: "#/components/schemas/Emoji"
files:
type: array
description: >
The FileInfo objects for any files attached to the post. This field
will be null if the post does not have any file attachments.
items:
$ref: "#/components/schemas/FileInfo"
images:
type: object
description: >
An object mapping the URL of an external image to an object
containing the dimensions of that image. This field will be
null if the post or its embedded content does not reference any external images.
items:
type: object
properties:
height:
type: integer
width:
type: integer
reactions:
type: array
description: >
Any reactions made to this point. This field will be null if no
reactions have been made to this post.
items:
$ref: "#/components/schemas/Reaction"
priority:
type: object
description: >
Post priority set for this post. This field will be null if no
priority metadata has been set.
properties:
priority:
type: string
description: The priority label of a post, could be either empty, important, or urgent.
requested_ack:
type: boolean
description: Whether the post author has requested for acknowledgements or not.
acknowledgements:
type: array
description: >
Any acknowledgements made to this point.
items:
$ref: "#/components/schemas/PostAcknowledgement"
TeamMap:
type: object
description: A mapping of teamIds to teams.
properties:
team_id:
$ref: "#/components/schemas/Team"
TeamMember:
type: object
properties:
team_id:
description: The ID of the team this member belongs to.
type: string
user_id:
description: The ID of the user this member relates to.
type: string
roles:
description: The complete list of roles assigned to this team member, as a
space-separated list of role names, including any roles granted
implicitly through permissions schemes.
type: string
delete_at:
description: The time in milliseconds that this team member was deleted.
type: integer
scheme_user:
description: Whether this team member holds the default user role defined by the
team's permissions scheme.
type: boolean
scheme_admin:
description: Whether this team member holds the default admin role defined by the
team's permissions scheme.
type: boolean
explicit_roles:
description: The list of roles explicitly assigned to this team member, as a
space separated list of role names. This list does *not* include any
roles granted implicitly through permissions schemes.
type: string
TeamUnread:
type: object
properties:
team_id:
type: string
msg_count:
type: integer
mention_count:
type: integer
ChannelUnread:
type: object
properties:
team_id:
type: string
channel_id:
type: string
msg_count:
type: integer
mention_count:
type: integer
ChannelUnreadAt:
type: object
properties:
team_id:
description: The ID of the team the channel belongs to.
type: string
channel_id:
description: The ID of the channel the user has access to..
type: string
msg_count:
description: No. of messages the user has already read.
type: integer
mention_count:
description: No. of mentions the user has within the unread posts of the channel.
type: integer
last_viewed_at:
description: time in milliseconds when the user last viewed the channel.
type: integer
Session:
type: object
properties:
create_at:
description: The time in milliseconds a session was created
type: integer
format: int64
device_id:
type: string
expires_at:
description: The time in milliseconds a session will expire
type: integer
format: int64
id:
type: string
is_oauth:
type: boolean
last_activity_at:
description: The time in milliseconds of the last activity of a session
type: integer
format: int64
props:
type: object
roles:
type: string
team_members:
type: array
items:
$ref: "#/components/schemas/TeamMember"
token:
type: string
user_id:
type: string
FileInfo:
type: object
properties:
id:
description: The unique identifier for this file
type: string
user_id:
description: The ID of the user that uploaded this file
type: string
post_id:
description: If this file is attached to a post, the ID of that post
type: string
create_at:
description: The time in milliseconds a file was created
type: integer
format: int64
update_at:
description: The time in milliseconds a file was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a file was deleted
type: integer
format: int64
name:
description: The name of the file
type: string
extension:
description: The extension at the end of the file name
type: string
size:
description: The size of the file in bytes
type: integer
mime_type:
description: The MIME type of the file
type: string
width:
description: If this file is an image, the width of the file
type: integer
height:
description: If this file is an image, the height of the file
type: integer
has_preview_image:
description: If this file is an image, whether or not it has a preview-sized
version
type: boolean
Preference:
type: object
properties:
user_id:
description: The ID of the user that owns this preference
type: string
category:
type: string
name:
type: string
value:
type: string
UserAuthData:
type: object
properties:
auth_data:
description: Service-specific authentication data
type: string
auth_service:
description: The authentication service such as "email", "gitlab", or "ldap"
type: string
required:
- auth_data
- auth_service
UserAutocomplete:
type: object
properties:
users:
description: A list of users that are the main result of the query
type: array
items:
$ref: "#/components/schemas/User"
out_of_channel:
description: A special case list of users returned when autocompleting in a
specific channel. Omitted when empty or not relevant
type: array
items:
$ref: "#/components/schemas/User"
UserAutocompleteInTeam:
type: object
properties:
in_team:
description: A list of user objects in the team
type: array
items:
$ref: "#/components/schemas/User"
UserAutocompleteInChannel:
type: object
properties:
in_channel:
description: A list of user objects in the channel
type: array
items:
$ref: "#/components/schemas/User"
out_of_channel:
description: A list of user objects not in the channel
type: array
items:
$ref: "#/components/schemas/User"
IncomingWebhook:
type: object
properties:
id:
description: The unique identifier for this incoming webhook
type: string
create_at:
description: The time in milliseconds a incoming webhook was created
type: integer
format: int64
update_at:
description: The time in milliseconds a incoming webhook was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a incoming webhook was deleted
type: integer
format: int64
channel_id:
description: The ID of a public channel or private group that receives the
webhook payloads
type: string
description:
description: The description for this incoming webhook
type: string
display_name:
description: The display name for this incoming webhook
type: string
OutgoingWebhook:
type: object
properties:
id:
description: The unique identifier for this outgoing webhook
type: string
create_at:
description: The time in milliseconds a outgoing webhook was created
type: integer
format: int64
update_at:
description: The time in milliseconds a outgoing webhook was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds a outgoing webhook was deleted
type: integer
format: int64
creator_id:
description: The Id of the user who created the webhook
type: string
team_id:
description: The ID of the team that the webhook watchs
type: string
channel_id:
description: The ID of a public channel that the webhook watchs
type: string
description:
description: The description for this outgoing webhook
type: string
display_name:
description: The display name for this outgoing webhook
type: string
trigger_words:
description: List of words for the webhook to trigger on
type: array
items:
type: string
trigger_when:
description: When to trigger the webhook, `0` when a trigger word is present at
all and `1` if the message starts with a trigger word
type: integer
callback_urls:
description: The URLs to POST the payloads to when the webhook is triggered
type: array
items:
type: string
content_type:
description: The format to POST the data in, either `application/json` or
`application/x-www-form-urlencoded`
default: application/x-www-form-urlencoded
type: string
Reaction:
type: object
properties:
user_id:
description: The ID of the user that made this reaction
type: string
post_id:
description: The ID of the post to which this reaction was made
type: string
emoji_name:
description: The name of the emoji that was used for this reaction
type: string
create_at:
description: The time in milliseconds this reaction was made
type: integer
format: int64
TopReaction:
type: object
properties:
emoji_name:
description: The name of the emoji used for this reaction.
type: string
count:
description: The number of the times this emoji has been used.
type: integer
format: int64
NewTeamMember:
type: object
properties:
id:
description: The user's ID.
type: string
username:
type: string
first_name:
type: string
last_name:
type: string
nickname:
type: string
position:
description: The user's position field value.
type: string
create_at:
description: The creation timestamp of the team member record.
type: integer
TopReactionList:
type: object
properties:
has_next:
description: Indicates if there is another page of reactions that can be fetched.
type: boolean
items:
description: List of reactions.
type: array
items:
$ref: "#/components/schemas/TopReaction"
NewTeamMembersList:
type: object
properties:
has_next:
description: Indicates if there is another page of new team members that can be fetched.
type: boolean
items:
description: List of new team members.
type: array
items:
$ref: "#/components/schemas/NewTeamMember"
total_count:
description: The total count of new team members for the given time range.
type: integer
TopChannel:
type: object
properties:
id:
type: string
type:
type: string
display_name:
type: string
name:
type: string
team_id:
type: string
message_count:
description: The number of messages posted in the channel by users over the given time period (not including messages posted by bots).
type: string
TopChannelList:
type: object
properties:
has_next:
description: Indicates if there is another page of channels that can be fetched.
type: boolean
items:
description: List of channels.
type: array
items:
$ref: "#/components/schemas/TopChannel"
InsightUserInformation:
type: object
properties:
id:
type: string
first_name:
type: string
last_name:
type: string
nickname:
type: string
username:
type: string
last_picture_update:
type: string
create_at:
type: integer
format: int64
TopThread:
type: object
properties:
post:
$ref: "#/components/schemas/Post"
channel_id:
type: string
channel_display_name:
type: string
channel_name:
type: string
Participants:
type: array
items:
type: string
user_information:
description: User who created the post
$ref: "#/components/schemas/InsightUserInformation"
TopThreadList:
type: object
properties:
has_next:
description: Indicates if there is another page of top threads that can be fetched.
type: boolean
items:
description: List of top threads.
type: array
items:
$ref: "#/components/schemas/TopThread"
TopDMInsightUserInformation:
allOf:
- $ref: "#/components/schemas/InsightUserInformation"
- type: object
properties:
position:
type: string
TopDM:
type: object
properties:
post_count:
type: integer
format: int64
outgoing_message_count:
type: integer
format: int64
second_participant:
$ref: "#/components/schemas/TopDMInsightUserInformation"
TopDMList:
type: object
properties:
has_next:
description: Indicates if there is another page of top DMs that can be fetched.
type: boolean
items:
description: List of top DMs.
type: array
items:
$ref: "#/components/schemas/TopDM"
Emoji:
type: object
properties:
id:
description: The ID of the emoji
type: string
creator_id:
description: The ID of the user that made the emoji
type: string
name:
description: The name of the emoji
type: string
create_at:
description: The time in milliseconds the emoji was made
type: integer
format: int64
update_at:
description: The time in milliseconds the emoji was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds the emoji was deleted
type: integer
format: int64
Command:
type: object
properties:
id:
description: The ID of the slash command
type: string
token:
description: The token which is used to verify the source of the payload
type: string
create_at:
description: The time in milliseconds the command was created
type: integer
update_at:
description: The time in milliseconds the command was last updated
type: integer
format: int64
delete_at:
description: The time in milliseconds the command was deleted, 0 if never deleted
type: integer