phrase 4.32.0 → 4.34.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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile +1 -1
  4. data/README.md +6 -3
  5. data/docs/JobCreateParameters.md +4 -2
  6. data/docs/JobDetails.md +3 -1
  7. data/docs/JobTemplateCreateParameters.md +2 -0
  8. data/docs/JobTemplateDetails.md +3 -1
  9. data/docs/JobTemplateUpdateParameters.md +2 -0
  10. data/docs/JobUpdateParameters.md +3 -1
  11. data/docs/KeysApi.md +6 -2
  12. data/docs/OrganizationJobTemplateCreateParameters.md +2 -0
  13. data/docs/OrganizationJobTemplateDetails.md +3 -1
  14. data/docs/OrganizationJobTemplateUpdateParameters.md +2 -0
  15. data/docs/RepoSyncEvent.md +3 -1
  16. data/docs/RepoSyncEventUploadsInner.md +19 -0
  17. data/docs/TranslationKey.md +3 -1
  18. data/docs/TranslationKeyDetails.md +2 -0
  19. data/docs/TranslationKeyLinkedKey.md +21 -0
  20. data/docs/TranslationKeyLinkedKeyParent.md +19 -0
  21. data/docs/TranslationsApi.md +7 -7
  22. data/docs/TranslationsExcludeParameters.md +2 -2
  23. data/docs/TranslationsIncludeParameters.md +2 -2
  24. data/docs/TranslationsReviewParameters.md +2 -2
  25. data/docs/TranslationsSearchParameters.md +2 -2
  26. data/docs/TranslationsUnreviewParameters.md +2 -2
  27. data/docs/TranslationsUnverifyParameters.md +2 -2
  28. data/docs/TranslationsVerifyParameters.md +2 -2
  29. data/lib/phrase/api/keys_api.rb +6 -0
  30. data/lib/phrase/api/translations_api.rb +8 -8
  31. data/lib/phrase/models/job_create_parameters.rb +15 -5
  32. data/lib/phrase/models/job_details.rb +14 -4
  33. data/lib/phrase/models/job_template_create_parameters.rb +11 -1
  34. data/lib/phrase/models/job_template_details.rb +14 -4
  35. data/lib/phrase/models/job_template_update_parameters.rb +11 -1
  36. data/lib/phrase/models/job_update_parameters.rb +14 -4
  37. data/lib/phrase/models/organization_job_template_create_parameters.rb +11 -1
  38. data/lib/phrase/models/organization_job_template_details.rb +14 -4
  39. data/lib/phrase/models/organization_job_template_update_parameters.rb +11 -1
  40. data/lib/phrase/models/repo_sync_event.rb +17 -4
  41. data/lib/phrase/models/repo_sync_event_uploads_inner.rb +241 -0
  42. data/lib/phrase/models/translation_key.rb +14 -4
  43. data/lib/phrase/models/translation_key_details.rb +11 -1
  44. data/lib/phrase/models/translation_key_linked_key.rb +253 -0
  45. data/lib/phrase/models/translation_key_linked_key_parent.rb +208 -0
  46. data/lib/phrase/models/translations_exclude_parameters.rb +1 -1
  47. data/lib/phrase/models/translations_include_parameters.rb +1 -1
  48. data/lib/phrase/models/translations_review_parameters.rb +1 -1
  49. data/lib/phrase/models/translations_search_parameters.rb +1 -1
  50. data/lib/phrase/models/translations_unreview_parameters.rb +1 -1
  51. data/lib/phrase/models/translations_unverify_parameters.rb +1 -1
  52. data/lib/phrase/models/translations_verify_parameters.rb +1 -1
  53. data/lib/phrase/version.rb +1 -1
  54. data/lib/phrase.rb +3 -0
  55. data/spec/api/keys_api_spec.rb +2 -0
  56. data/spec/api/translations_api_spec.rb +4 -4
  57. data/spec/models/job_create_parameters_spec.rb +6 -0
  58. data/spec/models/job_details_spec.rb +6 -0
  59. data/spec/models/job_template_create_parameters_spec.rb +6 -0
  60. data/spec/models/job_template_details_spec.rb +6 -0
  61. data/spec/models/job_template_update_parameters_spec.rb +6 -0
  62. data/spec/models/job_update_parameters_spec.rb +6 -0
  63. data/spec/models/organization_job_template_create_parameters_spec.rb +6 -0
  64. data/spec/models/organization_job_template_details_spec.rb +6 -0
  65. data/spec/models/organization_job_template_update_parameters_spec.rb +6 -0
  66. data/spec/models/repo_sync_event_spec.rb +6 -0
  67. data/spec/models/repo_sync_event_uploads_inner_spec.rb +39 -0
  68. data/spec/models/translation_key_details_spec.rb +6 -0
  69. data/spec/models/translation_key_linked_key_parent_spec.rb +35 -0
  70. data/spec/models/translation_key_linked_key_spec.rb +45 -0
  71. data/spec/models/translation_key_spec.rb +6 -0
  72. metadata +280 -268
@@ -0,0 +1,253 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ # Describes a key's role in a parent–child link relationship.
5
+ class TranslationKeyLinkedKey
6
+ # Whether this key is the parent or the child in the link relationship.
7
+ attr_accessor :role
8
+
9
+ attr_accessor :parent
10
+
11
+ # The number of linked child keys. Set for parent keys.
12
+ attr_accessor :children_count
13
+
14
+ class EnumAttributeValidator
15
+ attr_reader :datatype
16
+ attr_reader :allowable_values
17
+
18
+ def initialize(datatype, allowable_values)
19
+ @allowable_values = allowable_values.map do |value|
20
+ case datatype.to_s
21
+ when /Integer/i
22
+ value.to_i
23
+ when /Float/i
24
+ value.to_f
25
+ else
26
+ value
27
+ end
28
+ end
29
+ end
30
+
31
+ def valid?(value)
32
+ !value || allowable_values.include?(value)
33
+ end
34
+ end
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'role' => :'role',
40
+ :'parent' => :'parent',
41
+ :'children_count' => :'children_count'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'role' => :'String',
49
+ :'parent' => :'TranslationKeyLinkedKeyParent',
50
+ :'children_count' => :'Integer'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'parent',
58
+ :'children_count'
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::TranslationKeyLinkedKey` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::TranslationKeyLinkedKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'role')
78
+ self.role = attributes[:'role']
79
+ end
80
+
81
+ if attributes.key?(:'parent')
82
+ self.parent = attributes[:'parent']
83
+ end
84
+
85
+ if attributes.key?(:'children_count')
86
+ self.children_count = attributes[:'children_count']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ role_validator = EnumAttributeValidator.new('String', ["parent", "child"])
101
+ return false unless role_validator.valid?(@role)
102
+ true
103
+ end
104
+
105
+ # Custom attribute writer method checking allowed values (enum).
106
+ # @param [Object] role Object to be assigned
107
+ def role=(role)
108
+ validator = EnumAttributeValidator.new('String', ["parent", "child"])
109
+ unless validator.valid?(role)
110
+ fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
111
+ end
112
+ @role = role
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ role == o.role &&
121
+ parent == o.parent &&
122
+ children_count == o.children_count
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [role, parent, children_count].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ new.build_from_hash(attributes)
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ self.class.openapi_types.each_pair do |key, type|
150
+ if type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :DateTime
171
+ DateTime.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :Time
175
+ Time.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ Phrase.const_get(type).build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.openapi_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+ end
253
+ end
@@ -0,0 +1,208 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ # The parent key's public identifier and name. Set for child keys.
5
+ class TranslationKeyLinkedKeyParent
6
+ # The parent key's public identifier (code).
7
+ attr_accessor :id
8
+
9
+ # The parent key's name.
10
+ attr_accessor :name
11
+
12
+ # Attribute mapping from ruby-style variable name to JSON key.
13
+ def self.attribute_map
14
+ {
15
+ :'id' => :'id',
16
+ :'name' => :'name'
17
+ }
18
+ end
19
+
20
+ # Attribute type mapping.
21
+ def self.openapi_types
22
+ {
23
+ :'id' => :'String',
24
+ :'name' => :'String'
25
+ }
26
+ end
27
+
28
+ # List of attributes with nullable: true
29
+ def self.openapi_nullable
30
+ Set.new([
31
+ ])
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ if (!attributes.is_a?(Hash))
38
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::TranslationKeyLinkedKeyParent` initialize method"
39
+ end
40
+
41
+ # check to see if the attribute exists and convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}) { |(k, v), h|
43
+ if (!self.class.attribute_map.key?(k.to_sym))
44
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::TranslationKeyLinkedKeyParent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
45
+ end
46
+ h[k.to_sym] = v
47
+ }
48
+
49
+ if attributes.key?(:'id')
50
+ self.id = attributes[:'id']
51
+ end
52
+
53
+ if attributes.key?(:'name')
54
+ self.name = attributes[:'name']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ id == o.id &&
77
+ name == o.name
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Integer] Hash code
88
+ def hash
89
+ [id, name].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def self.build_from_hash(attributes)
96
+ new.build_from_hash(attributes)
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.openapi_types.each_pair do |key, type|
105
+ if type =~ /\AArray<(.*)>/i
106
+ # check to ensure the input is an array given that the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
114
+ end
115
+
116
+ self
117
+ end
118
+
119
+ # Deserializes the data based on type
120
+ # @param string type Data type
121
+ # @param string value Value to be deserialized
122
+ # @return [Object] Deserialized data
123
+ def _deserialize(type, value)
124
+ case type.to_sym
125
+ when :DateTime
126
+ DateTime.parse(value)
127
+ when :Date
128
+ Date.parse(value)
129
+ when :Time
130
+ Time.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :Boolean
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ Phrase.const_get(type).build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
8
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
11
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: - `id:translation_id,...` for queries on a comma-separated list of ids - `tags:XYZ` for tags on the translation - `unverified:{true|false}` for verification status - `excluded:{true|false}` for exclusion status - `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
8
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
11
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
8
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
11
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -11,7 +11,7 @@ module Phrase
11
11
  # Order direction. Can be one of: asc, desc.
12
12
  attr_accessor :order
13
13
 
14
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: - `id:translation_id,...` for queries on a comma-separated list of ids - `tags:XYZ` for tags on the translation - `unverified:{true|false}` for verification status - `excluded:{true|false}` for exclusion status - `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
14
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
15
15
  attr_accessor :q
16
16
 
17
17
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
8
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
11
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,7 +5,7 @@ module Phrase
5
5
  # specify the branch to use
6
6
  attr_accessor :branch
7
7
 
8
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
8
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
11
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
@@ -8,7 +8,7 @@ module Phrase
8
8
  # specify the locale of the translations to be verified
9
9
  attr_accessor :locale_id
10
10
 
11
- # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of ids * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries Find more examples [here](/en/api/strings/usage-examples).
11
+ # Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * `id:translation_id,...` for queries on a comma-separated list of translation ids * `key.id:key_id,...` for queries on a comma-separated list of translation key ids * `key.name:key_name,...` for queries on a comma-separated list of translation key names * `locale.id:locale_id,...` for queries on a comma-separated list of locale ids * `locale.name:locale_name,...` for queries on a comma-separated list of locale names * `tags:XYZ` for tags on the translation * `unverified:{true|false}` for verification status * `excluded:{true|false}` for exclusion status * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `reviewed_after:2013-02-21T00:00:00Z` for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
12
12
  attr_accessor :q
13
13
 
14
14
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.32.0'
2
+ VERSION = '4.34.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -181,6 +181,7 @@ require 'phrase/models/release_update_parameters1'
181
181
  require 'phrase/models/repo_sync'
182
182
  require 'phrase/models/repo_sync_create_parameters'
183
183
  require 'phrase/models/repo_sync_event'
184
+ require 'phrase/models/repo_sync_event_uploads_inner'
184
185
  require 'phrase/models/repo_sync_export_parameters'
185
186
  require 'phrase/models/repo_sync_import_parameters'
186
187
  require 'phrase/models/screenshot'
@@ -221,6 +222,8 @@ require 'phrase/models/translation_exclude_parameters'
221
222
  require 'phrase/models/translation_include_parameters'
222
223
  require 'phrase/models/translation_key'
223
224
  require 'phrase/models/translation_key_details'
225
+ require 'phrase/models/translation_key_linked_key'
226
+ require 'phrase/models/translation_key_linked_key_parent'
224
227
  require 'phrase/models/translation_order'
225
228
  require 'phrase/models/translation_parent'
226
229
  require 'phrase/models/translation_review_parameters'
@@ -136,6 +136,7 @@ describe 'KeysApi' do
136
136
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
137
137
  # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: - &#x60;ids:key_id,...&#x60; for queries on a comma-separated list of ids - &#x60;name:key_name&#x60; for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes - &#x60;tags:tag_name&#x60; to filter for keys with certain tags - &#x60;translated:{true|false}&#x60; for translation status (also requires &#x60;locale_id&#x60; to be specified) - &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries - &#x60;unmentioned_in_upload:upload_id,...&#x60; to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads **Caution:** Query parameters with empty values will be treated as though they are not included in the request and will be ignored. Find more examples [here](/en/api/strings/usage-examples).
138
138
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
139
+ # @option opts [Boolean] :include_linked_keys When set to &#x60;true&#x60;, each key object in the response includes a &#x60;linked_key&#x60; field describing whether the key is a parent or child in a key-link relationship, and the number of children (for parent keys) or the parent&#39;s id and name (for child keys). Keys with no active link return &#x60;linked_key: null&#x60;. Omit this parameter or set it to &#x60;false&#x60; to leave the &#x60;linked_key&#x60; field out of the response entirely.
139
140
  # @return [Array<TranslationKey>]
140
141
  describe 'keys_list test' do
141
142
  it 'should work' do
@@ -152,6 +153,7 @@ describe 'KeysApi' do
152
153
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
153
154
  # @option opts [Integer] :page Page number
154
155
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
156
+ # @option opts [Boolean] :include_linked_keys When set to &#x60;true&#x60;, each key object in the response includes a &#x60;linked_key&#x60; field describing whether the key is a parent or child in a key-link relationship, and the number of children (for parent keys) or the parent&#39;s id and name (for child keys). Keys with no active link return &#x60;linked_key: null&#x60;. Omit this parameter or set it to &#x60;false&#x60; to leave the &#x60;linked_key&#x60; field out of the response entirely.
155
157
  # @return [Array<TranslationKey>]
156
158
  describe 'keys_search test' do
157
159
  it 'should work' do
@@ -166,7 +166,7 @@ describe 'TranslationsApi' do
166
166
  # @option opts [String] :branch specify the branch to use
167
167
  # @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
168
168
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
169
- # @option opts [String] :q Specify a query to find translations by content (including wildcards). The following qualifiers are supported in the query: * &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of ids * &#x60;unverified:{true|false}&#x60; for verification status * &#x60;tags:XYZ&#x60; for tags on the translation * &#x60;excluded:{true|false}&#x60; for exclusion status * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries Find more examples [here](/en/api/strings/usage-examples).
169
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of translation ids * &#x60;locale.id:locale_id,...&#x60; for queries on a comma-separated list of locale ids * &#x60;locale.name:locale_name,...&#x60; for queries on a comma-separated list of locale names * &#x60;tags:XYZ&#x60; for tags on the translation * &#x60;unverified:{true|false}&#x60; for verification status * &#x60;excluded:{true|false}&#x60; for exclusion status * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries * &#x60;reviewed_after:2013-02-21T00:00:00Z&#x60; for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
170
170
  # @return [Array<Translation>]
171
171
  describe 'translations_by_key test' do
172
172
  it 'should work' do
@@ -186,7 +186,7 @@ describe 'TranslationsApi' do
186
186
  # @option opts [String] :branch specify the branch to use
187
187
  # @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
188
188
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
189
- # @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: - &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of ids - &#x60;unverified:{true|false}&#x60; for verification status - &#x60;tags:XYZ&#x60; for tags on the translation - &#x60;excluded:{true|false}&#x60; for exclusion status - &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries Find more examples [here](/en/api/strings/usage-examples).
189
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of translation ids * &#x60;key.id:key_id,...&#x60; for queries on a comma-separated list of translation key ids * &#x60;key.name:key_name,...&#x60; for queries on a comma-separated list of translation key names * &#x60;tags:XYZ&#x60; for tags on the translation * &#x60;unverified:{true|false}&#x60; for verification status * &#x60;excluded:{true|false}&#x60; for exclusion status * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries * &#x60;reviewed_after:2013-02-21T00:00:00Z&#x60; for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
190
190
  # @return [Array<Translation>]
191
191
  describe 'translations_by_locale test' do
192
192
  it 'should work' do
@@ -237,7 +237,7 @@ describe 'TranslationsApi' do
237
237
  # @option opts [String] :locale_id Filter translations to those for the given locale (locale code or id). Equivalent to calling &#x60;GET /projects/{project_id}/locales/{locale_id}/translations&#x60;.
238
238
  # @option opts [String] :sort Sort criteria. Can be one of: key_name, created_at, updated_at.
239
239
  # @option opts [String] :order Order direction. Can be one of: asc, desc.
240
- # @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of ids * &#x60;tags:XYZ&#x60; for tags on the translation * &#x60;unverified:{true|false}&#x60; for verification status * &#x60;excluded:{true|false}&#x60; for exclusion status * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries * &#x60;reviewed_after:2013-02-21T00:00:00Z&#x60; for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
240
+ # @option opts [String] :q Specify a query to find translations by content (including wildcards). *Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).* The following qualifiers are supported in the query: * &#x60;id:translation_id,...&#x60; for queries on a comma-separated list of translation ids * &#x60;key.id:key_id,...&#x60; for queries on a comma-separated list of translation key ids * &#x60;key.name:key_name,...&#x60; for queries on a comma-separated list of translation key names * &#x60;locale.id:locale_id,...&#x60; for queries on a comma-separated list of locale ids * &#x60;locale.name:locale_name,...&#x60; for queries on a comma-separated list of locale names * &#x60;tags:XYZ&#x60; for tags on the translation * &#x60;unverified:{true|false}&#x60; for verification status * &#x60;excluded:{true|false}&#x60; for exclusion status * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries * &#x60;reviewed_after:2013-02-21T00:00:00Z&#x60; for fetching translations that were reviewed after the given timestamp Find more examples [here](/en/api/strings/usage-examples).
241
241
  # @return [Array<Translation>]
242
242
  describe 'translations_list test' do
243
243
  it 'should work' do
@@ -291,7 +291,7 @@ describe 'TranslationsApi' do
291
291
 
292
292
  # unit tests for translations_unverify_collection
293
293
  # Unverify translations by query
294
- # Mark translations matching query as unverified.
294
+ # Mark translations matching query as unverified. To unverify the translations of specific keys, filter by key id (and optionally locale) directly, for example &#x60;key.id:KEY_ID_1,KEY_ID_2 locale.id:LOCALE_ID&#x60;. There is no need to look up translation ids first.
295
295
  # @param project_id Project ID
296
296
  # @param translations_unverify_parameters
297
297
  # @param [Hash] opts the optional parameters
@@ -92,4 +92,10 @@ describe 'JobCreateParameters' do
92
92
  end
93
93
  end
94
94
 
95
+ describe 'test attribute "exclude_linked_child_keys"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
95
101
  end
@@ -146,4 +146,10 @@ describe 'JobDetails' do
146
146
  end
147
147
  end
148
148
 
149
+ describe 'test attribute "exclude_linked_child_keys"' do
150
+ it 'should work' do
151
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
152
+ end
153
+ end
154
+
149
155
  end