zyphr 0.1.79 → 0.1.81

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/AuthEmailTemplate.md +0 -2
  4. data/docs/AuthEmailTemplatePreviewDraft.md +0 -2
  5. data/docs/AuthEmailTemplateVersion.md +0 -2
  6. data/docs/AuthEmailTemplatesApi.md +2 -2
  7. data/docs/AuthEmailVerificationApi.md +12 -16
  8. data/docs/AuthMagicLinksApi.md +1 -1
  9. data/docs/AuthPasswordResetApi.md +1 -1
  10. data/docs/CreateTemplateRequest.md +12 -4
  11. data/docs/ForgotPasswordRequest.md +1 -1
  12. data/docs/MagicLinkSendRequest.md +1 -1
  13. data/docs/ResendEmailVerificationRequest.md +1 -1
  14. data/docs/SendEmailVerificationRequest.md +1 -1
  15. data/docs/Template.md +8 -0
  16. data/docs/TemplateClassification.md +15 -0
  17. data/docs/TemplateEditorType.md +15 -0
  18. data/docs/TemplatesApi.md +1 -1
  19. data/docs/UpdateTemplateRequest.md +9 -3
  20. data/docs/UpsertAuthEmailTemplateRequest.md +0 -2
  21. data/lib/zyphr/api/auth_email_templates_api.rb +4 -4
  22. data/lib/zyphr/api/auth_email_verification_api.rb +20 -12
  23. data/lib/zyphr/api/templates_api.rb +2 -2
  24. data/lib/zyphr/models/auth_email_template.rb +3 -13
  25. data/lib/zyphr/models/auth_email_template_preview_draft.rb +1 -11
  26. data/lib/zyphr/models/auth_email_template_version.rb +3 -13
  27. data/lib/zyphr/models/create_template_request.rb +87 -7
  28. data/lib/zyphr/models/forgot_password_request.rb +18 -0
  29. data/lib/zyphr/models/magic_link_send_request.rb +18 -0
  30. data/lib/zyphr/models/resend_email_verification_request.rb +18 -1
  31. data/lib/zyphr/models/send_email_verification_request.rb +18 -1
  32. data/lib/zyphr/models/template.rb +78 -1
  33. data/lib/zyphr/models/template_classification.rb +40 -0
  34. data/lib/zyphr/models/template_editor_type.rb +40 -0
  35. data/lib/zyphr/models/update_template_request.rb +62 -6
  36. data/lib/zyphr/models/upsert_auth_email_template_request.rb +4 -14
  37. data/lib/zyphr.rb +2 -0
  38. data/spec/api/auth_email_templates_api_spec.rb +2 -2
  39. data/spec/api/auth_email_verification_api_spec.rb +2 -2
  40. data/spec/api/templates_api_spec.rb +1 -1
  41. data/spec/models/auth_email_template_preview_draft_spec.rb +0 -6
  42. data/spec/models/auth_email_template_spec.rb +1 -7
  43. data/spec/models/auth_email_template_version_spec.rb +1 -7
  44. data/spec/models/create_template_request_spec.rb +28 -0
  45. data/spec/models/template_classification_spec.rb +30 -0
  46. data/spec/models/template_editor_type_spec.rb +30 -0
  47. data/spec/models/template_spec.rb +28 -0
  48. data/spec/models/update_template_request_spec.rb +18 -0
  49. data/spec/models/upsert_auth_email_template_request_spec.rb +1 -7
  50. data/zyphr.gemspec +1 -1
  51. metadata +10 -2
@@ -0,0 +1,40 @@
1
+ =begin
2
+ #Zyphr API
3
+
4
+ #Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@zyphr.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zyphr
17
+ class TemplateClassification
18
+ TRANSACTIONAL = "transactional".freeze
19
+ MARKETING = "marketing".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [TRANSACTIONAL, MARKETING].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if TemplateClassification.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #TemplateClassification"
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ =begin
2
+ #Zyphr API
3
+
4
+ #Zyphr is a developer platform for user authentication and transactional messaging. One API covers auth (passkeys, social sign-in, passwordless, MFA, sessions, organizations) plus email, push notifications, SMS, in-app messages, and webhooks. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. > **Test keys are being retired.** `zy_test_*` keys are no longer issued, and existing ones stop working on **21 October 2026**. They never delivered mail — sends were mocked and marked sent without reaching a provider, so they could not verify domain authentication, rendering, or deliverability. To test your integration, use a `zy_live_*` key against a verified domain and send to an address you control. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: support@zyphr.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zyphr
17
+ class TemplateEditorType
18
+ CODE = "code".freeze
19
+ VISUAL = "visual".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [CODE, VISUAL].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if TemplateEditorType.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #TemplateEditorType"
38
+ end
39
+ end
40
+ end
@@ -19,15 +19,44 @@ module Zyphr
19
19
 
20
20
  attr_accessor :description
21
21
 
22
- # Email subject line. Supports Handlebars `{{var}}` interpolation (HTML-escaped on render).
22
+ # Email subject line (push: the notification title). Supports Handlebars `{{var}}` interpolation; values are not HTML-escaped.
23
23
  attr_accessor :subject
24
24
 
25
25
  # HTML body. Supports Handlebars `{{var}}` interpolation; values are always HTML-escaped on render. Triple-brace `{{{var}}}` is not supported — input is rewritten to `{{var}}` on save and the response includes a top-level `warnings` array describing the rewrite. See `CreateTemplateRequest.html` for full rationale.
26
26
  attr_accessor :html
27
27
 
28
- # Plain text body. Supports Handlebars `{{var}}` interpolation; same triple-brace rewrite policy as `html`.
28
+ # Plain text body. Supports Handlebars `{{var}}` interpolation; values are not HTML-escaped. Same triple-brace rewrite policy as `html`.
29
29
  attr_accessor :text
30
30
 
31
+ # The visual editor's document, stored so the template can be reopened in the editor. At most 1 MB. Sending always uses `html`. A document with `\"format\": \"zyphr-email/1\"` (from the current visual editor) is exported to `html` by the API when it is saved, replacing any `html` sent with it, and a document that can't be exported is rejected with 400. Other documents are stored as given and never rendered.
32
+ attr_accessor :design_json
33
+
34
+ attr_accessor :editor_type
35
+
36
+ attr_accessor :classification
37
+
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
31
60
  # Attribute mapping from ruby-style variable name to JSON key.
32
61
  def self.attribute_map
33
62
  {
@@ -35,7 +64,10 @@ module Zyphr
35
64
  :'description' => :'description',
36
65
  :'subject' => :'subject',
37
66
  :'html' => :'html',
38
- :'text' => :'text'
67
+ :'text' => :'text',
68
+ :'design_json' => :'design_json',
69
+ :'editor_type' => :'editor_type',
70
+ :'classification' => :'classification'
39
71
  }
40
72
  end
41
73
 
@@ -56,13 +88,18 @@ module Zyphr
56
88
  :'description' => :'String',
57
89
  :'subject' => :'String',
58
90
  :'html' => :'String',
59
- :'text' => :'String'
91
+ :'text' => :'String',
92
+ :'design_json' => :'Hash<String, Object>',
93
+ :'editor_type' => :'TemplateEditorType',
94
+ :'classification' => :'TemplateClassification'
60
95
  }
61
96
  end
62
97
 
63
98
  # List of attributes with nullable: true
64
99
  def self.openapi_nullable
65
100
  Set.new([
101
+ :'design_json',
102
+ :'classification'
66
103
  ])
67
104
  end
68
105
 
@@ -101,6 +138,22 @@ module Zyphr
101
138
  if attributes.key?(:'text')
102
139
  self.text = attributes[:'text']
103
140
  end
141
+
142
+ if attributes.key?(:'design_json')
143
+ if (value = attributes[:'design_json']).is_a?(Hash)
144
+ self.design_json = value
145
+ end
146
+ end
147
+
148
+ if attributes.key?(:'editor_type')
149
+ self.editor_type = attributes[:'editor_type']
150
+ else
151
+ self.editor_type = 'code'
152
+ end
153
+
154
+ if attributes.key?(:'classification')
155
+ self.classification = attributes[:'classification']
156
+ end
104
157
  end
105
158
 
106
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -148,7 +201,10 @@ module Zyphr
148
201
  description == o.description &&
149
202
  subject == o.subject &&
150
203
  html == o.html &&
151
- text == o.text
204
+ text == o.text &&
205
+ design_json == o.design_json &&
206
+ editor_type == o.editor_type &&
207
+ classification == o.classification
152
208
  end
153
209
 
154
210
  # @see the `==` method
@@ -160,7 +216,7 @@ module Zyphr
160
216
  # Calculates hash code according to all attributes.
161
217
  # @return [Integer] Hash code
162
218
  def hash
163
- [name, description, subject, html, text].hash
219
+ [name, description, subject, html, text, design_json, editor_type, classification].hash
164
220
  end
165
221
 
166
222
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zyphr
17
- # Subject is required. Provide one of `html`, `mjml_source`, or `design_json`. MJML sources are compiled to HTML on save.
17
+ # Subject is required. Provide `html`, or a visual editor `design_json` (`format: zyphr-email/1`), which is exported to `html` on save. `text` is optional: when empty, the plain-text part is generated from the rendered HTML at send. A visual design always generates it.
18
18
  class UpsertAuthEmailTemplateRequest
19
19
  attr_accessor :subject
20
20
 
@@ -22,8 +22,6 @@ module Zyphr
22
22
 
23
23
  attr_accessor :text
24
24
 
25
- attr_accessor :mjml_source
26
-
27
25
  attr_accessor :design_json
28
26
 
29
27
  attr_accessor :editor_type
@@ -62,7 +60,6 @@ module Zyphr
62
60
  :'subject' => :'subject',
63
61
  :'html' => :'html',
64
62
  :'text' => :'text',
65
- :'mjml_source' => :'mjml_source',
66
63
  :'design_json' => :'design_json',
67
64
  :'editor_type' => :'editor_type',
68
65
  :'from_name' => :'from_name',
@@ -87,7 +84,6 @@ module Zyphr
87
84
  :'subject' => :'String',
88
85
  :'html' => :'String',
89
86
  :'text' => :'String',
90
- :'mjml_source' => :'String',
91
87
  :'design_json' => :'Hash<String, Object>',
92
88
  :'editor_type' => :'String',
93
89
  :'from_name' => :'String',
@@ -100,7 +96,6 @@ module Zyphr
100
96
  def self.openapi_nullable
101
97
  Set.new([
102
98
  :'text',
103
- :'mjml_source',
104
99
  :'design_json',
105
100
  :'editor_type',
106
101
  :'from_name',
@@ -136,10 +131,6 @@ module Zyphr
136
131
  self.text = attributes[:'text']
137
132
  end
138
133
 
139
- if attributes.key?(:'mjml_source')
140
- self.mjml_source = attributes[:'mjml_source']
141
- end
142
-
143
134
  if attributes.key?(:'design_json')
144
135
  if (value = attributes[:'design_json']).is_a?(Hash)
145
136
  self.design_json = value
@@ -175,7 +166,7 @@ module Zyphr
175
166
  # @return true if the model is valid
176
167
  def valid?
177
168
  warn '[DEPRECATED] the `valid?` method is obsolete'
178
- editor_type_validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
169
+ editor_type_validator = EnumAttributeValidator.new('String', ["code", "visual"])
179
170
  return false unless editor_type_validator.valid?(@editor_type)
180
171
  true
181
172
  end
@@ -183,7 +174,7 @@ module Zyphr
183
174
  # Custom attribute writer method checking allowed values (enum).
184
175
  # @param [Object] editor_type Object to be assigned
185
176
  def editor_type=(editor_type)
186
- validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
177
+ validator = EnumAttributeValidator.new('String', ["code", "visual"])
187
178
  unless validator.valid?(editor_type)
188
179
  fail ArgumentError, "invalid value for \"editor_type\", must be one of #{validator.allowable_values}."
189
180
  end
@@ -198,7 +189,6 @@ module Zyphr
198
189
  subject == o.subject &&
199
190
  html == o.html &&
200
191
  text == o.text &&
201
- mjml_source == o.mjml_source &&
202
192
  design_json == o.design_json &&
203
193
  editor_type == o.editor_type &&
204
194
  from_name == o.from_name &&
@@ -215,7 +205,7 @@ module Zyphr
215
205
  # Calculates hash code according to all attributes.
216
206
  # @return [Integer] Hash code
217
207
  def hash
218
- [subject, html, text, mjml_source, design_json, editor_type, from_name, reply_to, is_enabled].hash
208
+ [subject, html, text, design_json, editor_type, from_name, reply_to, is_enabled].hash
219
209
  end
220
210
 
221
211
  # Builds the object from hash
data/lib/zyphr.rb CHANGED
@@ -405,6 +405,8 @@ require 'zyphr/models/switch_organization_response_data'
405
405
  require 'zyphr/models/switch_organization_response_data_tokens'
406
406
  require 'zyphr/models/switch_organization_response_data_user'
407
407
  require 'zyphr/models/template'
408
+ require 'zyphr/models/template_classification'
409
+ require 'zyphr/models/template_editor_type'
408
410
  require 'zyphr/models/template_list_response'
409
411
  require 'zyphr/models/template_render_response'
410
412
  require 'zyphr/models/template_rendered_content'
@@ -34,7 +34,7 @@ describe 'AuthEmailTemplatesApi' do
34
34
 
35
35
  # unit tests for bulk_upsert_auth_email_templates
36
36
  # Bulk-upsert auth email templates
37
- # Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or MJML compile, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
37
+ # Atomic upsert of any subset of magic_link, password_reset, email_verification, email_otp, invitation. Validates all inputs before any write; if any one fails validation or design export, none are saved. Designed for one-shot migration imports from Auth0/Firebase/Clerk/Cognito.
38
38
  # @param bulk_upsert_auth_email_templates_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [BulkUpsertAuthEmailTemplatesResponse]
@@ -143,7 +143,7 @@ describe 'AuthEmailTemplatesApi' do
143
143
 
144
144
  # unit tests for upsert_auth_email_template
145
145
  # Create or update an auth email template
146
- # Idempotent upsert keyed by application + type. MJML sources are compiled to HTML on save; compile errors return 400 with &#x60;details&#x60;.
146
+ # Idempotent upsert keyed by application + type. A visual editor &#x60;design_json&#x60; (&#x60;format: zyphr-email/1&#x60;) is exported to &#x60;html&#x60; on save; a design that can&#39;t be exported returns 400.
147
147
  # @param type
148
148
  # @param upsert_auth_email_template_request
149
149
  # @param [Hash] opts the optional parameters
@@ -47,8 +47,8 @@ describe 'AuthEmailVerificationApi' do
47
47
  # unit tests for resend_email_verification
48
48
  # Resend email verification
49
49
  # Resend the verification email to the authenticated user. Rate limited to once per 60 seconds. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. Failures behave as on &#x60;POST /auth/verify-email/send&#x60;, including the 200 accepted-and-suppressed response for a recipient outside the application allowlist.
50
+ # @param resend_email_verification_request
50
51
  # @param [Hash] opts the optional parameters
51
- # @option opts [ResendEmailVerificationRequest] :resend_email_verification_request
52
52
  # @return [SuccessResult]
53
53
  describe 'resend_email_verification test' do
54
54
  it 'should work' do
@@ -59,8 +59,8 @@ describe 'AuthEmailVerificationApi' do
59
59
  # unit tests for send_email_verification
60
60
  # Send email verification
61
61
  # Send an email verification link to the authenticated user. Requires all three credentials simultaneously: the application key (&#x60;X-Application-Key&#x60;), the application secret (&#x60;X-Application-Secret&#x60;), and the end user&#39;s &#x60;Authorization: Bearer&#x60; token. If the recipient is blocked by the application&#39;s &#x60;auth_email_mode&#x3D;allowlist&#x60; gate, the request is still **accepted with 200** (mirroring &#x60;POST /auth/forgot-password&#x60;): no email is sent, and the suppression is recorded as a &#x60;messages&#x60; row (&#x60;status&#x3D;suppressed&#x60;, &#x60;status_reason&#x3D;recipient_not_allowlisted&#x60;) and an &#x60;email.suppressed&#x60; webhook. It is NOT a 500.
62
+ # @param send_email_verification_request
62
63
  # @param [Hash] opts the optional parameters
63
- # @option opts [SendEmailVerificationRequest] :send_email_verification_request
64
64
  # @return [SuccessResult]
65
65
  describe 'send_email_verification test' do
66
66
  it 'should work' do
@@ -34,7 +34,7 @@ describe 'TemplatesApi' do
34
34
 
35
35
  # unit tests for create_template
36
36
  # Create template
37
- # Create a new email template. Name must be unique within the account.
37
+ # Create an email, SMS or push template. The name must be unique per channel within the project.
38
38
  # @param create_template_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [TemplateResponse]
@@ -45,12 +45,6 @@ describe Zyphr::AuthEmailTemplatePreviewDraft do
45
45
  end
46
46
  end
47
47
 
48
- describe 'test attribute "mjml_source"' 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
48
  describe 'test attribute "from_name"' do
55
49
  it 'should work' do
56
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -51,12 +51,6 @@ describe Zyphr::AuthEmailTemplate do
51
51
  end
52
52
  end
53
53
 
54
- describe 'test attribute "mjml_source"' 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
54
  describe 'test attribute "design_json"' do
61
55
  it 'should work' do
62
56
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -66,7 +60,7 @@ describe Zyphr::AuthEmailTemplate do
66
60
  describe 'test attribute "editor_type"' do
67
61
  it 'should work' do
68
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "mjml", "design"])
63
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "visual"])
70
64
  # validator.allowable_values.each do |value|
71
65
  # expect { instance.editor_type = value }.not_to raise_error
72
66
  # end
@@ -51,12 +51,6 @@ describe Zyphr::AuthEmailTemplateVersion do
51
51
  end
52
52
  end
53
53
 
54
- describe 'test attribute "mjml_source"' 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
54
  describe 'test attribute "design_json"' do
61
55
  it 'should work' do
62
56
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -66,7 +60,7 @@ describe Zyphr::AuthEmailTemplateVersion do
66
60
  describe 'test attribute "editor_type"' do
67
61
  it 'should work' do
68
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "mjml", "design"])
63
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "visual"])
70
64
  # validator.allowable_values.each do |value|
71
65
  # expect { instance.editor_type = value }.not_to raise_error
72
66
  # end
@@ -39,6 +39,16 @@ describe Zyphr::CreateTemplateRequest do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "channel"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["email", "sms", "push"])
46
+ # validator.allowable_values.each do |value|
47
+ # expect { instance.channel = value }.not_to raise_error
48
+ # end
49
+ end
50
+ end
51
+
42
52
  describe 'test attribute "subject"' do
43
53
  it 'should work' do
44
54
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -57,4 +67,22 @@ describe Zyphr::CreateTemplateRequest do
57
67
  end
58
68
  end
59
69
 
70
+ describe 'test attribute "design_json"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
+ end
74
+ end
75
+
76
+ describe 'test attribute "editor_type"' 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
+
82
+ describe 'test attribute "classification"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
85
+ end
86
+ end
87
+
60
88
  end
@@ -0,0 +1,30 @@
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::TemplateClassification
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::TemplateClassification do
21
+ let(:instance) { Zyphr::TemplateClassification.new }
22
+
23
+ describe 'test an instance of TemplateClassification' do
24
+ it 'should create an instance of TemplateClassification' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::TemplateClassification)
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,30 @@
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::TemplateEditorType
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zyphr::TemplateEditorType do
21
+ let(:instance) { Zyphr::TemplateEditorType.new }
22
+
23
+ describe 'test an instance of TemplateEditorType' do
24
+ it 'should create an instance of TemplateEditorType' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zyphr::TemplateEditorType)
27
+ end
28
+ end
29
+
30
+ end
@@ -39,6 +39,16 @@ describe Zyphr::Template do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "channel"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["email", "sms", "push"])
46
+ # validator.allowable_values.each do |value|
47
+ # expect { instance.channel = value }.not_to raise_error
48
+ # end
49
+ end
50
+ end
51
+
42
52
  describe 'test attribute "description"' do
43
53
  it 'should work' do
44
54
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -75,6 +85,24 @@ describe Zyphr::Template do
75
85
  end
76
86
  end
77
87
 
88
+ describe 'test attribute "design_json"' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
91
+ end
92
+ end
93
+
94
+ describe 'test attribute "editor_type"' do
95
+ it 'should work' do
96
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
97
+ end
98
+ end
99
+
100
+ describe 'test attribute "classification"' do
101
+ it 'should work' do
102
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
103
+ end
104
+ end
105
+
78
106
  describe 'test attribute "created_at"' do
79
107
  it 'should work' do
80
108
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -57,4 +57,22 @@ describe Zyphr::UpdateTemplateRequest do
57
57
  end
58
58
  end
59
59
 
60
+ describe 'test attribute "design_json"' 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 "editor_type"' 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
+ describe 'test attribute "classification"' do
73
+ it 'should work' do
74
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
+ end
76
+ end
77
+
60
78
  end
@@ -45,12 +45,6 @@ describe Zyphr::UpsertAuthEmailTemplateRequest do
45
45
  end
46
46
  end
47
47
 
48
- describe 'test attribute "mjml_source"' 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
48
  describe 'test attribute "design_json"' do
55
49
  it 'should work' do
56
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -60,7 +54,7 @@ describe Zyphr::UpsertAuthEmailTemplateRequest do
60
54
  describe 'test attribute "editor_type"' do
61
55
  it 'should work' do
62
56
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "mjml", "design"])
57
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["code", "visual"])
64
58
  # validator.allowable_values.each do |value|
65
59
  # expect { instance.editor_type = value }.not_to raise_error
66
60
  # end
data/zyphr.gemspec CHANGED
@@ -17,7 +17,7 @@ require "zyphr/version"
17
17
 
18
18
  Gem::Specification.new do |s|
19
19
  s.name = "zyphr"
20
- s.version = '0.1.79'
20
+ s.version = '0.1.81'
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Zyphr"]
23
23
  s.email = ["support@zyphr.dev"]