Skip to content

Commit

Permalink
Deploying from phrase/openapi@11003ace
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Aug 26, 2024
1 parent fb28474 commit 0d4f4df
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
6 changes: 6 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33818,6 +33818,12 @@ components:
existing keys updated.
type: boolean
example: null
update_translations_on_source_match:
default: false
description: Update target translations only if the source translations
of the uploaded multilingual file match the stored translations.
type: boolean
example: null
update_descriptions:
description: Existing key descriptions will be updated with the file content.
Empty descriptions overwrite existing descriptions.
Expand Down
35 changes: 20 additions & 15 deletions api_uploads.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ 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"`
Tags optional.String `json:"tags,omitempty"`
UpdateTranslations optional.Bool `json:"update_translations,omitempty"`
UpdateTranslationKeys optional.Bool `json:"update_translation_keys,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"`
XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
Branch optional.String `json:"branch,omitempty"`
Tags optional.String `json:"tags,omitempty"`
UpdateTranslations optional.Bool `json:"update_translations,omitempty"`
UpdateTranslationKeys optional.Bool `json:"update_translation_keys,omitempty"`
UpdateTranslationsOnSourceMatch optional.Bool `json:"update_translations_on_source_match,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 @@ -54,6 +55,7 @@ Upload a new language file. Creates necessary resources in your project.
- @param "Tags" (optional.String) - List of tags separated by comma to be associated with the new keys contained in the upload.
- @param "UpdateTranslations" (optional.Bool) - Indicates whether existing translations should be updated with the file content.
- @param "UpdateTranslationKeys" (optional.Bool) - Pass `false` here to prevent new keys from being created and existing keys updated.
- @param "UpdateTranslationsOnSourceMatch" (optional.Bool) - Update target translations only if the source translations of the uploaded multilingual file match the stored translations.
- @param "UpdateDescriptions" (optional.Bool) - Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
- @param "ConvertEmoji" (optional.Bool) - This option is obsolete. Providing the option will cause a bad request error.
- @param "SkipUploadTags" (optional.Bool) - Indicates whether the upload should not create upload tags.
Expand Down Expand Up @@ -127,6 +129,9 @@ func (a *UploadsApiService) UploadCreate(ctx _context.Context, projectId string,
if localVarOptionals != nil && localVarOptionals.UpdateTranslationKeys.IsSet() {
localVarFormParams.Add("update_translation_keys", parameterToString(localVarOptionals.UpdateTranslationKeys.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.UpdateTranslationsOnSourceMatch.IsSet() {
localVarFormParams.Add("update_translations_on_source_match", parameterToString(localVarOptionals.UpdateTranslationsOnSourceMatch.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.UpdateDescriptions.IsSet() {
localVarFormParams.Add("update_descriptions", parameterToString(localVarOptionals.UpdateDescriptions.Value(), ""))
}
Expand Down
1 change: 1 addition & 0 deletions docs/UploadsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Name | Type | Description | Notes
**tags** | **optional.String**| List of tags separated by comma to be associated with the new keys contained in the upload. |
**updateTranslations** | **optional.Bool**| Indicates whether existing translations should be updated with the file content. |
**updateTranslationKeys** | **optional.Bool**| Pass `false` here to prevent new keys from being created and existing keys updated. | [default to true]
**updateTranslationsOnSourceMatch** | **optional.Bool**| Update target translations only if the source translations of the uploaded multilingual file match the stored translations. | [default to false]
**updateDescriptions** | **optional.Bool**| Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. |
**convertEmoji** | **optional.Bool**| This option is obsolete. Providing the option will cause a bad request error. |
**skipUploadTags** | **optional.Bool**| Indicates whether the upload should not create upload tags. |
Expand Down

0 comments on commit 0d4f4df

Please sign in to comment.