getstream-ruby 4.1.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/lib/getstream_ruby/generated/chat_client.rb +7 -10
  3. data/lib/getstream_ruby/generated/common_client.rb +56 -0
  4. data/lib/getstream_ruby/generated/feeds_client.rb +130 -7
  5. data/lib/getstream_ruby/generated/models/activity_request.rb +3 -2
  6. data/lib/getstream_ruby/generated/models/activity_response.rb +7 -2
  7. data/lib/getstream_ruby/generated/models/add_activity_request.rb +8 -2
  8. data/lib/getstream_ruby/generated/models/add_comment_bookmark_request.rb +51 -0
  9. data/lib/getstream_ruby/generated/models/add_comment_bookmark_response.rb +36 -0
  10. data/lib/getstream_ruby/generated/models/add_comment_reaction_request.rb +2 -1
  11. data/lib/getstream_ruby/generated/models/add_comment_request.rb +7 -1
  12. data/lib/getstream_ruby/generated/models/add_reaction_request.rb +2 -1
  13. data/lib/getstream_ruby/generated/models/add_user_group_members_request.rb +5 -0
  14. data/lib/getstream_ruby/generated/models/aggregation_config.rb +11 -1
  15. data/lib/getstream_ruby/generated/models/async_export_error_event.rb +1 -1
  16. data/lib/getstream_ruby/generated/models/ban_action_request_payload.rb +5 -0
  17. data/lib/getstream_ruby/generated/models/bookmark_response.rb +20 -0
  18. data/lib/getstream_ruby/generated/models/bypass_action_request.rb +31 -0
  19. data/lib/getstream_ruby/generated/models/bypass_request.rb +36 -0
  20. data/lib/getstream_ruby/generated/models/bypass_response.rb +31 -0
  21. data/lib/getstream_ruby/generated/models/call_level_event_payload.rb +46 -0
  22. data/lib/getstream_ruby/generated/models/call_stats_participant_counts.rb +30 -0
  23. data/lib/getstream_ruby/generated/models/call_stats_participant_session.rb +15 -0
  24. data/lib/getstream_ruby/generated/models/call_stats_report_ready_event.rb +5 -0
  25. data/lib/getstream_ruby/generated/models/call_stats_session_response.rb +61 -0
  26. data/lib/getstream_ruby/generated/models/check_request.rb +5 -0
  27. data/lib/getstream_ruby/generated/models/comment_response.rb +5 -0
  28. data/lib/getstream_ruby/generated/models/comment_restored_event.rb +66 -0
  29. data/lib/getstream_ruby/generated/models/delete_comment_bookmark_response.rb +36 -0
  30. data/lib/getstream_ruby/generated/models/delete_retention_policy_request.rb +1 -1
  31. data/lib/getstream_ruby/generated/models/emau_stats_response.rb +41 -0
  32. data/lib/getstream_ruby/generated/models/enriched_collection.rb +61 -0
  33. data/lib/getstream_ruby/generated/models/enrichment_options.rb +5 -0
  34. data/lib/getstream_ruby/generated/models/entity_creator_response.rb +5 -0
  35. data/lib/getstream_ruby/generated/models/escalate_payload.rb +41 -0
  36. data/lib/getstream_ruby/generated/models/escalation_metadata.rb +41 -0
  37. data/lib/getstream_ruby/generated/models/feed_input.rb +6 -1
  38. data/lib/getstream_ruby/generated/models/feed_request.rb +6 -1
  39. data/lib/getstream_ruby/generated/models/feed_response.rb +5 -0
  40. data/lib/getstream_ruby/generated/models/feed_suggestion_response.rb +5 -0
  41. data/lib/getstream_ruby/generated/models/feeds_preferences.rb +6 -1
  42. data/lib/getstream_ruby/generated/models/feeds_preferences_response.rb +5 -0
  43. data/lib/getstream_ruby/generated/models/feeds_reaction_group.rb +41 -0
  44. data/lib/getstream_ruby/generated/models/feeds_v3_activity_response.rb +206 -0
  45. data/lib/getstream_ruby/generated/models/feeds_v3_comment_response.rb +141 -0
  46. data/lib/getstream_ruby/generated/models/follow_batch_request.rb +5 -0
  47. data/lib/getstream_ruby/generated/models/follow_request.rb +12 -1
  48. data/lib/getstream_ruby/generated/models/full_user_response.rb +5 -0
  49. data/lib/getstream_ruby/generated/models/get_external_storage_awss3_response.rb +46 -0
  50. data/lib/getstream_ruby/generated/models/get_external_storage_response.rb +51 -0
  51. data/lib/getstream_ruby/generated/models/get_flag_count_request.rb +36 -0
  52. data/lib/getstream_ruby/generated/models/get_flag_count_response.rb +36 -0
  53. data/lib/getstream_ruby/generated/models/get_import_v2_task_response.rb +6 -1
  54. data/lib/getstream_ruby/generated/models/get_retention_policy_runs_request.rb +51 -0
  55. data/lib/getstream_ruby/generated/models/get_retention_policy_runs_response.rb +12 -2
  56. data/lib/getstream_ruby/generated/models/image_content_parameters.rb +5 -0
  57. data/lib/getstream_ruby/generated/models/import_v2_task_item.rb +6 -1
  58. data/lib/getstream_ruby/generated/models/import_v2_task_settings.rb +5 -0
  59. data/lib/getstream_ruby/generated/models/insert_action_log_request.rb +56 -0
  60. data/lib/getstream_ruby/generated/models/insert_action_log_response.rb +31 -0
  61. data/lib/getstream_ruby/generated/models/location.rb +10 -15
  62. data/lib/getstream_ruby/generated/models/moderation_action_config_response.rb +5 -0
  63. data/lib/getstream_ruby/generated/models/moderation_dashboard_preferences.rb +10 -0
  64. data/lib/getstream_ruby/generated/models/notification_target.rb +5 -0
  65. data/lib/getstream_ruby/generated/models/notification_trigger.rb +6 -1
  66. data/lib/getstream_ruby/generated/models/query_activities_request.rb +5 -0
  67. data/lib/getstream_ruby/generated/models/query_banned_users_payload.rb +1 -1
  68. data/lib/getstream_ruby/generated/models/query_call_members_request.rb +2 -2
  69. data/lib/getstream_ruby/generated/models/query_call_participants_request.rb +1 -1
  70. data/lib/getstream_ruby/generated/models/query_call_session_participant_stats_response.rb +6 -1
  71. data/lib/getstream_ruby/generated/models/query_call_session_stats_request.rb +51 -0
  72. data/lib/getstream_ruby/generated/models/query_call_session_stats_response.rb +46 -0
  73. data/lib/getstream_ruby/generated/models/query_call_stats_request.rb +2 -2
  74. data/lib/getstream_ruby/generated/models/query_calls_request.rb +1 -1
  75. data/lib/getstream_ruby/generated/models/query_channels_request.rb +1 -1
  76. data/lib/getstream_ruby/generated/models/query_comments_request.rb +2 -2
  77. data/lib/getstream_ruby/generated/models/query_feeds_usage_stats_response.rb +6 -1
  78. data/lib/getstream_ruby/generated/models/query_members_payload.rb +3 -3
  79. data/lib/getstream_ruby/generated/models/query_message_flags_payload.rb +2 -2
  80. data/lib/getstream_ruby/generated/models/query_reactions_request.rb +2 -2
  81. data/lib/getstream_ruby/generated/models/query_threads_request.rb +2 -2
  82. data/lib/getstream_ruby/generated/models/query_user_feedback_request.rb +2 -2
  83. data/lib/getstream_ruby/generated/models/query_users_payload.rb +3 -3
  84. data/lib/getstream_ruby/generated/models/raw_record_settings.rb +6 -1
  85. data/lib/getstream_ruby/generated/models/raw_recording_settings_request.rb +6 -1
  86. data/lib/getstream_ruby/generated/models/raw_recording_settings_response.rb +6 -1
  87. data/lib/getstream_ruby/generated/models/reaction_group_response.rb +6 -1
  88. data/lib/getstream_ruby/generated/models/reaction_group_user_response.rb +41 -0
  89. data/lib/getstream_ruby/generated/models/restore_comment_request.rb +36 -0
  90. data/lib/getstream_ruby/generated/models/restore_comment_response.rb +41 -0
  91. data/lib/getstream_ruby/generated/models/retention_run_response.rb +46 -0
  92. data/lib/getstream_ruby/generated/models/review_queue_item_response.rb +22 -2
  93. data/lib/getstream_ruby/generated/models/set_retention_policy_request.rb +2 -2
  94. data/lib/getstream_ruby/generated/models/submit_action_request.rb +11 -1
  95. data/lib/getstream_ruby/generated/models/text_content_parameters.rb +5 -0
  96. data/lib/getstream_ruby/generated/models/threaded_comment_response.rb +5 -0
  97. data/lib/getstream_ruby/generated/models/triggered_rule_response.rb +2 -2
  98. data/lib/getstream_ruby/generated/models/unban_action_request_payload.rb +6 -1
  99. data/lib/getstream_ruby/generated/models/unfollow_batch_request.rb +1 -1
  100. data/lib/getstream_ruby/generated/models/unfollow_pair.rb +41 -0
  101. data/lib/getstream_ruby/generated/models/update_activities_partial_batch_request.rb +6 -1
  102. data/lib/getstream_ruby/generated/models/update_activity_partial_change_request.rb +2 -1
  103. data/lib/getstream_ruby/generated/models/update_activity_partial_request.rb +7 -1
  104. data/lib/getstream_ruby/generated/models/update_activity_request.rb +8 -2
  105. data/lib/getstream_ruby/generated/models/update_bookmark_request.rb +2 -2
  106. data/lib/getstream_ruby/generated/models/update_comment_bookmark_request.rb +56 -0
  107. data/lib/getstream_ruby/generated/models/update_comment_bookmark_response.rb +36 -0
  108. data/lib/getstream_ruby/generated/models/update_comment_partial_request.rb +72 -0
  109. data/lib/getstream_ruby/generated/models/update_comment_partial_response.rb +36 -0
  110. data/lib/getstream_ruby/generated/models/update_comment_request.rb +7 -1
  111. data/lib/getstream_ruby/generated/models/update_feed_request.rb +11 -1
  112. data/lib/getstream_ruby/generated/models/update_follow_request.rb +12 -1
  113. data/lib/getstream_ruby/generated/models/upsert_activities_request.rb +6 -1
  114. data/lib/getstream_ruby/generated/models/upsert_config_request.rb +1 -1
  115. data/lib/getstream_ruby/generated/models/upsert_external_storage_awss3_request.rb +46 -0
  116. data/lib/getstream_ruby/generated/models/upsert_external_storage_request.rb +36 -0
  117. data/lib/getstream_ruby/generated/models/upsert_external_storage_response.rb +31 -0
  118. data/lib/getstream_ruby/generated/models/upsert_moderation_rule_request.rb +22 -12
  119. data/lib/getstream_ruby/generated/models/user_response.rb +5 -0
  120. data/lib/getstream_ruby/generated/models/validate_external_storage_response.rb +31 -0
  121. data/lib/getstream_ruby/generated/models/video_content_parameters.rb +5 -0
  122. data/lib/getstream_ruby/generated/moderation_client.rb +61 -3
  123. data/lib/getstream_ruby/generated/video_client.rb +17 -0
  124. data/lib/getstream_ruby/generated/webhook.rb +4 -0
  125. data/lib/getstream_ruby/version.rb +1 -1
  126. metadata +40 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09783400d9df1d885d1ef3772691019380c27be23dc35aa3c778076561b8b737'
4
- data.tar.gz: 65f31d412caca10cfb1977fc5c4d85c4bd1b51d2f5f6d422cd12d46227fab9ab
3
+ metadata.gz: 59378b9d494daa078a110dbbf3b4a3966540a92d519046328912d707e5d58c51
4
+ data.tar.gz: 1ecc4e58ee556bac9dbec872aa0caa3ee678306a34b3e137b755d4fffa0e7baf
5
5
  SHA512:
6
- metadata.gz: 3526791434a33268b2e3735fe7a940581c9b2e8a2d1a09e4a2d57dad180dd87319e3b4fb265c364d9b984e45a8af5720aa65141c537f54e245daef2e5af47da8
7
- data.tar.gz: f4f1f6b9a9afca68d354159832ed7d36bd6202ef5cef25e3e09e774d92a3c783263d55c7d87160db43d9487f845c036d3cf7463f920952e17597a66c27643129
6
+ metadata.gz: 36e1370906f8f491e5360ebafdca9ce5c08846ebb4ba5901744f10a45a863a7c6b2b9792578fe71166a7cc7bda3e08b523f0b3fbda69d723d723999b2b0bdb56
7
+ data.tar.gz: 07d8cdcf47b41728081e35ab749e53a19ffba1daeed5206d178e0b44c2a64c195f02ba209666ca9f73f6641414b5238ec9452740dd8b60828e729a86a84f4989
@@ -1435,23 +1435,20 @@ module GetStream
1435
1435
  )
1436
1436
  end
1437
1437
 
1438
- # Returns paginated retention cleanup run history for the app. Server-side only.
1438
+ # Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only.
1439
1439
  #
1440
- # @param limit [Integer]
1441
- # @param offset [Integer]
1440
+ # @param get_retention_policy_runs_request [GetRetentionPolicyRunsRequest]
1442
1441
  # @return [Models::GetRetentionPolicyRunsResponse]
1443
- def get_retention_policy_runs(limit = nil, offset = nil)
1442
+ def get_retention_policy_runs(get_retention_policy_runs_request)
1444
1443
  path = '/api/v2/chat/retention_policy/runs'
1445
- # Build query parameters
1446
- query_params = {}
1447
- query_params['limit'] = limit unless limit.nil?
1448
- query_params['offset'] = offset unless offset.nil?
1444
+ # Build request body
1445
+ body = get_retention_policy_runs_request
1449
1446
 
1450
1447
  # Make the API request
1451
1448
  @client.make_request(
1452
- :get,
1449
+ :post,
1453
1450
  path,
1454
- query_params: query_params
1451
+ body: body
1455
1452
  )
1456
1453
  end
1457
1454
 
@@ -443,6 +443,62 @@ module GetStream
443
443
  )
444
444
  end
445
445
 
446
+ # Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.
447
+ #
448
+ # @return [Models::DeleteExternalStorageResponse]
449
+ def delete_importer_external_storage()
450
+ path = '/api/v2/imports/v2/external-storage'
451
+
452
+ # Make the API request
453
+ @client.make_request(
454
+ :delete,
455
+ path
456
+ )
457
+ end
458
+
459
+ # Returns the current external storage configuration for the app. Returns 404 if no configuration exists.
460
+ #
461
+ # @return [Models::GetExternalStorageResponse]
462
+ def get_importer_external_storage()
463
+ path = '/api/v2/imports/v2/external-storage'
464
+
465
+ # Make the API request
466
+ @client.make_request(
467
+ :get,
468
+ path
469
+ )
470
+ end
471
+
472
+ # Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported.
473
+ #
474
+ # @param upsert_external_storage_request [UpsertExternalStorageRequest]
475
+ # @return [Models::UpsertExternalStorageResponse]
476
+ def upsert_importer_external_storage(upsert_external_storage_request)
477
+ path = '/api/v2/imports/v2/external-storage'
478
+ # Build request body
479
+ body = upsert_external_storage_request
480
+
481
+ # Make the API request
482
+ @client.make_request(
483
+ :put,
484
+ path,
485
+ body: body
486
+ )
487
+ end
488
+
489
+ # Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check.
490
+ #
491
+ # @return [Models::ValidateExternalStorageResponse]
492
+ def validate_importer_external_storage()
493
+ path = '/api/v2/imports/v2/external-storage/validate'
494
+
495
+ # Make the API request
496
+ @client.make_request(
497
+ :post,
498
+ path
499
+ )
500
+ end
501
+
446
502
  # Deletes an import v2 task. Can only delete tasks in queued state.
447
503
  #
448
504
  # @param _id [String]
@@ -335,16 +335,25 @@ module GetStream
335
335
  # Returns activity by ID
336
336
  #
337
337
  # @param _id [String]
338
+ # @param comment_sort [String]
339
+ # @param comment_limit [Integer]
340
+ # @param user_id [String]
338
341
  # @return [Models::GetActivityResponse]
339
- def get_activity(_id)
342
+ def get_activity(_id, comment_sort = nil, comment_limit = nil, user_id = nil)
340
343
  path = '/api/v2/feeds/activities/{id}'
341
344
  # Replace path parameters
342
345
  path = path.gsub('{id}', _id.to_s)
346
+ # Build query parameters
347
+ query_params = {}
348
+ query_params['comment_sort'] = comment_sort unless comment_sort.nil?
349
+ query_params['comment_limit'] = comment_limit unless comment_limit.nil?
350
+ query_params['user_id'] = user_id unless user_id.nil?
343
351
 
344
352
  # Make the API request
345
353
  @client.make_request(
346
354
  :get,
347
- path
355
+ path,
356
+ query_params: query_params
348
357
  )
349
358
  end
350
359
 
@@ -596,12 +605,13 @@ module GetStream
596
605
  # @param depth [Integer]
597
606
  # @param sort [String]
598
607
  # @param replies_limit [Integer]
608
+ # @param id_around [String]
599
609
  # @param user_id [String]
600
610
  # @param limit [Integer]
601
611
  # @param prev [String]
602
612
  # @param _next [String]
603
613
  # @return [Models::GetCommentsResponse]
604
- def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
614
+ def get_comments(object_id, object_type, depth = nil, sort = nil, replies_limit = nil, id_around = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
605
615
  path = '/api/v2/feeds/comments'
606
616
  # Build query parameters
607
617
  query_params = {}
@@ -610,6 +620,7 @@ module GetStream
610
620
  query_params['depth'] = depth unless depth.nil?
611
621
  query_params['sort'] = sort unless sort.nil?
612
622
  query_params['replies_limit'] = replies_limit unless replies_limit.nil?
623
+ query_params['id_around'] = id_around unless id_around.nil?
613
624
  query_params['user_id'] = user_id unless user_id.nil?
614
625
  query_params['limit'] = limit unless limit.nil?
615
626
  query_params['prev'] = prev unless prev.nil?
@@ -674,6 +685,69 @@ module GetStream
674
685
  )
675
686
  end
676
687
 
688
+ # Deletes a bookmark from a comment
689
+ #
690
+ # @param comment_id [String]
691
+ # @param folder_id [String]
692
+ # @param user_id [String]
693
+ # @return [Models::DeleteCommentBookmarkResponse]
694
+ def delete_comment_bookmark(comment_id, folder_id = nil, user_id = nil)
695
+ path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
696
+ # Replace path parameters
697
+ path = path.gsub('{comment_id}', comment_id.to_s)
698
+ # Build query parameters
699
+ query_params = {}
700
+ query_params['folder_id'] = folder_id unless folder_id.nil?
701
+ query_params['user_id'] = user_id unless user_id.nil?
702
+
703
+ # Make the API request
704
+ @client.make_request(
705
+ :delete,
706
+ path,
707
+ query_params: query_params
708
+ )
709
+ end
710
+
711
+ # Updates a bookmark for a comment
712
+ #
713
+ # @param comment_id [String]
714
+ # @param update_comment_bookmark_request [UpdateCommentBookmarkRequest]
715
+ # @return [Models::UpdateCommentBookmarkResponse]
716
+ def update_comment_bookmark(comment_id, update_comment_bookmark_request)
717
+ path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
718
+ # Replace path parameters
719
+ path = path.gsub('{comment_id}', comment_id.to_s)
720
+ # Build request body
721
+ body = update_comment_bookmark_request
722
+
723
+ # Make the API request
724
+ @client.make_request(
725
+ :patch,
726
+ path,
727
+ body: body
728
+ )
729
+ end
730
+
731
+ # Adds a bookmark to a comment
732
+ #
733
+ # @param comment_id [String]
734
+ # @param add_comment_bookmark_request [AddCommentBookmarkRequest]
735
+ # @return [Models::AddCommentBookmarkResponse]
736
+ def add_comment_bookmark(comment_id, add_comment_bookmark_request)
737
+ path = '/api/v2/feeds/comments/{comment_id}/bookmarks'
738
+ # Replace path parameters
739
+ path = path.gsub('{comment_id}', comment_id.to_s)
740
+ # Build request body
741
+ body = add_comment_bookmark_request
742
+
743
+ # Make the API request
744
+ @client.make_request(
745
+ :post,
746
+ path,
747
+ body: body
748
+ )
749
+ end
750
+
677
751
  # Deletes a comment from an object (e.g., activity) and broadcasts appropriate events
678
752
  #
679
753
  # @param _id [String]
@@ -700,16 +774,21 @@ module GetStream
700
774
  # Get a comment by ID
701
775
  #
702
776
  # @param _id [String]
777
+ # @param user_id [String]
703
778
  # @return [Models::GetCommentResponse]
704
- def get_comment(_id)
779
+ def get_comment(_id, user_id = nil)
705
780
  path = '/api/v2/feeds/comments/{id}'
706
781
  # Replace path parameters
707
782
  path = path.gsub('{id}', _id.to_s)
783
+ # Build query parameters
784
+ query_params = {}
785
+ query_params['user_id'] = user_id unless user_id.nil?
708
786
 
709
787
  # Make the API request
710
788
  @client.make_request(
711
789
  :get,
712
- path
790
+ path,
791
+ query_params: query_params
713
792
  )
714
793
  end
715
794
 
@@ -733,6 +812,26 @@ module GetStream
733
812
  )
734
813
  end
735
814
 
815
+ # Updates certain fields of the comment. Use 'set' to update specific fields and 'unset' to remove fields.Sends events:- feeds.activity.updated- feeds.comment.updated
816
+ #
817
+ # @param _id [String]
818
+ # @param update_comment_partial_request [UpdateCommentPartialRequest]
819
+ # @return [Models::UpdateCommentPartialResponse]
820
+ def update_comment_partial(_id, update_comment_partial_request)
821
+ path = '/api/v2/feeds/comments/{id}/partial'
822
+ # Replace path parameters
823
+ path = path.gsub('{id}', _id.to_s)
824
+ # Build request body
825
+ body = update_comment_partial_request
826
+
827
+ # Make the API request
828
+ @client.make_request(
829
+ :post,
830
+ path,
831
+ body: body
832
+ )
833
+ end
834
+
736
835
  # Adds a reaction to a comment
737
836
  #
738
837
  # @param _id [String]
@@ -804,12 +903,13 @@ module GetStream
804
903
  # @param depth [Integer]
805
904
  # @param sort [String]
806
905
  # @param replies_limit [Integer]
906
+ # @param id_around [String]
807
907
  # @param user_id [String]
808
908
  # @param limit [Integer]
809
909
  # @param prev [String]
810
910
  # @param _next [String]
811
911
  # @return [Models::GetCommentRepliesResponse]
812
- def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
912
+ def get_comment_replies(_id, depth = nil, sort = nil, replies_limit = nil, id_around = nil, user_id = nil, limit = nil, prev = nil, _next = nil)
813
913
  path = '/api/v2/feeds/comments/{id}/replies'
814
914
  # Replace path parameters
815
915
  path = path.gsub('{id}', _id.to_s)
@@ -818,6 +918,7 @@ module GetStream
818
918
  query_params['depth'] = depth unless depth.nil?
819
919
  query_params['sort'] = sort unless sort.nil?
820
920
  query_params['replies_limit'] = replies_limit unless replies_limit.nil?
921
+ query_params['id_around'] = id_around unless id_around.nil?
821
922
  query_params['user_id'] = user_id unless user_id.nil?
822
923
  query_params['limit'] = limit unless limit.nil?
823
924
  query_params['prev'] = prev unless prev.nil?
@@ -831,6 +932,26 @@ module GetStream
831
932
  )
832
933
  end
833
934
 
935
+ # Restores a soft-deleted comment by its ID. The comment and all its descendants are restored. Requires moderator permissions.
936
+ #
937
+ # @param _id [String]
938
+ # @param restore_comment_request [RestoreCommentRequest]
939
+ # @return [Models::RestoreCommentResponse]
940
+ def restore_comment(_id, restore_comment_request)
941
+ path = '/api/v2/feeds/comments/{id}/restore'
942
+ # Replace path parameters
943
+ path = path.gsub('{id}', _id.to_s)
944
+ # Build request body
945
+ body = restore_comment_request
946
+
947
+ # Make the API request
948
+ @client.make_request(
949
+ :post,
950
+ path,
951
+ body: body
952
+ )
953
+ end
954
+
834
955
  # List all feed groups for the application
835
956
  #
836
957
  # @param include_soft_deleted [Boolean]
@@ -1606,9 +1727,10 @@ module GetStream
1606
1727
  # @param source [String]
1607
1728
  # @param target [String]
1608
1729
  # @param delete_notification_activity [Boolean]
1730
+ # @param keep_history [Boolean]
1609
1731
  # @param enrich_own_fields [Boolean]
1610
1732
  # @return [Models::UnfollowResponse]
1611
- def unfollow(source, target, delete_notification_activity = nil, enrich_own_fields = nil)
1733
+ def unfollow(source, target, delete_notification_activity = nil, keep_history = nil, enrich_own_fields = nil)
1612
1734
  path = '/api/v2/feeds/follows/{source}/{target}'
1613
1735
  # Replace path parameters
1614
1736
  path = path.gsub('{source}', source.to_s)
@@ -1616,6 +1738,7 @@ module GetStream
1616
1738
  # Build query parameters
1617
1739
  query_params = {}
1618
1740
  query_params['delete_notification_activity'] = delete_notification_activity unless delete_notification_activity.nil?
1741
+ query_params['keep_history'] = keep_history unless keep_history.nil?
1619
1742
  query_params['enrich_own_fields'] = enrich_own_fields unless enrich_own_fields.nil?
1620
1743
 
1621
1744
  # Make the API request
@@ -16,7 +16,8 @@ module GetStream
16
16
  # @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
17
17
  attr_accessor :feeds
18
18
  # @!attribute copy_custom_to_notification
19
- # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
19
+ # @deprecated This field is deprecated.
20
+ # @return [Boolean] 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
20
21
  attr_accessor :copy_custom_to_notification
21
22
  # @!attribute create_notification_activity
22
23
  # @return [Boolean] Whether to create notification activities for mentioned users
@@ -73,7 +74,7 @@ module GetStream
73
74
  # @return [Object] Custom data for the activity
74
75
  attr_accessor :custom
75
76
  # @!attribute location
76
- # @return [ActivityLocation]
77
+ # @return [Location]
77
78
  attr_accessor :location
78
79
  # @!attribute search_data
79
80
  # @return [Object] Additional data for search indexing
@@ -133,7 +133,7 @@ module GetStream
133
133
  # @return [FeedResponse]
134
134
  attr_accessor :current_feed
135
135
  # @!attribute location
136
- # @return [ActivityLocation]
136
+ # @return [Location]
137
137
  attr_accessor :location
138
138
  # @!attribute metrics
139
139
  # @return [Hash<String, Integer>]
@@ -150,6 +150,9 @@ module GetStream
150
150
  # @!attribute poll
151
151
  # @return [PollResponseData]
152
152
  attr_accessor :poll
153
+ # @!attribute score_vars
154
+ # @return [Object] Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options.
155
+ attr_accessor :score_vars
153
156
 
154
157
  # Initialize with attributes
155
158
  def initialize(attributes = {})
@@ -201,6 +204,7 @@ module GetStream
201
204
  @notification_context = attributes[:notification_context] || attributes['notification_context'] || nil
202
205
  @parent = attributes[:parent] || attributes['parent'] || nil
203
206
  @poll = attributes[:poll] || attributes['poll'] || nil
207
+ @score_vars = attributes[:score_vars] || attributes['score_vars'] || nil
204
208
  end
205
209
 
206
210
  # Override field mappings for JSON serialization
@@ -252,7 +256,8 @@ module GetStream
252
256
  moderation: 'moderation',
253
257
  notification_context: 'notification_context',
254
258
  parent: 'parent',
255
- poll: 'poll'
259
+ poll: 'poll',
260
+ score_vars: 'score_vars'
256
261
  }
257
262
  end
258
263
  end
@@ -16,7 +16,8 @@ module GetStream
16
16
  # @return [Array<String>] List of feeds to add the activity to with a default max limit of 25 feeds
17
17
  attr_accessor :feeds
18
18
  # @!attribute copy_custom_to_notification
19
- # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
19
+ # @deprecated This field is deprecated.
20
+ # @return [Boolean] 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
20
21
  attr_accessor :copy_custom_to_notification
21
22
  # @!attribute create_notification_activity
22
23
  # @return [Boolean] Whether to create notification activities for mentioned users
@@ -27,6 +28,9 @@ module GetStream
27
28
  # @!attribute expires_at
28
29
  # @return [String] Expiration time for the activity
29
30
  attr_accessor :expires_at
31
+ # @!attribute force_moderation
32
+ # @return [Boolean]
33
+ attr_accessor :force_moderation
30
34
  # @!attribute id
31
35
  # @return [String] Optional ID for the activity
32
36
  attr_accessor :id
@@ -76,7 +80,7 @@ module GetStream
76
80
  # @return [Object] Custom data for the activity
77
81
  attr_accessor :custom
78
82
  # @!attribute location
79
- # @return [ActivityLocation]
83
+ # @return [Location]
80
84
  attr_accessor :location
81
85
  # @!attribute search_data
82
86
  # @return [Object] Additional data for search indexing
@@ -91,6 +95,7 @@ module GetStream
91
95
  @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
92
96
  @enrich_own_fields = attributes[:enrich_own_fields] || attributes['enrich_own_fields'] || nil
93
97
  @expires_at = attributes[:expires_at] || attributes['expires_at'] || nil
98
+ @force_moderation = attributes[:force_moderation] || attributes['force_moderation'] || nil
94
99
  @id = attributes[:id] || attributes['id'] || nil
95
100
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
96
101
  @poll_id = attributes[:poll_id] || attributes['poll_id'] || nil
@@ -120,6 +125,7 @@ module GetStream
120
125
  create_notification_activity: 'create_notification_activity',
121
126
  enrich_own_fields: 'enrich_own_fields',
122
127
  expires_at: 'expires_at',
128
+ force_moderation: 'force_moderation',
123
129
  id: 'id',
124
130
  parent_id: 'parent_id',
125
131
  poll_id: 'poll_id',
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class AddCommentBookmarkRequest < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute folder_id
13
+ # @return [String] ID of the folder to add the bookmark to
14
+ attr_accessor :folder_id
15
+ # @!attribute user_id
16
+ # @return [String]
17
+ attr_accessor :user_id
18
+ # @!attribute custom
19
+ # @return [Object] Custom data for the bookmark
20
+ attr_accessor :custom
21
+ # @!attribute new_folder
22
+ # @return [AddFolderRequest]
23
+ attr_accessor :new_folder
24
+ # @!attribute user
25
+ # @return [UserRequest]
26
+ attr_accessor :user
27
+
28
+ # Initialize with attributes
29
+ def initialize(attributes = {})
30
+ super(attributes)
31
+ @folder_id = attributes[:folder_id] || attributes['folder_id'] || nil
32
+ @user_id = attributes[:user_id] || attributes['user_id'] || nil
33
+ @custom = attributes[:custom] || attributes['custom'] || nil
34
+ @new_folder = attributes[:new_folder] || attributes['new_folder'] || nil
35
+ @user = attributes[:user] || attributes['user'] || nil
36
+ end
37
+
38
+ # Override field mappings for JSON serialization
39
+ def self.json_field_mappings
40
+ {
41
+ folder_id: 'folder_id',
42
+ user_id: 'user_id',
43
+ custom: 'custom',
44
+ new_folder: 'new_folder',
45
+ user: 'user'
46
+ }
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.
4
+
5
+ module GetStream
6
+ module Generated
7
+ module Models
8
+ #
9
+ class AddCommentBookmarkResponse < GetStream::BaseModel
10
+
11
+ # Model attributes
12
+ # @!attribute duration
13
+ # @return [String]
14
+ attr_accessor :duration
15
+ # @!attribute bookmark
16
+ # @return [BookmarkResponse]
17
+ attr_accessor :bookmark
18
+
19
+ # Initialize with attributes
20
+ def initialize(attributes = {})
21
+ super(attributes)
22
+ @duration = attributes[:duration] || attributes['duration']
23
+ @bookmark = attributes[:bookmark] || attributes['bookmark']
24
+ end
25
+
26
+ # Override field mappings for JSON serialization
27
+ def self.json_field_mappings
28
+ {
29
+ duration: 'duration',
30
+ bookmark: 'bookmark'
31
+ }
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -13,7 +13,8 @@ module GetStream
13
13
  # @return [String] The type of reaction, eg upvote, like, ...
14
14
  attr_accessor :type
15
15
  # @!attribute copy_custom_to_notification
16
- # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
16
+ # @deprecated This field is deprecated.
17
+ # @return [Boolean] 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
17
18
  attr_accessor :copy_custom_to_notification
18
19
  # @!attribute create_notification_activity
19
20
  # @return [Boolean] Whether to create a notification activity for this reaction
@@ -16,11 +16,15 @@ module GetStream
16
16
  # @return [String] Text content of the comment
17
17
  attr_accessor :comment
18
18
  # @!attribute copy_custom_to_notification
19
- # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
19
+ # @deprecated This field is deprecated.
20
+ # @return [Boolean] 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
20
21
  attr_accessor :copy_custom_to_notification
21
22
  # @!attribute create_notification_activity
22
23
  # @return [Boolean] Whether to create a notification activity for this comment
23
24
  attr_accessor :create_notification_activity
25
+ # @!attribute force_moderation
26
+ # @return [Boolean] If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
27
+ attr_accessor :force_moderation
24
28
  # @!attribute id
25
29
  # @return [String] Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated.
26
30
  attr_accessor :id
@@ -59,6 +63,7 @@ module GetStream
59
63
  @comment = attributes[:comment] || attributes['comment'] || nil
60
64
  @copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil
61
65
  @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
66
+ @force_moderation = attributes[:force_moderation] || attributes['force_moderation'] || nil
62
67
  @id = attributes[:id] || attributes['id'] || nil
63
68
  @object_type = attributes[:object_type] || attributes['object_type'] || nil
64
69
  @parent_id = attributes[:parent_id] || attributes['parent_id'] || nil
@@ -78,6 +83,7 @@ module GetStream
78
83
  comment: 'comment',
79
84
  copy_custom_to_notification: 'copy_custom_to_notification',
80
85
  create_notification_activity: 'create_notification_activity',
86
+ force_moderation: 'force_moderation',
81
87
  id: 'id',
82
88
  object_type: 'object_type',
83
89
  parent_id: 'parent_id',
@@ -13,7 +13,8 @@ module GetStream
13
13
  # @return [String] Type of reaction
14
14
  attr_accessor :type
15
15
  # @!attribute copy_custom_to_notification
16
- # @return [Boolean] Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
16
+ # @deprecated This field is deprecated.
17
+ # @return [Boolean] 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
17
18
  attr_accessor :copy_custom_to_notification
18
19
  # @!attribute create_notification_activity
19
20
  # @return [Boolean] Whether to create a notification activity for this reaction
@@ -12,6 +12,9 @@ module GetStream
12
12
  # @!attribute member_ids
13
13
  # @return [Array<String>] List of user IDs to add as members
14
14
  attr_accessor :member_ids
15
+ # @!attribute as_admin
16
+ # @return [Boolean] Whether to add the members as group admins. Defaults to false
17
+ attr_accessor :as_admin
15
18
  # @!attribute team_id
16
19
  # @return [String]
17
20
  attr_accessor :team_id
@@ -20,6 +23,7 @@ module GetStream
20
23
  def initialize(attributes = {})
21
24
  super(attributes)
22
25
  @member_ids = attributes[:member_ids] || attributes['member_ids']
26
+ @as_admin = attributes[:as_admin] || attributes['as_admin'] || nil
23
27
  @team_id = attributes[:team_id] || attributes['team_id'] || nil
24
28
  end
25
29
 
@@ -27,6 +31,7 @@ module GetStream
27
31
  def self.json_field_mappings
28
32
  {
29
33
  member_ids: 'member_ids',
34
+ as_admin: 'as_admin',
30
35
  team_id: 'team_id'
31
36
  }
32
37
  end
@@ -9,20 +9,30 @@ module GetStream
9
9
  class AggregationConfig < GetStream::BaseModel
10
10
 
11
11
  # Model attributes
12
+ # @!attribute activities_sort
13
+ # @return [String] 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.
14
+ attr_accessor :activities_sort
12
15
  # @!attribute format
13
16
  # @return [String] Format for activity aggregation
14
17
  attr_accessor :format
18
+ # @!attribute score_strategy
19
+ # @return [String] Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg
20
+ attr_accessor :score_strategy
15
21
 
16
22
  # Initialize with attributes
17
23
  def initialize(attributes = {})
18
24
  super(attributes)
25
+ @activities_sort = attributes[:activities_sort] || attributes['activities_sort'] || nil
19
26
  @format = attributes[:format] || attributes['format'] || nil
27
+ @score_strategy = attributes[:score_strategy] || attributes['score_strategy'] || nil
20
28
  end
21
29
 
22
30
  # Override field mappings for JSON serialization
23
31
  def self.json_field_mappings
24
32
  {
25
- format: 'format'
33
+ activities_sort: 'activities_sort',
34
+ format: 'format',
35
+ score_strategy: 'score_strategy'
26
36
  }
27
37
  end
28
38
  end
@@ -43,7 +43,7 @@ module GetStream
43
43
  @started_at = attributes[:started_at] || attributes['started_at']
44
44
  @task_id = attributes[:task_id] || attributes['task_id']
45
45
  @custom = attributes[:custom] || attributes['custom']
46
- @type = attributes[:type] || attributes['type'] || "export.users.error"
46
+ @type = attributes[:type] || attributes['type'] || "export.moderation_logs.error"
47
47
  @received_at = attributes[:received_at] || attributes['received_at'] || nil
48
48
  end
49
49