phrase 4.30.0 → 4.31.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +3 -3
- data/docs/Automation.md +2 -0
- data/docs/AutomationsCreateParameters.md +3 -1
- data/docs/AutomationsCreateParameters1.md +3 -1
- data/docs/JobCreateParameters.md +2 -0
- data/docs/JobUpdateParameters.md +3 -3
- data/docs/JobsApi.md +3 -1
- data/docs/WebhookDeliveriesApi.md +3 -1
- data/lib/phrase/api/jobs_api.rb +3 -0
- data/lib/phrase/api/webhook_deliveries_api.rb +7 -0
- data/lib/phrase/models/automation.rb +11 -1
- data/lib/phrase/models/automations_create_parameters.rb +14 -4
- data/lib/phrase/models/automations_create_parameters1.rb +14 -4
- data/lib/phrase/models/job_create_parameters.rb +11 -1
- data/lib/phrase/models/job_update_parameters.rb +11 -11
- data/lib/phrase/version.rb +1 -1
- data/spec/api/jobs_api_spec.rb +1 -0
- data/spec/api/webhook_deliveries_api_spec.rb +1 -0
- data/spec/models/automation_spec.rb +6 -0
- data/spec/models/automations_create_parameters1_spec.rb +6 -0
- data/spec/models/automations_create_parameters_spec.rb +6 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/job_update_parameters_spec.rb +4 -4
- metadata +267 -267
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3e6724c6ff679a6b5bf758aebb13329971c1314a748d5a3dd35c3a05bedd2671
|
|
4
|
+
data.tar.gz: a8b4984f2e8d8f0267fa38d5f2dfe2e272731e95d358989acd02b0ad7e1e975c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91ee6eed37dd400687a455c17d1adb210d78b5c2cb0fcaa45989d27761027c3af386a9775dfd4ae1985bc2707574cee70937c86252751e483e4dada3b6dd131b
|
|
7
|
+
data.tar.gz: 05aac28e2cfd862b514ba702130ccb2b83b20e2c3aa0496690cd27f80149f0ef43946debbacbd66819e5f257784291b6512e21a60d59205d926af899c0fe091d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.31.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.30.1...ruby-v4.31.0) (2026-10-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **API:** add include_branches field to automations request and response #STRINGS-3748 ([#1329](https://github.com/phrase/strings-openapi/issues/1329)) ([0219fce](https://github.com/phrase/strings-openapi/commit/0219fce491ceaa02a78ffddb72349ea27cd56d47))
|
|
9
|
+
* **API:** add status filter to webhook deliveries list ([#1317](https://github.com/phrase/strings-openapi/issues/1317)) ([3890f8c](https://github.com/phrase/strings-openapi/commit/3890f8cef2fc7195b0920ccfc2b323c72b56d5ca))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **API:** add review_due_date to job create and update requests #STRINGS-3938 ([#1333](https://github.com/phrase/strings-openapi/issues/1333)) ([312388b](https://github.com/phrase/strings-openapi/commit/312388b1f53e463455022cc1601f01d1a2aa65e7))
|
|
15
|
+
|
|
16
|
+
## [4.30.1](https://github.com/phrase/strings-openapi/compare/ruby-v4.30.0...ruby-v4.30.1) (2026-10-05)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **API:** move job update branch param from body to query #STRINGS-3488 ([#1306](https://github.com/phrase/strings-openapi/issues/1306)) ([a8f2673](https://github.com/phrase/strings-openapi/commit/a8f267314ff1b1a3e3848df1b15cc5647ba434cb))
|
|
22
|
+
|
|
3
23
|
## [4.30.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.29.0...ruby-v4.30.0) (2026-10-05)
|
|
4
24
|
|
|
5
25
|
|
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.
|
|
10
|
+
- Package version: 4.31.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.
|
|
59
|
+
gem install ./phrase-4.31.0.gem
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
(for development, run `gem install --dev ./phrase-4.
|
|
62
|
+
(for development, run `gem install --dev ./phrase-4.31.0.gem` to install the development dependencies)
|
|
63
63
|
|
|
64
64
|
## Getting Started
|
|
65
65
|
|
data/docs/Automation.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**job_template_id** | **String** | | [optional]
|
|
15
15
|
**job_owner_id** | **String** | User ID of the job owner that newly created jobs are assigned to. | [optional]
|
|
16
16
|
**include_only_updated_locales** | **Boolean** | When `true`, the automation only acts on locales that changed since its last run. | [optional]
|
|
17
|
+
**include_branches** | **Boolean** | When true, the automation targets branches of the configured projects in addition to the main project. Requires the designated job owner to have permission to create jobs in branches for every configured project. | [optional]
|
|
17
18
|
**tags** | **Array<String>** | | [optional]
|
|
18
19
|
**cron_schedule** | **String** | | [optional]
|
|
19
20
|
**time_zone** | **String** | | [optional]
|
|
@@ -36,6 +37,7 @@ instance = Phrase::Automation.new(id: nil,
|
|
|
36
37
|
job_template_id: nil,
|
|
37
38
|
job_owner_id: nil,
|
|
38
39
|
include_only_updated_locales: nil,
|
|
40
|
+
include_branches: nil,
|
|
39
41
|
tags: nil,
|
|
40
42
|
cron_schedule: nil,
|
|
41
43
|
time_zone: nil,
|
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**time_zone** | **String** | along with cron_schedule, specifies when the scheduled automation is supposed to run | [optional]
|
|
15
15
|
**job_owner_id** | **String** | User ID of the job owner that newly created jobs are assigned to. | [optional]
|
|
16
16
|
**include_only_updated_locales** | **Boolean** | When `true`, the automation only acts on locales that changed since its last run. Defaults to `false`. | [optional]
|
|
17
|
+
**include_branches** | **Boolean** | When true, the automation also runs against branches of the configured projects. The designated job owner must have permission to create jobs in branches for every configured project; otherwise the request is rejected with 403. | [optional]
|
|
17
18
|
|
|
18
19
|
## Code Sample
|
|
19
20
|
|
|
@@ -29,7 +30,8 @@ instance = Phrase::AutomationsCreateParameters.new(name: 'Scheduled Job Automati
|
|
|
29
30
|
cron_schedule: '00 13 * * 1,2',
|
|
30
31
|
time_zone: 'GMT',
|
|
31
32
|
job_owner_id: 'abcd1234abcd1234abcd1234abcd1234',
|
|
32
|
-
include_only_updated_locales: false
|
|
33
|
+
include_only_updated_locales: false,
|
|
34
|
+
include_branches: nil)
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
|
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**time_zone** | **String** | along with cron_schedule, specifies when the scheduled automation is supposed to run | [optional]
|
|
15
15
|
**job_owner_id** | **String** | User ID of the job owner that newly created jobs are assigned to. | [optional]
|
|
16
16
|
**include_only_updated_locales** | **Boolean** | When `true`, the automation only acts on locales that changed since its last run. | [optional]
|
|
17
|
+
**include_branches** | **Boolean** | When true, the automation also runs against branches of the configured projects. The designated job owner must have permission to create jobs in branches for every configured project; otherwise the request is rejected with 403. | [optional]
|
|
17
18
|
|
|
18
19
|
## Code Sample
|
|
19
20
|
|
|
@@ -29,7 +30,8 @@ instance = Phrase::AutomationsCreateParameters1.new(name: 'Scheduled Job Automat
|
|
|
29
30
|
cron_schedule: '00 13 * * 1,2',
|
|
30
31
|
time_zone: 'GMT',
|
|
31
32
|
job_owner_id: 'abcd1234abcd1234abcd1234abcd1234',
|
|
32
|
-
include_only_updated_locales: false
|
|
33
|
+
include_only_updated_locales: false,
|
|
34
|
+
include_branches: nil)
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
|
data/docs/JobCreateParameters.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**source_locale_id** | **String** | The API id of the source language | [optional]
|
|
10
10
|
**briefing** | **String** | Briefing for the translators | [optional]
|
|
11
11
|
**due_date** | **Time** | Date the job should be finished | [optional]
|
|
12
|
+
**review_due_date** | **Time** | Date the review of the job should be finished. Must not be before `due_date`. | [optional]
|
|
12
13
|
**ticket_url** | **String** | URL to a ticket for this job (e.g. Jira, Trello) | [optional]
|
|
13
14
|
**tags** | **Array<String>** | tags of keys that should be included within the job. *Note: a tag matches every key currently carrying that tag, not just the ones you just tagged. For example, if hundreds of pre-existing keys already share the tag `myUploadTag`, adding it here pulls in every one of them, not only the key you just tagged. Use `translation_key_ids` to scope the job to specific keys instead.* | [optional]
|
|
14
15
|
**translation_key_ids** | **Array<String>** | ids of keys that should be included within the job | [optional]
|
|
@@ -26,6 +27,7 @@ instance = Phrase::JobCreateParameters.new(branch: 'my-feature-branch',
|
|
|
26
27
|
source_locale_id: 'abcd1234cdef1234abcd1234cdef1234',
|
|
27
28
|
briefing: 'de-DE',
|
|
28
29
|
due_date: nil,
|
|
30
|
+
review_due_date: nil,
|
|
29
31
|
ticket_url: 'https://example.atlassian.net/browse/FOO',
|
|
30
32
|
tags: ["myUploadTag"],
|
|
31
33
|
translation_key_ids: ["abcd1234cdef1234abcd1234cdef1234"],
|
data/docs/JobUpdateParameters.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
|
-
**branch** | **String** | specify the branch to use | [optional]
|
|
8
7
|
**name** | **String** | Job name | [optional]
|
|
9
8
|
**briefing** | **String** | Briefing for the translators | [optional]
|
|
10
9
|
**due_date** | **Time** | Date the job should be finished | [optional]
|
|
10
|
+
**review_due_date** | **Time** | Date the review of the job should be finished. Must not be before `due_date`. | [optional]
|
|
11
11
|
**ticket_url** | **String** | URL to a ticket for this job (e.g. Jira, Trello) | [optional]
|
|
12
12
|
**target_locale_ids** | **Array<String>** | List of target locales for the job. | [optional]
|
|
13
13
|
**autotranslate** | **Boolean** | Automatically translate the job using machine translation | [optional]
|
|
@@ -17,10 +17,10 @@ Name | Type | Description | Notes
|
|
|
17
17
|
```ruby
|
|
18
18
|
require 'phrase'
|
|
19
19
|
|
|
20
|
-
instance = Phrase::JobUpdateParameters.new(
|
|
21
|
-
name: 'de',
|
|
20
|
+
instance = Phrase::JobUpdateParameters.new(name: 'de',
|
|
22
21
|
briefing: 'de-DE',
|
|
23
22
|
due_date: nil,
|
|
23
|
+
review_due_date: nil,
|
|
24
24
|
ticket_url: 'https://example.atlassian.net/browse/FOO',
|
|
25
25
|
target_locale_ids: ["abcd1234cdef1234abcd1234cdef1234"],
|
|
26
26
|
autotranslate: true)
|
data/docs/JobsApi.md
CHANGED
|
@@ -699,7 +699,8 @@ project_id = 'project_id_example' # String | Project ID
|
|
|
699
699
|
id = 'id_example' # String | ID
|
|
700
700
|
job_update_parameters = Phrase::JobUpdateParameters.new # JobUpdateParameters |
|
|
701
701
|
opts = {
|
|
702
|
-
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
702
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
703
|
+
branch: 'my-feature-branch' # String | Branch to use
|
|
703
704
|
}
|
|
704
705
|
|
|
705
706
|
begin
|
|
@@ -720,6 +721,7 @@ Name | Type | Description | Notes
|
|
|
720
721
|
**id** | **String**| ID |
|
|
721
722
|
**job_update_parameters** | [**JobUpdateParameters**](JobUpdateParameters.md)| |
|
|
722
723
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
724
|
+
**branch** | **String**| Branch to use | [optional]
|
|
723
725
|
|
|
724
726
|
### Return type
|
|
725
727
|
|
|
@@ -39,7 +39,8 @@ project_id = 'project_id_example' # String | Project ID
|
|
|
39
39
|
webhook_id = 'webhook_id_example' # String | Webhook ID
|
|
40
40
|
opts = {
|
|
41
41
|
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
|
42
|
-
response_status_codes: 'response_status_codes_example' # String | List of Response Status Codes
|
|
42
|
+
response_status_codes: 'response_status_codes_example', # String | List of Response Status Codes
|
|
43
|
+
status: 'success' # String | Filter deliveries by outcome. `success` returns deliveries with a 2xx response code or a soft error. `failed` returns all other deliveries, including exceptions and timeouts without a response code.
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
begin
|
|
@@ -60,6 +61,7 @@ Name | Type | Description | Notes
|
|
|
60
61
|
**webhook_id** | **String**| Webhook ID |
|
|
61
62
|
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
62
63
|
**response_status_codes** | **String**| List of Response Status Codes | [optional]
|
|
64
|
+
**status** | **String**| Filter deliveries by outcome. `success` returns deliveries with a 2xx response code or a soft error. `failed` returns all other deliveries, including exceptions and timeouts without a response code. | [optional]
|
|
63
65
|
|
|
64
66
|
### Return type
|
|
65
67
|
|
data/lib/phrase/api/jobs_api.rb
CHANGED
|
@@ -792,6 +792,7 @@ module Phrase
|
|
|
792
792
|
# @param job_update_parameters [JobUpdateParameters]
|
|
793
793
|
# @param [Hash] opts the optional parameters
|
|
794
794
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
795
|
+
# @option opts [String] :branch Branch to use
|
|
795
796
|
# @return [JobDetails]
|
|
796
797
|
def job_update(project_id, id, job_update_parameters, opts = {})
|
|
797
798
|
data, _status_code, _headers = job_update_with_http_info(project_id, id, job_update_parameters, opts)
|
|
@@ -805,6 +806,7 @@ module Phrase
|
|
|
805
806
|
# @param job_update_parameters [JobUpdateParameters]
|
|
806
807
|
# @param [Hash] opts the optional parameters
|
|
807
808
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
809
|
+
# @option opts [String] :branch Branch to use
|
|
808
810
|
# @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
|
|
809
811
|
def job_update_with_http_info(project_id, id, job_update_parameters, opts = {})
|
|
810
812
|
if @api_client.config.debugging
|
|
@@ -827,6 +829,7 @@ module Phrase
|
|
|
827
829
|
|
|
828
830
|
# query parameters
|
|
829
831
|
query_params = opts[:query_params] || {}
|
|
832
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
|
830
833
|
|
|
831
834
|
# header parameters
|
|
832
835
|
header_params = opts[:header_params] || {}
|
|
@@ -14,6 +14,7 @@ module Phrase
|
|
|
14
14
|
# @param [Hash] opts the optional parameters
|
|
15
15
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
16
16
|
# @option opts [String] :response_status_codes List of Response Status Codes
|
|
17
|
+
# @option opts [String] :status Filter deliveries by outcome. `success` returns deliveries with a 2xx response code or a soft error. `failed` returns all other deliveries, including exceptions and timeouts without a response code.
|
|
17
18
|
# @return [Array<WebhookDelivery>]
|
|
18
19
|
def webhook_deliveries_list(project_id, webhook_id, opts = {})
|
|
19
20
|
data, _status_code, _headers = webhook_deliveries_list_with_http_info(project_id, webhook_id, opts)
|
|
@@ -27,6 +28,7 @@ module Phrase
|
|
|
27
28
|
# @param [Hash] opts the optional parameters
|
|
28
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
29
30
|
# @option opts [String] :response_status_codes List of Response Status Codes
|
|
31
|
+
# @option opts [String] :status Filter deliveries by outcome. `success` returns deliveries with a 2xx response code or a soft error. `failed` returns all other deliveries, including exceptions and timeouts without a response code.
|
|
30
32
|
# @return [Array<(Response<(Array<WebhookDelivery>)>, Integer, Hash)>] Response<(Array<WebhookDelivery>)> data, response status code and response headers
|
|
31
33
|
def webhook_deliveries_list_with_http_info(project_id, webhook_id, opts = {})
|
|
32
34
|
if @api_client.config.debugging
|
|
@@ -40,12 +42,17 @@ module Phrase
|
|
|
40
42
|
if @api_client.config.client_side_validation && webhook_id.nil?
|
|
41
43
|
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookDeliveriesApi.webhook_deliveries_list"
|
|
42
44
|
end
|
|
45
|
+
allowable_values = ["success", "failed"]
|
|
46
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
47
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
48
|
+
end
|
|
43
49
|
# resource path
|
|
44
50
|
local_var_path = '/projects/{project_id}/webhooks/{webhook_id}/deliveries'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'webhook_id' + '}', CGI.escape(webhook_id.to_s))
|
|
45
51
|
|
|
46
52
|
# query parameters
|
|
47
53
|
query_params = opts[:query_params] || {}
|
|
48
54
|
query_params[:'response_status_codes'] = opts[:'response_status_codes'] if !opts[:'response_status_codes'].nil?
|
|
55
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
49
56
|
|
|
50
57
|
# header parameters
|
|
51
58
|
header_params = opts[:header_params] || {}
|
|
@@ -26,6 +26,9 @@ module Phrase
|
|
|
26
26
|
# When `true`, the automation only acts on locales that changed since its last run.
|
|
27
27
|
attr_accessor :include_only_updated_locales
|
|
28
28
|
|
|
29
|
+
# When true, the automation targets branches of the configured projects in addition to the main project. Requires the designated job owner to have permission to create jobs in branches for every configured project.
|
|
30
|
+
attr_accessor :include_branches
|
|
31
|
+
|
|
29
32
|
attr_accessor :tags
|
|
30
33
|
|
|
31
34
|
attr_accessor :cron_schedule
|
|
@@ -73,6 +76,7 @@ module Phrase
|
|
|
73
76
|
:'job_template_id' => :'job_template_id',
|
|
74
77
|
:'job_owner_id' => :'job_owner_id',
|
|
75
78
|
:'include_only_updated_locales' => :'include_only_updated_locales',
|
|
79
|
+
:'include_branches' => :'include_branches',
|
|
76
80
|
:'tags' => :'tags',
|
|
77
81
|
:'cron_schedule' => :'cron_schedule',
|
|
78
82
|
:'time_zone' => :'time_zone',
|
|
@@ -95,6 +99,7 @@ module Phrase
|
|
|
95
99
|
:'job_template_id' => :'String',
|
|
96
100
|
:'job_owner_id' => :'String',
|
|
97
101
|
:'include_only_updated_locales' => :'Boolean',
|
|
102
|
+
:'include_branches' => :'Boolean',
|
|
98
103
|
:'tags' => :'Array<String>',
|
|
99
104
|
:'cron_schedule' => :'String',
|
|
100
105
|
:'time_zone' => :'String',
|
|
@@ -170,6 +175,10 @@ module Phrase
|
|
|
170
175
|
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
171
176
|
end
|
|
172
177
|
|
|
178
|
+
if attributes.key?(:'include_branches')
|
|
179
|
+
self.include_branches = attributes[:'include_branches']
|
|
180
|
+
end
|
|
181
|
+
|
|
173
182
|
if attributes.key?(:'tags')
|
|
174
183
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
175
184
|
self.tags = value
|
|
@@ -249,6 +258,7 @@ module Phrase
|
|
|
249
258
|
job_template_id == o.job_template_id &&
|
|
250
259
|
job_owner_id == o.job_owner_id &&
|
|
251
260
|
include_only_updated_locales == o.include_only_updated_locales &&
|
|
261
|
+
include_branches == o.include_branches &&
|
|
252
262
|
tags == o.tags &&
|
|
253
263
|
cron_schedule == o.cron_schedule &&
|
|
254
264
|
time_zone == o.time_zone &&
|
|
@@ -266,7 +276,7 @@ module Phrase
|
|
|
266
276
|
# Calculates hash code according to all attributes.
|
|
267
277
|
# @return [Integer] Hash code
|
|
268
278
|
def hash
|
|
269
|
-
[id, name, status, trigger, status_filters, project_id, project_ids, job_template_id, job_owner_id, include_only_updated_locales, tags, cron_schedule, time_zone, account, created_at, updated_at].hash
|
|
279
|
+
[id, name, status, trigger, status_filters, project_id, project_ids, job_template_id, job_owner_id, include_only_updated_locales, include_branches, tags, cron_schedule, time_zone, account, created_at, updated_at].hash
|
|
270
280
|
end
|
|
271
281
|
|
|
272
282
|
# Builds the object from hash
|
|
@@ -31,6 +31,9 @@ module Phrase
|
|
|
31
31
|
# When `true`, the automation only acts on locales that changed since its last run. Defaults to `false`.
|
|
32
32
|
attr_accessor :include_only_updated_locales
|
|
33
33
|
|
|
34
|
+
# When true, the automation also runs against branches of the configured projects. The designated job owner must have permission to create jobs in branches for every configured project; otherwise the request is rejected with 403.
|
|
35
|
+
attr_accessor :include_branches
|
|
36
|
+
|
|
34
37
|
class EnumAttributeValidator
|
|
35
38
|
attr_reader :datatype
|
|
36
39
|
attr_reader :allowable_values
|
|
@@ -65,7 +68,8 @@ module Phrase
|
|
|
65
68
|
:'cron_schedule' => :'cron_schedule',
|
|
66
69
|
:'time_zone' => :'time_zone',
|
|
67
70
|
:'job_owner_id' => :'job_owner_id',
|
|
68
|
-
:'include_only_updated_locales' => :'include_only_updated_locales'
|
|
71
|
+
:'include_only_updated_locales' => :'include_only_updated_locales',
|
|
72
|
+
:'include_branches' => :'include_branches'
|
|
69
73
|
}
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -81,7 +85,8 @@ module Phrase
|
|
|
81
85
|
:'cron_schedule' => :'String',
|
|
82
86
|
:'time_zone' => :'String',
|
|
83
87
|
:'job_owner_id' => :'String',
|
|
84
|
-
:'include_only_updated_locales' => :'Boolean'
|
|
88
|
+
:'include_only_updated_locales' => :'Boolean',
|
|
89
|
+
:'include_branches' => :'Boolean'
|
|
85
90
|
}
|
|
86
91
|
end
|
|
87
92
|
|
|
@@ -151,6 +156,10 @@ module Phrase
|
|
|
151
156
|
if attributes.key?(:'include_only_updated_locales')
|
|
152
157
|
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
153
158
|
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'include_branches')
|
|
161
|
+
self.include_branches = attributes[:'include_branches']
|
|
162
|
+
end
|
|
154
163
|
end
|
|
155
164
|
|
|
156
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -212,7 +221,8 @@ module Phrase
|
|
|
212
221
|
cron_schedule == o.cron_schedule &&
|
|
213
222
|
time_zone == o.time_zone &&
|
|
214
223
|
job_owner_id == o.job_owner_id &&
|
|
215
|
-
include_only_updated_locales == o.include_only_updated_locales
|
|
224
|
+
include_only_updated_locales == o.include_only_updated_locales &&
|
|
225
|
+
include_branches == o.include_branches
|
|
216
226
|
end
|
|
217
227
|
|
|
218
228
|
# @see the `==` method
|
|
@@ -224,7 +234,7 @@ module Phrase
|
|
|
224
234
|
# Calculates hash code according to all attributes.
|
|
225
235
|
# @return [Integer] Hash code
|
|
226
236
|
def hash
|
|
227
|
-
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales].hash
|
|
237
|
+
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales, include_branches].hash
|
|
228
238
|
end
|
|
229
239
|
|
|
230
240
|
# Builds the object from hash
|
|
@@ -31,6 +31,9 @@ module Phrase
|
|
|
31
31
|
# When `true`, the automation only acts on locales that changed since its last run.
|
|
32
32
|
attr_accessor :include_only_updated_locales
|
|
33
33
|
|
|
34
|
+
# When true, the automation also runs against branches of the configured projects. The designated job owner must have permission to create jobs in branches for every configured project; otherwise the request is rejected with 403.
|
|
35
|
+
attr_accessor :include_branches
|
|
36
|
+
|
|
34
37
|
class EnumAttributeValidator
|
|
35
38
|
attr_reader :datatype
|
|
36
39
|
attr_reader :allowable_values
|
|
@@ -65,7 +68,8 @@ module Phrase
|
|
|
65
68
|
:'cron_schedule' => :'cron_schedule',
|
|
66
69
|
:'time_zone' => :'time_zone',
|
|
67
70
|
:'job_owner_id' => :'job_owner_id',
|
|
68
|
-
:'include_only_updated_locales' => :'include_only_updated_locales'
|
|
71
|
+
:'include_only_updated_locales' => :'include_only_updated_locales',
|
|
72
|
+
:'include_branches' => :'include_branches'
|
|
69
73
|
}
|
|
70
74
|
end
|
|
71
75
|
|
|
@@ -81,7 +85,8 @@ module Phrase
|
|
|
81
85
|
:'cron_schedule' => :'String',
|
|
82
86
|
:'time_zone' => :'String',
|
|
83
87
|
:'job_owner_id' => :'String',
|
|
84
|
-
:'include_only_updated_locales' => :'Boolean'
|
|
88
|
+
:'include_only_updated_locales' => :'Boolean',
|
|
89
|
+
:'include_branches' => :'Boolean'
|
|
85
90
|
}
|
|
86
91
|
end
|
|
87
92
|
|
|
@@ -151,6 +156,10 @@ module Phrase
|
|
|
151
156
|
if attributes.key?(:'include_only_updated_locales')
|
|
152
157
|
self.include_only_updated_locales = attributes[:'include_only_updated_locales']
|
|
153
158
|
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'include_branches')
|
|
161
|
+
self.include_branches = attributes[:'include_branches']
|
|
162
|
+
end
|
|
154
163
|
end
|
|
155
164
|
|
|
156
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -212,7 +221,8 @@ module Phrase
|
|
|
212
221
|
cron_schedule == o.cron_schedule &&
|
|
213
222
|
time_zone == o.time_zone &&
|
|
214
223
|
job_owner_id == o.job_owner_id &&
|
|
215
|
-
include_only_updated_locales == o.include_only_updated_locales
|
|
224
|
+
include_only_updated_locales == o.include_only_updated_locales &&
|
|
225
|
+
include_branches == o.include_branches
|
|
216
226
|
end
|
|
217
227
|
|
|
218
228
|
# @see the `==` method
|
|
@@ -224,7 +234,7 @@ module Phrase
|
|
|
224
234
|
# Calculates hash code according to all attributes.
|
|
225
235
|
# @return [Integer] Hash code
|
|
226
236
|
def hash
|
|
227
|
-
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales].hash
|
|
237
|
+
[name, trigger, project_ids, job_template_id, status_filters, tags, cron_schedule, time_zone, job_owner_id, include_only_updated_locales, include_branches].hash
|
|
228
238
|
end
|
|
229
239
|
|
|
230
240
|
# Builds the object from hash
|
|
@@ -17,6 +17,9 @@ module Phrase
|
|
|
17
17
|
# Date the job should be finished
|
|
18
18
|
attr_accessor :due_date
|
|
19
19
|
|
|
20
|
+
# Date the review of the job should be finished. Must not be before `due_date`.
|
|
21
|
+
attr_accessor :review_due_date
|
|
22
|
+
|
|
20
23
|
# URL to a ticket for this job (e.g. Jira, Trello)
|
|
21
24
|
attr_accessor :ticket_url
|
|
22
25
|
|
|
@@ -43,6 +46,7 @@ module Phrase
|
|
|
43
46
|
:'source_locale_id' => :'source_locale_id',
|
|
44
47
|
:'briefing' => :'briefing',
|
|
45
48
|
:'due_date' => :'due_date',
|
|
49
|
+
:'review_due_date' => :'review_due_date',
|
|
46
50
|
:'ticket_url' => :'ticket_url',
|
|
47
51
|
:'tags' => :'tags',
|
|
48
52
|
:'translation_key_ids' => :'translation_key_ids',
|
|
@@ -60,6 +64,7 @@ module Phrase
|
|
|
60
64
|
:'source_locale_id' => :'String',
|
|
61
65
|
:'briefing' => :'String',
|
|
62
66
|
:'due_date' => :'DateTime',
|
|
67
|
+
:'review_due_date' => :'DateTime',
|
|
63
68
|
:'ticket_url' => :'String',
|
|
64
69
|
:'tags' => :'Array<String>',
|
|
65
70
|
:'translation_key_ids' => :'Array<String>',
|
|
@@ -111,6 +116,10 @@ module Phrase
|
|
|
111
116
|
self.due_date = attributes[:'due_date']
|
|
112
117
|
end
|
|
113
118
|
|
|
119
|
+
if attributes.key?(:'review_due_date')
|
|
120
|
+
self.review_due_date = attributes[:'review_due_date']
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
if attributes.key?(:'ticket_url')
|
|
115
124
|
self.ticket_url = attributes[:'ticket_url']
|
|
116
125
|
end
|
|
@@ -170,6 +179,7 @@ module Phrase
|
|
|
170
179
|
source_locale_id == o.source_locale_id &&
|
|
171
180
|
briefing == o.briefing &&
|
|
172
181
|
due_date == o.due_date &&
|
|
182
|
+
review_due_date == o.review_due_date &&
|
|
173
183
|
ticket_url == o.ticket_url &&
|
|
174
184
|
tags == o.tags &&
|
|
175
185
|
translation_key_ids == o.translation_key_ids &&
|
|
@@ -187,7 +197,7 @@ module Phrase
|
|
|
187
197
|
# Calculates hash code according to all attributes.
|
|
188
198
|
# @return [Integer] Hash code
|
|
189
199
|
def hash
|
|
190
|
-
[branch, name, source_locale_id, briefing, due_date, ticket_url, tags, translation_key_ids, target_locale_ids, job_template_id, autotranslate].hash
|
|
200
|
+
[branch, name, source_locale_id, briefing, due_date, review_due_date, ticket_url, tags, translation_key_ids, target_locale_ids, job_template_id, autotranslate].hash
|
|
191
201
|
end
|
|
192
202
|
|
|
193
203
|
# Builds the object from hash
|
|
@@ -2,9 +2,6 @@ require 'date'
|
|
|
2
2
|
|
|
3
3
|
module Phrase
|
|
4
4
|
class JobUpdateParameters
|
|
5
|
-
# specify the branch to use
|
|
6
|
-
attr_accessor :branch
|
|
7
|
-
|
|
8
5
|
# Job name
|
|
9
6
|
attr_accessor :name
|
|
10
7
|
|
|
@@ -14,6 +11,9 @@ module Phrase
|
|
|
14
11
|
# Date the job should be finished
|
|
15
12
|
attr_accessor :due_date
|
|
16
13
|
|
|
14
|
+
# Date the review of the job should be finished. Must not be before `due_date`.
|
|
15
|
+
attr_accessor :review_due_date
|
|
16
|
+
|
|
17
17
|
# URL to a ticket for this job (e.g. Jira, Trello)
|
|
18
18
|
attr_accessor :ticket_url
|
|
19
19
|
|
|
@@ -26,10 +26,10 @@ module Phrase
|
|
|
26
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
27
|
def self.attribute_map
|
|
28
28
|
{
|
|
29
|
-
:'branch' => :'branch',
|
|
30
29
|
:'name' => :'name',
|
|
31
30
|
:'briefing' => :'briefing',
|
|
32
31
|
:'due_date' => :'due_date',
|
|
32
|
+
:'review_due_date' => :'review_due_date',
|
|
33
33
|
:'ticket_url' => :'ticket_url',
|
|
34
34
|
:'target_locale_ids' => :'target_locale_ids',
|
|
35
35
|
:'autotranslate' => :'autotranslate'
|
|
@@ -39,10 +39,10 @@ module Phrase
|
|
|
39
39
|
# Attribute type mapping.
|
|
40
40
|
def self.openapi_types
|
|
41
41
|
{
|
|
42
|
-
:'branch' => :'String',
|
|
43
42
|
:'name' => :'String',
|
|
44
43
|
:'briefing' => :'String',
|
|
45
44
|
:'due_date' => :'DateTime',
|
|
45
|
+
:'review_due_date' => :'DateTime',
|
|
46
46
|
:'ticket_url' => :'String',
|
|
47
47
|
:'target_locale_ids' => :'Array<String>',
|
|
48
48
|
:'autotranslate' => :'Boolean'
|
|
@@ -71,10 +71,6 @@ module Phrase
|
|
|
71
71
|
h[k.to_sym] = v
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
if attributes.key?(:'branch')
|
|
75
|
-
self.branch = attributes[:'branch']
|
|
76
|
-
end
|
|
77
|
-
|
|
78
74
|
if attributes.key?(:'name')
|
|
79
75
|
self.name = attributes[:'name']
|
|
80
76
|
end
|
|
@@ -87,6 +83,10 @@ module Phrase
|
|
|
87
83
|
self.due_date = attributes[:'due_date']
|
|
88
84
|
end
|
|
89
85
|
|
|
86
|
+
if attributes.key?(:'review_due_date')
|
|
87
|
+
self.review_due_date = attributes[:'review_due_date']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
90
|
if attributes.key?(:'ticket_url')
|
|
91
91
|
self.ticket_url = attributes[:'ticket_url']
|
|
92
92
|
end
|
|
@@ -120,10 +120,10 @@ module Phrase
|
|
|
120
120
|
def ==(o)
|
|
121
121
|
return true if self.equal?(o)
|
|
122
122
|
self.class == o.class &&
|
|
123
|
-
branch == o.branch &&
|
|
124
123
|
name == o.name &&
|
|
125
124
|
briefing == o.briefing &&
|
|
126
125
|
due_date == o.due_date &&
|
|
126
|
+
review_due_date == o.review_due_date &&
|
|
127
127
|
ticket_url == o.ticket_url &&
|
|
128
128
|
target_locale_ids == o.target_locale_ids &&
|
|
129
129
|
autotranslate == o.autotranslate
|
|
@@ -138,7 +138,7 @@ module Phrase
|
|
|
138
138
|
# Calculates hash code according to all attributes.
|
|
139
139
|
# @return [Integer] Hash code
|
|
140
140
|
def hash
|
|
141
|
-
[
|
|
141
|
+
[name, briefing, due_date, review_due_date, ticket_url, target_locale_ids, autotranslate].hash
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# Builds the object from hash
|
data/lib/phrase/version.rb
CHANGED
data/spec/api/jobs_api_spec.rb
CHANGED
|
@@ -179,6 +179,7 @@ describe 'JobsApi' do
|
|
|
179
179
|
# @param job_update_parameters
|
|
180
180
|
# @param [Hash] opts the optional parameters
|
|
181
181
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
182
|
+
# @option opts [String] :branch Branch to use
|
|
182
183
|
# @return [JobDetails]
|
|
183
184
|
describe 'job_update test' do
|
|
184
185
|
it 'should work' do
|
|
@@ -28,6 +28,7 @@ describe 'WebhookDeliveriesApi' do
|
|
|
28
28
|
# @param [Hash] opts the optional parameters
|
|
29
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
|
30
30
|
# @option opts [String] :response_status_codes List of Response Status Codes
|
|
31
|
+
# @option opts [String] :status Filter deliveries by outcome. `success` returns deliveries with a 2xx response code or a soft error. `failed` returns all other deliveries, including exceptions and timeouts without a response code.
|
|
31
32
|
# @return [Array<WebhookDelivery>]
|
|
32
33
|
describe 'webhook_deliveries_list test' do
|
|
33
34
|
it 'should work' do
|
|
@@ -92,6 +92,12 @@ describe 'Automation' do
|
|
|
92
92
|
end
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
+
describe 'test attribute "include_branches"' do
|
|
96
|
+
it 'should work' do
|
|
97
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
95
101
|
describe 'test attribute "tags"' do
|
|
96
102
|
it 'should work' do
|
|
97
103
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -88,4 +88,10 @@ describe 'AutomationsCreateParameters1' do
|
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
91
|
+
describe 'test attribute "include_branches"' do
|
|
92
|
+
it 'should work' do
|
|
93
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
91
97
|
end
|
|
@@ -50,6 +50,12 @@ describe 'JobCreateParameters' do
|
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
describe 'test attribute "review_due_date"' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
53
59
|
describe 'test attribute "ticket_url"' do
|
|
54
60
|
it 'should work' do
|
|
55
61
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|