svix 2.0.0 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fc53bc63b9ae31d227b0d24a99ab9170d73dd7e0269b5606343058a227e0e4e
4
- data.tar.gz: 14907d267547ac4a479286d291b60b5bc78e3097929280582c207088eac315a2
3
+ metadata.gz: 88cf865706f83e4acf7afc3c975f991a59b996689f850fa32f049312f57c44bc
4
+ data.tar.gz: 671f8f8feaef82fbd23b38cfc0c81c789760d376164eebad75ae48c1ff91993f
5
5
  SHA512:
6
- metadata.gz: 39001b060e52b61f449713180aa04992764f0cd344ba86c1b1b364349c17facf0045f5fc8a915dc00987941bc8c5dfe3de137e9713099dea0e7847c6bb9dba13
7
- data.tar.gz: 4a7ded3a8d1fcbdd38f1e30f7747123502d5ce0e8d48819e535c1c9a91472656c182f0da2291f551427fbbf746e2cddf296c718328254ad023eadbfc3afbd29c
6
+ metadata.gz: 0e823ac8800de712729e2e5cc859729497610acc0114edd310c0495b3900611d8bf5db57f11b4e3757ff85d1325bfb79988bb7e53a2dcffef02ee23d07d3f0e3
7
+ data.tar.gz: 3da8d543ec82a2c394bc8f1cfbbc130e915fc1203e9ff70849a42774dd05de4bdfccfe663afcc515078963de15cc39bbe35299bf0fdf6aec5cf0f87a357596f0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (2.0.0)
4
+ svix (2.1.0)
5
5
  base64 (~> 0.3.0)
6
6
  logger (~> 1.0)
7
7
 
@@ -106,6 +106,19 @@ module Svix
106
106
  )
107
107
  end
108
108
 
109
+ def bulk_expunge_content(app_id, bulk_expunge_contents_in, options = {})
110
+ options = options.transform_keys(&:to_s)
111
+ res = @client.execute_request(
112
+ "POST",
113
+ "/api/v1/app/#{app_id}/msg/bulk-expunge",
114
+ headers: {
115
+ "idempotency-key" => options["idempotency-key"]
116
+ },
117
+ body: bulk_expunge_contents_in
118
+ )
119
+ BulkExpungeContentsOut.deserialize(res)
120
+ end
121
+
109
122
  def expunge_all_contents(app_id, options = {})
110
123
  options = options.transform_keys(&:to_s)
111
124
  res = @client.execute_request(
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class BulkExpungeContentsIn
7
+ # Message ID or UID to delete
8
+ attr_accessor :ids
9
+
10
+ ALL_FIELD ||= ["ids"].freeze
11
+ private_constant :ALL_FIELD
12
+
13
+ def initialize(attributes = {})
14
+ unless attributes.is_a?(Hash)
15
+ fail(
16
+ ArgumentError,
17
+ "The input argument (attributes) must be a hash in `Svix::BulkExpungeContentsIn` new method"
18
+ )
19
+ end
20
+
21
+ attributes.each do |k, v|
22
+ unless ALL_FIELD.include?(k.to_s)
23
+ fail(ArgumentError, "The field #{k} is not part of Svix::BulkExpungeContentsIn")
24
+ end
25
+
26
+ instance_variable_set("@#{k}", v)
27
+ instance_variable_set("@__#{k}_is_defined", true)
28
+ end
29
+ end
30
+
31
+ def self.deserialize(attributes = {})
32
+ attributes = attributes.transform_keys(&:to_s)
33
+ attrs = Hash.new
34
+ attrs["ids"] = attributes["ids"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["ids"] = Svix::serialize_primitive(@ids) if @ids
41
+ out
42
+ end
43
+
44
+ # Serializes the object to a json string
45
+ # @return String
46
+ def to_json
47
+ JSON.dump(serialize)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class BulkExpungeContentsOut
7
+ # Results of expunging (by ID)
8
+ attr_accessor :results
9
+
10
+ ALL_FIELD ||= ["results"].freeze
11
+ private_constant :ALL_FIELD
12
+
13
+ def initialize(attributes = {})
14
+ unless attributes.is_a?(Hash)
15
+ fail(
16
+ ArgumentError,
17
+ "The input argument (attributes) must be a hash in `Svix::BulkExpungeContentsOut` new method"
18
+ )
19
+ end
20
+
21
+ attributes.each do |k, v|
22
+ unless ALL_FIELD.include?(k.to_s)
23
+ fail(ArgumentError, "The field #{k} is not part of Svix::BulkExpungeContentsOut")
24
+ end
25
+
26
+ instance_variable_set("@#{k}", v)
27
+ instance_variable_set("@__#{k}_is_defined", true)
28
+ end
29
+ end
30
+
31
+ def self.deserialize(attributes = {})
32
+ attributes = attributes.transform_keys(&:to_s)
33
+ attrs = Hash.new
34
+ attrs["results"] = attributes["results"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["results"] = Svix::serialize_primitive(@results) if @results
41
+ out
42
+ end
43
+
44
+ # Serializes the object to a json string
45
+ # @return String
46
+ def to_json
47
+ JSON.dump(serialize)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ module Svix
4
+ class BulkExpungeStatus
5
+ EXPUNGED = "expunged".freeze
6
+ NOT_FOUND = "not-found".freeze
7
+
8
+ def self.all_vars
9
+ @all_vars ||= [EXPUNGED, NOT_FOUND].freeze
10
+ end
11
+
12
+ def initialize(value)
13
+ unless BulkExpungeStatus.all_vars.include?(value)
14
+ raise "Invalid ENUM value '#{value}' for class #BulkExpungeStatus"
15
+ end
16
+
17
+ @value = value
18
+ end
19
+
20
+ def self.deserialize(value)
21
+ return value if BulkExpungeStatus.all_vars.include?(value)
22
+ raise "Invalid ENUM value '#{value}' for class #BulkExpungeStatus"
23
+ end
24
+
25
+ def serialize
26
+ @value
27
+ end
28
+ end
29
+ end
data/lib/svix/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svix
4
- VERSION = "2.0.0"
4
+ VERSION = "2.1.0"
5
5
  end
data/lib/svix.rb CHANGED
@@ -61,6 +61,9 @@ require "svix/models/background_task_type"
61
61
  require "svix/models/big_query_config_in"
62
62
  require "svix/models/big_query_config_out"
63
63
  require "svix/models/big_query_config_patch"
64
+ require "svix/models/bulk_expunge_contents_in"
65
+ require "svix/models/bulk_expunge_contents_out"
66
+ require "svix/models/bulk_expunge_status"
64
67
  require "svix/models/bulk_replay_in"
65
68
  require "svix/models/checkbook_config"
66
69
  require "svix/models/checkbook_config_out"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svix
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svix
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-08-19 00:00:00.000000000 Z
10
+ date: 2026-08-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -168,6 +168,9 @@ files:
168
168
  - lib/svix/models/big_query_config_in.rb
169
169
  - lib/svix/models/big_query_config_out.rb
170
170
  - lib/svix/models/big_query_config_patch.rb
171
+ - lib/svix/models/bulk_expunge_contents_in.rb
172
+ - lib/svix/models/bulk_expunge_contents_out.rb
173
+ - lib/svix/models/bulk_expunge_status.rb
171
174
  - lib/svix/models/bulk_replay_in.rb
172
175
  - lib/svix/models/checkbook_config.rb
173
176
  - lib/svix/models/checkbook_config_out.rb