phrase 1.0.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -9
  3. data/docs/BranchName.md +17 -0
  4. data/docs/CurrentUser.md +31 -0
  5. data/docs/Invitation.md +9 -1
  6. data/docs/InvitationCreateParameters.md +4 -0
  7. data/docs/InvitationUpdateParameters.md +4 -0
  8. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  9. data/docs/InvitationsApi.md +66 -0
  10. data/docs/Job.md +5 -3
  11. data/docs/JobDetails.md +4 -2
  12. data/docs/JobLocale.md +7 -1
  13. data/docs/KeysApi.md +5 -5
  14. data/docs/LocalesApi.md +7 -4
  15. data/docs/Member.md +7 -1
  16. data/docs/MemberProjectDetail.md +35 -0
  17. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  18. data/docs/MemberSpaces.md +25 -0
  19. data/docs/MemberUpdateParameters.md +4 -0
  20. data/docs/MemberUpdateSettingsParameters.md +19 -0
  21. data/docs/MembersApi.md +66 -0
  22. data/docs/ProjectUpdateParameters.md +43 -9
  23. data/docs/ScreenshotCreateParameters.md +3 -1
  24. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  25. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  26. data/docs/ScreenshotMarkersApi.md +9 -3
  27. data/docs/ScreenshotUpdateParameters.md +3 -1
  28. data/docs/ScreenshotsApi.md +8 -2
  29. data/docs/TranslationsApi.md +25 -25
  30. data/docs/UsersApi.md +2 -2
  31. data/docs/Variable.md +23 -0
  32. data/docs/VariableCreateParameters.md +19 -0
  33. data/docs/VariableUpdateParameters.md +19 -0
  34. data/docs/VariablesApi.md +331 -0
  35. data/docs/Webhook.md +2 -0
  36. data/docs/WebhookCreateParameters.md +3 -1
  37. data/docs/WebhookUpdateParameters.md +3 -1
  38. data/lib/phrase.rb +11 -0
  39. data/lib/phrase/api/invitations_api.rb +80 -0
  40. data/lib/phrase/api/keys_api.rb +6 -6
  41. data/lib/phrase/api/locales_api.rb +8 -3
  42. data/lib/phrase/api/members_api.rb +80 -0
  43. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  44. data/lib/phrase/api/screenshots_api.rb +9 -0
  45. data/lib/phrase/api/translations_api.rb +35 -35
  46. data/lib/phrase/api/users_api.rb +3 -3
  47. data/lib/phrase/api/variables_api.rb +378 -0
  48. data/lib/phrase/api_client.rb +2 -0
  49. data/lib/phrase/models/branch_name.rb +194 -0
  50. data/lib/phrase/models/current_user.rb +257 -0
  51. data/lib/phrase/models/invitation.rb +48 -4
  52. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  53. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  54. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  55. data/lib/phrase/models/job.rb +22 -13
  56. data/lib/phrase/models/job_details.rb +19 -10
  57. data/lib/phrase/models/job_locale.rb +31 -4
  58. data/lib/phrase/models/member.rb +35 -4
  59. data/lib/phrase/models/member_project_detail.rb +285 -0
  60. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  61. data/lib/phrase/models/member_spaces.rb +230 -0
  62. data/lib/phrase/models/member_update_parameters.rb +25 -1
  63. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  64. data/lib/phrase/models/project_update_parameters.rb +183 -13
  65. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  66. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  67. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  68. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  69. data/lib/phrase/models/variable.rb +221 -0
  70. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  71. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  72. data/lib/phrase/models/webhook.rb +10 -1
  73. data/lib/phrase/models/webhook_create_parameters.rb +14 -4
  74. data/lib/phrase/models/webhook_update_parameters.rb +14 -4
  75. data/lib/phrase/version.rb +1 -1
  76. data/spec/api/invitations_api_spec.rb +15 -0
  77. data/spec/api/keys_api_spec.rb +2 -2
  78. data/spec/api/locales_api_spec.rb +2 -1
  79. data/spec/api/members_api_spec.rb +15 -0
  80. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  81. data/spec/api/screenshots_api_spec.rb +3 -0
  82. data/spec/api/translations_api_spec.rb +10 -10
  83. data/spec/api/users_api_spec.rb +1 -1
  84. data/spec/api/variables_api_spec.rb +95 -0
  85. data/spec/models/branch_name_spec.rb +29 -0
  86. data/spec/models/current_user_spec.rb +71 -0
  87. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  88. data/spec/models/invitation_spec.rb +24 -0
  89. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  90. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  91. data/spec/models/job_details_spec.rb +9 -3
  92. data/spec/models/job_locale_spec.rb +18 -0
  93. data/spec/models/job_spec.rb +9 -3
  94. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  95. data/spec/models/member_project_detail_spec.rb +83 -0
  96. data/spec/models/member_spaces_spec.rb +53 -0
  97. data/spec/models/member_spec.rb +18 -0
  98. data/spec/models/member_update_parameters_spec.rb +12 -0
  99. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  100. data/spec/models/project_update_parameters_spec.rb +103 -1
  101. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  102. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  103. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  104. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  105. data/spec/models/variable_create_parameters_spec.rb +35 -0
  106. data/spec/models/variable_spec.rb +47 -0
  107. data/spec/models/variable_update_parameters_spec.rb +35 -0
  108. data/spec/models/webhook_create_parameters_spec.rb +6 -0
  109. data/spec/models/webhook_spec.rb +6 -0
  110. data/spec/models/webhook_update_parameters_spec.rb +6 -0
  111. metadata +206 -162
data/docs/Webhook.md CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **description** | **String** | | [optional]
10
10
  **events** | **Array<String>** | | [optional]
11
11
  **active** | **Boolean** | | [optional]
12
+ **include_branches** | **Boolean** | | [optional]
12
13
  **created_at** | **DateTime** | | [optional]
13
14
  **updated_at** | **DateTime** | | [optional]
14
15
 
@@ -22,6 +23,7 @@ instance = Phrase::Webhook.new(id: null,
22
23
  description: null,
23
24
  events: null,
24
25
  active: null,
26
+ include_branches: null,
25
27
  created_at: null,
26
28
  updated_at: null)
27
29
  ```
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **description** | **String** | Webhook description | [optional]
10
10
  **events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
11
11
  **active** | **Boolean** | Whether webhook is active or inactive | [optional]
12
+ **include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
12
13
 
13
14
  ## Code Sample
14
15
 
@@ -19,7 +20,8 @@ instance = Phrase::WebhookCreateParameters.new(callback_url: http://example.com/
19
20
  secret: secr3t,
20
21
  description: My webhook for chat notifications,
21
22
  events: locales:create,translations:update,
22
- active: null)
23
+ active: null,
24
+ include_branches: null)
23
25
  ```
24
26
 
25
27
 
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **description** | **String** | Webhook description | [optional]
10
10
  **events** | **String** | List of event names to trigger the webhook (separated by comma) | [optional]
11
11
  **active** | **Boolean** | Whether webhook is active or inactive | [optional]
12
+ **include_branches** | **Boolean** | If enabled, webhook will also be triggered for events from branches of the project specified. | [optional]
12
13
 
13
14
  ## Code Sample
14
15
 
@@ -19,7 +20,8 @@ instance = Phrase::WebhookUpdateParameters.new(callback_url: http://example.com/
19
20
  secret: secr3t,
20
21
  description: My webhook for chat notifications,
21
22
  events: locales:create,translations:update,
22
- active: null)
23
+ active: null,
24
+ include_branches: null)
23
25
  ```
24
26
 
25
27
 
data/lib/phrase.rb CHANGED
@@ -28,11 +28,13 @@ require 'phrase/models/blacklisted_key_update_parameters'
28
28
  require 'phrase/models/branch'
29
29
  require 'phrase/models/branch_create_parameters'
30
30
  require 'phrase/models/branch_merge_parameters'
31
+ require 'phrase/models/branch_name'
31
32
  require 'phrase/models/branch_update_parameters'
32
33
  require 'phrase/models/comment'
33
34
  require 'phrase/models/comment_create_parameters'
34
35
  require 'phrase/models/comment_mark_read_parameters'
35
36
  require 'phrase/models/comment_update_parameters'
37
+ require 'phrase/models/current_user'
36
38
  require 'phrase/models/distribution'
37
39
  require 'phrase/models/distribution_create_parameters'
38
40
  require 'phrase/models/distribution_preview'
@@ -60,6 +62,7 @@ require 'phrase/models/inline_response422_errors'
60
62
  require 'phrase/models/invitation'
61
63
  require 'phrase/models/invitation_create_parameters'
62
64
  require 'phrase/models/invitation_update_parameters'
65
+ require 'phrase/models/invitation_update_settings_parameters'
63
66
  require 'phrase/models/job'
64
67
  require 'phrase/models/job_complete_parameters'
65
68
  require 'phrase/models/job_create_parameters'
@@ -89,7 +92,11 @@ require 'phrase/models/locale_preview'
89
92
  require 'phrase/models/locale_statistics'
90
93
  require 'phrase/models/locale_update_parameters'
91
94
  require 'phrase/models/member'
95
+ require 'phrase/models/member_project_detail'
96
+ require 'phrase/models/member_project_detail_project_roles'
97
+ require 'phrase/models/member_spaces'
92
98
  require 'phrase/models/member_update_parameters'
99
+ require 'phrase/models/member_update_settings_parameters'
93
100
  require 'phrase/models/order_confirm_parameters'
94
101
  require 'phrase/models/order_create_parameters'
95
102
  require 'phrase/models/project'
@@ -161,6 +168,9 @@ require 'phrase/models/upload_create_parameters'
161
168
  require 'phrase/models/upload_summary'
162
169
  require 'phrase/models/user'
163
170
  require 'phrase/models/user_preview'
171
+ require 'phrase/models/variable'
172
+ require 'phrase/models/variable_create_parameters'
173
+ require 'phrase/models/variable_update_parameters'
164
174
  require 'phrase/models/webhook'
165
175
  require 'phrase/models/webhook_create_parameters'
166
176
  require 'phrase/models/webhook_update_parameters'
@@ -198,6 +208,7 @@ require 'phrase/api/teams_api'
198
208
  require 'phrase/api/translations_api'
199
209
  require 'phrase/api/uploads_api'
200
210
  require 'phrase/api/users_api'
211
+ require 'phrase/api/variables_api'
201
212
  require 'phrase/api/versions_history_api'
202
213
  require 'phrase/api/webhooks_api'
203
214
 
@@ -375,6 +375,86 @@ module Phrase
375
375
  return response, status_code, headers
376
376
  end
377
377
 
378
+ # Update a member's invitation access
379
+ # Update member's settings in the invitations. Access token scope must include <code>team.manage</code>.
380
+ # @param project_id [String] Project ID
381
+ # @param id [String] ID
382
+ # @param invitation_update_settings_parameters [InvitationUpdateSettingsParameters]
383
+ # @param [Hash] opts the optional parameters
384
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
385
+ # @return [Invitation]
386
+ def invitation_update_settings(project_id, id, invitation_update_settings_parameters, opts = {})
387
+ data, _status_code, _headers = invitation_update_settings_with_http_info(project_id, id, invitation_update_settings_parameters, opts)
388
+ data
389
+ end
390
+
391
+ # Update a member&#39;s invitation access
392
+ # Update member&#39;s settings in the invitations. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
393
+ # @param project_id [String] Project ID
394
+ # @param id [String] ID
395
+ # @param invitation_update_settings_parameters [InvitationUpdateSettingsParameters]
396
+ # @param [Hash] opts the optional parameters
397
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
398
+ # @return [Array<(Response<(Invitation)>, Integer, Hash)>] Response<(Invitation)> data, response status code and response headers
399
+ def invitation_update_settings_with_http_info(project_id, id, invitation_update_settings_parameters, opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: InvitationsApi.invitation_update_settings ...'
402
+ end
403
+ # verify the required parameter 'project_id' is set
404
+ if @api_client.config.client_side_validation && project_id.nil?
405
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling InvitationsApi.invitation_update_settings"
406
+ end
407
+ # verify the required parameter 'id' is set
408
+ if @api_client.config.client_side_validation && id.nil?
409
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvitationsApi.invitation_update_settings"
410
+ end
411
+ # verify the required parameter 'invitation_update_settings_parameters' is set
412
+ if @api_client.config.client_side_validation && invitation_update_settings_parameters.nil?
413
+ fail ArgumentError, "Missing the required parameter 'invitation_update_settings_parameters' when calling InvitationsApi.invitation_update_settings"
414
+ end
415
+ # resource path
416
+ local_var_path = '/projects/{project_id}/invitations/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
417
+
418
+ # query parameters
419
+ query_params = opts[:query_params] || {}
420
+
421
+ # header parameters
422
+ header_params = opts[:header_params] || {}
423
+ # HTTP header 'Accept' (if needed)
424
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
425
+ # HTTP header 'Content-Type'
426
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
427
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
428
+
429
+ # form parameters
430
+ form_params = opts[:form_params] || {}
431
+
432
+ # http body (model)
433
+ post_body = opts[:body] || @api_client.object_to_http_body(invitation_update_settings_parameters)
434
+
435
+ # return_type
436
+ return_type = opts[:return_type] || 'Invitation'
437
+
438
+ # auth_names
439
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
440
+
441
+ new_options = opts.merge(
442
+ :header_params => header_params,
443
+ :query_params => query_params,
444
+ :form_params => form_params,
445
+ :body => post_body,
446
+ :auth_names => auth_names,
447
+ :return_type => return_type
448
+ )
449
+
450
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: InvitationsApi#invitation_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
453
+ end
454
+ response = ::Phrase::Response.new(data, headers)
455
+ return response, status_code, headers
456
+ end
457
+
378
458
  # List invitations
379
459
  # List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include <code>team.manage</code>.
380
460
  # @param account_id [String] Account ID
@@ -318,8 +318,8 @@ module Phrase
318
318
  # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\&quot;\\\\\\\&quot;)&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
319
319
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
320
320
  # @return [AffectedResources]
321
- def keys_delete(project_id, opts = {})
322
- data, _status_code, _headers = keys_delete_with_http_info(project_id, opts)
321
+ def keys_delete_collection(project_id, opts = {})
322
+ data, _status_code, _headers = keys_delete_collection_with_http_info(project_id, opts)
323
323
  data
324
324
  end
325
325
 
@@ -332,13 +332,13 @@ module Phrase
332
332
  # @option opts [String] :q Specify a query to do broad search for keys by name (including wildcards).&lt;br&gt;&lt;br&gt; The following qualifiers are also supported in the search term:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;code&gt;ids:key_id,...&lt;/code&gt; for queries on a comma-separated list of ids&lt;/li&gt; &lt;li&gt;&lt;code&gt;name:key_name&lt;/code&gt; for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\&quot;\\\\\\\&quot;)&lt;/li&gt; &lt;li&gt;&lt;code&gt;tags:tag_name&lt;/code&gt; to filter for keys with certain tags&lt;/li&gt; &lt;li&gt;&lt;code&gt;translated:{true|false}&lt;/code&gt; for translation status (also requires &lt;code&gt;locale_id&lt;/code&gt; to be specified)&lt;/li&gt; &lt;li&gt;&lt;code&gt;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&lt;/code&gt; for date range queries&lt;/li&gt; &lt;li&gt;&lt;code&gt;unmentioned_in_upload:upload_id&lt;/code&gt; to filter keys unmentioned within upload&lt;/li&gt; &lt;/ul&gt; Find more examples &lt;a href&#x3D;\&quot;#overview--usage-examples\&quot;&gt;here&lt;/a&gt;.
333
333
  # @option opts [String] :locale_id Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
334
334
  # @return [Array<(Response<(AffectedResources)>, Integer, Hash)>] Response<(AffectedResources)> data, response status code and response headers
335
- def keys_delete_with_http_info(project_id, opts = {})
335
+ def keys_delete_collection_with_http_info(project_id, opts = {})
336
336
  if @api_client.config.debugging
337
- @api_client.config.logger.debug 'Calling API: KeysApi.keys_delete ...'
337
+ @api_client.config.logger.debug 'Calling API: KeysApi.keys_delete_collection ...'
338
338
  end
339
339
  # verify the required parameter 'project_id' is set
340
340
  if @api_client.config.client_side_validation && project_id.nil?
341
- fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_delete"
341
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling KeysApi.keys_delete_collection"
342
342
  end
343
343
  # resource path
344
344
  local_var_path = '/projects/{project_id}/keys'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
@@ -378,7 +378,7 @@ module Phrase
378
378
 
379
379
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
380
380
  if @api_client.config.debugging
381
- @api_client.config.logger.debug "API called: KeysApi#keys_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
381
+ @api_client.config.logger.debug "API called: KeysApi#keys_delete_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
382
  end
383
383
  response = ::Phrase::Response.new(data, headers)
384
384
  return response, status_code, headers
@@ -165,6 +165,7 @@ module Phrase
165
165
  # @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
166
166
  # @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead
167
167
  # @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
168
+ # @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
168
169
  # @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
169
170
  # @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
170
171
  # @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
@@ -174,7 +175,7 @@ module Phrase
174
175
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
175
176
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
176
177
  # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
177
- # @return [nil]
178
+ # @return [File]
178
179
  def locale_download(project_id, id, opts = {})
179
180
  data, _status_code, _headers = locale_download_with_http_info(project_id, id, opts)
180
181
  data
@@ -191,6 +192,7 @@ module Phrase
191
192
  # @option opts [String] :tags Limit results to keys tagged with a list of comma separated tag names.
192
193
  # @option opts [String] :tag Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead
193
194
  # @option opts [Boolean] :include_empty_translations Indicates whether keys without translations should be included in the output as well.
195
+ # @option opts [Boolean] :exclude_empty_zero_forms Indicates whether zero forms should be included when empty in pluralized keys.
194
196
  # @option opts [Boolean] :include_translated_keys Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
195
197
  # @option opts [Boolean] :keep_notranslate_tags Indicates whether [NOTRANSLATE] tags should be kept.
196
198
  # @option opts [Boolean] :convert_emoji This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
@@ -200,7 +202,7 @@ module Phrase
200
202
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
201
203
  # @option opts [Boolean] :use_last_reviewed_version If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
202
204
  # @option opts [String] :fallback_locale_id If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &lt;code&gt;true&lt;/code&gt;.
203
- # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
205
+ # @return [Array<(Response<(File)>, Integer, Hash)>] Response<(File)> data, response status code and response headers
204
206
  def locale_download_with_http_info(project_id, id, opts = {})
205
207
  if @api_client.config.debugging
206
208
  @api_client.config.logger.debug 'Calling API: LocalesApi.locale_download ...'
@@ -223,6 +225,7 @@ module Phrase
223
225
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].nil?
224
226
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
225
227
  query_params[:'include_empty_translations'] = opts[:'include_empty_translations'] if !opts[:'include_empty_translations'].nil?
228
+ query_params[:'exclude_empty_zero_forms'] = opts[:'exclude_empty_zero_forms'] if !opts[:'exclude_empty_zero_forms'].nil?
226
229
  query_params[:'include_translated_keys'] = opts[:'include_translated_keys'] if !opts[:'include_translated_keys'].nil?
227
230
  query_params[:'keep_notranslate_tags'] = opts[:'keep_notranslate_tags'] if !opts[:'keep_notranslate_tags'].nil?
228
231
  query_params[:'convert_emoji'] = opts[:'convert_emoji'] if !opts[:'convert_emoji'].nil?
@@ -235,6 +238,8 @@ module Phrase
235
238
 
236
239
  # header parameters
237
240
  header_params = opts[:header_params] || {}
241
+ # HTTP header 'Accept' (if needed)
242
+ header_params['Accept'] = @api_client.select_header_accept(['*'])
238
243
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
239
244
 
240
245
  # form parameters
@@ -244,7 +249,7 @@ module Phrase
244
249
  post_body = opts[:body]
245
250
 
246
251
  # return_type
247
- return_type = opts[:return_type]
252
+ return_type = opts[:return_type] || 'File'
248
253
 
249
254
  # auth_names
250
255
  auth_names = opts[:auth_names] || ['Basic', 'Token']
@@ -229,6 +229,86 @@ module Phrase
229
229
  return response, status_code, headers
230
230
  end
231
231
 
232
+ # Update a member's project settings
233
+ # Update user settings in the project. Access token scope must include <code>team.manage</code>.
234
+ # @param project_id [String] Project ID
235
+ # @param id [String] ID
236
+ # @param member_update_settings_parameters [MemberUpdateSettingsParameters]
237
+ # @param [Hash] opts the optional parameters
238
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
239
+ # @return [MemberProjectDetail]
240
+ def member_update_settings(project_id, id, member_update_settings_parameters, opts = {})
241
+ data, _status_code, _headers = member_update_settings_with_http_info(project_id, id, member_update_settings_parameters, opts)
242
+ data
243
+ end
244
+
245
+ # Update a member&#39;s project settings
246
+ # Update user settings in the project. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.
247
+ # @param project_id [String] Project ID
248
+ # @param id [String] ID
249
+ # @param member_update_settings_parameters [MemberUpdateSettingsParameters]
250
+ # @param [Hash] opts the optional parameters
251
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
252
+ # @return [Array<(Response<(MemberProjectDetail)>, Integer, Hash)>] Response<(MemberProjectDetail)> data, response status code and response headers
253
+ def member_update_settings_with_http_info(project_id, id, member_update_settings_parameters, opts = {})
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: MembersApi.member_update_settings ...'
256
+ end
257
+ # verify the required parameter 'project_id' is set
258
+ if @api_client.config.client_side_validation && project_id.nil?
259
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling MembersApi.member_update_settings"
260
+ end
261
+ # verify the required parameter 'id' is set
262
+ if @api_client.config.client_side_validation && id.nil?
263
+ fail ArgumentError, "Missing the required parameter 'id' when calling MembersApi.member_update_settings"
264
+ end
265
+ # verify the required parameter 'member_update_settings_parameters' is set
266
+ if @api_client.config.client_side_validation && member_update_settings_parameters.nil?
267
+ fail ArgumentError, "Missing the required parameter 'member_update_settings_parameters' when calling MembersApi.member_update_settings"
268
+ end
269
+ # resource path
270
+ local_var_path = '/projects/{project_id}/members/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
+ # HTTP header 'Content-Type'
280
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
281
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
282
+
283
+ # form parameters
284
+ form_params = opts[:form_params] || {}
285
+
286
+ # http body (model)
287
+ post_body = opts[:body] || @api_client.object_to_http_body(member_update_settings_parameters)
288
+
289
+ # return_type
290
+ return_type = opts[:return_type] || 'MemberProjectDetail'
291
+
292
+ # auth_names
293
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
294
+
295
+ new_options = opts.merge(
296
+ :header_params => header_params,
297
+ :query_params => query_params,
298
+ :form_params => form_params,
299
+ :body => post_body,
300
+ :auth_names => auth_names,
301
+ :return_type => return_type
302
+ )
303
+
304
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
305
+ if @api_client.config.debugging
306
+ @api_client.config.logger.debug "API called: MembersApi#member_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
307
+ end
308
+ response = ::Phrase::Response.new(data, headers)
309
+ return response, status_code, headers
310
+ end
311
+
232
312
  # List members
233
313
  # Get all users active in the account. It also lists resources like projects and locales the member has access to. In case nothing is shown the default access from the role is used. Access token scope must include <code>team.manage</code>.
234
314
  # @param account_id [String] Account ID
@@ -93,6 +93,7 @@ module Phrase
93
93
  # @param screenshot_id [String] Screenshot ID
94
94
  # @param [Hash] opts the optional parameters
95
95
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
96
+ # @option opts [String] :branch specify the branch to use
96
97
  # @return [nil]
97
98
  def screenshot_marker_delete(project_id, screenshot_id, opts = {})
98
99
  data, _status_code, _headers = screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts)
@@ -105,6 +106,7 @@ module Phrase
105
106
  # @param screenshot_id [String] Screenshot ID
106
107
  # @param [Hash] opts the optional parameters
107
108
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
109
+ # @option opts [String] :branch specify the branch to use
108
110
  # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
109
111
  def screenshot_marker_delete_with_http_info(project_id, screenshot_id, opts = {})
110
112
  if @api_client.config.debugging
@@ -123,6 +125,7 @@ module Phrase
123
125
 
124
126
  # query parameters
125
127
  query_params = opts[:query_params] || {}
128
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
126
129
 
127
130
  # header parameters
128
131
  header_params = opts[:header_params] || {}
@@ -164,6 +167,7 @@ module Phrase
164
167
  # @param id [String] ID
165
168
  # @param [Hash] opts the optional parameters
166
169
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
170
+ # @option opts [String] :branch specify the branch to use
167
171
  # @return [ScreenshotMarker]
168
172
  def screenshot_marker_show(project_id, screenshot_id, id, opts = {})
169
173
  data, _status_code, _headers = screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts)
@@ -177,6 +181,7 @@ module Phrase
177
181
  # @param id [String] ID
178
182
  # @param [Hash] opts the optional parameters
179
183
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
184
+ # @option opts [String] :branch specify the branch to use
180
185
  # @return [Array<(Response<(ScreenshotMarker)>, Integer, Hash)>] Response<(ScreenshotMarker)> data, response status code and response headers
181
186
  def screenshot_marker_show_with_http_info(project_id, screenshot_id, id, opts = {})
182
187
  if @api_client.config.debugging
@@ -199,6 +204,7 @@ module Phrase
199
204
 
200
205
  # query parameters
201
206
  query_params = opts[:query_params] || {}
207
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
202
208
 
203
209
  # header parameters
204
210
  header_params = opts[:header_params] || {}
@@ -323,6 +329,7 @@ module Phrase
323
329
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
324
330
  # @option opts [Integer] :page Page number
325
331
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
332
+ # @option opts [String] :branch specify the branch to use
326
333
  # @return [Array<ScreenshotMarker>]
327
334
  def screenshot_markers_list(project_id, id, opts = {})
328
335
  data, _status_code, _headers = screenshot_markers_list_with_http_info(project_id, id, opts)
@@ -337,6 +344,7 @@ module Phrase
337
344
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
338
345
  # @option opts [Integer] :page Page number
339
346
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
347
+ # @option opts [String] :branch specify the branch to use
340
348
  # @return [Array<(Response<(Array<ScreenshotMarker>)>, Integer, Hash)>] Response<(Array<ScreenshotMarker>)> data, response status code and response headers
341
349
  def screenshot_markers_list_with_http_info(project_id, id, opts = {})
342
350
  if @api_client.config.debugging
@@ -357,6 +365,7 @@ module Phrase
357
365
  query_params = opts[:query_params] || {}
358
366
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
359
367
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
368
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
360
369
 
361
370
  # header parameters
362
371
  header_params = opts[:header_params] || {}
@@ -87,6 +87,7 @@ module Phrase
87
87
  # @param id [String] ID
88
88
  # @param [Hash] opts the optional parameters
89
89
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
90
+ # @option opts [String] :branch specify the branch to use
90
91
  # @return [nil]
91
92
  def screenshot_delete(project_id, id, opts = {})
92
93
  data, _status_code, _headers = screenshot_delete_with_http_info(project_id, id, opts)
@@ -99,6 +100,7 @@ module Phrase
99
100
  # @param id [String] ID
100
101
  # @param [Hash] opts the optional parameters
101
102
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
103
+ # @option opts [String] :branch specify the branch to use
102
104
  # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
103
105
  def screenshot_delete_with_http_info(project_id, id, opts = {})
104
106
  if @api_client.config.debugging
@@ -117,6 +119,7 @@ module Phrase
117
119
 
118
120
  # query parameters
119
121
  query_params = opts[:query_params] || {}
122
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
120
123
 
121
124
  # header parameters
122
125
  header_params = opts[:header_params] || {}
@@ -157,6 +160,7 @@ module Phrase
157
160
  # @param id [String] ID
158
161
  # @param [Hash] opts the optional parameters
159
162
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
163
+ # @option opts [String] :branch specify the branch to use
160
164
  # @return [Screenshot]
161
165
  def screenshot_show(project_id, id, opts = {})
162
166
  data, _status_code, _headers = screenshot_show_with_http_info(project_id, id, opts)
@@ -169,6 +173,7 @@ module Phrase
169
173
  # @param id [String] ID
170
174
  # @param [Hash] opts the optional parameters
171
175
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
176
+ # @option opts [String] :branch specify the branch to use
172
177
  # @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
173
178
  def screenshot_show_with_http_info(project_id, id, opts = {})
174
179
  if @api_client.config.debugging
@@ -187,6 +192,7 @@ module Phrase
187
192
 
188
193
  # query parameters
189
194
  query_params = opts[:query_params] || {}
195
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
190
196
 
191
197
  # header parameters
192
198
  header_params = opts[:header_params] || {}
@@ -310,6 +316,7 @@ module Phrase
310
316
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
311
317
  # @option opts [Integer] :page Page number
312
318
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
319
+ # @option opts [String] :branch specify the branch to use
313
320
  # @option opts [String] :key_id filter by key
314
321
  # @return [Array<Screenshot>]
315
322
  def screenshots_list(project_id, opts = {})
@@ -324,6 +331,7 @@ module Phrase
324
331
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
325
332
  # @option opts [Integer] :page Page number
326
333
  # @option opts [Integer] :per_page allows you to specify a page size up to 100 items, 25 by default
334
+ # @option opts [String] :branch specify the branch to use
327
335
  # @option opts [String] :key_id filter by key
328
336
  # @return [Array<(Response<(Array<Screenshot>)>, Integer, Hash)>] Response<(Array<Screenshot>)> data, response status code and response headers
329
337
  def screenshots_list_with_http_info(project_id, opts = {})
@@ -341,6 +349,7 @@ module Phrase
341
349
  query_params = opts[:query_params] || {}
342
350
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
343
351
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
352
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
344
353
  query_params[:'key_id'] = opts[:'key_id'] if !opts[:'key_id'].nil?
345
354
 
346
355
  # header parameters