stream-chat-ruby 3.5.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c193dc0a1beb05f205ca2ec002883897c53cb9de43bdd261f774cb10bfd77609
4
- data.tar.gz: 3676694494376cfa0f10a15fc0c98d57648cfd1b656aa54494a46e20b1b152d1
3
+ metadata.gz: 0c55fc395f5169324a1b1d53db03f76c6722a1ca7814a30727ea2d75bf83695c
4
+ data.tar.gz: 9eecd44ef605e60b4d614517e0d8ab3fe5b8e28d5526bb73c5b6db83d951f97d
5
5
  SHA512:
6
- metadata.gz: e7be6e25d8a4905877fc1b98c34d1eafd10bac687160d4b7e56a5397dea4b415ce6867029bfa60a2e5b3143cc7465031f8a763e823c90a68f56d3691ac0d1521
7
- data.tar.gz: 5e7ea414d7f831b07244ef1332389134e3a4594229387941efbd237c3a63ef8c6612056b9275744bffebcb2119e4a5f8364a483f1cc8e80f5f0bf39f881908f4
6
+ metadata.gz: dcc91071484ff66878abee7eb51a22595960a66477b0652ee873fd9e0f416a563981b35ad73a2836df4df554f45e2193247dff766c53b9cb4c3940a026a05238
7
+ data.tar.gz: ea9ea94c91b9feff61e144ce0e5afb94bfed3e7502aa39a786ceaf9767869c42970c18831168511ea998a042ba64946cc603d81e8a75fa733e5ccbcb93c39411
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.6.0](https://github.com/GetStream/stream-chat-ruby/compare/v3.5.1...v3.6.0) (2024-05-22)
6
+
7
+
8
+ ### Features
9
+
10
+ * add test for `notifications_muted` as filter in `query_members` ([#140](https://github.com/GetStream/stream-chat-ruby/issues/140)) ([61102ac](https://github.com/GetStream/stream-chat-ruby/commit/61102ac16783ecfc502d8f7d21435ec64af28436))
11
+
5
12
  ### [3.5.1](https://github.com/GetStream/stream-chat-ruby/compare/v3.5.0...v3.5.1) (2024-04-18)
6
13
 
7
14
  ## [3.5.0](https://github.com/GetStream/stream-chat-ruby/compare/v3.4.0...v3.5.0) (2023-10-30)
data/README.md CHANGED
@@ -165,32 +165,6 @@ status_response = client.get_export_channel_status(response['task_id'])
165
165
  # status_response['status'] == 'pending', 'completed'
166
166
  ```
167
167
 
168
- ### Campaigns
169
-
170
- ```ruby
171
- # Create a user or channel segment
172
- client.create_segment({ name: 'test', type: 'user', filter: { uniq: 'a flag on users' } })
173
-
174
- # Create a campaign that uses the segment
175
- client.create_campaign({
176
- name: 'test',
177
- text: 'Hi',
178
- sender_id: campaign_sender,
179
- segment_id: segment_id,
180
- channel_type: 'messaging'
181
- })
182
-
183
- # Schedule the campaign
184
- client.schedule_campaign(campaign_id, Time.now.to_i)
185
-
186
- # Query the campaign to check the status
187
- response = client.query_campaigns(filter_conditions: { id: campaign_id })
188
- response['campaigns'][0]['status'] == 'completed'
189
-
190
- # Read sent information
191
- client.query_recipients(filter_conditions: { campaign_id: campaign_id })
192
- ```
193
-
194
168
  ### Rate limits
195
169
 
196
170
  ```ruby
@@ -258,13 +258,13 @@ module StreamChat
258
258
  # Restores a user synchronously.
259
259
  sig { params(user_id: String).returns(StreamChat::StreamResponse) }
260
260
  def restore_user(user_id)
261
- post("users/restore", data: { user_ids: [user_id] })
261
+ post('users/restore', data: { user_ids: [user_id] })
262
262
  end
263
263
 
264
264
  # Restores users synchronously.
265
265
  sig { params(user_ids: T::Array[String]).returns(StreamChat::StreamResponse) }
266
266
  def restore_users(user_ids)
267
- post("users/restore", data: { user_ids: user_ids })
267
+ post('users/restore', data: { user_ids: user_ids })
268
268
  end
269
269
 
270
270
  # Deactivates a user.
@@ -681,13 +681,13 @@ module StreamChat
681
681
  before = T.cast(before, DateTime).rfc3339 if before.instance_of?(DateTime)
682
682
 
683
683
  updates = []
684
- user_ids.each do |user_id|
685
- updates.push({
686
- 'id' => user_id,
687
- 'set' => {
688
- 'revoke_tokens_issued_before' => before
689
- }
690
- })
684
+ user_ids.map do |user_id|
685
+ {
686
+ 'id' => user_id,
687
+ 'set' => {
688
+ 'revoke_tokens_issued_before' => before
689
+ }
690
+ }
691
691
  end
692
692
  update_users_partial(updates)
693
693
  end
@@ -890,84 +890,6 @@ module StreamChat
890
890
  get('imports', params: options)
891
891
  end
892
892
 
893
- # Creates a campaign.
894
- sig { params(campaign: StringKeyHash).returns(StreamChat::StreamResponse) }
895
- def create_campaign(campaign)
896
- post('campaigns', data: { campaign: campaign })
897
- end
898
-
899
- # Queries campaigns similar to query_channels or query_users.
900
- sig { params(params: T.untyped).returns(StreamChat::StreamResponse) }
901
- def query_campaigns(**params)
902
- get('campaigns', params: { payload: params.to_json })
903
- end
904
-
905
- # Updates a campaign.
906
- sig { params(campaign_id: String, campaign: StringKeyHash).returns(StreamChat::StreamResponse) }
907
- def update_campaign(campaign_id, campaign)
908
- put("campaigns/#{campaign_id}", data: { campaign: campaign })
909
- end
910
-
911
- # Deletes a campaign.
912
- sig { params(campaign_id: String).returns(StreamChat::StreamResponse) }
913
- def delete_campaign(campaign_id)
914
- delete("campaigns/#{campaign_id}")
915
- end
916
-
917
- # Schedules a campaign.
918
- sig { params(campaign_id: String, scheduled_for: Integer).returns(StreamChat::StreamResponse) }
919
- def schedule_campaign(campaign_id, scheduled_for)
920
- patch("campaigns/#{campaign_id}/schedule", data: { scheduled_for: scheduled_for })
921
- end
922
-
923
- # Stops a campaign.
924
- sig { params(campaign_id: String).returns(StreamChat::StreamResponse) }
925
- def stop_campaign(campaign_id)
926
- patch("campaigns/#{campaign_id}/stop")
927
- end
928
-
929
- # Resumes a campaign.
930
- sig { params(campaign_id: String).returns(StreamChat::StreamResponse) }
931
- def resume_campaign(campaign_id)
932
- patch("campaigns/#{campaign_id}/resume")
933
- end
934
-
935
- # Tests a campaign.
936
- sig { params(campaign_id: String, users: T::Array[StringKeyHash]).returns(StreamChat::StreamResponse) }
937
- def test_campaign(campaign_id, users)
938
- post("campaigns/#{campaign_id}/test", data: { users: users })
939
- end
940
-
941
- # Creates a campaign segment.
942
- sig { params(segment: StringKeyHash).returns(StreamChat::StreamResponse) }
943
- def create_segment(segment)
944
- post('segments', data: { segment: segment })
945
- end
946
-
947
- # Queries campaign segments.
948
- sig { params(params: T.untyped).returns(StreamChat::StreamResponse) }
949
- def query_segments(**params)
950
- get('segments', params: { payload: params.to_json })
951
- end
952
-
953
- # Updates a campaign segment.
954
- sig { params(segment_id: String, segment: StringKeyHash).returns(StreamChat::StreamResponse) }
955
- def update_segment(segment_id, segment)
956
- put("segments/#{segment_id}", data: { segment: segment })
957
- end
958
-
959
- # Deletes a campaign segment.
960
- sig { params(segment_id: String).returns(StreamChat::StreamResponse) }
961
- def delete_segment(segment_id)
962
- delete("segments/#{segment_id}")
963
- end
964
-
965
- # Queries campaign recipients.
966
- sig { params(params: T.untyped).returns(StreamChat::StreamResponse) }
967
- def query_recipients(**params)
968
- get('recipients', params: { payload: params.to_json })
969
- end
970
-
971
893
  private
972
894
 
973
895
  sig { returns(T::Hash[String, String]) }
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module StreamChat
5
- VERSION = '3.5.1'
5
+ VERSION = '3.6.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-chat-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - getstream.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday