phrase 3.2.0 → 3.3.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +10 -5
  4. data/docs/KeyCreateParameters.md +1 -1
  5. data/docs/KeyUpdateParameters.md +1 -1
  6. data/docs/LocaleDownload.md +29 -0
  7. data/docs/LocaleDownloadCreateParameters.md +43 -0
  8. data/docs/LocaleDownloadParams.md +29 -0
  9. data/docs/LocaleDownloadResult.md +17 -0
  10. data/docs/LocaleDownloadsApi.md +148 -0
  11. data/docs/ProjectCreateParameters.md +1 -1
  12. data/docs/ProjectUpdateParameters.md +1 -1
  13. data/docs/ReleaseCreateParameters.md +4 -0
  14. data/docs/ReleaseUpdateParameters.md +4 -0
  15. data/docs/RepoSyncEvent.md +3 -1
  16. data/docs/RepoSyncsApi.md +70 -4
  17. data/docs/ScreenshotUpdateParameters.md +1 -1
  18. data/lib/phrase/api/locale_downloads_api.rb +180 -0
  19. data/lib/phrase/api/repo_syncs_api.rb +84 -6
  20. data/lib/phrase/models/locale_download.rb +285 -0
  21. data/lib/phrase/models/locale_download_create_parameters.rb +332 -0
  22. data/lib/phrase/models/{repo_sync_import.rb → locale_download_params.rb} +65 -10
  23. data/lib/phrase/models/{repo_sync_export.rb → locale_download_result.rb} +11 -10
  24. data/lib/phrase/models/release_create_parameters.rb +21 -1
  25. data/lib/phrase/models/release_update_parameters.rb +21 -1
  26. data/lib/phrase/models/repo_sync_event.rb +10 -1
  27. data/lib/phrase/version.rb +1 -1
  28. data/lib/phrase.rb +5 -2
  29. data/spec/api/locale_downloads_api_spec.rb +57 -0
  30. data/spec/api/repo_syncs_api_spec.rb +17 -2
  31. data/spec/models/locale_download_create_parameters_spec.rb +107 -0
  32. data/spec/models/locale_download_params_spec.rb +65 -0
  33. data/spec/models/{repo_sync_export_spec.rb → locale_download_result_spec.rb} +7 -7
  34. data/spec/models/locale_download_spec.rb +69 -0
  35. data/spec/models/release_create_parameters_spec.rb +12 -0
  36. data/spec/models/release_update_parameters_spec.rb +12 -0
  37. data/spec/models/repo_sync_event_spec.rb +6 -0
  38. metadata +258 -246
  39. data/docs/RepoSyncExport.md +0 -17
  40. data/docs/RepoSyncImport.md +0 -17
  41. data/spec/models/repo_sync_import_spec.rb +0 -29
@@ -2,6 +2,8 @@ require 'date'
2
2
 
3
3
  module Phrase
4
4
  class RepoSyncEvent
5
+ attr_accessor :id
6
+
5
7
  attr_accessor :event_type
6
8
 
7
9
  attr_accessor :created_at
@@ -42,6 +44,7 @@ module Phrase
42
44
  # Attribute mapping from ruby-style variable name to JSON key.
43
45
  def self.attribute_map
44
46
  {
47
+ :'id' => :'id',
45
48
  :'event_type' => :'event_type',
46
49
  :'created_at' => :'created_at',
47
50
  :'status' => :'status',
@@ -54,6 +57,7 @@ module Phrase
54
57
  # Attribute type mapping.
55
58
  def self.openapi_types
56
59
  {
60
+ :'id' => :'String',
57
61
  :'event_type' => :'String',
58
62
  :'created_at' => :'DateTime',
59
63
  :'status' => :'String',
@@ -84,6 +88,10 @@ module Phrase
84
88
  h[k.to_sym] = v
85
89
  }
86
90
 
91
+ if attributes.key?(:'id')
92
+ self.id = attributes[:'id']
93
+ end
94
+
87
95
  if attributes.key?(:'event_type')
88
96
  self.event_type = attributes[:'event_type']
89
97
  end
@@ -153,6 +161,7 @@ module Phrase
153
161
  def ==(o)
154
162
  return true if self.equal?(o)
155
163
  self.class == o.class &&
164
+ id == o.id &&
156
165
  event_type == o.event_type &&
157
166
  created_at == o.created_at &&
158
167
  status == o.status &&
@@ -170,7 +179,7 @@ module Phrase
170
179
  # Calculates hash code according to all attributes.
171
180
  # @return [Integer] Hash code
172
181
  def hash
173
- [event_type, created_at, status, pull_request_url, auto_import, errors].hash
182
+ [id, event_type, created_at, status, pull_request_url, auto_import, errors].hash
174
183
  end
175
184
 
176
185
  # Builds the object from hash
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '3.2.0'
2
+ VERSION = '3.3.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -117,6 +117,10 @@ require 'phrase/models/keys_untag_parameters'
117
117
  require 'phrase/models/locale'
118
118
  require 'phrase/models/locale_create_parameters'
119
119
  require 'phrase/models/locale_details'
120
+ require 'phrase/models/locale_download'
121
+ require 'phrase/models/locale_download_create_parameters'
122
+ require 'phrase/models/locale_download_params'
123
+ require 'phrase/models/locale_download_result'
120
124
  require 'phrase/models/locale_preview'
121
125
  require 'phrase/models/locale_preview1'
122
126
  require 'phrase/models/locale_report'
@@ -165,8 +169,6 @@ require 'phrase/models/replies_list_parameters'
165
169
  require 'phrase/models/repo_sync'
166
170
  require 'phrase/models/repo_sync_event'
167
171
  require 'phrase/models/repo_sync_event_errors_inner'
168
- require 'phrase/models/repo_sync_export'
169
- require 'phrase/models/repo_sync_import'
170
172
  require 'phrase/models/screenshot'
171
173
  require 'phrase/models/screenshot_marker'
172
174
  require 'phrase/models/screenshot_marker_create_parameters'
@@ -259,6 +261,7 @@ require 'phrase/api/jobs_api'
259
261
  require 'phrase/api/keys_api'
260
262
  require 'phrase/api/keys_figma_attachments_api'
261
263
  require 'phrase/api/linked_keys_api'
264
+ require 'phrase/api/locale_downloads_api'
262
265
  require 'phrase/api/locales_api'
263
266
  require 'phrase/api/members_api'
264
267
  require 'phrase/api/notification_groups_api'
@@ -0,0 +1,57 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::LocaleDownloadsApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'LocaleDownloadsApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::LocaleDownloadsApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of LocaleDownloadsApi' do
18
+ it 'should create an instance of LocaleDownloadsApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::LocaleDownloadsApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for locale_download_create
24
+ # Initiate async download of a locale
25
+ # Prepare a locale for download in a specific file format.
26
+ # @param project_id Project ID
27
+ # @param locale_id Locale ID
28
+ # @param locale_download_create_parameters
29
+ # @param [Hash] opts the optional parameters
30
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
31
+ # @option opts [String] :if_modified_since Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional)
32
+ # @option opts [String] :if_none_match ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional)
33
+ # @return [LocaleDownload]
34
+ describe 'locale_download_create test' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ # unit tests for locale_download_show
41
+ # Show status of an async locale download
42
+ # Show status of already started async locale download. If the download is finished, the download link will be returned.
43
+ # @param project_id Project ID
44
+ # @param locale_id Locale ID
45
+ # @param id ID
46
+ # @param [Hash] opts the optional parameters
47
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
48
+ # @option opts [String] :if_modified_since Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional)
49
+ # @option opts [String] :if_none_match ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional)
50
+ # @return [LocaleDownload]
51
+ describe 'locale_download_show test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ end
@@ -48,6 +48,21 @@ describe 'RepoSyncsApi' do
48
48
  end
49
49
  end
50
50
 
51
+ # unit tests for repo_sync_event_show
52
+ # Get a single Repo Sync Event
53
+ # Shows a single Repo Sync event.
54
+ # @param account_id Account ID
55
+ # @param repo_sync_id Repo Sync ID
56
+ # @param id ID
57
+ # @param [Hash] opts the optional parameters
58
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
59
+ # @return [RepoSyncEvent]
60
+ describe 'repo_sync_event_show test' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
51
66
  # unit tests for repo_sync_events
52
67
  # Repository Syncs History
53
68
  # Get the history of a single Repo Sync. The history includes all imports and exports performed by the Repo Sync.
@@ -69,7 +84,7 @@ describe 'RepoSyncsApi' do
69
84
  # @param id ID
70
85
  # @param [Hash] opts the optional parameters
71
86
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
72
- # @return [RepoSyncExport]
87
+ # @return [RepoSyncEvent]
73
88
  describe 'repo_sync_export test' do
74
89
  it 'should work' do
75
90
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -83,7 +98,7 @@ describe 'RepoSyncsApi' do
83
98
  # @param id ID
84
99
  # @param [Hash] opts the optional parameters
85
100
  # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
86
- # @return [RepoSyncImport]
101
+ # @return [RepoSyncEvent]
87
102
  describe 'repo_sync_import test' do
88
103
  it 'should work' do
89
104
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -0,0 +1,107 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::LocaleDownloadCreateParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'LocaleDownloadCreateParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::LocaleDownloadCreateParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of LocaleDownloadCreateParameters' do
19
+ it 'should create an instance of LocaleDownloadCreateParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::LocaleDownloadCreateParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "file_format"' 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 "branch"' 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 "tags"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "include_empty_translations"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "exclude_empty_zero_forms"' 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
+ describe 'test attribute "include_translated_keys"' 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
+
59
+ describe 'test attribute "keep_notranslate_tags"' 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
+ describe 'test attribute "format_options"' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ describe 'test attribute "encoding"' do
72
+ it 'should work' do
73
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
+ end
75
+ end
76
+
77
+ describe 'test attribute "include_unverified_translations"' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ describe 'test attribute "use_last_reviewed_version"' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "fallback_locale_id"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ describe 'test attribute "source_locale_id"' 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
+
101
+ describe 'test attribute "custom_metadata_filters"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ end
@@ -0,0 +1,65 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::LocaleDownloadParams
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'LocaleDownloadParams' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::LocaleDownloadParams.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of LocaleDownloadParams' do
19
+ it 'should create an instance of LocaleDownloadParams' do
20
+ expect(@instance).to be_instance_of(Phrase::LocaleDownloadParams)
21
+ end
22
+ end
23
+ describe 'test attribute "file_format"' 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 "locale_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 "tags"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "branch"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "include_empty_translations"' 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
+ describe 'test attribute "include_translated_keys"' 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
+
59
+ describe 'test attribute "include_unverified_translations"' 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
+ end
@@ -2,25 +2,25 @@ require 'spec_helper'
2
2
  require 'json'
3
3
  require 'date'
4
4
 
5
- # Unit tests for Phrase::RepoSyncExport
5
+ # Unit tests for Phrase::LocaleDownloadResult
6
6
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
7
  # Please update as you see appropriate
8
- describe 'RepoSyncExport' do
8
+ describe 'LocaleDownloadResult' do
9
9
  before do
10
10
  # run before each test
11
- @instance = Phrase::RepoSyncExport.new
11
+ @instance = Phrase::LocaleDownloadResult.new
12
12
  end
13
13
 
14
14
  after do
15
15
  # run after each test
16
16
  end
17
17
 
18
- describe 'test an instance of RepoSyncExport' do
19
- it 'should create an instance of RepoSyncExport' do
20
- expect(@instance).to be_instance_of(Phrase::RepoSyncExport)
18
+ describe 'test an instance of LocaleDownloadResult' do
19
+ it 'should create an instance of LocaleDownloadResult' do
20
+ expect(@instance).to be_instance_of(Phrase::LocaleDownloadResult)
21
21
  end
22
22
  end
23
- describe 'test attribute "message"' do
23
+ describe 'test attribute "url"' do
24
24
  it 'should work' do
25
25
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
26
26
  end
@@ -0,0 +1,69 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::LocaleDownload
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'LocaleDownload' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::LocaleDownload.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of LocaleDownload' do
19
+ it 'should create an instance of LocaleDownload' do
20
+ expect(@instance).to be_instance_of(Phrase::LocaleDownload)
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 "status"' do
30
+ it 'should work' do
31
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
32
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["processing", "completed", "error"])
33
+ # validator.allowable_values.each do |value|
34
+ # expect { @instance.status = value }.not_to raise_error
35
+ # end
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "result"' 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
+ describe 'test attribute "params"' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ describe 'test attribute "error"' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ describe 'test attribute "created_at"' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "completed_at"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ end
@@ -44,6 +44,18 @@ describe 'ReleaseCreateParameters' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "app_min_version"' 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
+ describe 'test attribute "app_max_version"' 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
+
47
59
  describe 'test attribute "branch"' do
48
60
  it 'should work' do
49
61
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -32,6 +32,18 @@ describe 'ReleaseUpdateParameters' do
32
32
  end
33
33
  end
34
34
 
35
+ describe 'test attribute "app_min_version"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "app_max_version"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
35
47
  describe 'test attribute "branch"' do
36
48
  it 'should work' do
37
49
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -20,6 +20,12 @@ describe 'RepoSyncEvent' do
20
20
  expect(@instance).to be_instance_of(Phrase::RepoSyncEvent)
21
21
  end
22
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
+
23
29
  describe 'test attribute "event_type"' do
24
30
  it 'should work' do
25
31
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers