zyphr 0.1.74 → 0.1.75

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: e66b5107f0b6cb22378746fe207cb9b9dfa05c38baffcfc74fa12afebd8155d0
4
- data.tar.gz: 411b3b624fb95b4a46051f2cdf96bba73c9722c2ddbd12e347f174c157bad3f6
3
+ metadata.gz: 22710deb1992994b8cfaa5e510149b44ff35d1c73c17913f2ae87bf0fe326720
4
+ data.tar.gz: 2cd4167b6f8fbb06b2bac2c49e976cbb5a8b1466926792c98f6092d4315974bd
5
5
  SHA512:
6
- metadata.gz: 910a19b07e16cd6a4b9b35491c46898baa3a31aa8bce32934f0dedcf83609261c8a0122f4b56519a048efd2721c0c4f8496108e158266e17428bb700d30f8289
7
- data.tar.gz: 2754efc3f3bf5878010f0ecf02fb5d2bcd634c9e8d12f71abf900617bd5c57f4c509a4006d11a52c65bd907a3263e69caa26cc2073da20905de5ce80f3212a52
6
+ metadata.gz: 7371e2b95cc27ff8d01d173524603f8c5f5a3df4f13f7e1bfbafda9dc084d1675f70103b8eba938497e2258833d012399e94da9a8dd6076e1f09da20d9a682ca
7
+ data.tar.gz: 47554541353f967da8f588ef51c29eaaa233fd129fd53fb5ab4cfa067d9a7e0fc056968315b039b51b2b1b75fe53d2c1c878f72e71dbbd958773a6883e2da435
data/README.md CHANGED
@@ -553,6 +553,7 @@ Class | Method | HTTP request | Description
553
553
  - [Zyphr::Inbox](docs/Inbox.md)
554
554
  - [Zyphr::InboxListMeta](docs/InboxListMeta.md)
555
555
  - [Zyphr::InboxListResponse](docs/InboxListResponse.md)
556
+ - [Zyphr::InboxListResponseMeta](docs/InboxListResponseMeta.md)
556
557
  - [Zyphr::InboxNotificationResponse](docs/InboxNotificationResponse.md)
557
558
  - [Zyphr::InboxResponse](docs/InboxResponse.md)
558
559
  - [Zyphr::InviteEndUser200Response](docs/InviteEndUser200Response.md)
@@ -394,6 +394,7 @@ api_instance = Zyphr::InboundEmailApi.new
394
394
  opts = {
395
395
  status: 'received', # String |
396
396
  to: 'to_example', # String | Filter by receiving address
397
+ inbox_id: '38400000-8cf0-11bd-b23e-10b96e4ef00d', # String | Only mail that landed in this inbox (see /inboxes)
397
398
  include_withheld: true, # Boolean | Include quarantined/dropped mail
398
399
  limit: 56, # Integer |
399
400
  offset: 56 # Integer |
@@ -432,6 +433,7 @@ end
432
433
  | ---- | ---- | ----------- | ----- |
433
434
  | **status** | **String** | | [optional] |
434
435
  | **to** | **String** | Filter by receiving address | [optional] |
436
+ | **inbox_id** | **String** | Only mail that landed in this inbox (see /inboxes) | [optional] |
435
437
  | **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
436
438
  | **limit** | **Integer** | | [optional][default to 50] |
437
439
  | **offset** | **Integer** | | [optional][default to 0] |
@@ -452,7 +454,7 @@ end
452
454
 
453
455
  ## list_inboxes
454
456
 
455
- > <InboxListResponse> list_inboxes
457
+ > <InboxListResponse> list_inboxes(opts)
456
458
 
457
459
  List inboxes
458
460
 
@@ -470,10 +472,13 @@ Zyphr.configure do |config|
470
472
  end
471
473
 
472
474
  api_instance = Zyphr::InboundEmailApi.new
475
+ opts = {
476
+ include_counts: true # Boolean | Add `received_count` to each inbox and `meta.received_total` (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
477
+ }
473
478
 
474
479
  begin
475
480
  # List inboxes
476
- result = api_instance.list_inboxes
481
+ result = api_instance.list_inboxes(opts)
477
482
  p result
478
483
  rescue Zyphr::ApiError => e
479
484
  puts "Error when calling InboundEmailApi->list_inboxes: #{e}"
@@ -484,12 +489,12 @@ end
484
489
 
485
490
  This returns an Array which contains the response data, status code and headers.
486
491
 
487
- > <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info
492
+ > <Array(<InboxListResponse>, Integer, Hash)> list_inboxes_with_http_info(opts)
488
493
 
489
494
  ```ruby
490
495
  begin
491
496
  # List inboxes
492
- data, status_code, headers = api_instance.list_inboxes_with_http_info
497
+ data, status_code, headers = api_instance.list_inboxes_with_http_info(opts)
493
498
  p status_code # => 2xx
494
499
  p headers # => { ... }
495
500
  p data # => <InboxListResponse>
@@ -500,7 +505,9 @@ end
500
505
 
501
506
  ### Parameters
502
507
 
503
- This endpoint does not need any parameter.
508
+ | Name | Type | Description | Notes |
509
+ | ---- | ---- | ----------- | ----- |
510
+ | **include_counts** | **Boolean** | Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list. | [optional] |
504
511
 
505
512
  ### Return type
506
513
 
data/docs/Inbox.md CHANGED
@@ -13,6 +13,7 @@
13
13
  | **from_name** | **String** | Display name recipients see on replies | [optional] |
14
14
  | **created_at** | **Time** | | [optional] |
15
15
  | **updated_at** | **Time** | | [optional] |
16
+ | **received_count** | **Integer** | Delivered mail in this inbox. Only with &#x60;include_counts&#x3D;true&#x60;. | [optional] |
16
17
 
17
18
  ## Example
18
19
 
@@ -28,7 +29,8 @@ instance = Zyphr::Inbox.new(
28
29
  name: Support,
29
30
  from_name: Acme Support,
30
31
  created_at: null,
31
- updated_at: null
32
+ updated_at: null,
33
+ received_count: null
32
34
  )
33
35
  ```
34
36
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **data** | [**Array&lt;InAppNotification&gt;**](InAppNotification.md) | | [optional] |
8
- | **meta** | [**InboxListMeta**](InboxListMeta.md) | | [optional] |
8
+ | **meta** | [**InboxListResponseMeta**](InboxListResponseMeta.md) | | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -0,0 +1,22 @@
1
+ # Zyphr::InboxListResponseMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **request_id** | **String** | | [optional] |
8
+ | **total** | **Integer** | | [optional] |
9
+ | **received_total** | **Integer** | All delivered mail in the project, including mail with no inbox. Only with &#x60;include_counts&#x3D;true&#x60;. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zyphr'
15
+
16
+ instance = Zyphr::InboxListResponseMeta.new(
17
+ request_id: req_abc123,
18
+ total: null,
19
+ received_total: null
20
+ )
21
+ ```
22
+
@@ -346,6 +346,7 @@ module Zyphr
346
346
  # @param [Hash] opts the optional parameters
347
347
  # @option opts [String] :status
348
348
  # @option opts [String] :to Filter by receiving address
349
+ # @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
349
350
  # @option opts [Boolean] :include_withheld Include quarantined/dropped mail
350
351
  # @option opts [Integer] :limit (default to 50)
351
352
  # @option opts [Integer] :offset (default to 0)
@@ -360,6 +361,7 @@ module Zyphr
360
361
  # @param [Hash] opts the optional parameters
361
362
  # @option opts [String] :status
362
363
  # @option opts [String] :to Filter by receiving address
364
+ # @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
363
365
  # @option opts [Boolean] :include_withheld Include quarantined/dropped mail
364
366
  # @option opts [Integer] :limit (default to 50)
365
367
  # @option opts [Integer] :offset (default to 0)
@@ -383,6 +385,7 @@ module Zyphr
383
385
  query_params = opts[:query_params] || {}
384
386
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
385
387
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
388
+ query_params[:'inbox_id'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
386
389
  query_params[:'include_withheld'] = opts[:'include_withheld'] if !opts[:'include_withheld'].nil?
387
390
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
388
391
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
@@ -423,6 +426,7 @@ module Zyphr
423
426
 
424
427
  # List inboxes
425
428
  # @param [Hash] opts the optional parameters
429
+ # @option opts [Boolean] :include_counts Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
426
430
  # @return [InboxListResponse]
427
431
  def list_inboxes(opts = {})
428
432
  data, _status_code, _headers = list_inboxes_with_http_info(opts)
@@ -431,6 +435,7 @@ module Zyphr
431
435
 
432
436
  # List inboxes
433
437
  # @param [Hash] opts the optional parameters
438
+ # @option opts [Boolean] :include_counts Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
434
439
  # @return [Array<(InboxListResponse, Integer, Hash)>] InboxListResponse data, response status code and response headers
435
440
  def list_inboxes_with_http_info(opts = {})
436
441
  if @api_client.config.debugging
@@ -441,6 +446,7 @@ module Zyphr
441
446
 
442
447
  # query parameters
443
448
  query_params = opts[:query_params] || {}
449
+ query_params[:'include_counts'] = opts[:'include_counts'] if !opts[:'include_counts'].nil?
444
450
 
445
451
  # header parameters
446
452
  header_params = opts[:header_params] || {}
@@ -38,6 +38,9 @@ module Zyphr
38
38
 
39
39
  attr_accessor :updated_at
40
40
 
41
+ # Delivered mail in this inbox. Only with `include_counts=true`.
42
+ attr_accessor :received_count
43
+
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
42
45
  def self.attribute_map
43
46
  {
@@ -49,7 +52,8 @@ module Zyphr
49
52
  :'name' => :'name',
50
53
  :'from_name' => :'from_name',
51
54
  :'created_at' => :'created_at',
52
- :'updated_at' => :'updated_at'
55
+ :'updated_at' => :'updated_at',
56
+ :'received_count' => :'received_count'
53
57
  }
54
58
  end
55
59
 
@@ -74,7 +78,8 @@ module Zyphr
74
78
  :'name' => :'String',
75
79
  :'from_name' => :'String',
76
80
  :'created_at' => :'Time',
77
- :'updated_at' => :'Time'
81
+ :'updated_at' => :'Time',
82
+ :'received_count' => :'Integer'
78
83
  }
79
84
  end
80
85
 
@@ -136,6 +141,10 @@ module Zyphr
136
141
  if attributes.key?(:'updated_at')
137
142
  self.updated_at = attributes[:'updated_at']
138
143
  end
144
+
145
+ if attributes.key?(:'received_count')
146
+ self.received_count = attributes[:'received_count']
147
+ end
139
148
  end
140
149
 
141
150
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -166,7 +175,8 @@ module Zyphr
166
175
  name == o.name &&
167
176
  from_name == o.from_name &&
168
177
  created_at == o.created_at &&
169
- updated_at == o.updated_at
178
+ updated_at == o.updated_at &&
179
+ received_count == o.received_count
170
180
  end
171
181
 
172
182
  # @see the `==` method
@@ -178,7 +188,7 @@ module Zyphr
178
188
  # Calculates hash code according to all attributes.
179
189
  # @return [Integer] Hash code
180
190
  def hash
181
- [id, email_address, is_catch_all, enabled, domain_id, name, from_name, created_at, updated_at].hash
191
+ [id, email_address, is_catch_all, enabled, domain_id, name, from_name, created_at, updated_at, received_count].hash
182
192
  end
183
193
 
184
194
  # Builds the object from hash
@@ -41,7 +41,7 @@ module Zyphr
41
41
  def self.openapi_types
42
42
  {
43
43
  :'data' => :'Array<InAppNotification>',
44
- :'meta' => :'InboxListMeta'
44
+ :'meta' => :'InboxListResponseMeta'
45
45
  }
46
46
  end
47
47
 
@@ -0,0 +1,246 @@
1
+ =begin
2
+ #Zyphr API
3
+
4
+ #Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@zyphr.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zyphr
17
+ class InboxListResponseMeta
18
+ attr_accessor :request_id
19
+
20
+ attr_accessor :total
21
+
22
+ # All delivered mail in the project, including mail with no inbox. Only with `include_counts=true`.
23
+ attr_accessor :received_total
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'request_id' => :'request_id',
29
+ :'total' => :'total',
30
+ :'received_total' => :'received_total'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'request_id' => :'String',
48
+ :'total' => :'Integer',
49
+ :'received_total' => :'Integer'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # List of class defined in allOf (OpenAPI v3)
60
+ def self.openapi_all_of
61
+ [
62
+ :'RequestMeta'
63
+ ]
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zyphr::InboxListResponseMeta` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zyphr::InboxListResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'request_id')
83
+ self.request_id = attributes[:'request_id']
84
+ end
85
+
86
+ if attributes.key?(:'total')
87
+ self.total = attributes[:'total']
88
+ end
89
+
90
+ if attributes.key?(:'received_total')
91
+ self.received_total = attributes[:'received_total']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ request_id == o.request_id &&
116
+ total == o.total &&
117
+ received_total == o.received_total
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [request_id, total, received_total].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ attributes = attributes.transform_keys(&:to_sym)
138
+ transformed_hash = {}
139
+ openapi_types.each_pair do |key, type|
140
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = nil
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[attribute_map[key]].is_a?(Array)
146
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
+ end
148
+ elsif !attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
150
+ end
151
+ end
152
+ new(transformed_hash)
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def self._deserialize(type, value)
160
+ case type.to_sym
161
+ when :Time
162
+ Time.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ # models (e.g. Pet) or oneOf
193
+ klass = Zyphr.const_get(type)
194
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+
246
+ end
data/lib/zyphr.rb CHANGED
@@ -180,6 +180,7 @@ require 'zyphr/models/inbound_email_response'
180
180
  require 'zyphr/models/inbox'
181
181
  require 'zyphr/models/inbox_list_meta'
182
182
  require 'zyphr/models/inbox_list_response'
183
+ require 'zyphr/models/inbox_list_response_meta'
183
184
  require 'zyphr/models/inbox_notification_response'
184
185
  require 'zyphr/models/inbox_response'
185
186
  require 'zyphr/models/invite_end_user200_response'
@@ -98,6 +98,7 @@ describe 'InboundEmailApi' do
98
98
  # @param [Hash] opts the optional parameters
99
99
  # @option opts [String] :status
100
100
  # @option opts [String] :to Filter by receiving address
101
+ # @option opts [String] :inbox_id Only mail that landed in this inbox (see /inboxes)
101
102
  # @option opts [Boolean] :include_withheld Include quarantined/dropped mail
102
103
  # @option opts [Integer] :limit
103
104
  # @option opts [Integer] :offset
@@ -111,6 +112,7 @@ describe 'InboundEmailApi' do
111
112
  # unit tests for list_inboxes
112
113
  # List inboxes
113
114
  # @param [Hash] opts the optional parameters
115
+ # @option opts [Boolean] :include_counts Add &#x60;received_count&#x60; to each inbox and &#x60;meta.received_total&#x60; (all delivered mail, including mail with no inbox). Counts use the same filter as the default received-email list.
114
116
  # @return [InboxListResponse]
115
117
  describe 'list_inboxes test' do
116
118
  it 'should work' do
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Zyphr API
3
+
4
+ #Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@zyphr.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zyphr::InboxListResponseMeta
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::InboxListResponseMeta do
21
+ let(:instance) { Zyphr::InboxListResponseMeta.new }
22
+
23
+ describe 'test an instance of InboxListResponseMeta' do
24
+ it 'should create an instance of InboxListResponseMeta' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::InboxListResponseMeta)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "request_id"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "total"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "received_total"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -81,4 +81,10 @@ describe Zyphr::Inbox do
81
81
  end
82
82
  end
83
83
 
84
+ describe 'test attribute "received_count"' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
+ end
88
+ end
89
+
84
90
  end
data/zyphr.gemspec CHANGED
@@ -17,7 +17,7 @@ require "zyphr/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "zyphr"
20
- s.version = '0.1.74'
20
+ s.version = '0.1.75'
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Zyphr"]
23
23
  s.email = ["support@zyphr.dev"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zyphr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.74
4
+ version: 0.1.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zyphr
@@ -274,6 +274,7 @@ files:
274
274
  - docs/InboxApi.md
275
275
  - docs/InboxListMeta.md
276
276
  - docs/InboxListResponse.md
277
+ - docs/InboxListResponseMeta.md
277
278
  - docs/InboxNotificationResponse.md
278
279
  - docs/InboxResponse.md
279
280
  - docs/InviteEndUser200Response.md
@@ -844,6 +845,7 @@ files:
844
845
  - lib/zyphr/models/inbox.rb
845
846
  - lib/zyphr/models/inbox_list_meta.rb
846
847
  - lib/zyphr/models/inbox_list_response.rb
848
+ - lib/zyphr/models/inbox_list_response_meta.rb
847
849
  - lib/zyphr/models/inbox_notification_response.rb
848
850
  - lib/zyphr/models/inbox_response.rb
849
851
  - lib/zyphr/models/invite_end_user200_response.rb
@@ -1393,6 +1395,7 @@ files:
1393
1395
  - spec/models/inbound_email_response_spec.rb
1394
1396
  - spec/models/inbound_email_spec.rb
1395
1397
  - spec/models/inbox_list_meta_spec.rb
1398
+ - spec/models/inbox_list_response_meta_spec.rb
1396
1399
  - spec/models/inbox_list_response_spec.rb
1397
1400
  - spec/models/inbox_notification_response_spec.rb
1398
1401
  - spec/models/inbox_response_spec.rb
@@ -1960,6 +1963,7 @@ test_files:
1960
1963
  - spec/models/o_auth_link_response_data_spec.rb
1961
1964
  - spec/models/set_end_user_claims200_response_spec.rb
1962
1965
  - spec/models/topic_stats_response_spec.rb
1966
+ - spec/models/inbox_list_response_meta_spec.rb
1963
1967
  - spec/models/webhook_circuit_state_response_spec.rb
1964
1968
  - spec/models/sms_batch_result_message_spec.rb
1965
1969
  - spec/models/mark_all_read_response_spec.rb