zyphr 0.1.32 → 0.1.34
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 +4 -4
- data/README.md +54 -0
- data/docs/AddOrganizationMemberRequest.md +20 -0
- data/docs/AuthOrganizationsApi.md +864 -0
- data/docs/AuthUserProfileApi.md +76 -0
- data/docs/CreateOrganizationRequest.md +22 -0
- data/docs/DomainsApi.md +73 -0
- data/docs/InboundAttachmentUrlResponse.md +20 -0
- data/docs/InboundAttachmentUrlResponseData.md +22 -0
- data/docs/InboundEmail.md +48 -0
- data/docs/InboundEmailApi.md +235 -0
- data/docs/InboundEmailAttachment.md +24 -0
- data/docs/InboundEmailFrom.md +20 -0
- data/docs/InboundEmailListResponse.md +20 -0
- data/docs/InboundEmailListResponseMeta.md +24 -0
- data/docs/InboundEmailResponse.md +20 -0
- data/docs/LoginRequest.md +3 -1
- data/docs/MuseApi.md +681 -0
- data/docs/Organization.md +34 -0
- data/docs/OrganizationListResponse.md +20 -0
- data/docs/OrganizationListResponseMeta.md +20 -0
- data/docs/OrganizationMembersListResponse.md +20 -0
- data/docs/OrganizationMembership.md +30 -0
- data/docs/OrganizationMembershipResponse.md +20 -0
- data/docs/OrganizationMembershipWithUser.md +34 -0
- data/docs/OrganizationResponse.md +20 -0
- data/docs/RegisterRequest.md +5 -1
- data/docs/SetDomainInboundRequest.md +18 -0
- data/docs/SwitchOrganizationRequest.md +20 -0
- data/docs/SwitchOrganizationResponse.md +20 -0
- data/docs/SwitchOrganizationResponseData.md +22 -0
- data/docs/SwitchOrganizationResponseDataTokens.md +24 -0
- data/docs/SwitchOrganizationResponseDataUser.md +20 -0
- data/docs/UpdateOrganizationMemberRoleRequest.md +18 -0
- data/docs/UpdateOrganizationRequest.md +22 -0
- data/docs/V1MuseSubjectsSuggestPostRequest.md +24 -0
- data/lib/zyphr/api/auth_organizations_api.rb +773 -0
- data/lib/zyphr/api/auth_user_profile_api.rb +61 -0
- data/lib/zyphr/api/domains_api.rb +72 -0
- data/lib/zyphr/api/inbound_email_api.rb +234 -0
- data/lib/zyphr/api/muse_api.rb +644 -0
- data/lib/zyphr/models/add_organization_member_request.rb +248 -0
- data/lib/zyphr/models/create_organization_request.rb +258 -0
- data/lib/zyphr/models/inbound_attachment_url_response.rb +229 -0
- data/lib/zyphr/models/inbound_attachment_url_response_data.rb +240 -0
- data/lib/zyphr/models/inbound_email.rb +441 -0
- data/lib/zyphr/models/inbound_email_attachment.rb +250 -0
- data/lib/zyphr/models/inbound_email_from.rb +230 -0
- data/lib/zyphr/models/inbound_email_list_response.rb +231 -0
- data/lib/zyphr/models/inbound_email_list_response_meta.rb +247 -0
- data/lib/zyphr/models/inbound_email_response.rb +229 -0
- data/lib/zyphr/models/login_request.rb +14 -4
- data/lib/zyphr/models/organization.rb +434 -0
- data/lib/zyphr/models/organization_list_response.rb +265 -0
- data/lib/zyphr/models/organization_list_response_meta.rb +230 -0
- data/lib/zyphr/models/organization_members_list_response.rb +265 -0
- data/lib/zyphr/models/organization_membership.rb +379 -0
- data/lib/zyphr/models/organization_membership_response.rb +263 -0
- data/lib/zyphr/models/organization_membership_with_user.rb +405 -0
- data/lib/zyphr/models/organization_response.rb +263 -0
- data/lib/zyphr/models/register_request.rb +43 -4
- data/lib/zyphr/models/set_domain_inbound_request.rb +220 -0
- data/lib/zyphr/models/switch_organization_request.rb +263 -0
- data/lib/zyphr/models/switch_organization_response.rb +263 -0
- data/lib/zyphr/models/switch_organization_response_data.rb +289 -0
- data/lib/zyphr/models/switch_organization_response_data_tokens.rb +339 -0
- data/lib/zyphr/models/switch_organization_response_data_user.rb +230 -0
- data/lib/zyphr/models/update_organization_member_role_request.rb +223 -0
- data/lib/zyphr/models/update_organization_request.rb +239 -0
- data/lib/zyphr/models/v1_muse_subjects_suggest_post_request.rb +326 -0
- data/lib/zyphr.rb +30 -0
- data/spec/api/auth_organizations_api_spec.rb +171 -0
- data/spec/api/auth_user_profile_api_spec.rb +12 -0
- data/spec/api/domains_api_spec.rb +13 -0
- data/spec/api/inbound_email_api_spec.rb +76 -0
- data/spec/api/muse_api_spec.rb +156 -0
- data/spec/models/add_organization_member_request_spec.rb +42 -0
- data/spec/models/create_organization_request_spec.rb +48 -0
- data/spec/models/inbound_attachment_url_response_data_spec.rb +48 -0
- data/spec/models/inbound_attachment_url_response_spec.rb +42 -0
- data/spec/models/inbound_email_attachment_spec.rb +54 -0
- data/spec/models/inbound_email_from_spec.rb +42 -0
- data/spec/models/inbound_email_list_response_meta_spec.rb +54 -0
- data/spec/models/inbound_email_list_response_spec.rb +42 -0
- data/spec/models/inbound_email_response_spec.rb +42 -0
- data/spec/models/inbound_email_spec.rb +142 -0
- data/spec/models/login_request_spec.rb +6 -0
- data/spec/models/organization_list_response_meta_spec.rb +42 -0
- data/spec/models/organization_list_response_spec.rb +42 -0
- data/spec/models/organization_members_list_response_spec.rb +42 -0
- data/spec/models/organization_membership_response_spec.rb +42 -0
- data/spec/models/organization_membership_spec.rb +72 -0
- data/spec/models/organization_membership_with_user_spec.rb +84 -0
- data/spec/models/organization_response_spec.rb +42 -0
- data/spec/models/organization_spec.rb +84 -0
- data/spec/models/register_request_spec.rb +12 -0
- data/spec/models/set_domain_inbound_request_spec.rb +36 -0
- data/spec/models/switch_organization_request_spec.rb +42 -0
- data/spec/models/switch_organization_response_data_spec.rb +48 -0
- data/spec/models/switch_organization_response_data_tokens_spec.rb +58 -0
- data/spec/models/switch_organization_response_data_user_spec.rb +42 -0
- data/spec/models/switch_organization_response_spec.rb +42 -0
- data/spec/models/update_organization_member_role_request_spec.rb +36 -0
- data/spec/models/update_organization_request_spec.rb +48 -0
- data/spec/models/v1_muse_subjects_suggest_post_request_spec.rb +58 -0
- data/zyphr.gemspec +1 -1
- metadata +122 -2
data/docs/AuthUserProfileApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**delete_end_user**](AuthUserProfileApi.md#delete_end_user) | **DELETE** /auth/users/me | Delete current end user account |
|
|
8
|
+
| [**delete_end_user_by_application**](AuthUserProfileApi.md#delete_end_user_by_application) | **DELETE** /auth/users/{user_id} | Delete an end user (test environment only) |
|
|
8
9
|
| [**get_end_user**](AuthUserProfileApi.md#get_end_user) | **GET** /auth/users/me | Get current end user profile |
|
|
9
10
|
| [**update_end_user**](AuthUserProfileApi.md#update_end_user) | **PATCH** /auth/users/me | Update current end user profile |
|
|
10
11
|
|
|
@@ -80,6 +81,81 @@ This endpoint does not need any parameter.
|
|
|
80
81
|
- **Accept**: application/json
|
|
81
82
|
|
|
82
83
|
|
|
84
|
+
## delete_end_user_by_application
|
|
85
|
+
|
|
86
|
+
> delete_end_user_by_application(user_id)
|
|
87
|
+
|
|
88
|
+
Delete an end user (test environment only)
|
|
89
|
+
|
|
90
|
+
App-credentialed soft-delete for an end user, scoped to the test environment only. Live-mode credentials receive 403 — this is the intentional safety guard against a misconfigured CI runner nuking production users. Mirrors the self-service `DELETE /auth/users/me` flow: revokes all sessions, soft-deletes the row (status='deleted'), and emits a `user.deleted` webhook with `method='application_admin'`. The audit log row survives (no FK to end_users), so org-history queries still resolve. Intended for smoke / test-fixture cleanup. Production deletes should continue to use `DELETE /auth/users/me` from the end-user's own session or the dashboard.
|
|
91
|
+
|
|
92
|
+
### Examples
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
require 'time'
|
|
96
|
+
require 'zyphr'
|
|
97
|
+
# setup authorization
|
|
98
|
+
Zyphr.configure do |config|
|
|
99
|
+
# Configure API key authorization: ApplicationSecret
|
|
100
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
102
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
103
|
+
|
|
104
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
105
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
106
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
107
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
api_instance = Zyphr::AuthUserProfileApi.new
|
|
111
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
112
|
+
|
|
113
|
+
begin
|
|
114
|
+
# Delete an end user (test environment only)
|
|
115
|
+
api_instance.delete_end_user_by_application(user_id)
|
|
116
|
+
rescue Zyphr::ApiError => e
|
|
117
|
+
puts "Error when calling AuthUserProfileApi->delete_end_user_by_application: #{e}"
|
|
118
|
+
end
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Using the delete_end_user_by_application_with_http_info variant
|
|
122
|
+
|
|
123
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
124
|
+
|
|
125
|
+
> <Array(nil, Integer, Hash)> delete_end_user_by_application_with_http_info(user_id)
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
begin
|
|
129
|
+
# Delete an end user (test environment only)
|
|
130
|
+
data, status_code, headers = api_instance.delete_end_user_by_application_with_http_info(user_id)
|
|
131
|
+
p status_code # => 2xx
|
|
132
|
+
p headers # => { ... }
|
|
133
|
+
p data # => nil
|
|
134
|
+
rescue Zyphr::ApiError => e
|
|
135
|
+
puts "Error when calling AuthUserProfileApi->delete_end_user_by_application_with_http_info: #{e}"
|
|
136
|
+
end
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
| Name | Type | Description | Notes |
|
|
142
|
+
| ---- | ---- | ----------- | ----- |
|
|
143
|
+
| **user_id** | **String** | | |
|
|
144
|
+
|
|
145
|
+
### Return type
|
|
146
|
+
|
|
147
|
+
nil (empty response body)
|
|
148
|
+
|
|
149
|
+
### Authorization
|
|
150
|
+
|
|
151
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
152
|
+
|
|
153
|
+
### HTTP request headers
|
|
154
|
+
|
|
155
|
+
- **Content-Type**: Not defined
|
|
156
|
+
- **Accept**: Not defined
|
|
157
|
+
|
|
158
|
+
|
|
83
159
|
## get_end_user
|
|
84
160
|
|
|
85
161
|
> <AuthUserResponse> get_end_user
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zyphr::CreateOrganizationRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | |
|
|
8
|
+
| **slug** | **String** | Optional human-friendly identifier, unique per environment when present. | [optional] |
|
|
9
|
+
| **metadata** | **Object** | Integrator-owned opaque JSON. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zyphr'
|
|
15
|
+
|
|
16
|
+
instance = Zyphr::CreateOrganizationRequest.new(
|
|
17
|
+
name: Acme Inc,
|
|
18
|
+
slug: acme,
|
|
19
|
+
metadata: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/DomainsApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
9
9
|
| [**get_domain**](DomainsApi.md#get_domain) | **GET** /domains/{id} | Get a sending domain |
|
|
10
10
|
| [**get_domain_verification_status**](DomainsApi.md#get_domain_verification_status) | **GET** /domains/{id}/verification-status | Get domain verification status |
|
|
11
11
|
| [**list_domains**](DomainsApi.md#list_domains) | **GET** /domains | List sending domains |
|
|
12
|
+
| [**set_domain_inbound**](DomainsApi.md#set_domain_inbound) | **PUT** /domains/{id}/inbound | Enable or disable inbound email for a domain |
|
|
12
13
|
| [**verify_domain**](DomainsApi.md#verify_domain) | **POST** /domains/{id}/verify | Trigger domain verification |
|
|
13
14
|
|
|
14
15
|
|
|
@@ -364,6 +365,78 @@ This endpoint does not need any parameter.
|
|
|
364
365
|
- **Accept**: application/json
|
|
365
366
|
|
|
366
367
|
|
|
368
|
+
## set_domain_inbound
|
|
369
|
+
|
|
370
|
+
> set_domain_inbound(id, set_domain_inbound_request)
|
|
371
|
+
|
|
372
|
+
Enable or disable inbound email for a domain
|
|
373
|
+
|
|
374
|
+
Toggle email receiving for a domain. When enabled, the domain's DNS records gain an MX record on the `inbound.` subdomain that the tenant must publish. Requires a plan with inbound email (Starter+).
|
|
375
|
+
|
|
376
|
+
### Examples
|
|
377
|
+
|
|
378
|
+
```ruby
|
|
379
|
+
require 'time'
|
|
380
|
+
require 'zyphr'
|
|
381
|
+
# setup authorization
|
|
382
|
+
Zyphr.configure do |config|
|
|
383
|
+
# Configure API key authorization: ApiKeyAuth
|
|
384
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
385
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
386
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
api_instance = Zyphr::DomainsApi.new
|
|
390
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
391
|
+
set_domain_inbound_request = Zyphr::SetDomainInboundRequest.new # SetDomainInboundRequest |
|
|
392
|
+
|
|
393
|
+
begin
|
|
394
|
+
# Enable or disable inbound email for a domain
|
|
395
|
+
api_instance.set_domain_inbound(id, set_domain_inbound_request)
|
|
396
|
+
rescue Zyphr::ApiError => e
|
|
397
|
+
puts "Error when calling DomainsApi->set_domain_inbound: #{e}"
|
|
398
|
+
end
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
#### Using the set_domain_inbound_with_http_info variant
|
|
402
|
+
|
|
403
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
404
|
+
|
|
405
|
+
> <Array(nil, Integer, Hash)> set_domain_inbound_with_http_info(id, set_domain_inbound_request)
|
|
406
|
+
|
|
407
|
+
```ruby
|
|
408
|
+
begin
|
|
409
|
+
# Enable or disable inbound email for a domain
|
|
410
|
+
data, status_code, headers = api_instance.set_domain_inbound_with_http_info(id, set_domain_inbound_request)
|
|
411
|
+
p status_code # => 2xx
|
|
412
|
+
p headers # => { ... }
|
|
413
|
+
p data # => nil
|
|
414
|
+
rescue Zyphr::ApiError => e
|
|
415
|
+
puts "Error when calling DomainsApi->set_domain_inbound_with_http_info: #{e}"
|
|
416
|
+
end
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Parameters
|
|
420
|
+
|
|
421
|
+
| Name | Type | Description | Notes |
|
|
422
|
+
| ---- | ---- | ----------- | ----- |
|
|
423
|
+
| **id** | **String** | | |
|
|
424
|
+
| **set_domain_inbound_request** | [**SetDomainInboundRequest**](SetDomainInboundRequest.md) | | |
|
|
425
|
+
|
|
426
|
+
### Return type
|
|
427
|
+
|
|
428
|
+
nil (empty response body)
|
|
429
|
+
|
|
430
|
+
### Authorization
|
|
431
|
+
|
|
432
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
433
|
+
|
|
434
|
+
### HTTP request headers
|
|
435
|
+
|
|
436
|
+
- **Content-Type**: application/json
|
|
437
|
+
- **Accept**: Not defined
|
|
438
|
+
|
|
439
|
+
|
|
367
440
|
## verify_domain
|
|
368
441
|
|
|
369
442
|
> <VerifyDomainResponse> verify_domain(id)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::InboundAttachmentUrlResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**InboundAttachmentUrlResponseData**](InboundAttachmentUrlResponseData.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::InboundAttachmentUrlResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zyphr::InboundAttachmentUrlResponseData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **download_url** | **String** | Short-lived presigned S3 download URL | [optional] |
|
|
8
|
+
| **filename** | **String** | | [optional] |
|
|
9
|
+
| **content_type** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zyphr'
|
|
15
|
+
|
|
16
|
+
instance = Zyphr::InboundAttachmentUrlResponseData.new(
|
|
17
|
+
download_url: null,
|
|
18
|
+
filename: null,
|
|
19
|
+
content_type: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Zyphr::InboundEmail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **to_email** | **String** | The receiving address the mail was sent to | [optional] |
|
|
9
|
+
| **from** | [**InboundEmailFrom**](InboundEmailFrom.md) | | [optional] |
|
|
10
|
+
| **cc** | **Array<String>** | | [optional] |
|
|
11
|
+
| **subject** | **String** | | [optional] |
|
|
12
|
+
| **text_body** | **String** | | [optional] |
|
|
13
|
+
| **html_body** | **String** | | [optional] |
|
|
14
|
+
| **in_reply_to** | **String** | RFC Message-ID this is a reply to, if any | [optional] |
|
|
15
|
+
| **replied_to_message_id** | **String** | Resolved outbound message this is a reply to, if correlated | [optional] |
|
|
16
|
+
| **verified** | **Boolean** | False when SPF or DMARC failed — treat the sender as unverified | [optional] |
|
|
17
|
+
| **spf_verdict** | **String** | | [optional] |
|
|
18
|
+
| **dkim_verdict** | **String** | | [optional] |
|
|
19
|
+
| **dmarc_verdict** | **String** | | [optional] |
|
|
20
|
+
| **status** | **String** | | [optional] |
|
|
21
|
+
| **attachments** | [**Array<InboundEmailAttachment>**](InboundEmailAttachment.md) | | [optional] |
|
|
22
|
+
| **created_at** | **Time** | | [optional] |
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require 'zyphr'
|
|
28
|
+
|
|
29
|
+
instance = Zyphr::InboundEmail.new(
|
|
30
|
+
id: null,
|
|
31
|
+
to_email: support@inbound.acme.com,
|
|
32
|
+
from: null,
|
|
33
|
+
cc: null,
|
|
34
|
+
subject: null,
|
|
35
|
+
text_body: null,
|
|
36
|
+
html_body: null,
|
|
37
|
+
in_reply_to: null,
|
|
38
|
+
replied_to_message_id: null,
|
|
39
|
+
verified: null,
|
|
40
|
+
spf_verdict: null,
|
|
41
|
+
dkim_verdict: null,
|
|
42
|
+
dmarc_verdict: null,
|
|
43
|
+
status: null,
|
|
44
|
+
attachments: null,
|
|
45
|
+
created_at: null
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Zyphr::InboundEmailApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.zyphr.dev/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_inbound_attachment_url**](InboundEmailApi.md#get_inbound_attachment_url) | **GET** /inbound-emails/{id}/attachments/{attachmentId} | Get an attachment download URL |
|
|
8
|
+
| [**get_inbound_email**](InboundEmailApi.md#get_inbound_email) | **GET** /inbound-emails/{id} | Get a received email |
|
|
9
|
+
| [**list_inbound_emails**](InboundEmailApi.md#list_inbound_emails) | **GET** /inbound-emails | List received emails |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## get_inbound_attachment_url
|
|
13
|
+
|
|
14
|
+
> <InboundAttachmentUrlResponse> get_inbound_attachment_url(id, attachment_id)
|
|
15
|
+
|
|
16
|
+
Get an attachment download URL
|
|
17
|
+
|
|
18
|
+
Return a short-lived presigned S3 download URL for one attachment of a received email. `attachmentId` is the positional id from the email's `attachments` array.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'zyphr'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Zyphr.configure do |config|
|
|
27
|
+
# Configure API key authorization: ApiKeyAuth
|
|
28
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
30
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = Zyphr::InboundEmailApi.new
|
|
34
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
35
|
+
attachment_id = 'attachment_id_example' # String |
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
# Get an attachment download URL
|
|
39
|
+
result = api_instance.get_inbound_attachment_url(id, attachment_id)
|
|
40
|
+
p result
|
|
41
|
+
rescue Zyphr::ApiError => e
|
|
42
|
+
puts "Error when calling InboundEmailApi->get_inbound_attachment_url: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Using the get_inbound_attachment_url_with_http_info variant
|
|
47
|
+
|
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
|
49
|
+
|
|
50
|
+
> <Array(<InboundAttachmentUrlResponse>, Integer, Hash)> get_inbound_attachment_url_with_http_info(id, attachment_id)
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
begin
|
|
54
|
+
# Get an attachment download URL
|
|
55
|
+
data, status_code, headers = api_instance.get_inbound_attachment_url_with_http_info(id, attachment_id)
|
|
56
|
+
p status_code # => 2xx
|
|
57
|
+
p headers # => { ... }
|
|
58
|
+
p data # => <InboundAttachmentUrlResponse>
|
|
59
|
+
rescue Zyphr::ApiError => e
|
|
60
|
+
puts "Error when calling InboundEmailApi->get_inbound_attachment_url_with_http_info: #{e}"
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description | Notes |
|
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
|
68
|
+
| **id** | **String** | | |
|
|
69
|
+
| **attachment_id** | **String** | | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**InboundAttachmentUrlResponse**](InboundAttachmentUrlResponse.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## get_inbound_email
|
|
86
|
+
|
|
87
|
+
> <InboundEmailResponse> get_inbound_email(id)
|
|
88
|
+
|
|
89
|
+
Get a received email
|
|
90
|
+
|
|
91
|
+
Retrieve a single inbound email by id (scoped to the project).
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'zyphr'
|
|
98
|
+
# setup authorization
|
|
99
|
+
Zyphr.configure do |config|
|
|
100
|
+
# Configure API key authorization: ApiKeyAuth
|
|
101
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
102
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
103
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
api_instance = Zyphr::InboundEmailApi.new
|
|
107
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
108
|
+
|
|
109
|
+
begin
|
|
110
|
+
# Get a received email
|
|
111
|
+
result = api_instance.get_inbound_email(id)
|
|
112
|
+
p result
|
|
113
|
+
rescue Zyphr::ApiError => e
|
|
114
|
+
puts "Error when calling InboundEmailApi->get_inbound_email: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the get_inbound_email_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(<InboundEmailResponse>, Integer, Hash)> get_inbound_email_with_http_info(id)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
# Get a received email
|
|
127
|
+
data, status_code, headers = api_instance.get_inbound_email_with_http_info(id)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => <InboundEmailResponse>
|
|
131
|
+
rescue Zyphr::ApiError => e
|
|
132
|
+
puts "Error when calling InboundEmailApi->get_inbound_email_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **id** | **String** | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**InboundEmailResponse**](InboundEmailResponse.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: Not defined
|
|
153
|
+
- **Accept**: application/json
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## list_inbound_emails
|
|
157
|
+
|
|
158
|
+
> <InboundEmailListResponse> list_inbound_emails(opts)
|
|
159
|
+
|
|
160
|
+
List received emails
|
|
161
|
+
|
|
162
|
+
List inbound (received) emails for the project, newest first. By default only delivered mail (`received`/`processed`) is returned; pass `include_withheld=true` to also see quarantined/dropped.
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'zyphr'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Zyphr.configure do |config|
|
|
171
|
+
# Configure API key authorization: ApiKeyAuth
|
|
172
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
173
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
174
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
api_instance = Zyphr::InboundEmailApi.new
|
|
178
|
+
opts = {
|
|
179
|
+
status: 'received', # String |
|
|
180
|
+
to: 'to_example', # String | Filter by receiving address
|
|
181
|
+
include_withheld: true, # Boolean | Include quarantined/dropped mail
|
|
182
|
+
limit: 56, # Integer |
|
|
183
|
+
offset: 56 # Integer |
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
begin
|
|
187
|
+
# List received emails
|
|
188
|
+
result = api_instance.list_inbound_emails(opts)
|
|
189
|
+
p result
|
|
190
|
+
rescue Zyphr::ApiError => e
|
|
191
|
+
puts "Error when calling InboundEmailApi->list_inbound_emails: #{e}"
|
|
192
|
+
end
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Using the list_inbound_emails_with_http_info variant
|
|
196
|
+
|
|
197
|
+
This returns an Array which contains the response data, status code and headers.
|
|
198
|
+
|
|
199
|
+
> <Array(<InboundEmailListResponse>, Integer, Hash)> list_inbound_emails_with_http_info(opts)
|
|
200
|
+
|
|
201
|
+
```ruby
|
|
202
|
+
begin
|
|
203
|
+
# List received emails
|
|
204
|
+
data, status_code, headers = api_instance.list_inbound_emails_with_http_info(opts)
|
|
205
|
+
p status_code # => 2xx
|
|
206
|
+
p headers # => { ... }
|
|
207
|
+
p data # => <InboundEmailListResponse>
|
|
208
|
+
rescue Zyphr::ApiError => e
|
|
209
|
+
puts "Error when calling InboundEmailApi->list_inbound_emails_with_http_info: #{e}"
|
|
210
|
+
end
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Parameters
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description | Notes |
|
|
216
|
+
| ---- | ---- | ----------- | ----- |
|
|
217
|
+
| **status** | **String** | | [optional] |
|
|
218
|
+
| **to** | **String** | Filter by receiving address | [optional] |
|
|
219
|
+
| **include_withheld** | **Boolean** | Include quarantined/dropped mail | [optional] |
|
|
220
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
221
|
+
| **offset** | **Integer** | | [optional][default to 0] |
|
|
222
|
+
|
|
223
|
+
### Return type
|
|
224
|
+
|
|
225
|
+
[**InboundEmailListResponse**](InboundEmailListResponse.md)
|
|
226
|
+
|
|
227
|
+
### Authorization
|
|
228
|
+
|
|
229
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
230
|
+
|
|
231
|
+
### HTTP request headers
|
|
232
|
+
|
|
233
|
+
- **Content-Type**: Not defined
|
|
234
|
+
- **Accept**: application/json
|
|
235
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::InboundEmailAttachment
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Positional attachment id, used in the attachment download endpoint | [optional] |
|
|
8
|
+
| **filename** | **String** | | [optional] |
|
|
9
|
+
| **content_type** | **String** | | [optional] |
|
|
10
|
+
| **size** | **Integer** | Size in bytes | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::InboundEmailAttachment.new(
|
|
18
|
+
id: 0,
|
|
19
|
+
filename: invoice.pdf,
|
|
20
|
+
content_type: application/pdf,
|
|
21
|
+
size: 84210
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::InboundEmailFrom
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | [optional] |
|
|
8
|
+
| **name** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::InboundEmailFrom.new(
|
|
16
|
+
email: customer@example.com,
|
|
17
|
+
name: Customer Name
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::InboundEmailListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<InboundEmail>**](InboundEmail.md) | | [optional] |
|
|
8
|
+
| **meta** | [**InboundEmailListResponseMeta**](InboundEmailListResponseMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::InboundEmailListResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::InboundEmailListResponseMeta
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **request_id** | **String** | | [optional] |
|
|
8
|
+
| **total** | **Integer** | | [optional] |
|
|
9
|
+
| **limit** | **Integer** | | [optional] |
|
|
10
|
+
| **offset** | **Integer** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::InboundEmailListResponseMeta.new(
|
|
18
|
+
request_id: null,
|
|
19
|
+
total: null,
|
|
20
|
+
limit: null,
|
|
21
|
+
offset: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::InboundEmailResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**InboundEmail**](InboundEmail.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::InboundEmailResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/LoginRequest.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **email** | **String** | | |
|
|
8
8
|
| **password** | **String** | | |
|
|
9
9
|
| **custom_claims** | **Hash<String, Object>** | Custom claims to embed in JWT (max 4KB) | [optional] |
|
|
10
|
+
| **organization_id** | **String** | Optional active organization for the resulting token (sc-5591). If specified the user must be a member; the token's org_id is set to it. If omitted and the user has 0 or 1 non-Default memberships, org_id is auto-populated. If 2+ memberships, omit and call switchOrganization to pick. Requires Pro/Enterprise. | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'zyphr'
|
|
|
16
17
|
instance = Zyphr::LoginRequest.new(
|
|
17
18
|
email: null,
|
|
18
19
|
password: null,
|
|
19
|
-
custom_claims: null
|
|
20
|
+
custom_claims: null,
|
|
21
|
+
organization_id: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|