phrase 4.22.0 → 4.24.0

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 (209) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +8 -6
  4. data/docs/AccountDetails.md +1 -1
  5. data/docs/AuthorizationsApi.md +1 -1
  6. data/docs/Automation.md +6 -0
  7. data/docs/AutomationsApi.md +1 -1
  8. data/docs/AutomationsCreateParameters.md +5 -1
  9. data/docs/AutomationsCreateParameters1.md +5 -1
  10. data/docs/BlacklistedKeysApi.md +1 -1
  11. data/docs/Branch.md +2 -0
  12. data/docs/BranchCreateParameters.md +3 -1
  13. data/docs/BranchMergeParameters.md +1 -1
  14. data/docs/BranchSyncParameters.md +1 -1
  15. data/docs/BranchesApi.md +10 -10
  16. data/docs/CommentsApi.md +7 -7
  17. data/docs/Distribution.md +4 -4
  18. data/docs/{DistributionPreview.md → DistributionDetails.md} +9 -3
  19. data/docs/DistributionsApi.md +9 -9
  20. data/docs/DocumentDelete422Response.md +19 -0
  21. data/docs/{CustomMetadataPropertyCreate422ResponseErrorsInner.md → DocumentDelete422ResponseErrorsInner.md} +2 -2
  22. data/docs/DocumentsApi.md +4 -2
  23. data/docs/FigmaAttachmentsApi.md +1 -1
  24. data/docs/GlossariesApi.md +1 -1
  25. data/docs/Glossary.md +2 -0
  26. data/docs/GlossaryTerm.md +2 -0
  27. data/docs/GlossaryTermGlossary.md +19 -0
  28. data/docs/GlossaryTermTranslationsApi.md +1 -1
  29. data/docs/GlossaryTermsApi.md +1 -1
  30. data/docs/IcuSkeletonParameters.md +3 -1
  31. data/docs/Invitation.md +2 -2
  32. data/docs/InvitationsApi.md +1 -1
  33. data/docs/Job.md +5 -1
  34. data/docs/JobDetails.md +8 -2
  35. data/docs/JobTemplate.md +2 -0
  36. data/docs/JobTemplateDetails.md +2 -0
  37. data/docs/JobTemplatesApi.md +1 -1
  38. data/docs/JobsApi.md +15 -9
  39. data/docs/KeyCreateParameters.md +6 -2
  40. data/docs/KeyUpdateParameters.md +6 -2
  41. data/docs/KeysApi.md +1 -1
  42. data/docs/LocaleDownloadCreateParameters.md +4 -2
  43. data/docs/LocalesApi.md +12 -6
  44. data/docs/MembersApi.md +1 -1
  45. data/docs/NotificationsApi.md +3 -1
  46. data/docs/OrdersApi.md +4 -2
  47. data/docs/OrganizationJobTemplate.md +4 -0
  48. data/docs/OrganizationJobTemplateDetails.md +4 -0
  49. data/docs/OrganizationJobTemplatesApi.md +1 -1
  50. data/docs/ProjectCreateParameters.md +17 -1
  51. data/docs/ProjectDetails.md +7 -1
  52. data/docs/ProjectUpdateParameters.md +17 -3
  53. data/docs/ProjectsApi.md +10 -8
  54. data/docs/Release.md +2 -0
  55. data/docs/ReleasesApi.md +1 -1
  56. data/docs/RepoSync.md +2 -0
  57. data/docs/ScreenshotMarker.md +2 -2
  58. data/docs/ScreenshotMarkerPresentation.md +23 -0
  59. data/docs/ScreenshotMarkersApi.md +1 -1
  60. data/docs/ScreenshotUpdateParameters.md +1 -1
  61. data/docs/ScreenshotsApi.md +1 -1
  62. data/docs/SearchInAccountParameters.md +3 -1
  63. data/docs/StyleGuidesApi.md +1 -1
  64. data/docs/StyleguideCreateParameters.md +3 -3
  65. data/docs/StyleguideUpdateParameters.md +3 -3
  66. data/docs/Tag.md +2 -0
  67. data/docs/TagWithStats.md +2 -0
  68. data/docs/TagsApi.md +5 -3
  69. data/docs/TranslationCreateParameters.md +5 -1
  70. data/docs/TranslationOrder.md +2 -2
  71. data/docs/TranslationUpdateParameters.md +3 -1
  72. data/docs/TranslationsApi.md +4 -0
  73. data/docs/UploadBatch.md +4 -2
  74. data/docs/UploadSummary.md +1 -1
  75. data/docs/UploadsApi.md +3 -1
  76. data/docs/VariablesApi.md +1 -1
  77. data/docs/WebhooksApi.md +7 -6
  78. data/lib/phrase/api/authorizations_api.rb +2 -0
  79. data/lib/phrase/api/automations_api.rb +2 -0
  80. data/lib/phrase/api/blacklisted_keys_api.rb +2 -0
  81. data/lib/phrase/api/branches_api.rb +20 -14
  82. data/lib/phrase/api/comments_api.rb +18 -4
  83. data/lib/phrase/api/distributions_api.rb +14 -12
  84. data/lib/phrase/api/documents_api.rb +5 -0
  85. data/lib/phrase/api/figma_attachments_api.rb +2 -0
  86. data/lib/phrase/api/glossaries_api.rb +2 -0
  87. data/lib/phrase/api/glossary_term_translations_api.rb +2 -0
  88. data/lib/phrase/api/glossary_terms_api.rb +2 -0
  89. data/lib/phrase/api/invitations_api.rb +2 -0
  90. data/lib/phrase/api/job_templates_api.rb +2 -0
  91. data/lib/phrase/api/jobs_api.rb +18 -6
  92. data/lib/phrase/api/keys_api.rb +2 -0
  93. data/lib/phrase/api/locales_api.rb +15 -4
  94. data/lib/phrase/api/members_api.rb +2 -0
  95. data/lib/phrase/api/notifications_api.rb +3 -0
  96. data/lib/phrase/api/orders_api.rb +5 -0
  97. data/lib/phrase/api/organization_job_templates_api.rb +2 -0
  98. data/lib/phrase/api/projects_api.rb +23 -10
  99. data/lib/phrase/api/releases_api.rb +2 -0
  100. data/lib/phrase/api/screenshot_markers_api.rb +2 -0
  101. data/lib/phrase/api/screenshots_api.rb +2 -0
  102. data/lib/phrase/api/style_guides_api.rb +2 -0
  103. data/lib/phrase/api/tags_api.rb +7 -2
  104. data/lib/phrase/api/translations_api.rb +6 -0
  105. data/lib/phrase/api/uploads_api.rb +3 -0
  106. data/lib/phrase/api/variables_api.rb +2 -0
  107. data/lib/phrase/api/webhooks_api.rb +9 -5
  108. data/lib/phrase/models/account_details.rb +1 -0
  109. data/lib/phrase/models/authorization_create_parameters.rb +22 -0
  110. data/lib/phrase/models/authorization_update_parameters.rb +22 -0
  111. data/lib/phrase/models/automation.rb +34 -1
  112. data/lib/phrase/models/automations_create_parameters.rb +24 -4
  113. data/lib/phrase/models/automations_create_parameters1.rb +24 -4
  114. data/lib/phrase/models/branch.rb +46 -1
  115. data/lib/phrase/models/branch_create_parameters.rb +14 -4
  116. data/lib/phrase/models/branch_merge_parameters.rb +35 -1
  117. data/lib/phrase/models/branch_sync_parameters.rb +35 -1
  118. data/lib/phrase/models/distribution.rb +17 -20
  119. data/lib/phrase/models/{distribution_preview.rb → distribution_details.rb} +46 -7
  120. data/lib/phrase/models/{custom_metadata_property_create422_response.rb → document_delete422_response.rb} +4 -4
  121. data/lib/phrase/models/{custom_metadata_property_create422_response_errors_inner.rb → document_delete422_response_errors_inner.rb} +3 -3
  122. data/lib/phrase/models/glossary.rb +12 -1
  123. data/lib/phrase/models/glossary_term.rb +10 -1
  124. data/lib/phrase/models/glossary_term_glossary.rb +206 -0
  125. data/lib/phrase/models/icu_skeleton_parameters.rb +12 -2
  126. data/lib/phrase/models/invitation.rb +9 -8
  127. data/lib/phrase/models/job.rb +26 -4
  128. data/lib/phrase/models/job_details.rb +37 -4
  129. data/lib/phrase/models/job_template.rb +11 -1
  130. data/lib/phrase/models/job_template_details.rb +11 -1
  131. data/lib/phrase/models/key_create_parameters.rb +26 -4
  132. data/lib/phrase/models/key_update_parameters.rb +26 -4
  133. data/lib/phrase/models/locale_download_create_parameters.rb +13 -3
  134. data/lib/phrase/models/organization_job_template.rb +22 -1
  135. data/lib/phrase/models/organization_job_template_details.rb +22 -1
  136. data/lib/phrase/models/project_create_parameters.rb +115 -1
  137. data/lib/phrase/models/project_details.rb +31 -4
  138. data/lib/phrase/models/project_update_parameters.rb +75 -5
  139. data/lib/phrase/models/release.rb +10 -1
  140. data/lib/phrase/models/repo_sync.rb +12 -1
  141. data/lib/phrase/models/screenshot_marker.rb +2 -1
  142. data/lib/phrase/models/screenshot_marker_presentation.rb +224 -0
  143. data/lib/phrase/models/search_in_account_parameters.rb +16 -4
  144. data/lib/phrase/models/styleguide_create_parameters.rb +61 -3
  145. data/lib/phrase/models/styleguide_update_parameters.rb +61 -3
  146. data/lib/phrase/models/tag.rb +11 -1
  147. data/lib/phrase/models/tag_with_stats.rb +11 -1
  148. data/lib/phrase/models/translation_create_parameters.rb +24 -4
  149. data/lib/phrase/models/translation_order.rb +8 -7
  150. data/lib/phrase/models/translation_update_parameters.rb +14 -4
  151. data/lib/phrase/models/upload_batch.rb +24 -14
  152. data/lib/phrase/models/upload_summary.rb +1 -1
  153. data/lib/phrase/version.rb +1 -1
  154. data/lib/phrase.rb +5 -3
  155. data/spec/api/branches_api_spec.rb +7 -7
  156. data/spec/api/comments_api_spec.rb +2 -2
  157. data/spec/api/distributions_api_spec.rb +4 -4
  158. data/spec/api/documents_api_spec.rb +1 -0
  159. data/spec/api/jobs_api_spec.rb +4 -2
  160. data/spec/api/notifications_api_spec.rb +1 -0
  161. data/spec/api/orders_api_spec.rb +1 -0
  162. data/spec/api/projects_api_spec.rb +6 -5
  163. data/spec/api/tags_api_spec.rb +2 -1
  164. data/spec/api/translations_api_spec.rb +2 -0
  165. data/spec/api/webhooks_api_spec.rb +2 -2
  166. data/spec/models/authorization_create_parameters_spec.rb +4 -0
  167. data/spec/models/authorization_update_parameters_spec.rb +4 -0
  168. data/spec/models/automation_spec.rb +18 -0
  169. data/spec/models/automations_create_parameters1_spec.rb +12 -0
  170. data/spec/models/automations_create_parameters_spec.rb +12 -0
  171. data/spec/models/branch_create_parameters_spec.rb +6 -0
  172. data/spec/models/branch_merge_parameters_spec.rb +4 -0
  173. data/spec/models/branch_spec.rb +10 -0
  174. data/spec/models/branch_sync_parameters_spec.rb +4 -0
  175. data/spec/models/{distribution_preview_spec.rb → distribution_details_spec.rb} +24 -6
  176. data/spec/models/distribution_spec.rb +3 -3
  177. data/spec/models/{custom_metadata_property_create422_response_errors_inner_spec.rb → document_delete422_response_errors_inner_spec.rb} +6 -6
  178. data/spec/models/{custom_metadata_property_create422_response_spec.rb → document_delete422_response_spec.rb} +6 -6
  179. data/spec/models/glossary_spec.rb +6 -0
  180. data/spec/models/glossary_term_glossary_spec.rb +35 -0
  181. data/spec/models/glossary_term_spec.rb +6 -0
  182. data/spec/models/icu_skeleton_parameters_spec.rb +6 -0
  183. data/spec/models/invitation_spec.rb +1 -1
  184. data/spec/models/job_details_spec.rb +18 -0
  185. data/spec/models/job_spec.rb +12 -0
  186. data/spec/models/job_template_details_spec.rb +6 -0
  187. data/spec/models/job_template_spec.rb +6 -0
  188. data/spec/models/key_create_parameters_spec.rb +12 -0
  189. data/spec/models/key_update_parameters_spec.rb +12 -0
  190. data/spec/models/locale_download_create_parameters_spec.rb +6 -0
  191. data/spec/models/organization_job_template_details_spec.rb +12 -0
  192. data/spec/models/organization_job_template_spec.rb +12 -0
  193. data/spec/models/project_create_parameters_spec.rb +52 -0
  194. data/spec/models/project_details_spec.rb +18 -0
  195. data/spec/models/project_update_parameters_spec.rb +42 -0
  196. data/spec/models/release_spec.rb +6 -0
  197. data/spec/models/repo_sync_spec.rb +6 -0
  198. data/spec/models/screenshot_marker_presentation_spec.rb +47 -0
  199. data/spec/models/search_in_account_parameters_spec.rb +6 -0
  200. data/spec/models/styleguide_create_parameters_spec.rb +12 -0
  201. data/spec/models/styleguide_update_parameters_spec.rb +12 -0
  202. data/spec/models/tag_spec.rb +6 -0
  203. data/spec/models/tag_with_stats_spec.rb +6 -0
  204. data/spec/models/translation_create_parameters_spec.rb +12 -0
  205. data/spec/models/translation_order_spec.rb +1 -1
  206. data/spec/models/translation_update_parameters_spec.rb +6 -0
  207. data/spec/models/upload_batch_spec.rb +8 -2
  208. metadata +262 -254
  209. data/docs/CustomMetadataPropertyCreate422Response.md +0 -19
@@ -8,13 +8,13 @@ module Phrase
8
8
  # Audience description
9
9
  attr_accessor :audience
10
10
 
11
- # Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.
11
+ # Target audience for the translations.
12
12
  attr_accessor :target_audience
13
13
 
14
- # Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.
14
+ # Preferred grammatical person.
15
15
  attr_accessor :grammatical_person
16
16
 
17
- # Can be one of: not_specified, popular, technical, fictional.
17
+ # Vocabulary register the translations should use.
18
18
  attr_accessor :vocabulary_type
19
19
 
20
20
  # Description of the business
@@ -41,6 +41,28 @@ module Phrase
41
41
  # Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.
42
42
  attr_accessor :samples
43
43
 
44
+ class EnumAttributeValidator
45
+ attr_reader :datatype
46
+ attr_reader :allowable_values
47
+
48
+ def initialize(datatype, allowable_values)
49
+ @allowable_values = allowable_values.map do |value|
50
+ case datatype.to_s
51
+ when /Integer/i
52
+ value.to_i
53
+ when /Float/i
54
+ value.to_f
55
+ else
56
+ value
57
+ end
58
+ end
59
+ end
60
+
61
+ def valid?(value)
62
+ !value || allowable_values.include?(value)
63
+ end
64
+ end
65
+
44
66
  # Attribute mapping from ruby-style variable name to JSON key.
45
67
  def self.attribute_map
46
68
  {
@@ -163,9 +185,45 @@ module Phrase
163
185
  # Check to see if the all the properties in the model are valid
164
186
  # @return true if the model is valid
165
187
  def valid?
188
+ target_audience_validator = EnumAttributeValidator.new('String', ["not_specified", "children", "teenager", "young_adults", "adults", "old_adults"])
189
+ return false unless target_audience_validator.valid?(@target_audience)
190
+ grammatical_person_validator = EnumAttributeValidator.new('String', ["not_specified", "first_person_singular", "second_person_singular", "third_person_singular_masculine", "third_person_singular_feminine", "third_person_singular_neuter", "first_person_plural", "second_person_plural", "third_person_plural"])
191
+ return false unless grammatical_person_validator.valid?(@grammatical_person)
192
+ vocabulary_type_validator = EnumAttributeValidator.new('String', ["not_specified", "popular", "technical", "fictional"])
193
+ return false unless vocabulary_type_validator.valid?(@vocabulary_type)
166
194
  true
167
195
  end
168
196
 
197
+ # Custom attribute writer method checking allowed values (enum).
198
+ # @param [Object] target_audience Object to be assigned
199
+ def target_audience=(target_audience)
200
+ validator = EnumAttributeValidator.new('String', ["not_specified", "children", "teenager", "young_adults", "adults", "old_adults"])
201
+ unless validator.valid?(target_audience)
202
+ fail ArgumentError, "invalid value for \"target_audience\", must be one of #{validator.allowable_values}."
203
+ end
204
+ @target_audience = target_audience
205
+ end
206
+
207
+ # Custom attribute writer method checking allowed values (enum).
208
+ # @param [Object] grammatical_person Object to be assigned
209
+ def grammatical_person=(grammatical_person)
210
+ validator = EnumAttributeValidator.new('String', ["not_specified", "first_person_singular", "second_person_singular", "third_person_singular_masculine", "third_person_singular_feminine", "third_person_singular_neuter", "first_person_plural", "second_person_plural", "third_person_plural"])
211
+ unless validator.valid?(grammatical_person)
212
+ fail ArgumentError, "invalid value for \"grammatical_person\", must be one of #{validator.allowable_values}."
213
+ end
214
+ @grammatical_person = grammatical_person
215
+ end
216
+
217
+ # Custom attribute writer method checking allowed values (enum).
218
+ # @param [Object] vocabulary_type Object to be assigned
219
+ def vocabulary_type=(vocabulary_type)
220
+ validator = EnumAttributeValidator.new('String', ["not_specified", "popular", "technical", "fictional"])
221
+ unless validator.valid?(vocabulary_type)
222
+ fail ArgumentError, "invalid value for \"vocabulary_type\", must be one of #{validator.allowable_values}."
223
+ end
224
+ @vocabulary_type = vocabulary_type
225
+ end
226
+
169
227
  # Checks equality by comparing each attribute.
170
228
  # @param [Object] Object to be compared
171
229
  def ==(o)
@@ -6,6 +6,9 @@ module Phrase
6
6
 
7
7
  attr_accessor :keys_count
8
8
 
9
+ # `true` when the tag was created automatically by the system (e.g. for jobs, uploads, or Figma attachments) rather than by a user.
10
+ attr_accessor :system_tag
11
+
9
12
  attr_accessor :created_at
10
13
 
11
14
  attr_accessor :updated_at
@@ -15,6 +18,7 @@ module Phrase
15
18
  {
16
19
  :'name' => :'name',
17
20
  :'keys_count' => :'keys_count',
21
+ :'system_tag' => :'system_tag',
18
22
  :'created_at' => :'created_at',
19
23
  :'updated_at' => :'updated_at'
20
24
  }
@@ -25,6 +29,7 @@ module Phrase
25
29
  {
26
30
  :'name' => :'String',
27
31
  :'keys_count' => :'Integer',
32
+ :'system_tag' => :'Boolean',
28
33
  :'created_at' => :'DateTime',
29
34
  :'updated_at' => :'DateTime'
30
35
  }
@@ -59,6 +64,10 @@ module Phrase
59
64
  self.keys_count = attributes[:'keys_count']
60
65
  end
61
66
 
67
+ if attributes.key?(:'system_tag')
68
+ self.system_tag = attributes[:'system_tag']
69
+ end
70
+
62
71
  if attributes.key?(:'created_at')
63
72
  self.created_at = attributes[:'created_at']
64
73
  end
@@ -88,6 +97,7 @@ module Phrase
88
97
  self.class == o.class &&
89
98
  name == o.name &&
90
99
  keys_count == o.keys_count &&
100
+ system_tag == o.system_tag &&
91
101
  created_at == o.created_at &&
92
102
  updated_at == o.updated_at
93
103
  end
@@ -101,7 +111,7 @@ module Phrase
101
111
  # Calculates hash code according to all attributes.
102
112
  # @return [Integer] Hash code
103
113
  def hash
104
- [name, keys_count, created_at, updated_at].hash
114
+ [name, keys_count, system_tag, created_at, updated_at].hash
105
115
  end
106
116
 
107
117
  # Builds the object from hash
@@ -6,6 +6,9 @@ module Phrase
6
6
 
7
7
  attr_accessor :keys_count
8
8
 
9
+ # `true` when the tag was created automatically by the system (e.g. for jobs, uploads, or Figma attachments) rather than by a user.
10
+ attr_accessor :system_tag
11
+
9
12
  attr_accessor :created_at
10
13
 
11
14
  attr_accessor :updated_at
@@ -17,6 +20,7 @@ module Phrase
17
20
  {
18
21
  :'name' => :'name',
19
22
  :'keys_count' => :'keys_count',
23
+ :'system_tag' => :'system_tag',
20
24
  :'created_at' => :'created_at',
21
25
  :'updated_at' => :'updated_at',
22
26
  :'statistics' => :'statistics'
@@ -28,6 +32,7 @@ module Phrase
28
32
  {
29
33
  :'name' => :'String',
30
34
  :'keys_count' => :'Integer',
35
+ :'system_tag' => :'Boolean',
31
36
  :'created_at' => :'DateTime',
32
37
  :'updated_at' => :'DateTime',
33
38
  :'statistics' => :'Array<TagWithStats1Statistics1>'
@@ -70,6 +75,10 @@ module Phrase
70
75
  self.keys_count = attributes[:'keys_count']
71
76
  end
72
77
 
78
+ if attributes.key?(:'system_tag')
79
+ self.system_tag = attributes[:'system_tag']
80
+ end
81
+
73
82
  if attributes.key?(:'created_at')
74
83
  self.created_at = attributes[:'created_at']
75
84
  end
@@ -105,6 +114,7 @@ module Phrase
105
114
  self.class == o.class &&
106
115
  name == o.name &&
107
116
  keys_count == o.keys_count &&
117
+ system_tag == o.system_tag &&
108
118
  created_at == o.created_at &&
109
119
  updated_at == o.updated_at &&
110
120
  statistics == o.statistics
@@ -119,7 +129,7 @@ module Phrase
119
129
  # Calculates hash code according to all attributes.
120
130
  # @return [Integer] Hash code
121
131
  def hash
122
- [name, keys_count, created_at, updated_at, statistics].hash
132
+ [name, keys_count, system_tag, created_at, updated_at, statistics].hash
123
133
  end
124
134
 
125
135
  # Builds the object from hash
@@ -26,6 +26,12 @@ module Phrase
26
26
  # Indicates whether the translation should be auto-translated. Responses with status 422 if provided for translation within a non-default locale or the project does not have the Autopilot feature enabled.
27
27
  attr_accessor :autotranslate
28
28
 
29
+ # When `true`, the translation is marked as a minor edit and does not trigger downstream re-verification on the linked locales' translations.
30
+ attr_accessor :minor_change
31
+
32
+ # When `true` and the project's review workflow is enabled, the translation is created in the `reviewed` state.
33
+ attr_accessor :reviewed
34
+
29
35
  # Attribute mapping from ruby-style variable name to JSON key.
30
36
  def self.attribute_map
31
37
  {
@@ -36,7 +42,9 @@ module Phrase
36
42
  :'plural_suffix' => :'plural_suffix',
37
43
  :'unverified' => :'unverified',
38
44
  :'excluded' => :'excluded',
39
- :'autotranslate' => :'autotranslate'
45
+ :'autotranslate' => :'autotranslate',
46
+ :'minor_change' => :'minor_change',
47
+ :'reviewed' => :'reviewed'
40
48
  }
41
49
  end
42
50
 
@@ -50,7 +58,9 @@ module Phrase
50
58
  :'plural_suffix' => :'String',
51
59
  :'unverified' => :'Boolean',
52
60
  :'excluded' => :'Boolean',
53
- :'autotranslate' => :'Boolean'
61
+ :'autotranslate' => :'Boolean',
62
+ :'minor_change' => :'Boolean',
63
+ :'reviewed' => :'Boolean'
54
64
  }
55
65
  end
56
66
 
@@ -106,6 +116,14 @@ module Phrase
106
116
  if attributes.key?(:'autotranslate')
107
117
  self.autotranslate = attributes[:'autotranslate']
108
118
  end
119
+
120
+ if attributes.key?(:'minor_change')
121
+ self.minor_change = attributes[:'minor_change']
122
+ end
123
+
124
+ if attributes.key?(:'reviewed')
125
+ self.reviewed = attributes[:'reviewed']
126
+ end
109
127
  end
110
128
 
111
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,7 +151,9 @@ module Phrase
133
151
  plural_suffix == o.plural_suffix &&
134
152
  unverified == o.unverified &&
135
153
  excluded == o.excluded &&
136
- autotranslate == o.autotranslate
154
+ autotranslate == o.autotranslate &&
155
+ minor_change == o.minor_change &&
156
+ reviewed == o.reviewed
137
157
  end
138
158
 
139
159
  # @see the `==` method
@@ -145,7 +165,7 @@ module Phrase
145
165
  # Calculates hash code according to all attributes.
146
166
  # @return [Integer] Hash code
147
167
  def hash
148
- [branch, locale_id, key_id, content, plural_suffix, unverified, excluded, autotranslate].hash
168
+ [branch, locale_id, key_id, content, plural_suffix, unverified, excluded, autotranslate, minor_change, reviewed].hash
149
169
  end
150
170
 
151
171
  # Builds the object from hash
@@ -24,7 +24,8 @@ module Phrase
24
24
 
25
25
  attr_accessor :target_locales
26
26
 
27
- attr_accessor :tag
27
+ # Name of the tag whose keys are included in the order.
28
+ attr_accessor :tag_name
28
29
 
29
30
  attr_accessor :styleguide
30
31
 
@@ -52,7 +53,7 @@ module Phrase
52
53
  :'progress_percent' => :'progress_percent',
53
54
  :'source_locale' => :'source_locale',
54
55
  :'target_locales' => :'target_locales',
55
- :'tag' => :'tag',
56
+ :'tag_name' => :'tag_name',
56
57
  :'styleguide' => :'styleguide',
57
58
  :'unverify_translations_upon_delivery' => :'unverify_translations_upon_delivery',
58
59
  :'quality' => :'quality',
@@ -76,7 +77,7 @@ module Phrase
76
77
  :'progress_percent' => :'Integer',
77
78
  :'source_locale' => :'LocalePreview',
78
79
  :'target_locales' => :'Array<LocalePreview>',
79
- :'tag' => :'String',
80
+ :'tag_name' => :'String',
80
81
  :'styleguide' => :'StyleguidePreview',
81
82
  :'unverify_translations_upon_delivery' => :'Boolean',
82
83
  :'quality' => :'Boolean',
@@ -153,8 +154,8 @@ module Phrase
153
154
  end
154
155
  end
155
156
 
156
- if attributes.key?(:'tag')
157
- self.tag = attributes[:'tag']
157
+ if attributes.key?(:'tag_name')
158
+ self.tag_name = attributes[:'tag_name']
158
159
  end
159
160
 
160
161
  if attributes.key?(:'styleguide')
@@ -211,7 +212,7 @@ module Phrase
211
212
  progress_percent == o.progress_percent &&
212
213
  source_locale == o.source_locale &&
213
214
  target_locales == o.target_locales &&
214
- tag == o.tag &&
215
+ tag_name == o.tag_name &&
215
216
  styleguide == o.styleguide &&
216
217
  unverify_translations_upon_delivery == o.unverify_translations_upon_delivery &&
217
218
  quality == o.quality &&
@@ -229,7 +230,7 @@ module Phrase
229
230
  # Calculates hash code according to all attributes.
230
231
  # @return [Integer] Hash code
231
232
  def hash
232
- [id, name, lsp, amount_in_cents, currency, message, state, translation_type, progress_percent, source_locale, target_locales, tag, styleguide, unverify_translations_upon_delivery, quality, priority, created_at, updated_at].hash
233
+ [id, name, lsp, amount_in_cents, currency, message, state, translation_type, progress_percent, source_locale, target_locales, tag_name, styleguide, unverify_translations_upon_delivery, quality, priority, created_at, updated_at].hash
233
234
  end
234
235
 
235
236
  # Builds the object from hash
@@ -23,6 +23,9 @@ module Phrase
23
23
  # When set to `true`, the translation will be marked as reviewed.
24
24
  attr_accessor :reviewed
25
25
 
26
+ # When `true`, the update is treated as a minor edit and does not trigger downstream re-verification on the linked locales' translations.
27
+ attr_accessor :minor_change
28
+
26
29
  # Attribute mapping from ruby-style variable name to JSON key.
27
30
  def self.attribute_map
28
31
  {
@@ -32,7 +35,8 @@ module Phrase
32
35
  :'unverified' => :'unverified',
33
36
  :'excluded' => :'excluded',
34
37
  :'autotranslate' => :'autotranslate',
35
- :'reviewed' => :'reviewed'
38
+ :'reviewed' => :'reviewed',
39
+ :'minor_change' => :'minor_change'
36
40
  }
37
41
  end
38
42
 
@@ -45,7 +49,8 @@ module Phrase
45
49
  :'unverified' => :'Boolean',
46
50
  :'excluded' => :'Boolean',
47
51
  :'autotranslate' => :'Boolean',
48
- :'reviewed' => :'Boolean'
52
+ :'reviewed' => :'Boolean',
53
+ :'minor_change' => :'Boolean'
49
54
  }
50
55
  end
51
56
 
@@ -97,6 +102,10 @@ module Phrase
97
102
  if attributes.key?(:'reviewed')
98
103
  self.reviewed = attributes[:'reviewed']
99
104
  end
105
+
106
+ if attributes.key?(:'minor_change')
107
+ self.minor_change = attributes[:'minor_change']
108
+ end
100
109
  end
101
110
 
102
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -123,7 +132,8 @@ module Phrase
123
132
  unverified == o.unverified &&
124
133
  excluded == o.excluded &&
125
134
  autotranslate == o.autotranslate &&
126
- reviewed == o.reviewed
135
+ reviewed == o.reviewed &&
136
+ minor_change == o.minor_change
127
137
  end
128
138
 
129
139
  # @see the `==` method
@@ -135,7 +145,7 @@ module Phrase
135
145
  # Calculates hash code according to all attributes.
136
146
  # @return [Integer] Hash code
137
147
  def hash
138
- [branch, content, plural_suffix, unverified, excluded, autotranslate, reviewed].hash
148
+ [branch, content, plural_suffix, unverified, excluded, autotranslate, reviewed, minor_change].hash
139
149
  end
140
150
 
141
151
  # Builds the object from hash
@@ -3,11 +3,14 @@ require 'date'
3
3
  module Phrase
4
4
  class UploadBatch
5
5
  # Processing state of the upload batch
6
- attr_accessor :state
6
+ attr_accessor :status
7
7
 
8
8
  # Indicates whether unmentioned keys will be deleted after processing all uploads in the batch
9
9
  attr_accessor :delete_unmentioned_keys
10
10
 
11
+ # Number of uploads attached to this batch.
12
+ attr_accessor :uploads_count
13
+
11
14
  attr_accessor :created_at
12
15
 
13
16
  attr_accessor :updated_at
@@ -43,8 +46,9 @@ module Phrase
43
46
  # Attribute mapping from ruby-style variable name to JSON key.
44
47
  def self.attribute_map
45
48
  {
46
- :'state' => :'state',
49
+ :'status' => :'status',
47
50
  :'delete_unmentioned_keys' => :'delete_unmentioned_keys',
51
+ :'uploads_count' => :'uploads_count',
48
52
  :'created_at' => :'created_at',
49
53
  :'updated_at' => :'updated_at',
50
54
  :'project' => :'project',
@@ -56,8 +60,9 @@ module Phrase
56
60
  # Attribute type mapping.
57
61
  def self.openapi_types
58
62
  {
59
- :'state' => :'String',
63
+ :'status' => :'String',
60
64
  :'delete_unmentioned_keys' => :'Boolean',
65
+ :'uploads_count' => :'Integer',
61
66
  :'created_at' => :'DateTime',
62
67
  :'updated_at' => :'DateTime',
63
68
  :'project' => :'ProjectShort',
@@ -87,14 +92,18 @@ module Phrase
87
92
  h[k.to_sym] = v
88
93
  }
89
94
 
90
- if attributes.key?(:'state')
91
- self.state = attributes[:'state']
95
+ if attributes.key?(:'status')
96
+ self.status = attributes[:'status']
92
97
  end
93
98
 
94
99
  if attributes.key?(:'delete_unmentioned_keys')
95
100
  self.delete_unmentioned_keys = attributes[:'delete_unmentioned_keys']
96
101
  end
97
102
 
103
+ if attributes.key?(:'uploads_count')
104
+ self.uploads_count = attributes[:'uploads_count']
105
+ end
106
+
98
107
  if attributes.key?(:'created_at')
99
108
  self.created_at = attributes[:'created_at']
100
109
  end
@@ -128,19 +137,19 @@ module Phrase
128
137
  # Check to see if the all the properties in the model are valid
129
138
  # @return true if the model is valid
130
139
  def valid?
131
- state_validator = EnumAttributeValidator.new('String', ["started", "done"])
132
- return false unless state_validator.valid?(@state)
140
+ status_validator = EnumAttributeValidator.new('String', ["started", "done"])
141
+ return false unless status_validator.valid?(@status)
133
142
  true
134
143
  end
135
144
 
136
145
  # Custom attribute writer method checking allowed values (enum).
137
- # @param [Object] state Object to be assigned
138
- def state=(state)
146
+ # @param [Object] status Object to be assigned
147
+ def status=(status)
139
148
  validator = EnumAttributeValidator.new('String', ["started", "done"])
140
- unless validator.valid?(state)
141
- fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
149
+ unless validator.valid?(status)
150
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
142
151
  end
143
- @state = state
152
+ @status = status
144
153
  end
145
154
 
146
155
  # Checks equality by comparing each attribute.
@@ -148,8 +157,9 @@ module Phrase
148
157
  def ==(o)
149
158
  return true if self.equal?(o)
150
159
  self.class == o.class &&
151
- state == o.state &&
160
+ status == o.status &&
152
161
  delete_unmentioned_keys == o.delete_unmentioned_keys &&
162
+ uploads_count == o.uploads_count &&
153
163
  created_at == o.created_at &&
154
164
  updated_at == o.updated_at &&
155
165
  project == o.project &&
@@ -166,7 +176,7 @@ module Phrase
166
176
  # Calculates hash code according to all attributes.
167
177
  # @return [Integer] Hash code
168
178
  def hash
169
- [state, delete_unmentioned_keys, created_at, updated_at, project, user, uploads].hash
179
+ [status, delete_unmentioned_keys, uploads_count, created_at, updated_at, project, user, uploads].hash
170
180
  end
171
181
 
172
182
  # Builds the object from hash
@@ -8,7 +8,7 @@ module Phrase
8
8
 
9
9
  attr_accessor :translation_keys_updated
10
10
 
11
- # The number of translation keys in the project that were not mentioned in the upload. Note: this field is not calculated (and shows 0) if the upload contains more than 10,000 keys.
11
+ # The number of translation keys in the project that were not mentioned in the upload. Note: this field is not calculated (and shows 0) if the upload contains more than 100,000 keys.
12
12
  attr_accessor :translation_keys_unmentioned
13
13
 
14
14
  attr_accessor :translations_created
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.22.0'
2
+ VERSION = '4.24.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -41,13 +41,13 @@ require 'phrase/models/custom_metadata_data_type'
41
41
  require 'phrase/models/custom_metadata_properties_create_parameters'
42
42
  require 'phrase/models/custom_metadata_properties_update_parameters'
43
43
  require 'phrase/models/custom_metadata_property'
44
- require 'phrase/models/custom_metadata_property_create422_response'
45
- require 'phrase/models/custom_metadata_property_create422_response_errors_inner'
46
44
  require 'phrase/models/distribution'
47
45
  require 'phrase/models/distribution_create_parameters'
48
- require 'phrase/models/distribution_preview'
46
+ require 'phrase/models/distribution_details'
49
47
  require 'phrase/models/distribution_update_parameters'
50
48
  require 'phrase/models/document'
49
+ require 'phrase/models/document_delete422_response'
50
+ require 'phrase/models/document_delete422_response_errors_inner'
51
51
  require 'phrase/models/error'
52
52
  require 'phrase/models/error_error'
53
53
  require 'phrase/models/figma_attachment'
@@ -58,6 +58,7 @@ require 'phrase/models/glossary'
58
58
  require 'phrase/models/glossary_create_parameters'
59
59
  require 'phrase/models/glossary_term'
60
60
  require 'phrase/models/glossary_term_create_parameters'
61
+ require 'phrase/models/glossary_term_glossary'
61
62
  require 'phrase/models/glossary_term_translation'
62
63
  require 'phrase/models/glossary_term_translation_create_parameters'
63
64
  require 'phrase/models/glossary_term_translation_update_parameters'
@@ -170,6 +171,7 @@ require 'phrase/models/repo_sync_import_parameters'
170
171
  require 'phrase/models/screenshot'
171
172
  require 'phrase/models/screenshot_marker'
172
173
  require 'phrase/models/screenshot_marker_create_parameters'
174
+ require 'phrase/models/screenshot_marker_presentation'
173
175
  require 'phrase/models/screenshot_marker_update_parameters'
174
176
  require 'phrase/models/screenshot_update_parameters'
175
177
  require 'phrase/models/search_in_account_parameters'
@@ -51,7 +51,7 @@ describe 'BranchesApi' do
51
51
 
52
52
  # unit tests for branch_create
53
53
  # Create a branch
54
- # Create a new branch. *Note: Creating a new branch may take several minutes depending on the project size.*
54
+ # Create a new branch. Branch project provisioning runs asynchronously, so the newly created branch is returned in a transitional state (typically &#x60;creating_branch&#x60;) and only reaches &#x60;success&#x60; once the underlying project has been set up. Poll the branch resource until its &#x60;state&#x60; becomes &#x60;success&#x60; before performing further operations on it. Requires the Branching feature to be enabled on the account. *Note: Creating a new branch may take several minutes depending on the project size.*
55
55
  # @param project_id Project ID
56
56
  # @param branch_create_parameters
57
57
  # @param [Hash] opts the optional parameters
@@ -65,7 +65,7 @@ describe 'BranchesApi' do
65
65
 
66
66
  # unit tests for branch_delete
67
67
  # Delete a branch
68
- # Delete an existing branch.
68
+ # Delete an existing branch. A branch cannot be deleted while it still has open jobs or open translation orders attached to its branch project — in that case the request is rejected with &#x60;409 Conflict&#x60;. A branch whose current &#x60;state&#x60; does not allow deletion (for example, while a merge or sync is in progress) is rejected with &#x60;422 Unprocessable Entity&#x60;. Requires the Branching feature to be enabled on the account.
69
69
  # @param project_id Project ID
70
70
  # @param name name
71
71
  # @param [Hash] opts the optional parameters
@@ -79,7 +79,7 @@ describe 'BranchesApi' do
79
79
 
80
80
  # unit tests for branch_merge
81
81
  # Merge a branch
82
- # Merge an existing branch. *Note: Merging a branch may take several minutes depending on diff size.*
82
+ # Merge an existing branch back into its base branch. The merge runs asynchronously. The branch transitions to &#x60;merging_branch&#x60; and settles in &#x60;merged&#x60;, &#x60;merge_error&#x60;, or &#x60;merge_conflict&#x60; once the background job completes; the response body for this request is empty. Poll the branch resource to observe the final state. A branch cannot be merged while it still has open jobs or open translation orders attached to its branch project — in that case the request is rejected with &#x60;409 Conflict&#x60;. A branch whose current &#x60;state&#x60; does not allow a merge is rejected with &#x60;422 Unprocessable Entity&#x60;. Requires the Branching feature to be enabled on the account. *Note: Merging a branch may take several minutes depending on diff size.*
83
83
  # @param project_id Project ID
84
84
  # @param name name
85
85
  # @param branch_merge_parameters
@@ -94,7 +94,7 @@ describe 'BranchesApi' do
94
94
 
95
95
  # unit tests for branch_show
96
96
  # Get a single branch
97
- # Get details on a single branch for a given project.
97
+ # Get details on a single branch for a given project. Requires the Branching feature to be enabled on the account.
98
98
  # @param project_id Project ID
99
99
  # @param name name
100
100
  # @param [Hash] opts the optional parameters
@@ -108,7 +108,7 @@ describe 'BranchesApi' do
108
108
 
109
109
  # unit tests for branch_sync
110
110
  # Sync a branch
111
- # Sync an existing branch. *Note: Only available for branches created with new branching.*
111
+ # Pull changes from the base branch into this branch, applying the chosen conflict-resolution strategy. The sync runs asynchronously. The branch transitions to &#x60;syncing_branch&#x60; and settles back into &#x60;success&#x60; (or &#x60;merge_conflict&#x60; / &#x60;branch_error&#x60;) once the background job completes; the response body for this request is empty. Poll the branch resource to observe the final state. Only branches created with the newer branching system can be synced. Requests against branches from the older system, or against branches whose current state does not allow a sync, are rejected with &#x60;422 Unprocessable Entity&#x60; and an empty body. Requires the Branching feature to be enabled on the account.
112
112
  # @param project_id Project ID
113
113
  # @param name name
114
114
  # @param branch_sync_parameters
@@ -123,7 +123,7 @@ describe 'BranchesApi' do
123
123
 
124
124
  # unit tests for branch_update
125
125
  # Update a branch
126
- # Update an existing branch.
126
+ # Update an existing branch. Only the branch name can be changed. Requires the Branching feature to be enabled on the account.
127
127
  # @param project_id Project ID
128
128
  # @param name name
129
129
  # @param branch_update_parameters
@@ -138,7 +138,7 @@ describe 'BranchesApi' do
138
138
 
139
139
  # unit tests for branches_list
140
140
  # List branches
141
- # List all branches the of the current project.
141
+ # List all branches of the current project. Requires the Branching feature to be enabled on the account.
142
142
  # @param project_id Project ID
143
143
  # @param [Hash] opts the optional parameters
144
144
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -143,8 +143,8 @@ describe 'CommentsApi' do
143
143
  # @option opts [String] :branch specify the branch to use
144
144
  # @option opts [String] :query Search query for comment messages
145
145
  # @option opts [Array<String>] :locale_ids Search comments by their assigned locales
146
- # @option opts [Array<String>] :filters Specify the filter for the comments
147
- # @option opts [String] :order Order direction. Can be one of: asc, desc.
146
+ # @option opts [Array<String>] :filters Specify the filter for the comments. Supported values are &#x60;read&#x60; and &#x60;unread&#x60;. Combine both to return all comments (read + unread) without filtering.
147
+ # @option opts [String] :order Order direction. Defaults to &#x60;desc&#x60;. Values other than &#x60;asc&#x60; and &#x60;desc&#x60; fall back to &#x60;desc&#x60;.
148
148
  # @return [Array<Comment>]
149
149
  describe 'comments_list test' do
150
150
  it 'should work' do
@@ -27,7 +27,7 @@ describe 'DistributionsApi' do
27
27
  # @param distribution_create_parameters
28
28
  # @param [Hash] opts the optional parameters
29
29
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
- # @return [Distribution]
30
+ # @return [DistributionDetails]
31
31
  describe 'distribution_create test' do
32
32
  it 'should work' do
33
33
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -55,7 +55,7 @@ describe 'DistributionsApi' do
55
55
  # @param id ID
56
56
  # @param [Hash] opts the optional parameters
57
57
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
58
- # @return [Distribution]
58
+ # @return [DistributionDetails]
59
59
  describe 'distribution_show test' do
60
60
  it 'should work' do
61
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -70,7 +70,7 @@ describe 'DistributionsApi' do
70
70
  # @param distribution_update_parameters
71
71
  # @param [Hash] opts the optional parameters
72
72
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
73
- # @return [Distribution]
73
+ # @return [DistributionDetails]
74
74
  describe 'distribution_update test' do
75
75
  it 'should work' do
76
76
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -85,7 +85,7 @@ describe 'DistributionsApi' do
85
85
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
86
86
  # @option opts [Integer] :page Page number
87
87
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
88
- # @return [Array<DistributionPreview>]
88
+ # @return [Array<Distribution>]
89
89
  describe 'distributions_list test' do
90
90
  it 'should work' do
91
91
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -42,6 +42,7 @@ describe 'DocumentsApi' do
42
42
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
43
  # @option opts [Integer] :page Page number
44
44
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
45
+ # @option opts [String] :q Search query. Filters documents by name (case-insensitive substring match).
45
46
  # @return [Array<Document>]
46
47
  describe 'documents_list test' do
47
48
  it 'should work' do