-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodels.go
More file actions
12059 lines (10841 loc) · 489 KB
/
models.go
File metadata and controls
12059 lines (10841 loc) · 489 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
// Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
package getstream
type AIImageConfig struct {
Async *bool `json:"async,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
OcrRules []OCRRule `json:"ocr_rules,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}
type AIImageLabelDefinition struct {
Description string `json:"description"`
Group string `json:"group"`
Key string `json:"key"`
Label string `json:"label"`
}
type AITextConfig struct {
Async *bool `json:"async,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Profile *string `json:"profile,omitempty"`
Rules []BodyguardRule `json:"rules,omitempty"`
SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}
type AIVideoConfig struct {
Async *bool `json:"async,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Rules []AWSRekognitionRule `json:"rules,omitempty"`
}
type APIError struct {
// API error code
Code int `json:"code"`
// Request duration
Duration string `json:"duration"`
// Message describing an error
Message string `json:"message"`
// URL with additional information
MoreInfo string `json:"more_info"`
// Response HTTP status code
StatusCode int `json:"StatusCode"`
// Additional error-specific information
Details []int `json:"details"`
// Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
Unrecoverable *bool `json:"unrecoverable,omitempty"`
// Additional error info
ExceptionFields map[string]string `json:"exception_fields,omitempty"`
}
type APNConfig struct {
AuthKey *string `json:"auth_key,omitempty"`
AuthType *string `json:"auth_type,omitempty"`
BundleID *string `json:"bundle_id,omitempty"`
Development *bool `json:"development,omitempty"`
Disabled *bool `json:"Disabled,omitempty"`
Host *string `json:"host,omitempty"`
KeyID *string `json:"key_id,omitempty"`
NotificationTemplate *string `json:"notification_template,omitempty"`
P12Cert *string `json:"p12_cert,omitempty"`
TeamID *string `json:"team_id,omitempty"`
}
type APNConfigFields struct {
Development bool `json:"development"`
Enabled bool `json:"enabled"`
AuthKey *string `json:"auth_key,omitempty"`
AuthType *string `json:"auth_type,omitempty"`
BundleID *string `json:"bundle_id,omitempty"`
Host *string `json:"host,omitempty"`
KeyID *string `json:"key_id,omitempty"`
NotificationTemplate *string `json:"notification_template,omitempty"`
P12Cert *string `json:"p12_cert,omitempty"`
TeamID *string `json:"team_id,omitempty"`
}
type APNS struct {
Body string `json:"body"`
Title string `json:"title"`
ContentAvailable *int `json:"content-available,omitempty"`
MutableContent *int `json:"mutable-content,omitempty"`
Sound *string `json:"sound,omitempty"`
Data map[string]any `json:"data,omitempty"`
}
type APNSPayload struct {
Body *string `json:"body,omitempty"`
ContentAvailable *int `json:"content-available,omitempty"`
MutableContent *int `json:"mutable-content,omitempty"`
Sound *string `json:"sound,omitempty"`
Title *string `json:"title,omitempty"`
Data map[string]any `json:"data,omitempty"`
}
type AWSRekognitionRule struct {
Action string `json:"action"`
Label string `json:"label"`
MinConfidence float64 `json:"min_confidence"`
Subclassifications map[string]any `json:"subclassifications,omitempty"`
}
type AcceptFeedMemberInviteResponse struct {
Duration string `json:"duration"`
Member FeedMemberResponse `json:"member"`
}
type AcceptFollowResponse struct {
Duration string `json:"duration"`
Follow FollowResponse `json:"follow"`
}
type Action struct {
Name string `json:"name"`
Text string `json:"text"`
Type string `json:"type"`
Style *string `json:"style,omitempty"`
Value *string `json:"value,omitempty"`
}
type ActionLogResponse struct {
// Timestamp when the action was taken
CreatedAt Timestamp `json:"created_at"`
// Unique identifier of the action log
ID string `json:"id"`
// Reason for the moderation action
Reason string `json:"reason"`
// ID of the user who was the target of the action
TargetUserID string `json:"target_user_id"`
// ID of the user who performed the action
UserID string `json:"user_id"`
// Type of moderation action
Type string `json:"type"`
AiProviders []string `json:"ai_providers"`
// Additional metadata about the action
Custom map[string]any `json:"custom"`
ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
TargetUser *UserResponse `json:"target_user,omitempty"`
User *UserResponse `json:"user,omitempty"`
}
type ActionSequence struct {
Action *string `json:"action,omitempty"`
Blur *bool `json:"blur,omitempty"`
CooldownPeriod *int `json:"cooldown_period,omitempty"`
Threshold *int `json:"threshold,omitempty"`
TimeWindow *int `json:"time_window,omitempty"`
Warning *bool `json:"warning,omitempty"`
WarningText *string `json:"warning_text,omitempty"`
}
type ActiveCallsBitrateStats struct {
P10 float64 `json:"p10"`
P50 float64 `json:"p50"`
}
type ActiveCallsFPSStats struct {
P05 float64 `json:"p05"`
P10 float64 `json:"p10"`
P50 float64 `json:"p50"`
P90 float64 `json:"p90"`
}
type ActiveCallsLatencyStats struct {
P50 float64 `json:"p50"`
P90 float64 `json:"p90"`
}
type ActiveCallsMetrics struct {
JoinCallAPI *JoinCallAPIMetrics `json:"join_call_api,omitempty"`
Publishers *PublishersMetrics `json:"publishers,omitempty"`
Subscribers *SubscribersMetrics `json:"subscribers,omitempty"`
}
type ActiveCallsResolutionStats struct {
P10 float64 `json:"p10"`
P50 float64 `json:"p50"`
}
type ActiveCallsSummary struct {
ActiveCalls int `json:"active_calls"`
ActivePublishers int `json:"active_publishers"`
ActiveSubscribers int `json:"active_subscribers"`
Participants int `json:"participants"`
}
// Emitted when an activity is added to a feed.
type ActivityAddedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
// The type of event: "feeds.activity.added" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityAddedEvent) GetEventType() string {
return e.Type
}
// Emitted when an activity is deleted.
type ActivityDeletedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
// The type of event: "feeds.activity.deleted" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityDeletedEvent) GetEventType() string {
return e.Type
}
// Emitted when activity feedback is provided.
type ActivityFeedbackEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
ActivityFeedback ActivityFeedbackEventPayload `json:"activity_feedback"`
Custom map[string]any `json:"custom"`
// The type of event: "feeds.activity.feedback" in this case
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityFeedbackEvent) GetEventType() string {
return e.Type
}
type ActivityFeedbackEventPayload struct {
// The type of feedback action. One of: hide, show_more, show_less
Action string `json:"action"`
// The activity that received feedback
ActivityID string `json:"activity_id"`
// When the feedback was created
CreatedAt Timestamp `json:"created_at"`
// When the feedback was last updated
UpdatedAt Timestamp `json:"updated_at"`
// The feedback value (true/false)
Value string `json:"value"`
User UserResponse `json:"user"`
}
// Response for activity feedback submission
type ActivityFeedbackResponse struct {
// The ID of the activity that received feedback
ActivityID string `json:"activity_id"`
Duration string `json:"duration"`
}
type ActivityFilterConfig struct {
// When true, activities authored by the feed owner are excluded from feed reads
ExcludeOwnerActivities *bool `json:"exclude_owner_activities,omitempty"`
}
// Emitted when activities are marked as read, seen, or watched.
type ActivityMarkEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Custom map[string]any `json:"custom"`
// The type of event: "feeds.activity.marked" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
// Whether all activities were marked as read
MarkAllRead *bool `json:"mark_all_read,omitempty"`
// Whether all activities were marked as seen
MarkAllSeen *bool `json:"mark_all_seen,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
// The IDs of activities marked as read
MarkRead []string `json:"mark_read,omitempty"`
// The IDs of activities marked as seen
MarkSeen []string `json:"mark_seen,omitempty"`
// The IDs of activities marked as watched
MarkWatched []string `json:"mark_watched,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityMarkEvent) GetEventType() string {
return e.Type
}
type ActivityPinResponse struct {
// When the pin was created
CreatedAt Timestamp `json:"created_at"`
// ID of the feed where activity is pinned
Feed string `json:"feed"`
// When the pin was last updated
UpdatedAt Timestamp `json:"updated_at"`
Activity ActivityResponse `json:"activity"`
User UserResponse `json:"user"`
}
// Emitted when an activity is pinned.
type ActivityPinnedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
// The ID of the feed
Fid string `json:"fid"`
Custom map[string]any `json:"custom"`
PinnedActivity PinActivityResponse `json:"pinned_activity"`
// The type of event: "feeds.activity.pinned" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityPinnedEvent) GetEventType() string {
return e.Type
}
type ActivityProcessorConfig struct {
// Type of activity processor (required)
Type string `json:"type"`
}
// Emitted when a reaction is added to an activity.
type ActivityReactionAddedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
Reaction FeedsReactionResponse `json:"reaction"`
// The type of event: "feeds.activity.reaction.added" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityReactionAddedEvent) GetEventType() string {
return e.Type
}
// Emitted when a reaction is deleted from an activity.
type ActivityReactionDeletedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
Reaction FeedsReactionResponse `json:"reaction"`
// The type of the reaction that was removed
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityReactionDeletedEvent) GetEventType() string {
return e.Type
}
// Emitted when a reaction is updated on an activity.
type ActivityReactionUpdatedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
Reaction FeedsReactionResponse `json:"reaction"`
// The type of event: "feeds.activity.reaction.updated" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityReactionUpdatedEvent) GetEventType() string {
return e.Type
}
// Emitted when an activity is removed from a feed.
type ActivityRemovedFromFeedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
// The type of event: "feeds.activity.removed_from_feed" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityRemovedFromFeedEvent) GetEventType() string {
return e.Type
}
type ActivityRequest struct {
// Type of activity
Type string `json:"type"`
// List of feeds to add the activity to with a default max limit of 25 feeds
Feeds []string `json:"feeds"`
// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
// Deprecated: this field is deprecated.
CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
// Whether to create notification activities for mentioned users
CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
// Expiration time for the activity
ExpiresAt *string `json:"expires_at,omitempty"`
// Optional ID for the activity
ID *string `json:"id,omitempty"`
// ID of parent activity for replies/comments
ParentID *string `json:"parent_id,omitempty"`
// ID of a poll to attach to activity
PollID *string `json:"poll_id,omitempty"`
// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
RestrictReplies *string `json:"restrict_replies,omitempty"`
// Whether to skip URL enrichment for the activity
SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
// Whether to skip push notifications
SkipPush *bool `json:"skip_push,omitempty"`
// Text content of the activity
Text *string `json:"text,omitempty"`
// ID of the user creating the activity
UserID *string `json:"user_id,omitempty"`
// Visibility setting for the activity. One of: public, private, tag
Visibility *string `json:"visibility,omitempty"`
// If visibility is 'tag', this is the tag name and is required
VisibilityTag *string `json:"visibility_tag,omitempty"`
// List of attachments for the activity
Attachments []Attachment `json:"attachments,omitempty"`
// Collections that this activity references
CollectionRefs []string `json:"collection_refs,omitempty"`
// Tags for filtering activities
FilterTags []string `json:"filter_tags,omitempty"`
// Tags for indicating user interests
InterestTags []string `json:"interest_tags,omitempty"`
// List of users mentioned in the activity
MentionedUserIds []string `json:"mentioned_user_ids,omitempty"`
// Custom data for the activity
Custom map[string]any `json:"custom,omitempty"`
Location *Location `json:"location,omitempty"`
// Additional data for search indexing
SearchData map[string]any `json:"search_data,omitempty"`
}
type ActivityResponse struct {
// Number of bookmarks on the activity
BookmarkCount int `json:"bookmark_count"`
// Number of comments on the activity
CommentCount int `json:"comment_count"`
// When the activity was created
CreatedAt Timestamp `json:"created_at"`
// If this activity is hidden by this user (using activity feedback)
Hidden bool `json:"hidden"`
// Unique identifier for the activity
ID string `json:"id"`
// Popularity score of the activity
Popularity int `json:"popularity"`
// If this activity is obfuscated for this user. For premium content where you want to show a preview
Preview bool `json:"preview"`
// Number of reactions to the activity
ReactionCount int `json:"reaction_count"`
// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
RestrictReplies string `json:"restrict_replies"`
// Ranking score for this activity
Score float64 `json:"score"`
// Number of times the activity was shared
ShareCount int `json:"share_count"`
// When the activity was last updated
UpdatedAt Timestamp `json:"updated_at"`
// Visibility setting for the activity. One of: public, private, tag
Visibility string `json:"visibility"`
// Type of activity
Type string `json:"type"`
// Media attachments for the activity
Attachments []Attachment `json:"attachments"`
// Latest 5 comments of this activity (comment replies excluded)
Comments []CommentResponse `json:"comments"`
// List of feed IDs containing this activity
Feeds []string `json:"feeds"`
// Tags for filtering
FilterTags []string `json:"filter_tags"`
// Tags for user interests
InterestTags []string `json:"interest_tags"`
// Recent reactions to the activity
LatestReactions []FeedsReactionResponse `json:"latest_reactions"`
// Users mentioned in the activity
MentionedUsers []UserResponse `json:"mentioned_users"`
// Current user's bookmarks for this activity
OwnBookmarks []BookmarkResponse `json:"own_bookmarks"`
// Current user's reactions to this activity
OwnReactions []FeedsReactionResponse `json:"own_reactions"`
// Enriched collection data referenced by this activity
Collections map[string]EnrichedCollectionResponse `json:"collections"`
// Custom data for the activity
Custom map[string]any `json:"custom"`
// Grouped reactions by type
ReactionGroups map[string]FeedsReactionGroupResponse `json:"reaction_groups"`
// Data for search indexing
SearchData map[string]any `json:"search_data"`
User UserResponse `json:"user"`
// When the activity was deleted
DeletedAt *Timestamp `json:"deleted_at,omitempty"`
// When the activity was last edited
EditedAt *Timestamp `json:"edited_at,omitempty"`
// When the activity will expire
ExpiresAt *Timestamp `json:"expires_at,omitempty"`
// Total count of reactions from friends on this activity
FriendReactionCount *int `json:"friend_reaction_count,omitempty"`
// Whether this activity has been read. Only set for feed groups with notification config (track_seen/track_read enabled).
IsRead *bool `json:"is_read,omitempty"`
// Whether this activity has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).
IsSeen *bool `json:"is_seen,omitempty"`
IsWatched *bool `json:"is_watched,omitempty"`
ModerationAction *string `json:"moderation_action,omitempty"`
// Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
SelectorSource *string `json:"selector_source,omitempty"`
// Text content of the activity
Text *string `json:"text,omitempty"`
// If visibility is 'tag', this is the tag name
VisibilityTag *string `json:"visibility_tag,omitempty"`
// Reactions from users the current user follows or has mutual follows with
FriendReactions []FeedsReactionResponse `json:"friend_reactions,omitempty"`
CurrentFeed *FeedResponse `json:"current_feed,omitempty"`
Location *Location `json:"location,omitempty"`
Metrics map[string]int `json:"metrics,omitempty"`
Moderation *ModerationV2Response `json:"moderation,omitempty"`
NotificationContext *NotificationContext `json:"notification_context,omitempty"`
Parent *ActivityResponse `json:"parent,omitempty"`
Poll *PollResponseData `json:"poll,omitempty"`
// Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options.
ScoreVars map[string]any `json:"score_vars,omitempty"`
}
// Emitted when an activity is restored.
type ActivityRestoredEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
// The type of the event
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityRestoredEvent) GetEventType() string {
return e.Type
}
type ActivitySelectorConfig struct {
// Type of selector. One of: popular, proximity, following, current_feed, query, interest, follow_suggestion
Type string `json:"type"`
// Time threshold for activity selection (string). Expected RFC3339 format (e.g., 2006-01-02T15:04:05Z07:00). Cannot be used together with cutoff_window
CutoffTime *string `json:"cutoff_time,omitempty"`
// Flexible relative time window for activity selection (e.g., '1h', '3d', '1y'). Activities older than this duration will be filtered out. Cannot be used together with cutoff_time
CutoffWindow *string `json:"cutoff_window,omitempty"`
// Minimum popularity threshold
MinPopularity *int `json:"min_popularity,omitempty"`
// Sort parameters for activity selection
Sort []SortParamRequest `json:"sort,omitempty"`
// Filter for activity selection
Filter map[string]any `json:"filter,omitempty"`
Params map[string]any `json:"params,omitempty"`
}
type ActivitySelectorConfigResponse struct {
// Type of selector
Type string `json:"type"`
// Time threshold for activity selection (timestamp)
CutoffTime *Timestamp `json:"cutoff_time,omitempty"`
// Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')
CutoffWindow *string `json:"cutoff_window,omitempty"`
// Minimum popularity threshold
MinPopularity *int `json:"min_popularity,omitempty"`
// Sort parameters for activity selection
Sort []SortParamRequest `json:"sort,omitempty"`
// Filter for activity selection
Filter map[string]any `json:"filter,omitempty"`
// Generic params for selector-specific configuration
Params map[string]any `json:"params,omitempty"`
}
// Emitted when an activity is unpinned.
type ActivityUnpinnedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
// The ID of the feed
Fid string `json:"fid"`
Custom map[string]any `json:"custom"`
PinnedActivity PinActivityResponse `json:"pinned_activity"`
// The type of event: "feeds.activity.unpinned" in this case
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityUnpinnedEvent) GetEventType() string {
return e.Type
}
// Emitted when an activity is updated.
type ActivityUpdatedEvent struct {
// Date/time of creation
CreatedAt Timestamp `json:"created_at"`
Fid string `json:"fid"`
Activity ActivityResponse `json:"activity"`
Custom map[string]any `json:"custom"`
// The type of the event
Type string `json:"type"`
FeedVisibility *string `json:"feed_visibility,omitempty"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
User *UserResponseCommonFields `json:"user,omitempty"`
}
func (e *ActivityUpdatedEvent) GetEventType() string {
return e.Type
}
type AddActivityResponse struct {
Duration string `json:"duration"`
Activity ActivityResponse `json:"activity"`
// Number of mention notification activities created for mentioned users
MentionNotificationsCreated *int `json:"mention_notifications_created,omitempty"`
}
type AddBookmarkResponse struct {
Duration string `json:"duration"`
Bookmark BookmarkResponse `json:"bookmark"`
}
type AddCommentBookmarkResponse struct {
Duration string `json:"duration"`
Bookmark BookmarkResponse `json:"bookmark"`
}
type AddCommentReactionResponse struct {
// Duration of the request
Duration string `json:"duration"`
Comment CommentResponse `json:"comment"`
Reaction FeedsReactionResponse `json:"reaction"`
// Whether a notification activity was successfully created
NotificationCreated *bool `json:"notification_created,omitempty"`
}
type AddCommentResponse struct {
Duration string `json:"duration"`
Comment CommentResponse `json:"comment"`
// Number of mention notification activities created for mentioned users
MentionNotificationsCreated *int `json:"mention_notifications_created,omitempty"`
// Whether a notification activity was successfully created
NotificationCreated *bool `json:"notification_created,omitempty"`
}
type AddCommentsBatchResponse struct {
Duration string `json:"duration"`
// List of comments added
Comments []CommentResponse `json:"comments"`
}
type AddFolderRequest struct {
// Name of the folder
Name string `json:"name"`
// Custom data for the folder
Custom map[string]any `json:"custom,omitempty"`
}
type AddReactionRequest struct {
// Type of reaction
Type string `json:"type"`
// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
// Deprecated: this field is deprecated.
CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
// Whether to create a notification activity for this reaction
CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
// Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
EnforceUnique *bool `json:"enforce_unique,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Custom data for the reaction
Custom map[string]any `json:"custom,omitempty"`
User *UserRequest `json:"user,omitempty"`
}
type AddReactionResponse struct {
Duration string `json:"duration"`
Activity ActivityResponse `json:"activity"`
Reaction FeedsReactionResponse `json:"reaction"`
// Whether a notification activity was successfully created
NotificationCreated *bool `json:"notification_created,omitempty"`
}
// Response for adding members to a user group
type AddUserGroupMembersResponse struct {
Duration string `json:"duration"`
UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}
type AggregatedActivityResponse struct {
// Number of activities in this aggregation
ActivityCount int `json:"activity_count"`
// When the aggregation was created
CreatedAt Timestamp `json:"created_at"`
// Grouping identifier
Group string `json:"group"`
// Ranking score for this aggregation
Score float64 `json:"score"`
// When the aggregation was last updated
UpdatedAt Timestamp `json:"updated_at"`
// Number of unique users in this aggregation
UserCount int `json:"user_count"`
// Whether this activity group has been truncated due to exceeding the group size limit
UserCountTruncated bool `json:"user_count_truncated"`
// List of activities in this aggregation
Activities []ActivityResponse `json:"activities"`
// Whether this aggregated group has been read. Only set for feed groups with notification config (track_seen/track_read enabled).
IsRead *bool `json:"is_read,omitempty"`
// Whether this aggregated group has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).
IsSeen *bool `json:"is_seen,omitempty"`
IsWatched *bool `json:"is_watched,omitempty"`
}
type AggregationConfig struct {
// Order of member activities inside each aggregated group for non-stories feeds: created_at_desc (newest first, default) or created_at_asc (oldest first). Stories feeds ignore this and always use oldest first.
ActivitiesSort *string `json:"activities_sort,omitempty"`
// Format for activity aggregation
Format *string `json:"format,omitempty"`
// Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg
ScoreStrategy *string `json:"score_strategy,omitempty"`
}
type AppResponseFields struct {
AllowMultiUserDevices bool `json:"allow_multi_user_devices"`
AsyncUrlEnrichEnabled bool `json:"async_url_enrich_enabled"`
AutoTranslationEnabled bool `json:"auto_translation_enabled"`
CampaignEnabled bool `json:"campaign_enabled"`
CdnExpirationSeconds int `json:"cdn_expiration_seconds"`
CustomActionHandlerUrl string `json:"custom_action_handler_url"`
DisableAuthChecks bool `json:"disable_auth_checks"`
DisablePermissionsChecks bool `json:"disable_permissions_checks"`
EnforceUniqueUsernames string `json:"enforce_unique_usernames"`
GuestUserCreationDisabled bool `json:"guest_user_creation_disabled"`
ID int `json:"id"`
ImageModerationEnabled bool `json:"image_moderation_enabled"`
MaxAggregatedActivitiesLength int `json:"max_aggregated_activities_length"`
ModerationAudioCallModerationEnabled bool `json:"moderation_audio_call_moderation_enabled"`
ModerationEnabled bool `json:"moderation_enabled"`
ModerationLlmConfigurabilityEnabled bool `json:"moderation_llm_configurability_enabled"`
ModerationMultitenantBlocklistEnabled bool `json:"moderation_multitenant_blocklist_enabled"`
ModerationVideoCallModerationEnabled bool `json:"moderation_video_call_moderation_enabled"`
ModerationWebhookUrl string `json:"moderation_webhook_url"`
MultiTenantEnabled bool `json:"multi_tenant_enabled"`
Name string `json:"name"`
Organization string `json:"organization"`
PermissionVersion string `json:"permission_version"`
Placement string `json:"placement"`
RemindersInterval int `json:"reminders_interval"`
SnsKey string `json:"sns_key"`
SnsSecret string `json:"sns_secret"`
SnsTopicArn string `json:"sns_topic_arn"`
SqsKey string `json:"sqs_key"`
SqsSecret string `json:"sqs_secret"`
SqsUrl string `json:"sqs_url"`
Suspended bool `json:"suspended"`
SuspendedExplanation string `json:"suspended_explanation"`
UseHookV2 bool `json:"use_hook_v2"`
UserResponseTimeEnabled bool `json:"user_response_time_enabled"`
WebhookUrl string `json:"webhook_url"`
EventHooks []EventHook `json:"event_hooks"`
UserSearchDisallowedRoles []string `json:"user_search_disallowed_roles"`
WebhookEvents []string `json:"webhook_events"`
CallTypes map[string]*CallType `json:"call_types"`
ChannelConfigs map[string]*ChannelConfig `json:"channel_configs"`
FileUploadConfig FileUploadConfig `json:"file_upload_config"`
Grants map[string][]string `json:"grants"`
ImageUploadConfig FileUploadConfig `json:"image_upload_config"`
Policies map[string][]Policy `json:"policies"`
PushNotifications PushNotificationFields `json:"push_notifications"`
BeforeMessageSendHookUrl *string `json:"before_message_send_hook_url,omitempty"`
ModerationS3ImageAccessRoleArn *string `json:"moderation_s3_image_access_role_arn,omitempty"`
RevokeTokensIssuedBefore *Timestamp `json:"revoke_tokens_issued_before,omitempty"`
AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`
Geofences []GeofenceResponse `json:"geofences,omitempty"`
ImageModerationLabels []string `json:"image_moderation_labels,omitempty"`
ActivityMetricsConfig map[string]int `json:"activity_metrics_config,omitempty"`
DatadogInfo *DataDogInfo `json:"datadog_info,omitempty"`
ModerationDashboardPreferences *ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
}
// This event is sent when an appeal is accepted
type AppealAcceptedEvent struct {
CreatedAt Timestamp `json:"created_at"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
Appeal *AppealItemResponse `json:"appeal,omitempty"`
}
func (e *AppealAcceptedEvent) GetEventType() string {
return e.Type
}
// This event is sent when an appeal is created
type AppealCreatedEvent struct {
CreatedAt Timestamp `json:"created_at"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
Appeal *AppealItemResponse `json:"appeal,omitempty"`
}
func (e *AppealCreatedEvent) GetEventType() string {
return e.Type
}
type AppealItemResponse struct {
// Reason Text of the Appeal Item
AppealReason string `json:"appeal_reason"`
// When the flag was created
CreatedAt Timestamp `json:"created_at"`
// ID of the entity
EntityID string `json:"entity_id"`
// Type of entity
EntityType string `json:"entity_type"`
ID string `json:"id"`
// Status of the Appeal Item
Status string `json:"status"`
// When the flag was last updated
UpdatedAt Timestamp `json:"updated_at"`
// Decision Reason of the Appeal Item
DecisionReason *string `json:"decision_reason,omitempty"`
// Attachments(e.g. Images) of the Appeal Item
Attachments []string `json:"attachments,omitempty"`
EntityContent *ModerationPayload `json:"entity_content,omitempty"`
User *UserResponse `json:"user,omitempty"`
}
// This event is sent when an appeal is rejected
type AppealRejectedEvent struct {
CreatedAt Timestamp `json:"created_at"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
Appeal *AppealItemResponse `json:"appeal,omitempty"`
}
func (e *AppealRejectedEvent) GetEventType() string {
return e.Type
}
type AppealResponse struct {
// Unique identifier of the created Appeal item
AppealID string `json:"appeal_id"`
Duration string `json:"duration"`
}
type AsyncBulkImageModerationEvent struct {
CreatedAt Timestamp `json:"created_at"`
FinishedAt Timestamp `json:"finished_at"`
StartedAt Timestamp `json:"started_at"`
TaskID string `json:"task_id"`
Url string `json:"url"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
}
func (e *AsyncBulkImageModerationEvent) GetEventType() string {
return e.Type
}
type AsyncExportChannelsEvent struct {
CreatedAt Timestamp `json:"created_at"`
FinishedAt Timestamp `json:"finished_at"`
StartedAt Timestamp `json:"started_at"`
TaskID string `json:"task_id"`
Url string `json:"url"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
}
func (e *AsyncExportChannelsEvent) GetEventType() string {
return e.Type
}
type AsyncExportErrorEvent struct {
CreatedAt Timestamp `json:"created_at"`
Error string `json:"error"`
FinishedAt Timestamp `json:"finished_at"`
StartedAt Timestamp `json:"started_at"`
TaskID string `json:"task_id"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
}
func (e *AsyncExportErrorEvent) GetEventType() string {
return e.Type
}
type AsyncExportModerationLogsEvent struct {
CreatedAt Timestamp `json:"created_at"`
FinishedAt Timestamp `json:"finished_at"`
StartedAt Timestamp `json:"started_at"`
TaskID string `json:"task_id"`
Url string `json:"url"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
}
func (e *AsyncExportModerationLogsEvent) GetEventType() string {
return e.Type
}
type AsyncExportUsersEvent struct {
CreatedAt Timestamp `json:"created_at"`
FinishedAt Timestamp `json:"finished_at"`
StartedAt Timestamp `json:"started_at"`
TaskID string `json:"task_id"`
Url string `json:"url"`
Custom map[string]any `json:"custom"`
Type string `json:"type"`
ReceivedAt *Timestamp `json:"received_at,omitempty"`
}
func (e *AsyncExportUsersEvent) GetEventType() string {
return e.Type
}
type AsyncModerationCallbackConfig struct {
Mode *string `json:"mode,omitempty"`
ServerUrl *string `json:"server_url,omitempty"`
}
type AsyncModerationConfiguration struct {
TimeoutMs *int `json:"timeout_ms,omitempty"`
Callback *AsyncModerationCallbackConfig `json:"callback,omitempty"`
}
// An attachment is a message object that represents a file uploaded by a user.
type Attachment struct {
Custom map[string]any `json:"custom"`
AssetUrl *string `json:"asset_url,omitempty"`
AuthorIcon *string `json:"author_icon,omitempty"`
AuthorLink *string `json:"author_link,omitempty"`
AuthorName *string `json:"author_name,omitempty"`
Color *string `json:"color,omitempty"`
Fallback *string `json:"fallback,omitempty"`
Footer *string `json:"footer,omitempty"`
FooterIcon *string `json:"footer_icon,omitempty"`
ImageUrl *string `json:"image_url,omitempty"`
OGScrapeUrl *string `json:"og_scrape_url,omitempty"`
OriginalHeight *int `json:"original_height,omitempty"`
OriginalWidth *int `json:"original_width,omitempty"`
Pretext *string `json:"pretext,omitempty"`
Text *string `json:"text,omitempty"`
ThumbUrl *string `json:"thumb_url,omitempty"`
Title *string `json:"title,omitempty"`
TitleLink *string `json:"title_link,omitempty"`
// Attachment type (e.g. image, video, url)
Type *string `json:"type,omitempty"`
Actions []Action `json:"actions,omitempty"`
Fields []Field `json:"fields,omitempty"`
Giphy *Images `json:"giphy,omitempty"`
}
type AudioSettings struct {
AccessRequestEnabled bool `json:"access_request_enabled"`
DefaultDevice string `json:"default_device"`
HifiAudioEnabled bool `json:"hifi_audio_enabled"`
MicDefaultOn bool `json:"mic_default_on"`
OpusDtxEnabled bool `json:"opus_dtx_enabled"`
RedundantCodingEnabled bool `json:"redundant_coding_enabled"`
SpeakerDefaultOn bool `json:"speaker_default_on"`
NoiseCancellation *NoiseCancellationSettings `json:"noise_cancellation,omitempty"`
}
type AudioSettingsRequest struct {
DefaultDevice string `json:"default_device"`
AccessRequestEnabled *bool `json:"access_request_enabled,omitempty"`
HifiAudioEnabled *bool `json:"hifi_audio_enabled,omitempty"`
MicDefaultOn *bool `json:"mic_default_on,omitempty"`
OpusDtxEnabled *bool `json:"opus_dtx_enabled,omitempty"`
RedundantCodingEnabled *bool `json:"redundant_coding_enabled,omitempty"`
SpeakerDefaultOn *bool `json:"speaker_default_on,omitempty"`
NoiseCancellation *NoiseCancellationSettings `json:"noise_cancellation,omitempty"`
}
type AudioSettingsResponse struct {
AccessRequestEnabled bool `json:"access_request_enabled"`
DefaultDevice string `json:"default_device"`