phrase 2.16.0 → 2.18.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/Gemfile +1 -0
  4. data/README.md +13 -3
  5. data/docs/CommentRepliesApi.md +3 -1
  6. data/docs/CommentsApi.md +3 -1
  7. data/docs/CommentsListParameters.md +3 -1
  8. data/docs/DistributionCreateParameters.md +1 -1
  9. data/docs/FigmaAttachment.md +23 -0
  10. data/docs/FigmaAttachmentCreateParameters.md +19 -0
  11. data/docs/FigmaAttachmentUpdateParameters.md +19 -0
  12. data/docs/FigmaAttachmentsApi.md +341 -0
  13. data/docs/JobCommentsApi.md +3 -1
  14. data/docs/KeysFigmaAttachmentsApi.md +142 -0
  15. data/docs/RepliesListParameters.md +3 -1
  16. data/lib/phrase/api/comment_replies_api.rb +3 -0
  17. data/lib/phrase/api/comments_api.rb +3 -0
  18. data/lib/phrase/api/figma_attachments_api.rb +393 -0
  19. data/lib/phrase/api/job_comments_api.rb +3 -0
  20. data/lib/phrase/api/keys_figma_attachments_api.rb +168 -0
  21. data/lib/phrase/models/comments_list_parameters.rb +14 -4
  22. data/lib/phrase/models/distribution_create_parameters.rb +1 -1
  23. data/lib/phrase/models/figma_attachment.rb +221 -0
  24. data/lib/phrase/models/figma_attachment_create_parameters.rb +205 -0
  25. data/lib/phrase/models/figma_attachment_update_parameters.rb +205 -0
  26. data/lib/phrase/models/replies_list_parameters.rb +14 -4
  27. data/lib/phrase/version.rb +1 -1
  28. data/lib/phrase.rb +5 -0
  29. data/spec/api/comment_replies_api_spec.rb +1 -0
  30. data/spec/api/comments_api_spec.rb +1 -0
  31. data/spec/api/figma_attachments_api_spec.rb +100 -0
  32. data/spec/api/job_comments_api_spec.rb +1 -0
  33. data/spec/api/keys_figma_attachments_api_spec.rb +55 -0
  34. data/spec/api/locales_api_spec.rb +108 -4
  35. data/spec/api/uploads_api_spec.rb +15 -1
  36. data/spec/models/comments_list_parameters_spec.rb +6 -0
  37. data/spec/models/figma_attachment_create_parameters_spec.rb +35 -0
  38. data/spec/models/figma_attachment_spec.rb +47 -0
  39. data/spec/models/figma_attachment_update_parameters_spec.rb +35 -0
  40. data/spec/models/replies_list_parameters_spec.rb +6 -0
  41. data/spec/spec_helper.rb +1 -0
  42. metadata +236 -216
@@ -0,0 +1,142 @@
1
+ # Phrase::KeysFigmaAttachmentsApi
2
+
3
+ All URIs are relative to *https://api.phrase.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**figma_attachment_attach_to_key**](KeysFigmaAttachmentsApi.md#figma_attachment_attach_to_key) | **POST** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys | Attach the Figma attachment to a key
8
+ [**figma_attachment_detach_from_key**](KeysFigmaAttachmentsApi.md#figma_attachment_detach_from_key) | **DELETE** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} | Detach the Figma attachment from a key
9
+
10
+
11
+
12
+ ## figma_attachment_attach_to_key
13
+
14
+ > figma_attachment_attach_to_key(project_id, figma_attachment_id, id, opts)
15
+
16
+ Attach the Figma attachment to a key
17
+
18
+ Attach the Figma attachment to a key
19
+
20
+ ### Example
21
+
22
+ ```ruby
23
+ # load the gem
24
+ require 'phrase'
25
+ # setup authorization
26
+ Phrase.configure do |config|
27
+ # Configure HTTP basic authorization: Basic
28
+ config.username = 'YOUR USERNAME'
29
+ config.password = 'YOUR PASSWORD'
30
+
31
+ # Configure API key authorization: Token
32
+ config.api_key['Authorization'] = 'YOUR API KEY'
33
+ config.api_key_prefix['Authorization'] = 'token'
34
+ end
35
+
36
+ api_instance = Phrase::KeysFigmaAttachmentsApi.new
37
+ project_id = 'project_id_example' # String | Project ID
38
+ figma_attachment_id = 'figma_attachment_id_example' # String | Figma attachment ID
39
+ id = 'id_example' # String | ID
40
+ opts = {
41
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
42
+ branch: 'my-feature-branch' # String | specify the branch to use
43
+ }
44
+
45
+ begin
46
+ #Attach the Figma attachment to a key
47
+ api_instance.figma_attachment_attach_to_key(project_id, figma_attachment_id, id, opts)
48
+ rescue Phrase::ApiError => e
49
+ puts "Exception when calling KeysFigmaAttachmentsApi->figma_attachment_attach_to_key: #{e}"
50
+ end
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **project_id** | **String**| Project ID |
59
+ **figma_attachment_id** | **String**| Figma attachment ID |
60
+ **id** | **String**| ID |
61
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
62
+ **branch** | **String**| specify the branch to use | [optional]
63
+
64
+ ### Return type
65
+
66
+ Response<(nil (empty response body))>
67
+
68
+ ### Authorization
69
+
70
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: Not defined
75
+ - **Accept**: Not defined
76
+
77
+
78
+ ## figma_attachment_detach_from_key
79
+
80
+ > figma_attachment_detach_from_key(project_id, figma_attachment_id, id, opts)
81
+
82
+ Detach the Figma attachment from a key
83
+
84
+ Detach the Figma attachment from a key
85
+
86
+ ### Example
87
+
88
+ ```ruby
89
+ # load the gem
90
+ require 'phrase'
91
+ # setup authorization
92
+ Phrase.configure do |config|
93
+ # Configure HTTP basic authorization: Basic
94
+ config.username = 'YOUR USERNAME'
95
+ config.password = 'YOUR PASSWORD'
96
+
97
+ # Configure API key authorization: Token
98
+ config.api_key['Authorization'] = 'YOUR API KEY'
99
+ config.api_key_prefix['Authorization'] = 'token'
100
+ end
101
+
102
+ api_instance = Phrase::KeysFigmaAttachmentsApi.new
103
+ project_id = 'project_id_example' # String | Project ID
104
+ figma_attachment_id = 'figma_attachment_id_example' # String | Figma attachment ID
105
+ id = 'id_example' # String | ID
106
+ opts = {
107
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
108
+ branch: 'my-feature-branch' # String | specify the branch to use
109
+ }
110
+
111
+ begin
112
+ #Detach the Figma attachment from a key
113
+ api_instance.figma_attachment_detach_from_key(project_id, figma_attachment_id, id, opts)
114
+ rescue Phrase::ApiError => e
115
+ puts "Exception when calling KeysFigmaAttachmentsApi->figma_attachment_detach_from_key: #{e}"
116
+ end
117
+ ```
118
+
119
+ ### Parameters
120
+
121
+
122
+ Name | Type | Description | Notes
123
+ ------------- | ------------- | ------------- | -------------
124
+ **project_id** | **String**| Project ID |
125
+ **figma_attachment_id** | **String**| Figma attachment ID |
126
+ **id** | **String**| ID |
127
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
128
+ **branch** | **String**| specify the branch to use | [optional]
129
+
130
+ ### Return type
131
+
132
+ Response<(nil (empty response body))>
133
+
134
+ ### Authorization
135
+
136
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
137
+
138
+ ### HTTP request headers
139
+
140
+ - **Content-Type**: Not defined
141
+ - **Accept**: Not defined
142
+
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
7
7
  **branch** | **String** | Specify the branch to use | [optional]
8
8
  **query** | **String** | Search query for comment messages | [optional]
9
9
  **filters** | **Array&lt;String&gt;** | Specify filters to find comments by | [optional]
10
+ **order** | **String** | Specify ordering of comments | [optional]
10
11
 
11
12
  ## Code Sample
12
13
 
@@ -15,7 +16,8 @@ require 'Phrase'
15
16
 
16
17
  instance = Phrase::RepliesListParameters.new(branch: my-feature-branch,
17
18
  query: Some comment content,
18
- filters: [&quot;read&quot;,&quot;unread&quot;])
19
+ filters: [&quot;read&quot;,&quot;unread&quot;],
20
+ order: desc)
19
21
  ```
20
22
 
21
23
 
@@ -20,6 +20,7 @@ module Phrase
20
20
  # @option opts [String] :branch specify the branch to use
21
21
  # @option opts [String] :query Search query for comment messages
22
22
  # @option opts [Array<String>] :filters Specify the filter for the comments
23
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
23
24
  # @return [Array<Comment>]
24
25
  def replies_list(project_id, key_id, comment_id, replies_list_parameters, opts = {})
25
26
  data, _status_code, _headers = replies_list_with_http_info(project_id, key_id, comment_id, replies_list_parameters, opts)
@@ -39,6 +40,7 @@ module Phrase
39
40
  # @option opts [String] :branch specify the branch to use
40
41
  # @option opts [String] :query Search query for comment messages
41
42
  # @option opts [Array<String>] :filters Specify the filter for the comments
43
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
42
44
  # @return [Array<(Response<(Array<Comment>)>, Integer, Hash)>] Response<(Array<Comment>)> data, response status code and response headers
43
45
  def replies_list_with_http_info(project_id, key_id, comment_id, replies_list_parameters, opts = {})
44
46
  if @api_client.config.debugging
@@ -70,6 +72,7 @@ module Phrase
70
72
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
71
73
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
72
74
  query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
75
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
73
76
 
74
77
  # header parameters
75
78
  header_params = opts[:header_params] || {}
@@ -594,6 +594,7 @@ module Phrase
594
594
  # @option opts [String] :query Search query for comment messages
595
595
  # @option opts [Array<String>] :locale_ids Search comments by their assigned locales
596
596
  # @option opts [Array<String>] :filters Specify the filter for the comments
597
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
597
598
  # @return [Array<Comment>]
598
599
  def comments_list(project_id, key_id, comments_list_parameters, opts = {})
599
600
  data, _status_code, _headers = comments_list_with_http_info(project_id, key_id, comments_list_parameters, opts)
@@ -613,6 +614,7 @@ module Phrase
613
614
  # @option opts [String] :query Search query for comment messages
614
615
  # @option opts [Array<String>] :locale_ids Search comments by their assigned locales
615
616
  # @option opts [Array<String>] :filters Specify the filter for the comments
617
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
616
618
  # @return [Array<(Response<(Array<Comment>)>, Integer, Hash)>] Response<(Array<Comment>)> data, response status code and response headers
617
619
  def comments_list_with_http_info(project_id, key_id, comments_list_parameters, opts = {})
618
620
  if @api_client.config.debugging
@@ -641,6 +643,7 @@ module Phrase
641
643
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
642
644
  query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
643
645
  query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
646
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
644
647
 
645
648
  # header parameters
646
649
  header_params = opts[:header_params] || {}
@@ -0,0 +1,393 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class FigmaAttachmentsApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Create a Figma attachment
11
+ # Create a new Figma attachment.
12
+ # @param project_id [String] Project ID
13
+ # @param figma_attachment_create_parameters [FigmaAttachmentCreateParameters]
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @option opts [String] :branch specify the branch to use
17
+ # @return [FigmaAttachment]
18
+ def figma_attachment_create(project_id, figma_attachment_create_parameters, opts = {})
19
+ data, _status_code, _headers = figma_attachment_create_with_http_info(project_id, figma_attachment_create_parameters, opts)
20
+ data
21
+ end
22
+
23
+ # Create a Figma attachment
24
+ # Create a new Figma attachment.
25
+ # @param project_id [String] Project ID
26
+ # @param figma_attachment_create_parameters [FigmaAttachmentCreateParameters]
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @option opts [String] :branch specify the branch to use
30
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
31
+ def figma_attachment_create_with_http_info(project_id, figma_attachment_create_parameters, opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_create ...'
34
+ end
35
+ # verify the required parameter 'project_id' is set
36
+ if @api_client.config.client_side_validation && project_id.nil?
37
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_create"
38
+ end
39
+ # verify the required parameter 'figma_attachment_create_parameters' is set
40
+ if @api_client.config.client_side_validation && figma_attachment_create_parameters.nil?
41
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_create_parameters' when calling FigmaAttachmentsApi.figma_attachment_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/projects/{project_id}/figma_attachments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ # HTTP header 'Content-Type'
55
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
56
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(figma_attachment_create_parameters)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'FigmaAttachment'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ response = ::Phrase::Response.new(data, headers)
84
+ return response, status_code, headers
85
+ end
86
+
87
+ # Delete a Figma attachment
88
+ # Delete an existing Figma attachment.
89
+ # @param project_id [String] Project ID
90
+ # @param id [String] ID
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
93
+ # @option opts [String] :branch specify the branch to use
94
+ # @return [nil]
95
+ def figma_attachment_delete(project_id, id, opts = {})
96
+ data, _status_code, _headers = figma_attachment_delete_with_http_info(project_id, id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete a Figma attachment
101
+ # Delete an existing Figma attachment.
102
+ # @param project_id [String] Project ID
103
+ # @param id [String] ID
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
106
+ # @option opts [String] :branch specify the branch to use
107
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
108
+ def figma_attachment_delete_with_http_info(project_id, id, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_delete ...'
111
+ end
112
+ # verify the required parameter 'project_id' is set
113
+ if @api_client.config.client_side_validation && project_id.nil?
114
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_delete"
115
+ end
116
+ # verify the required parameter 'id' is set
117
+ if @api_client.config.client_side_validation && id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_delete"
119
+ end
120
+ # resource path
121
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
122
+
123
+ # query parameters
124
+ query_params = opts[:query_params] || {}
125
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
130
+
131
+ # form parameters
132
+ form_params = opts[:form_params] || {}
133
+
134
+ # http body (model)
135
+ post_body = opts[:body]
136
+
137
+ # return_type
138
+ return_type = opts[:return_type]
139
+
140
+ # auth_names
141
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
142
+
143
+ new_options = opts.merge(
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type
150
+ )
151
+
152
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
155
+ end
156
+ response = ::Phrase::Response.new(data, headers)
157
+ return response, status_code, headers
158
+ end
159
+
160
+ # Get a single Figma attachment
161
+ # Get details on a single Figma attachment for a given project.
162
+ # @param project_id [String] Project ID
163
+ # @param id [String] ID
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
166
+ # @option opts [String] :branch specify the branch to use
167
+ # @return [FigmaAttachment]
168
+ def figma_attachment_show(project_id, id, opts = {})
169
+ data, _status_code, _headers = figma_attachment_show_with_http_info(project_id, id, opts)
170
+ data
171
+ end
172
+
173
+ # Get a single Figma attachment
174
+ # Get details on a single Figma attachment for a given project.
175
+ # @param project_id [String] Project ID
176
+ # @param id [String] ID
177
+ # @param [Hash] opts the optional parameters
178
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
179
+ # @option opts [String] :branch specify the branch to use
180
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
181
+ def figma_attachment_show_with_http_info(project_id, id, opts = {})
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_show ...'
184
+ end
185
+ # verify the required parameter 'project_id' is set
186
+ if @api_client.config.client_side_validation && project_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_show"
188
+ end
189
+ # verify the required parameter 'id' is set
190
+ if @api_client.config.client_side_validation && id.nil?
191
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_show"
192
+ end
193
+ # resource path
194
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
195
+
196
+ # query parameters
197
+ query_params = opts[:query_params] || {}
198
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
205
+
206
+ # form parameters
207
+ form_params = opts[:form_params] || {}
208
+
209
+ # http body (model)
210
+ post_body = opts[:body]
211
+
212
+ # return_type
213
+ return_type = opts[:return_type] || 'FigmaAttachment'
214
+
215
+ # auth_names
216
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
217
+
218
+ new_options = opts.merge(
219
+ :header_params => header_params,
220
+ :query_params => query_params,
221
+ :form_params => form_params,
222
+ :body => post_body,
223
+ :auth_names => auth_names,
224
+ :return_type => return_type
225
+ )
226
+
227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
230
+ end
231
+ response = ::Phrase::Response.new(data, headers)
232
+ return response, status_code, headers
233
+ end
234
+
235
+ # Update a Figma attachment
236
+ # Update an existing Figma attachment.
237
+ # @param project_id [String] Project ID
238
+ # @param id [String] ID
239
+ # @param figma_attachment_update_parameters [FigmaAttachmentUpdateParameters]
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
242
+ # @option opts [String] :branch specify the branch to use
243
+ # @return [FigmaAttachment]
244
+ def figma_attachment_update(project_id, id, figma_attachment_update_parameters, opts = {})
245
+ data, _status_code, _headers = figma_attachment_update_with_http_info(project_id, id, figma_attachment_update_parameters, opts)
246
+ data
247
+ end
248
+
249
+ # Update a Figma attachment
250
+ # Update an existing Figma attachment.
251
+ # @param project_id [String] Project ID
252
+ # @param id [String] ID
253
+ # @param figma_attachment_update_parameters [FigmaAttachmentUpdateParameters]
254
+ # @param [Hash] opts the optional parameters
255
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
256
+ # @option opts [String] :branch specify the branch to use
257
+ # @return [Array<(Response<(FigmaAttachment)>, Integer, Hash)>] Response<(FigmaAttachment)> data, response status code and response headers
258
+ def figma_attachment_update_with_http_info(project_id, id, figma_attachment_update_parameters, opts = {})
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachment_update ...'
261
+ end
262
+ # verify the required parameter 'project_id' is set
263
+ if @api_client.config.client_side_validation && project_id.nil?
264
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachment_update"
265
+ end
266
+ # verify the required parameter 'id' is set
267
+ if @api_client.config.client_side_validation && id.nil?
268
+ fail ArgumentError, "Missing the required parameter 'id' when calling FigmaAttachmentsApi.figma_attachment_update"
269
+ end
270
+ # verify the required parameter 'figma_attachment_update_parameters' is set
271
+ if @api_client.config.client_side_validation && figma_attachment_update_parameters.nil?
272
+ fail ArgumentError, "Missing the required parameter 'figma_attachment_update_parameters' when calling FigmaAttachmentsApi.figma_attachment_update"
273
+ end
274
+ # resource path
275
+ local_var_path = '/projects/{project_id}/figma_attachments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
280
+
281
+ # header parameters
282
+ header_params = opts[:header_params] || {}
283
+ # HTTP header 'Accept' (if needed)
284
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
285
+ # HTTP header 'Content-Type'
286
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
287
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
288
+
289
+ # form parameters
290
+ form_params = opts[:form_params] || {}
291
+
292
+ # http body (model)
293
+ post_body = opts[:body] || @api_client.object_to_http_body(figma_attachment_update_parameters)
294
+
295
+ # return_type
296
+ return_type = opts[:return_type] || 'FigmaAttachment'
297
+
298
+ # auth_names
299
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
300
+
301
+ new_options = opts.merge(
302
+ :header_params => header_params,
303
+ :query_params => query_params,
304
+ :form_params => form_params,
305
+ :body => post_body,
306
+ :auth_names => auth_names,
307
+ :return_type => return_type
308
+ )
309
+
310
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
311
+ if @api_client.config.debugging
312
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachment_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
313
+ end
314
+ response = ::Phrase::Response.new(data, headers)
315
+ return response, status_code, headers
316
+ end
317
+
318
+ # List Figma attachments
319
+ # List all Figma attachments for the given project
320
+ # @param project_id [String] Project ID
321
+ # @param [Hash] opts the optional parameters
322
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
323
+ # @option opts [Integer] :page Page number
324
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
325
+ # @option opts [String] :branch specify the branch to use
326
+ # @return [Array<FigmaAttachment>]
327
+ def figma_attachments_list(project_id, opts = {})
328
+ data, _status_code, _headers = figma_attachments_list_with_http_info(project_id, opts)
329
+ data
330
+ end
331
+
332
+ # List Figma attachments
333
+ # List all Figma attachments for the given project
334
+ # @param project_id [String] Project ID
335
+ # @param [Hash] opts the optional parameters
336
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
337
+ # @option opts [Integer] :page Page number
338
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
339
+ # @option opts [String] :branch specify the branch to use
340
+ # @return [Array<(Response<(Array<FigmaAttachment>)>, Integer, Hash)>] Response<(Array<FigmaAttachment>)> data, response status code and response headers
341
+ def figma_attachments_list_with_http_info(project_id, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: FigmaAttachmentsApi.figma_attachments_list ...'
344
+ end
345
+ # verify the required parameter 'project_id' is set
346
+ if @api_client.config.client_side_validation && project_id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling FigmaAttachmentsApi.figma_attachments_list"
348
+ end
349
+ # resource path
350
+ local_var_path = '/projects/{project_id}/figma_attachments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
351
+
352
+ # query parameters
353
+ query_params = opts[:query_params] || {}
354
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
355
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
356
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
357
+
358
+ # header parameters
359
+ header_params = opts[:header_params] || {}
360
+ # HTTP header 'Accept' (if needed)
361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
362
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
363
+
364
+ # form parameters
365
+ form_params = opts[:form_params] || {}
366
+
367
+ # http body (model)
368
+ post_body = opts[:body]
369
+
370
+ # return_type
371
+ return_type = opts[:return_type] || 'Array<FigmaAttachment>'
372
+
373
+ # auth_names
374
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
375
+
376
+ new_options = opts.merge(
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: FigmaAttachmentsApi#figma_attachments_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ response = ::Phrase::Response.new(data, headers)
390
+ return response, status_code, headers
391
+ end
392
+ end
393
+ end
@@ -340,6 +340,7 @@ module Phrase
340
340
  # @param [Hash] opts the optional parameters
341
341
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
342
342
  # @option opts [String] :branch specify the branch to use
343
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
343
344
  # @return [Array<JobComment>]
344
345
  def job_comments_list(project_id, job_id, opts = {})
345
346
  data, _status_code, _headers = job_comments_list_with_http_info(project_id, job_id, opts)
@@ -353,6 +354,7 @@ module Phrase
353
354
  # @param [Hash] opts the optional parameters
354
355
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
355
356
  # @option opts [String] :branch specify the branch to use
357
+ # @option opts [String] :order Order direction. Can be one of: asc, desc.
356
358
  # @return [Array<(Response<(Array<JobComment>)>, Integer, Hash)>] Response<(Array<JobComment>)> data, response status code and response headers
357
359
  def job_comments_list_with_http_info(project_id, job_id, opts = {})
358
360
  if @api_client.config.debugging
@@ -372,6 +374,7 @@ module Phrase
372
374
  # query parameters
373
375
  query_params = opts[:query_params] || {}
374
376
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
377
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
375
378
 
376
379
  # header parameters
377
380
  header_params = opts[:header_params] || {}