Skip to content

Commit 56cdb35

Browse files
Merge remote-tracking branch 'remotes/origin/master' into release
2 parents 3583f20 + 2387539 commit 56cdb35

File tree

851 files changed

+176184
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

851 files changed

+176184
-7
lines changed

JenkinsfileRelease

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ node('win2019_2') {
1111
stage('checkout'){
1212
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']]])
1313
}
14+
15+
stage('prepare to release') {
16+
withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
17+
bat 'Scripts\\createVersion.bat %SDK_VERSION% %gitUsername% %gitPass%
18+
}
19+
}
1420

1521
stage('Merge master to release'){
1622
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']]])

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 24.11
20+
21+
- Added GetAllRevisions method to obtain all available revisions in document.
22+
- Added AppendAllEntriesToOneSection parameter to AppendDocument method to append entries to the same section.
23+
24+
1925
## Enhancements in Version 24.9
2026

2127
- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.

Scripts/CreateVersion.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:copy files version folder
2+
xcopy dev %1 /E /Y /I
3+
xcopy *.md %1/ /Y
4+
: fix files
5+
powershell -command "& { (Get-Content %1\README.md).Replace('v2007', '%1').Replace('2007', '%1') | Set-Content %1\README.md }"
6+
powershell -command "& { (Get-Content %1\go.mod).Replace('/dev', '/%1') | Set-Content %1\go.mod }"
7+
powershell -command "& { Get-ChildItem "%1\tests\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"
8+
powershell -command "& { Get-ChildItem "%1\examples\*" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"
9+
powershell -command "& { Get-ChildItem "%1\api\*.go" | ForEach-Object -Process {(Get-Content $_).Replace('/dev/', '/%1/') | Set-Content $_ } }"
10+
11+
: commit if any files are changed
12+
git add .
13+
git diff-index --quiet HEAD --
14+
if %errorlevel% == 1 (
15+
git commit -m 'Prepare to release %1'
16+
git push https://%2:%3@git.auckland.dynabic.com/words-cloud/words-cloud-dotnet.git master
17+
)
18+

dev/api/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var (
6565
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
6666
)
6767

68-
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v24.10
68+
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v24.11
6969
// In most cases there should be only one, shared, APIClient.
7070
type APIClient struct {
7171
cfg *models.Configuration

dev/api/models/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func NewConfiguration(configFilePath string) (pConfig *Configuration, err error)
9999
cfg := Configuration{
100100
BaseUrl: "https://api.aspose.cloud",
101101
DebugMode: false,
102-
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.10"},
102+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.11"},
103103
}
104104
err = json.Unmarshal(data, &cfg)
105105

dev/api/models/document_entry_list.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@ type IDocumentEntryList interface {
3939
Deserialize(json map[string]interface{})
4040
CollectFilesContent(resultFilesContent []FileReference) []FileReference
4141
Validate() error
42+
GetAppendAllEntriesToOneSection() *bool
43+
SetAppendAllEntriesToOneSection(value *bool)
4244
GetApplyBaseDocumentHeadersAndFootersToAppendingDocuments() *bool
4345
SetApplyBaseDocumentHeadersAndFootersToAppendingDocuments(value *bool)
4446
GetDocumentEntries() []IDocumentEntry
4547
SetDocumentEntries(value []IDocumentEntry)
4648
}
4749

4850
type DocumentEntryList struct {
51+
// Represents a list of documents which will be appended to the original resource document.
52+
AppendAllEntriesToOneSection *bool `json:"AppendAllEntriesToOneSection,omitempty"`
53+
4954
// Represents a list of documents which will be appended to the original resource document.
5055
ApplyBaseDocumentHeadersAndFootersToAppendingDocuments *bool `json:"ApplyBaseDocumentHeadersAndFootersToAppendingDocuments,omitempty"`
5156

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

7378
func (obj *DocumentEntryList) Deserialize(json map[string]interface{}) {
79+
if jsonValue, exists := json["AppendAllEntriesToOneSection"]; exists {
80+
if parsedValue, valid := jsonValue.(bool); valid {
81+
obj.AppendAllEntriesToOneSection = &parsedValue
82+
}
83+
84+
} else if jsonValue, exists := json["appendAllEntriesToOneSection"]; exists {
85+
if parsedValue, valid := jsonValue.(bool); valid {
86+
obj.AppendAllEntriesToOneSection = &parsedValue
87+
}
88+
89+
}
90+
7491
if jsonValue, exists := json["ApplyBaseDocumentHeadersAndFootersToAppendingDocuments"]; exists {
7592
if parsedValue, valid := jsonValue.(bool); valid {
7693
obj.ApplyBaseDocumentHeadersAndFootersToAppendingDocuments = &parsedValue
@@ -143,6 +160,14 @@ func (obj *DocumentEntryList) Validate() error {
143160
return nil;
144161
}
145162

163+
func (obj *DocumentEntryList) GetAppendAllEntriesToOneSection() *bool {
164+
return obj.AppendAllEntriesToOneSection
165+
}
166+
167+
func (obj *DocumentEntryList) SetAppendAllEntriesToOneSection(value *bool) {
168+
obj.AppendAllEntriesToOneSection = value
169+
}
170+
146171
func (obj *DocumentEntryList) GetApplyBaseDocumentHeadersAndFootersToAppendingDocuments() *bool {
147172
return obj.ApplyBaseDocumentHeadersAndFootersToAppendingDocuments
148173
}
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="get_all_revisions_online_request.go">
4+
* Copyright (c) 2024 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package models
29+
30+
import (
31+
"errors"
32+
"io/ioutil"
33+
"net/url"
34+
"strings"
35+
"io"
36+
"encoding/json"
37+
)
38+
39+
// GetAllRevisionsOnlineRequest contains request data for WordsApiService.GetAllRevisionsOnline method.
40+
type GetAllRevisionsOnlineRequest struct {
41+
// The document.
42+
Document io.ReadCloser
43+
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
44+
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
45+
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.
46+
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.
47+
key: "openTypeSupport" value: (*bool) The value indicates whether OpenType support is on. */
48+
Optionals map[string]interface{}
49+
}
50+
51+
52+
func (data *GetAllRevisionsOnlineRequest) CreateRequestData() (RequestData, error) {
53+
var result RequestData
54+
var filesContentData = make([]FileReference, 0)
55+
if data == nil {
56+
return result, errors.New("Invalid object.")
57+
}
58+
59+
result.Method = strings.ToUpper("put")
60+
61+
// create path and map variables
62+
result.Path = "/words/online/get/revisions/getAll"
63+
64+
result.Path = strings.Replace(result.Path, "/<nil>", "", -1)
65+
result.Path = strings.Replace(result.Path, "//", "/", -1)
66+
67+
result.HeaderParams = make(map[string]string)
68+
result.QueryParams = url.Values{}
69+
result.FormParams = make([]FormParamContainer, 0)
70+
71+
if (data.Document == nil) {
72+
return result, errors.New("Parameter Document is required.")
73+
}
74+
75+
76+
if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil {
77+
return result, err
78+
}
79+
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil {
80+
return result, err
81+
}
82+
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil {
83+
return result, err
84+
}
85+
if err := typeCheckParameter(data.Optionals["openTypeSupport"], "bool", "data.Optionals[openTypeSupport]"); err != nil {
86+
return result, err
87+
}
88+
89+
90+
91+
if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk {
92+
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, ""))
93+
}
94+
95+
96+
if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk {
97+
result.QueryParams.Add("Password", parameterToString(localVarTempParam, ""))
98+
}
99+
100+
101+
if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk {
102+
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, ""))
103+
}
104+
105+
106+
if localVarTempParam, localVarOk := data.Optionals["openTypeSupport"].(bool); localVarOk {
107+
result.QueryParams.Add("OpenTypeSupport", parameterToString(localVarTempParam, ""))
108+
}
109+
110+
111+
112+
_document := data.Document
113+
if _document != nil {
114+
fbs, _ := ioutil.ReadAll(_document)
115+
_document.Close()
116+
result.FormParams = append(result.FormParams, NewFileFormParamContainer("document", fbs))
117+
}
118+
119+
120+
result.FileReferences = filesContentData
121+
for _, fileContentData := range filesContentData {
122+
if fileContentData.Source == "Request" {
123+
fbs, _ := ioutil.ReadAll(fileContentData.Content)
124+
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs))
125+
}
126+
}
127+
128+
return result, nil
129+
}
130+
131+
func (data *GetAllRevisionsOnlineRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
132+
var successPayload IRevisionsResponse = new(RevisionsResponse)
133+
var jsonMap map[string]interface{}
134+
if err = json.NewDecoder(reader).Decode(&jsonMap); err != nil {
135+
return nil, err
136+
}
137+
138+
successPayload.Deserialize(jsonMap)
139+
return successPayload, err
140+
}

0 commit comments

Comments
 (0)