zyphr 0.1.75 → 0.1.77
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 +48 -1
- data/docs/CreateInboxLabelRequest.md +20 -0
- data/docs/Draft.md +36 -0
- data/docs/DraftAddress.md +20 -0
- data/docs/DraftListResponse.md +20 -0
- data/docs/DraftRequest.md +30 -0
- data/docs/DraftResponse.md +20 -0
- data/docs/ForwardEmailRequest.md +34 -0
- data/docs/InboundEmailApi.md +1853 -157
- data/docs/InboxLabel.md +26 -0
- data/docs/InboxLabelListResponse.md +20 -0
- data/docs/InboxLabelResponse.md +20 -0
- data/docs/{ReplyToInboundEmailRequest.md → ReplyEmailRequest.md} +3 -3
- data/docs/Thread.md +40 -0
- data/docs/ThreadEmail.md +38 -0
- data/docs/ThreadEmailAttachmentsInner.md +24 -0
- data/docs/ThreadEmailFrom.md +20 -0
- data/docs/ThreadEmailListResponse.md +20 -0
- data/docs/ThreadEmailResponse.md +20 -0
- data/docs/ThreadFolder.md +15 -0
- data/docs/ThreadLabelsInner.md +22 -0
- data/docs/ThreadLabelsRequest.md +18 -0
- data/docs/ThreadListResponse.md +20 -0
- data/docs/ThreadListResponseMeta.md +20 -0
- data/docs/ThreadResponse.md +20 -0
- data/docs/UpdateInboxLabelRequest.md +20 -0
- data/docs/UpdateThreadRequest.md +22 -0
- data/lib/zyphr/api/inbound_email_api.rb +1768 -168
- data/lib/zyphr/models/create_inbox_label_request.rb +272 -0
- data/lib/zyphr/models/draft.rb +375 -0
- data/lib/zyphr/models/draft_address.rb +249 -0
- data/lib/zyphr/models/draft_list_response.rb +231 -0
- data/lib/zyphr/models/draft_request.rb +299 -0
- data/lib/zyphr/models/draft_response.rb +229 -0
- data/lib/zyphr/models/forward_email_request.rb +393 -0
- data/lib/zyphr/models/inbox_label.rb +258 -0
- data/lib/zyphr/models/inbox_label_list_response.rb +231 -0
- data/lib/zyphr/models/inbox_label_response.rb +229 -0
- data/lib/zyphr/models/{reply_to_inbound_email_request.rb → reply_email_request.rb} +4 -3
- data/lib/zyphr/models/thread.rb +352 -0
- data/lib/zyphr/models/thread_email.rb +353 -0
- data/lib/zyphr/models/thread_email_attachments_inner.rb +248 -0
- data/lib/zyphr/models/thread_email_from.rb +230 -0
- data/lib/zyphr/models/thread_email_list_response.rb +231 -0
- data/lib/zyphr/models/thread_email_response.rb +229 -0
- data/lib/zyphr/models/thread_folder.rb +43 -0
- data/lib/zyphr/models/thread_labels_inner.rb +239 -0
- data/lib/zyphr/models/thread_labels_request.rb +248 -0
- data/lib/zyphr/models/thread_list_response.rb +231 -0
- data/lib/zyphr/models/thread_list_response_meta.rb +237 -0
- data/lib/zyphr/models/thread_response.rb +229 -0
- data/lib/zyphr/models/update_inbox_label_request.rb +264 -0
- data/lib/zyphr/models/update_thread_request.rb +262 -0
- data/lib/zyphr/models/webhook_event_type.rb +12 -1
- data/lib/zyphr.rb +25 -1
- data/spec/api/inbound_email_api_spec.rb +292 -1
- data/spec/models/create_inbox_label_request_spec.rb +42 -0
- data/spec/models/draft_address_spec.rb +42 -0
- data/spec/models/draft_list_response_spec.rb +42 -0
- data/spec/models/draft_request_spec.rb +72 -0
- data/spec/models/draft_response_spec.rb +42 -0
- data/spec/models/draft_spec.rb +90 -0
- data/spec/models/forward_email_request_spec.rb +88 -0
- data/spec/models/inbox_label_list_response_spec.rb +42 -0
- data/spec/models/inbox_label_response_spec.rb +42 -0
- data/spec/models/inbox_label_spec.rb +60 -0
- data/spec/models/{reply_to_inbound_email_request_spec.rb → reply_email_request_spec.rb} +6 -6
- data/spec/models/thread_email_attachments_inner_spec.rb +54 -0
- data/spec/models/thread_email_from_spec.rb +42 -0
- data/spec/models/thread_email_list_response_spec.rb +42 -0
- data/spec/models/thread_email_response_spec.rb +42 -0
- data/spec/models/thread_email_spec.rb +100 -0
- data/spec/models/thread_folder_spec.rb +30 -0
- data/spec/models/thread_labels_inner_spec.rb +48 -0
- data/spec/models/thread_labels_request_spec.rb +36 -0
- data/spec/models/thread_list_response_meta_spec.rb +42 -0
- data/spec/models/thread_list_response_spec.rb +42 -0
- data/spec/models/thread_response_spec.rb +42 -0
- data/spec/models/thread_spec.rb +102 -0
- data/spec/models/update_inbox_label_request_spec.rb +42 -0
- data/spec/models/update_thread_request_spec.rb +48 -0
- data/zyphr.gemspec +1 -1
- metadata +102 -6
|
@@ -32,6 +32,18 @@ describe 'InboundEmailApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for add_inbox_thread_labels
|
|
36
|
+
# Add labels to a thread
|
|
37
|
+
# @param thread_id
|
|
38
|
+
# @param thread_labels_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [ThreadResponse]
|
|
41
|
+
describe 'add_inbox_thread_labels test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
35
47
|
# unit tests for create_inbox
|
|
36
48
|
# Create an inbox
|
|
37
49
|
# Create a named receiving address, `<local_part>@inbound.<domain>`, on a domain with inbound email enabled. Mail is routed to the named inbox matching its address, otherwise to the domain's catch-all inbox (`*@inbound.<domain>`, created when inbound is enabled); with the catch-all disabled it is dropped. Test-mode keys cannot create, update or delete inboxes, because inboxes change live mail routing. Requires a plan with inbound email (Starter or higher).
|
|
@@ -44,6 +56,29 @@ describe 'InboundEmailApi' do
|
|
|
44
56
|
end
|
|
45
57
|
end
|
|
46
58
|
|
|
59
|
+
# unit tests for create_inbox_draft
|
|
60
|
+
# Create a draft
|
|
61
|
+
# Every field is optional; the draft is checked when it is sent. Give a `thread_id` to draft a reply: Zyphr sets its recipient and subject from the thread when it is sent, so a reply draft can't have `to` or `subject`. Without a thread, the draft is a new email.
|
|
62
|
+
# @param draft_request
|
|
63
|
+
# @param [Hash] opts the optional parameters
|
|
64
|
+
# @return [DraftResponse]
|
|
65
|
+
describe 'create_inbox_draft test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for create_inbox_label
|
|
72
|
+
# Create a label
|
|
73
|
+
# @param create_inbox_label_request
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @return [InboxLabelResponse]
|
|
76
|
+
describe 'create_inbox_label test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
47
82
|
# unit tests for delete_inbox
|
|
48
83
|
# Delete an inbox
|
|
49
84
|
# Delete a named inbox. Mail it already received is kept (its `inbox_id` becomes null), and new mail to its address goes to the catch-all if enabled. The catch-all cannot be deleted (422 `catch_all_not_deletable`); disable it with `PATCH { \"enabled\": false }`.
|
|
@@ -56,6 +91,70 @@ describe 'InboundEmailApi' do
|
|
|
56
91
|
end
|
|
57
92
|
end
|
|
58
93
|
|
|
94
|
+
# unit tests for delete_inbox_draft
|
|
95
|
+
# Delete a draft
|
|
96
|
+
# @param draft_id
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [nil]
|
|
99
|
+
describe 'delete_inbox_draft test' do
|
|
100
|
+
it 'should work' do
|
|
101
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# unit tests for delete_inbox_label
|
|
106
|
+
# Delete a label
|
|
107
|
+
# Also removes it from every thread.
|
|
108
|
+
# @param label_id
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [nil]
|
|
111
|
+
describe 'delete_inbox_label test' do
|
|
112
|
+
it 'should work' do
|
|
113
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# unit tests for delete_inbox_thread
|
|
118
|
+
# Delete a thread
|
|
119
|
+
# Deletes the conversation. Its emails are kept and still appear in the received list, unthreaded.
|
|
120
|
+
# @param thread_id
|
|
121
|
+
# @param [Hash] opts the optional parameters
|
|
122
|
+
# @return [nil]
|
|
123
|
+
describe 'delete_inbox_thread test' do
|
|
124
|
+
it 'should work' do
|
|
125
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# unit tests for forward_inbound_email
|
|
130
|
+
# Forward a received email
|
|
131
|
+
# Send a received email on to someone else. Zyphr sets the `Fwd:` subject and quotes the original (sender, date, subject, recipients and body) under your optional `text`/`html` note. The original attachments go with it unless `include_attachments` is false; they are copied inside Zyphr, never re-uploaded. The whole email, attachments included, must fit the 10 MB email limit (about 7 MB of attachments). `reply_to` defaults to the inbox address, so an answer comes back to Zyphr. The forward joins the email's thread. It is ordinary mail: suppression and unsubscribes apply. Forwards are sent immediately (no `send_at`/`delay`) and cannot use a template. Quarantined or dropped mail cannot be forwarded.
|
|
132
|
+
# @param id
|
|
133
|
+
# @param forward_email_request
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @option opts [String] :idempotency_key
|
|
136
|
+
# @return [SendEmailResponse]
|
|
137
|
+
describe 'forward_inbound_email test' do
|
|
138
|
+
it 'should work' do
|
|
139
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# unit tests for forward_inbox_thread_email
|
|
144
|
+
# Forward an email in a thread
|
|
145
|
+
# Forwards one received email of the thread, exactly as `POST /inbound-emails/{id}/forward` does: `Fwd:` subject, the original quoted under your note, its attachments copied unless `include_attachments` is false, and `reply_to` defaulting to the inbox address. The forward joins this thread. Sent emails cannot be forwarded here. Test-mode keys cannot forward.
|
|
146
|
+
# @param thread_id
|
|
147
|
+
# @param email_id
|
|
148
|
+
# @param forward_email_request
|
|
149
|
+
# @param [Hash] opts the optional parameters
|
|
150
|
+
# @option opts [String] :idempotency_key
|
|
151
|
+
# @return [SendEmailResponse]
|
|
152
|
+
describe 'forward_inbox_thread_email test' do
|
|
153
|
+
it 'should work' do
|
|
154
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
59
158
|
# unit tests for get_inbound_attachment_url
|
|
60
159
|
# Get an attachment download URL
|
|
61
160
|
# 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.
|
|
@@ -92,6 +191,51 @@ describe 'InboundEmailApi' do
|
|
|
92
191
|
end
|
|
93
192
|
end
|
|
94
193
|
|
|
194
|
+
# unit tests for get_inbox_draft
|
|
195
|
+
# Get a draft
|
|
196
|
+
# @param draft_id
|
|
197
|
+
# @param [Hash] opts the optional parameters
|
|
198
|
+
# @return [DraftResponse]
|
|
199
|
+
describe 'get_inbox_draft test' do
|
|
200
|
+
it 'should work' do
|
|
201
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# unit tests for get_inbox_label
|
|
206
|
+
# Get a label
|
|
207
|
+
# @param label_id
|
|
208
|
+
# @param [Hash] opts the optional parameters
|
|
209
|
+
# @return [InboxLabelResponse]
|
|
210
|
+
describe 'get_inbox_label test' do
|
|
211
|
+
it 'should work' do
|
|
212
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# unit tests for get_inbox_thread
|
|
217
|
+
# Get a thread
|
|
218
|
+
# @param thread_id
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @return [ThreadResponse]
|
|
221
|
+
describe 'get_inbox_thread test' do
|
|
222
|
+
it 'should work' do
|
|
223
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# unit tests for get_inbox_thread_email
|
|
228
|
+
# Get an email in a thread
|
|
229
|
+
# @param thread_id
|
|
230
|
+
# @param email_id
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @return [ThreadEmailResponse]
|
|
233
|
+
describe 'get_inbox_thread_email test' do
|
|
234
|
+
it 'should work' do
|
|
235
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
95
239
|
# unit tests for list_inbound_emails
|
|
96
240
|
# List received emails
|
|
97
241
|
# 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.
|
|
@@ -109,6 +253,63 @@ describe 'InboundEmailApi' do
|
|
|
109
253
|
end
|
|
110
254
|
end
|
|
111
255
|
|
|
256
|
+
# unit tests for list_inbox_drafts
|
|
257
|
+
# List drafts
|
|
258
|
+
# Unsent emails in the project, newest first. Filter to one thread's drafts with `thread_id`.
|
|
259
|
+
# @param [Hash] opts the optional parameters
|
|
260
|
+
# @option opts [String] :thread_id
|
|
261
|
+
# @option opts [Integer] :limit
|
|
262
|
+
# @option opts [String] :cursor `meta.next_cursor` from the previous page
|
|
263
|
+
# @return [DraftListResponse]
|
|
264
|
+
describe 'list_inbox_drafts test' do
|
|
265
|
+
it 'should work' do
|
|
266
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# unit tests for list_inbox_labels
|
|
271
|
+
# List labels
|
|
272
|
+
# @param [Hash] opts the optional parameters
|
|
273
|
+
# @return [InboxLabelListResponse]
|
|
274
|
+
describe 'list_inbox_labels test' do
|
|
275
|
+
it 'should work' do
|
|
276
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# unit tests for list_inbox_thread_emails
|
|
281
|
+
# List a thread's emails
|
|
282
|
+
# The conversation, oldest first, received (`inbound`) and sent (`outbound`) together.
|
|
283
|
+
# @param thread_id
|
|
284
|
+
# @param [Hash] opts the optional parameters
|
|
285
|
+
# @option opts [Integer] :limit
|
|
286
|
+
# @option opts [String] :cursor
|
|
287
|
+
# @return [ThreadEmailListResponse]
|
|
288
|
+
describe 'list_inbox_thread_emails test' do
|
|
289
|
+
it 'should work' do
|
|
290
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# unit tests for list_inbox_threads
|
|
295
|
+
# List threads
|
|
296
|
+
# Conversations in the project, most recent activity first. A thread groups received mail and your replies by their `In-Reply-To` / `References` headers. Filters combine with AND; `q` matches the subject, participant addresses and message text. Paginate with the `next_cursor` from the previous page.
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @option opts [String] :inbox_id
|
|
299
|
+
# @option opts [ThreadFolder] :folder
|
|
300
|
+
# @option opts [Boolean] :read
|
|
301
|
+
# @option opts [String] :assignee_user_id
|
|
302
|
+
# @option opts [String] :label_id
|
|
303
|
+
# @option opts [String] :q
|
|
304
|
+
# @option opts [Integer] :limit
|
|
305
|
+
# @option opts [String] :cursor
|
|
306
|
+
# @return [ThreadListResponse]
|
|
307
|
+
describe 'list_inbox_threads test' do
|
|
308
|
+
it 'should work' do
|
|
309
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
|
|
112
313
|
# unit tests for list_inboxes
|
|
113
314
|
# List inboxes
|
|
114
315
|
# @param [Hash] opts the optional parameters
|
|
@@ -120,11 +321,23 @@ describe 'InboundEmailApi' do
|
|
|
120
321
|
end
|
|
121
322
|
end
|
|
122
323
|
|
|
324
|
+
# unit tests for remove_inbox_thread_label
|
|
325
|
+
# Remove a label from a thread
|
|
326
|
+
# @param thread_id
|
|
327
|
+
# @param label_id
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @return [ThreadResponse]
|
|
330
|
+
describe 'remove_inbox_thread_label test' do
|
|
331
|
+
it 'should work' do
|
|
332
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
123
336
|
# unit tests for reply_to_inbound_email
|
|
124
337
|
# Reply to a received email
|
|
125
338
|
# Send a reply to a received email that threads under the original in the recipient's mail client. Zyphr sets `to` (the original sender), the `Re:` subject, and the `In-Reply-To` / `References` headers from the received email; any of those fields in the body are ignored. Everything else behaves exactly like `POST /emails` (`html`/`text`, `send_at`/`delay`, quotas, suppression). A reply is relationship mail (no `List-Unsubscribe` headers; a recipient's marketing unsubscribe and the throttle's random drop do not block it; bounces and complaints still do) when the received email passed DMARC, the reply is not `classification: marketing`, it is sent within 30 days of receipt, and it is one of the first 3 such replies to that email. Otherwise it is sent as ordinary mail. Templates are not supported, because a template's own subject would break threading. Quarantined or dropped mail cannot be replied to.
|
|
126
339
|
# @param id
|
|
127
|
-
# @param
|
|
340
|
+
# @param reply_email_request
|
|
128
341
|
# @param [Hash] opts the optional parameters
|
|
129
342
|
# @option opts [String] :idempotency_key
|
|
130
343
|
# @return [SendEmailResponse]
|
|
@@ -134,6 +347,46 @@ describe 'InboundEmailApi' do
|
|
|
134
347
|
end
|
|
135
348
|
end
|
|
136
349
|
|
|
350
|
+
# unit tests for reply_to_inbox_thread
|
|
351
|
+
# Reply to a thread
|
|
352
|
+
# Replies to the newest received email in the thread, exactly as `POST /inbound-emails/{id}/reply` does: the recipient, `Re:` subject and threading headers come from that email, and `reply_to` defaults to the inbox address so the customer's answer comes back to this thread. Test-mode keys cannot reply here.
|
|
353
|
+
# @param thread_id
|
|
354
|
+
# @param reply_email_request
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @option opts [String] :idempotency_key
|
|
357
|
+
# @return [SendEmailResponse]
|
|
358
|
+
describe 'reply_to_inbox_thread test' do
|
|
359
|
+
it 'should work' do
|
|
360
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# unit tests for send_inbox_draft
|
|
365
|
+
# Send a draft
|
|
366
|
+
# A draft in a thread is sent exactly like `POST /inboxes/threads/{id}/reply`: to the thread's newest received email, with the `Re:` subject, threading headers, and `reply_to` defaulting to the inbox address. A draft with no thread is sent like `POST /emails`. The draft is deleted once the send is accepted; if the send is refused (a 4xx) the draft is kept and can be fixed and sent again. Takes no body.
|
|
367
|
+
# @param draft_id
|
|
368
|
+
# @param [Hash] opts the optional parameters
|
|
369
|
+
# @option opts [String] :idempotency_key
|
|
370
|
+
# @return [SendEmailResponse]
|
|
371
|
+
describe 'send_inbox_draft test' do
|
|
372
|
+
it 'should work' do
|
|
373
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# unit tests for set_inbox_thread_labels
|
|
378
|
+
# Set a thread's labels
|
|
379
|
+
# Replaces the thread's labels with exactly `label_ids` (an empty list clears them).
|
|
380
|
+
# @param thread_id
|
|
381
|
+
# @param thread_labels_request
|
|
382
|
+
# @param [Hash] opts the optional parameters
|
|
383
|
+
# @return [ThreadResponse]
|
|
384
|
+
describe 'set_inbox_thread_labels test' do
|
|
385
|
+
it 'should work' do
|
|
386
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
387
|
+
end
|
|
388
|
+
end
|
|
389
|
+
|
|
137
390
|
# unit tests for update_inbox
|
|
138
391
|
# Update an inbox
|
|
139
392
|
# Rename the inbox or change the display name recipients see. The address cannot change. On the catch-all, `enabled: false` turns on strict addresses: mail to any address without a named inbox is dropped until it is re-enabled. Named inboxes cannot be disabled (422 `not_catch_all`).
|
|
@@ -147,4 +400,42 @@ describe 'InboundEmailApi' do
|
|
|
147
400
|
end
|
|
148
401
|
end
|
|
149
402
|
|
|
403
|
+
# unit tests for update_inbox_draft
|
|
404
|
+
# Update a draft
|
|
405
|
+
# Change any field; `null` clears it. A draft that is being sent can't be changed.
|
|
406
|
+
# @param draft_id
|
|
407
|
+
# @param draft_request
|
|
408
|
+
# @param [Hash] opts the optional parameters
|
|
409
|
+
# @return [DraftResponse]
|
|
410
|
+
describe 'update_inbox_draft test' do
|
|
411
|
+
it 'should work' do
|
|
412
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# unit tests for update_inbox_label
|
|
417
|
+
# Update a label
|
|
418
|
+
# @param label_id
|
|
419
|
+
# @param update_inbox_label_request
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @return [InboxLabelResponse]
|
|
422
|
+
describe 'update_inbox_label test' do
|
|
423
|
+
it 'should work' do
|
|
424
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# unit tests for update_inbox_thread
|
|
429
|
+
# Update a thread
|
|
430
|
+
# Move it to a folder, mark it read or unread, or assign it to a member of your account (`null` unassigns).
|
|
431
|
+
# @param thread_id
|
|
432
|
+
# @param update_thread_request
|
|
433
|
+
# @param [Hash] opts the optional parameters
|
|
434
|
+
# @return [ThreadResponse]
|
|
435
|
+
describe 'update_inbox_thread test' do
|
|
436
|
+
it 'should work' do
|
|
437
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
150
441
|
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::CreateInboxLabelRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::CreateInboxLabelRequest do
|
|
21
|
+
let(:instance) { Zyphr::CreateInboxLabelRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxLabelRequest' do
|
|
24
|
+
it 'should create an instance of CreateInboxLabelRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::CreateInboxLabelRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "name"' 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 "color"' 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
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::DraftAddress
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::DraftAddress do
|
|
21
|
+
let(:instance) { Zyphr::DraftAddress.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DraftAddress' do
|
|
24
|
+
it 'should create an instance of DraftAddress' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::DraftAddress)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "email"' 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 "name"' 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
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::DraftListResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::DraftListResponse do
|
|
21
|
+
let(:instance) { Zyphr::DraftListResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DraftListResponse' do
|
|
24
|
+
it 'should create an instance of DraftListResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::DraftListResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' 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 "meta"' 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
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
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::DraftRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::DraftRequest do
|
|
21
|
+
let(:instance) { Zyphr::DraftRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DraftRequest' do
|
|
24
|
+
it 'should create an instance of DraftRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::DraftRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "thread_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 "from"' 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 "to"' 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
|
+
describe 'test attribute "reply_to"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "subject"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "text"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "html"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::DraftResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zyphr::DraftResponse do
|
|
21
|
+
let(:instance) { Zyphr::DraftResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DraftResponse' do
|
|
24
|
+
it 'should create an instance of DraftResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zyphr::DraftResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "data"' 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 "meta"' 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
|
+
end
|