phrase 4.24.0 → 4.26.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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +19 -4
  4. data/docs/AutomationEvent.md +33 -0
  5. data/docs/AutomationEventProject.md +19 -0
  6. data/docs/AutomationEventsApi.md +168 -0
  7. data/docs/AutomationsCreateParameters.md +1 -1
  8. data/docs/AutomationsCreateParameters1.md +1 -1
  9. data/docs/BranchComparison.md +23 -0
  10. data/docs/BranchComparisonChange.md +19 -0
  11. data/docs/BranchComparisonDiff.md +21 -0
  12. data/docs/BranchComparisonDiffConflictsValue.md +19 -0
  13. data/docs/BranchesApi.md +5 -4
  14. data/docs/DocumentsApi.md +4 -4
  15. data/docs/Format.md +20 -20
  16. data/docs/FormatsApi.md +1 -1
  17. data/docs/ICUApi.md +1 -1
  18. data/docs/IcuSkeletonError.md +17 -0
  19. data/docs/IcuSkeletonParameters.md +11 -11
  20. data/docs/Job.md +3 -1
  21. data/docs/JobDetails.md +2 -0
  22. data/docs/JobsApi.md +2 -2
  23. data/docs/KeyCreateParameters.md +1 -1
  24. data/docs/KeyFormatAnnotationsApi.md +74 -0
  25. data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
  26. data/docs/KeyLinksBatchDestroyParameters.md +6 -4
  27. data/docs/KeyLinksCreateParameters.md +2 -2
  28. data/docs/KeyUpdateParameters.md +1 -1
  29. data/docs/LinkedKeysApi.md +14 -13
  30. data/docs/Locale.md +2 -0
  31. data/docs/LocaleCreateParameters.md +3 -1
  32. data/docs/LocaleDetails.md +2 -0
  33. data/docs/LocaleDownloadCreateParameters.md +4 -0
  34. data/docs/LocaleUpdateParameters.md +3 -1
  35. data/docs/LocalesApi.md +2 -2
  36. data/docs/PreTranslation.md +29 -0
  37. data/docs/PreTranslationCreateParameters.md +19 -0
  38. data/docs/PreTranslationsApi.md +210 -0
  39. data/docs/ProjectCreateParameters.md +1 -1
  40. data/docs/ProjectUpdateParameters.md +1 -1
  41. data/docs/RepoSync.md +2 -0
  42. data/docs/RepoSyncCreateParameters.md +2 -0
  43. data/docs/ScreenshotUpdateParameters.md +1 -1
  44. data/docs/ScreenshotsApi.md +11 -11
  45. data/lib/phrase/api/automation_events_api.rb +215 -0
  46. data/lib/phrase/api/branches_api.rb +5 -3
  47. data/lib/phrase/api/documents_api.rb +6 -6
  48. data/lib/phrase/api/formats_api.rb +2 -2
  49. data/lib/phrase/api/icu_api.rb +2 -6
  50. data/lib/phrase/api/key_format_annotations_api.rb +85 -0
  51. data/lib/phrase/api/linked_keys_api.rb +19 -23
  52. data/lib/phrase/api/locales_api.rb +2 -2
  53. data/lib/phrase/api/pre_translations_api.rb +240 -0
  54. data/lib/phrase/api/screenshots_api.rb +20 -16
  55. data/lib/phrase/models/automation_event.rb +325 -0
  56. data/lib/phrase/models/automation_event_project.rb +208 -0
  57. data/lib/phrase/models/automations_create_parameters.rb +1 -1
  58. data/lib/phrase/models/automations_create_parameters1.rb +1 -1
  59. data/lib/phrase/models/branch_comparison.rb +224 -0
  60. data/lib/phrase/models/branch_comparison_change.rb +212 -0
  61. data/lib/phrase/models/branch_comparison_diff.rb +223 -0
  62. data/lib/phrase/models/branch_comparison_diff_conflicts_value.rb +209 -0
  63. data/lib/phrase/models/format.rb +60 -0
  64. data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
  65. data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
  66. data/lib/phrase/models/job.rb +16 -5
  67. data/lib/phrase/models/job_details.rb +12 -1
  68. data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
  69. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
  70. data/lib/phrase/models/key_links_create_parameters.rb +1 -1
  71. data/lib/phrase/models/locale.rb +10 -1
  72. data/lib/phrase/models/locale_create_parameters.rb +14 -4
  73. data/lib/phrase/models/locale_details.rb +10 -1
  74. data/lib/phrase/models/locale_download_create_parameters.rb +21 -1
  75. data/lib/phrase/models/locale_update_parameters.rb +14 -4
  76. data/lib/phrase/models/pre_translation.rb +301 -0
  77. data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
  78. data/lib/phrase/models/repo_sync.rb +29 -1
  79. data/lib/phrase/models/repo_sync_create_parameters.rb +27 -1
  80. data/lib/phrase/response.rb +2 -2
  81. data/lib/phrase/version.rb +1 -1
  82. data/lib/phrase.rb +13 -1
  83. data/phrase.gemspec +1 -1
  84. data/spec/api/automation_events_api_spec.rb +67 -0
  85. data/spec/api/branches_api_spec.rb +1 -1
  86. data/spec/api/documents_api_spec.rb +3 -3
  87. data/spec/api/formats_api_spec.rb +1 -1
  88. data/spec/api/icu_api_spec.rb +1 -1
  89. data/spec/api/key_format_annotations_api_spec.rb +38 -0
  90. data/spec/api/linked_keys_api_spec.rb +7 -7
  91. data/spec/api/pre_translations_api_spec.rb +70 -0
  92. data/spec/api/screenshots_api_spec.rb +6 -6
  93. data/spec/models/automation_event_project_spec.rb +35 -0
  94. data/spec/models/automation_event_spec.rb +85 -0
  95. data/spec/models/branch_comparison_change_spec.rb +35 -0
  96. data/spec/models/branch_comparison_diff_conflicts_value_spec.rb +35 -0
  97. data/spec/models/branch_comparison_diff_spec.rb +41 -0
  98. data/spec/models/branch_comparison_spec.rb +47 -0
  99. data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
  100. data/spec/models/job_details_spec.rb +6 -0
  101. data/spec/models/job_spec.rb +6 -0
  102. data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
  103. data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
  104. data/spec/models/locale_create_parameters_spec.rb +6 -0
  105. data/spec/models/locale_details_spec.rb +6 -0
  106. data/spec/models/locale_download_create_parameters_spec.rb +12 -0
  107. data/spec/models/locale_spec.rb +6 -0
  108. data/spec/models/locale_update_parameters_spec.rb +6 -0
  109. data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
  110. data/spec/models/pre_translation_spec.rb +73 -0
  111. data/spec/models/repo_sync_create_parameters_spec.rb +6 -0
  112. data/spec/models/repo_sync_spec.rb +6 -0
  113. data/spec/response_spec.rb +53 -0
  114. metadata +304 -254
  115. data/docs/KeyLinksIndex400Response.md +0 -17
@@ -0,0 +1,17 @@
1
+ # Phrase::IcuSkeletonError
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **error** | **String** | Human-readable description of the ICU message format parse failure. | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'Phrase'
13
+
14
+ instance = Phrase::IcuSkeletonError.new(error: Expected "#" but "x" found.)
15
+ ```
16
+
17
+
@@ -4,24 +4,24 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **content** | **String** | Source content to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided. | [optional]
8
- **id** | **String** | Translation code to source content from. Mutually exclusive with `content`; exactly one of the two must be provided. | [optional]
9
- **locale_codes** | **Array<String>** | Locale codes | [optional]
10
- **keep_content** | **Boolean** | Keep the content and add missing plural forms for each locale | [optional]
11
- **zero_form_enabled** | **Boolean** | Indicates whether the zero form should be included or excluded in the returned skeletons | [optional]
12
- **cldr_version** | **String** | Strings supports two CLDR variants, when it comes to pluralization rules. \\ You can choose which one you want to use when constructing the skeletons. Possible values \\ are `legacy` and `cldr_41`. Default value is `legacy`. | [optional]
7
+ **content** | **String** | Source ICU message string to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided. | [optional]
8
+ **id** | **String** | Code of an existing translation to source content from. Mutually exclusive with `content`; exactly one of the two must be provided. Returns 404 when the translation does not exist. | [optional]
9
+ **locale_codes** | **Array<String>** | Locale codes for which to generate skeletons. The pluralization rules of each locale determine which plural forms appear in the output. | [optional]
10
+ **keep_content** | **Boolean** | When true, preserves the existing translation text in each plural form and adds any missing forms for the locale rather than stripping all literal content. | [optional]
11
+ **zero_form_enabled** | **Boolean** | When true, includes the zero plural form in the generated skeleton for locales that support it. | [optional]
12
+ **cldr_version** | **String** | Pluralization rule set to use when constructing skeletons. Pass `legacy` for pre-CLDR behaviour, or a CLDR version string such as `cldr48`. Defaults to the project's configured version when omitted. | [optional]
13
13
 
14
14
  ## Code Sample
15
15
 
16
16
  ```ruby
17
17
  require 'Phrase'
18
18
 
19
- instance = Phrase::IcuSkeletonParameters.new(content: {number, plural, one {One} other {%{n}}},
19
+ instance = Phrase::IcuSkeletonParameters.new(content: {count, plural, one {One item} other {# items}},
20
20
  id: abcd1234abcd1234abcd1234abcd1234,
21
- locale_codes: ["en"],
22
- keep_content: null,
23
- zero_form_enabled: null,
24
- cldr_version: cldr_41)
21
+ locale_codes: ["en","de"],
22
+ keep_content: false,
23
+ zero_form_enabled: false,
24
+ cldr_version: cldr48)
25
25
  ```
26
26
 
27
27
 
data/docs/Job.md CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
16
16
  **updated_at** | **Time** | | [optional]
17
17
  **automation_id** | **String** | The ID of the automation that created this job, or null if the job was created manually. | [optional]
18
18
  **job_template_id** | **String** | The ID of the job template this job was created from, or null if no template was used. | [optional]
19
+ **review_due_date** | **Time** | The review due date for this job. Returns `null` when the project does not have review workflow enabled. | [optional]
19
20
 
20
21
  ## Code Sample
21
22
 
@@ -33,7 +34,8 @@ instance = Phrase::Job.new(id: null,
33
34
  created_at: null,
34
35
  updated_at: null,
35
36
  automation_id: null,
36
- job_template_id: null)
37
+ job_template_id: null,
38
+ review_due_date: 2015-03-25T11:43:52Z)
37
39
  ```
38
40
 
39
41
 
data/docs/JobDetails.md CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
16
16
  **updated_at** | **Time** | | [optional]
17
17
  **automation_id** | **String** | The ID of the automation that created this job, or null if the job was created manually. | [optional]
18
18
  **job_template_id** | **String** | The ID of the job template this job was created from, or null if no template was used. | [optional]
19
+ **review_due_date** | **Time** | The review due date for this job. Returns `null` when the project does not have review workflow enabled. | [optional]
19
20
  **owner** | [**UserPreview**](UserPreview.md) | | [optional]
20
21
  **job_tag_name** | **String** | | [optional]
21
22
  **source_translations_updated_at** | **Time** | | [optional]
@@ -42,6 +43,7 @@ instance = Phrase::JobDetails.new(id: null,
42
43
  updated_at: null,
43
44
  automation_id: null,
44
45
  job_template_id: null,
46
+ review_due_date: 2015-03-25T11:43:52Z,
45
47
  owner: null,
46
48
  job_tag_name: null,
47
49
  source_translations_updated_at: null,
data/docs/JobsApi.md CHANGED
@@ -768,7 +768,7 @@ opts = {
768
768
  owned_by: 'abcd1234cdef1234abcd1234cdef1234', # String | filter by user owning job
769
769
  assigned_to: 'abcd1234cdef1234abcd1234cdef1234', # String | filter by user assigned to job
770
770
  state: 'completed', # String | filter by state of job; valid states are: `draft`, `in_progress`, `completed`
771
- updated_since: '2013-02-21T00:00:00.000Z' # String | filter by jobs updated since given date
771
+ updated_since: '2013-02-21T00:00:00Z' # String | filter by jobs updated since given date
772
772
  }
773
773
 
774
774
  begin
@@ -844,7 +844,7 @@ opts = {
844
844
  state: 'completed', # String | filter by state of job; valid states are: `draft`, `in_progress`, `completed`
845
845
  states: ['inner_example'], # Array<String> | Filter by multiple job states at once. Accepted values are the same as `state`. When supplied, `state` is ignored. Rejected with `400 Bad Request` if any value is unknown.
846
846
  key_id: 'abcd1234cdef1234abcd1234cdef1234', # String | Filter to jobs that include the translation key identified by this code (matches via the job's tags).
847
- updated_since: '2013-02-21T00:00:00.000Z' # String | filter by jobs updated since given date
847
+ updated_since: '2013-02-21T00:00:00Z' # String | filter by jobs updated since given date
848
848
  }
849
849
 
850
850
  begin
@@ -40,7 +40,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
40
40
  data_type: number,
41
41
  tags: awesome-feature,needs-proofreading,
42
42
  max_characters_allowed: 140,
43
- screenshot: [B@5db553f9,
43
+ screenshot: [B@32a4284d,
44
44
  remove_screenshot: null,
45
45
  unformatted: null,
46
46
  default_translation_content: Default translation content,
@@ -0,0 +1,74 @@
1
+ # Phrase::KeyFormatAnnotationsApi
2
+
3
+ All URIs are relative to *https://api.phrase.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**key_format_annotations_list**](KeyFormatAnnotationsApi.md#key_format_annotations_list) | **GET** /projects/{project_id}/keys/{id}/format_annotations | List format annotations for a key
8
+
9
+
10
+
11
+ ## key_format_annotations_list
12
+
13
+ > Array&lt;KeyFormatAnnotationsList200ResponseInner&gt; key_format_annotations_list(project_id, id, opts)
14
+
15
+ List format annotations for a key
16
+
17
+ Returns the format annotations stored on a translation key. Format annotations capture file-format data recorded when the key was imported — for example, an ARB placeholder block or an XLIFF note. Results are limited to 1,000 entries.
18
+
19
+ ### Example
20
+
21
+ ```ruby
22
+ # load the gem
23
+ require 'phrase'
24
+ # setup authorization
25
+ Phrase.configure do |config|
26
+ # Configure HTTP basic authorization: Basic
27
+ config.username = 'YOUR USERNAME'
28
+ config.password = 'YOUR PASSWORD'
29
+
30
+ # Configure API key authorization: Token
31
+ config.api_key['Authorization'] = 'YOUR API KEY'
32
+ config.api_key_prefix['Authorization'] = 'token'
33
+ end
34
+
35
+ api_instance = Phrase::KeyFormatAnnotationsApi.new
36
+ project_id = 'project_id_example' # String | Project ID
37
+ id = 'id_example' # String | ID
38
+ opts = {
39
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
40
+ branch: 'my-feature-branch' # String | Branch to use
41
+ }
42
+
43
+ begin
44
+ #List format annotations for a key
45
+ result = api_instance.key_format_annotations_list(project_id, id, opts)
46
+ pp result
47
+ rescue Phrase::ApiError => e
48
+ puts "Exception when calling KeyFormatAnnotationsApi->key_format_annotations_list: #{e}"
49
+ end
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **project_id** | **String**| Project ID |
58
+ **id** | **String**| ID |
59
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
60
+ **branch** | **String**| Branch to use | [optional]
61
+
62
+ ### Return type
63
+
64
+ Response<([**Array&lt;KeyFormatAnnotationsList200ResponseInner&gt;**](KeyFormatAnnotationsList200ResponseInner.md))>
65
+
66
+ ### Authorization
67
+
68
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: Not defined
73
+ - **Accept**: application/json
74
+
@@ -0,0 +1,19 @@
1
+ # Phrase::KeyFormatAnnotationsList200ResponseInner
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **file_format** | **String** | The file format that produced this annotation. | [optional]
8
+ **original_representation** | **String** | The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'Phrase'
14
+
15
+ instance = Phrase::KeyFormatAnnotationsList200ResponseInner.new(file_format: xliff_2,
16
+ original_representation: &lt;note category&#x3D;&quot;meaning&quot;&gt;header&lt;/note&gt;)
17
+ ```
18
+
19
+
@@ -4,16 +4,18 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **child_key_ids** | **Array&lt;String&gt;** | The IDs of the child keys to unlink from the parent key. |
8
- **unlink_parent** | **Boolean** | Whether to unlink the parent key as well and unmark it as linked-key. | [optional] [default to false]
7
+ **child_key_ids** | **Array&lt;String&gt;** | Codes of the child keys to unlink. Required when unlink_parent is false or omitted. Ignored when unlink_parent is true. |
8
+ **unlink_parent** | **Boolean** | When true, dissolves the entire linked-key group by unlinking all children and removing the group. The child_key_ids field is ignored when this is set to true. | [optional] [default to false]
9
+ **strategy** | **String** | Controls what happens to child key translation content after unlinking. keep_content (default) copies the parent translation into each child; remove_content clears each child translation. | [optional] [default to &#39;keep_content&#39;]
9
10
 
10
11
  ## Code Sample
11
12
 
12
13
  ```ruby
13
14
  require 'Phrase'
14
15
 
15
- instance = Phrase::KeyLinksBatchDestroyParameters.new(child_key_ids: [&quot;child_key_id1&quot;,&quot;child_key_id2&quot;],
16
- unlink_parent: null)
16
+ instance = Phrase::KeyLinksBatchDestroyParameters.new(child_key_ids: [&quot;feature.subtitle&quot;,&quot;nav.home&quot;],
17
+ unlink_parent: null,
18
+ strategy: null)
17
19
  ```
18
20
 
19
21
 
@@ -4,14 +4,14 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **child_key_ids** | **Array&lt;String&gt;** | The IDs of the child keys to link to the parent key. Can be left empty, to only mark the given translation-key as parent |
7
+ **child_key_ids** | **Array&lt;String&gt;** | Codes of the keys to link as children. Pass an empty array to mark the parent key without linking any children. |
8
8
 
9
9
  ## Code Sample
10
10
 
11
11
  ```ruby
12
12
  require 'Phrase'
13
13
 
14
- instance = Phrase::KeyLinksCreateParameters.new(child_key_ids: [&quot;child_key_id1&quot;,&quot;child_key_id2&quot;])
14
+ instance = Phrase::KeyLinksCreateParameters.new(child_key_ids: [&quot;ijkl9012mnop3456ijkl9012mnop3456&quot;,&quot;abcd1234efgh5678abcd1234efgh5678&quot;])
15
15
  ```
16
16
 
17
17
 
@@ -38,7 +38,7 @@ instance = Phrase::KeyUpdateParameters.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@264e6ac3,
41
+ screenshot: [B@5a9d5e2,
42
42
  remove_screenshot: null,
43
43
  unformatted: null,
44
44
  xml_space_preserve: null,
@@ -13,11 +13,11 @@ Method | HTTP request | Description
13
13
 
14
14
  ## key_links_batch_destroy
15
15
 
16
- > key_links_batch_destroy(project_id, id, key_links_batch_destroy_parameters, opts)
16
+ > KeyLink key_links_batch_destroy(project_id, id, opts)
17
17
 
18
18
  Batch unlink child keys from a parent key
19
19
 
20
- Unlinks multiple child keys from a given parent key in a single operation.
20
+ Removes one or more child keys from a parent key's linked-key group, or dissolves the entire group by setting unlink_parent to true. Use this when you need to detach specific child keys from a shared translation source, or to fully break apart a linked-key group so each key manages its own translations independently. When child keys are unlinked, their translations are updated with a copy of the parent's current content (strategy keep_content, the default) or cleared (strategy remove_content). This operation is only available on main projects. It returns 422 when a child key in `child_key_ids` is not currently linked to the parent, or when a translation update fails while unlinking.
21
21
 
22
22
  ### Example
23
23
 
@@ -38,14 +38,15 @@ end
38
38
  api_instance = Phrase::LinkedKeysApi.new
39
39
  project_id = 'project_id_example' # String | Project ID
40
40
  id = 'id_example' # String | Parent Translation Key ID
41
- key_links_batch_destroy_parameters = Phrase::KeyLinksBatchDestroyParameters.new({child_key_ids: ["child_key_id1", "child_key_id2"]}) # KeyLinksBatchDestroyParameters |
42
41
  opts = {
43
- x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
42
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
43
+ key_links_batch_destroy_parameters: Phrase::KeyLinksBatchDestroyParameters.new({child_key_ids: ["feature.subtitle", "nav.home"]}) # KeyLinksBatchDestroyParameters |
44
44
  }
45
45
 
46
46
  begin
47
47
  #Batch unlink child keys from a parent key
48
- api_instance.key_links_batch_destroy(project_id, id, key_links_batch_destroy_parameters, opts)
48
+ result = api_instance.key_links_batch_destroy(project_id, id, opts)
49
+ pp result
49
50
  rescue Phrase::ApiError => e
50
51
  puts "Exception when calling LinkedKeysApi->key_links_batch_destroy: #{e}"
51
52
  end
@@ -58,12 +59,12 @@ Name | Type | Description | Notes
58
59
  ------------- | ------------- | ------------- | -------------
59
60
  **project_id** | **String**| Project ID |
60
61
  **id** | **String**| Parent Translation Key ID |
61
- **key_links_batch_destroy_parameters** | [**KeyLinksBatchDestroyParameters**](KeyLinksBatchDestroyParameters.md)| |
62
62
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
63
+ **key_links_batch_destroy_parameters** | [**KeyLinksBatchDestroyParameters**](KeyLinksBatchDestroyParameters.md)| | [optional]
63
64
 
64
65
  ### Return type
65
66
 
66
- Response<(nil (empty response body))>
67
+ Response<([**KeyLink**](KeyLink.md))>
67
68
 
68
69
  ### Authorization
69
70
 
@@ -81,7 +82,7 @@ Response<(nil (empty response body))>
81
82
 
82
83
  Link child keys to a parent key
83
84
 
84
- Creates links between a given parent key and one or more child keys.
85
+ Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together. Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
85
86
 
86
87
  ### Example
87
88
 
@@ -102,7 +103,7 @@ end
102
103
  api_instance = Phrase::LinkedKeysApi.new
103
104
  project_id = 'project_id_example' # String | Project ID
104
105
  id = 'id_example' # String | Parent Translation Key ID
105
- key_links_create_parameters = Phrase::KeyLinksCreateParameters.new({child_key_ids: ["child_key_id1", "child_key_id2"]}) # KeyLinksCreateParameters |
106
+ key_links_create_parameters = Phrase::KeyLinksCreateParameters.new({child_key_ids: ["ijkl9012mnop3456ijkl9012mnop3456", "abcd1234efgh5678abcd1234efgh5678"]}) # KeyLinksCreateParameters |
106
107
  opts = {
107
108
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
108
109
  }
@@ -146,7 +147,7 @@ Response<([**KeyLink**](KeyLink.md))>
146
147
 
147
148
  Unlink a child key from a parent key
148
149
 
149
- Unlinks a single child key from a given parent key.
150
+ Removes a single child key from a parent key's link group. A link group is the relationship model that keeps child keys synchronized with a parent: while linked, a child key's translations are derived from the parent's content. When you call this endpoint, the child key leaves the group and becomes independent — its existing translations are updated with the parent's current content and then marked unverified, signalling that reviewers should confirm the content is still appropriate for the child's context. Use this endpoint when you need to detach one specific child key while keeping other children linked. To detach multiple children at once, use the batch unlink endpoint. This operation is only available on main projects. It returns 422 when the child key is not currently linked to the specified parent key, or when a translation update fails during the unlink process.
150
151
 
151
152
  ### Example
152
153
 
@@ -167,7 +168,7 @@ end
167
168
  api_instance = Phrase::LinkedKeysApi.new
168
169
  project_id = 'project_id_example' # String | Project ID
169
170
  id = 'id_example' # String | Parent Translation Key ID
170
- child_key_id = 'child_key_id_example' # String | The ID of the child key to unlink.
171
+ child_key_id = '1234abcd1234cdef1234abcd1234cdef' # String | The ID of the child translation key to unlink from the parent.
171
172
  opts = {
172
173
  x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
173
174
  }
@@ -187,7 +188,7 @@ Name | Type | Description | Notes
187
188
  ------------- | ------------- | ------------- | -------------
188
189
  **project_id** | **String**| Project ID |
189
190
  **id** | **String**| Parent Translation Key ID |
190
- **child_key_id** | **String**| The ID of the child key to unlink. |
191
+ **child_key_id** | **String**| The ID of the child translation key to unlink from the parent. |
191
192
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
192
193
 
193
194
  ### Return type
@@ -210,7 +211,7 @@ Response<(nil (empty response body))>
210
211
 
211
212
  List child keys of a parent key
212
213
 
213
- Returns detailed information about a parent key, including its linked child keys.
214
+ Returns the key link record for a parent key, including all child keys associated with it. Key linking lets translation keys share translations — a child key inherits content from its designated parent. Use this endpoint to inspect which keys are linked under a given parent before unlinking them or auditing translation consistency across related keys. The key identified by `id` must be designated as a parent key (it must have at least one child key linked to it). Listing the links of a key that is not a parent returns 400.
214
215
 
215
216
  ### Example
216
217
 
data/docs/Locale.md CHANGED
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **ordinal_plural_forms** | **Array&lt;String&gt;** | | [optional]
15
15
  **source_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
16
16
  **fallback_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
17
+ **language_ai_profile** | **String** | | [optional]
17
18
  **created_at** | **Time** | | [optional]
18
19
  **updated_at** | **Time** | | [optional]
19
20
 
@@ -32,6 +33,7 @@ instance = Phrase::Locale.new(id: null,
32
33
  ordinal_plural_forms: null,
33
34
  source_locale: null,
34
35
  fallback_locale: null,
36
+ language_ai_profile: null,
35
37
  created_at: null,
36
38
  updated_at: null)
37
39
  ```
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
15
15
  **unverify_new_translations** | **Boolean** | Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature. | [optional]
16
16
  **unverify_updated_translations** | **Boolean** | Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature. | [optional]
17
17
  **autotranslate** | **Boolean** | If set, translations for this locale will be fetched automatically, right after creation. | [optional]
18
+ **language_ai_profile** | **String** | Identifier of the Language AI profile to use for this locale. | [optional]
18
19
 
19
20
  ## Code Sample
20
21
 
@@ -31,7 +32,8 @@ instance = Phrase::LocaleCreateParameters.new(branch: my-feature-branch,
31
32
  fallback_locale_id: abcd1234abcd1234abcd1234abcd1234,
32
33
  unverify_new_translations: null,
33
34
  unverify_updated_translations: null,
34
- autotranslate: null)
35
+ autotranslate: null,
36
+ language_ai_profile: abcd1234abcd1234abcd1234abcd1234)
35
37
  ```
36
38
 
37
39
 
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **ordinal_plural_forms** | **Array&lt;String&gt;** | | [optional]
15
15
  **source_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
16
16
  **fallback_locale** | [**LocalePreview**](LocalePreview.md) | | [optional]
17
+ **language_ai_profile** | **String** | | [optional]
17
18
  **created_at** | **Time** | | [optional]
18
19
  **updated_at** | **Time** | | [optional]
19
20
  **statistics** | [**LocaleStatistics**](LocaleStatistics.md) | | [optional]
@@ -33,6 +34,7 @@ instance = Phrase::LocaleDetails.new(id: null,
33
34
  ordinal_plural_forms: null,
34
35
  source_locale: null,
35
36
  fallback_locale: null,
37
+ language_ai_profile: null,
36
38
  created_at: null,
37
39
  updated_at: null,
38
40
  statistics: null)
@@ -21,6 +21,8 @@ Name | Type | Description | Notes
21
21
  **fallback_for_unverified_translations** | **Boolean** | If set to &#x60;true&#x60;, translations in a non-final state are replaced by the fallback locale&#39;s translation at export time. In the simple workflow, \&quot;non-final\&quot; means &#x60;unverified&#x60;. In the review workflow, it additionally includes &#x60;translated&#x60; (awaiting review). No stored translations are modified. Requires &#x60;fallback_locale_id&#x60; or &#x60;use_locale_fallback&#x60; to be set; a &#x60;422&#x60; validation error is returned otherwise. | [optional]
22
22
  **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]
23
23
  **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]
24
+ **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]
25
+ **filter_by_prefix** | **Boolean** | Only download translation keys containing the prefix specified by &#x60;translation_key_prefix&#x60;, and remove that prefix from the generated file. Requires &#x60;translation_key_prefix&#x60; to be set. | [optional]
24
26
  **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]
25
27
 
26
28
  ## Code Sample
@@ -45,6 +47,8 @@ instance = Phrase::LocaleDownloadCreateParameters.new(file_format: yml,
45
47
  fallback_for_unverified_translations: false,
46
48
  source_locale_id: abcd1234abcd1234abcd1234abcd1234,
47
49
  custom_metadata_filters: null,
50
+ translation_key_prefix: prefix_,
51
+ filter_by_prefix: null,
48
52
  updated_since: 2023-01-01T00:00:00Z)
49
53
  ```
50
54
 
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
15
15
  **unverify_new_translations** | **Boolean** | Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature. | [optional]
16
16
  **unverify_updated_translations** | **Boolean** | Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature. | [optional]
17
17
  **autotranslate** | **Boolean** | If set, translations for this locale will be fetched automatically, right after creation. | [optional]
18
+ **language_ai_profile** | **String** | Identifier of the Language AI profile to use for this locale. | [optional]
18
19
 
19
20
  ## Code Sample
20
21
 
@@ -31,7 +32,8 @@ instance = Phrase::LocaleUpdateParameters.new(branch: my-feature-branch,
31
32
  fallback_locale_id: abcd1234abcd1234abcd1234abcd1234,
32
33
  unverify_new_translations: null,
33
34
  unverify_updated_translations: null,
34
- autotranslate: null)
35
+ autotranslate: null,
36
+ language_ai_profile: abcd1234abcd1234abcd1234abcd1234)
35
37
  ```
36
38
 
37
39
 
data/docs/LocalesApi.md CHANGED
@@ -256,7 +256,7 @@ opts = {
256
256
  fallback_for_unverified_translations: true, # Boolean | If set to `true`, translations in a non-final state are replaced by the fallback locale's translation at export time. In the simple workflow, \"non-final\" means `unverified`. In the review workflow, it additionally includes `translated` (awaiting review). No stored translations are modified. Requires `fallback_locale_id` or `use_locale_fallback` to be set; a `422` validation error is returned otherwise.
257
257
  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.
258
258
  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.
259
- filter_by_prefix: true, # Boolean | Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
259
+ filter_by_prefix: true, # Boolean | Only download translation keys containing the prefix specified by `translation_key_prefix`, and remove that prefix from the generated file. Requires `translation_key_prefix` to be set.
260
260
  custom_metadata_filters: { key: 3.56}, # 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.
261
261
  locale_ids: ['inner_example'], # Array<String> | Locale IDs or locale names
262
262
  updated_since: '2023-01-01T00:00:00Z' # String | Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
@@ -300,7 +300,7 @@ Name | Type | Description | Notes
300
300
  **fallback_for_unverified_translations** | **Boolean**| If set to &#x60;true&#x60;, translations in a non-final state are replaced by the fallback locale&#39;s translation at export time. In the simple workflow, \&quot;non-final\&quot; means &#x60;unverified&#x60;. In the review workflow, it additionally includes &#x60;translated&#x60; (awaiting review). No stored translations are modified. Requires &#x60;fallback_locale_id&#x60; or &#x60;use_locale_fallback&#x60; to be set; a &#x60;422&#x60; validation error is returned otherwise. | [optional]
301
301
  **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]
302
302
  **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]
303
- **filter_by_prefix** | **Boolean**| Only download translation keys containing the specified prefix, and remove the prefix from the generated file. | [optional]
303
+ **filter_by_prefix** | **Boolean**| Only download translation keys containing the prefix specified by &#x60;translation_key_prefix&#x60;, and remove that prefix from the generated file. Requires &#x60;translation_key_prefix&#x60; to be set. | [optional]
304
304
  **custom_metadata_filters** | [**Object**](.md)| 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]
305
305
  **locale_ids** | [**Array&lt;String&gt;**](String.md)| Locale IDs or locale names | [optional]
306
306
  **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]
@@ -0,0 +1,29 @@
1
+ # Phrase::PreTranslation
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | | [optional]
8
+ **status** | **String** | Current execution state of the pre-translation job. Jobs start as &#x60;pending&#x60; while queued, transition to &#x60;running&#x60; while executing, and settle to &#x60;success&#x60; or &#x60;error&#x60;. | [optional]
9
+ **translatable_type** | **String** | Resource type that was pre-translated. | [optional]
10
+ **translatable_id** | **String** | ID of the targeted resource (locale ID, job ID, key ID, or upload ID). | [optional]
11
+ **error** | **String** | Error message. &#x60;null&#x60; unless the job&#39;s status is &#x60;error&#x60;. | [optional]
12
+ **created_at** | **Time** | | [optional]
13
+ **updated_at** | **Time** | | [optional]
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'Phrase'
19
+
20
+ instance = Phrase::PreTranslation.new(id: abcd1234cdef1234abcd1234cdef1234,
21
+ status: null,
22
+ translatable_type: null,
23
+ translatable_id: abcd1234cdef1234abcd1234cdef1234,
24
+ error: null,
25
+ created_at: null,
26
+ updated_at: null)
27
+ ```
28
+
29
+
@@ -0,0 +1,19 @@
1
+ # Phrase::PreTranslationCreateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **translatable_type** | **String** | Resource type to pre-translate. | [optional]
8
+ **translatable_id** | **String** | ID of the targeted resource: locale ID for &#x60;locale&#x60;, job ID for &#x60;job&#x60;, key ID for &#x60;translation_key&#x60;, upload ID for &#x60;upload&#x60;. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'Phrase'
14
+
15
+ instance = Phrase::PreTranslationCreateParameters.new(translatable_type: null,
16
+ translatable_id: null)
17
+ ```
18
+
19
+