phrase 4.14.0 → 4.15.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +6 -3
  4. data/docs/AutomationsApi.md +63 -0
  5. data/docs/BranchCreateComparisonParameters.md +17 -0
  6. data/docs/BranchesApi.md +67 -2
  7. data/docs/JobsApi.md +3 -1
  8. data/docs/KeyCreateParameters.md +1 -1
  9. data/docs/KeyUpdateParameters.md +1 -1
  10. data/docs/KeysExcludeParameters.md +1 -1
  11. data/docs/KeysIncludeParameters.md +1 -1
  12. data/docs/LocaleDownloadCreateParameters.md +3 -1
  13. data/docs/LocalesApi.md +4 -2
  14. data/docs/ProjectCreateParameters.md +1 -1
  15. data/docs/ProjectUpdateParameters.md +1 -1
  16. data/docs/ScreenshotUpdateParameters.md +1 -1
  17. data/docs/UploadSummary.md +1 -1
  18. data/docs/UploadsApi.md +1 -1
  19. data/lib/phrase/api/automations_api.rb +70 -0
  20. data/lib/phrase/api/branches_api.rb +82 -4
  21. data/lib/phrase/api/jobs_api.rb +3 -0
  22. data/lib/phrase/api/locales_api.rb +5 -2
  23. data/lib/phrase/api/uploads_api.rb +2 -2
  24. data/lib/phrase/models/branch_create_comparison_parameters.rb +199 -0
  25. data/lib/phrase/models/keys_exclude_parameters.rb +1 -1
  26. data/lib/phrase/models/keys_include_parameters.rb +1 -1
  27. data/lib/phrase/models/locale_download_create_parameters.rb +12 -2
  28. data/lib/phrase/models/upload_summary.rb +1 -0
  29. data/lib/phrase/version.rb +1 -1
  30. data/lib/phrase.rb +1 -0
  31. data/spec/api/automations_api_spec.rb +14 -0
  32. data/spec/api/branches_api_spec.rb +17 -2
  33. data/spec/api/jobs_api_spec.rb +1 -0
  34. data/spec/models/branch_create_comparison_parameters_spec.rb +29 -0
  35. data/spec/models/locale_download_create_parameters_spec.rb +6 -0
  36. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eafb6674f53665915555e2352445b2c1b81a981cc7d472ac7684855ca5061cc
4
- data.tar.gz: 6b630a9fcb6f2376c7bec8c179754b60b1d2c9109e18010714a35a00fef6067c
3
+ metadata.gz: 5987ebb038c9e36ae7593f16926052cbdb94e3914c82bec4834aecb655919983
4
+ data.tar.gz: 93bf790d7884ad21c172442aa387d6019cd818e98e6061d0b960300535fb2df8
5
5
  SHA512:
6
- metadata.gz: 771899ee1169536d3e35957c20cd8b4ce58dd81552ee1a979a02f2b5d10215ed4a5f53b25f6f06e67f9b4b2b95554b0e8545f9e8fb4d937c31e5f2865aa027fd
7
- data.tar.gz: d75c3aa7238687236f7e1d917676dbac4e82a6381a17802d16e6ff0fea2b87ac27e909a8818ad3c3c0afcccf3dd2576c5a3a6866ee093018cbd2359157629d64
6
+ metadata.gz: 89b80fed14629efae28d5109e286e2eb03188ea0f40522fcc729d1fc048f74f7a1fdaa8ffd4bf1e17aec6c815b8625cd23e71cd0d9e49c6342191271456873b0
7
+ data.tar.gz: aa62cc3f88f081efb61e765eb96caade67c7329235ddf395fbab029702972978e86cb467235dd49ebffd89ca9fdc0202f69b878a7e16d77abe9894800f4675c0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.15.0](https://github.com/phrase/openapi/compare/ruby-v4.14.1...ruby-v4.15.0) (2025-12-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * **API:** Add create comparison endpoint for branches [SCD-549] ([#966](https://github.com/phrase/openapi/issues/966)) ([4099e32](https://github.com/phrase/openapi/commit/4099e32d42744f9d73346077ef30b0f4bd5c849e))
9
+ * **API:** add manual triggering of automations #SCM-953 ([#968](https://github.com/phrase/openapi/issues/968)) ([ebe1c68](https://github.com/phrase/openapi/commit/ebe1c68e472d87ea6c6cd2f76bb421406c30a274))
10
+ * **API:** add use_locale_fallback option to download #SCD-620 ([#976](https://github.com/phrase/openapi/issues/976)) ([9266c68](https://github.com/phrase/openapi/commit/9266c680d8717bb736aed83625858f0b3419da54))
11
+
12
+ ## [4.14.1](https://github.com/phrase/openapi/compare/ruby-v4.14.0...ruby-v4.14.1) (2025-11-10)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **API:** Add omit_translation_keys to Jobs#show endpoint ([#957](https://github.com/phrase/openapi/issues/957)) ([23ece66](https://github.com/phrase/openapi/commit/23ece66b05fc748a4598ce876cb2954ed1a385cc))
18
+
3
19
  ## [4.14.0](https://github.com/phrase/openapi/compare/ruby-v4.13.0...ruby-v4.14.0) (2025-10-27)
4
20
 
5
21
 
data/README.md CHANGED
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
7
7
  ## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.14.0
10
+ - Package version: 4.15.0
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
13
13
 
@@ -56,10 +56,10 @@ gem build phrase.gemspec
56
56
  Then install the gem locally:
57
57
 
58
58
  ```shell
59
- gem install ./phrase-4.14.0.gem
59
+ gem install ./phrase-4.15.0.gem
60
60
  ```
61
61
 
62
- (for development, run `gem install --dev ./phrase-4.14.0.gem` to install the development dependencies)
62
+ (for development, run `gem install --dev ./phrase-4.15.0.gem` to install the development dependencies)
63
63
 
64
64
  ## Getting Started
65
65
 
@@ -142,6 +142,7 @@ Class | Method | HTTP request | Description
142
142
  *Phrase::AutomationsApi* | [**automation_deactivate**](docs/AutomationsApi.md#automation_deactivate) | **POST** /accounts/{account_id}/automations/{automation_id}/deactivate | Deactivate an automation
143
143
  *Phrase::AutomationsApi* | [**automation_delete**](docs/AutomationsApi.md#automation_delete) | **DELETE** /accounts/{account_id}/automations/{automation_id} | Destroy automation
144
144
  *Phrase::AutomationsApi* | [**automation_show**](docs/AutomationsApi.md#automation_show) | **GET** /accounts/{account_id}/automations/{automation_id} | Get a single automation
145
+ *Phrase::AutomationsApi* | [**automation_trigger**](docs/AutomationsApi.md#automation_trigger) | **POST** /accounts/{account_id}/automations/{automation_id}/trigger | Trigger an automation
145
146
  *Phrase::AutomationsApi* | [**automation_update**](docs/AutomationsApi.md#automation_update) | **PATCH** /accounts/{account_id}/automations/{automation_id} | Update an automation
146
147
  *Phrase::AutomationsApi* | [**automations_list**](docs/AutomationsApi.md#automations_list) | **GET** /accounts/{account_id}/automations | List automations
147
148
  *Phrase::BlacklistedKeysApi* | [**blacklisted_key_create**](docs/BlacklistedKeysApi.md#blacklisted_key_create) | **POST** /projects/{project_id}/blacklisted_keys | Create a blocked key
@@ -150,6 +151,7 @@ Class | Method | HTTP request | Description
150
151
  *Phrase::BlacklistedKeysApi* | [**blacklisted_key_update**](docs/BlacklistedKeysApi.md#blacklisted_key_update) | **PATCH** /projects/{project_id}/blacklisted_keys/{id} | Update a blocked key
151
152
  *Phrase::BlacklistedKeysApi* | [**blacklisted_keys_list**](docs/BlacklistedKeysApi.md#blacklisted_keys_list) | **GET** /projects/{project_id}/blacklisted_keys | List blocked keys
152
153
  *Phrase::BranchesApi* | [**branch_compare**](docs/BranchesApi.md#branch_compare) | **GET** /projects/{project_id}/branches/{name}/compare | Compare branches
154
+ *Phrase::BranchesApi* | [**branch_comparison_create**](docs/BranchesApi.md#branch_comparison_create) | **POST** /projects/{project_id}/branches/{name}/compare | Create comparison (async.)
153
155
  *Phrase::BranchesApi* | [**branch_create**](docs/BranchesApi.md#branch_create) | **POST** /projects/{project_id}/branches | Create a branch
154
156
  *Phrase::BranchesApi* | [**branch_delete**](docs/BranchesApi.md#branch_delete) | **DELETE** /projects/{project_id}/branches/{name} | Delete a branch
155
157
  *Phrase::BranchesApi* | [**branch_merge**](docs/BranchesApi.md#branch_merge) | **PATCH** /projects/{project_id}/branches/{name}/merge | Merge a branch
@@ -433,6 +435,7 @@ Class | Method | HTTP request | Description
433
435
  - [Phrase::BlacklistedKeyCreateParameters](docs/BlacklistedKeyCreateParameters.md)
434
436
  - [Phrase::BlacklistedKeyUpdateParameters](docs/BlacklistedKeyUpdateParameters.md)
435
437
  - [Phrase::Branch](docs/Branch.md)
438
+ - [Phrase::BranchCreateComparisonParameters](docs/BranchCreateComparisonParameters.md)
436
439
  - [Phrase::BranchCreateParameters](docs/BranchCreateParameters.md)
437
440
  - [Phrase::BranchMergeParameters](docs/BranchMergeParameters.md)
438
441
  - [Phrase::BranchName](docs/BranchName.md)
@@ -9,6 +9,7 @@ Method | HTTP request | Description
9
9
  [**automation_deactivate**](AutomationsApi.md#automation_deactivate) | **POST** /accounts/{account_id}/automations/{automation_id}/deactivate | Deactivate an automation
10
10
  [**automation_delete**](AutomationsApi.md#automation_delete) | **DELETE** /accounts/{account_id}/automations/{automation_id} | Destroy automation
11
11
  [**automation_show**](AutomationsApi.md#automation_show) | **GET** /accounts/{account_id}/automations/{automation_id} | Get a single automation
12
+ [**automation_trigger**](AutomationsApi.md#automation_trigger) | **POST** /accounts/{account_id}/automations/{automation_id}/trigger | Trigger an automation
12
13
  [**automation_update**](AutomationsApi.md#automation_update) | **PATCH** /accounts/{account_id}/automations/{automation_id} | Update an automation
13
14
  [**automations_list**](AutomationsApi.md#automations_list) | **GET** /accounts/{account_id}/automations | List automations
14
15
 
@@ -328,6 +329,68 @@ Response<([**Automation**](Automation.md))>
328
329
  - **Accept**: application/json
329
330
 
330
331
 
332
+ ## automation_trigger
333
+
334
+ > automation_trigger(account_id, id, opts)
335
+
336
+ Trigger an automation
337
+
338
+ Trigger an automation.
339
+
340
+ ### Example
341
+
342
+ ```ruby
343
+ # load the gem
344
+ require 'phrase'
345
+ # setup authorization
346
+ Phrase.configure do |config|
347
+ # Configure HTTP basic authorization: Basic
348
+ config.username = 'YOUR USERNAME'
349
+ config.password = 'YOUR PASSWORD'
350
+
351
+ # Configure API key authorization: Token
352
+ config.api_key['Authorization'] = 'YOUR API KEY'
353
+ config.api_key_prefix['Authorization'] = 'token'
354
+ end
355
+
356
+ api_instance = Phrase::AutomationsApi.new
357
+ account_id = 'account_id_example' # String | Account ID
358
+ id = 'id_example' # String | ID
359
+ opts = {
360
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
361
+ }
362
+
363
+ begin
364
+ #Trigger an automation
365
+ api_instance.automation_trigger(account_id, id, opts)
366
+ rescue Phrase::ApiError => e
367
+ puts "Exception when calling AutomationsApi->automation_trigger: #{e}"
368
+ end
369
+ ```
370
+
371
+ ### Parameters
372
+
373
+
374
+ Name | Type | Description | Notes
375
+ ------------- | ------------- | ------------- | -------------
376
+ **account_id** | **String**| Account ID |
377
+ **id** | **String**| ID |
378
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
379
+
380
+ ### Return type
381
+
382
+ Response<(nil (empty response body))>
383
+
384
+ ### Authorization
385
+
386
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
387
+
388
+ ### HTTP request headers
389
+
390
+ - **Content-Type**: Not defined
391
+ - **Accept**: Not defined
392
+
393
+
331
394
  ## automation_update
332
395
 
333
396
  > Automation automation_update(account_id, id, automations_create_parameters1, opts)
@@ -0,0 +1,17 @@
1
+ # Phrase::BranchCreateComparisonParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **direction** | **String** | direction of comparison, possible values are sync or merge (only for v2 branches) | [optional] [default to &#39;merge&#39;]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'Phrase'
13
+
14
+ instance = Phrase::BranchCreateComparisonParameters.new(direction: merge)
15
+ ```
16
+
17
+
data/docs/BranchesApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.phrase.com/v2*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**branch_compare**](BranchesApi.md#branch_compare) | **GET** /projects/{project_id}/branches/{name}/compare | Compare branches
8
+ [**branch_comparison_create**](BranchesApi.md#branch_comparison_create) | **POST** /projects/{project_id}/branches/{name}/compare | Create comparison (async.)
8
9
  [**branch_create**](BranchesApi.md#branch_create) | **POST** /projects/{project_id}/branches | Create a branch
9
10
  [**branch_delete**](BranchesApi.md#branch_delete) | **DELETE** /projects/{project_id}/branches/{name} | Delete a branch
10
11
  [**branch_merge**](BranchesApi.md#branch_merge) | **PATCH** /projects/{project_id}/branches/{name}/merge | Merge a branch
@@ -21,7 +22,7 @@ Method | HTTP request | Description
21
22
 
22
23
  Compare branches
23
24
 
24
- Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size.*
25
+ Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size. Consider using the `POST /compare` endpoint for creating comparison asynchronously.*
25
26
 
26
27
  ### Example
27
28
 
@@ -77,6 +78,70 @@ Response<(nil (empty response body))>
77
78
  - **Accept**: Not defined
78
79
 
79
80
 
81
+ ## branch_comparison_create
82
+
83
+ > branch_comparison_create(project_id, name, branch_create_comparison_parameters, opts)
84
+
85
+ Create comparison (async.)
86
+
87
+ Create a branch comparison asynchronously.
88
+
89
+ ### Example
90
+
91
+ ```ruby
92
+ # load the gem
93
+ require 'phrase'
94
+ # setup authorization
95
+ Phrase.configure do |config|
96
+ # Configure HTTP basic authorization: Basic
97
+ config.username = 'YOUR USERNAME'
98
+ config.password = 'YOUR PASSWORD'
99
+
100
+ # Configure API key authorization: Token
101
+ config.api_key['Authorization'] = 'YOUR API KEY'
102
+ config.api_key_prefix['Authorization'] = 'token'
103
+ end
104
+
105
+ api_instance = Phrase::BranchesApi.new
106
+ project_id = 'project_id_example' # String | Project ID
107
+ name = 'name_example' # String | name
108
+ branch_create_comparison_parameters = Phrase::BranchCreateComparisonParameters.new # BranchCreateComparisonParameters |
109
+ opts = {
110
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
111
+ }
112
+
113
+ begin
114
+ #Create comparison (async.)
115
+ api_instance.branch_comparison_create(project_id, name, branch_create_comparison_parameters, opts)
116
+ rescue Phrase::ApiError => e
117
+ puts "Exception when calling BranchesApi->branch_comparison_create: #{e}"
118
+ end
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+
124
+ Name | Type | Description | Notes
125
+ ------------- | ------------- | ------------- | -------------
126
+ **project_id** | **String**| Project ID |
127
+ **name** | **String**| name |
128
+ **branch_create_comparison_parameters** | [**BranchCreateComparisonParameters**](BranchCreateComparisonParameters.md)| |
129
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
130
+
131
+ ### Return type
132
+
133
+ Response<(nil (empty response body))>
134
+
135
+ ### Authorization
136
+
137
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: application/json
142
+ - **Accept**: Not defined
143
+
144
+
80
145
  ## branch_create
81
146
 
82
147
  > Branch branch_create(project_id, branch_create_parameters, opts)
@@ -335,7 +400,7 @@ Response<([**Branch**](Branch.md))>
335
400
 
336
401
  Sync a branch
337
402
 
338
- Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
403
+ Sync an existing branch. *Note: Only available for branches created with new branching.*
339
404
 
340
405
  ### Example
341
406
 
data/docs/JobsApi.md CHANGED
@@ -500,7 +500,8 @@ id = 'id_example' # String | ID
500
500
  opts = {
501
501
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
502
502
  branch: 'my-feature-branch', # String | Branch to use
503
- include_annotations: true # Boolean | Include job-locale annotations in the response
503
+ include_annotations: true, # Boolean | Include job-locale annotations in the response
504
+ omit_translation_keys: true # Boolean | Omit translation keys in the response to reduce payload size for bigger jobs
504
505
  }
505
506
 
506
507
  begin
@@ -522,6 +523,7 @@ Name | Type | Description | Notes
522
523
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
523
524
  **branch** | **String**| Branch to use | [optional]
524
525
  **include_annotations** | **Boolean**| Include job-locale annotations in the response | [optional] [default to false]
526
+ **omit_translation_keys** | **Boolean**| Omit translation keys in the response to reduce payload size for bigger jobs | [optional] [default to false]
525
527
 
526
528
  ### Return type
527
529
 
@@ -38,7 +38,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
38
38
  data_type: number,
39
39
  tags: awesome-feature,needs-proofreading,
40
40
  max_characters_allowed: 140,
41
- screenshot: [B@1df2b230,
41
+ screenshot: [B@4116167e,
42
42
  remove_screenshot: null,
43
43
  unformatted: null,
44
44
  default_translation_content: Default translation content,
@@ -36,7 +36,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
36
36
  data_type: number,
37
37
  tags: awesome-feature,needs-proofreading,
38
38
  max_characters_allowed: 140,
39
- screenshot: [B@37d85eec,
39
+ screenshot: [B@74e2de39,
40
40
  remove_screenshot: null,
41
41
  unformatted: null,
42
42
  xml_space_preserve: null,
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **branch** | **String** | specify the branch to use | [optional]
8
8
  **q** | **String** | Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: - &#x60;ids:key_id,...&#x60; for queries on a comma-separated list of ids - &#x60;name:key_name&#x60; for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes - &#x60;tags:tag_name&#x60; to filter for keys with certain tags - &#x60;translated:{true|false}&#x60; for translation status (also requires &#x60;locale_id&#x60; to be specified) - &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries - &#x60;unmentioned_in_upload:upload_id,...&#x60; to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples). | [optional]
9
- **target_locale_id** | **String** | Locale used to exlcude or include keys. | [optional]
9
+ **target_locale_id** | **String** | Exclude translations in locale | [optional]
10
10
  **tags** | **String** | Tag or comma-separated list of tags to add to the matching collection of keys | [optional]
11
11
 
12
12
  ## Code Sample
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **branch** | **String** | specify the branch to use | [optional]
8
8
  **q** | **String** | Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * &#x60;ids:key_id,...&#x60; for queries on a comma-separated list of ids * &#x60;name:key_name&#x60; for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes * &#x60;tags:tag_name&#x60; to filter for keys with certain tags * &#x60;translated:{true|false}&#x60; for translation status (also requires &#x60;locale_id&#x60; to be specified) * &#x60;updated_at:{&gt;&#x3D;|&lt;&#x3D;}2013-02-21T00:00:00Z&#x60; for date range queries * &#x60;unmentioned_in_upload:upload_id,...&#x60; to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples). | [optional]
9
- **target_locale_id** | **String** | Locale used to exlcude or include keys. | [optional]
9
+ **target_locale_id** | **String** | Include translations in locale | [optional]
10
10
  **tags** | **String** | Tag or comma-separated list of tags to add to the matching collection of keys | [optional]
11
11
 
12
12
  ## Code Sample
@@ -16,7 +16,8 @@ Name | Type | Description | Notes
16
16
  **include_unverified_translations** | **Boolean** | if set to false unverified translations are excluded | [optional]
17
17
  **use_last_reviewed_version** | **Boolean** | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional]
18
18
  **locale_ids** | **Array&lt;String&gt;** | Locale IDs or locale names | [optional]
19
- **fallback_locale_id** | **String** | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &#x60;true&#x60;. | [optional]
19
+ **fallback_locale_id** | **String** | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;use_locale_fallback&#x60;. | [optional]
20
+ **use_locale_fallback** | **Boolean** | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale&#39;s settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;fallback_locale_id&#x60;. | [optional]
20
21
  **source_locale_id** | **String** | Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &#x60;tag&#x60; parameter indicating a specific job. | [optional]
21
22
  **custom_metadata_filters** | **Object** | Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download. | [optional]
22
23
  **updated_since** | **String** | Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., &#x60;2023-01-01T00:00:00Z&#x60;). | [optional]
@@ -39,6 +40,7 @@ instance = Phrase::LocaleDownloadCreateParameters.new(file_format: yml,
39
40
  use_last_reviewed_version: null,
40
41
  locale_ids: [&quot;de&quot;,&quot;en&quot;],
41
42
  fallback_locale_id: abcd1234abcd1234abcd1234abcd1234,
43
+ use_locale_fallback: false,
42
44
  source_locale_id: abcd1234abcd1234abcd1234abcd1234,
43
45
  custom_metadata_filters: null,
44
46
  updated_since: 2023-01-01T00:00:00Z)
data/docs/LocalesApi.md CHANGED
@@ -251,7 +251,8 @@ opts = {
251
251
  skip_unverified_translations: true, # Boolean | Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
252
252
  include_unverified_translations: true, # Boolean | if set to false unverified translations are excluded
253
253
  use_last_reviewed_version: true, # Boolean | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
254
- fallback_locale_id: 'fallback_locale_id_example', # String | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
254
+ fallback_locale_id: 'fallback_locale_id_example', # String | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
255
+ use_locale_fallback: true, # Boolean | If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
255
256
  source_locale_id: 'source_locale_id_example', # String | Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
256
257
  translation_key_prefix: 'prefix_', # String | Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
257
258
  filter_by_prefix: true, # Boolean | Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -293,7 +294,8 @@ Name | Type | Description | Notes
293
294
  **skip_unverified_translations** | **Boolean**| Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &#x60;include_unverified_translations&#x60;. | [optional]
294
295
  **include_unverified_translations** | **Boolean**| if set to false unverified translations are excluded | [optional]
295
296
  **use_last_reviewed_version** | **Boolean**| If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional]
296
- **fallback_locale_id** | **String**| If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &#x60;true&#x60;. | [optional]
297
+ **fallback_locale_id** | **String**| If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;use_locale_fallback&#x60;. | [optional]
298
+ **use_locale_fallback** | **Boolean**| If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale&#39;s settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;fallback_locale_id&#x60;. | [optional]
297
299
  **source_locale_id** | **String**| Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &#x60;tag&#x60; parameter indicating a specific job. | [optional]
298
300
  **translation_key_prefix** | **String**| Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed. | [optional]
299
301
  **filter_by_prefix** | **Boolean**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. | [optional]
@@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
37
37
  main_format: yml,
38
38
  media: Python,
39
39
  shares_translation_memory: true,
40
- project_image: [B@e80fc9d,
40
+ project_image: [B@767c34a0,
41
41
  remove_project_image: null,
42
42
  account_id: abcd1234,
43
43
  point_of_contact: abcd1234,
@@ -39,7 +39,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
39
39
  main_format: yml,
40
40
  media: Python,
41
41
  shares_translation_memory: true,
42
- project_image: [B@4abc179d,
42
+ project_image: [B@404ea1e4,
43
43
  remove_project_image: false,
44
44
  workflow: review,
45
45
  machine_translation_enabled: true,
@@ -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@141fc03a)
20
+ filename: [B@56d8f131)
21
21
  ```
22
22
 
23
23
 
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **locales_created** | **Integer** | | [optional]
8
8
  **translation_keys_created** | **Integer** | | [optional]
9
9
  **translation_keys_updated** | **Integer** | | [optional]
10
- **translation_keys_unmentioned** | **Integer** | | [optional]
10
+ **translation_keys_unmentioned** | **Integer** | The number of translation keys in the project that were not mentioned in the upload. Note: this field is not calculated (and shows 0) if the upload contains more than 10,000 keys. | [optional]
11
11
  **translations_created** | **Integer** | | [optional]
12
12
  **translations_updated** | **Integer** | | [optional]
13
13
  **tags_created** | **Integer** | | [optional]
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.
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).
20
20
 
21
21
  ### Example
22
22
 
@@ -367,6 +367,76 @@ module Phrase
367
367
  return response, status_code, headers
368
368
  end
369
369
 
370
+ # Trigger an automation
371
+ # Trigger an automation.
372
+ # @param account_id [String] Account ID
373
+ # @param id [String] ID
374
+ # @param [Hash] opts the optional parameters
375
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
376
+ # @return [nil]
377
+ def automation_trigger(account_id, id, opts = {})
378
+ data, _status_code, _headers = automation_trigger_with_http_info(account_id, id, opts)
379
+ data
380
+ end
381
+
382
+ # Trigger an automation
383
+ # Trigger an automation.
384
+ # @param account_id [String] Account ID
385
+ # @param id [String] ID
386
+ # @param [Hash] opts the optional parameters
387
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
388
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
389
+ def automation_trigger_with_http_info(account_id, id, opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: AutomationsApi.automation_trigger ...'
392
+ end
393
+ # verify the required parameter 'account_id' is set
394
+ if @api_client.config.client_side_validation && account_id.nil?
395
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AutomationsApi.automation_trigger"
396
+ end
397
+ # verify the required parameter 'id' is set
398
+ if @api_client.config.client_side_validation && id.nil?
399
+ fail ArgumentError, "Missing the required parameter 'id' when calling AutomationsApi.automation_trigger"
400
+ end
401
+ # resource path
402
+ local_var_path = '/accounts/{account_id}/automations/{automation_id}/trigger'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
403
+
404
+ # query parameters
405
+ query_params = opts[:query_params] || {}
406
+
407
+ # header parameters
408
+ header_params = opts[:header_params] || {}
409
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
410
+
411
+ # form parameters
412
+ form_params = opts[:form_params] || {}
413
+
414
+ # http body (model)
415
+ post_body = opts[:body]
416
+
417
+ # return_type
418
+ return_type = opts[:return_type]
419
+
420
+ # auth_names
421
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
422
+
423
+ new_options = opts.merge(
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => return_type
430
+ )
431
+
432
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug "API called: AutomationsApi#automation_trigger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
435
+ end
436
+ response = ::Phrase::Response.new(data, headers)
437
+ return response, status_code, headers
438
+ end
439
+
370
440
  # Update an automation
371
441
  # Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
372
442
  # @param account_id [String] Account ID
@@ -8,7 +8,7 @@ module Phrase
8
8
  @api_client = api_client
9
9
  end
10
10
  # Compare branches
11
- # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size.*
11
+ # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size. Consider using the `POST /compare` endpoint for creating comparison asynchronously.*
12
12
  # @param project_id [String] Project ID
13
13
  # @param name [String] name
14
14
  # @param [Hash] opts the optional parameters
@@ -20,7 +20,7 @@ module Phrase
20
20
  end
21
21
 
22
22
  # Compare branches
23
- # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size.*
23
+ # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size. Consider using the &#x60;POST /compare&#x60; endpoint for creating comparison asynchronously.*
24
24
  # @param project_id [String] Project ID
25
25
  # @param name [String] name
26
26
  # @param [Hash] opts the optional parameters
@@ -77,6 +77,84 @@ module Phrase
77
77
  return response, status_code, headers
78
78
  end
79
79
 
80
+ # Create comparison (async.)
81
+ # Create a branch comparison asynchronously.
82
+ # @param project_id [String] Project ID
83
+ # @param name [String] name
84
+ # @param branch_create_comparison_parameters [BranchCreateComparisonParameters]
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
87
+ # @return [nil]
88
+ def branch_comparison_create(project_id, name, branch_create_comparison_parameters, opts = {})
89
+ data, _status_code, _headers = branch_comparison_create_with_http_info(project_id, name, branch_create_comparison_parameters, opts)
90
+ data
91
+ end
92
+
93
+ # Create comparison (async.)
94
+ # Create a branch comparison asynchronously.
95
+ # @param project_id [String] Project ID
96
+ # @param name [String] name
97
+ # @param branch_create_comparison_parameters [BranchCreateComparisonParameters]
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
101
+ def branch_comparison_create_with_http_info(project_id, name, branch_create_comparison_parameters, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: BranchesApi.branch_comparison_create ...'
104
+ end
105
+ # verify the required parameter 'project_id' is set
106
+ if @api_client.config.client_side_validation && project_id.nil?
107
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling BranchesApi.branch_comparison_create"
108
+ end
109
+ # verify the required parameter 'name' is set
110
+ if @api_client.config.client_side_validation && name.nil?
111
+ fail ArgumentError, "Missing the required parameter 'name' when calling BranchesApi.branch_comparison_create"
112
+ end
113
+ # verify the required parameter 'branch_create_comparison_parameters' is set
114
+ if @api_client.config.client_side_validation && branch_create_comparison_parameters.nil?
115
+ fail ArgumentError, "Missing the required parameter 'branch_create_comparison_parameters' when calling BranchesApi.branch_comparison_create"
116
+ end
117
+ # resource path
118
+ local_var_path = '/projects/{project_id}/branches/{name}/compare'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Content-Type'
126
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
127
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:body] || @api_client.object_to_http_body(branch_create_comparison_parameters)
134
+
135
+ # return_type
136
+ return_type = opts[:return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
140
+
141
+ new_options = opts.merge(
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: BranchesApi#branch_comparison_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ response = ::Phrase::Response.new(data, headers)
155
+ return response, status_code, headers
156
+ end
157
+
80
158
  # Create a branch
81
159
  # Create a new branch. *Note: Creating a new branch may take several minutes depending on the project size.*
82
160
  # @param project_id [String] Project ID
@@ -372,7 +450,7 @@ module Phrase
372
450
  end
373
451
 
374
452
  # Sync a branch
375
- # Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
453
+ # Sync an existing branch. *Note: Only available for branches created with new branching.*
376
454
  # @param project_id [String] Project ID
377
455
  # @param name [String] name
378
456
  # @param branch_sync_parameters [BranchSyncParameters]
@@ -385,7 +463,7 @@ module Phrase
385
463
  end
386
464
 
387
465
  # Sync a branch
388
- # Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
466
+ # Sync an existing branch. *Note: Only available for branches created with new branching.*
389
467
  # @param project_id [String] Project ID
390
468
  # @param name [String] name
391
469
  # @param branch_sync_parameters [BranchSyncParameters]
@@ -553,6 +553,7 @@ module Phrase
553
553
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
554
554
  # @option opts [String] :branch Branch to use
555
555
  # @option opts [Boolean] :include_annotations Include job-locale annotations in the response (default to false)
556
+ # @option opts [Boolean] :omit_translation_keys Omit translation keys in the response to reduce payload size for bigger jobs (default to false)
556
557
  # @return [JobDetails]
557
558
  def job_show(project_id, id, opts = {})
558
559
  data, _status_code, _headers = job_show_with_http_info(project_id, id, opts)
@@ -567,6 +568,7 @@ module Phrase
567
568
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
568
569
  # @option opts [String] :branch Branch to use
569
570
  # @option opts [Boolean] :include_annotations Include job-locale annotations in the response
571
+ # @option opts [Boolean] :omit_translation_keys Omit translation keys in the response to reduce payload size for bigger jobs
570
572
  # @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
571
573
  def job_show_with_http_info(project_id, id, opts = {})
572
574
  if @api_client.config.debugging
@@ -587,6 +589,7 @@ module Phrase
587
589
  query_params = opts[:query_params] || {}
588
590
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
589
591
  query_params[:'include_annotations'] = opts[:'include_annotations'] if !opts[:'include_annotations'].nil?
592
+ query_params[:'omit_translation_keys'] = opts[:'omit_translation_keys'] if !opts[:'omit_translation_keys'].nil?
590
593
 
591
594
  # header parameters
592
595
  header_params = opts[:header_params] || {}
@@ -248,7 +248,8 @@ module Phrase
248
248
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &#x60;include_unverified_translations&#x60;.
249
249
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
250
250
  # @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 is enabled for the project.
251
- # @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 ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &#x60;true&#x60;.
251
+ # @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 ID of the locale that should be used as the fallback. Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;use_locale_fallback&#x60;.
252
+ # @option opts [Boolean] :use_locale_fallback If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale&#39;s settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;fallback_locale_id&#x60;.
252
253
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &#x60;tag&#x60; parameter indicating a specific job.
253
254
  # @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
254
255
  # @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -283,7 +284,8 @@ module Phrase
283
284
  # @option opts [Boolean] :skip_unverified_translations Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with &#x60;include_unverified_translations&#x60;.
284
285
  # @option opts [Boolean] :include_unverified_translations if set to false unverified translations are excluded
285
286
  # @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 is enabled for the project.
286
- # @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 ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to &#x60;true&#x60;.
287
+ # @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 ID of the locale that should be used as the fallback. Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;use_locale_fallback&#x60;.
288
+ # @option opts [Boolean] :use_locale_fallback If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale&#39;s settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires &#x60;include_empty_translations&#x60; to be set to &#x60;true&#x60;. Mutually exclusive with &#x60;fallback_locale_id&#x60;.
287
289
  # @option opts [String] :source_locale_id Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a &#x60;tag&#x60; parameter indicating a specific job.
288
290
  # @option opts [String] :translation_key_prefix Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.
289
291
  # @option opts [Boolean] :filter_by_prefix Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
@@ -323,6 +325,7 @@ module Phrase
323
325
  query_params[:'include_unverified_translations'] = opts[:'include_unverified_translations'] if !opts[:'include_unverified_translations'].nil?
324
326
  query_params[:'use_last_reviewed_version'] = opts[:'use_last_reviewed_version'] if !opts[:'use_last_reviewed_version'].nil?
325
327
  query_params[:'fallback_locale_id'] = opts[:'fallback_locale_id'] if !opts[:'fallback_locale_id'].nil?
328
+ query_params[:'use_locale_fallback'] = opts[:'use_locale_fallback'] if !opts[:'use_locale_fallback'].nil?
326
329
  query_params[:'source_locale_id'] = opts[:'source_locale_id'] if !opts[:'source_locale_id'].nil?
327
330
  query_params[:'translation_key_prefix'] = opts[:'translation_key_prefix'] if !opts[:'translation_key_prefix'].nil?
328
331
  query_params[:'filter_by_prefix'] = opts[:'filter_by_prefix'] if !opts[:'filter_by_prefix'].nil?
@@ -8,7 +8,7 @@ module Phrase
8
8
  @api_client = api_client
9
9
  end
10
10
  # Upload a new file
11
- # Upload a new language file. Creates necessary resources in your project.
11
+ # 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).
12
12
  # @param project_id [String] Project ID
13
13
  # @param file [File] File to be imported
14
14
  # @param file_format [String] File format. Auto-detected when possible and not specified.
@@ -41,7 +41,7 @@ module Phrase
41
41
  end
42
42
 
43
43
  # Upload a new file
44
- # Upload a new language file. Creates necessary resources in your project.
44
+ # 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).
45
45
  # @param project_id [String] Project ID
46
46
  # @param file [File] File to be imported
47
47
  # @param file_format [String] File format. Auto-detected when possible and not specified.
@@ -0,0 +1,199 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class BranchCreateComparisonParameters
5
+ # direction of comparison, possible values are sync or merge (only for v2 branches)
6
+ attr_accessor :direction
7
+
8
+ # Attribute mapping from ruby-style variable name to JSON key.
9
+ def self.attribute_map
10
+ {
11
+ :'direction' => :'direction'
12
+ }
13
+ end
14
+
15
+ # Attribute type mapping.
16
+ def self.openapi_types
17
+ {
18
+ :'direction' => :'String'
19
+ }
20
+ end
21
+
22
+ # List of attributes with nullable: true
23
+ def self.openapi_nullable
24
+ Set.new([
25
+ ])
26
+ end
27
+
28
+ # Initializes the object
29
+ # @param [Hash] attributes Model attributes in the form of hash
30
+ def initialize(attributes = {})
31
+ if (!attributes.is_a?(Hash))
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::BranchCreateComparisonParameters` initialize method"
33
+ end
34
+
35
+ # check to see if the attribute exists and convert string to symbol for hash key
36
+ attributes = attributes.each_with_object({}) { |(k, v), h|
37
+ if (!self.class.attribute_map.key?(k.to_sym))
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::BranchCreateComparisonParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
39
+ end
40
+ h[k.to_sym] = v
41
+ }
42
+
43
+ if attributes.key?(:'direction')
44
+ self.direction = attributes[:'direction']
45
+ else
46
+ self.direction = 'merge'
47
+ end
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properties with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ invalid_properties
55
+ end
56
+
57
+ # Check to see if the all the properties in the model are valid
58
+ # @return true if the model is valid
59
+ def valid?
60
+ true
61
+ end
62
+
63
+ # Checks equality by comparing each attribute.
64
+ # @param [Object] Object to be compared
65
+ def ==(o)
66
+ return true if self.equal?(o)
67
+ self.class == o.class &&
68
+ direction == o.direction
69
+ end
70
+
71
+ # @see the `==` method
72
+ # @param [Object] Object to be compared
73
+ def eql?(o)
74
+ self == o
75
+ end
76
+
77
+ # Calculates hash code according to all attributes.
78
+ # @return [Integer] Hash code
79
+ def hash
80
+ [direction].hash
81
+ end
82
+
83
+ # Builds the object from hash
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ # @return [Object] Returns the model itself
86
+ def self.build_from_hash(attributes)
87
+ new.build_from_hash(attributes)
88
+ end
89
+
90
+ # Builds the object from hash
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @return [Object] Returns the model itself
93
+ def build_from_hash(attributes)
94
+ return nil unless attributes.is_a?(Hash)
95
+ self.class.openapi_types.each_pair do |key, type|
96
+ if type =~ /\AArray<(.*)>/i
97
+ # check to ensure the input is an array given that the attribute
98
+ # is documented as an array but the input is not
99
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
100
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
104
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
105
+ end
106
+
107
+ self
108
+ end
109
+
110
+ # Deserializes the data based on type
111
+ # @param string type Data type
112
+ # @param string value Value to be deserialized
113
+ # @return [Object] Deserialized data
114
+ def _deserialize(type, value)
115
+ case type.to_sym
116
+ when :DateTime
117
+ DateTime.parse(value)
118
+ when :Date
119
+ Date.parse(value)
120
+ when :Time
121
+ Time.parse(value)
122
+ when :String
123
+ value.to_s
124
+ when :Integer
125
+ value.to_i
126
+ when :Float
127
+ value.to_f
128
+ when :Boolean
129
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
130
+ true
131
+ else
132
+ false
133
+ end
134
+ when :Object
135
+ # generic object (usually a Hash), return directly
136
+ value
137
+ when /\AArray<(?<inner_type>.+)>\z/
138
+ inner_type = Regexp.last_match[:inner_type]
139
+ value.map { |v| _deserialize(inner_type, v) }
140
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
141
+ k_type = Regexp.last_match[:k_type]
142
+ v_type = Regexp.last_match[:v_type]
143
+ {}.tap do |hash|
144
+ value.each do |k, v|
145
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
146
+ end
147
+ end
148
+ else # model
149
+ Phrase.const_get(type).build_from_hash(value)
150
+ end
151
+ end
152
+
153
+ # Returns the string representation of the object
154
+ # @return [String] String presentation of the object
155
+ def to_s
156
+ to_hash.to_s
157
+ end
158
+
159
+ # to_body is an alias to to_hash (backward compatibility)
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_body
162
+ to_hash
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ # Outputs non-array value in the form of hash
182
+ # For object, use to_hash. Otherwise, just return the value
183
+ # @param [Object] value Any valid value
184
+ # @return [Hash] Returns the value in the form of hash
185
+ def _to_hash(value)
186
+ if value.is_a?(Array)
187
+ value.compact.map { |v| _to_hash(v) }
188
+ elsif value.is_a?(Hash)
189
+ {}.tap do |hash|
190
+ value.each { |k, v| hash[k] = _to_hash(v) }
191
+ end
192
+ elsif value.respond_to? :to_hash
193
+ value.to_hash
194
+ else
195
+ value
196
+ end
197
+ end
198
+ end
199
+ end
@@ -8,7 +8,7 @@ module Phrase
8
8
  # Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: - `ids:key_id,...` for queries on a comma-separated list of ids - `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes - `tags:tag_name` to filter for keys with certain tags - `translated:{true|false}` for translation status (also requires `locale_id` to be specified) - `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries - `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
- # Locale used to exlcude or include keys.
11
+ # Exclude translations in locale
12
12
  attr_accessor :target_locale_id
13
13
 
14
14
  # Tag or comma-separated list of tags to add to the matching collection of keys
@@ -8,7 +8,7 @@ module Phrase
8
8
  # Specify a query to do broad search for keys by name (including wildcards). The following qualifiers are also supported in the search term: * `ids:key_id,...` for queries on a comma-separated list of ids * `name:key_name` for text queries on exact key names - spaces, commas, and colons need to be escaped with double backslashes * `tags:tag_name` to filter for keys with certain tags * `translated:{true|false}` for translation status (also requires `locale_id` to be specified) * `updated_at:{>=|<=}2013-02-21T00:00:00Z` for date range queries * `unmentioned_in_upload:upload_id,...` to filter keys unmentioned within upload. When multiple upload IDs provided, matches only keys not mentioned in **all** uploads Find more examples [here](/en/api/strings/usage-examples).
9
9
  attr_accessor :q
10
10
 
11
- # Locale used to exlcude or include keys.
11
+ # Include translations in locale
12
12
  attr_accessor :target_locale_id
13
13
 
14
14
  # Tag or comma-separated list of tags to add to the matching collection of keys
@@ -38,9 +38,12 @@ module Phrase
38
38
  # Locale IDs or locale names
39
39
  attr_accessor :locale_ids
40
40
 
41
- # If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to `true`.
41
+ # If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
42
42
  attr_accessor :fallback_locale_id
43
43
 
44
+ # If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used. Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id). Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
45
+ attr_accessor :use_locale_fallback
46
+
44
47
  # Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
45
48
  attr_accessor :source_locale_id
46
49
 
@@ -66,6 +69,7 @@ module Phrase
66
69
  :'use_last_reviewed_version' => :'use_last_reviewed_version',
67
70
  :'locale_ids' => :'locale_ids',
68
71
  :'fallback_locale_id' => :'fallback_locale_id',
72
+ :'use_locale_fallback' => :'use_locale_fallback',
69
73
  :'source_locale_id' => :'source_locale_id',
70
74
  :'custom_metadata_filters' => :'custom_metadata_filters',
71
75
  :'updated_since' => :'updated_since'
@@ -88,6 +92,7 @@ module Phrase
88
92
  :'use_last_reviewed_version' => :'Boolean',
89
93
  :'locale_ids' => :'Array<String>',
90
94
  :'fallback_locale_id' => :'String',
95
+ :'use_locale_fallback' => :'Boolean',
91
96
  :'source_locale_id' => :'String',
92
97
  :'custom_metadata_filters' => :'Object',
93
98
  :'updated_since' => :'String'
@@ -169,6 +174,10 @@ module Phrase
169
174
  self.fallback_locale_id = attributes[:'fallback_locale_id']
170
175
  end
171
176
 
177
+ if attributes.key?(:'use_locale_fallback')
178
+ self.use_locale_fallback = attributes[:'use_locale_fallback']
179
+ end
180
+
172
181
  if attributes.key?(:'source_locale_id')
173
182
  self.source_locale_id = attributes[:'source_locale_id']
174
183
  end
@@ -218,6 +227,7 @@ module Phrase
218
227
  use_last_reviewed_version == o.use_last_reviewed_version &&
219
228
  locale_ids == o.locale_ids &&
220
229
  fallback_locale_id == o.fallback_locale_id &&
230
+ use_locale_fallback == o.use_locale_fallback &&
221
231
  source_locale_id == o.source_locale_id &&
222
232
  custom_metadata_filters == o.custom_metadata_filters &&
223
233
  updated_since == o.updated_since
@@ -232,7 +242,7 @@ module Phrase
232
242
  # Calculates hash code according to all attributes.
233
243
  # @return [Integer] Hash code
234
244
  def hash
235
- [file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, source_locale_id, custom_metadata_filters, updated_since].hash
245
+ [file_format, branch, tags, include_empty_translations, exclude_empty_zero_forms, include_translated_keys, keep_notranslate_tags, format_options, encoding, include_unverified_translations, use_last_reviewed_version, locale_ids, fallback_locale_id, use_locale_fallback, source_locale_id, custom_metadata_filters, updated_since].hash
236
246
  end
237
247
 
238
248
  # Builds the object from hash
@@ -8,6 +8,7 @@ module Phrase
8
8
 
9
9
  attr_accessor :translation_keys_updated
10
10
 
11
+ # The number of translation keys in the project that were not mentioned in the upload. Note: this field is not calculated (and shows 0) if the upload contains more than 10,000 keys.
11
12
  attr_accessor :translation_keys_unmentioned
12
13
 
13
14
  attr_accessor :translations_created
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.14.0'
2
+ VERSION = '4.15.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -24,6 +24,7 @@ require 'phrase/models/blacklisted_key'
24
24
  require 'phrase/models/blacklisted_key_create_parameters'
25
25
  require 'phrase/models/blacklisted_key_update_parameters'
26
26
  require 'phrase/models/branch'
27
+ require 'phrase/models/branch_create_comparison_parameters'
27
28
  require 'phrase/models/branch_create_parameters'
28
29
  require 'phrase/models/branch_merge_parameters'
29
30
  require 'phrase/models/branch_name'
@@ -90,6 +90,20 @@ describe 'AutomationsApi' do
90
90
  end
91
91
  end
92
92
 
93
+ # unit tests for automation_trigger
94
+ # Trigger an automation
95
+ # Trigger an automation.
96
+ # @param account_id Account ID
97
+ # @param id ID
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
+ # @return [nil]
101
+ describe 'automation_trigger test' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
93
107
  # unit tests for automation_update
94
108
  # Update an automation
95
109
  # Update an existing automation. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
@@ -22,7 +22,7 @@ describe 'BranchesApi' do
22
22
 
23
23
  # unit tests for branch_compare
24
24
  # Compare branches
25
- # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size.*
25
+ # Compare branch with main branch. *Note: Comparing a branch may take several minutes depending on the project size. Consider using the &#x60;POST /compare&#x60; endpoint for creating comparison asynchronously.*
26
26
  # @param project_id Project ID
27
27
  # @param name name
28
28
  # @param [Hash] opts the optional parameters
@@ -34,6 +34,21 @@ describe 'BranchesApi' do
34
34
  end
35
35
  end
36
36
 
37
+ # unit tests for branch_comparison_create
38
+ # Create comparison (async.)
39
+ # Create a branch comparison asynchronously.
40
+ # @param project_id Project ID
41
+ # @param name name
42
+ # @param branch_create_comparison_parameters
43
+ # @param [Hash] opts the optional parameters
44
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
45
+ # @return [nil]
46
+ describe 'branch_comparison_create test' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
37
52
  # unit tests for branch_create
38
53
  # Create a branch
39
54
  # Create a new branch. *Note: Creating a new branch may take several minutes depending on the project size.*
@@ -93,7 +108,7 @@ describe 'BranchesApi' do
93
108
 
94
109
  # unit tests for branch_sync
95
110
  # Sync a branch
96
- # Sync an existing branch. *Note: Only available for branches created with new branching. New branching is currently in private beta*
111
+ # Sync an existing branch. *Note: Only available for branches created with new branching.*
97
112
  # @param project_id Project ID
98
113
  # @param name name
99
114
  # @param branch_sync_parameters
@@ -133,6 +133,7 @@ describe 'JobsApi' do
133
133
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
134
134
  # @option opts [String] :branch Branch to use
135
135
  # @option opts [Boolean] :include_annotations Include job-locale annotations in the response
136
+ # @option opts [Boolean] :omit_translation_keys Omit translation keys in the response to reduce payload size for bigger jobs
136
137
  # @return [JobDetails]
137
138
  describe 'job_show test' do
138
139
  it 'should work' do
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::BranchCreateComparisonParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'BranchCreateComparisonParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::BranchCreateComparisonParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of BranchCreateComparisonParameters' do
19
+ it 'should create an instance of BranchCreateComparisonParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::BranchCreateComparisonParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "direction"' do
24
+ it 'should work' do
25
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
+ end
27
+ end
28
+
29
+ end
@@ -98,6 +98,12 @@ describe 'LocaleDownloadCreateParameters' do
98
98
  end
99
99
  end
100
100
 
101
+ describe 'test attribute "use_locale_fallback"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
101
107
  describe 'test attribute "source_locale_id"' do
102
108
  it 'should work' do
103
109
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phrase
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.14.0
4
+ version: 4.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phrase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-27 00:00:00.000000000 Z
11
+ date: 2025-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -98,6 +98,7 @@ files:
98
98
  - docs/BlacklistedKeyUpdateParameters.md
99
99
  - docs/BlacklistedKeysApi.md
100
100
  - docs/Branch.md
101
+ - docs/BranchCreateComparisonParameters.md
101
102
  - docs/BranchCreateParameters.md
102
103
  - docs/BranchMergeParameters.md
103
104
  - docs/BranchName.md
@@ -430,6 +431,7 @@ files:
430
431
  - lib/phrase/models/blacklisted_key_create_parameters.rb
431
432
  - lib/phrase/models/blacklisted_key_update_parameters.rb
432
433
  - lib/phrase/models/branch.rb
434
+ - lib/phrase/models/branch_create_comparison_parameters.rb
433
435
  - lib/phrase/models/branch_create_parameters.rb
434
436
  - lib/phrase/models/branch_merge_parameters.rb
435
437
  - lib/phrase/models/branch_name.rb
@@ -709,6 +711,7 @@ files:
709
711
  - spec/models/blacklisted_key_create_parameters_spec.rb
710
712
  - spec/models/blacklisted_key_spec.rb
711
713
  - spec/models/blacklisted_key_update_parameters_spec.rb
714
+ - spec/models/branch_create_comparison_parameters_spec.rb
712
715
  - spec/models/branch_create_parameters_spec.rb
713
716
  - spec/models/branch_merge_parameters_spec.rb
714
717
  - spec/models/branch_name_spec.rb
@@ -1202,6 +1205,7 @@ test_files:
1202
1205
  - spec/models/job_preview_spec.rb
1203
1206
  - spec/models/branch_spec.rb
1204
1207
  - spec/models/job_template_preview_spec.rb
1208
+ - spec/models/branch_create_comparison_parameters_spec.rb
1205
1209
  - spec/models/authorization_create_parameters_spec.rb
1206
1210
  - spec/models/team_detail_spec.rb
1207
1211
  - spec/models/translation_exclude_parameters_spec.rb