zyphr 0.1.80 → 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 (38) 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/CreateTemplateRequest.md +12 -4
  8. data/docs/Template.md +8 -0
  9. data/docs/TemplateClassification.md +15 -0
  10. data/docs/TemplateEditorType.md +15 -0
  11. data/docs/TemplatesApi.md +1 -1
  12. data/docs/UpdateTemplateRequest.md +9 -3
  13. data/docs/UpsertAuthEmailTemplateRequest.md +0 -2
  14. data/lib/zyphr/api/auth_email_templates_api.rb +4 -4
  15. data/lib/zyphr/api/templates_api.rb +2 -2
  16. data/lib/zyphr/models/auth_email_template.rb +3 -13
  17. data/lib/zyphr/models/auth_email_template_preview_draft.rb +1 -11
  18. data/lib/zyphr/models/auth_email_template_version.rb +3 -13
  19. data/lib/zyphr/models/create_template_request.rb +87 -7
  20. data/lib/zyphr/models/template.rb +78 -1
  21. data/lib/zyphr/models/template_classification.rb +40 -0
  22. data/lib/zyphr/models/template_editor_type.rb +40 -0
  23. data/lib/zyphr/models/update_template_request.rb +62 -6
  24. data/lib/zyphr/models/upsert_auth_email_template_request.rb +4 -14
  25. data/lib/zyphr.rb +2 -0
  26. data/spec/api/auth_email_templates_api_spec.rb +2 -2
  27. data/spec/api/templates_api_spec.rb +1 -1
  28. data/spec/models/auth_email_template_preview_draft_spec.rb +0 -6
  29. data/spec/models/auth_email_template_spec.rb +1 -7
  30. data/spec/models/auth_email_template_version_spec.rb +1 -7
  31. data/spec/models/create_template_request_spec.rb +28 -0
  32. data/spec/models/template_classification_spec.rb +30 -0
  33. data/spec/models/template_editor_type_spec.rb +30 -0
  34. data/spec/models/template_spec.rb +28 -0
  35. data/spec/models/update_template_request_spec.rb +18 -0
  36. data/spec/models/upsert_auth_email_template_request_spec.rb +1 -7
  37. data/zyphr.gemspec +1 -1
  38. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dac40cdb49afd5eb3e2193f089433dcd0e4c31cdd943d52a92637e2a0b0494dd
4
- data.tar.gz: 80972861569949c63ae93730f614a5af88c792c4c65dbdf2634cadd1a64f5065
3
+ metadata.gz: e8d3f67a8dc12caec47c02c3af8e1e29a02bbf361186ad8fb4d6a7c7e9fe82e6
4
+ data.tar.gz: 4d1349e5ce557e12f2923c138644cb6a67ede06c34b4243161e5fe5531774cac
5
5
  SHA512:
6
- metadata.gz: 259a71e3322c4485a43e54fd3d688a86407e07d6cb39347d268cc29a042fc2e540e2b07ccdb3e0f539d4554a09c6b2ca5e1f2ff6acabd1200cc2b3fe59dd7da4
7
- data.tar.gz: 3bfb808bdbbe9477f29be3fa18921ee072bb72ea557989558db592edc876008b414f4ffbfcec653478f9a95c782705199b7c4bcb32a3ff08fcc68d4c53546ccf
6
+ metadata.gz: ef7f20fc4e42980f3b7d7734d7cdcade2c83bec0efdc86670d988c409ffbd92e4880c0b19a94edc8e4256c19ee5fe429b35cd61e669ac86e22f94f11147ff81e
7
+ data.tar.gz: 371eb8c10c7cd7ca0fdb5925bbebc6deaeccbb835dde65e1c965a63f57a587370aa8733da90bfbf124494699a4e08aca767239b193f9df9968dd0bfac9429d2e
data/README.md CHANGED
@@ -802,6 +802,8 @@ Class | Method | HTTP request | Description
802
802
  - [Zyphr::SwitchOrganizationResponseDataTokens](docs/SwitchOrganizationResponseDataTokens.md)
803
803
  - [Zyphr::SwitchOrganizationResponseDataUser](docs/SwitchOrganizationResponseDataUser.md)
804
804
  - [Zyphr::Template](docs/Template.md)
805
+ - [Zyphr::TemplateClassification](docs/TemplateClassification.md)
806
+ - [Zyphr::TemplateEditorType](docs/TemplateEditorType.md)
805
807
  - [Zyphr::TemplateListResponse](docs/TemplateListResponse.md)
806
808
  - [Zyphr::TemplateRenderResponse](docs/TemplateRenderResponse.md)
807
809
  - [Zyphr::TemplateRenderedContent](docs/TemplateRenderedContent.md)
@@ -8,7 +8,6 @@
8
8
  | **subject** | **String** | | [optional] |
9
9
  | **html** | **String** | | [optional] |
10
10
  | **text** | **String** | | [optional] |
11
- | **mjml_source** | **String** | | [optional] |
12
11
  | **design_json** | **Hash<String, Object>** | | [optional] |
13
12
  | **editor_type** | **String** | | [optional] |
14
13
  | **from_name** | **String** | | [optional] |
@@ -28,7 +27,6 @@ instance = Zyphr::AuthEmailTemplate.new(
28
27
  subject: null,
29
28
  html: null,
30
29
  text: null,
31
- mjml_source: null,
32
30
  design_json: null,
33
31
  editor_type: null,
34
32
  from_name: null,
@@ -7,7 +7,6 @@
7
7
  | **subject** | **String** | | [optional] |
8
8
  | **html** | **String** | | [optional] |
9
9
  | **text** | **String** | | [optional] |
10
- | **mjml_source** | **String** | | [optional] |
11
10
  | **from_name** | **String** | | [optional] |
12
11
  | **reply_to** | **String** | | [optional] |
13
12
 
@@ -20,7 +19,6 @@ instance = Zyphr::AuthEmailTemplatePreviewDraft.new(
20
19
  subject: null,
21
20
  html: null,
22
21
  text: null,
23
- mjml_source: null,
24
22
  from_name: null,
25
23
  reply_to: null
26
24
  )
@@ -8,7 +8,6 @@
8
8
  | **subject** | **String** | | [optional] |
9
9
  | **html** | **String** | | [optional] |
10
10
  | **text** | **String** | | [optional] |
11
- | **mjml_source** | **String** | | [optional] |
12
11
  | **design_json** | **Hash<String, Object>** | | [optional] |
13
12
  | **editor_type** | **String** | | [optional] |
14
13
  | **from_name** | **String** | | [optional] |
@@ -26,7 +25,6 @@ instance = Zyphr::AuthEmailTemplateVersion.new(
26
25
  subject: null,
27
26
  html: null,
28
27
  text: null,
29
- mjml_source: null,
30
28
  design_json: null,
31
29
  editor_type: null,
32
30
  from_name: null,
@@ -22,7 +22,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
22
22
 
23
23
  Bulk-upsert auth email templates
24
24
 
25
- 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.
25
+ 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.
26
26
 
27
27
  ### Examples
28
28
 
@@ -709,7 +709,7 @@ end
709
709
 
710
710
  Create or update an auth email template
711
711
 
712
- Idempotent upsert keyed by application + type. MJML sources are compiled to HTML on save; compile errors return 400 with `details`.
712
+ Idempotent upsert keyed by application + type. A visual editor `design_json` (`format: zyphr-email/1`) is exported to `html` on save; a design that can't be exported returns 400.
713
713
 
714
714
  ### Examples
715
715
 
@@ -6,9 +6,13 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | Template name (letters, numbers, underscores, hyphens) | |
8
8
  | **description** | **String** | | [optional] |
9
- | **subject** | **String** | Email subject line. Supports Handlebars `{{var}}` interpolation; values are HTML-escaped on render (see `html` field for the full escape policy). | [optional] |
10
- | **html** | **String** | HTML body. Supports Handlebars `{{var}}` interpolation; values are always HTML-escaped on render. **Triple-brace `{{{var}}}` (raw HTML output) is not supported** for XSS-prevention reasons — input containing `{{{var}}}` is rewritten to `{{var}}` on save and the response includes a top-level `warnings` array describing what changed. To inject pre-rendered HTML, render the entire `html` field outside Zyphr and POST it to `/v1/email/send` directly without `template_id`. | [optional] |
11
- | **text** | **String** | Plain text body. Supports Handlebars `{{var}}` interpolation; triple-brace syntax is rewritten to double-brace on save (same policy as the `html` field). | [optional] |
9
+ | **channel** | **String** | Channel the template is for. Set on create only; it cannot be changed later. Names are unique per channel within a project. | [optional][default to 'email'] |
10
+ | **subject** | **String** | Email subject line (push: the notification title). Supports Handlebars `{{var}}` interpolation. Values are inserted as written, not HTML-escaped: the subject is not HTML. | [optional] |
11
+ | **html** | **String** | HTML body. Supports Handlebars `{{var}}` interpolation; values are always HTML-escaped on render (the subject and text are not). **Triple-brace `{{{var}}}` (raw HTML output) is not supported** for XSS-prevention reasons — input containing `{{{var}}}` is rewritten to `{{var}}` on save and the response includes a top-level `warnings` array describing what changed. To inject pre-rendered HTML, render the entire `html` field outside Zyphr and POST it to `/v1/email/send` directly without `template_id`. | [optional] |
12
+ | **text** | **String** | Plain text body (SMS and push: the message body). Supports Handlebars `{{var}}` interpolation. Values are inserted as written, not HTML-escaped. Triple-brace syntax is rewritten to double-brace on save (same policy as the `html` field). | [optional] |
13
+ | **design_json** | **Hash<String, Object>** | 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. | [optional] |
14
+ | **editor_type** | [**TemplateEditorType**](TemplateEditorType.md) | | [optional][default to 'code'] |
15
+ | **classification** | [**TemplateClassification**](TemplateClassification.md) | | [optional] |
12
16
 
13
17
  ## Example
14
18
 
@@ -18,9 +22,13 @@ require 'zyphr'
18
22
  instance = Zyphr::CreateTemplateRequest.new(
19
23
  name: welcome_email,
20
24
  description: null,
25
+ channel: null,
21
26
  subject: Welcome to {{company_name}}!,
22
27
  html: null,
23
- text: null
28
+ text: null,
29
+ design_json: null,
30
+ editor_type: null,
31
+ classification: null
24
32
  )
25
33
  ```
26
34
 
data/docs/Template.md CHANGED
@@ -6,12 +6,16 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | | [optional] |
8
8
  | **name** | **String** | | [optional] |
9
+ | **channel** | **String** | | [optional] |
9
10
  | **description** | **String** | | [optional] |
10
11
  | **subject** | **String** | | [optional] |
11
12
  | **html** | **String** | | [optional] |
12
13
  | **text** | **String** | | [optional] |
13
14
  | **variables** | **Array<String>** | Variable names auto-detected from `{{var}}` placeholders in subject, html, and text. Server-derived; ignored if supplied on create/update. | [optional][readonly] |
14
15
  | **version** | **Integer** | | [optional] |
16
+ | **design_json** | **Hash<String, Object>** | Omitted from list responses, which also omit `html` and `text`. | [optional] |
17
+ | **editor_type** | [**TemplateEditorType**](TemplateEditorType.md) | | [optional][default to 'code'] |
18
+ | **classification** | [**TemplateClassification**](TemplateClassification.md) | | [optional] |
15
19
  | **created_at** | **Time** | | [optional] |
16
20
  | **updated_at** | **Time** | | [optional] |
17
21
 
@@ -23,12 +27,16 @@ require 'zyphr'
23
27
  instance = Zyphr::Template.new(
24
28
  id: null,
25
29
  name: null,
30
+ channel: null,
26
31
  description: null,
27
32
  subject: null,
28
33
  html: null,
29
34
  text: null,
30
35
  variables: null,
31
36
  version: null,
37
+ design_json: null,
38
+ editor_type: null,
39
+ classification: null,
32
40
  created_at: null,
33
41
  updated_at: null
34
42
  )
@@ -0,0 +1,15 @@
1
+ # Zyphr::TemplateClassification
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'zyphr'
12
+
13
+ instance = Zyphr::TemplateClassification.new()
14
+ ```
15
+
@@ -0,0 +1,15 @@
1
+ # Zyphr::TemplateEditorType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'zyphr'
12
+
13
+ instance = Zyphr::TemplateEditorType.new()
14
+ ```
15
+
data/docs/TemplatesApi.md CHANGED
@@ -19,7 +19,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
19
19
 
20
20
  Create template
21
21
 
22
- Create a new email template. Name must be unique within the account.
22
+ Create an email, SMS or push template. The name must be unique per channel within the project.
23
23
 
24
24
  ### Examples
25
25
 
@@ -6,9 +6,12 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | | [optional] |
8
8
  | **description** | **String** | | [optional] |
9
- | **subject** | **String** | Email subject line. Supports Handlebars `{{var}}` interpolation (HTML-escaped on render). | [optional] |
9
+ | **subject** | **String** | Email subject line (push: the notification title). Supports Handlebars `{{var}}` interpolation; values are not HTML-escaped. | [optional] |
10
10
  | **html** | **String** | 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. | [optional] |
11
- | **text** | **String** | Plain text body. Supports Handlebars `{{var}}` interpolation; same triple-brace rewrite policy as `html`. | [optional] |
11
+ | **text** | **String** | Plain text body. Supports Handlebars `{{var}}` interpolation; values are not HTML-escaped. Same triple-brace rewrite policy as `html`. | [optional] |
12
+ | **design_json** | **Hash<String, Object>** | 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. | [optional] |
13
+ | **editor_type** | [**TemplateEditorType**](TemplateEditorType.md) | | [optional][default to 'code'] |
14
+ | **classification** | [**TemplateClassification**](TemplateClassification.md) | | [optional] |
12
15
 
13
16
  ## Example
14
17
 
@@ -20,7 +23,10 @@ instance = Zyphr::UpdateTemplateRequest.new(
20
23
  description: null,
21
24
  subject: null,
22
25
  html: null,
23
- text: null
26
+ text: null,
27
+ design_json: null,
28
+ editor_type: null,
29
+ classification: null
24
30
  )
25
31
  ```
26
32
 
@@ -7,7 +7,6 @@
7
7
  | **subject** | **String** | | [optional] |
8
8
  | **html** | **String** | | [optional] |
9
9
  | **text** | **String** | | [optional] |
10
- | **mjml_source** | **String** | | [optional] |
11
10
  | **design_json** | **Hash<String, Object>** | | [optional] |
12
11
  | **editor_type** | **String** | | [optional] |
13
12
  | **from_name** | **String** | | [optional] |
@@ -23,7 +22,6 @@ instance = Zyphr::UpsertAuthEmailTemplateRequest.new(
23
22
  subject: null,
24
23
  html: null,
25
24
  text: null,
26
- mjml_source: null,
27
25
  design_json: null,
28
26
  editor_type: null,
29
27
  from_name: null,
@@ -20,7 +20,7 @@ module Zyphr
20
20
  @api_client = api_client
21
21
  end
22
22
  # Bulk-upsert auth email templates
23
- # 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.
23
+ # 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.
24
24
  # @param bulk_upsert_auth_email_templates_request [BulkUpsertAuthEmailTemplatesRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [BulkUpsertAuthEmailTemplatesResponse]
@@ -30,7 +30,7 @@ module Zyphr
30
30
  end
31
31
 
32
32
  # Bulk-upsert auth email templates
33
- # 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.
33
+ # 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.
34
34
  # @param bulk_upsert_auth_email_templates_request [BulkUpsertAuthEmailTemplatesRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(BulkUpsertAuthEmailTemplatesResponse, Integer, Hash)>] BulkUpsertAuthEmailTemplatesResponse data, response status code and response headers
@@ -612,7 +612,7 @@ module Zyphr
612
612
  end
613
613
 
614
614
  # Create or update an auth email template
615
- # Idempotent upsert keyed by application + type. MJML sources are compiled to HTML on save; compile errors return 400 with `details`.
615
+ # Idempotent upsert keyed by application + type. A visual editor `design_json` (`format: zyphr-email/1`) is exported to `html` on save; a design that can't be exported returns 400.
616
616
  # @param type [AuthEmailType]
617
617
  # @param upsert_auth_email_template_request [UpsertAuthEmailTemplateRequest]
618
618
  # @param [Hash] opts the optional parameters
@@ -623,7 +623,7 @@ module Zyphr
623
623
  end
624
624
 
625
625
  # Create or update an auth email template
626
- # Idempotent upsert keyed by application + type. MJML sources are compiled to HTML on save; compile errors return 400 with &#x60;details&#x60;.
626
+ # 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.
627
627
  # @param type [AuthEmailType]
628
628
  # @param upsert_auth_email_template_request [UpsertAuthEmailTemplateRequest]
629
629
  # @param [Hash] opts the optional parameters
@@ -20,7 +20,7 @@ module Zyphr
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create template
23
- # Create a new email template. Name must be unique within the account.
23
+ # Create an email, SMS or push template. The name must be unique per channel within the project.
24
24
  # @param create_template_request [CreateTemplateRequest]
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [TemplateResponse]
@@ -30,7 +30,7 @@ module Zyphr
30
30
  end
31
31
 
32
32
  # Create template
33
- # Create a new email template. Name must be unique within the account.
33
+ # Create an email, SMS or push template. The name must be unique per channel within the project.
34
34
  # @param create_template_request [CreateTemplateRequest]
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(TemplateResponse, Integer, Hash)>] TemplateResponse data, response status code and response headers
@@ -23,8 +23,6 @@ module Zyphr
23
23
 
24
24
  attr_accessor :text
25
25
 
26
- attr_accessor :mjml_source
27
-
28
26
  attr_accessor :design_json
29
27
 
30
28
  attr_accessor :editor_type
@@ -71,7 +69,6 @@ module Zyphr
71
69
  :'subject' => :'subject',
72
70
  :'html' => :'html',
73
71
  :'text' => :'text',
74
- :'mjml_source' => :'mjml_source',
75
72
  :'design_json' => :'design_json',
76
73
  :'editor_type' => :'editor_type',
77
74
  :'from_name' => :'from_name',
@@ -100,7 +97,6 @@ module Zyphr
100
97
  :'subject' => :'String',
101
98
  :'html' => :'String',
102
99
  :'text' => :'String',
103
- :'mjml_source' => :'String',
104
100
  :'design_json' => :'Hash<String, Object>',
105
101
  :'editor_type' => :'String',
106
102
  :'from_name' => :'String',
@@ -116,7 +112,6 @@ module Zyphr
116
112
  def self.openapi_nullable
117
113
  Set.new([
118
114
  :'text',
119
- :'mjml_source',
120
115
  :'design_json',
121
116
  :'editor_type',
122
117
  :'from_name',
@@ -157,10 +152,6 @@ module Zyphr
157
152
  self.text = attributes[:'text']
158
153
  end
159
154
 
160
- if attributes.key?(:'mjml_source')
161
- self.mjml_source = attributes[:'mjml_source']
162
- end
163
-
164
155
  if attributes.key?(:'design_json')
165
156
  if (value = attributes[:'design_json']).is_a?(Hash)
166
157
  self.design_json = value
@@ -208,7 +199,7 @@ module Zyphr
208
199
  # @return true if the model is valid
209
200
  def valid?
210
201
  warn '[DEPRECATED] the `valid?` method is obsolete'
211
- editor_type_validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
202
+ editor_type_validator = EnumAttributeValidator.new('String', ["code", "visual"])
212
203
  return false unless editor_type_validator.valid?(@editor_type)
213
204
  true
214
205
  end
@@ -216,7 +207,7 @@ module Zyphr
216
207
  # Custom attribute writer method checking allowed values (enum).
217
208
  # @param [Object] editor_type Object to be assigned
218
209
  def editor_type=(editor_type)
219
- validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
210
+ validator = EnumAttributeValidator.new('String', ["code", "visual"])
220
211
  unless validator.valid?(editor_type)
221
212
  fail ArgumentError, "invalid value for \"editor_type\", must be one of #{validator.allowable_values}."
222
213
  end
@@ -232,7 +223,6 @@ module Zyphr
232
223
  subject == o.subject &&
233
224
  html == o.html &&
234
225
  text == o.text &&
235
- mjml_source == o.mjml_source &&
236
226
  design_json == o.design_json &&
237
227
  editor_type == o.editor_type &&
238
228
  from_name == o.from_name &&
@@ -252,7 +242,7 @@ module Zyphr
252
242
  # Calculates hash code according to all attributes.
253
243
  # @return [Integer] Hash code
254
244
  def hash
255
- [email_type, subject, html, text, mjml_source, design_json, editor_type, from_name, reply_to, is_enabled, is_default, has_override, version].hash
245
+ [email_type, subject, html, text, design_json, editor_type, from_name, reply_to, is_enabled, is_default, has_override, version].hash
256
246
  end
257
247
 
258
248
  # Builds the object from hash
@@ -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 :from_name
28
26
 
29
27
  attr_accessor :reply_to
@@ -34,7 +32,6 @@ module Zyphr
34
32
  :'subject' => :'subject',
35
33
  :'html' => :'html',
36
34
  :'text' => :'text',
37
- :'mjml_source' => :'mjml_source',
38
35
  :'from_name' => :'from_name',
39
36
  :'reply_to' => :'reply_to'
40
37
  }
@@ -56,7 +53,6 @@ module Zyphr
56
53
  :'subject' => :'String',
57
54
  :'html' => :'String',
58
55
  :'text' => :'String',
59
- :'mjml_source' => :'String',
60
56
  :'from_name' => :'String',
61
57
  :'reply_to' => :'String'
62
58
  }
@@ -68,7 +64,6 @@ module Zyphr
68
64
  :'subject',
69
65
  :'html',
70
66
  :'text',
71
- :'mjml_source',
72
67
  :'from_name',
73
68
  :'reply_to'
74
69
  ])
@@ -102,10 +97,6 @@ module Zyphr
102
97
  self.text = attributes[:'text']
103
98
  end
104
99
 
105
- if attributes.key?(:'mjml_source')
106
- self.mjml_source = attributes[:'mjml_source']
107
- end
108
-
109
100
  if attributes.key?(:'from_name')
110
101
  self.from_name = attributes[:'from_name']
111
102
  end
@@ -138,7 +129,6 @@ module Zyphr
138
129
  subject == o.subject &&
139
130
  html == o.html &&
140
131
  text == o.text &&
141
- mjml_source == o.mjml_source &&
142
132
  from_name == o.from_name &&
143
133
  reply_to == o.reply_to
144
134
  end
@@ -152,7 +142,7 @@ module Zyphr
152
142
  # Calculates hash code according to all attributes.
153
143
  # @return [Integer] Hash code
154
144
  def hash
155
- [subject, html, text, mjml_source, from_name, reply_to].hash
145
+ [subject, html, text, from_name, reply_to].hash
156
146
  end
157
147
 
158
148
  # Builds the object from hash
@@ -23,8 +23,6 @@ module Zyphr
23
23
 
24
24
  attr_accessor :text
25
25
 
26
- attr_accessor :mjml_source
27
-
28
26
  attr_accessor :design_json
29
27
 
30
28
  attr_accessor :editor_type
@@ -66,7 +64,6 @@ module Zyphr
66
64
  :'subject' => :'subject',
67
65
  :'html' => :'html',
68
66
  :'text' => :'text',
69
- :'mjml_source' => :'mjml_source',
70
67
  :'design_json' => :'design_json',
71
68
  :'editor_type' => :'editor_type',
72
69
  :'from_name' => :'from_name',
@@ -93,7 +90,6 @@ module Zyphr
93
90
  :'subject' => :'String',
94
91
  :'html' => :'String',
95
92
  :'text' => :'String',
96
- :'mjml_source' => :'String',
97
93
  :'design_json' => :'Hash<String, Object>',
98
94
  :'editor_type' => :'String',
99
95
  :'from_name' => :'String',
@@ -107,7 +103,6 @@ module Zyphr
107
103
  def self.openapi_nullable
108
104
  Set.new([
109
105
  :'text',
110
- :'mjml_source',
111
106
  :'design_json',
112
107
  :'editor_type',
113
108
  :'from_name',
@@ -147,10 +142,6 @@ module Zyphr
147
142
  self.text = attributes[:'text']
148
143
  end
149
144
 
150
- if attributes.key?(:'mjml_source')
151
- self.mjml_source = attributes[:'mjml_source']
152
- end
153
-
154
145
  if attributes.key?(:'design_json')
155
146
  if (value = attributes[:'design_json']).is_a?(Hash)
156
147
  self.design_json = value
@@ -190,7 +181,7 @@ module Zyphr
190
181
  # @return true if the model is valid
191
182
  def valid?
192
183
  warn '[DEPRECATED] the `valid?` method is obsolete'
193
- editor_type_validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
184
+ editor_type_validator = EnumAttributeValidator.new('String', ["code", "visual"])
194
185
  return false unless editor_type_validator.valid?(@editor_type)
195
186
  true
196
187
  end
@@ -198,7 +189,7 @@ module Zyphr
198
189
  # Custom attribute writer method checking allowed values (enum).
199
190
  # @param [Object] editor_type Object to be assigned
200
191
  def editor_type=(editor_type)
201
- validator = EnumAttributeValidator.new('String', ["code", "mjml", "design"])
192
+ validator = EnumAttributeValidator.new('String', ["code", "visual"])
202
193
  unless validator.valid?(editor_type)
203
194
  fail ArgumentError, "invalid value for \"editor_type\", must be one of #{validator.allowable_values}."
204
195
  end
@@ -214,7 +205,6 @@ module Zyphr
214
205
  subject == o.subject &&
215
206
  html == o.html &&
216
207
  text == o.text &&
217
- mjml_source == o.mjml_source &&
218
208
  design_json == o.design_json &&
219
209
  editor_type == o.editor_type &&
220
210
  from_name == o.from_name &&
@@ -232,7 +222,7 @@ module Zyphr
232
222
  # Calculates hash code according to all attributes.
233
223
  # @return [Integer] Hash code
234
224
  def hash
235
- [version, subject, html, text, mjml_source, design_json, editor_type, from_name, reply_to, is_enabled, created_at].hash
225
+ [version, subject, html, text, design_json, editor_type, from_name, reply_to, is_enabled, created_at].hash
236
226
  end
237
227
 
238
228
  # Builds the object from hash