phrase 4.34.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +14 -3
- data/docs/Note.md +25 -0
- data/docs/ProjectDetails.md +3 -1
- data/docs/ProjectNoteUpdateParameters.md +19 -0
- data/docs/ProjectNotesApi.md +203 -0
- data/docs/RepoSync.md +7 -1
- data/docs/RepoSyncCreateParameters.md +7 -1
- data/docs/RepoSyncCreateParametersExportSchedule.md +27 -0
- data/docs/RepoSyncExportSchedule.md +23 -0
- data/docs/RepoSyncUpdateParameters.md +23 -0
- data/docs/RepoSyncUpdateParametersExportSchedule.md +27 -0
- data/docs/RepoSyncsApi.md +66 -0
- data/docs/UserShort.md +23 -0
- data/lib/phrase/api/project_notes_api.rb +223 -0
- data/lib/phrase/api/repo_syncs_api.rb +80 -0
- data/lib/phrase/models/note.rb +225 -0
- data/lib/phrase/models/project_details.rb +13 -4
- data/lib/phrase/models/project_note_update_parameters.rb +202 -0
- data/lib/phrase/models/repo_sync.rb +58 -5
- data/lib/phrase/models/repo_sync_create_parameters.rb +35 -4
- data/lib/phrase/models/repo_sync_create_parameters_export_schedule.rb +281 -0
- data/lib/phrase/models/repo_sync_export_schedule.rb +263 -0
- data/lib/phrase/models/repo_sync_update_parameters.rb +250 -0
- data/lib/phrase/models/repo_sync_update_parameters_export_schedule.rb +276 -0
- data/lib/phrase/models/user_short.rb +223 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +8 -0
- data/spec/api/project_notes_api_spec.rb +66 -0
- data/spec/api/repo_syncs_api_spec.rb +15 -0
- data/spec/models/note_spec.rb +47 -0
- data/spec/models/project_details_spec.rb +6 -0
- data/spec/models/project_note_update_parameters_spec.rb +29 -0
- data/spec/models/repo_sync_create_parameters_export_schedule_spec.rb +63 -0
- data/spec/models/repo_sync_create_parameters_spec.rb +22 -0
- data/spec/models/repo_sync_export_schedule_spec.rb +51 -0
- data/spec/models/repo_sync_spec.rb +22 -0
- data/spec/models/repo_sync_update_parameters_export_schedule_spec.rb +63 -0
- data/spec/models/repo_sync_update_parameters_spec.rb +51 -0
- data/spec/models/user_short_spec.rb +47 -0
- metadata +300 -268
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6cfbcee2c50f1b3b24722b9bc81d7b9d099cece2e59a8ebcb7b27234149bf54f
|
|
4
|
+
data.tar.gz: 3207ee3809fcfd4dfa79df1043eec85d55e63d0e7bcbd91a3d2e3e7df9567709
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e45215ca5428772beb9fb87eafdd23c0417dea275ab8e6c1cbc6579f05c24fd01a3e5cf63007938e6c1accff278d750596249d42646533d8b89ee65ea919a9c1
|
|
7
|
+
data.tar.gz: 9e2932e45f5ca32328a2dc35883a7b92171f744831e1fe7f627c4a0ddef2511d33a0d4503d3155837f0ced2350c29f40600ccf0168aec4aedaae47a08d2c7d2a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
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
|
+
|
|
10
|
+
## [4.35.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.34.0...ruby-v4.35.0) (2026-11-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **API:** add owner, export_triggers, and export_schedule to repo sync responses and request bodies #STRINGS-4401 ([#1370](https://github.com/phrase/strings-openapi/issues/1370)) ([8889946](https://github.com/phrase/strings-openapi/commit/8889946d3608a53b436e8c0e7dd8b5765687e916))
|
|
16
|
+
|
|
3
17
|
## [4.34.0](https://github.com/phrase/strings-openapi/compare/ruby-v4.33.0...ruby-v4.34.0) (2026-11-05)
|
|
4
18
|
|
|
5
19
|
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
|
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 4.
|
|
10
|
+
- Package version: 4.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.
|
|
59
|
+
gem install ./phrase-4.36.0.gem
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
(for development, run `gem install --dev ./phrase-4.
|
|
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
|
|
@@ -349,6 +352,7 @@ Class | Method | HTTP request | Description
|
|
|
349
352
|
*Phrase::RepoSyncsApi* | [**repo_sync_import**](docs/RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{id}/import | Import from code repository
|
|
350
353
|
*Phrase::RepoSyncsApi* | [**repo_sync_list**](docs/RepoSyncsApi.md#repo_sync_list) | **GET** /accounts/{account_id}/repo_syncs | Get Repo Syncs
|
|
351
354
|
*Phrase::RepoSyncsApi* | [**repo_sync_show**](docs/RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{id} | Get a single Repo Sync
|
|
355
|
+
*Phrase::RepoSyncsApi* | [**repo_sync_update**](docs/RepoSyncsApi.md#repo_sync_update) | **PATCH** /accounts/{account_id}/repo_syncs/{id} | Update a repo sync
|
|
352
356
|
*Phrase::ReportsApi* | [**report_locales_list**](docs/ReportsApi.md#report_locales_list) | **GET** /projects/{project_id}/report/locales | List Locale Reports (word count, character count, translation statistics)
|
|
353
357
|
*Phrase::ReportsApi* | [**report_show**](docs/ReportsApi.md#report_show) | **GET** /projects/{project_id}/report | Get Project Report
|
|
354
358
|
*Phrase::ScreenshotMarkersApi* | [**screenshot_marker_create**](docs/ScreenshotMarkersApi.md#screenshot_marker_create) | **POST** /projects/{project_id}/screenshots/{screenshot_id}/markers | Create a screenshot marker
|
|
@@ -571,6 +575,7 @@ Class | Method | HTTP request | Description
|
|
|
571
575
|
- [Phrase::MemberSpacesInner](docs/MemberSpacesInner.md)
|
|
572
576
|
- [Phrase::MemberUpdateParameters](docs/MemberUpdateParameters.md)
|
|
573
577
|
- [Phrase::MemberUpdateSettingsParameters](docs/MemberUpdateSettingsParameters.md)
|
|
578
|
+
- [Phrase::Note](docs/Note.md)
|
|
574
579
|
- [Phrase::Notification](docs/Notification.md)
|
|
575
580
|
- [Phrase::NotificationGroup](docs/NotificationGroup.md)
|
|
576
581
|
- [Phrase::NotificationGroupDetail](docs/NotificationGroupDetail.md)
|
|
@@ -589,6 +594,7 @@ Class | Method | HTTP request | Description
|
|
|
589
594
|
- [Phrase::ProjectDetails](docs/ProjectDetails.md)
|
|
590
595
|
- [Phrase::ProjectLocales](docs/ProjectLocales.md)
|
|
591
596
|
- [Phrase::ProjectMember](docs/ProjectMember.md)
|
|
597
|
+
- [Phrase::ProjectNoteUpdateParameters](docs/ProjectNoteUpdateParameters.md)
|
|
592
598
|
- [Phrase::ProjectReport](docs/ProjectReport.md)
|
|
593
599
|
- [Phrase::ProjectShort](docs/ProjectShort.md)
|
|
594
600
|
- [Phrase::ProjectUpdateParameters](docs/ProjectUpdateParameters.md)
|
|
@@ -607,10 +613,14 @@ Class | Method | HTTP request | Description
|
|
|
607
613
|
- [Phrase::ReleaseUpdateParameters1](docs/ReleaseUpdateParameters1.md)
|
|
608
614
|
- [Phrase::RepoSync](docs/RepoSync.md)
|
|
609
615
|
- [Phrase::RepoSyncCreateParameters](docs/RepoSyncCreateParameters.md)
|
|
616
|
+
- [Phrase::RepoSyncCreateParametersExportSchedule](docs/RepoSyncCreateParametersExportSchedule.md)
|
|
610
617
|
- [Phrase::RepoSyncEvent](docs/RepoSyncEvent.md)
|
|
611
618
|
- [Phrase::RepoSyncEventUploadsInner](docs/RepoSyncEventUploadsInner.md)
|
|
612
619
|
- [Phrase::RepoSyncExportParameters](docs/RepoSyncExportParameters.md)
|
|
620
|
+
- [Phrase::RepoSyncExportSchedule](docs/RepoSyncExportSchedule.md)
|
|
613
621
|
- [Phrase::RepoSyncImportParameters](docs/RepoSyncImportParameters.md)
|
|
622
|
+
- [Phrase::RepoSyncUpdateParameters](docs/RepoSyncUpdateParameters.md)
|
|
623
|
+
- [Phrase::RepoSyncUpdateParametersExportSchedule](docs/RepoSyncUpdateParametersExportSchedule.md)
|
|
614
624
|
- [Phrase::Screenshot](docs/Screenshot.md)
|
|
615
625
|
- [Phrase::ScreenshotMarker](docs/ScreenshotMarker.md)
|
|
616
626
|
- [Phrase::ScreenshotMarkerCreateParameters](docs/ScreenshotMarkerCreateParameters.md)
|
|
@@ -673,6 +683,7 @@ Class | Method | HTTP request | Description
|
|
|
673
683
|
- [Phrase::UploadSummary](docs/UploadSummary.md)
|
|
674
684
|
- [Phrase::User](docs/User.md)
|
|
675
685
|
- [Phrase::UserPreview](docs/UserPreview.md)
|
|
686
|
+
- [Phrase::UserShort](docs/UserShort.md)
|
|
676
687
|
- [Phrase::Variable](docs/Variable.md)
|
|
677
688
|
- [Phrase::VariableCreateParameters](docs/VariableCreateParameters.md)
|
|
678
689
|
- [Phrase::VariableUpdateParameters](docs/VariableUpdateParameters.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
|
+
|
data/docs/ProjectDetails.md
CHANGED
|
@@ -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
|
+
|
data/docs/RepoSync.md
CHANGED
|
@@ -15,6 +15,9 @@ Name | Type | Description | Notes
|
|
|
15
15
|
**created_at** | **Time** | | [optional]
|
|
16
16
|
**last_import_at** | **Time** | | [optional]
|
|
17
17
|
**last_export_at** | **Time** | | [optional]
|
|
18
|
+
**owner** | [**UserShort**](UserShort.md) | | [optional]
|
|
19
|
+
**export_triggers** | **Array<String>** | Events that trigger an automatic export. Only present when the automatic export feature is enabled for the account. Possible values: `schedule` (runs on the configured schedule), `branch_merged` (runs when a branch is merged in the connected repository), `job_completed` (runs when a translation job completes in the project). | [optional]
|
|
20
|
+
**export_schedule** | [**RepoSyncExportSchedule**](RepoSyncExportSchedule.md) | | [optional]
|
|
18
21
|
|
|
19
22
|
## Code Sample
|
|
20
23
|
|
|
@@ -31,7 +34,10 @@ instance = Phrase::RepoSync.new(id: nil,
|
|
|
31
34
|
pr_branch: nil,
|
|
32
35
|
created_at: nil,
|
|
33
36
|
last_import_at: nil,
|
|
34
|
-
last_export_at: nil
|
|
37
|
+
last_export_at: nil,
|
|
38
|
+
owner: nil,
|
|
39
|
+
export_triggers: nil,
|
|
40
|
+
export_schedule: nil)
|
|
35
41
|
```
|
|
36
42
|
|
|
37
43
|
|
|
@@ -14,6 +14,9 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**auto_import** | **Boolean** | Enable automatic import of translations triggered by pushes to the repository. | [optional]
|
|
15
15
|
**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]
|
|
16
16
|
**custom_api_endpoint** | **String** | Custom API endpoint URL for self-hosted Git instances. Required when `connection_type` is `self_hosted`. | [optional]
|
|
17
|
+
**owner_id** | **String** | Code of the user who will own this repo sync. Automated actions run as this user. Defaults to the account owner when not set. | [optional]
|
|
18
|
+
**export_triggers** | **Array<String>** | Events that should trigger an automatic export. Requires the automatic export feature to be enabled for the account; returns `422` otherwise. Accepted values: `schedule`, `branch_merged`, `job_completed`. | [optional]
|
|
19
|
+
**export_schedule** | [**RepoSyncCreateParametersExportSchedule**](RepoSyncCreateParametersExportSchedule.md) | | [optional]
|
|
17
20
|
|
|
18
21
|
## Code Sample
|
|
19
22
|
|
|
@@ -29,7 +32,10 @@ instance = Phrase::RepoSyncCreateParameters.new(project_id: 'abcd1234abcd1234abc
|
|
|
29
32
|
pr_branch: 'phrase-translations',
|
|
30
33
|
auto_import: false,
|
|
31
34
|
access_token: 'ghp_xxxxxxxxxxxxxxxxxxxx',
|
|
32
|
-
custom_api_endpoint: 'https://git.example.com/api/v4'
|
|
35
|
+
custom_api_endpoint: 'https://git.example.com/api/v4',
|
|
36
|
+
owner_id: nil,
|
|
37
|
+
export_triggers: nil,
|
|
38
|
+
export_schedule: nil)
|
|
33
39
|
```
|
|
34
40
|
|
|
35
41
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Phrase::RepoSyncCreateParametersExportSchedule
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**frequency** | **String** | | [optional]
|
|
8
|
+
**time** | **String** | Time of day for the export (HH:MM format). Used with `day`, `week`, and `month` frequencies. | [optional]
|
|
9
|
+
**time_zone** | **String** | IANA time zone name. | [optional]
|
|
10
|
+
**days_of_week** | **String** | Comma-separated day numbers (0=Sunday … 6=Saturday). Used with `week` frequency. | [optional]
|
|
11
|
+
**day_of_month** | **Integer** | Day of the month (1–31). Used with `month` frequency. | [optional]
|
|
12
|
+
**cron_schedule** | **String** | Raw cron expression. Used when `frequency` is `cron`. | [optional]
|
|
13
|
+
|
|
14
|
+
## Code Sample
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'phrase'
|
|
18
|
+
|
|
19
|
+
instance = Phrase::RepoSyncCreateParametersExportSchedule.new(frequency: nil,
|
|
20
|
+
time: '09:00',
|
|
21
|
+
time_zone: 'Europe/Berlin',
|
|
22
|
+
days_of_week: '1,3',
|
|
23
|
+
day_of_month: nil,
|
|
24
|
+
cron_schedule: '0 9 * * 1')
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::RepoSyncExportSchedule
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**frequency** | **String** | How often the export runs. `cron` means a fully custom cron expression is used (`cron_schedule` holds the raw expression). | [optional]
|
|
8
|
+
**cron_schedule** | **String** | The underlying cron expression. Derived automatically from `frequency`, `time`, and day fields when using a named frequency; provided verbatim when `frequency` is `cron`. | [optional]
|
|
9
|
+
**time_zone** | **String** | IANA time zone name used to interpret the schedule. | [optional]
|
|
10
|
+
**next_run_at** | **Time** | When the next scheduled export will run, in UTC. | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'phrase'
|
|
16
|
+
|
|
17
|
+
instance = Phrase::RepoSyncExportSchedule.new(frequency: nil,
|
|
18
|
+
cron_schedule: '0 9 * * 1',
|
|
19
|
+
time_zone: 'Europe/Berlin',
|
|
20
|
+
next_run_at: nil)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::RepoSyncUpdateParameters
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | Display name for the repo sync. | [optional]
|
|
8
|
+
**owner_id** | **String** | Code of the user to assign as owner. Requires `manage_github_sync?` permission on the project; returns `403` if not satisfied. | [optional]
|
|
9
|
+
**export_triggers** | **Array<String>** | Replaces the current set of automatic export triggers. Requires `manage_github_sync?` permission on the project and the automatic export feature to be enabled for the account. Accepted values: `schedule`, `branch_merged`, `job_completed`. | [optional]
|
|
10
|
+
**export_schedule** | [**RepoSyncUpdateParametersExportSchedule**](RepoSyncUpdateParametersExportSchedule.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'phrase'
|
|
16
|
+
|
|
17
|
+
instance = Phrase::RepoSyncUpdateParameters.new(name: nil,
|
|
18
|
+
owner_id: nil,
|
|
19
|
+
export_triggers: nil,
|
|
20
|
+
export_schedule: nil)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Phrase::RepoSyncUpdateParametersExportSchedule
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**frequency** | **String** | | [optional]
|
|
8
|
+
**time** | **String** | | [optional]
|
|
9
|
+
**time_zone** | **String** | | [optional]
|
|
10
|
+
**days_of_week** | **String** | | [optional]
|
|
11
|
+
**day_of_month** | **Integer** | | [optional]
|
|
12
|
+
**cron_schedule** | **String** | | [optional]
|
|
13
|
+
|
|
14
|
+
## Code Sample
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'phrase'
|
|
18
|
+
|
|
19
|
+
instance = Phrase::RepoSyncUpdateParametersExportSchedule.new(frequency: nil,
|
|
20
|
+
time: '09:00',
|
|
21
|
+
time_zone: 'Europe/Berlin',
|
|
22
|
+
days_of_week: '1,3',
|
|
23
|
+
day_of_month: nil,
|
|
24
|
+
cron_schedule: '0 9 * * 1')
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
data/docs/RepoSyncsApi.md
CHANGED
|
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
|
11
11
|
[**repo_sync_import**](RepoSyncsApi.md#repo_sync_import) | **POST** /accounts/{account_id}/repo_syncs/{id}/import | Import from code repository
|
|
12
12
|
[**repo_sync_list**](RepoSyncsApi.md#repo_sync_list) | **GET** /accounts/{account_id}/repo_syncs | Get Repo Syncs
|
|
13
13
|
[**repo_sync_show**](RepoSyncsApi.md#repo_sync_show) | **GET** /accounts/{account_id}/repo_syncs/{id} | Get a single Repo Sync
|
|
14
|
+
[**repo_sync_update**](RepoSyncsApi.md#repo_sync_update) | **PATCH** /accounts/{account_id}/repo_syncs/{id} | Update a repo sync
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
@@ -460,3 +461,68 @@ Response<([**RepoSync**](RepoSync.md))>
|
|
|
460
461
|
- **Content-Type**: Not defined
|
|
461
462
|
- **Accept**: application/json
|
|
462
463
|
|
|
464
|
+
|
|
465
|
+
## repo_sync_update
|
|
466
|
+
|
|
467
|
+
> RepoSync repo_sync_update(account_id, id, repo_sync_update_parameters, opts)
|
|
468
|
+
|
|
469
|
+
Update a repo sync
|
|
470
|
+
|
|
471
|
+
Update settings for an existing Repo Sync. Sending `owner_id`, `export_triggers`, or `export_schedule` requires the caller to have `manage_github_sync?` permission on the project (returns `403` otherwise). Sending `export_triggers` or `export_schedule` when the automatic export feature is not enabled for the account returns `422`.
|
|
472
|
+
|
|
473
|
+
### Example
|
|
474
|
+
|
|
475
|
+
```ruby
|
|
476
|
+
# load the gem
|
|
477
|
+
require 'phrase'
|
|
478
|
+
# setup authorization
|
|
479
|
+
Phrase.configure do |config|
|
|
480
|
+
# Configure HTTP basic authorization: Basic
|
|
481
|
+
config.username = 'YOUR USERNAME'
|
|
482
|
+
config.password = 'YOUR PASSWORD'
|
|
483
|
+
|
|
484
|
+
# Configure API key authorization: Token
|
|
485
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
486
|
+
config.api_key_prefix['Authorization'] = 'token'
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
api_instance = Phrase::RepoSyncsApi.new
|
|
490
|
+
account_id = 'account_id_example' # String | Account ID
|
|
491
|
+
id = 'id_example' # String | ID
|
|
492
|
+
repo_sync_update_parameters = Phrase::RepoSyncUpdateParameters.new # RepoSyncUpdateParameters |
|
|
493
|
+
opts = {
|
|
494
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
begin
|
|
498
|
+
#Update a repo sync
|
|
499
|
+
result = api_instance.repo_sync_update(account_id, id, repo_sync_update_parameters, opts)
|
|
500
|
+
pp result
|
|
501
|
+
rescue Phrase::ApiError => e
|
|
502
|
+
puts "Exception when calling RepoSyncsApi->repo_sync_update: #{e}"
|
|
503
|
+
end
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Parameters
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
Name | Type | Description | Notes
|
|
510
|
+
------------- | ------------- | ------------- | -------------
|
|
511
|
+
**account_id** | **String**| Account ID |
|
|
512
|
+
**id** | **String**| ID |
|
|
513
|
+
**repo_sync_update_parameters** | [**RepoSyncUpdateParameters**](RepoSyncUpdateParameters.md)| |
|
|
514
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
|
515
|
+
|
|
516
|
+
### Return type
|
|
517
|
+
|
|
518
|
+
Response<([**RepoSync**](RepoSync.md))>
|
|
519
|
+
|
|
520
|
+
### Authorization
|
|
521
|
+
|
|
522
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
|
523
|
+
|
|
524
|
+
### HTTP request headers
|
|
525
|
+
|
|
526
|
+
- **Content-Type**: application/json
|
|
527
|
+
- **Accept**: application/json
|
|
528
|
+
|
data/docs/UserShort.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Phrase::UserShort
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**id** | **String** | | [optional]
|
|
8
|
+
**username** | **String** | | [optional]
|
|
9
|
+
**name** | **String** | | [optional]
|
|
10
|
+
**gravatar_uid** | **String** | | [optional]
|
|
11
|
+
|
|
12
|
+
## Code Sample
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'phrase'
|
|
16
|
+
|
|
17
|
+
instance = Phrase::UserShort.new(id: nil,
|
|
18
|
+
username: nil,
|
|
19
|
+
name: nil,
|
|
20
|
+
gravatar_uid: nil)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|