zyphr 0.1.27 → 0.1.30

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -0
  3. data/docs/AddDomain200Response.md +20 -0
  4. data/docs/AddDomain200ResponseMeta.md +20 -0
  5. data/docs/AddDomainRequest.md +18 -0
  6. data/docs/DeleteDomainResponse.md +20 -0
  7. data/docs/DeleteDomainResponseData.md +20 -0
  8. data/docs/DnsRecord.md +26 -0
  9. data/docs/DomainListResponse.md +20 -0
  10. data/docs/DomainListResponseMeta.md +24 -0
  11. data/docs/DomainResponse.md +38 -0
  12. data/docs/DomainsApi.md +436 -0
  13. data/docs/GetDomain200Response.md +20 -0
  14. data/docs/GetDomain200ResponseMeta.md +18 -0
  15. data/docs/VerificationStatusResponse.md +20 -0
  16. data/docs/VerificationStatusResponseData.md +32 -0
  17. data/docs/VerifyDomainResponse.md +20 -0
  18. data/docs/VerifyDomainResponseData.md +24 -0
  19. data/lib/zyphr/api/domains_api.rb +399 -0
  20. data/lib/zyphr/models/add_domain200_response.rb +229 -0
  21. data/lib/zyphr/models/add_domain200_response_meta.rb +229 -0
  22. data/lib/zyphr/models/add_domain_request.rb +238 -0
  23. data/lib/zyphr/models/delete_domain_response.rb +263 -0
  24. data/lib/zyphr/models/delete_domain_response_data.rb +263 -0
  25. data/lib/zyphr/models/dns_record.rb +373 -0
  26. data/lib/zyphr/models/domain_list_response.rb +265 -0
  27. data/lib/zyphr/models/domain_list_response_meta.rb +249 -0
  28. data/lib/zyphr/models/domain_response.rb +463 -0
  29. data/lib/zyphr/models/get_domain200_response.rb +229 -0
  30. data/lib/zyphr/models/get_domain200_response_meta.rb +220 -0
  31. data/lib/zyphr/models/verification_status_response.rb +263 -0
  32. data/lib/zyphr/models/verification_status_response_data.rb +415 -0
  33. data/lib/zyphr/models/verify_domain_response.rb +263 -0
  34. data/lib/zyphr/models/verify_domain_response_data.rb +339 -0
  35. data/lib/zyphr.rb +16 -0
  36. data/spec/api/domains_api_spec.rb +106 -0
  37. data/spec/models/add_domain200_response_meta_spec.rb +42 -0
  38. data/spec/models/add_domain200_response_spec.rb +42 -0
  39. data/spec/models/add_domain_request_spec.rb +36 -0
  40. data/spec/models/delete_domain_response_data_spec.rb +42 -0
  41. data/spec/models/delete_domain_response_spec.rb +42 -0
  42. data/spec/models/dns_record_spec.rb +68 -0
  43. data/spec/models/domain_list_response_meta_spec.rb +54 -0
  44. data/spec/models/domain_list_response_spec.rb +42 -0
  45. data/spec/models/domain_response_spec.rb +100 -0
  46. data/spec/models/get_domain200_response_meta_spec.rb +36 -0
  47. data/spec/models/get_domain200_response_spec.rb +42 -0
  48. data/spec/models/verification_status_response_data_spec.rb +82 -0
  49. data/spec/models/verification_status_response_spec.rb +42 -0
  50. data/spec/models/verify_domain_response_data_spec.rb +58 -0
  51. data/spec/models/verify_domain_response_spec.rb +42 -0
  52. data/zyphr.gemspec +1 -1
  53. metadata +66 -2
@@ -0,0 +1,436 @@
1
+ # Zyphr::DomainsApi
2
+
3
+ All URIs are relative to *https://api.zyphr.dev/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**add_domain**](DomainsApi.md#add_domain) | **POST** /v1/domains | Add a sending domain |
8
+ | [**delete_domain**](DomainsApi.md#delete_domain) | **DELETE** /v1/domains/{id} | Remove a sending domain |
9
+ | [**get_domain**](DomainsApi.md#get_domain) | **GET** /v1/domains/{id} | Get a sending domain |
10
+ | [**get_domain_verification_status**](DomainsApi.md#get_domain_verification_status) | **GET** /v1/domains/{id}/verification-status | Get domain verification status |
11
+ | [**list_domains**](DomainsApi.md#list_domains) | **GET** /v1/domains | List sending domains |
12
+ | [**verify_domain**](DomainsApi.md#verify_domain) | **POST** /v1/domains/{id}/verify | Trigger domain verification |
13
+
14
+
15
+ ## add_domain
16
+
17
+ > <AddDomain200Response> add_domain(add_domain_request)
18
+
19
+ Add a sending domain
20
+
21
+ Register a new sending domain on the account. Returns the full set of DNS records that must be published before email can send from this domain. **Idempotent:** calling this with a domain already registered on the current project returns the existing domain (200) instead of erroring, so re-runs from IaC tooling are safe.
22
+
23
+ ### Examples
24
+
25
+ ```ruby
26
+ require 'time'
27
+ require 'zyphr'
28
+ # setup authorization
29
+ Zyphr.configure do |config|
30
+ # Configure API key authorization: ApiKeyAuth
31
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
32
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
34
+ end
35
+
36
+ api_instance = Zyphr::DomainsApi.new
37
+ add_domain_request = Zyphr::AddDomainRequest.new({domain: 'sprint.example.com'}) # AddDomainRequest |
38
+
39
+ begin
40
+ # Add a sending domain
41
+ result = api_instance.add_domain(add_domain_request)
42
+ p result
43
+ rescue Zyphr::ApiError => e
44
+ puts "Error when calling DomainsApi->add_domain: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the add_domain_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<AddDomain200Response>, Integer, Hash)> add_domain_with_http_info(add_domain_request)
53
+
54
+ ```ruby
55
+ begin
56
+ # Add a sending domain
57
+ data, status_code, headers = api_instance.add_domain_with_http_info(add_domain_request)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <AddDomain200Response>
61
+ rescue Zyphr::ApiError => e
62
+ puts "Error when calling DomainsApi->add_domain_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **add_domain_request** | [**AddDomainRequest**](AddDomainRequest.md) | | |
71
+
72
+ ### Return type
73
+
74
+ [**AddDomain200Response**](AddDomain200Response.md)
75
+
76
+ ### Authorization
77
+
78
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: application/json
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## delete_domain
87
+
88
+ > <DeleteDomainResponse> delete_domain(id)
89
+
90
+ Remove a sending domain
91
+
92
+ Remove a sending domain from the project. The domain is also detached from any SES identity that was provisioned for it. Returns 409 if the domain is still referenced by other resources (templates, scheduled sends, etc.) — those must be removed first.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'zyphr'
99
+ # setup authorization
100
+ Zyphr.configure do |config|
101
+ # Configure API key authorization: ApiKeyAuth
102
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
103
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
104
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
105
+ end
106
+
107
+ api_instance = Zyphr::DomainsApi.new
108
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
109
+
110
+ begin
111
+ # Remove a sending domain
112
+ result = api_instance.delete_domain(id)
113
+ p result
114
+ rescue Zyphr::ApiError => e
115
+ puts "Error when calling DomainsApi->delete_domain: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the delete_domain_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(<DeleteDomainResponse>, Integer, Hash)> delete_domain_with_http_info(id)
124
+
125
+ ```ruby
126
+ begin
127
+ # Remove a sending domain
128
+ data, status_code, headers = api_instance.delete_domain_with_http_info(id)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => <DeleteDomainResponse>
132
+ rescue Zyphr::ApiError => e
133
+ puts "Error when calling DomainsApi->delete_domain_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **id** | **String** | | |
142
+
143
+ ### Return type
144
+
145
+ [**DeleteDomainResponse**](DeleteDomainResponse.md)
146
+
147
+ ### Authorization
148
+
149
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
156
+
157
+ ## get_domain
158
+
159
+ > <GetDomain200Response> get_domain(id)
160
+
161
+ Get a sending domain
162
+
163
+ Retrieve a single sending domain by ID, including DNS records and verification counters.
164
+
165
+ ### Examples
166
+
167
+ ```ruby
168
+ require 'time'
169
+ require 'zyphr'
170
+ # setup authorization
171
+ Zyphr.configure do |config|
172
+ # Configure API key authorization: ApiKeyAuth
173
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
174
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
175
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
176
+ end
177
+
178
+ api_instance = Zyphr::DomainsApi.new
179
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
180
+
181
+ begin
182
+ # Get a sending domain
183
+ result = api_instance.get_domain(id)
184
+ p result
185
+ rescue Zyphr::ApiError => e
186
+ puts "Error when calling DomainsApi->get_domain: #{e}"
187
+ end
188
+ ```
189
+
190
+ #### Using the get_domain_with_http_info variant
191
+
192
+ This returns an Array which contains the response data, status code and headers.
193
+
194
+ > <Array(<GetDomain200Response>, Integer, Hash)> get_domain_with_http_info(id)
195
+
196
+ ```ruby
197
+ begin
198
+ # Get a sending domain
199
+ data, status_code, headers = api_instance.get_domain_with_http_info(id)
200
+ p status_code # => 2xx
201
+ p headers # => { ... }
202
+ p data # => <GetDomain200Response>
203
+ rescue Zyphr::ApiError => e
204
+ puts "Error when calling DomainsApi->get_domain_with_http_info: #{e}"
205
+ end
206
+ ```
207
+
208
+ ### Parameters
209
+
210
+ | Name | Type | Description | Notes |
211
+ | ---- | ---- | ----------- | ----- |
212
+ | **id** | **String** | | |
213
+
214
+ ### Return type
215
+
216
+ [**GetDomain200Response**](GetDomain200Response.md)
217
+
218
+ ### Authorization
219
+
220
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: Not defined
225
+ - **Accept**: application/json
226
+
227
+
228
+ ## get_domain_verification_status
229
+
230
+ > <VerificationStatusResponse> get_domain_verification_status(id)
231
+
232
+ Get domain verification status
233
+
234
+ Returns the current verification status with per-record `verified` flags and aggregate counters. Useful when polling for terminal status from an AI agent (the recommended pattern is to subscribe to the `domain.verified` webhook event instead — see sc-5444).
235
+
236
+ ### Examples
237
+
238
+ ```ruby
239
+ require 'time'
240
+ require 'zyphr'
241
+ # setup authorization
242
+ Zyphr.configure do |config|
243
+ # Configure API key authorization: ApiKeyAuth
244
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = Zyphr::DomainsApi.new
250
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Domain ID
251
+
252
+ begin
253
+ # Get domain verification status
254
+ result = api_instance.get_domain_verification_status(id)
255
+ p result
256
+ rescue Zyphr::ApiError => e
257
+ puts "Error when calling DomainsApi->get_domain_verification_status: #{e}"
258
+ end
259
+ ```
260
+
261
+ #### Using the get_domain_verification_status_with_http_info variant
262
+
263
+ This returns an Array which contains the response data, status code and headers.
264
+
265
+ > <Array(<VerificationStatusResponse>, Integer, Hash)> get_domain_verification_status_with_http_info(id)
266
+
267
+ ```ruby
268
+ begin
269
+ # Get domain verification status
270
+ data, status_code, headers = api_instance.get_domain_verification_status_with_http_info(id)
271
+ p status_code # => 2xx
272
+ p headers # => { ... }
273
+ p data # => <VerificationStatusResponse>
274
+ rescue Zyphr::ApiError => e
275
+ puts "Error when calling DomainsApi->get_domain_verification_status_with_http_info: #{e}"
276
+ end
277
+ ```
278
+
279
+ ### Parameters
280
+
281
+ | Name | Type | Description | Notes |
282
+ | ---- | ---- | ----------- | ----- |
283
+ | **id** | **String** | Domain ID | |
284
+
285
+ ### Return type
286
+
287
+ [**VerificationStatusResponse**](VerificationStatusResponse.md)
288
+
289
+ ### Authorization
290
+
291
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
292
+
293
+ ### HTTP request headers
294
+
295
+ - **Content-Type**: Not defined
296
+ - **Accept**: application/json
297
+
298
+
299
+ ## list_domains
300
+
301
+ > <DomainListResponse> list_domains
302
+
303
+ List sending domains
304
+
305
+ List sending domains on the current project, with verification status and DNS records.
306
+
307
+ ### Examples
308
+
309
+ ```ruby
310
+ require 'time'
311
+ require 'zyphr'
312
+ # setup authorization
313
+ Zyphr.configure do |config|
314
+ # Configure API key authorization: ApiKeyAuth
315
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
316
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
317
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
318
+ end
319
+
320
+ api_instance = Zyphr::DomainsApi.new
321
+
322
+ begin
323
+ # List sending domains
324
+ result = api_instance.list_domains
325
+ p result
326
+ rescue Zyphr::ApiError => e
327
+ puts "Error when calling DomainsApi->list_domains: #{e}"
328
+ end
329
+ ```
330
+
331
+ #### Using the list_domains_with_http_info variant
332
+
333
+ This returns an Array which contains the response data, status code and headers.
334
+
335
+ > <Array(<DomainListResponse>, Integer, Hash)> list_domains_with_http_info
336
+
337
+ ```ruby
338
+ begin
339
+ # List sending domains
340
+ data, status_code, headers = api_instance.list_domains_with_http_info
341
+ p status_code # => 2xx
342
+ p headers # => { ... }
343
+ p data # => <DomainListResponse>
344
+ rescue Zyphr::ApiError => e
345
+ puts "Error when calling DomainsApi->list_domains_with_http_info: #{e}"
346
+ end
347
+ ```
348
+
349
+ ### Parameters
350
+
351
+ This endpoint does not need any parameter.
352
+
353
+ ### Return type
354
+
355
+ [**DomainListResponse**](DomainListResponse.md)
356
+
357
+ ### Authorization
358
+
359
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
360
+
361
+ ### HTTP request headers
362
+
363
+ - **Content-Type**: Not defined
364
+ - **Accept**: application/json
365
+
366
+
367
+ ## verify_domain
368
+
369
+ > <VerifyDomainResponse> verify_domain(id)
370
+
371
+ Trigger domain verification
372
+
373
+ Queue an asynchronous DNS verification check. Returns immediately with a `job_id`. Poll `GET /v1/domains/{id}/verification-status` (or the higher-level `GET /v1/domains/{id}`) for the result, or subscribe to the `domain.verified` webhook event when sc-5444 ships. Returns 409 if a verification is already in progress for this domain (within the last 2 minutes).
374
+
375
+ ### Examples
376
+
377
+ ```ruby
378
+ require 'time'
379
+ require 'zyphr'
380
+ # setup authorization
381
+ Zyphr.configure do |config|
382
+ # Configure API key authorization: ApiKeyAuth
383
+ config.api_key['X-API-Key'] = 'YOUR API KEY'
384
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
385
+ # config.api_key_prefix['X-API-Key'] = 'Bearer'
386
+ end
387
+
388
+ api_instance = Zyphr::DomainsApi.new
389
+ id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
390
+
391
+ begin
392
+ # Trigger domain verification
393
+ result = api_instance.verify_domain(id)
394
+ p result
395
+ rescue Zyphr::ApiError => e
396
+ puts "Error when calling DomainsApi->verify_domain: #{e}"
397
+ end
398
+ ```
399
+
400
+ #### Using the verify_domain_with_http_info variant
401
+
402
+ This returns an Array which contains the response data, status code and headers.
403
+
404
+ > <Array(<VerifyDomainResponse>, Integer, Hash)> verify_domain_with_http_info(id)
405
+
406
+ ```ruby
407
+ begin
408
+ # Trigger domain verification
409
+ data, status_code, headers = api_instance.verify_domain_with_http_info(id)
410
+ p status_code # => 2xx
411
+ p headers # => { ... }
412
+ p data # => <VerifyDomainResponse>
413
+ rescue Zyphr::ApiError => e
414
+ puts "Error when calling DomainsApi->verify_domain_with_http_info: #{e}"
415
+ end
416
+ ```
417
+
418
+ ### Parameters
419
+
420
+ | Name | Type | Description | Notes |
421
+ | ---- | ---- | ----------- | ----- |
422
+ | **id** | **String** | | |
423
+
424
+ ### Return type
425
+
426
+ [**VerifyDomainResponse**](VerifyDomainResponse.md)
427
+
428
+ ### Authorization
429
+
430
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
431
+
432
+ ### HTTP request headers
433
+
434
+ - **Content-Type**: Not defined
435
+ - **Accept**: application/json
436
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::GetDomain200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**DomainResponse**](DomainResponse.md) | | [optional] |
8
+ | **meta** | [**GetDomain200ResponseMeta**](GetDomain200ResponseMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::GetDomain200Response.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Zyphr::GetDomain200ResponseMeta
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **request_id** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zyphr'
13
+
14
+ instance = Zyphr::GetDomain200ResponseMeta.new(
15
+ request_id: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::VerificationStatusResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**VerificationStatusResponseData**](VerificationStatusResponseData.md) | | |
8
+ | **meta** | [**GetDomain200ResponseMeta**](GetDomain200ResponseMeta.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::VerificationStatusResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,32 @@
1
+ # Zyphr::VerificationStatusResponseData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **domain_id** | **String** | | |
8
+ | **domain** | **String** | | |
9
+ | **status** | **String** | | |
10
+ | **records_verified** | **Integer** | | |
11
+ | **records_total** | **Integer** | | |
12
+ | **progress** | **Hash&lt;String, Object&gt;** | Internal verification progress detail | [optional] |
13
+ | **dns_records** | [**Array&lt;DnsRecord&gt;**](DnsRecord.md) | | |
14
+ | **last_checked_at** | **Time** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'zyphr'
20
+
21
+ instance = Zyphr::VerificationStatusResponseData.new(
22
+ domain_id: null,
23
+ domain: null,
24
+ status: null,
25
+ records_verified: null,
26
+ records_total: null,
27
+ progress: null,
28
+ dns_records: null,
29
+ last_checked_at: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::VerifyDomainResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**VerifyDomainResponseData**](VerifyDomainResponseData.md) | | |
8
+ | **meta** | [**AddDomain200ResponseMeta**](AddDomain200ResponseMeta.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::VerifyDomainResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # Zyphr::VerifyDomainResponseData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **job_id** | **String** | | |
8
+ | **domain_id** | **String** | | |
9
+ | **domain** | **String** | | |
10
+ | **status** | **String** | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zyphr'
16
+
17
+ instance = Zyphr::VerifyDomainResponseData.new(
18
+ job_id: null,
19
+ domain_id: null,
20
+ domain: null,
21
+ status: null
22
+ )
23
+ ```
24
+