Repository navigation
Expand file tree
/
Copy pathrequests.go
More file actions
3811 lines (3802 loc) · 189 KB
/
Copy pathrequests.go
File metadata and controls
3811 lines (3802 loc) · 189 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 GetAppRequest struct {
}
type UpdateAppRequest struct {
AsyncUrlEnrichEnabled *bool `json:"async_url_enrich_enabled,omitempty"`
AutoTranslationEnabled *bool `json:"auto_translation_enabled,omitempty"`
BeforeMessageSendHookAttemptTimeoutMs *int `json:"before_message_send_hook_attempt_timeout_ms,omitempty"`
BeforeMessageSendHookUrl *string `json:"before_message_send_hook_url,omitempty"`
CdnExpirationSeconds *int `json:"cdn_expiration_seconds,omitempty"`
ChannelHideMembersOnly *bool `json:"channel_hide_members_only,omitempty"`
ChatPrimaryUseCase *string `json:"chat_primary_use_case,omitempty"`
CustomActionHandlerUrl *string `json:"custom_action_handler_url,omitempty"`
DisableAuthChecks *bool `json:"disable_auth_checks,omitempty"`
DisablePermissionsChecks *bool `json:"disable_permissions_checks,omitempty"`
EnableHookPayloadCompression *bool `json:"enable_hook_payload_compression,omitempty"`
EnforceUniqueUsernames *string `json:"enforce_unique_usernames,omitempty"`
FeedAuditLogsEnabled *bool `json:"feed_audit_logs_enabled,omitempty"`
FeedsModerationEnabled *bool `json:"feeds_moderation_enabled,omitempty"`
FeedsV2Region *string `json:"feeds_v2_region,omitempty"`
GuestUserCreationDisabled *bool `json:"guest_user_creation_disabled,omitempty"`
ImageModerationEnabled *bool `json:"image_moderation_enabled,omitempty"`
MaxAggregatedActivitiesLength *int `json:"max_aggregated_activities_length,omitempty"`
MemberCustomOnMentionedUsersEnabled *bool `json:"member_custom_on_mentioned_users_enabled,omitempty"`
MemberCustomOnMessagesEnabled *bool `json:"member_custom_on_messages_enabled,omitempty"`
MemberCustomOnTypingEventsEnabled *bool `json:"member_custom_on_typing_events_enabled,omitempty"`
MigratePermissionsToV2 *bool `json:"migrate_permissions_to_v2,omitempty"`
ModerationAnalyticsEnabled *bool `json:"moderation_analytics_enabled,omitempty"`
ModerationEnabled *bool `json:"moderation_enabled,omitempty"`
ModerationOnboardingComplete *bool `json:"moderation_onboarding_complete,omitempty"`
ModerationS3ImageAccessRoleArn *string `json:"moderation_s3_image_access_role_arn,omitempty"`
ModerationWebhookUrl *string `json:"moderation_webhook_url,omitempty"`
MultiTenantEnabled *bool `json:"multi_tenant_enabled,omitempty"`
PermissionVersion *string `json:"permission_version,omitempty"`
RemindersInterval *int `json:"reminders_interval,omitempty"`
RemindersMaxMembers *int `json:"reminders_max_members,omitempty"`
RemindersMaxPerUser *int `json:"reminders_max_per_user,omitempty"`
// Revokes tokens issued before this date
RevokeTokensIssuedBefore *Timestamp `json:"revoke_tokens_issued_before,omitempty"`
SnsKey *string `json:"sns_key,omitempty"`
SnsSecret *string `json:"sns_secret,omitempty"`
SnsTopicArn *string `json:"sns_topic_arn,omitempty"`
SqsKey *string `json:"sqs_key,omitempty"`
SqsSecret *string `json:"sqs_secret,omitempty"`
SqsUrl *string `json:"sqs_url,omitempty"`
TwoWayBlockEffectEnabled *bool `json:"two_way_block_effect_enabled,omitempty"`
UserResponseTimeEnabled *bool `json:"user_response_time_enabled,omitempty"`
VideoPrimaryUseCase *string `json:"video_primary_use_case,omitempty"`
WebhookUrl *string `json:"webhook_url,omitempty"`
AllowedFlagReasons *[]string `json:"allowed_flag_reasons,omitempty"`
EventHooks *[]EventHook `json:"event_hooks,omitempty"`
ImageModerationBlockLabels *[]string `json:"image_moderation_block_labels,omitempty"`
ImageModerationLabels *[]string `json:"image_moderation_labels,omitempty"`
UserSearchDisallowedRoles *[]string `json:"user_search_disallowed_roles,omitempty"`
WebhookEvents *[]string `json:"webhook_events,omitempty"`
ActivityMetricsConfig *map[string]int `json:"activity_metrics_config,omitempty"`
ApnConfig *APNConfig `json:"apn_config,omitempty"`
AsyncModerationConfig *AsyncModerationConfiguration `json:"async_moderation_config,omitempty"`
DatadogInfo *DataDogInfo `json:"datadog_info,omitempty"`
FileUploadConfig *FileUploadConfig `json:"file_upload_config,omitempty"`
FirebaseConfig *FirebaseConfig `json:"firebase_config,omitempty"`
Grants *map[string][]string `json:"grants,omitempty"`
HuaweiConfig *HuaweiConfig `json:"huawei_config,omitempty"`
ImageUploadConfig *FileUploadConfig `json:"image_upload_config,omitempty"`
ModerationDashboardPreferences *ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
PushConfig *PushConfig `json:"push_config,omitempty"`
XiaomiConfig *XiaomiConfig `json:"xiaomi_config,omitempty"`
}
type ListBlockListsRequest struct {
Team *string `json:"-" query:"team"`
Cursor *string `json:"-" query:"cursor"`
Limit *int `json:"-" query:"limit"`
}
type CreateBlockListRequest struct {
// Block list name
Name string `json:"name"`
// List of words to block
Words []string `json:"words"`
IsConfusableFoldingEnabled *bool `json:"is_confusable_folding_enabled,omitempty"`
IsLeetCheckEnabled *bool `json:"is_leet_check_enabled,omitempty"`
IsPluralCheckEnabled *bool `json:"is_plural_check_enabled,omitempty"`
IsSubstringMatchingEnabled *bool `json:"is_substring_matching_enabled,omitempty"`
Team *string `json:"team,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word, word_allowlist
Type *string `json:"type,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ImportBlockListRequest struct {
Items []string `json:"items"`
ChunkSize *int `json:"chunk_size,omitempty"`
}
type DeleteBlockListRequest struct {
Team *string `json:"-" query:"team"`
UserID *string `json:"-" query:"user_id"`
}
type GetBlockListRequest struct {
Team *string `json:"-" query:"team"`
}
type UpdateBlockListRequest struct {
IsConfusableFoldingEnabled *bool `json:"is_confusable_folding_enabled,omitempty"`
IsLeetCheckEnabled *bool `json:"is_leet_check_enabled,omitempty"`
IsPluralCheckEnabled *bool `json:"is_plural_check_enabled,omitempty"`
IsSubstringMatchingEnabled *bool `json:"is_substring_matching_enabled,omitempty"`
Team *string `json:"team,omitempty"`
UserID *string `json:"user_id,omitempty"`
// List of words to block
Words *[]string `json:"words,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type CreateCampaignRequest struct {
// The user ID of the sender
SenderID string `json:"sender_id"`
MessageTemplate CampaignMessageTemplate `json:"message_template"`
// Whether to create channels for the campaign, if they don't exist
CreateChannels *bool `json:"create_channels,omitempty"`
// The description of the campaign
Description *string `json:"description,omitempty"`
ID *string `json:"id,omitempty"`
// The name of the campaign
Name *string `json:"name,omitempty"`
// The sender mode of the campaign
SenderMode *CampaignSenderMode `json:"sender_mode,omitempty"`
// The visibility of the created channels for the sender
SenderVisibility *CampaignSenderVisibility `json:"sender_visibility,omitempty"`
// Whether the campaign should show channels, if they are hidden
ShowChannels *bool `json:"show_channels,omitempty"`
// Whether to skip push notifications
SkipPush *bool `json:"skip_push,omitempty"`
// Whether to skip webhooks
SkipWebhook *bool `json:"skip_webhook,omitempty"`
// The IDs of the segments to send the campaign to. Duplicate user IDs are removed. Use either user_ids or segment_ids, not both
SegmentIds *[]string `json:"segment_ids,omitempty"`
// The userIDs to send the campaign to. Use either segment ids or user ids not both
UserIds *[]string `json:"user_ids,omitempty"`
ChannelTemplate *CampaignChannelTemplate `json:"channel_template,omitempty"`
}
type QueryCampaignsRequest struct {
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
UserLimit *int `json:"user_limit,omitempty"`
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
}
type DeleteCampaignRequest struct {
}
type GetCampaignRequest struct {
Prev *string `json:"-" query:"prev"`
Next *string `json:"-" query:"next"`
Limit *int `json:"-" query:"limit"`
}
type UpdateCampaignRequest struct {
SenderID string `json:"sender_id"`
MessageTemplate CampaignMessageTemplate `json:"message_template"`
CreateChannels *bool `json:"create_channels,omitempty"`
Description *string `json:"description,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
// Whether a campaign includes or excludes its sender.
SenderMode *CampaignSenderMode `json:"sender_mode,omitempty"`
// How a campaign appears to its sender.
SenderVisibility *CampaignSenderVisibility `json:"sender_visibility,omitempty"`
ShowChannels *bool `json:"show_channels,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
SkipWebhook *bool `json:"skip_webhook,omitempty"`
SegmentIds *[]string `json:"segment_ids,omitempty"`
UserIds *[]string `json:"user_ids,omitempty"`
ChannelTemplate *CampaignChannelTemplate `json:"channel_template,omitempty"`
}
type StartCampaignRequest struct {
ScheduledFor *Timestamp `json:"scheduled_for,omitempty"`
StopAt *Timestamp `json:"stop_at,omitempty"`
}
type StopCampaignRequest struct {
}
type QueryChannelsRequest struct {
// Whether to include active_member_count for each channel
IncludeActiveMemberCount *bool `json:"include_active_member_count,omitempty"`
// Number of channels to limit
Limit *int `json:"limit,omitempty"`
// Number of members to limit
MemberLimit *int `json:"member_limit,omitempty"`
// Number of messages to limit
MessageLimit *int `json:"message_limit,omitempty"`
// Channel pagination offset
Offset *int `json:"offset,omitempty"`
// ID of a predefined filter to use instead of filter_conditions
PredefinedFilter *string `json:"predefined_filter,omitempty"`
// Whether to update channel state or not
State *bool `json:"state,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
MemberCustomInclude *[]string `json:"member_custom_include,omitempty"`
// List of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter conditions to apply to the query
FilterConditions *map[string]any `json:"filter_conditions,omitempty"`
// Values to interpolate into the predefined filter template
FilterValues *map[string]any `json:"filter_values,omitempty"`
SortValues *map[string]any `json:"sort_values,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ChannelBatchUpdateRequest struct {
Operation string `json:"operation"`
// Filter to apply to the query
Filter map[string]any `json:"filter"`
// Required with the `addMembersHideHistory` operation, and rejected with every other operation including `addMembers`. Hides each matched channel's history before this time from the members the operation adds. Members that already belong to a matched channel are never affected. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past.
HideHistoryBefore *Timestamp `json:"hide_history_before,omitempty"`
// For updateData and hide only. Requires a root cids $eq or $in filter with at most 100 CIDs and no root $or/$and. A synchronous hide also requires 1 to 10 distinct member user IDs. Split larger selections into requests of at most 100 CIDs. A success_channels_count response means the database update completed; a task_id response means it was queued and must be polled, including on older API nodes.
Synchronous *bool `json:"synchronous,omitempty"`
// `updateData` only. Deletes these keys from each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths; deleting a key that does not exist is a no-op. Cannot be combined with `data.custom`
CustomUnset *[]string `json:"custom_unset,omitempty"`
Members *[]ChannelBatchMemberRequest `json:"members,omitempty"`
// `updateData` only. Merges these keys into each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths, so `a.b` sets key `b` inside object `a` (the parent object must already exist). Cannot be combined with `data.custom`
CustomSet *map[string]any `json:"custom_set,omitempty"`
Data *ChannelDataUpdate `json:"data,omitempty"`
}
type DeleteChannelsRequest struct {
// All channels that should be deleted
Cids []string `json:"cids"`
// Server-side only. When true, the channels and all their resources are permanently deleted instead of soft-deleted.
HardDelete *bool `json:"hard_delete,omitempty"`
// Server-side only. When true, the soft delete preserves message history instead of hiding it, so a later recreation of any of these channel IDs restores the full history. Only supported for distinct channels. Cannot be combined with hard_delete.
SkipTruncate *bool `json:"skip_truncate,omitempty"`
}
type QueryDeletedChannelsRequest struct {
// Number of channels per page, 1-100 (default 25)
Limit *int `json:"limit,omitempty"`
// Cursor for the next page, from the previous response
Next *string `json:"next,omitempty"`
// Cursor for the previous page, from the previous response
Prev *string `json:"prev,omitempty"`
// Sort order. Only created_at is supported; defaults to created_at ascending
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Optional filter. Omit it, or pass {}, to list every soft-deleted channel of the app; for example {"team": "tenant-a"} narrows to one tenant
FilterConditions *map[string]any `json:"filter_conditions,omitempty"`
}
type MarkDeliveredRequest struct {
UserID *string `json:"-" query:"user_id"`
LatestDeliveredMessages *[]DeliveredMessagePayload `json:"latest_delivered_messages,omitempty"`
}
type GroupedQueryChannelsRequest struct {
// Default max channels per group (default 10); values above 15 are capped at 15
Limit *int `json:"limit,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Groups to return, keyed by stored group name. Each entry can define limit, next, prev, and optional filter_conditions: date bounds for stored groups; all supports combined group/date branches or one group $ne exclusion. Cursors are only allowed when requesting exactly one group. Omitted or null filters preserve legacy grouping, including all.
Groups *map[string]GroupedChannelsGroupRequest `json:"groups,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type MarkChannelsReadRequest struct {
UserID *string `json:"user_id,omitempty"`
// Map of channel ID to last read message ID
ReadByChannel *map[string]string `json:"read_by_channel,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type GetOrCreateDistinctChannelRequest struct {
// Whether this channel will be hidden for the user who created the channel or not
HideForCreator *bool `json:"hide_for_creator,omitempty"`
// Adds scheduled_messages to the response: the acting user's own scheduled, sending and failed messages in this channel (server-side requests name the user with data.created_by_id or data.created_by; without one the field is omitted). Absent from the response when there are more than 100 or they could not be loaded; use the scheduled messages query then
IncludeScheduledMessages *bool `json:"include_scheduled_messages,omitempty"`
// Refresh channel state
State *bool `json:"state,omitempty"`
ThreadUnreadCounts *bool `json:"thread_unread_counts,omitempty"`
// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
MemberCustomInclude *[]string `json:"member_custom_include,omitempty"`
Data *ChannelInput `json:"data,omitempty"`
Members *PaginationParams `json:"members,omitempty"`
Messages *MessagePaginationParams `json:"messages,omitempty"`
Watchers *PaginationParams `json:"watchers,omitempty"`
}
type DeleteChannelRequest struct {
HardDelete *bool `json:"-" query:"hard_delete"`
SkipTruncate *bool `json:"-" query:"skip_truncate"`
}
type GetChannelRequest struct {
State *bool `json:"-" query:"state"`
MessagesLimit *int `json:"-" query:"messages_limit"`
MembersLimit *int `json:"-" query:"members_limit"`
WatchersLimit *int `json:"-" query:"watchers_limit"`
MessagesIDLt *string `json:"-" query:"messages_id_lt"`
MessagesIDLte *string `json:"-" query:"messages_id_lte"`
MessagesIDGt *string `json:"-" query:"messages_id_gt"`
MessagesIDGte *string `json:"-" query:"messages_id_gte"`
MessagesIDAround *string `json:"-" query:"messages_id_around"`
UserID *string `json:"-" query:"user_id"`
}
type UpdateChannelPartialRequest struct {
UserID *string `json:"user_id,omitempty"`
Unset *[]string `json:"unset,omitempty"`
Set *map[string]any `json:"set,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type UpdateChannelRequest struct {
// Set to `true` to accept the invite
AcceptInvite *bool `json:"accept_invite,omitempty"`
// Sets cool down period for the channel in seconds
Cooldown *int `json:"cooldown,omitempty"`
// Set to `true` to hide channel's history when adding new members
HideHistory *bool `json:"hide_history,omitempty"`
// If set, hides channel's history before this time when adding new members. Takes precedence over `hide_history` when both are provided. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past.
HideHistoryBefore *Timestamp `json:"hide_history_before,omitempty"`
// Set to `true` to reject the invite
RejectInvite *bool `json:"reject_invite,omitempty"`
// When `message` is set disables all push notifications for it
SkipPush *bool `json:"skip_push,omitempty"`
UserID *string `json:"user_id,omitempty"`
// List of filter tags to add to the channel
AddFilterTags *[]string `json:"add_filter_tags,omitempty"`
// List of user IDs to add to the channel
AddMembers *[]ChannelMemberRequest `json:"add_members,omitempty"`
// List of user IDs to make channel moderators
AddModerators *[]string `json:"add_moderators,omitempty"`
// List of channel member role assignments. If any specified user is not part of the channel, the request will fail
AssignRoles *[]ChannelMemberRequest `json:"assign_roles,omitempty"`
// List of user IDs to take away moderators status from
DemoteModerators *[]string `json:"demote_moderators,omitempty"`
// List of user IDs to invite to the channel
Invites *[]ChannelMemberRequest `json:"invites,omitempty"`
// List of filter tags to remove from the channel
RemoveFilterTags *[]string `json:"remove_filter_tags,omitempty"`
// List of user IDs to remove from the channel
RemoveMembers *[]string `json:"remove_members,omitempty"`
Data *ChannelInputRequest `json:"data,omitempty"`
// Message data for creating or updating a message
Message *MessageRequest `json:"message,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type QueryChannelBansRequest struct {
// Whether to exclude expired bans or not
ExcludeExpiredBans *bool `json:"exclude_expired_bans,omitempty"`
// When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
IncludeTotal *bool `json:"include_total,omitempty"`
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Filter conditions to apply to the query
FilterConditions *map[string]any `json:"filter_conditions,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type DeleteDraftRequest struct {
ParentID *string `json:"-" query:"parent_id"`
UserID *string `json:"-" query:"user_id"`
}
type GetDraftRequest struct {
ParentID *string `json:"-" query:"parent_id"`
UserID *string `json:"-" query:"user_id"`
}
type SendEventRequest struct {
Event EventRequest `json:"event"`
}
type DeleteChannelFileRequest struct {
Url *string `json:"-" query:"url"`
}
type UploadChannelFileRequest struct {
// file field
File *string `json:"file,omitempty"`
User *OnlyUserID `json:"user,omitempty"`
}
func (*UploadChannelFileRequest) isMultipart() {}
type ForkChannelRequest struct {
// ID of the top-level message to fork at. The fork copies the visible messages created up to it, itself included, and their replies up to it. Fork only at a message the agent has finished writing: a message still being streamed is copied as it is at the time of the fork
MessageID string `json:"message_id"`
// The channel a fork creates
Channel ForkChannelTarget `json:"channel"`
// When true, the copied messages carry no attachments. By default attachments are copied
ExcludeAttachments *bool `json:"exclude_attachments,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ForkMessageIDsRequest struct {
// IDs of messages of the source channel, up to 1000
SourceMessageIds []string `json:"source_message_ids"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type HideChannelRequest struct {
// Whether to clear message history of the channel or not
ClearHistory *bool `json:"clear_history,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type DeleteChannelImageRequest struct {
Url *string `json:"-" query:"url"`
}
type UploadChannelImageRequest struct {
File *string `json:"file,omitempty"`
// field with JSON-encoded array of image size configurations
UploadSizes *[]ImageSize `json:"upload_sizes,omitempty"`
User *OnlyUserID `json:"user,omitempty"`
}
func (*UploadChannelImageRequest) isMultipart() {}
type UpdateMemberPartialRequest struct {
UserID *string `json:"-" query:"user_id"`
Unset *[]string `json:"unset,omitempty"`
Set *map[string]any `json:"set,omitempty"`
}
type SendMessageRequest struct {
// Message data for creating or updating a message
Message MessageRequest `json:"message"`
ForceModeration *bool `json:"force_moderation,omitempty"`
// When true, the response includes channel_context: a slim channel object with cid, type, id and created_by
IncludeChannelContext *bool `json:"include_channel_context,omitempty"`
// When true, the response includes mentioned_members: for each mentioned user, whether that user is currently a channel member. Requires the ReadChannelMembers permission
IncludeMentionedMembers *bool `json:"include_mentioned_members,omitempty"`
KeepChannelHidden *bool `json:"keep_channel_hidden,omitempty"`
Pending *bool `json:"pending,omitempty"`
// When set to a future time, the message is not sent now: it is stored and sent at that time (UTC), rounded up to the first whole minute that is at least 1 minute from now, never earlier than requested. The response then carries scheduled_message with the rounded time. Must be at most the app's maximum lead time (120 days by default) from now. A time that is now or in the past sends the message now as if scheduled_at was not set, unless the request's message ID belongs to a scheduled message that was canceled or already sent. Slash commands cannot be scheduled
ScheduledAt *Timestamp `json:"scheduled_at,omitempty"`
SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
PendingMessageMetadata *map[string]string `json:"pending_message_metadata,omitempty"`
}
type GetManyMessagesRequest struct {
Ids []string `json:"-" query:"ids"`
MemberCustomInclude []string `json:"-" query:"member_custom_include"`
}
type GetPinnedMessagesRequest struct {
Limit *int `json:"-" query:"limit"`
Offset *int `json:"-" query:"offset"`
IDGte *string `json:"-" query:"id_gte"`
IDGt *string `json:"-" query:"id_gt"`
IDLte *string `json:"-" query:"id_lte"`
IDLt *string `json:"-" query:"id_lt"`
PinnedAtAfterOrEqual *Timestamp `json:"-" query:"pinned_at_after_or_equal"`
PinnedAtAfter *Timestamp `json:"-" query:"pinned_at_after"`
PinnedAtBeforeOrEqual *Timestamp `json:"-" query:"pinned_at_before_or_equal"`
PinnedAtBefore *Timestamp `json:"-" query:"pinned_at_before"`
IDAround *string `json:"-" query:"id_around"`
PinnedAtAround *Timestamp `json:"-" query:"pinned_at_around"`
UserID *string `json:"-" query:"user_id"`
Sort []SortParamRequest `json:"-" query:"sort"`
MemberCustomInclude []string `json:"-" query:"member_custom_include"`
}
type GetOrCreateChannelRequest struct {
// Whether this channel will be hidden for the user who created the channel or not
HideForCreator *bool `json:"hide_for_creator,omitempty"`
// Adds scheduled_messages to the response: the acting user's own scheduled, sending and failed messages in this channel (server-side requests name the user with data.created_by_id or data.created_by; without one the field is omitted). Absent from the response when there are more than 100 or they could not be loaded; use the scheduled messages query then
IncludeScheduledMessages *bool `json:"include_scheduled_messages,omitempty"`
// Refresh channel state
State *bool `json:"state,omitempty"`
ThreadUnreadCounts *bool `json:"thread_unread_counts,omitempty"`
// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
MemberCustomInclude *[]string `json:"member_custom_include,omitempty"`
Data *ChannelInput `json:"data,omitempty"`
Members *PaginationParams `json:"members,omitempty"`
Messages *MessagePaginationParams `json:"messages,omitempty"`
Watchers *PaginationParams `json:"watchers,omitempty"`
}
type MarkReadRequest struct {
// ID of the message that is considered last read by client
MessageID *string `json:"message_id,omitempty"`
// Optional Thread ID to specifically mark a given thread as read
ThreadID *string `json:"thread_id,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type RewindChannelRequest struct {
// ID of the newest visible message the caller saw. The rewind fails with a conflict when it is no longer the newest
ExpectedLastMessageID string `json:"expected_last_message_id"`
// ID of the top-level message to rewind the channel to. Every message created after it is hidden
MessageID string `json:"message_id"`
// When true, `message_id` is hidden too and the message before it becomes the newest visible message
Inclusive *bool `json:"inclusive,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ShowChannelRequest struct {
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type TruncateChannelRequest struct {
// Permanently delete channel data (messages, reactions, etc.)
HardDelete *bool `json:"hard_delete,omitempty"`
// When `message` is set disables all push notifications for it
SkipPush *bool `json:"skip_push,omitempty"`
// Truncate channel data up to `truncated_at`. The system message (if provided) creation time is always greater than `truncated_at`
TruncatedAt *Timestamp `json:"truncated_at,omitempty"`
UserID *string `json:"user_id,omitempty"`
// List of member IDs to hide message history for. If empty, truncates the channel for all members
MemberIds *[]string `json:"member_ids,omitempty"`
// Message data for creating or updating a message
Message *MessageRequest `json:"message,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type MarkUnreadRequest struct {
// ID of the message from where the channel is marked unread
MessageID *string `json:"message_id,omitempty"`
// Timestamp of the message from where the channel is marked unread
MessageTimestamp *Timestamp `json:"message_timestamp,omitempty"`
// Mark a thread unread, specify one of the thread, message timestamp, or message id
ThreadID *string `json:"thread_id,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ListChannelTypesRequest struct {
}
type CreateChannelTypeRequest struct {
// Automod. One of: disabled, simple, AI
Automod AutomodMode `json:"automod"`
// Automod behavior. One of: flag, block
AutomodBehavior BlocklistBehavior `json:"automod_behavior"`
// Max message length
MaxMessageLength int `json:"max_message_length"`
// Channel type name
Name string `json:"name"`
// Blocklist
Blocklist *string `json:"blocklist,omitempty"`
// Blocklist behavior. One of: flag, block, shadow_block
BlocklistBehavior *ChannelModerationBehavior `json:"blocklist_behavior,omitempty"`
// Connect events
ConnectEvents *bool `json:"connect_events,omitempty"`
// Count messages in channel.
CountMessages *bool `json:"count_messages,omitempty"`
// Custom events
CustomEvents *bool `json:"custom_events,omitempty"`
DeliveryEvents *bool `json:"delivery_events,omitempty"`
// Mark messages pending
MarkMessagesPending *bool `json:"mark_messages_pending,omitempty"`
// Message retention. One of: infinite, numeric
MessageRetention *string `json:"message_retention,omitempty"`
// Mutes
Mutes *bool `json:"mutes,omitempty"`
// Partition size
PartitionSize *int `json:"partition_size,omitempty"`
// Partition TTL
PartitionTtl *string `json:"partition_ttl,omitempty"`
// Polls
Polls *bool `json:"polls,omitempty"`
// Default push notification level for the channel type. One of: all, all_mentions, mentions, direct_mentions, none
PushLevel *PushLevel `json:"push_level,omitempty"`
// Push notifications
PushNotifications *bool `json:"push_notifications,omitempty"`
// Enables message quotes
Quotes *bool `json:"quotes,omitempty"`
// Reactions
Reactions *bool `json:"reactions,omitempty"`
// Read events
ReadEvents *bool `json:"read_events,omitempty"`
// Enables message reminders
Reminders *bool `json:"reminders,omitempty"`
// Replies
Replies *bool `json:"replies,omitempty"`
// Search
Search *bool `json:"search,omitempty"`
// Enables shared location messages
SharedLocations *bool `json:"shared_locations,omitempty"`
SkipLastMsgUpdateForSystemMsgs *bool `json:"skip_last_msg_update_for_system_msgs,omitempty"`
// Typing events
TypingEvents *bool `json:"typing_events,omitempty"`
// Uploads
Uploads *bool `json:"uploads,omitempty"`
// URL enrichment
UrlEnrichment *bool `json:"url_enrichment,omitempty"`
UserMessageReminders *bool `json:"user_message_reminders,omitempty"`
// Blocklists
Blocklists *[]BlockListOptions `json:"blocklists,omitempty"`
// List of commands that channel supports
Commands *[]string `json:"commands,omitempty"`
// List of permissions for the channel type
Permissions *[]PolicyRequest `json:"permissions,omitempty"`
// Sets thresholds for AI moderation
AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
ChatPreferences *ChatPreferences `json:"chat_preferences,omitempty"`
// List of grants for the channel type
Grants *map[string][]string `json:"grants,omitempty"`
}
type DeleteChannelTypeRequest struct {
}
type GetChannelTypeRequest struct {
}
type UpdateChannelTypeRequest struct {
// Automod level applied to a channel type.
Automod *AutomodMode `json:"automod,omitempty"`
// What automod or a blocklist does when it matches.
AutomodBehavior *ChannelModerationBehavior `json:"automod_behavior,omitempty"`
Blocklist *string `json:"blocklist,omitempty"`
// What automod or a blocklist does when it matches.
BlocklistBehavior *ChannelModerationBehavior `json:"blocklist_behavior,omitempty"`
ConnectEvents *bool `json:"connect_events,omitempty"`
CountMessages *bool `json:"count_messages,omitempty"`
CustomEvents *bool `json:"custom_events,omitempty"`
DeliveryEvents *bool `json:"delivery_events,omitempty"`
MarkMessagesPending *bool `json:"mark_messages_pending,omitempty"`
MaxMessageLength *int `json:"max_message_length,omitempty"`
MessageRetention *string `json:"message_retention,omitempty"`
Mutes *bool `json:"mutes,omitempty"`
PartitionSize *int `json:"partition_size,omitempty"`
PartitionTtl *string `json:"partition_ttl,omitempty"`
Polls *bool `json:"polls,omitempty"`
// Sets the push notification level for a channel type
PushLevel *PushLevel `json:"push_level,omitempty"`
PushNotifications *bool `json:"push_notifications,omitempty"`
Quotes *bool `json:"quotes,omitempty"`
Reactions *bool `json:"reactions,omitempty"`
ReadEvents *bool `json:"read_events,omitempty"`
Reminders *bool `json:"reminders,omitempty"`
Replies *bool `json:"replies,omitempty"`
Search *bool `json:"search,omitempty"`
SharedLocations *bool `json:"shared_locations,omitempty"`
SkipLastMsgUpdateForSystemMsgs *bool `json:"skip_last_msg_update_for_system_msgs,omitempty"`
TypingEvents *bool `json:"typing_events,omitempty"`
Uploads *bool `json:"uploads,omitempty"`
UrlEnrichment *bool `json:"url_enrichment,omitempty"`
UserMessageReminders *bool `json:"user_message_reminders,omitempty"`
AllowedFlagReasons *[]string `json:"allowed_flag_reasons,omitempty"`
Blocklists *[]BlockListOptions `json:"blocklists,omitempty"`
// List of commands that channel supports
Commands *[]string `json:"commands,omitempty"`
Permissions *[]PolicyRequest `json:"permissions,omitempty"`
// Sets thresholds for AI moderation
AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
ChatPreferences *ChatPreferences `json:"chat_preferences,omitempty"`
Grants *map[string][]string `json:"grants,omitempty"`
}
type ListCommandsRequest struct {
}
type CreateCommandRequest struct {
// Description, shown in commands auto-completion
Description string `json:"description"`
// Unique command name
Name string `json:"name"`
// Arguments help text, shown in commands auto-completion
Args *string `json:"args,omitempty"`
// Set name used for grouping commands
Set *string `json:"set,omitempty"`
}
type DeleteCommandRequest struct {
}
type GetCommandRequest struct {
}
type UpdateCommandRequest struct {
// Description, shown in commands auto-completion
Description string `json:"description"`
// Arguments help text, shown in commands auto-completion
Args *string `json:"args,omitempty"`
// Set name used for grouping commands
Set *string `json:"set,omitempty"`
}
type QueryDraftsRequest struct {
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type ExportChannelsRequest struct {
// Export options for channels
Channels []ChannelExport `json:"channels"`
// Set if deleted message text should be cleared
ClearDeletedMessageText *bool `json:"clear_deleted_message_text,omitempty"`
ExportUsers *bool `json:"export_users,omitempty"`
// Output format: 'json' (default) or 'csv'. csv requires version=v2 and is incompatible with export_users
Format *string `json:"format,omitempty"`
// Set if you want to include deleted channels
IncludeSoftDeletedChannels *bool `json:"include_soft_deleted_channels,omitempty"`
// Set if you want to include truncated messages
IncludeTruncatedMessages *bool `json:"include_truncated_messages,omitempty"`
// Export version
Version *string `json:"version,omitempty"`
// For csv format: subset of message columns to include (defaults to a standard set)
IncludeFields *[]string `json:"include_fields,omitempty"`
}
type GetHistoryWindowTeamsRequest struct {
}
type SetHistoryWindowTeamsRequest struct {
// Teams to give full history, 1 to 10, each listed once. Marking a team that already has full history keeps its created_at
Teams []string `json:"teams"`
}
type DeleteHistoryWindowTeamsRequest struct {
// Teams to put back on the app's default history window, 1 to 10, each listed once. A team without full history is ignored
Teams []string `json:"teams"`
}
type QueryMembersRequest struct {
Payload *QueryMembersPayload `json:"-" query:"payload"`
}
type QueryMessageHistoryRequest struct {
// Filter to apply to the query
Filter map[string]any `json:"filter"`
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
}
type DeleteMessageRequest struct {
Hard *bool `json:"-" query:"hard"`
DeletedBy *string `json:"-" query:"deleted_by"`
DeleteForMe *bool `json:"-" query:"delete_for_me"`
}
type GetMessageRequest struct {
ShowDeletedMessage *bool `json:"-" query:"show_deleted_message"`
}
type UpdateMessageRequest struct {
// Message data for creating or updating a message
Message MessageRequest `json:"message"`
// Skip enrich URL
SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
}
type UpdateMessagePartialRequest struct {
// Skip enriching the URL in the message
SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Array of field names to unset
Unset *[]string `json:"unset,omitempty"`
// Sets new field values
Set *map[string]any `json:"set,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type RunMessageActionRequest struct {
// ReadOnlyData to execute command with
FormData map[string]string `json:"form_data"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type CommitMessageRequest struct {
}
type EphemeralMessageUpdateRequest struct {
// Skip enriching the URL in the message
SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
SkipPush *bool `json:"skip_push,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Array of field names to unset
Unset *[]string `json:"unset,omitempty"`
// Sets new field values
Set *map[string]any `json:"set,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type SendReactionRequest struct {
// Represents user reaction to a message
Reaction ReactionRequest `json:"reaction"`
// Whether to replace all existing user reactions
EnforceUnique *bool `json:"enforce_unique,omitempty"`
// Skips any mobile push notifications
SkipPush *bool `json:"skip_push,omitempty"`
}
type DeleteReactionRequest struct {
UserID *string `json:"-" query:"user_id"`
}
type GetReactionsRequest struct {
Limit *int `json:"-" query:"limit"`
Offset *int `json:"-" query:"offset"`
}
type QueryReactionsRequest struct {
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type TranslateMessageRequest struct {
// Language to translate message to
Language string `json:"language"`
}
type UndeleteMessageRequest struct {
// ID of the user who is undeleting the message
UndeletedBy string `json:"undeleted_by"`
}
type CastPollVoteRequest struct {
// Key of the moderation configuration to use. Server-side only.
ConfigKey *string `json:"config_key,omitempty"`
// Team associated with the configuration. Server-side only.
ConfigTeam *string `json:"config_team,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
Vote *VoteData `json:"vote,omitempty"`
}
type DeletePollVoteRequest struct {
UserID *string `json:"-" query:"user_id"`
}
type DeleteReminderRequest struct {
UserID *string `json:"-" query:"user_id"`
}
type UpdateReminderRequest struct {
ExpiresAt *Timestamp `json:"expires_at,omitempty"`
RemindAt *Timestamp `json:"remind_at,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type CreateReminderRequest struct {
ExpiresAt *Timestamp `json:"expires_at,omitempty"`
RemindAt *Timestamp `json:"remind_at,omitempty"`
UserID *string `json:"user_id,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type GetRepliesRequest struct {
Limit *int `json:"-" query:"limit"`
IDGte *string `json:"-" query:"id_gte"`
IDGt *string `json:"-" query:"id_gt"`
IDLte *string `json:"-" query:"id_lte"`
IDLt *string `json:"-" query:"id_lt"`
IDAround *string `json:"-" query:"id_around"`
Sort []SortParamRequest `json:"-" query:"sort"`
MemberCustomInclude []string `json:"-" query:"member_custom_include"`
}
type QueryMessageFlagsRequest struct {
Payload *QueryMessageFlagsPayload `json:"-" query:"payload"`
}
type MuteChannelRequest struct {
// Duration of mute in milliseconds
Expiration *int `json:"expiration,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Channel CIDs to mute (if multiple channels)
ChannelCids *[]string `json:"channel_cids,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type UnmuteChannelRequest struct {
// Duration of mute in milliseconds
Expiration *int `json:"expiration,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Channel CIDs to mute (if multiple channels)
ChannelCids *[]string `json:"channel_cids,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type GetPredefinedFiltersRequest struct {
IncludeStats *bool `json:"-" query:"include_stats"`
Sort []SortParamRequest `json:"-" query:"sort"`
}
type CreatePredefinedFilterRequest struct {
// The unique name of the predefined filter (alphanumeric, _, - only)
Name string `json:"name"`
// The operation this filter is for (e.g., QueryChannels)
Operation string `json:"operation"`
// Filter to apply to the query
Filter map[string]any `json:"filter"`
// The description of the predefined filter
Description *string `json:"description,omitempty"`
Sort *[]map[string]any `json:"sort,omitempty"`
}
type DeletePredefinedFilterRequest struct {
}
type GetPredefinedFilterRequest struct {
}
type UpdatePredefinedFilterRequest struct {
// The operation this filter is for (e.g., QueryChannels)
Operation string `json:"operation"`
// Filter to apply to the query
Filter map[string]any `json:"filter"`
// The description of the predefined filter
Description *string `json:"description,omitempty"`
Sort *[]map[string]any `json:"sort,omitempty"`
}
type QueryBannedUsersRequest struct {
Payload *QueryBannedUsersPayload `json:"-" query:"payload"`
}
type QueryFutureChannelBansRequest struct {
Payload *QueryFutureChannelBansPayload `json:"-" query:"payload"`
}
type QueryRemindersRequest struct {
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type GetRetentionPolicyRequest struct {
}
type SetRetentionPolicyRequest struct {
MaxAgeHours int `json:"max_age_hours"`
// What a retention policy applies to.
Policy RetentionPolicyType `json:"policy"`
}
type DeleteRetentionPolicyRequest struct {
// What a retention policy applies to.
Policy RetentionPolicyType `json:"policy"`
}
type GetRetentionPolicyRunsRequest struct {
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter conditions to apply to the query
FilterConditions *map[string]any `json:"filter_conditions,omitempty"`
}
type QueryScheduledMessagesRequest struct {
// Page size, 1 to 100. Defaults to 20
Limit *int `json:"limit,omitempty"`
// Cursor from the previous page
Next *string `json:"next,omitempty"`
UserID *string `json:"user_id,omitempty"`
// Only scheduled_at ascending is supported. Pending messages come before failed ones
Sort *[]SortParamRequest `json:"sort,omitempty"`
// Filter for querying scheduled messages
Filter *ScheduledMessagesFilter `json:"filter,omitempty"`
// User request object
User *UserRequest `json:"user,omitempty"`
}
type DeleteScheduledMessageRequest struct {
}
type UpdateScheduledMessageRequest struct {
// New send time (UTC). Must be in the future and at most the app's maximum lead time from now. Rounded up to the first whole minute that is at least 1 minute from now, never earlier than requested. Resending the stored time leaves it unchanged
ScheduledAt *Timestamp `json:"scheduled_at,omitempty"`
// Message data for creating or updating a message
Message *MessageRequest `json:"message,omitempty"`
}
type SendScheduledMessageNowRequest struct {
}
type SearchRequest struct {
Payload *SearchPayload `json:"-" query:"payload"`
}
type CreateSegmentRequest struct {
// The type of the segment
Type string `json:"type"`
// If true, all sender channels are included in the segment
AllSenderChannels *bool `json:"all_sender_channels,omitempty"`
// If true, all users are included in the segment
AllUsers *bool `json:"all_users,omitempty"`
// The description of the segment (max 256 characters)
Description *string `json:"description,omitempty"`
// The ID of the segment
ID *string `json:"id,omitempty"`
// The name of the segment (max 128 characters)
Name *string `json:"name,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
}
type QuerySegmentsRequest struct {
// Filter to apply to the query
Filter map[string]any `json:"filter"`
Limit *int `json:"limit,omitempty"`
Next *string `json:"next,omitempty"`
Prev *string `json:"prev,omitempty"`
// Array of sort parameters
Sort *[]SortParamRequest `json:"sort,omitempty"`
}
type DeleteSegmentRequest struct {
}
type GetSegmentRequest struct {
}
type UpdateSegmentRequest struct {
// The description of the segment (max 256 characters)
Description *string `json:"description,omitempty"`
// The name of the segment (max 128 characters)
Name *string `json:"name,omitempty"`
// Filter to apply to the query
Filter *map[string]any `json:"filter,omitempty"`
}
type AddSegmentTargetsRequest struct {
// Target IDs
TargetIds []string `json:"target_ids"`
}
type DeleteSegmentTargetsRequest struct {
// Target IDs
TargetIds []string `json:"target_ids"`
}
type SegmentTargetExistsRequest struct {
}
type QuerySegmentTargetsRequest struct {
// Limit