phrase 4.26.0 → 4.28.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +14 -3
  4. data/docs/CheckIssue.md +33 -0
  5. data/docs/ChecksApi.md +146 -0
  6. data/docs/JobCreateParameters.md +1 -1
  7. data/docs/KeyCreateParameters.md +1 -1
  8. data/docs/KeyUpdateParameters.md +1 -1
  9. data/docs/Locale.md +6 -0
  10. data/docs/LocaleCreateParameters.md +2 -0
  11. data/docs/LocaleDetails.md +6 -0
  12. data/docs/LocaleUpdateParameters.md +2 -0
  13. data/docs/MachineTranslationApi.md +263 -0
  14. data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
  15. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
  16. data/docs/MachineTranslationSettings.md +23 -0
  17. data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
  18. data/docs/MemberUpdateParameters.md +2 -2
  19. data/docs/MembersApi.md +1 -1
  20. data/docs/ProjectCreateParameters.md +9 -3
  21. data/docs/ProjectDetails.md +5 -1
  22. data/docs/ProjectUpdateParameters.md +9 -3
  23. data/docs/ProjectsApi.md +1 -1
  24. data/docs/ScreenshotUpdateParameters.md +1 -1
  25. data/docs/SpacesApi.md +3 -1
  26. data/docs/Upload.md +3 -1
  27. data/docs/UploadsApi.md +4 -4
  28. data/lib/phrase/api/checks_api.rb +174 -0
  29. data/lib/phrase/api/machine_translation_api.rb +302 -0
  30. data/lib/phrase/api/members_api.rb +2 -2
  31. data/lib/phrase/api/projects_api.rb +2 -2
  32. data/lib/phrase/api/spaces_api.rb +3 -0
  33. data/lib/phrase/api/uploads_api.rb +6 -6
  34. data/lib/phrase/models/check_issue.rb +319 -0
  35. data/lib/phrase/models/job_create_parameters.rb +1 -1
  36. data/lib/phrase/models/locale.rb +31 -1
  37. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  38. data/lib/phrase/models/locale_details.rb +31 -1
  39. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  40. data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
  41. data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
  42. data/lib/phrase/models/machine_translation_settings.rb +230 -0
  43. data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
  44. data/lib/phrase/models/member_update_parameters.rb +2 -2
  45. data/lib/phrase/models/project_create_parameters.rb +48 -2
  46. data/lib/phrase/models/project_details.rb +53 -1
  47. data/lib/phrase/models/project_update_parameters.rb +48 -2
  48. data/lib/phrase/models/upload.rb +13 -1
  49. data/lib/phrase/version.rb +1 -1
  50. data/lib/phrase.rb +7 -0
  51. data/spec/api/checks_api_spec.rb +56 -0
  52. data/spec/api/machine_translation_api_spec.rb +79 -0
  53. data/spec/api/members_api_spec.rb +1 -1
  54. data/spec/api/projects_api_spec.rb +1 -1
  55. data/spec/api/spaces_api_spec.rb +1 -0
  56. data/spec/models/check_issue_spec.rb +85 -0
  57. data/spec/models/locale_create_parameters_spec.rb +6 -0
  58. data/spec/models/locale_details_spec.rb +18 -0
  59. data/spec/models/locale_spec.rb +18 -0
  60. data/spec/models/locale_update_parameters_spec.rb +6 -0
  61. data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
  62. data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
  63. data/spec/models/machine_translation_settings_spec.rb +47 -0
  64. data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
  65. data/spec/models/project_create_parameters_spec.rb +22 -0
  66. data/spec/models/project_details_spec.rb +16 -0
  67. data/spec/models/project_update_parameters_spec.rb +22 -0
  68. data/spec/models/upload_spec.rb +6 -0
  69. metadata +292 -264
@@ -0,0 +1,21 @@
1
+ # Phrase::MachineTranslationLocaleProviderMapping
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **source_locale_code** | **String** | The locale code of the source language for this mapping. | [optional]
8
+ **target_locale_code** | **String** | The locale code of the target language for this mapping. | [optional]
9
+ **service** | **String** | The translation service applied when translating from source to target locale. | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'Phrase'
15
+
16
+ instance = Phrase::MachineTranslationLocaleProviderMapping.new(source_locale_code: en,
17
+ target_locale_code: de,
18
+ service: google_translate)
19
+ ```
20
+
21
+
@@ -0,0 +1,21 @@
1
+ # Phrase::MachineTranslationLocaleProviderMappingsCreateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **source_locale_code** | **String** | The locale code of the source language (e.g. \"en\"). |
8
+ **target_locale_code** | **String** | The locale code of the target language (e.g. \"de\"). Must differ from source_locale_code. |
9
+ **service** | **String** | The machine translation service to use for this locale pair. Must be a service enabled for the account. |
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'Phrase'
15
+
16
+ instance = Phrase::MachineTranslationLocaleProviderMappingsCreateParameters.new(source_locale_code: en,
17
+ target_locale_code: de,
18
+ service: google_translate)
19
+ ```
20
+
21
+
@@ -0,0 +1,23 @@
1
+ # Phrase::MachineTranslationSettings
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **default_service** | **String** | The default machine translation engine configured for the account. Returns \"microsoft_translate\" when no service has been explicitly configured. Supported values: language_ai_translate, aita_translate, microsoft_translate, google_translate, amazon_translate, intento_translate, gpt_translate. | [optional]
8
+ **machine_translation_units_used** | **Integer** | Number of machine translation characters consumed in the current billing period. | [optional]
9
+ **machine_translation_units_total** | **Integer** | Total machine translation character quota granted for the current billing period. | [optional]
10
+ **locale_provider_mappings** | [**Array<MachineTranslationLocaleProviderMapping>**](MachineTranslationLocaleProviderMapping.md) | Per-locale-pair provider overrides. When a matching mapping exists for a source/target locale pair, that provider takes precedence over the account default. | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'Phrase'
16
+
17
+ instance = Phrase::MachineTranslationSettings.new(default_service: google_translate,
18
+ machine_translation_units_used: 12500,
19
+ machine_translation_units_total: 1000000,
20
+ locale_provider_mappings: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,17 @@
1
+ # Phrase::MachineTranslationSettingsUpdateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **default_service** | **String** | The machine translation engine to use as the account default. Supported values: language_ai_translate, aita_translate, microsoft_translate, google_translate, amazon_translate. Pass null or an empty string to reset to the plan default. | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'Phrase'
13
+
14
+ instance = Phrase::MachineTranslationSettingsUpdateParameters.new(default_service: google_translate)
15
+ ```
16
+
17
+
@@ -7,8 +7,8 @@ Name | Type | Description | Notes
7
7
  **strategy** | **String** | Update strategy, can be any of set, add, remove. If provided, it will set, add or remove given spaces, projects and locale ids from users access list. | [optional]
8
8
  **role** | **String** | Member role, can be any of of Admin, ProjectManager, Developer, Designer, Translator | [optional]
9
9
  **project_ids** | **String** | List of project ids the user has access to. | [optional]
10
- **locale_ids** | **String** | List of locale ids the user has access to. | [optional]
11
- **default_locale_codes** | **Array<String>** | List of default locales for the user. | [optional]
10
+ **locale_ids** | **String** | List of locale ids the user has access to. This is project-scoped and must be paired with `project_ids` (and `strategy`) to take effect; it does not grant account-wide language access. | [optional]
11
+ **default_locale_codes** | **Array<String>** | List of default locales for the user, applied across all of the user's projects. This is the account-level field corresponding to \"Language access\" in the translator profile UI. | [optional]
12
12
  **space_ids** | **Array<String>** | List of spaces the user is assigned to. | [optional]
13
13
  **permissions** | **Hash<String, String>** | Additional permissions depending on member role. Available permissions are `create_upload` and `review_translations` | [optional]
14
14
 
data/docs/MembersApi.md CHANGED
@@ -143,7 +143,7 @@ Response<([**Member**](Member.md))>
143
143
 
144
144
  Update a member
145
145
 
146
- Update user permissions in the account. Developers and translators need `project_ids` and `locale_ids` assigned to access them. Access token scope must include `team.manage`.
146
+ Update user permissions in the account. Developers and translators need `project_ids` and `locale_ids` assigned to access them. To grant account-wide language access instead of access scoped to specific projects, use `default_locale_codes`. Access token scope must include `team.manage`.
147
147
 
148
148
  ### Example
149
149
 
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
8
8
  **main_format** | **String** | Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see [Format Guide](https://support.phrase.com/hc/en-us/sections/6111343326364) or our [Formats API Endpoint](/en/api/strings/formats/list-formats). | [optional]
9
9
  **media** | **String** | (Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: &#x60;Ruby&#x60;, &#x60;JavaScript&#x60;, &#x60;AngularJS&#x60;, &#x60;React&#x60;, &#x60;iOS&#x60;, &#x60;Android&#x60;, &#x60;Python&#x60;, &#x60;PHP&#x60;, &#x60;Java&#x60;, &#x60;Go&#x60;, &#x60;Windows Phone&#x60;, &#x60;Rails&#x60;, &#x60;Node.js&#x60;, &#x60;.NET&#x60;, &#x60;Django&#x60;, &#x60;Symfony&#x60;, &#x60;Yii Framework&#x60;, &#x60;Zend Framework&#x60;, &#x60;Apple App Store Description&#x60;, &#x60;Google Play Description&#x60;, but it can also take any other value. | [optional]
10
10
  **shares_translation_memory** | **Boolean** | Indicates whether the project should share the account&#39;s translation memory | [optional]
11
+ **tm_ids** | **Array&lt;String&gt;** | List of TMS translation memory IDs, used to provide reference translations for the AI translation agent. | [optional]
12
+ **term_base_ids** | **Array&lt;String&gt;** | List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent. | [optional]
11
13
  **project_image** | **File** | Image to identify the project | [optional]
12
14
  **remove_project_image** | **Boolean** | Indicates whether the project image should be deleted. | [optional]
13
15
  **account_id** | **String** | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. | [optional]
@@ -28,6 +30,7 @@ Name | Type | Description | Notes
28
30
  **autotranslate_use_machine_translation** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
29
31
  **autotranslate_use_translation_memory** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
30
32
  **autotranslate_overwrite_unverified_translations** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
33
+ **fallback_for_unverified_translations** | **Boolean** | (Optional) When enabled, the fallback locale&#39;s translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale. | [optional]
31
34
  **autocomplete_job_enabled** | **Boolean** | (Optional) Enable autocomplete-job behavior so that newly created keys and locales are automatically added to in-progress jobs. | [optional]
32
35
  **job_locking_enabled** | **Boolean** | (Optional) When enabled, translations are locked once a job moves into review. | [optional]
33
36
  **smart_suggest_enabled** | **Boolean** | (Optional) Enable Smart Suggest for the project. Defaults to &#x60;true&#x60; when omitted. | [optional]
@@ -35,7 +38,7 @@ Name | Type | Description | Notes
35
38
  **smart_suggest_use_machine_translation** | **Boolean** | (Optional) Allow Smart Suggest to source suggestions from machine translation. Defaults to &#x60;true&#x60; when omitted. | [optional]
36
39
  **translation_keys_sort_collation** | **String** | (Optional) Collation used when sorting translation keys alphabetically. Defaults to &#x60;unicode_ci&#x60; when omitted. | [optional]
37
40
  **default_encoding** | **String** | (Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the [&#x60;file_encoding&#x60;](/en/api/strings/uploads/upload-a-new-file) parameter for Uploads. | [optional]
38
- **cldr_version** | **String** | (Optional) CLDR plural-rule version used by the project. | [optional]
41
+ **cldr_version** | **String** | (Optional) CLDR plural-rule version used by the project. Pass &#x60;legacy&#x60; for pre-CLDR pluralization behaviour, or a CLDR version string such as &#x60;cldr48&#x60;. Also used as the default version for the ICU skeleton endpoint (&#x60;POST /icu/skeleton&#x60;) when its own &#x60;cldr_version&#x60; parameter is omitted. | [optional]
39
42
  **placeholder_styles** | **Array&lt;String&gt;** | (Optional) List of placeholder styles enabled for the project. | [optional]
40
43
 
41
44
  ## Code Sample
@@ -47,7 +50,9 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
47
50
  main_format: yml,
48
51
  media: Python,
49
52
  shares_translation_memory: true,
50
- project_image: [B@2fb3113a,
53
+ tm_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
54
+ term_base_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
55
+ project_image: [B@104d07a8,
51
56
  remove_project_image: null,
52
57
  account_id: abcd1234,
53
58
  point_of_contact: abcd1234,
@@ -67,6 +72,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
67
72
  autotranslate_use_machine_translation: true,
68
73
  autotranslate_use_translation_memory: true,
69
74
  autotranslate_overwrite_unverified_translations: true,
75
+ fallback_for_unverified_translations: false,
70
76
  autocomplete_job_enabled: false,
71
77
  job_locking_enabled: false,
72
78
  smart_suggest_enabled: true,
@@ -75,7 +81,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
75
81
  translation_keys_sort_collation: unicode_ci,
76
82
  default_encoding: UTF-8,
77
83
  cldr_version: cldr48,
78
- placeholder_styles: [&quot;angular&quot;,&quot;iOS&quot;])
84
+ placeholder_styles: [&quot;rails_i18n&quot;,&quot;java_properties&quot;])
79
85
  ```
80
86
 
81
87
 
@@ -30,9 +30,11 @@ Name | Type | Description | Notes
30
30
  **autotranslate_use_machine_translation** | **Boolean** | | [optional]
31
31
  **autotranslate_use_translation_memory** | **Boolean** | | [optional]
32
32
  **autotranslate_overwrite_unverified_translations** | **Boolean** | | [optional]
33
+ **fallback_for_unverified_translations** | **Boolean** | | [optional]
33
34
  **autocomplete_job_enabled** | **Boolean** | | [optional]
34
35
  **default_encoding** | **String** | | [optional]
35
36
  **cldr_version** | **String** | | [optional]
37
+ **translation_keys_sort_collation** | **String** | | [optional]
36
38
  **job_locking_enabled** | **Boolean** | | [optional]
37
39
  **placeholder_styles** | **Array&lt;String&gt;** | | [optional]
38
40
  **branch** | [**Branch**](Branch.md) | | [optional]
@@ -68,11 +70,13 @@ instance = Phrase::ProjectDetails.new(id: null,
68
70
  autotranslate_use_machine_translation: false,
69
71
  autotranslate_use_translation_memory: true,
70
72
  autotranslate_overwrite_unverified_translations: false,
73
+ fallback_for_unverified_translations: false,
71
74
  autocomplete_job_enabled: false,
72
75
  default_encoding: UTF-8,
73
76
  cldr_version: legacy,
77
+ translation_keys_sort_collation: unicode_ci,
74
78
  job_locking_enabled: false,
75
- placeholder_styles: [&quot;angular&quot;,&quot;iOS&quot;],
79
+ placeholder_styles: [&quot;rails_i18n&quot;,&quot;java_properties&quot;],
76
80
  branch: null)
77
81
  ```
78
82
 
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
10
10
  **main_format** | **String** | (Optional) Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see [Format Guide](https://support.phrase.com/hc/en-us/sections/6111343326364) or our [Formats API Endpoint](#formats). | [optional]
11
11
  **media** | **String** | (Optional) Main technology stack used in the project. It affects for example the suggested placeholder style. Predefined values include: &#x60;Ruby&#x60;, &#x60;JavaScript&#x60;, &#x60;AngularJS&#x60;, &#x60;React&#x60;, &#x60;iOS&#x60;, &#x60;Android&#x60;, &#x60;Python&#x60;, &#x60;PHP&#x60;, &#x60;Java&#x60;, &#x60;Go&#x60;, &#x60;Windows Phone&#x60;, &#x60;Rails&#x60;, &#x60;Node.js&#x60;, &#x60;.NET&#x60;, &#x60;Django&#x60;, &#x60;Symfony&#x60;, &#x60;Yii Framework&#x60;, &#x60;Zend Framework&#x60;, &#x60;Apple App Store Description&#x60;, &#x60;Google Play Description&#x60;, but it can also take any other value. | [optional]
12
12
  **shares_translation_memory** | **Boolean** | (Optional) Indicates whether the project should share the account&#39;s translation memory | [optional]
13
+ **tm_ids** | **Array&lt;String&gt;** | List of TMS translation memory IDs, used to provide reference translations for the AI translation agent. | [optional]
14
+ **term_base_ids** | **Array&lt;String&gt;** | List of TMS term base IDs, used to ensure consistent terminology for the AI translation agent. | [optional]
13
15
  **project_image** | **File** | (Optional) Image to identify the project | [optional]
14
16
  **remove_project_image** | **Boolean** | (Optional) Indicates whether the project image should be deleted. | [optional]
15
17
  **workflow** | **String** | (Optional) Review Workflow. \&quot;simple\&quot; / \&quot;review\&quot;. [Read more](https://support.phrase.com/hc/en-us/articles/5784094755484) | [optional]
@@ -27,6 +29,7 @@ Name | Type | Description | Notes
27
29
  **autotranslate_use_machine_translation** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
28
30
  **autotranslate_use_translation_memory** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
29
31
  **autotranslate_overwrite_unverified_translations** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
32
+ **fallback_for_unverified_translations** | **Boolean** | (Optional) When enabled, the fallback locale&#39;s translation is used on export for unverified translations in addition to empty ones. Requires a fallback locale to be configured on the locale. | [optional]
30
33
  **default_encoding** | **String** | (Optional) Sets the default encoding for Uploads. If you leave it empty, we will try to guess it automatically for you when you Upload a file. You can still override this value by setting the [&#x60;file_encoding&#x60;](/en/api/strings/uploads/upload-a-new-file) parameter for Uploads. | [optional]
31
34
  **placeholder_styles** | **Array&lt;String&gt;** | (Optional) List of placeholder styles enabled for the project. | [optional]
32
35
  **autocomplete_job_enabled** | **Boolean** | (Optional) Enable autocomplete-job behavior so that newly created keys and locales are automatically added to in-progress jobs. | [optional]
@@ -35,7 +38,7 @@ Name | Type | Description | Notes
35
38
  **smart_suggest_use_glossary** | **Boolean** | (Optional) Allow Smart Suggest to source suggestions from the project glossary. | [optional]
36
39
  **smart_suggest_use_machine_translation** | **Boolean** | (Optional) Allow Smart Suggest to source suggestions from machine translation. | [optional]
37
40
  **translation_keys_sort_collation** | **String** | (Optional) Collation used when sorting translation keys alphabetically. | [optional]
38
- **cldr_version** | **String** | (Optional) CLDR plural-rule version used by the project. | [optional]
41
+ **cldr_version** | **String** | (Optional) CLDR plural-rule version used by the project. Pass &#x60;legacy&#x60; for pre-CLDR pluralization behaviour, or a CLDR version string such as &#x60;cldr48&#x60;. Also used as the default version for the ICU skeleton endpoint (&#x60;POST /icu/skeleton&#x60;) when its own &#x60;cldr_version&#x60; parameter is omitted. | [optional]
39
42
 
40
43
  ## Code Sample
41
44
 
@@ -48,7 +51,9 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
48
51
  main_format: yml,
49
52
  media: Python,
50
53
  shares_translation_memory: true,
51
- project_image: [B@225ad262,
54
+ tm_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
55
+ term_base_ids: [&quot;abcd1234cdef1234abcd1234cdef1234&quot;],
56
+ project_image: [B@6fa53b0d,
52
57
  remove_project_image: false,
53
58
  workflow: review,
54
59
  machine_translation_enabled: true,
@@ -65,8 +70,9 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
65
70
  autotranslate_use_machine_translation: true,
66
71
  autotranslate_use_translation_memory: true,
67
72
  autotranslate_overwrite_unverified_translations: true,
73
+ fallback_for_unverified_translations: false,
68
74
  default_encoding: UTF-8,
69
- placeholder_styles: [&quot;angular&quot;,&quot;iOS&quot;],
75
+ placeholder_styles: [&quot;rails_i18n&quot;,&quot;java_properties&quot;],
70
76
  autocomplete_job_enabled: false,
71
77
  job_locking_enabled: false,
72
78
  smart_suggest_enabled: true,
data/docs/ProjectsApi.md CHANGED
@@ -200,7 +200,7 @@ Response<([**ProjectDetails**](ProjectDetails.md))>
200
200
 
201
201
  Update a project
202
202
 
203
- Update an existing project.
203
+ Update an existing project, including its review workflow, pre-translation/autotranslate rules, and machine-translation configuration (see workflow, machine_translation_enabled, and the autotranslate_* fields below).
204
204
 
205
205
  ### Example
206
206
 
@@ -17,7 +17,7 @@ require 'Phrase'
17
17
  instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
18
18
  name: A screenshot name,
19
19
  description: A screenshot description,
20
- filename: [B@1ddcb450)
20
+ filename: [B@4b16145)
21
21
  ```
22
22
 
23
23
 
data/docs/SpacesApi.md CHANGED
@@ -297,7 +297,8 @@ account_id = 'account_id_example' # String | Account ID
297
297
  opts = {
298
298
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
299
299
  page: 1, # Integer | Page number
300
- per_page: 25 # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
300
+ per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
301
+ q: 'name:Engineering' # String | Filter results by name. Supports the prefix-match syntax `name:<value>`, which returns only spaces whose names begin with `<value>`. Other query formats are ignored; omitting `q` returns all accessible spaces.
301
302
  }
302
303
 
303
304
  begin
@@ -318,6 +319,7 @@ Name | Type | Description | Notes
318
319
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
319
320
  **page** | **Integer**| Page number | [optional]
320
321
  **per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
322
+ **q** | **String**| Filter results by name. Supports the prefix-match syntax &#x60;name:&lt;value&gt;&#x60;, which returns only spaces whose names begin with &#x60;&lt;value&gt;&#x60;. Other query formats are ignored; omitting &#x60;q&#x60; returns all accessible spaces. | [optional]
321
323
 
322
324
  ### Return type
323
325
 
data/docs/Upload.md CHANGED
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
7
7
  **id** | **String** | | [optional]
8
8
  **filename** | **String** | | [optional]
9
9
  **format** | **String** | | [optional]
10
- **state** | **String** | | [optional]
10
+ **state** | **String** | Processing state of the upload: &#x60;initialized&#x60;, &#x60;processing&#x60;, &#x60;success&#x60;, or &#x60;error&#x60;. &#x60;error&#x60; means processing failed — for example the file could not be parsed, or a provided &#x60;file_format&#x60; didn&#39;t match the file&#39;s actual content. Poll this field until it leaves &#x60;initialized&#x60;/&#x60;processing&#x60; to get the final outcome. | [optional]
11
+ **error_message** | **String** | A user-facing message explaining why the upload failed, or &#x60;null&#x60; if the upload did not fail. This message is intended for display only. Its wording may change at any time and it should not be parsed or relied upon programmatically. | [optional]
11
12
  **tag** | **String** | Unique tag of the upload | [optional]
12
13
  **tags** | **Array&lt;String&gt;** | List of tags that were assigned to the uploaded keys | [optional]
13
14
  **url** | **String** | The URL to the upload in Phrase Strings app. | [optional]
@@ -25,6 +26,7 @@ instance = Phrase::Upload.new(id: null,
25
26
  filename: null,
26
27
  format: null,
27
28
  state: null,
29
+ error_message: null,
28
30
  tag: null,
29
31
  tags: null,
30
32
  url: null,
data/docs/UploadsApi.md CHANGED
@@ -16,7 +16,7 @@ Method | HTTP request | Description
16
16
 
17
17
  Upload a new file
18
18
 
19
- Upload a new language file. Creates necessary resources in your project. Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
19
+ Upload a new language file. Creates necessary resources in your project. The upload is processed asynchronously: this endpoint returns `201 Created` once the file has been accepted and enqueued, not once processing has finished. Poll `GET /projects/{project_id}/uploads/{id}` and check the `state` field — `error` means processing failed (for example, an unparseable file or a `file_format` that doesn't match the file's actual content). Note: be aware of [upload limits](https://support.phrase.com/hc/en-us/articles/8548271212188-Phrase-Strings-Limits#file-size-upload-limits-0-0).
20
20
 
21
21
  ### Example
22
22
 
@@ -37,7 +37,7 @@ end
37
37
  api_instance = Phrase::UploadsApi.new
38
38
  project_id = 'project_id_example' # String | Project ID
39
39
  file = File.new('/path/to/some/file') # File | File to be imported
40
- file_format = 'file_format_example' # String | File format. Auto-detected when possible and not specified.
40
+ file_format = 'file_format_example' # String | File format of the uploaded file, given as a format's `api_name`. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file's content. This is not always possible for JSON files, since several JSON-based formats (e.g. `json`, `simple_json`, `nested_json`) share the same structure.
41
41
  locale_id = 'locale_id_example' # String | Locale of the file's content. Can be the name or id of the locale. Preferred is id.
42
42
  opts = {
43
43
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
@@ -79,7 +79,7 @@ Name | Type | Description | Notes
79
79
  ------------- | ------------- | ------------- | -------------
80
80
  **project_id** | **String**| Project ID |
81
81
  **file** | **File**| File to be imported |
82
- **file_format** | **String**| File format. Auto-detected when possible and not specified. |
82
+ **file_format** | **String**| File format of the uploaded file, given as a format&#39;s &#x60;api_name&#x60;. See our [Formats API Endpoint](/en/api/strings/formats/list-formats) for the full list of supported formats. Optional. When omitted, Phrase tries to auto-detect the format from the file&#39;s content. This is not always possible for JSON files, since several JSON-based formats (e.g. &#x60;json&#x60;, &#x60;simple_json&#x60;, &#x60;nested_json&#x60;) share the same structure. |
83
83
  **locale_id** | **String**| Locale of the file&#39;s content. Can be the name or id of the locale. Preferred is id. |
84
84
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
85
85
  **branch** | **String**| specify the branch to use | [optional]
@@ -123,7 +123,7 @@ Response<([**Upload**](Upload.md))>
123
123
 
124
124
  Get a single upload
125
125
 
126
- View details and summary for a single upload.
126
+ View details and summary for a single upload. Use this endpoint to poll for the outcome of an upload created via `POST /projects/{project_id}/uploads` — check the `state` field.
127
127
 
128
128
  ### Example
129
129
 
@@ -0,0 +1,174 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class ChecksApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Dismiss a check issue
11
+ # **Note:** The Checks API is still in development and might change in subsequent releases. Mark a check issue as dismissed so it no longer appears on the list of active check issues.
12
+ # @param project_id [String] Project ID
13
+ # @param id [String] Check Issue ID
14
+ # @param [Hash] opts the optional parameters
15
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
16
+ # @return [CheckIssue]
17
+ def check_issue_dismiss(project_id, id, opts = {})
18
+ data, _status_code, _headers = check_issue_dismiss_with_http_info(project_id, id, opts)
19
+ data
20
+ end
21
+
22
+ # Dismiss a check issue
23
+ # **Note:** The Checks API is still in development and might change in subsequent releases. Mark a check issue as dismissed so it no longer appears on the list of active check issues.
24
+ # @param project_id [String] Project ID
25
+ # @param id [String] Check Issue ID
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
28
+ # @return [Array<(Response<(CheckIssue)>, Integer, Hash)>] Response<(CheckIssue)> data, response status code and response headers
29
+ def check_issue_dismiss_with_http_info(project_id, id, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: ChecksApi.check_issue_dismiss ...'
32
+ end
33
+ # verify the required parameter 'project_id' is set
34
+ if @api_client.config.client_side_validation && project_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ChecksApi.check_issue_dismiss"
36
+ end
37
+ # verify the required parameter 'id' is set
38
+ if @api_client.config.client_side_validation && id.nil?
39
+ fail ArgumentError, "Missing the required parameter 'id' when calling ChecksApi.check_issue_dismiss"
40
+ end
41
+ # resource path
42
+ local_var_path = '/projects/{project_id}/checks/issues/{id}/dismiss'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+
47
+ # header parameters
48
+ header_params = opts[:header_params] || {}
49
+ # HTTP header 'Accept' (if needed)
50
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
51
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body]
58
+
59
+ # return_type
60
+ return_type = opts[:return_type] || 'CheckIssue'
61
+
62
+ # auth_names
63
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
64
+
65
+ new_options = opts.merge(
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: ChecksApi#check_issue_dismiss\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ response = ::Phrase::Response.new(data, headers)
79
+ return response, status_code, headers
80
+ end
81
+
82
+ # List check issues
83
+ # **Note:** The Checks API is still in development and might change in subsequent releases. List check issues for the given project. Results can be filtered by locale, check name, and state.
84
+ # @param project_id [String] Project ID
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
87
+ # @option opts [Integer] :page Page number
88
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
89
+ # @option opts [String] :state Filter by state of the check issue. Can be one of: &#x60;active&#x60;, &#x60;solved&#x60;, &#x60;dismissed&#x60;, &#x60;all&#x60;. Defaults to &#x60;active&#x60;. (default to 'active')
90
+ # @option opts [Array<String>] :locale_ids Filter by one or more locale IDs.
91
+ # @option opts [Array<String>] :check_names Filter by one or more check names. Valid values are: - &#x60;translation_content_length&#x60; — the translation exceeds the maximum character limit configured for the key. - &#x60;translation_placeholder_usage&#x60; — the translation is missing placeholders present in the source, or contains unexpected ones. - &#x60;translation_glossary_usage&#x60; — the translation does not follow the glossary term translations.
92
+ # @option opts [String] :created_since Return only check issues created on or after this ISO 8601 datetime. Returns 400 if the value is not a valid date-time.
93
+ # @return [Array<CheckIssue>]
94
+ def check_issues_list(project_id, opts = {})
95
+ data, _status_code, _headers = check_issues_list_with_http_info(project_id, opts)
96
+ data
97
+ end
98
+
99
+ # List check issues
100
+ # **Note:** The Checks API is still in development and might change in subsequent releases. List check issues for the given project. Results can be filtered by locale, check name, and state.
101
+ # @param project_id [String] Project ID
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
104
+ # @option opts [Integer] :page Page number
105
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
106
+ # @option opts [String] :state Filter by state of the check issue. Can be one of: &#x60;active&#x60;, &#x60;solved&#x60;, &#x60;dismissed&#x60;, &#x60;all&#x60;. Defaults to &#x60;active&#x60;.
107
+ # @option opts [Array<String>] :locale_ids Filter by one or more locale IDs.
108
+ # @option opts [Array<String>] :check_names Filter by one or more check names. Valid values are: - &#x60;translation_content_length&#x60; — the translation exceeds the maximum character limit configured for the key. - &#x60;translation_placeholder_usage&#x60; — the translation is missing placeholders present in the source, or contains unexpected ones. - &#x60;translation_glossary_usage&#x60; — the translation does not follow the glossary term translations.
109
+ # @option opts [String] :created_since Return only check issues created on or after this ISO 8601 datetime. Returns 400 if the value is not a valid date-time.
110
+ # @return [Array<(Response<(Array<CheckIssue>)>, Integer, Hash)>] Response<(Array<CheckIssue>)> data, response status code and response headers
111
+ def check_issues_list_with_http_info(project_id, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: ChecksApi.check_issues_list ...'
114
+ end
115
+ # verify the required parameter 'project_id' is set
116
+ if @api_client.config.client_side_validation && project_id.nil?
117
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ChecksApi.check_issues_list"
118
+ end
119
+ allowable_values = ["active", "solved", "dismissed", "all"]
120
+ if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
121
+ fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
122
+ end
123
+ allowable_values = ["translation_content_length", "translation_placeholder_usage", "translation_glossary_usage"]
124
+ if @api_client.config.client_side_validation && opts[:'check_names'] && !opts[:'check_names'].all? { |item| allowable_values.include?(item) }
125
+ fail ArgumentError, "invalid value for \"check_names\", must include one of #{allowable_values}"
126
+ end
127
+ # resource path
128
+ local_var_path = '/projects/{project_id}/checks/issues'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
133
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
134
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
135
+ query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
136
+ query_params[:'check_names'] = @api_client.build_collection_param(opts[:'check_names'], :multi) if !opts[:'check_names'].nil?
137
+ query_params[:'created_since'] = opts[:'created_since'] if !opts[:'created_since'].nil?
138
+
139
+ # header parameters
140
+ header_params = opts[:header_params] || {}
141
+ # HTTP header 'Accept' (if needed)
142
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
143
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
144
+
145
+ # form parameters
146
+ form_params = opts[:form_params] || {}
147
+
148
+ # http body (model)
149
+ post_body = opts[:body]
150
+
151
+ # return_type
152
+ return_type = opts[:return_type] || 'Array<CheckIssue>'
153
+
154
+ # auth_names
155
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
156
+
157
+ new_options = opts.merge(
158
+ :header_params => header_params,
159
+ :query_params => query_params,
160
+ :form_params => form_params,
161
+ :body => post_body,
162
+ :auth_names => auth_names,
163
+ :return_type => return_type
164
+ )
165
+
166
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: ChecksApi#check_issues_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ response = ::Phrase::Response.new(data, headers)
171
+ return response, status_code, headers
172
+ end
173
+ end
174
+ end