Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-kishchenko-aspose committed Nov 20, 2024
2 parents 3583f20 + 2387539 commit 56cdb35
Show file tree
Hide file tree
Showing 851 changed files with 176,184 additions and 7 deletions.
6 changes: 6 additions & 0 deletions JenkinsfileRelease
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ node('win2019_2') {
stage('checkout'){
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-go.git']]])
}

stage('prepare to release') {
withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
bat 'Scripts\\createVersion.bat %SDK_VERSION% %gitUsername% %gitPass%
}
}

stage('Merge master to release'){
checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-go.git']]])
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
- Add & remove watermarks and protection.
- Read & write access to Document Object Model.

## Enhancements in Version 24.11

- Added GetAllRevisions method to obtain all available revisions in document.
- Added AppendAllEntriesToOneSection parameter to AppendDocument method to append entries to the same section.


## Enhancements in Version 24.9

- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
Expand Down
18 changes: 18 additions & 0 deletions Scripts/CreateVersion.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:copy files version folder
xcopy dev %1 /E /Y /I
xcopy *.md %1/ /Y
: fix files
powershell -command "& { (Get-Content %1\README.md).Replace('v2007', '%1').Replace('2007', '%1') | Set-Content %1\README.md }"
powershell -command "& { (Get-Content %1\go.mod).Replace('/dev', '/%1') | Set-Content %1\go.mod }"
powershell -command "& { Get-ChildItem "%1\tests\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"
powershell -command "& { Get-ChildItem "%1\examples\*" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"
powershell -command "& { Get-ChildItem "%1\api\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"

: commit if any files are changed
git add .
git diff-index --quiet HEAD --
if %errorlevel% == 1 (
git commit -m 'Prepare to release %1'
git push https://%2:%3@git.auckland.dynabic.com/words-cloud/words-cloud-dotnet.git master
)

2 changes: 1 addition & 1 deletion dev/api/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var (
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
)

// APIClient manages communication with the Aspose.Words for Cloud API Reference API v24.10
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v24.11
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *models.Configuration
Expand Down
2 changes: 1 addition & 1 deletion dev/api/models/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
cfg := Configuration{
BaseUrl: "https://api.aspose.cloud",
DebugMode: false,
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.10"},
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.11"},
}
err = json.Unmarshal(data, &cfg)

Expand Down
25 changes: 25 additions & 0 deletions dev/api/models/document_entry_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ type IDocumentEntryList interface {
Deserialize(json map[string]interface{})
CollectFilesContent(resultFilesContent []FileReference) []FileReference
Validate() error
GetAppendAllEntriesToOneSection() *bool
SetAppendAllEntriesToOneSection(value *bool)
GetApplyBaseDocumentHeadersAndFootersToAppendingDocuments() *bool
SetApplyBaseDocumentHeadersAndFootersToAppendingDocuments(value *bool)
GetDocumentEntries() []IDocumentEntry
SetDocumentEntries(value []IDocumentEntry)
}

type DocumentEntryList struct {
// Represents a list of documents which will be appended to the original resource document.
AppendAllEntriesToOneSection *bool `json:"AppendAllEntriesToOneSection,omitempty"`

// Represents a list of documents which will be appended to the original resource document.
ApplyBaseDocumentHeadersAndFootersToAppendingDocuments *bool `json:"ApplyBaseDocumentHeadersAndFootersToAppendingDocuments,omitempty"`

Expand All @@ -71,6 +76,18 @@ func (obj *DocumentEntryList) Initialize() {
}

func (obj *DocumentEntryList) Deserialize(json map[string]interface{}) {
if jsonValue, exists := json["AppendAllEntriesToOneSection"]; exists {
if parsedValue, valid := jsonValue.(bool); valid {
obj.AppendAllEntriesToOneSection = &parsedValue
}

} else if jsonValue, exists := json["appendAllEntriesToOneSection"]; exists {
if parsedValue, valid := jsonValue.(bool); valid {
obj.AppendAllEntriesToOneSection = &parsedValue
}

}

if jsonValue, exists := json["ApplyBaseDocumentHeadersAndFootersToAppendingDocuments"]; exists {
if parsedValue, valid := jsonValue.(bool); valid {
obj.ApplyBaseDocumentHeadersAndFootersToAppendingDocuments = &parsedValue
Expand Down Expand Up @@ -143,6 +160,14 @@ func (obj *DocumentEntryList) Validate() error {
return nil;
}

func (obj *DocumentEntryList) GetAppendAllEntriesToOneSection() *bool {
return obj.AppendAllEntriesToOneSection
}

func (obj *DocumentEntryList) SetAppendAllEntriesToOneSection(value *bool) {
obj.AppendAllEntriesToOneSection = value
}

func (obj *DocumentEntryList) GetApplyBaseDocumentHeadersAndFootersToAppendingDocuments() *bool {
return obj.ApplyBaseDocumentHeadersAndFootersToAppendingDocuments
}
Expand Down
140 changes: 140 additions & 0 deletions dev/api/models/get_all_revisions_online_request.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="get_all_revisions_online_request.go">
* Copyright (c) 2024 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/

package models

import (
"errors"
"io/ioutil"
"net/url"
"strings"
"io"
"encoding/json"
)

// GetAllRevisionsOnlineRequest contains request data for WordsApiService.GetAllRevisionsOnline method.
type GetAllRevisionsOnlineRequest struct {
// The document.
Document io.ReadCloser
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
key: "password" value: (*string) Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
key: "encryptedPassword" value: (*string) Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
key: "openTypeSupport" value: (*bool) The value indicates whether OpenType support is on. */
Optionals map[string]interface{}
}


func (data *GetAllRevisionsOnlineRequest) CreateRequestData() (RequestData, error) {
var result RequestData
var filesContentData = make([]FileReference, 0)
if data == nil {
return result, errors.New("Invalid object.")
}

result.Method = strings.ToUpper("put")

// create path and map variables
result.Path = "/words/online/get/revisions/getAll"

result.Path = strings.Replace(result.Path, "/<nil>", "", -1)
result.Path = strings.Replace(result.Path, "//", "/", -1)

result.HeaderParams = make(map[string]string)
result.QueryParams = url.Values{}
result.FormParams = make([]FormParamContainer, 0)

if (data.Document == nil) {
return result, errors.New("Parameter Document is required.")
}


if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil {
return result, err
}
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil {
return result, err
}
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil {
return result, err
}
if err := typeCheckParameter(data.Optionals["openTypeSupport"], "bool", "data.Optionals[openTypeSupport]"); err != nil {
return result, err
}



if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk {
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, ""))
}


if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk {
result.QueryParams.Add("Password", parameterToString(localVarTempParam, ""))
}


if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk {
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, ""))
}


if localVarTempParam, localVarOk := data.Optionals["openTypeSupport"].(bool); localVarOk {
result.QueryParams.Add("OpenTypeSupport", parameterToString(localVarTempParam, ""))
}



_document := data.Document
if _document != nil {
fbs, _ := ioutil.ReadAll(_document)
_document.Close()
result.FormParams = append(result.FormParams, NewFileFormParamContainer("document", fbs))
}


result.FileReferences = filesContentData
for _, fileContentData := range filesContentData {
if fileContentData.Source == "Request" {
fbs, _ := ioutil.ReadAll(fileContentData.Content)
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs))
}
}

return result, nil
}

func (data *GetAllRevisionsOnlineRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
var successPayload IRevisionsResponse = new(RevisionsResponse)
var jsonMap map[string]interface{}
if err = json.NewDecoder(reader).Decode(&jsonMap); err != nil {
return nil, err
}

successPayload.Deserialize(jsonMap)
return successPayload, err
}
Loading

0 comments on commit 56cdb35

Please sign in to comment.