phrase 4.35.0 → 4.36.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: f985d7968ce87e4689fc720f77f336c585faa52bbde7443e676b4ee4034d0622
4
- data.tar.gz: 1c3963bfd4de3c7fca1a7b55c619aa27e4dfb35b0c91a24966b18359035808b0
3
+ metadata.gz: 6cfbcee2c50f1b3b24722b9bc81d7b9d099cece2e59a8ebcb7b27234149bf54f
4
+ data.tar.gz: 3207ee3809fcfd4dfa79df1043eec85d55e63d0e7bcbd91a3d2e3e7df9567709
5
5
  SHA512:
6
- metadata.gz: 8a11ceb0b3bda2c7199eb1f724471fa33c33b2ceda2507b422d308666672b11871c8d8b108da1b46e23e9c825e0abe8b61230d05fed54367ad9b9bfe345f7cab
7
- data.tar.gz: c8c228153ce06274be310eb0d4cd63eb8b3b798341ef1bbc0c80d196179b8458358177199db9351d2fb2b9e607e8d994a892ffd74c74a5882c99e2b4f34de63e
6
+ metadata.gz: e45215ca5428772beb9fb87eafdd23c0417dea275ab8e6c1cbc6579f05c24fd01a3e5cf63007938e6c1accff278d750596249d42646533d8b89ee65ea919a9c1
7
+ data.tar.gz: 9e2932e45f5ca32328a2dc35883a7b92171f744831e1fe7f627c4a0ddef2511d33a0d4503d3155837f0ced2350c29f40600ccf0168aec4aedaae47a08d2c7d2a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.36.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.35.0...ruby-v4.36.0) (2026-11-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * **API:** add project note endpoints and note field to project details ([#1382](https://github.com/phrase/strings-openapi/issues/1382)) ([d8a7dce](https://github.com/phrase/strings-openapi/commit/d8a7dce5ba70d133f457a58512b6234228a8d989))
9
+
3
10
  ## [4.35.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.34.0...ruby-v4.35.0) (2026-11-23)
4
11
 
5
12
 
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.35.0
10
+ - Package version: 4.36.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.35.0.gem
59
+ gem install ./phrase-4.36.0.gem
60
60
  ```
61
61
 
62
- (for development, run `gem install --dev ./phrase-4.35.0.gem` to install the development dependencies)
62
+ (for development, run `gem install --dev ./phrase-4.36.0.gem` to install the development dependencies)
63
63
 
64
64
  ## Getting Started
65
65
 
@@ -323,6 +323,9 @@ Class | Method | HTTP request | Description
323
323
  *Phrase::PreTranslationsApi* | [**pre_translation_create**](docs/PreTranslationsApi.md#pre_translation_create) | **POST** /projects/{project_id}/pre_translations | Create a pre-translation job
324
324
  *Phrase::PreTranslationsApi* | [**pre_translation_show**](docs/PreTranslationsApi.md#pre_translation_show) | **GET** /projects/{project_id}/pre_translations/{id} | Get a single pre-translation job
325
325
  *Phrase::PreTranslationsApi* | [**pre_translations_list**](docs/PreTranslationsApi.md#pre_translations_list) | **GET** /projects/{project_id}/pre_translations | List pre-translation jobs
326
+ *Phrase::ProjectNotesApi* | [**project_note_destroy**](docs/ProjectNotesApi.md#project_note_destroy) | **DELETE** /projects/{project_id}/note | Delete a project note
327
+ *Phrase::ProjectNotesApi* | [**project_note_show**](docs/ProjectNotesApi.md#project_note_show) | **GET** /projects/{project_id}/note | Get a project note
328
+ *Phrase::ProjectNotesApi* | [**project_note_update**](docs/ProjectNotesApi.md#project_note_update) | **PATCH** /projects/{project_id}/note | Create or update a project note
326
329
  *Phrase::ProjectsApi* | [**project_create**](docs/ProjectsApi.md#project_create) | **POST** /projects | Create a project
327
330
  *Phrase::ProjectsApi* | [**project_delete**](docs/ProjectsApi.md#project_delete) | **DELETE** /projects/{id} | Delete a project
328
331
  *Phrase::ProjectsApi* | [**project_show**](docs/ProjectsApi.md#project_show) | **GET** /projects/{id} | Get a single project
@@ -572,6 +575,7 @@ Class | Method | HTTP request | Description
572
575
  - [Phrase::MemberSpacesInner](docs/MemberSpacesInner.md)
573
576
  - [Phrase::MemberUpdateParameters](docs/MemberUpdateParameters.md)
574
577
  - [Phrase::MemberUpdateSettingsParameters](docs/MemberUpdateSettingsParameters.md)
578
+ - [Phrase::Note](docs/Note.md)
575
579
  - [Phrase::Notification](docs/Notification.md)
576
580
  - [Phrase::NotificationGroup](docs/NotificationGroup.md)
577
581
  - [Phrase::NotificationGroupDetail](docs/NotificationGroupDetail.md)
@@ -590,6 +594,7 @@ Class | Method | HTTP request | Description
590
594
  - [Phrase::ProjectDetails](docs/ProjectDetails.md)
591
595
  - [Phrase::ProjectLocales](docs/ProjectLocales.md)
592
596
  - [Phrase::ProjectMember](docs/ProjectMember.md)
597
+ - [Phrase::ProjectNoteUpdateParameters](docs/ProjectNoteUpdateParameters.md)
593
598
  - [Phrase::ProjectReport](docs/ProjectReport.md)
594
599
  - [Phrase::ProjectShort](docs/ProjectShort.md)
595
600
  - [Phrase::ProjectUpdateParameters](docs/ProjectUpdateParameters.md)
data/docs/Note.md ADDED
@@ -0,0 +1,25 @@
1
+ # Phrase::Note
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | Unique code identifying the note. | [optional]
8
+ **body** | **String** | Markdown-formatted content of the note (max 65,535 characters). | [optional]
9
+ **created_at** | **Time** | | [optional]
10
+ **updated_at** | **Time** | | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'phrase'
16
+
17
+ instance = Phrase::Note.new(id: 'abcd1234efgh5678',
18
+ body: '## Project context
19
+
20
+ This project contains all marketing strings.',
21
+ created_at: nil,
22
+ updated_at: nil)
23
+ ```
24
+
25
+
@@ -38,6 +38,7 @@ Name | Type | Description | Notes
38
38
  **job_locking_enabled** | **Boolean** | | [optional]
39
39
  **placeholder_styles** | **Array<String>** | | [optional]
40
40
  **branch** | [**Branch**](Branch.md) | | [optional]
41
+ **note** | [**Note**](Note.md) | | [optional]
41
42
 
42
43
  ## Code Sample
43
44
 
@@ -77,7 +78,8 @@ instance = Phrase::ProjectDetails.new(id: nil,
77
78
  translation_keys_sort_collation: 'unicode_ci',
78
79
  job_locking_enabled: false,
79
80
  placeholder_styles: ["rails_i18n","java_properties"],
80
- branch: nil)
81
+ branch: nil,
82
+ note: nil)
81
83
  ```
82
84
 
83
85
 
@@ -0,0 +1,19 @@
1
+ # Phrase::ProjectNoteUpdateParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **body** | **String** | Markdown content for the project note (max 65,535 characters). |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'phrase'
13
+
14
+ instance = Phrase::ProjectNoteUpdateParameters.new(body: '## Project context
15
+
16
+ This project contains all marketing strings.')
17
+ ```
18
+
19
+
@@ -0,0 +1,203 @@
1
+ # Phrase::ProjectNotesApi
2
+
3
+ All URIs are relative to *https://api.phrase.com/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**project_note_destroy**](ProjectNotesApi.md#project_note_destroy) | **DELETE** /projects/{project_id}/note | Delete a project note
8
+ [**project_note_show**](ProjectNotesApi.md#project_note_show) | **GET** /projects/{project_id}/note | Get a project note
9
+ [**project_note_update**](ProjectNotesApi.md#project_note_update) | **PATCH** /projects/{project_id}/note | Create or update a project note
10
+
11
+
12
+
13
+ ## project_note_destroy
14
+
15
+ > project_note_destroy(project_id, opts)
16
+
17
+ Delete a project note
18
+
19
+ Deletes the note associated with a project. This operation is idempotent — it succeeds silently even when no note exists. The note is resolved against the main project — branch projects delete the main project's note. Requires manage permissions on the project and the `write` OAuth scope.
20
+
21
+ ### Example
22
+
23
+ ```ruby
24
+ # load the gem
25
+ require 'phrase'
26
+ # setup authorization
27
+ Phrase.configure do |config|
28
+ # Configure HTTP basic authorization: Basic
29
+ config.username = 'YOUR USERNAME'
30
+ config.password = 'YOUR PASSWORD'
31
+
32
+ # Configure API key authorization: Token
33
+ config.api_key['Authorization'] = 'YOUR API KEY'
34
+ config.api_key_prefix['Authorization'] = 'token'
35
+ end
36
+
37
+ api_instance = Phrase::ProjectNotesApi.new
38
+ project_id = 'project_id_example' # String | Project ID
39
+ opts = {
40
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
41
+ branch: 'my-feature-branch' # String | Branch to use
42
+ }
43
+
44
+ begin
45
+ #Delete a project note
46
+ api_instance.project_note_destroy(project_id, opts)
47
+ rescue Phrase::ApiError => e
48
+ puts "Exception when calling ProjectNotesApi->project_note_destroy: #{e}"
49
+ end
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+
55
+ Name | Type | Description | Notes
56
+ ------------- | ------------- | ------------- | -------------
57
+ **project_id** | **String**| Project ID |
58
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
59
+ **branch** | **String**| Branch to use | [optional]
60
+
61
+ ### Return type
62
+
63
+ Response<(nil (empty response body))>
64
+
65
+ ### Authorization
66
+
67
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
68
+
69
+ ### HTTP request headers
70
+
71
+ - **Content-Type**: Not defined
72
+ - **Accept**: Not defined
73
+
74
+
75
+ ## project_note_show
76
+
77
+ > Note project_note_show(project_id, opts)
78
+
79
+ Get a project note
80
+
81
+ Returns the Markdown-formatted note attached to a project. The note is resolved against the main project — branch projects return the main project's note. Returns 404 when no note has been created yet. Requires the `read` OAuth scope.
82
+
83
+ ### Example
84
+
85
+ ```ruby
86
+ # load the gem
87
+ require 'phrase'
88
+ # setup authorization
89
+ Phrase.configure do |config|
90
+ # Configure HTTP basic authorization: Basic
91
+ config.username = 'YOUR USERNAME'
92
+ config.password = 'YOUR PASSWORD'
93
+
94
+ # Configure API key authorization: Token
95
+ config.api_key['Authorization'] = 'YOUR API KEY'
96
+ config.api_key_prefix['Authorization'] = 'token'
97
+ end
98
+
99
+ api_instance = Phrase::ProjectNotesApi.new
100
+ project_id = 'project_id_example' # String | Project ID
101
+ opts = {
102
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
103
+ branch: 'my-feature-branch' # String | Branch to use
104
+ }
105
+
106
+ begin
107
+ #Get a project note
108
+ result = api_instance.project_note_show(project_id, opts)
109
+ pp result
110
+ rescue Phrase::ApiError => e
111
+ puts "Exception when calling ProjectNotesApi->project_note_show: #{e}"
112
+ end
113
+ ```
114
+
115
+ ### Parameters
116
+
117
+
118
+ Name | Type | Description | Notes
119
+ ------------- | ------------- | ------------- | -------------
120
+ **project_id** | **String**| Project ID |
121
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
122
+ **branch** | **String**| Branch to use | [optional]
123
+
124
+ ### Return type
125
+
126
+ Response<([**Note**](Note.md))>
127
+
128
+ ### Authorization
129
+
130
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
131
+
132
+ ### HTTP request headers
133
+
134
+ - **Content-Type**: Not defined
135
+ - **Accept**: application/json
136
+
137
+
138
+ ## project_note_update
139
+
140
+ > Note project_note_update(project_id, project_note_update_parameters, opts)
141
+
142
+ Create or update a project note
143
+
144
+ Creates or updates the Markdown-formatted note for a project. If a note already exists it is updated in place; otherwise a new note is created. The note is stored on the main project — branch projects write to the main project's note. `body` is required. Requires manage permissions on the project and the `write` OAuth scope.
145
+
146
+ ### Example
147
+
148
+ ```ruby
149
+ # load the gem
150
+ require 'phrase'
151
+ # setup authorization
152
+ Phrase.configure do |config|
153
+ # Configure HTTP basic authorization: Basic
154
+ config.username = 'YOUR USERNAME'
155
+ config.password = 'YOUR PASSWORD'
156
+
157
+ # Configure API key authorization: Token
158
+ config.api_key['Authorization'] = 'YOUR API KEY'
159
+ config.api_key_prefix['Authorization'] = 'token'
160
+ end
161
+
162
+ api_instance = Phrase::ProjectNotesApi.new
163
+ project_id = 'project_id_example' # String | Project ID
164
+ project_note_update_parameters = Phrase::ProjectNoteUpdateParameters.new({body: '## Project context
165
+
166
+ This project contains all marketing strings.'}) # ProjectNoteUpdateParameters |
167
+ opts = {
168
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
169
+ branch: 'my-feature-branch' # String | Branch to use
170
+ }
171
+
172
+ begin
173
+ #Create or update a project note
174
+ result = api_instance.project_note_update(project_id, project_note_update_parameters, opts)
175
+ pp result
176
+ rescue Phrase::ApiError => e
177
+ puts "Exception when calling ProjectNotesApi->project_note_update: #{e}"
178
+ end
179
+ ```
180
+
181
+ ### Parameters
182
+
183
+
184
+ Name | Type | Description | Notes
185
+ ------------- | ------------- | ------------- | -------------
186
+ **project_id** | **String**| Project ID |
187
+ **project_note_update_parameters** | [**ProjectNoteUpdateParameters**](ProjectNoteUpdateParameters.md)| |
188
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
189
+ **branch** | **String**| Branch to use | [optional]
190
+
191
+ ### Return type
192
+
193
+ Response<([**Note**](Note.md))>
194
+
195
+ ### Authorization
196
+
197
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
198
+
199
+ ### HTTP request headers
200
+
201
+ - **Content-Type**: application/json
202
+ - **Accept**: application/json
203
+
@@ -0,0 +1,223 @@
1
+ require 'cgi'
2
+
3
+ module Phrase
4
+ class ProjectNotesApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = ApiClient.default)
8
+ @api_client = api_client
9
+ end
10
+ # Delete a project note
11
+ # Deletes the note associated with a project. This operation is idempotent — it succeeds silently even when no note exists. The note is resolved against the main project — branch projects delete the main project's note. Requires manage permissions on the project and the `write` OAuth scope.
12
+ # @param project_id [String] Project ID
13
+ # @param [Hash] opts the optional parameters
14
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
15
+ # @option opts [String] :branch Branch to use
16
+ # @return [nil]
17
+ def project_note_destroy(project_id, opts = {})
18
+ data, _status_code, _headers = project_note_destroy_with_http_info(project_id, opts)
19
+ data
20
+ end
21
+
22
+ # Delete a project note
23
+ # Deletes the note associated with a project. This operation is idempotent — it succeeds silently even when no note exists. The note is resolved against the main project — branch projects delete the main project&#39;s note. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
24
+ # @param project_id [String] Project ID
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
27
+ # @option opts [String] :branch Branch to use
28
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
29
+ def project_note_destroy_with_http_info(project_id, opts = {})
30
+ if @api_client.config.debugging
31
+ @api_client.config.logger.debug 'Calling API: ProjectNotesApi.project_note_destroy ...'
32
+ end
33
+ # verify the required parameter 'project_id' is set
34
+ if @api_client.config.client_side_validation && project_id.nil?
35
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectNotesApi.project_note_destroy"
36
+ end
37
+ # resource path
38
+ local_var_path = '/projects/{project_id}/note'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
43
+
44
+ # header parameters
45
+ header_params = opts[:header_params] || {}
46
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:body]
53
+
54
+ # return_type
55
+ return_type = opts[:return_type]
56
+
57
+ # auth_names
58
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
59
+
60
+ new_options = opts.merge(
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type
67
+ )
68
+
69
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: ProjectNotesApi#project_note_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ response = ::Phrase::Response.new(data, headers)
74
+ return response, status_code, headers
75
+ end
76
+
77
+ # Get a project note
78
+ # Returns the Markdown-formatted note attached to a project. The note is resolved against the main project — branch projects return the main project's note. Returns 404 when no note has been created yet. Requires the `read` OAuth scope.
79
+ # @param project_id [String] Project ID
80
+ # @param [Hash] opts the optional parameters
81
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
82
+ # @option opts [String] :branch Branch to use
83
+ # @return [Note]
84
+ def project_note_show(project_id, opts = {})
85
+ data, _status_code, _headers = project_note_show_with_http_info(project_id, opts)
86
+ data
87
+ end
88
+
89
+ # Get a project note
90
+ # Returns the Markdown-formatted note attached to a project. The note is resolved against the main project — branch projects return the main project&#39;s note. Returns 404 when no note has been created yet. Requires the &#x60;read&#x60; OAuth scope.
91
+ # @param project_id [String] Project ID
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
94
+ # @option opts [String] :branch Branch to use
95
+ # @return [Array<(Response<(Note)>, Integer, Hash)>] Response<(Note)> data, response status code and response headers
96
+ def project_note_show_with_http_info(project_id, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: ProjectNotesApi.project_note_show ...'
99
+ end
100
+ # verify the required parameter 'project_id' is set
101
+ if @api_client.config.client_side_validation && project_id.nil?
102
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectNotesApi.project_note_show"
103
+ end
104
+ # resource path
105
+ local_var_path = '/projects/{project_id}/note'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
110
+
111
+ # header parameters
112
+ header_params = opts[:header_params] || {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
115
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:body]
122
+
123
+ # return_type
124
+ return_type = opts[:return_type] || 'Note'
125
+
126
+ # auth_names
127
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
128
+
129
+ new_options = opts.merge(
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => return_type
136
+ )
137
+
138
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
139
+ if @api_client.config.debugging
140
+ @api_client.config.logger.debug "API called: ProjectNotesApi#project_note_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
+ end
142
+ response = ::Phrase::Response.new(data, headers)
143
+ return response, status_code, headers
144
+ end
145
+
146
+ # Create or update a project note
147
+ # Creates or updates the Markdown-formatted note for a project. If a note already exists it is updated in place; otherwise a new note is created. The note is stored on the main project — branch projects write to the main project's note. `body` is required. Requires manage permissions on the project and the `write` OAuth scope.
148
+ # @param project_id [String] Project ID
149
+ # @param project_note_update_parameters [ProjectNoteUpdateParameters]
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
152
+ # @option opts [String] :branch Branch to use
153
+ # @return [Note]
154
+ def project_note_update(project_id, project_note_update_parameters, opts = {})
155
+ data, _status_code, _headers = project_note_update_with_http_info(project_id, project_note_update_parameters, opts)
156
+ data
157
+ end
158
+
159
+ # Create or update a project note
160
+ # Creates or updates the Markdown-formatted note for a project. If a note already exists it is updated in place; otherwise a new note is created. The note is stored on the main project — branch projects write to the main project&#39;s note. &#x60;body&#x60; is required. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
161
+ # @param project_id [String] Project ID
162
+ # @param project_note_update_parameters [ProjectNoteUpdateParameters]
163
+ # @param [Hash] opts the optional parameters
164
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
165
+ # @option opts [String] :branch Branch to use
166
+ # @return [Array<(Response<(Note)>, Integer, Hash)>] Response<(Note)> data, response status code and response headers
167
+ def project_note_update_with_http_info(project_id, project_note_update_parameters, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: ProjectNotesApi.project_note_update ...'
170
+ end
171
+ # verify the required parameter 'project_id' is set
172
+ if @api_client.config.client_side_validation && project_id.nil?
173
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling ProjectNotesApi.project_note_update"
174
+ end
175
+ # verify the required parameter 'project_note_update_parameters' is set
176
+ if @api_client.config.client_side_validation && project_note_update_parameters.nil?
177
+ fail ArgumentError, "Missing the required parameter 'project_note_update_parameters' when calling ProjectNotesApi.project_note_update"
178
+ end
179
+ # resource path
180
+ local_var_path = '/projects/{project_id}/note'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ # HTTP header 'Accept' (if needed)
189
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
+ # HTTP header 'Content-Type'
191
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
192
+ header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body] || @api_client.object_to_http_body(project_note_update_parameters)
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'Note'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || ['Basic', 'Token']
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: ProjectNotesApi#project_note_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ response = ::Phrase::Response.new(data, headers)
220
+ return response, status_code, headers
221
+ end
222
+ end
223
+ end
@@ -0,0 +1,225 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class Note
5
+ # Unique code identifying the note.
6
+ attr_accessor :id
7
+
8
+ # Markdown-formatted content of the note (max 65,535 characters).
9
+ attr_accessor :body
10
+
11
+ attr_accessor :created_at
12
+
13
+ attr_accessor :updated_at
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ :'id' => :'id',
19
+ :'body' => :'body',
20
+ :'created_at' => :'created_at',
21
+ :'updated_at' => :'updated_at'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'id' => :'String',
29
+ :'body' => :'String',
30
+ :'created_at' => :'DateTime',
31
+ :'updated_at' => :'DateTime'
32
+ }
33
+ end
34
+
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::Note` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::Note`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'id')
57
+ self.id = attributes[:'id']
58
+ end
59
+
60
+ if attributes.key?(:'body')
61
+ self.body = attributes[:'body']
62
+ end
63
+
64
+ if attributes.key?(:'created_at')
65
+ self.created_at = attributes[:'created_at']
66
+ end
67
+
68
+ if attributes.key?(:'updated_at')
69
+ self.updated_at = attributes[:'updated_at']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ body == o.body &&
93
+ created_at == o.created_at &&
94
+ updated_at == o.updated_at
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [id, body, created_at, updated_at].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :Time
147
+ Time.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ Phrase.const_get(type).build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.openapi_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+ end
225
+ end
@@ -70,6 +70,8 @@ module Phrase
70
70
 
71
71
  attr_accessor :branch
72
72
 
73
+ attr_accessor :note
74
+
73
75
  class EnumAttributeValidator
74
76
  attr_reader :datatype
75
77
  attr_reader :allowable_values
@@ -128,7 +130,8 @@ module Phrase
128
130
  :'translation_keys_sort_collation' => :'translation_keys_sort_collation',
129
131
  :'job_locking_enabled' => :'job_locking_enabled',
130
132
  :'placeholder_styles' => :'placeholder_styles',
131
- :'branch' => :'branch'
133
+ :'branch' => :'branch',
134
+ :'note' => :'note'
132
135
  }
133
136
  end
134
137
 
@@ -168,7 +171,8 @@ module Phrase
168
171
  :'translation_keys_sort_collation' => :'String',
169
172
  :'job_locking_enabled' => :'Boolean',
170
173
  :'placeholder_styles' => :'Array<String>',
171
- :'branch' => :'Branch'
174
+ :'branch' => :'Branch',
175
+ :'note' => :'Note'
172
176
  }
173
177
  end
174
178
 
@@ -337,6 +341,10 @@ module Phrase
337
341
  if attributes.key?(:'branch')
338
342
  self.branch = attributes[:'branch']
339
343
  end
344
+
345
+ if attributes.key?(:'note')
346
+ self.note = attributes[:'note']
347
+ end
340
348
  end
341
349
 
342
350
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -402,7 +410,8 @@ module Phrase
402
410
  translation_keys_sort_collation == o.translation_keys_sort_collation &&
403
411
  job_locking_enabled == o.job_locking_enabled &&
404
412
  placeholder_styles == o.placeholder_styles &&
405
- branch == o.branch
413
+ branch == o.branch &&
414
+ note == o.note
406
415
  end
407
416
 
408
417
  # @see the `==` method
@@ -414,7 +423,7 @@ module Phrase
414
423
  # Calculates hash code according to all attributes.
415
424
  # @return [Integer] Hash code
416
425
  def hash
417
- [id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, translation_keys_sort_collation, job_locking_enabled, placeholder_styles, branch].hash
426
+ [id, name, slug, main_format, project_image_url, media, account, space, point_of_contact, created_at, updated_at, shares_translation_memory, machine_translation_enabled, zero_plural_form_enabled, enable_all_data_type_translation_keys_for_translators, enable_icu_message_format, enable_branching, protect_master_branch, autotranslate_enabled, autotranslate_check_new_translation_keys, autotranslate_check_new_uploads, autotranslate_check_new_locales, autotranslate_mark_as_unverified, autotranslate_use_machine_translation, autotranslate_use_translation_memory, autotranslate_overwrite_unverified_translations, fallback_for_unverified_translations, autocomplete_job_enabled, default_encoding, cldr_version, translation_keys_sort_collation, job_locking_enabled, placeholder_styles, branch, note].hash
418
427
  end
419
428
 
420
429
  # Builds the object from hash
@@ -0,0 +1,202 @@
1
+ require 'date'
2
+
3
+ module Phrase
4
+ class ProjectNoteUpdateParameters
5
+ # Markdown content for the project note (max 65,535 characters).
6
+ attr_accessor :body
7
+
8
+ # Attribute mapping from ruby-style variable name to JSON key.
9
+ def self.attribute_map
10
+ {
11
+ :'body' => :'body'
12
+ }
13
+ end
14
+
15
+ # Attribute type mapping.
16
+ def self.openapi_types
17
+ {
18
+ :'body' => :'String'
19
+ }
20
+ end
21
+
22
+ # List of attributes with nullable: true
23
+ def self.openapi_nullable
24
+ Set.new([
25
+ ])
26
+ end
27
+
28
+ # Initializes the object
29
+ # @param [Hash] attributes Model attributes in the form of hash
30
+ def initialize(attributes = {})
31
+ if (!attributes.is_a?(Hash))
32
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Phrase::ProjectNoteUpdateParameters` initialize method"
33
+ end
34
+
35
+ # check to see if the attribute exists and convert string to symbol for hash key
36
+ attributes = attributes.each_with_object({}) { |(k, v), h|
37
+ if (!self.class.attribute_map.key?(k.to_sym))
38
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Phrase::ProjectNoteUpdateParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
39
+ end
40
+ h[k.to_sym] = v
41
+ }
42
+
43
+ if attributes.key?(:'body')
44
+ self.body = attributes[:'body']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ if @body.nil?
53
+ invalid_properties.push('invalid value for "body", body cannot be nil.')
54
+ end
55
+
56
+ invalid_properties
57
+ end
58
+
59
+ # Check to see if the all the properties in the model are valid
60
+ # @return true if the model is valid
61
+ def valid?
62
+ return false if @body.nil?
63
+ true
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param [Object] Object to be compared
68
+ def ==(o)
69
+ return true if self.equal?(o)
70
+ self.class == o.class &&
71
+ body == o.body
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [body].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def self.build_from_hash(attributes)
90
+ new.build_from_hash(attributes)
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ self.class.openapi_types.each_pair do |key, type|
99
+ if type =~ /\AArray<(.*)>/i
100
+ # check to ensure the input is an array given that the attribute
101
+ # is documented as an array but the input is not
102
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
103
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
104
+ end
105
+ elsif !attributes[self.class.attribute_map[key]].nil?
106
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
107
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+
113
+ # Deserializes the data based on type
114
+ # @param string type Data type
115
+ # @param string value Value to be deserialized
116
+ # @return [Object] Deserialized data
117
+ def _deserialize(type, value)
118
+ case type.to_sym
119
+ when :DateTime
120
+ DateTime.parse(value)
121
+ when :Date
122
+ Date.parse(value)
123
+ when :Time
124
+ Time.parse(value)
125
+ when :String
126
+ value.to_s
127
+ when :Integer
128
+ value.to_i
129
+ when :Float
130
+ value.to_f
131
+ when :Boolean
132
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
133
+ true
134
+ else
135
+ false
136
+ end
137
+ when :Object
138
+ # generic object (usually a Hash), return directly
139
+ value
140
+ when /\AArray<(?<inner_type>.+)>\z/
141
+ inner_type = Regexp.last_match[:inner_type]
142
+ value.map { |v| _deserialize(inner_type, v) }
143
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
144
+ k_type = Regexp.last_match[:k_type]
145
+ v_type = Regexp.last_match[:v_type]
146
+ {}.tap do |hash|
147
+ value.each do |k, v|
148
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
149
+ end
150
+ end
151
+ else # model
152
+ Phrase.const_get(type).build_from_hash(value)
153
+ end
154
+ end
155
+
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
158
+ def to_s
159
+ to_hash.to_s
160
+ end
161
+
162
+ # to_body is an alias to to_hash (backward compatibility)
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_body
165
+ to_hash
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ if value.nil?
175
+ is_nullable = self.class.openapi_nullable.include?(attr)
176
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
177
+ end
178
+
179
+ hash[param] = _to_hash(value)
180
+ end
181
+ hash
182
+ end
183
+
184
+ # Outputs non-array value in the form of hash
185
+ # For object, use to_hash. Otherwise, just return the value
186
+ # @param [Object] value Any valid value
187
+ # @return [Hash] Returns the value in the form of hash
188
+ def _to_hash(value)
189
+ if value.is_a?(Array)
190
+ value.compact.map { |v| _to_hash(v) }
191
+ elsif value.is_a?(Hash)
192
+ {}.tap do |hash|
193
+ value.each { |k, v| hash[k] = _to_hash(v) }
194
+ end
195
+ elsif value.respond_to? :to_hash
196
+ value.to_hash
197
+ else
198
+ value
199
+ end
200
+ end
201
+ end
202
+ end
@@ -1,3 +1,3 @@
1
1
  module Phrase
2
- VERSION = '4.35.0'
2
+ VERSION = '4.36.0'
3
3
  end
data/lib/phrase.rb CHANGED
@@ -144,6 +144,7 @@ require 'phrase/models/member_project_detail_project_roles_inner'
144
144
  require 'phrase/models/member_spaces_inner'
145
145
  require 'phrase/models/member_update_parameters'
146
146
  require 'phrase/models/member_update_settings_parameters'
147
+ require 'phrase/models/note'
147
148
  require 'phrase/models/notification'
148
149
  require 'phrase/models/notification_group'
149
150
  require 'phrase/models/notification_group_detail'
@@ -162,6 +163,7 @@ require 'phrase/models/project_create_parameters'
162
163
  require 'phrase/models/project_details'
163
164
  require 'phrase/models/project_locales'
164
165
  require 'phrase/models/project_member'
166
+ require 'phrase/models/project_note_update_parameters'
165
167
  require 'phrase/models/project_report'
166
168
  require 'phrase/models/project_short'
167
169
  require 'phrase/models/project_update_parameters'
@@ -300,6 +302,7 @@ require 'phrase/api/orders_api'
300
302
  require 'phrase/api/organization_job_template_locales_api'
301
303
  require 'phrase/api/organization_job_templates_api'
302
304
  require 'phrase/api/pre_translations_api'
305
+ require 'phrase/api/project_notes_api'
303
306
  require 'phrase/api/projects_api'
304
307
  require 'phrase/api/quality_performance_score_api'
305
308
  require 'phrase/api/release_triggers_api'
@@ -0,0 +1,66 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+
4
+ # Unit tests for Phrase::ProjectNotesApi
5
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
6
+ # Please update as you see appropriate
7
+ describe 'ProjectNotesApi' do
8
+ before do
9
+ # run before each test
10
+ @api_instance = Phrase::ProjectNotesApi.new
11
+ end
12
+
13
+ after do
14
+ # run after each test
15
+ end
16
+
17
+ describe 'test an instance of ProjectNotesApi' do
18
+ it 'should create an instance of ProjectNotesApi' do
19
+ expect(@api_instance).to be_instance_of(Phrase::ProjectNotesApi)
20
+ end
21
+ end
22
+
23
+ # unit tests for project_note_destroy
24
+ # Delete a project note
25
+ # Deletes the note associated with a project. This operation is idempotent — it succeeds silently even when no note exists. The note is resolved against the main project — branch projects delete the main project&#39;s note. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
26
+ # @param project_id Project ID
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
29
+ # @option opts [String] :branch Branch to use
30
+ # @return [nil]
31
+ describe 'project_note_destroy test' do
32
+ it 'should work' do
33
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
34
+ end
35
+ end
36
+
37
+ # unit tests for project_note_show
38
+ # Get a project note
39
+ # Returns the Markdown-formatted note attached to a project. The note is resolved against the main project — branch projects return the main project&#39;s note. Returns 404 when no note has been created yet. Requires the &#x60;read&#x60; OAuth scope.
40
+ # @param project_id Project ID
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
43
+ # @option opts [String] :branch Branch to use
44
+ # @return [Note]
45
+ describe 'project_note_show 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
+
51
+ # unit tests for project_note_update
52
+ # Create or update a project note
53
+ # Creates or updates the Markdown-formatted note for a project. If a note already exists it is updated in place; otherwise a new note is created. The note is stored on the main project — branch projects write to the main project&#39;s note. &#x60;body&#x60; is required. Requires manage permissions on the project and the &#x60;write&#x60; OAuth scope.
54
+ # @param project_id Project ID
55
+ # @param project_note_update_parameters
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
58
+ # @option opts [String] :branch Branch to use
59
+ # @return [Note]
60
+ describe 'project_note_update 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
+
66
+ end
@@ -0,0 +1,47 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::Note
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'Note' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::Note.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of Note' do
19
+ it 'should create an instance of Note' do
20
+ expect(@instance).to be_instance_of(Phrase::Note)
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 "body"' 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 "created_at"' 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 "updated_at"' 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
+ end
@@ -228,4 +228,10 @@ describe 'ProjectDetails' do
228
228
  end
229
229
  end
230
230
 
231
+ describe 'test attribute "note"' do
232
+ it 'should work' do
233
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
234
+ end
235
+ end
236
+
231
237
  end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'date'
4
+
5
+ # Unit tests for Phrase::ProjectNoteUpdateParameters
6
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
7
+ # Please update as you see appropriate
8
+ describe 'ProjectNoteUpdateParameters' do
9
+ before do
10
+ # run before each test
11
+ @instance = Phrase::ProjectNoteUpdateParameters.new
12
+ end
13
+
14
+ after do
15
+ # run after each test
16
+ end
17
+
18
+ describe 'test an instance of ProjectNoteUpdateParameters' do
19
+ it 'should create an instance of ProjectNoteUpdateParameters' do
20
+ expect(@instance).to be_instance_of(Phrase::ProjectNoteUpdateParameters)
21
+ end
22
+ end
23
+ describe 'test attribute "body"' 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
+ 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.35.0
4
+ version: 4.36.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-11-23 00:00:00.000000000 Z
11
+ date: 2026-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -248,6 +248,7 @@ files:
248
248
  - docs/MemberUpdateParameters.md
249
249
  - docs/MemberUpdateSettingsParameters.md
250
250
  - docs/MembersApi.md
251
+ - docs/Note.md
251
252
  - docs/Notification.md
252
253
  - docs/NotificationGroup.md
253
254
  - docs/NotificationGroupDetail.md
@@ -272,6 +273,8 @@ files:
272
273
  - docs/ProjectDetails.md
273
274
  - docs/ProjectLocales.md
274
275
  - docs/ProjectMember.md
276
+ - docs/ProjectNoteUpdateParameters.md
277
+ - docs/ProjectNotesApi.md
275
278
  - docs/ProjectReport.md
276
279
  - docs/ProjectShort.md
277
280
  - docs/ProjectUpdateParameters.md
@@ -433,6 +436,7 @@ files:
433
436
  - lib/phrase/api/organization_job_template_locales_api.rb
434
437
  - lib/phrase/api/organization_job_templates_api.rb
435
438
  - lib/phrase/api/pre_translations_api.rb
439
+ - lib/phrase/api/project_notes_api.rb
436
440
  - lib/phrase/api/projects_api.rb
437
441
  - lib/phrase/api/quality_performance_score_api.rb
438
442
  - lib/phrase/api/release_triggers_api.rb
@@ -595,6 +599,7 @@ files:
595
599
  - lib/phrase/models/member_spaces_inner.rb
596
600
  - lib/phrase/models/member_update_parameters.rb
597
601
  - lib/phrase/models/member_update_settings_parameters.rb
602
+ - lib/phrase/models/note.rb
598
603
  - lib/phrase/models/notification.rb
599
604
  - lib/phrase/models/notification_group.rb
600
605
  - lib/phrase/models/notification_group_detail.rb
@@ -613,6 +618,7 @@ files:
613
618
  - lib/phrase/models/project_details.rb
614
619
  - lib/phrase/models/project_locales.rb
615
620
  - lib/phrase/models/project_member.rb
621
+ - lib/phrase/models/project_note_update_parameters.rb
616
622
  - lib/phrase/models/project_report.rb
617
623
  - lib/phrase/models/project_short.rb
618
624
  - lib/phrase/models/project_update_parameters.rb
@@ -752,6 +758,7 @@ files:
752
758
  - spec/api/organization_job_template_locales_api_spec.rb
753
759
  - spec/api/organization_job_templates_api_spec.rb
754
760
  - spec/api/pre_translations_api_spec.rb
761
+ - spec/api/project_notes_api_spec.rb
755
762
  - spec/api/projects_api_spec.rb
756
763
  - spec/api/quality_performance_score_api_spec.rb
757
764
  - spec/api/release_triggers_api_spec.rb
@@ -913,6 +920,7 @@ files:
913
920
  - spec/models/member_spec.rb
914
921
  - spec/models/member_update_parameters_spec.rb
915
922
  - spec/models/member_update_settings_parameters_spec.rb
923
+ - spec/models/note_spec.rb
916
924
  - spec/models/notification_group_detail_spec.rb
917
925
  - spec/models/notification_group_spec.rb
918
926
  - spec/models/notification_spec.rb
@@ -930,6 +938,7 @@ files:
930
938
  - spec/models/project_details_spec.rb
931
939
  - spec/models/project_locales_spec.rb
932
940
  - spec/models/project_member_spec.rb
941
+ - spec/models/project_note_update_parameters_spec.rb
933
942
  - spec/models/project_report_spec.rb
934
943
  - spec/models/project_short_spec.rb
935
944
  - spec/models/project_spec.rb
@@ -1118,6 +1127,7 @@ test_files:
1118
1127
  - spec/api/users_api_spec.rb
1119
1128
  - spec/api/machine_translation_api_spec.rb
1120
1129
  - spec/api/automation_events_api_spec.rb
1130
+ - spec/api/project_notes_api_spec.rb
1121
1131
  - spec/api/jobs_api_spec.rb
1122
1132
  - spec/api/tags_api_spec.rb
1123
1133
  - spec/api/job_template_locales_api_spec.rb
@@ -1188,6 +1198,7 @@ test_files:
1188
1198
  - spec/models/translations_review_parameters_spec.rb
1189
1199
  - spec/models/distribution_details_spec.rb
1190
1200
  - spec/models/screenshot_spec.rb
1201
+ - spec/models/project_note_update_parameters_spec.rb
1191
1202
  - spec/models/automations_create_parameters_spec.rb
1192
1203
  - spec/models/space_update_parameters_spec.rb
1193
1204
  - spec/models/teams_projects_create_parameters_spec.rb
@@ -1304,6 +1315,7 @@ test_files:
1304
1315
  - spec/models/locale_user_preview_spec.rb
1305
1316
  - spec/models/icu_skeleton_error_spec.rb
1306
1317
  - spec/models/glossary_term_translation_spec.rb
1318
+ - spec/models/note_spec.rb
1307
1319
  - spec/models/team_detail_spec.rb
1308
1320
  - spec/models/tag_with_stats1_statistics1_spec.rb
1309
1321
  - spec/models/translations_unreview_parameters_spec.rb