phrase 4.25.0 → 4.27.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +26 -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/CheckIssue.md +33 -0
  10. data/docs/ChecksApi.md +146 -0
  11. data/docs/DocumentsApi.md +4 -4
  12. data/docs/ICUApi.md +1 -1
  13. data/docs/IcuSkeletonError.md +17 -0
  14. data/docs/IcuSkeletonParameters.md +11 -11
  15. data/docs/JobCreateParameters.md +1 -1
  16. data/docs/JobsApi.md +2 -2
  17. data/docs/KeyCreateParameters.md +1 -1
  18. data/docs/KeyFormatAnnotationsApi.md +74 -0
  19. data/docs/KeyFormatAnnotationsList200ResponseInner.md +19 -0
  20. data/docs/KeyLinksBatchDestroyParameters.md +6 -4
  21. data/docs/KeyLinksCreateParameters.md +2 -2
  22. data/docs/KeyUpdateParameters.md +1 -1
  23. data/docs/LinkedKeysApi.md +14 -13
  24. data/docs/Locale.md +6 -0
  25. data/docs/LocaleCreateParameters.md +2 -0
  26. data/docs/LocaleDetails.md +6 -0
  27. data/docs/LocaleUpdateParameters.md +2 -0
  28. data/docs/MachineTranslationApi.md +263 -0
  29. data/docs/MachineTranslationLocaleProviderMapping.md +21 -0
  30. data/docs/MachineTranslationLocaleProviderMappingsCreateParameters.md +21 -0
  31. data/docs/MachineTranslationSettings.md +23 -0
  32. data/docs/MachineTranslationSettingsUpdateParameters.md +17 -0
  33. data/docs/PreTranslation.md +29 -0
  34. data/docs/PreTranslationCreateParameters.md +19 -0
  35. data/docs/PreTranslationsApi.md +210 -0
  36. data/docs/ProjectCreateParameters.md +8 -2
  37. data/docs/ProjectDetails.md +3 -1
  38. data/docs/ProjectUpdateParameters.md +8 -2
  39. data/docs/ScreenshotUpdateParameters.md +1 -1
  40. data/docs/ScreenshotsApi.md +2 -2
  41. data/docs/Upload.md +3 -1
  42. data/docs/UploadsApi.md +4 -4
  43. data/lib/phrase/api/automation_events_api.rb +215 -0
  44. data/lib/phrase/api/checks_api.rb +174 -0
  45. data/lib/phrase/api/documents_api.rb +6 -6
  46. data/lib/phrase/api/icu_api.rb +2 -6
  47. data/lib/phrase/api/key_format_annotations_api.rb +85 -0
  48. data/lib/phrase/api/linked_keys_api.rb +19 -23
  49. data/lib/phrase/api/machine_translation_api.rb +302 -0
  50. data/lib/phrase/api/pre_translations_api.rb +240 -0
  51. data/lib/phrase/api/screenshots_api.rb +4 -4
  52. data/lib/phrase/api/uploads_api.rb +6 -6
  53. data/lib/phrase/models/automation_event.rb +325 -0
  54. data/lib/phrase/models/automation_event_project.rb +208 -0
  55. data/lib/phrase/models/automations_create_parameters.rb +1 -1
  56. data/lib/phrase/models/automations_create_parameters1.rb +1 -1
  57. data/lib/phrase/models/check_issue.rb +319 -0
  58. data/lib/phrase/models/{key_links_index400_response.rb → icu_skeleton_error.rb} +11 -10
  59. data/lib/phrase/models/icu_skeleton_parameters.rb +6 -6
  60. data/lib/phrase/models/job_create_parameters.rb +1 -1
  61. data/lib/phrase/models/key_format_annotations_list200_response_inner.rb +207 -0
  62. data/lib/phrase/models/key_links_batch_destroy_parameters.rb +52 -6
  63. data/lib/phrase/models/key_links_create_parameters.rb +1 -1
  64. data/lib/phrase/models/locale.rb +31 -1
  65. data/lib/phrase/models/locale_create_parameters.rb +11 -1
  66. data/lib/phrase/models/locale_details.rb +31 -1
  67. data/lib/phrase/models/locale_update_parameters.rb +11 -1
  68. data/lib/phrase/models/machine_translation_locale_provider_mapping.rb +217 -0
  69. data/lib/phrase/models/machine_translation_locale_provider_mappings_create_parameters.rb +232 -0
  70. data/lib/phrase/models/machine_translation_settings.rb +230 -0
  71. data/lib/phrase/models/machine_translation_settings_update_parameters.rb +198 -0
  72. data/lib/phrase/models/pre_translation.rb +301 -0
  73. data/lib/phrase/models/pre_translation_create_parameters.rb +241 -0
  74. data/lib/phrase/models/project_create_parameters.rb +35 -1
  75. data/lib/phrase/models/project_details.rb +10 -1
  76. data/lib/phrase/models/project_update_parameters.rb +35 -1
  77. data/lib/phrase/models/upload.rb +13 -1
  78. data/lib/phrase/response.rb +2 -2
  79. data/lib/phrase/version.rb +1 -1
  80. data/lib/phrase.rb +16 -1
  81. data/phrase.gemspec +1 -1
  82. data/spec/api/automation_events_api_spec.rb +67 -0
  83. data/spec/api/checks_api_spec.rb +56 -0
  84. data/spec/api/documents_api_spec.rb +3 -3
  85. data/spec/api/icu_api_spec.rb +1 -1
  86. data/spec/api/key_format_annotations_api_spec.rb +38 -0
  87. data/spec/api/linked_keys_api_spec.rb +7 -7
  88. data/spec/api/machine_translation_api_spec.rb +79 -0
  89. data/spec/api/pre_translations_api_spec.rb +70 -0
  90. data/spec/api/screenshots_api_spec.rb +2 -2
  91. data/spec/models/automation_event_project_spec.rb +35 -0
  92. data/spec/models/automation_event_spec.rb +85 -0
  93. data/spec/models/check_issue_spec.rb +85 -0
  94. data/spec/models/{key_links_index400_response_spec.rb → icu_skeleton_error_spec.rb} +7 -7
  95. data/spec/models/key_format_annotations_list200_response_inner_spec.rb +35 -0
  96. data/spec/models/key_links_batch_destroy_parameters_spec.rb +10 -0
  97. data/spec/models/locale_create_parameters_spec.rb +6 -0
  98. data/spec/models/locale_details_spec.rb +18 -0
  99. data/spec/models/locale_spec.rb +18 -0
  100. data/spec/models/locale_update_parameters_spec.rb +6 -0
  101. data/spec/models/machine_translation_locale_provider_mapping_spec.rb +41 -0
  102. data/spec/models/machine_translation_locale_provider_mappings_create_parameters_spec.rb +41 -0
  103. data/spec/models/machine_translation_settings_spec.rb +47 -0
  104. data/spec/models/machine_translation_settings_update_parameters_spec.rb +29 -0
  105. data/spec/models/pre_translation_create_parameters_spec.rb +39 -0
  106. data/spec/models/pre_translation_spec.rb +73 -0
  107. data/spec/models/project_create_parameters_spec.rb +18 -0
  108. data/spec/models/project_details_spec.rb +6 -0
  109. data/spec/models/project_update_parameters_spec.rb +18 -0
  110. data/spec/models/upload_spec.rb +6 -0
  111. data/spec/response_spec.rb +53 -0
  112. metadata +313 -251
  113. data/docs/KeyLinksIndex400Response.md +0 -17
data/lib/phrase.rb CHANGED
@@ -18,6 +18,8 @@ require 'phrase/models/authorization_create_parameters'
18
18
  require 'phrase/models/authorization_update_parameters'
19
19
  require 'phrase/models/authorization_with_token'
20
20
  require 'phrase/models/automation'
21
+ require 'phrase/models/automation_event'
22
+ require 'phrase/models/automation_event_project'
21
23
  require 'phrase/models/automations_create_parameters'
22
24
  require 'phrase/models/automations_create_parameters1'
23
25
  require 'phrase/models/blacklisted_key'
@@ -34,6 +36,7 @@ require 'phrase/models/branch_merge_parameters'
34
36
  require 'phrase/models/branch_name'
35
37
  require 'phrase/models/branch_sync_parameters'
36
38
  require 'phrase/models/branch_update_parameters'
39
+ require 'phrase/models/check_issue'
37
40
  require 'phrase/models/comment'
38
41
  require 'phrase/models/comment_create_parameters'
39
42
  require 'phrase/models/comment_create_parameters1'
@@ -69,6 +72,7 @@ require 'phrase/models/glossary_term_translation_update_parameters'
69
72
  require 'phrase/models/glossary_term_update_parameters'
70
73
  require 'phrase/models/glossary_update_parameters'
71
74
  require 'phrase/models/icu'
75
+ require 'phrase/models/icu_skeleton_error'
72
76
  require 'phrase/models/icu_skeleton_parameters'
73
77
  require 'phrase/models/invitation'
74
78
  require 'phrase/models/invitation_create_parameters'
@@ -105,10 +109,10 @@ require 'phrase/models/job_template_preview'
105
109
  require 'phrase/models/job_template_update_parameters'
106
110
  require 'phrase/models/job_update_parameters'
107
111
  require 'phrase/models/key_create_parameters'
112
+ require 'phrase/models/key_format_annotations_list200_response_inner'
108
113
  require 'phrase/models/key_link'
109
114
  require 'phrase/models/key_links_batch_destroy_parameters'
110
115
  require 'phrase/models/key_links_create_parameters'
111
- require 'phrase/models/key_links_index400_response'
112
116
  require 'phrase/models/key_preview'
113
117
  require 'phrase/models/key_update_parameters'
114
118
  require 'phrase/models/keys_exclude_parameters'
@@ -130,6 +134,10 @@ require 'phrase/models/locale_statistics'
130
134
  require 'phrase/models/locale_team_preview'
131
135
  require 'phrase/models/locale_update_parameters'
132
136
  require 'phrase/models/locale_user_preview'
137
+ require 'phrase/models/machine_translation_locale_provider_mapping'
138
+ require 'phrase/models/machine_translation_locale_provider_mappings_create_parameters'
139
+ require 'phrase/models/machine_translation_settings'
140
+ require 'phrase/models/machine_translation_settings_update_parameters'
133
141
  require 'phrase/models/member'
134
142
  require 'phrase/models/member_project_detail'
135
143
  require 'phrase/models/member_project_detail_project_roles_inner'
@@ -147,6 +155,8 @@ require 'phrase/models/organization_job_template_details'
147
155
  require 'phrase/models/organization_job_template_locale_update_parameters'
148
156
  require 'phrase/models/organization_job_template_locales_create_parameters'
149
157
  require 'phrase/models/organization_job_template_update_parameters'
158
+ require 'phrase/models/pre_translation'
159
+ require 'phrase/models/pre_translation_create_parameters'
150
160
  require 'phrase/models/project'
151
161
  require 'phrase/models/project_create_parameters'
152
162
  require 'phrase/models/project_details'
@@ -243,9 +253,11 @@ require 'phrase/models/webhook_update_parameters'
243
253
  # APIs
244
254
  require 'phrase/api/accounts_api'
245
255
  require 'phrase/api/authorizations_api'
256
+ require 'phrase/api/automation_events_api'
246
257
  require 'phrase/api/automations_api'
247
258
  require 'phrase/api/blacklisted_keys_api'
248
259
  require 'phrase/api/branches_api'
260
+ require 'phrase/api/checks_api'
249
261
  require 'phrase/api/comment_reactions_api'
250
262
  require 'phrase/api/comment_replies_api'
251
263
  require 'phrase/api/comments_api'
@@ -265,17 +277,20 @@ require 'phrase/api/job_locales_api'
265
277
  require 'phrase/api/job_template_locales_api'
266
278
  require 'phrase/api/job_templates_api'
267
279
  require 'phrase/api/jobs_api'
280
+ require 'phrase/api/key_format_annotations_api'
268
281
  require 'phrase/api/keys_api'
269
282
  require 'phrase/api/keys_figma_attachments_api'
270
283
  require 'phrase/api/linked_keys_api'
271
284
  require 'phrase/api/locale_downloads_api'
272
285
  require 'phrase/api/locales_api'
286
+ require 'phrase/api/machine_translation_api'
273
287
  require 'phrase/api/members_api'
274
288
  require 'phrase/api/notification_groups_api'
275
289
  require 'phrase/api/notifications_api'
276
290
  require 'phrase/api/orders_api'
277
291
  require 'phrase/api/organization_job_template_locales_api'
278
292
  require 'phrase/api/organization_job_templates_api'
293
+ require 'phrase/api/pre_translations_api'
279
294
  require 'phrase/api/projects_api'
280
295
  require 'phrase/api/quality_performance_score_api'
281
296
  require 'phrase/api/release_triggers_api'
data/phrase.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_runtime_dependency 'typhoeus', '>= 1.0.1'
24
24
  s.add_runtime_dependency 'json', '>= 2.1.0'
25
- s.add_runtime_dependency 'link-header-parser'
25
+ s.add_runtime_dependency 'link-header-parser', '>= 7.0'
26
26
 
27
27
  s.add_development_dependency 'rspec', '>= 3.6.0'
28
28
 
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::AutomationEventsApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'AutomationEventsApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::AutomationEventsApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of AutomationEventsApi' do
18
+ it 'should create an instance of AutomationEventsApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::AutomationEventsApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for account_automation_events_list
24
+ # List automation events for an account
25
+ # Returns the run history across all automations in the account, newest-first. Use `automation_id` to narrow results to a single automation. Use `project_id` or `project_ids` to narrow by project. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
26
+ # @param account_id Account ID
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @option opts [Integer] :page Page number
30
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
31
+ # @option opts [String] :automation_id Filter events to a single automation by its ID.
32
+ # @option opts [String] :state Filter events by outcome state. Unrecognized values are ignored.
33
+ # @option opts [String] :triggered_by Filter events by what triggered the automation run. Unrecognized values are ignored.
34
+ # @option opts [String] :project_id Filter events by project ID. Accepts a single ID or a comma-separated list of IDs.
35
+ # @option opts [Array<String>] :project_ids Filter events by one or more project IDs.
36
+ # @option opts [String] :created_after Return only events created after this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
37
+ # @option opts [String] :created_before Return only events created before this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
38
+ # @return [Array<AutomationEvent>]
39
+ describe 'account_automation_events_list test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ end
43
+ end
44
+
45
+ # unit tests for automation_events_list
46
+ # List events for an automation
47
+ # Returns the run history for a specific automation, newest-first. For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).
48
+ # @param account_id Account ID
49
+ # @param id ID
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
52
+ # @option opts [Integer] :page Page number
53
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
54
+ # @option opts [String] :state Filter events by outcome state. Unrecognized values are ignored.
55
+ # @option opts [String] :triggered_by Filter events by what triggered the automation run. Unrecognized values are ignored.
56
+ # @option opts [String] :project_id Filter events by project ID. Accepts a single ID or a comma-separated list of IDs.
57
+ # @option opts [Array<String>] :project_ids Filter events by one or more project IDs.
58
+ # @option opts [String] :created_after Return only events created after this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
59
+ # @option opts [String] :created_before Return only events created before this ISO 8601 timestamp. Returns 400 if the value is not a valid date-time.
60
+ # @return [Array<AutomationEvent>]
61
+ describe 'automation_events_list test' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ end
@@ -0,0 +1,56 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::ChecksApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'ChecksApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::ChecksApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of ChecksApi' do
18
+ it 'should create an instance of ChecksApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::ChecksApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for check_issue_dismiss
24
+ # Dismiss a check issue
25
+ # **Note:** The Checks API is still in development and might change in subsequent releases. Mark a check issue as dismissed so it no longer appears on the list of active check issues.
26
+ # @param project_id Project ID
27
+ # @param id Check Issue ID
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [CheckIssue]
31
+ describe 'check_issue_dismiss test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for check_issues_list
38
+ # List check issues
39
+ # **Note:** The Checks API is still in development and might change in subsequent releases. List check issues for the given project. Results can be filtered by locale, check name, and state.
40
+ # @param project_id Project ID
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
+ # @option opts [Integer] :page Page number
44
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
45
+ # @option opts [String] :state Filter by state of the check issue. Can be one of: &#x60;active&#x60;, &#x60;solved&#x60;, &#x60;dismissed&#x60;, &#x60;all&#x60;. Defaults to &#x60;active&#x60;.
46
+ # @option opts [Array<String>] :locale_ids Filter by one or more locale IDs.
47
+ # @option opts [Array<String>] :check_names Filter by one or more check names. Valid values are: - &#x60;translation_content_length&#x60; — the translation exceeds the maximum character limit configured for the key. - &#x60;translation_placeholder_usage&#x60; — the translation is missing placeholders present in the source, or contains unexpected ones. - &#x60;translation_glossary_usage&#x60; — the translation does not follow the glossary term translations.
48
+ # @option opts [String] :created_since Return only check issues created on or after this ISO 8601 datetime. Returns 400 if the value is not a valid date-time.
49
+ # @return [Array<CheckIssue>]
50
+ describe 'check_issues_list test' do
51
+ it 'should work' do
52
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
53
+ end
54
+ end
55
+
56
+ end
@@ -22,7 +22,7 @@ describe 'DocumentsApi' do
22
22
 
23
23
  # unit tests for document_delete
24
24
  # Delete document
25
- # Delete an existing document.
25
+ # Permanently deletes a document and all of its associated translation segments from the project. Use this when you want to remove a document that is no longer needed; the deletion cannot be reversed and all associated segments will be lost.
26
26
  # @param project_id Project ID
27
27
  # @param id ID
28
28
  # @param [Hash] opts the optional parameters
@@ -36,13 +36,13 @@ describe 'DocumentsApi' do
36
36
 
37
37
  # unit tests for documents_list
38
38
  # List documents
39
- # List all documents the current user has access to.
39
+ # Returns all documents in a project that the authenticated user has read access to. A Document is a source file — an HTML or DOCX file — that has been uploaded to Phrase Strings and whose content is segmented into translation keys for localization. Use this endpoint to enumerate documents before downloading, previewing, or triggering translation workflows for individual files. The q parameter performs a prefix match on the document name (case-insensitive). For example, passing q&#x3D;invoice returns documents whose names begin with \&quot;invoice\&quot; but not documents containing \&quot;invoice\&quot; elsewhere in the name.
40
40
  # @param project_id Project ID
41
41
  # @param [Hash] opts the optional parameters
42
42
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
43
  # @option opts [Integer] :page Page number
44
44
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
45
- # @option opts [String] :q Search query. Filters documents by name (case-insensitive substring match).
45
+ # @option opts [String] :q Filter documents by name prefix. Returns documents whose name starts with the given value (case-insensitive).
46
46
  # @return [Array<Document>]
47
47
  describe 'documents_list test' do
48
48
  it 'should work' do
@@ -22,7 +22,7 @@ describe 'ICUApi' do
22
22
 
23
23
  # unit tests for icu_skeleton
24
24
  # Build ICU skeletons
25
- # Returns ICU skeletons for multiple locale codes based on a source content.
25
+ # Generates ICU (International Components for Unicode) message format skeletons for a given source string across one or more locales. An ICU skeleton strips the literal text from a pluralized or select message while preserving its structural rules — argument names, plural categories, select cases, and ordinal forms — adjusted to the pluralization rules of each requested locale. Use this endpoint to normalize translation templates before importing them into locale files, or to validate that a source string carries the plural forms required by a target language. Either &#x60;content&#x60; or &#x60;id&#x60; must be provided — supplying both or neither returns 400. When &#x60;id&#x60; is used and the referenced translation does not exist, the endpoint returns 404. When the source string is not valid ICU message format syntax, the endpoint returns 422 with an &#x60;error&#x60; field describing the parse failure.
26
26
  # @param icu_skeleton_parameters
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::KeyFormatAnnotationsApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'KeyFormatAnnotationsApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::KeyFormatAnnotationsApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of KeyFormatAnnotationsApi' do
18
+ it 'should create an instance of KeyFormatAnnotationsApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::KeyFormatAnnotationsApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for key_format_annotations_list
24
+ # List format annotations for a key
25
+ # 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.
26
+ # @param project_id Project ID
27
+ # @param id ID
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @option opts [String] :branch Branch to use
31
+ # @return [Array<KeyFormatAnnotationsList200ResponseInner>]
32
+ describe 'key_format_annotations_list test' do
33
+ it 'should work' do
34
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
35
+ end
36
+ end
37
+
38
+ end
@@ -22,13 +22,13 @@ describe 'LinkedKeysApi' do
22
22
 
23
23
  # unit tests for key_links_batch_destroy
24
24
  # Batch unlink child keys from a parent key
25
- # Unlinks multiple child keys from a given parent key in a single operation.
25
+ # Removes one or more child keys from a parent key&#39;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&#39;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 &#x60;child_key_ids&#x60; is not currently linked to the parent, or when a translation update fails while unlinking.
26
26
  # @param project_id Project ID
27
27
  # @param id Parent Translation Key ID
28
- # @param key_links_batch_destroy_parameters
29
28
  # @param [Hash] opts the optional parameters
30
29
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
- # @return [nil]
30
+ # @option opts [KeyLinksBatchDestroyParameters] :key_links_batch_destroy_parameters
31
+ # @return [KeyLink]
32
32
  describe 'key_links_batch_destroy test' do
33
33
  it 'should work' do
34
34
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -37,7 +37,7 @@ describe 'LinkedKeysApi' do
37
37
 
38
38
  # unit tests for key_links_create
39
39
  # Link child keys to a parent key
40
- # Creates links between a given parent key and one or more child keys.
40
+ # 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.
41
41
  # @param project_id Project ID
42
42
  # @param id Parent Translation Key ID
43
43
  # @param key_links_create_parameters
@@ -52,10 +52,10 @@ describe 'LinkedKeysApi' do
52
52
 
53
53
  # unit tests for key_links_destroy
54
54
  # Unlink a child key from a parent key
55
- # Unlinks a single child key from a given parent key.
55
+ # Removes a single child key from a parent key&#39;s link group. A link group is the relationship model that keeps child keys synchronized with a parent: while linked, a child key&#39;s translations are derived from the parent&#39;s content. When you call this endpoint, the child key leaves the group and becomes independent — its existing translations are updated with the parent&#39;s current content and then marked unverified, signalling that reviewers should confirm the content is still appropriate for the child&#39;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.
56
56
  # @param project_id Project ID
57
57
  # @param id Parent Translation Key ID
58
- # @param child_key_id The ID of the child key to unlink.
58
+ # @param child_key_id The ID of the child translation key to unlink from the parent.
59
59
  # @param [Hash] opts the optional parameters
60
60
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
61
61
  # @return [nil]
@@ -67,7 +67,7 @@ describe 'LinkedKeysApi' do
67
67
 
68
68
  # unit tests for key_links_index
69
69
  # List child keys of a parent key
70
- # Returns detailed information about a parent key, including its linked child keys.
70
+ # 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 &#x60;id&#x60; 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.
71
71
  # @param project_id Project ID
72
72
  # @param id Parent Translation Key ID
73
73
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::MachineTranslationApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'MachineTranslationApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::MachineTranslationApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of MachineTranslationApi' do
18
+ it 'should create an instance of MachineTranslationApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::MachineTranslationApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for machine_translation_locale_provider_mappings_create
24
+ # Create a locale provider mapping
25
+ # Creates a locale-pair-specific machine translation provider override for the account. When a mapping exists for a given source/target locale pair, that provider is used instead of the account default. Only one mapping may exist per source/target locale pair; attempting to create a duplicate returns a validation error. The source and target locale codes must differ.
26
+ # @param account_id Account ID
27
+ # @param machine_translation_locale_provider_mappings_create_parameters
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [MachineTranslationLocaleProviderMapping]
31
+ describe 'machine_translation_locale_provider_mappings_create test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for machine_translation_locale_provider_mappings_destroy
38
+ # Delete a locale provider mapping
39
+ # Removes the machine translation provider override for the specified source and target locale pair. The mapping is identified by locale codes supplied as query parameters rather than a path ID.
40
+ # @param account_id Account ID
41
+ # @param source_locale_code The locale code of the source language of the mapping to delete.
42
+ # @param target_locale_code The locale code of the target language of the mapping to delete.
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 'machine_translation_locale_provider_mappings_destroy 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
+
52
+ # unit tests for machine_translation_settings_show
53
+ # Get machine translation settings
54
+ # Returns the machine translation configuration for the account, including the default translation service, current machine translation unit usage, and any locale-pair-specific provider mappings.
55
+ # @param account_id Account ID
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
58
+ # @return [MachineTranslationSettings]
59
+ describe 'machine_translation_settings_show test' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ # unit tests for machine_translation_settings_update
66
+ # Update machine translation settings
67
+ # Sets the default machine translation service for the account. Requires write access to the account&#39;s machine translation settings. Passing an empty or absent value for &#x60;default_service&#x60; resets the account to its plan default (Microsoft Translate).
68
+ # @param account_id Account ID
69
+ # @param machine_translation_settings_update_parameters
70
+ # @param [Hash] opts the optional parameters
71
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
72
+ # @return [MachineTranslationSettings]
73
+ describe 'machine_translation_settings_update test' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ end
@@ -0,0 +1,70 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::PreTranslationsApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'PreTranslationsApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::PreTranslationsApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of PreTranslationsApi' do
18
+ it 'should create an instance of PreTranslationsApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::PreTranslationsApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for pre_translation_create
24
+ # Create a pre-translation job
25
+ # Triggers a pre-translation job for a resource within a project, addressed by &#x60;translatable_type&#x60; (&#x60;locale&#x60;, &#x60;job&#x60;, &#x60;translation_key&#x60;, or &#x60;upload&#x60;) and &#x60;translatable_id&#x60; (its ID). Enqueues machine translation using the project&#39;s configured MT engine.
26
+ # @param project_id Project ID
27
+ # @param pre_translation_create_parameters
28
+ # @param [Hash] opts the optional parameters
29
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
30
+ # @return [PreTranslation]
31
+ describe 'pre_translation_create test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for pre_translation_show
38
+ # Get a single pre-translation job
39
+ # Returns a single pre-translation job identified by its ID.
40
+ # @param project_id Project ID
41
+ # @param id ID
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
44
+ # @option opts [String] :if_modified_since Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
45
+ # @option opts [String] :if_none_match ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
46
+ # @return [PreTranslation]
47
+ describe 'pre_translation_show test' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ # unit tests for pre_translations_list
54
+ # List pre-translation jobs
55
+ # Returns all pre-translation jobs scoped to a project, ordered by creation date descending.
56
+ # @param project_id Project ID
57
+ # @param [Hash] opts the optional parameters
58
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
59
+ # @option opts [String] :if_modified_since Last modified condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
60
+ # @option opts [String] :if_none_match ETag condition, see [Conditional GET requests / HTTP Caching](/en/api/strings/pagination#conditional-get-requests-%2F-http-caching) (optional)
61
+ # @option opts [Integer] :page Page number
62
+ # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
63
+ # @return [Array<PreTranslation>]
64
+ describe 'pre_translations_list test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ end
@@ -39,7 +39,7 @@ describe 'ScreenshotsApi' do
39
39
 
40
40
  # unit tests for screenshot_delete
41
41
  # Delete a screenshot
42
- # Delete an existing screenshot.
42
+ # Permanently removes a screenshot and all its associated markers from the project. Use this when you need to fully remove a screenshot that is no longer relevant — for example, after a UI redesign renders the captured screen obsolete. This is a hard delete: the screenshot record and every key-to-region marker linked to it are destroyed together and cannot be recovered.
43
43
  # @param project_id Project ID
44
44
  # @param id ID
45
45
  # @param [Hash] opts the optional parameters
@@ -54,7 +54,7 @@ describe 'ScreenshotsApi' do
54
54
 
55
55
  # unit tests for screenshot_show
56
56
  # Get a single screenshot
57
- # Get details on a single screenshot for a given project.
57
+ # Returns a single screenshot belonging to the specified project. Use this to retrieve the screenshot&#39;s name, description, hosted image URL, and marker count after uploading, or before creating, updating, or inspecting its markers. The response is a synchronous, idempotent read — repeated calls return the same record without side effects. The Attachable Screenshots feature must be enabled on the account.
58
58
  # @param project_id Project ID
59
59
  # @param id ID
60
60
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::AutomationEventProject
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'AutomationEventProject' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::AutomationEventProject.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of AutomationEventProject' do
19
+ it 'should create an instance of AutomationEventProject' do
20
+ expect(@instance).to be_instance_of(Phrase::AutomationEventProject)
21
+ end
22
+ end
23
+ describe 'test attribute "id"' 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
+ describe 'test attribute "name"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ end
@@ -0,0 +1,85 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::AutomationEvent
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'AutomationEvent' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::AutomationEvent.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of AutomationEvent' do
19
+ it 'should create an instance of AutomationEvent' do
20
+ expect(@instance).to be_instance_of(Phrase::AutomationEvent)
21
+ end
22
+ end
23
+ describe 'test attribute "id"' 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
+ describe 'test attribute "automation_id"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ end
33
+ end
34
+
35
+ describe 'test attribute "state"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["success", "failure", "in_progress"])
39
+ # validator.allowable_values.each do |value|
40
+ # expect { @instance.state = value }.not_to raise_error
41
+ # end
42
+ end
43
+ end
44
+
45
+ describe 'test attribute "triggered_by"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["manual", "schedule", "upload", "upload_batch"])
49
+ # validator.allowable_values.each do |value|
50
+ # expect { @instance.triggered_by = value }.not_to raise_error
51
+ # end
52
+ end
53
+ end
54
+
55
+ describe 'test attribute "created_at"' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ describe 'test attribute "jobs_created"' do
62
+ it 'should work' do
63
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
64
+ end
65
+ end
66
+
67
+ describe 'test attribute "job_ids"' do
68
+ it 'should work' do
69
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ end
71
+ end
72
+
73
+ describe 'test attribute "project"' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
76
+ end
77
+ end
78
+
79
+ describe 'test attribute "details"' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ end
83
+ end
84
+
85
+ end