Skip to content

Commit

Permalink
Deploying from phrase/openapi@e8f958e9
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Sep 12, 2023
1 parent 328877c commit 9ddb7f3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 17 deletions.
12 changes: 11 additions & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12328,6 +12328,11 @@ paths:
be marked as reviewed. This setting is available if the review
workflow is enabled for the project.
type: boolean
tag_only_affected_keys:
default: false
description: Indicates whether only keys affected (created or updated)
by the upload should be tagged. The default is `false`
type: boolean
title: upload/create/parameters
type: object
required: true
Expand Down Expand Up @@ -12400,7 +12405,7 @@ paths:
--locale_mapping '{"en": "2"}' \
--format_options '{"foo": "bar"}' \
--access_token <token>
x-cli-version: "2.5"
x-cli-version: "2.12"
/projects/{project_id}/uploads/{id}:
get:
description: View details and summary for a single upload.
Expand Down Expand Up @@ -32610,6 +32615,11 @@ components:
as reviewed. This setting is available if the review workflow is enabled
for the project.
type: boolean
tag_only_affected_keys:
default: false
description: Indicates whether only keys affected (created or updated) by
the upload should be tagged. The default is `false`
type: boolean
title: upload/create/parameters
type: object
github_sync_export_parameters:
Expand Down
37 changes: 21 additions & 16 deletions api_uploads.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@ type UploadsApiService service

// UploadCreateOpts Optional parameters for the method 'UploadCreate'
type UploadCreateOpts struct {
XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
Branch optional.String `json:"branch,omitempty"`
File optional.Interface `json:"file,omitempty"`
FileFormat optional.String `json:"file_format,omitempty"`
LocaleId optional.String `json:"locale_id,omitempty"`
Tags optional.String `json:"tags,omitempty"`
UpdateTranslations optional.Bool `json:"update_translations,omitempty"`
UpdateDescriptions optional.Bool `json:"update_descriptions,omitempty"`
ConvertEmoji optional.Bool `json:"convert_emoji,omitempty"`
SkipUploadTags optional.Bool `json:"skip_upload_tags,omitempty"`
SkipUnverification optional.Bool `json:"skip_unverification,omitempty"`
FileEncoding optional.String `json:"file_encoding,omitempty"`
LocaleMapping optional.Interface `json:"locale_mapping,omitempty"`
FormatOptions optional.Interface `json:"format_options,omitempty"`
Autotranslate optional.Bool `json:"autotranslate,omitempty"`
MarkReviewed optional.Bool `json:"mark_reviewed,omitempty"`
XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
Branch optional.String `json:"branch,omitempty"`
File optional.Interface `json:"file,omitempty"`
FileFormat optional.String `json:"file_format,omitempty"`
LocaleId optional.String `json:"locale_id,omitempty"`
Tags optional.String `json:"tags,omitempty"`
UpdateTranslations optional.Bool `json:"update_translations,omitempty"`
UpdateDescriptions optional.Bool `json:"update_descriptions,omitempty"`
ConvertEmoji optional.Bool `json:"convert_emoji,omitempty"`
SkipUploadTags optional.Bool `json:"skip_upload_tags,omitempty"`
SkipUnverification optional.Bool `json:"skip_unverification,omitempty"`
FileEncoding optional.String `json:"file_encoding,omitempty"`
LocaleMapping optional.Interface `json:"locale_mapping,omitempty"`
FormatOptions optional.Interface `json:"format_options,omitempty"`
Autotranslate optional.Bool `json:"autotranslate,omitempty"`
MarkReviewed optional.Bool `json:"mark_reviewed,omitempty"`
TagOnlyAffectedKeys optional.Bool `json:"tag_only_affected_keys,omitempty"`
}

/*
Expand All @@ -63,6 +64,7 @@ Upload a new language file. Creates necessary resources in your project.
- @param "FormatOptions" (optional.Interface of map[string]interface{}) - Additional options available for specific formats. See our format guide for complete list.
- @param "Autotranslate" (optional.Bool) - If set, translations for the uploaded language will be fetched automatically.
- @param "MarkReviewed" (optional.Bool) - Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
- @param "TagOnlyAffectedKeys" (optional.Bool) - Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
@return Upload
*/
Expand Down Expand Up @@ -165,6 +167,9 @@ func (a *UploadsApiService) UploadCreate(ctx _context.Context, projectId string,
if localVarOptionals != nil && localVarOptionals.MarkReviewed.IsSet() {
localVarFormParams.Add("mark_reviewed", parameterToString(localVarOptionals.MarkReviewed.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.TagOnlyAffectedKeys.IsSet() {
localVarFormParams.Add("tag_only_affected_keys", parameterToString(localVarOptionals.TagOnlyAffectedKeys.Value(), ""))
}
if ctx != nil {
// API Key Authentication
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
Expand Down
1 change: 1 addition & 0 deletions docs/UploadCreateParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**FormatOptions** | [**map[string]interface{}**](.md) | Additional options available for specific formats. See our format guide for complete list. | [optional]
**Autotranslate** | **bool** | If set, translations for the uploaded language will be fetched automatically. | [optional]
**MarkReviewed** | **bool** | Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. | [optional]
**TagOnlyAffectedKeys** | **bool** | Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; | [optional] [default to false]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
1 change: 1 addition & 0 deletions docs/UploadsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Name | Type | Description | Notes
**formatOptions** | [**optional.Interface of map[string]interface{}**](map[string]interface{}.md)| Additional options available for specific formats. See our format guide for complete list. |
**autotranslate** | **optional.Bool**| If set, translations for the uploaded language will be fetched automatically. |
**markReviewed** | **optional.Bool**| Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project. |
**tagOnlyAffectedKeys** | **optional.Bool**| Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is &#x60;false&#x60; | [default to false]

### Return type

Expand Down
2 changes: 2 additions & 0 deletions model_upload_create_parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ type UploadCreateParameters struct {
Autotranslate *bool `json:"autotranslate,omitempty"`
// Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow is enabled for the project.
MarkReviewed *bool `json:"mark_reviewed,omitempty"`
// Indicates whether only keys affected (created or updated) by the upload should be tagged. The default is `false`
TagOnlyAffectedKeys *bool `json:"tag_only_affected_keys,omitempty"`
}

0 comments on commit 9ddb7f3

Please sign in to comment.