phrase 4.20.0 → 4.21.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b0e6f5b3eb7c7630fce3338c0f888b06a806175cca76668f2948b70c1a49468
4
- data.tar.gz: 465f3bad0a99690a832a877c7c392b9c898e7c6c925f3b2f107a7a9bd8a534b2
3
+ metadata.gz: 1bc8f459c31dc232c91ddc0c21c12a3ec381591e867f956de2bc18c7e4b7e94c
4
+ data.tar.gz: d519d27908fee74eebe278b8800c9a3a83072cc09edd736662d7afd2d8899dea
5
5
  SHA512:
6
- metadata.gz: fd73555f4319d6eefc6a664a66e689520172ef1f49a602639d8b04801228796b4a1ea7623969ff82573deeddaf1b8594a2326b6e2a74537d57d82bc32e44d941
7
- data.tar.gz: ff43f77e4d92d012158919ea37056bb778264c000f0bb3381fe5cc3fda3bd381ad910497a8da0e3bafed90a3cf5bf78d3bb43654657e8b23082b55d6c8b47b19
6
+ metadata.gz: c6d6b70bc1985c3da16fa3cb160beda669436678349029e66a1015c9f7dceaa9fadc16d6ce1f231aff76139fec19e913d9b27fbafae41781787a949bb560b086
7
+ data.tar.gz: 93ccc951db1012ce8f29c81d732f7e1597e872dc09b572ca0be43e6efc89066adeea57769dce80ac988b7516a7d9133926ae69935d90a702154b448eda6db1ac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.21.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.20.0...ruby-v4.21.0) (2026-05-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * **repo_syncs:** add API docs for create endpoint [SCD-933] ([#1113](https://github.com/phrase/strings-openapi/issues/1113)) ([3f65e16](https://github.com/phrase/strings-openapi/commit/3f65e16f6aeb074b933c7d7899197a1884c32865))
9
+ * **tags:** Add q search param to tags list endpoint ([#1122](https://github.com/phrase/strings-openapi/issues/1122)) ([b1342c6](https://github.com/phrase/strings-openapi/commit/b1342c6b94f2f9256d5d0f093ef65c7602e44ae5))
10
+
3
11
  ## [4.20.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.19.0...ruby-v4.20.0) (2026-04-27)
4
12
 
5
13
 
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.20.0
10
+ - Package version: 4.21.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.20.0.gem
59
+ gem install ./phrase-4.21.0.gem
60
60
  ```
61
61
 
62
- (for development, run `gem install --dev ./phrase-4.20.0.gem` to install the development dependencies)
62
+ (for development, run `gem install --dev ./phrase-4.21.0.gem` to install the development dependencies)
63
63
 
64
64
  ## Getting Started
65
65
 
@@ -330,6 +330,7 @@ Class | Method | HTTP request | Description
330
330
  *Phrase::RepoSyncEventsApi* | [**repo_sync_event_list**](docs/RepoSyncEventsApi.md#repo_sync_event_list) | **GET** /accounts/{account_id}/repo_syncs/{id}/events | Repository Syncs History
331
331
  *Phrase::RepoSyncEventsApi* | [**repo_sync_event_show**](docs/RepoSyncEventsApi.md#repo_sync_event_show) | **GET** /accounts/{account_id}/repo_syncs/{repo_sync_id}/events/{id} | Get a single Repo Sync Event
332
332
  *Phrase::RepoSyncsApi* | [**repo_sync_activate**](docs/RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{id}/activate | Activate a Repo Sync
333
+ *Phrase::RepoSyncsApi* | [**repo_sync_create**](docs/RepoSyncsApi.md#repo_sync_create) | **POST** /accounts/{account_id}/repo_syncs | Create a Repo Sync
333
334
  *Phrase::RepoSyncsApi* | [**repo_sync_deactivate**](docs/RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{id}/deactivate | Deactivate a Repo Sync
334
335
  *Phrase::RepoSyncsApi* | [**repo_sync_export**](docs/RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{id}/export | Export to code repository
335
336
  *Phrase::RepoSyncsApi* | [**repo_sync_import**](docs/RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{id}/import | Import from code repository
@@ -575,6 +576,7 @@ Class | Method | HTTP request | Description
575
576
  - [Phrase::ReleaseUpdateParameters](docs/ReleaseUpdateParameters.md)
576
577
  - [Phrase::ReleaseUpdateParameters1](docs/ReleaseUpdateParameters1.md)
577
578
  - [Phrase::RepoSync](docs/RepoSync.md)
579
+ - [Phrase::RepoSyncCreateParameters](docs/RepoSyncCreateParameters.md)
578
580
  - [Phrase::RepoSyncEvent](docs/RepoSyncEvent.md)
579
581
  - [Phrase::RepoSyncExportParameters](docs/RepoSyncExportParameters.md)
580
582
  - [Phrase::RepoSyncImportParameters](docs/RepoSyncImportParameters.md)
@@ -38,7 +38,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
38
38
  data_type: number,
39
39
  tags: awesome-feature,needs-proofreading,
40
40
  max_characters_allowed: 140,
41
- screenshot: [B@3bbb5b2,
41
+ screenshot: [B@62e9a6cc,
42
42
  remove_screenshot: null,
43
43
  unformatted: null,
44
44
  default_translation_content: Default translation content,
@@ -36,7 +36,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
36
36
  data_type: number,
37
37
  tags: awesome-feature,needs-proofreading,
38
38
  max_characters_allowed: 140,
39
- screenshot: [B@37c47166,
39
+ screenshot: [B@55f77306,
40
40
  remove_screenshot: null,
41
41
  unformatted: null,
42
42
  xml_space_preserve: null,
@@ -39,7 +39,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
39
39
  main_format: yml,
40
40
  media: Python,
41
41
  shares_translation_memory: true,
42
- project_image: [B@3c288a4e,
42
+ project_image: [B@622ae2ba,
43
43
  remove_project_image: null,
44
44
  account_id: abcd1234,
45
45
  point_of_contact: abcd1234,
@@ -41,7 +41,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
41
41
  main_format: yml,
42
42
  media: Python,
43
43
  shares_translation_memory: true,
44
- project_image: [B@27b27f3c,
44
+ project_image: [B@45ee48e7,
45
45
  remove_project_image: false,
46
46
  workflow: review,
47
47
  machine_translation_enabled: true,
@@ -0,0 +1,33 @@
1
+ # Phrase::RepoSyncCreateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **project_id** | **String** | ID of the project to connect the Repo Sync to. |
8
+ **git_provider** | **String** | The Git provider to use. | [optional] [default to 'github']
9
+ **connection_type** | **String** | The authentication method used to connect to the Git provider. Defaults to `token` if not specified. Valid values: - `token` — Personal access token stored on the Repo Sync. Supported by all providers. - `github_app` — Authenticate via the Phrase GitHub App installation on your account. GitHub only. The account must already have the GitHub App installed; if not, the response will include a `github_app_installation_url`. - `self_hosted` — Token-based auth for self-hosted Git instances. Requires `custom_api_endpoint`. |
10
+ **repo_name** | **String** | Full repository name including the owner, e.g. `my-org/my-repo`. |
11
+ **base_branch** | **String** | The default branch to use for imports and exports. | [optional]
12
+ **pr_branch** | **String** | Branch that translations are exported to before opening a pull request. If omitted, exports go directly to `base_branch`. | [optional]
13
+ **auto_import** | **Boolean** | Enable automatic import of translations triggered by pushes to the repository. | [optional]
14
+ **access_token** | **String** | Personal access token for the Git provider. Required when `connection_type` is `token` or `self_hosted`. Not used for `github_app`. | [optional]
15
+ **custom_api_endpoint** | **String** | Custom API endpoint URL for self-hosted Git instances. Required when `connection_type` is `self_hosted`. | [optional]
16
+
17
+ ## Code Sample
18
+
19
+ ```ruby
20
+ require 'Phrase'
21
+
22
+ instance = Phrase::RepoSyncCreateParameters.new(project_id: abcd1234abcd1234abcd1234abcd1234,
23
+ git_provider: github,
24
+ connection_type: github_app,
25
+ repo_name: my-org/my-repo,
26
+ base_branch: main,
27
+ pr_branch: phrase-translations,
28
+ auto_import: false,
29
+ access_token: ghp_xxxxxxxxxxxxxxxxxxxx,
30
+ custom_api_endpoint: https://git.example.com/api/v4)
31
+ ```
32
+
33
+
data/docs/RepoSyncsApi.md CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.phrase.com/v2*
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**repo_sync_activate**](RepoSyncsApi.md#repo_sync_activate) | **POST** /accounts/{account_id}/repo_syncs/{id}/activate | Activate a Repo Sync
8
+ [**repo_sync_create**](RepoSyncsApi.md#repo_sync_create) | **POST** /accounts/{account_id}/repo_syncs | Create a Repo Sync
8
9
  [**repo_sync_deactivate**](RepoSyncsApi.md#repo_sync_deactivate) | **POST** /accounts/{account_id}/repo_syncs/{id}/deactivate | Deactivate a Repo Sync
9
10
  [**repo_sync_export**](RepoSyncsApi.md#repo_sync_export) | **POST** /accounts/{account_id}/repo_syncs/{id}/export | Export to code repository
10
11
  [**repo_sync_import**](RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{id}/import | Import from code repository
@@ -76,6 +77,69 @@ Response<([**RepoSync**](RepoSync.md))>
76
77
  - **Accept**: application/json
77
78
 
78
79
 
80
+ ## repo_sync_create
81
+
82
+ > RepoSync repo_sync_create(account_id, repo_sync_create_parameters, opts)
83
+
84
+ Create a Repo Sync
85
+
86
+ Create a new Repo Sync.
87
+
88
+ ### Example
89
+
90
+ ```ruby
91
+ # load the gem
92
+ require 'phrase'
93
+ # setup authorization
94
+ Phrase.configure do |config|
95
+ # Configure HTTP basic authorization: Basic
96
+ config.username = 'YOUR USERNAME'
97
+ config.password = 'YOUR PASSWORD'
98
+
99
+ # Configure API key authorization: Token
100
+ config.api_key['Authorization'] = 'YOUR API KEY'
101
+ config.api_key_prefix['Authorization'] = 'token'
102
+ end
103
+
104
+ api_instance = Phrase::RepoSyncsApi.new
105
+ account_id = 'account_id_example' # String | Account ID
106
+ repo_sync_create_parameters = Phrase::RepoSyncCreateParameters.new({project_id: 'abcd1234abcd1234abcd1234abcd1234', connection_type: 'token', repo_name: 'my-org/my-repo'}) # RepoSyncCreateParameters |
107
+ opts = {
108
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
109
+ }
110
+
111
+ begin
112
+ #Create a Repo Sync
113
+ result = api_instance.repo_sync_create(account_id, repo_sync_create_parameters, opts)
114
+ pp result
115
+ rescue Phrase::ApiError => e
116
+ puts "Exception when calling RepoSyncsApi->repo_sync_create: #{e}"
117
+ end
118
+ ```
119
+
120
+ ### Parameters
121
+
122
+
123
+ Name | Type | Description | Notes
124
+ ------------- | ------------- | ------------- | -------------
125
+ **account_id** | **String**| Account ID |
126
+ **repo_sync_create_parameters** | [**RepoSyncCreateParameters**](RepoSyncCreateParameters.md)| |
127
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
128
+
129
+ ### Return type
130
+
131
+ Response<([**RepoSync**](RepoSync.md))>
132
+
133
+ ### Authorization
134
+
135
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
136
+
137
+ ### HTTP request headers
138
+
139
+ - **Content-Type**: application/json
140
+ - **Accept**: application/json
141
+
142
+
79
143
  ## repo_sync_deactivate
80
144
 
81
145
  > RepoSync repo_sync_deactivate(account_id, id, opts)
@@ -17,7 +17,7 @@ require 'Phrase'
17
17
  instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
18
18
  name: A screenshot name,
19
19
  description: A screenshot description,
20
- filename: [B@7bb92a71)
20
+ filename: [B@57e3a1b8)
21
21
  ```
22
22
 
23
23
 
data/docs/TagsApi.md CHANGED
@@ -236,7 +236,8 @@ opts = {
236
236
  page: 1, # Integer | Page number
237
237
  per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
238
238
  exclude_system_tags: true, # Boolean | excludes tags generated by the system, e.g. job, upload or figma tags
239
- branch: 'my-feature-branch' # String | specify the branch to use
239
+ branch: 'my-feature-branch', # String | specify the branch to use
240
+ q: 'feature' # String | Specify a query to filter tags by name.
240
241
  }
241
242
 
242
243
  begin
@@ -259,6 +260,7 @@ Name | Type | Description | Notes
259
260
  **per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
260
261
  **exclude_system_tags** | **Boolean**| excludes tags generated by the system, e.g. job, upload or figma tags | [optional]
261
262
  **branch** | **String**| specify the branch to use | [optional]
263
+ **q** | **String**| Specify a query to filter tags by name. | [optional]
262
264
 
263
265
  ### Return type
264
266
 
@@ -79,6 +79,80 @@ module Phrase
79
79
  return response, status_code, headers
80
80
  end
81
81
 
82
+ # Create a Repo Sync
83
+ # Create a new Repo Sync.
84
+ # @param account_id [String] Account ID
85
+ # @param repo_sync_create_parameters [RepoSyncCreateParameters]
86
+ # @param [Hash] opts the optional parameters
87
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
88
+ # @return [RepoSync]
89
+ def repo_sync_create(account_id, repo_sync_create_parameters, opts = {})
90
+ data, _status_code, _headers = repo_sync_create_with_http_info(account_id, repo_sync_create_parameters, opts)
91
+ data
92
+ end
93
+
94
+ # Create a Repo Sync
95
+ # Create a new Repo Sync.
96
+ # @param account_id [String] Account ID
97
+ # @param repo_sync_create_parameters [RepoSyncCreateParameters]
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
100
+ # @return [Array<(Response<(RepoSync)>, Integer, Hash)>] Response<(RepoSync)> data, response status code and response headers
101
+ def repo_sync_create_with_http_info(account_id, repo_sync_create_parameters, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepoSyncsApi.repo_sync_create ...'
104
+ end
105
+ # verify the required parameter 'account_id' is set
106
+ if @api_client.config.client_side_validation && account_id.nil?
107
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RepoSyncsApi.repo_sync_create"
108
+ end
109
+ # verify the required parameter 'repo_sync_create_parameters' is set
110
+ if @api_client.config.client_side_validation && repo_sync_create_parameters.nil?
111
+ fail ArgumentError, "Missing the required parameter 'repo_sync_create_parameters' when calling RepoSyncsApi.repo_sync_create"
112
+ end
113
+ # resource path
114
+ local_var_path = '/accounts/{account_id}/repo_syncs'.sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+ # HTTP header 'Content-Type'
124
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
125
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:body] || @api_client.object_to_http_body(repo_sync_create_parameters)
132
+
133
+ # return_type
134
+ return_type = opts[:return_type] || 'RepoSync'
135
+
136
+ # auth_names
137
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
138
+
139
+ new_options = opts.merge(
140
+ :header_params => header_params,
141
+ :query_params => query_params,
142
+ :form_params => form_params,
143
+ :body => post_body,
144
+ :auth_names => auth_names,
145
+ :return_type => return_type
146
+ )
147
+
148
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: RepoSyncsApi#repo_sync_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ response = ::Phrase::Response.new(data, headers)
153
+ return response, status_code, headers
154
+ end
155
+
82
156
  # Deactivate a Repo Sync
83
157
  # Deactivate an active Repo Sync. Import and export can't be performed on deactivated syncs and the pushes to the repository won't trigger the import to Phrase.
84
158
  # @param account_id [String] Account ID
@@ -241,6 +241,7 @@ module Phrase
241
241
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
242
242
  # @option opts [Boolean] :exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags
243
243
  # @option opts [String] :branch specify the branch to use
244
+ # @option opts [String] :q Specify a query to filter tags by name.
244
245
  # @return [Array<Tag>]
245
246
  def tags_list(project_id, opts = {})
246
247
  data, _status_code, _headers = tags_list_with_http_info(project_id, opts)
@@ -256,6 +257,7 @@ module Phrase
256
257
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
257
258
  # @option opts [Boolean] :exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags
258
259
  # @option opts [String] :branch specify the branch to use
260
+ # @option opts [String] :q Specify a query to filter tags by name.
259
261
  # @return [Array<(Response<(Array<Tag>)>, Integer, Hash)>] Response<(Array<Tag>)> data, response status code and response headers
260
262
  def tags_list_with_http_info(project_id, opts = {})
261
263
  if @api_client.config.debugging
@@ -274,6 +276,7 @@ module Phrase
274
276
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
275
277
  query_params[:'exclude_system_tags'] = opts[:'exclude_system_tags'] if !opts[:'exclude_system_tags'].nil?
276
278
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
279
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
277
280
 
278
281
  # header parameters
279
282
  header_params = opts[:header_params] || {}
@@ -0,0 +1,340 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class RepoSyncCreateParameters
5
+ # ID of the project to connect the Repo Sync to.
6
+ attr_accessor :project_id
7
+
8
+ # The Git provider to use.
9
+ attr_accessor :git_provider
10
+
11
+ # The authentication method used to connect to the Git provider. Defaults to `token` if not specified. Valid values: - `token` — Personal access token stored on the Repo Sync. Supported by all providers. - `github_app` — Authenticate via the Phrase GitHub App installation on your account. GitHub only. The account must already have the GitHub App installed; if not, the response will include a `github_app_installation_url`. - `self_hosted` — Token-based auth for self-hosted Git instances. Requires `custom_api_endpoint`.
12
+ attr_accessor :connection_type
13
+
14
+ # Full repository name including the owner, e.g. `my-org/my-repo`.
15
+ attr_accessor :repo_name
16
+
17
+ # The default branch to use for imports and exports.
18
+ attr_accessor :base_branch
19
+
20
+ # Branch that translations are exported to before opening a pull request. If omitted, exports go directly to `base_branch`.
21
+ attr_accessor :pr_branch
22
+
23
+ # Enable automatic import of translations triggered by pushes to the repository.
24
+ attr_accessor :auto_import
25
+
26
+ # Personal access token for the Git provider. Required when `connection_type` is `token` or `self_hosted`. Not used for `github_app`.
27
+ attr_accessor :access_token
28
+
29
+ # Custom API endpoint URL for self-hosted Git instances. Required when `connection_type` is `self_hosted`.
30
+ attr_accessor :custom_api_endpoint
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'project_id' => :'project_id',
58
+ :'git_provider' => :'git_provider',
59
+ :'connection_type' => :'connection_type',
60
+ :'repo_name' => :'repo_name',
61
+ :'base_branch' => :'base_branch',
62
+ :'pr_branch' => :'pr_branch',
63
+ :'auto_import' => :'auto_import',
64
+ :'access_token' => :'access_token',
65
+ :'custom_api_endpoint' => :'custom_api_endpoint'
66
+ }
67
+ end
68
+
69
+ # Attribute type mapping.
70
+ def self.openapi_types
71
+ {
72
+ :'project_id' => :'String',
73
+ :'git_provider' => :'String',
74
+ :'connection_type' => :'String',
75
+ :'repo_name' => :'String',
76
+ :'base_branch' => :'String',
77
+ :'pr_branch' => :'String',
78
+ :'auto_import' => :'Boolean',
79
+ :'access_token' => :'String',
80
+ :'custom_api_endpoint' => :'String'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::RepoSyncCreateParameters` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::RepoSyncCreateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'project_id')
106
+ self.project_id = attributes[:'project_id']
107
+ end
108
+
109
+ if attributes.key?(:'git_provider')
110
+ self.git_provider = attributes[:'git_provider']
111
+ else
112
+ self.git_provider = 'github'
113
+ end
114
+
115
+ if attributes.key?(:'connection_type')
116
+ self.connection_type = attributes[:'connection_type']
117
+ end
118
+
119
+ if attributes.key?(:'repo_name')
120
+ self.repo_name = attributes[:'repo_name']
121
+ end
122
+
123
+ if attributes.key?(:'base_branch')
124
+ self.base_branch = attributes[:'base_branch']
125
+ end
126
+
127
+ if attributes.key?(:'pr_branch')
128
+ self.pr_branch = attributes[:'pr_branch']
129
+ end
130
+
131
+ if attributes.key?(:'auto_import')
132
+ self.auto_import = attributes[:'auto_import']
133
+ end
134
+
135
+ if attributes.key?(:'access_token')
136
+ self.access_token = attributes[:'access_token']
137
+ end
138
+
139
+ if attributes.key?(:'custom_api_endpoint')
140
+ self.custom_api_endpoint = attributes[:'custom_api_endpoint']
141
+ end
142
+ end
143
+
144
+ # Show invalid properties with the reasons. Usually used together with valid?
145
+ # @return Array for valid properties with the reasons
146
+ def list_invalid_properties
147
+ invalid_properties = Array.new
148
+ if @project_id.nil?
149
+ invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
150
+ end
151
+
152
+ if @connection_type.nil?
153
+ invalid_properties.push('invalid value for "connection_type", connection_type cannot be nil.')
154
+ end
155
+
156
+ if @repo_name.nil?
157
+ invalid_properties.push('invalid value for "repo_name", repo_name cannot be nil.')
158
+ end
159
+
160
+ invalid_properties
161
+ end
162
+
163
+ # Check to see if the all the properties in the model are valid
164
+ # @return true if the model is valid
165
+ def valid?
166
+ return false if @project_id.nil?
167
+ git_provider_validator = EnumAttributeValidator.new('String', ["github", "gitlab", "bitbucket"])
168
+ return false unless git_provider_validator.valid?(@git_provider)
169
+ return false if @connection_type.nil?
170
+ connection_type_validator = EnumAttributeValidator.new('String', ["token", "github_app", "self_hosted"])
171
+ return false unless connection_type_validator.valid?(@connection_type)
172
+ return false if @repo_name.nil?
173
+ true
174
+ end
175
+
176
+ # Custom attribute writer method checking allowed values (enum).
177
+ # @param [Object] git_provider Object to be assigned
178
+ def git_provider=(git_provider)
179
+ validator = EnumAttributeValidator.new('String', ["github", "gitlab", "bitbucket"])
180
+ unless validator.valid?(git_provider)
181
+ fail ArgumentError, "invalid value for \"git_provider\", must be one of #{validator.allowable_values}."
182
+ end
183
+ @git_provider = git_provider
184
+ end
185
+
186
+ # Custom attribute writer method checking allowed values (enum).
187
+ # @param [Object] connection_type Object to be assigned
188
+ def connection_type=(connection_type)
189
+ validator = EnumAttributeValidator.new('String', ["token", "github_app", "self_hosted"])
190
+ unless validator.valid?(connection_type)
191
+ fail ArgumentError, "invalid value for \"connection_type\", must be one of #{validator.allowable_values}."
192
+ end
193
+ @connection_type = connection_type
194
+ end
195
+
196
+ # Checks equality by comparing each attribute.
197
+ # @param [Object] Object to be compared
198
+ def ==(o)
199
+ return true if self.equal?(o)
200
+ self.class == o.class &&
201
+ project_id == o.project_id &&
202
+ git_provider == o.git_provider &&
203
+ connection_type == o.connection_type &&
204
+ repo_name == o.repo_name &&
205
+ base_branch == o.base_branch &&
206
+ pr_branch == o.pr_branch &&
207
+ auto_import == o.auto_import &&
208
+ access_token == o.access_token &&
209
+ custom_api_endpoint == o.custom_api_endpoint
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [project_id, git_provider, connection_type, repo_name, base_branch, pr_branch, auto_import, access_token, custom_api_endpoint].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ new.build_from_hash(attributes)
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ self.class.openapi_types.each_pair do |key, type|
237
+ if type =~ /\AArray<(.*)>/i
238
+ # check to ensure the input is an array given that the attribute
239
+ # is documented as an array but the input is not
240
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
241
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
242
+ end
243
+ elsif !attributes[self.class.attribute_map[key]].nil?
244
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
245
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
246
+ end
247
+
248
+ self
249
+ end
250
+
251
+ # Deserializes the data based on type
252
+ # @param string type Data type
253
+ # @param string value Value to be deserialized
254
+ # @return [Object] Deserialized data
255
+ def _deserialize(type, value)
256
+ case type.to_sym
257
+ when :DateTime
258
+ DateTime.parse(value)
259
+ when :Date
260
+ Date.parse(value)
261
+ when :Time
262
+ Time.parse(value)
263
+ when :String
264
+ value.to_s
265
+ when :Integer
266
+ value.to_i
267
+ when :Float
268
+ value.to_f
269
+ when :Boolean
270
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
271
+ true
272
+ else
273
+ false
274
+ end
275
+ when :Object
276
+ # generic object (usually a Hash), return directly
277
+ value
278
+ when /\AArray<(?<inner_type>.+)>\z/
279
+ inner_type = Regexp.last_match[:inner_type]
280
+ value.map { |v| _deserialize(inner_type, v) }
281
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
282
+ k_type = Regexp.last_match[:k_type]
283
+ v_type = Regexp.last_match[:v_type]
284
+ {}.tap do |hash|
285
+ value.each do |k, v|
286
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
287
+ end
288
+ end
289
+ else # model
290
+ Phrase.const_get(type).build_from_hash(value)
291
+ end
292
+ end
293
+
294
+ # Returns the string representation of the object
295
+ # @return [String] String presentation of the object
296
+ def to_s
297
+ to_hash.to_s
298
+ end
299
+
300
+ # to_body is an alias to to_hash (backward compatibility)
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_body
303
+ to_hash
304
+ end
305
+
306
+ # Returns the object in the form of hash
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_hash
309
+ hash = {}
310
+ self.class.attribute_map.each_pair do |attr, param|
311
+ value = self.send(attr)
312
+ if value.nil?
313
+ is_nullable = self.class.openapi_nullable.include?(attr)
314
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
315
+ end
316
+
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ # Outputs non-array value in the form of hash
323
+ # For object, use to_hash. Otherwise, just return the value
324
+ # @param [Object] value Any valid value
325
+ # @return [Hash] Returns the value in the form of hash
326
+ def _to_hash(value)
327
+ if value.is_a?(Array)
328
+ value.compact.map { |v| _to_hash(v) }
329
+ elsif value.is_a?(Hash)
330
+ {}.tap do |hash|
331
+ value.each { |k, v| hash[k] = _to_hash(v) }
332
+ end
333
+ elsif value.respond_to? :to_hash
334
+ value.to_hash
335
+ else
336
+ value
337
+ end
338
+ end
339
+ end
340
+ end
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.20.0'
2
+ VERSION = '4.21.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -163,6 +163,7 @@ require 'phrase/models/release_trigger'
163
163
  require 'phrase/models/release_update_parameters'
164
164
  require 'phrase/models/release_update_parameters1'
165
165
  require 'phrase/models/repo_sync'
166
+ require 'phrase/models/repo_sync_create_parameters'
166
167
  require 'phrase/models/repo_sync_event'
167
168
  require 'phrase/models/repo_sync_export_parameters'
168
169
  require 'phrase/models/repo_sync_import_parameters'
@@ -34,6 +34,20 @@ describe 'RepoSyncsApi' do
34
34
  end
35
35
  end
36
36
 
37
+ # unit tests for repo_sync_create
38
+ # Create a Repo Sync
39
+ # Create a new Repo Sync.
40
+ # @param account_id Account ID
41
+ # @param repo_sync_create_parameters
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
44
+ # @return [RepoSync]
45
+ describe 'repo_sync_create test' 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
+
37
51
  # unit tests for repo_sync_deactivate
38
52
  # Deactivate a Repo Sync
39
53
  # Deactivate an active Repo Sync. Import and export can&#39;t be performed on deactivated syncs and the pushes to the repository won&#39;t trigger the import to Phrase.
@@ -75,6 +75,7 @@ describe 'TagsApi' do
75
75
  # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
76
76
  # @option opts [Boolean] :exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags
77
77
  # @option opts [String] :branch specify the branch to use
78
+ # @option opts [String] :q Specify a query to filter tags by name.
78
79
  # @return [Array<Tag>]
79
80
  describe 'tags_list test' do
80
81
  it 'should work' do
@@ -0,0 +1,85 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::RepoSyncCreateParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'RepoSyncCreateParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::RepoSyncCreateParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of RepoSyncCreateParameters' do
19
+ it 'should create an instance of RepoSyncCreateParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::RepoSyncCreateParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "project_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 "git_provider"' 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', ["github", "gitlab", "bitbucket"])
33
+ # validator.allowable_values.each do |value|
34
+ # expect { @instance.git_provider = value }.not_to raise_error
35
+ # end
36
+ end
37
+ end
38
+
39
+ describe 'test attribute "connection_type"' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
42
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["token", "github_app", "self_hosted"])
43
+ # validator.allowable_values.each do |value|
44
+ # expect { @instance.connection_type = value }.not_to raise_error
45
+ # end
46
+ end
47
+ end
48
+
49
+ describe 'test attribute "repo_name"' do
50
+ it 'should work' do
51
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
52
+ end
53
+ end
54
+
55
+ describe 'test attribute "base_branch"' 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 "pr_branch"' 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 "auto_import"' 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 "access_token"' 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 "custom_api_endpoint"' 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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phrase
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.0
4
+ version: 4.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phrase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-27 00:00:00.000000000 Z
11
+ date: 2026-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -272,6 +272,7 @@ files:
272
272
  - docs/ReleaseUpdateParameters1.md
273
273
  - docs/ReleasesApi.md
274
274
  - docs/RepoSync.md
275
+ - docs/RepoSyncCreateParameters.md
275
276
  - docs/RepoSyncEvent.md
276
277
  - docs/RepoSyncEventsApi.md
277
278
  - docs/RepoSyncExportParameters.md
@@ -576,6 +577,7 @@ files:
576
577
  - lib/phrase/models/release_update_parameters.rb
577
578
  - lib/phrase/models/release_update_parameters1.rb
578
579
  - lib/phrase/models/repo_sync.rb
580
+ - lib/phrase/models/repo_sync_create_parameters.rb
579
581
  - lib/phrase/models/repo_sync_event.rb
580
582
  - lib/phrase/models/repo_sync_export_parameters.rb
581
583
  - lib/phrase/models/repo_sync_import_parameters.rb
@@ -861,6 +863,7 @@ files:
861
863
  - spec/models/release_trigger_spec.rb
862
864
  - spec/models/release_update_parameters1_spec.rb
863
865
  - spec/models/release_update_parameters_spec.rb
866
+ - spec/models/repo_sync_create_parameters_spec.rb
864
867
  - spec/models/repo_sync_event_spec.rb
865
868
  - spec/models/repo_sync_export_parameters_spec.rb
866
869
  - spec/models/repo_sync_import_parameters_spec.rb
@@ -1244,4 +1247,5 @@ test_files:
1244
1247
  - spec/models/space_create_parameters_spec.rb
1245
1248
  - spec/models/locale_preview_spec.rb
1246
1249
  - spec/models/job_template_create_parameters_spec.rb
1250
+ - spec/models/repo_sync_create_parameters_spec.rb
1247
1251
  - spec/spec_helper.rb