Skip to content

Commit 76bd746

Browse files
SDK regenerated by CI server [ci skip]
1 parent bde76dd commit 76bd746

20 files changed

+2109
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1818

1919
## Enhancements in Version 24.9
2020

21+
- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
2122
- Added ReplaceBackslashWithYenSign property for XpsSaveOptions and HtmlSaveOptions.
2223
- Added DigitalSignature property for XpsSaveOptions.
2324
- Added UseSdtTagAsFormFieldName property for PdfSaveOptions.
25+
- Added MergeWholeDocument parameter to the MailMerge operations to update fields in whole document after executing of a mail merge with regions.
2426

2527

2628
## Enhancements in Version 24.8

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.8
68+
// APIClient manages communication with the Aspose.Words for Cloud API Reference API v24.9
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.8"},
102+
DefaultHeader: map[string]string{"x-aspose-client": "go sdk", "x-aspose-client-version": "24.9"},
103103
}
104104
err = json.Unmarshal(data, &cfg)
105105

dev/api/models/execute_mail_merge_online_request.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type ExecuteMailMergeOnlineRequest struct {
4444
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
4545
key: "options" value: (IFieldOptions) Field options.
4646
key: "withRegions" value: (*bool) The flag indicating whether to execute Mail Merge operation with regions.
47+
key: "mergeWholeDocument" value: (*bool) The flag indicating whether fields in whole document are updated while executing of a mail merge with regions.
4748
key: "cleanup" value: (*string) The cleanup options.
4849
key: "documentFileName" value: (*string) The filename of the output document, that will be used when the resulting document has a dynamic field {filename}. If it is not set, the "template" will be used instead. */
4950
Optionals map[string]interface{}
@@ -81,6 +82,9 @@ func (data *ExecuteMailMergeOnlineRequest) CreateRequestData() (RequestData, err
8182
if err := typeCheckParameter(data.Optionals["withRegions"], "bool", "data.Optionals[withRegions]"); err != nil {
8283
return result, err
8384
}
85+
if err := typeCheckParameter(data.Optionals["mergeWholeDocument"], "bool", "data.Optionals[mergeWholeDocument]"); err != nil {
86+
return result, err
87+
}
8488
if err := typeCheckParameter(data.Optionals["cleanup"], "string", "data.Optionals[cleanup]"); err != nil {
8589
return result, err
8690
}
@@ -101,6 +105,11 @@ func (data *ExecuteMailMergeOnlineRequest) CreateRequestData() (RequestData, err
101105
}
102106

103107

108+
if localVarTempParam, localVarOk := data.Optionals["mergeWholeDocument"].(bool); localVarOk {
109+
result.QueryParams.Add("MergeWholeDocument", parameterToString(localVarTempParam, ""))
110+
}
111+
112+
104113
if localVarTempParam, localVarOk := data.Optionals["cleanup"].(string); localVarOk {
105114
result.QueryParams.Add("Cleanup", parameterToString(localVarTempParam, ""))
106115
}

dev/api/models/execute_mail_merge_request.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ type ExecuteMailMergeRequest struct {
5454
key: "mailMergeDataFile" value: (*string) The data file.
5555
key: "cleanup" value: (*string) The cleanup options.
5656
key: "useWholeParagraphAsRegion" value: (*bool) The flag indicating whether paragraph with TableStart or TableEnd field should be fully included into mail merge region or particular range between TableStart and TableEnd fields. The default value is true.
57+
key: "mergeWholeDocument" value: (*bool) The flag indicating whether fields in whole document are updated while executing of a mail merge with regions.
5758
key: "destFileName" value: (*string) The filename of the output document. If this parameter is omitted, the result will be saved with autogenerated name. */
5859
Optionals map[string]interface{}
5960
}
@@ -117,6 +118,9 @@ func (data *ExecuteMailMergeRequest) CreateRequestData() (RequestData, error) {
117118
if err := typeCheckParameter(data.Optionals["useWholeParagraphAsRegion"], "bool", "data.Optionals[useWholeParagraphAsRegion]"); err != nil {
118119
return result, err
119120
}
121+
if err := typeCheckParameter(data.Optionals["mergeWholeDocument"], "bool", "data.Optionals[mergeWholeDocument]"); err != nil {
122+
return result, err
123+
}
120124
if err := typeCheckParameter(data.Optionals["destFileName"], "string", "data.Optionals[destFileName]"); err != nil {
121125
return result, err
122126
}
@@ -179,6 +183,11 @@ func (data *ExecuteMailMergeRequest) CreateRequestData() (RequestData, error) {
179183
}
180184

181185

186+
if localVarTempParam, localVarOk := data.Optionals["mergeWholeDocument"].(bool); localVarOk {
187+
result.QueryParams.Add("MergeWholeDocument", parameterToString(localVarTempParam, ""))
188+
}
189+
190+
182191
if localVarTempParam, localVarOk := data.Optionals["destFileName"].(string); localVarOk {
183192
result.QueryParams.Add("DestFileName", parameterToString(localVarTempParam, ""))
184193
}
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_signatures_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+
// GetSignaturesOnlineRequest contains request data for WordsApiService.GetSignaturesOnline method.
40+
type GetSignaturesOnlineRequest 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 *GetSignaturesOnlineRequest) 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/signatures"
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 *GetSignaturesOnlineRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
132+
var successPayload ISignatureCollectionResponse = new(SignatureCollectionResponse)
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+
}
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="get_signatures_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+
"fmt"
32+
"errors"
33+
"io/ioutil"
34+
"net/url"
35+
"strings"
36+
"io"
37+
"encoding/json"
38+
)
39+
40+
// GetSignaturesRequest contains request data for WordsApiService.GetSignatures method.
41+
type GetSignaturesRequest struct {
42+
// The filename of the Word document.
43+
Name *string
44+
/* optional (nil or map[string]interface{}) with one or more of key / value pairs:
45+
key: "folder" value: (*string) Original document folder.
46+
key: "storage" value: (*string) Original document storage.
47+
key: "loadEncoding" value: (*string) Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
48+
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.
49+
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.
50+
key: "openTypeSupport" value: (*bool) The value indicates whether OpenType support is on. */
51+
Optionals map[string]interface{}
52+
}
53+
54+
55+
func (data *GetSignaturesRequest) CreateRequestData() (RequestData, error) {
56+
var result RequestData
57+
var filesContentData = make([]FileReference, 0)
58+
if data == nil {
59+
return result, errors.New("Invalid object.")
60+
}
61+
62+
result.Method = strings.ToUpper("get")
63+
64+
// create path and map variables
65+
result.Path = "/words/{name}/signatures"
66+
result.Path = strings.Replace(result.Path, "{"+"name"+"}", fmt.Sprintf("%v", *data.Name), -1)
67+
68+
result.Path = strings.Replace(result.Path, "/<nil>", "", -1)
69+
result.Path = strings.Replace(result.Path, "//", "/", -1)
70+
71+
result.HeaderParams = make(map[string]string)
72+
result.QueryParams = url.Values{}
73+
result.FormParams = make([]FormParamContainer, 0)
74+
75+
if (data.Name == nil) {
76+
return result, errors.New("Parameter Name is required.")
77+
}
78+
79+
80+
if err := typeCheckParameter(data.Optionals["folder"], "string", "data.Optionals[folder]"); err != nil {
81+
return result, err
82+
}
83+
if err := typeCheckParameter(data.Optionals["storage"], "string", "data.Optionals[storage]"); err != nil {
84+
return result, err
85+
}
86+
if err := typeCheckParameter(data.Optionals["loadEncoding"], "string", "data.Optionals[loadEncoding]"); err != nil {
87+
return result, err
88+
}
89+
if err := typeCheckParameter(data.Optionals["password"], "string", "data.Optionals[password]"); err != nil {
90+
return result, err
91+
}
92+
if err := typeCheckParameter(data.Optionals["encryptedPassword"], "string", "data.Optionals[encryptedPassword]"); err != nil {
93+
return result, err
94+
}
95+
if err := typeCheckParameter(data.Optionals["openTypeSupport"], "bool", "data.Optionals[openTypeSupport]"); err != nil {
96+
return result, err
97+
}
98+
99+
100+
101+
if localVarTempParam, localVarOk := data.Optionals["folder"].(string); localVarOk {
102+
result.QueryParams.Add("Folder", parameterToString(localVarTempParam, ""))
103+
}
104+
105+
106+
if localVarTempParam, localVarOk := data.Optionals["storage"].(string); localVarOk {
107+
result.QueryParams.Add("Storage", parameterToString(localVarTempParam, ""))
108+
}
109+
110+
111+
if localVarTempParam, localVarOk := data.Optionals["loadEncoding"].(string); localVarOk {
112+
result.QueryParams.Add("LoadEncoding", parameterToString(localVarTempParam, ""))
113+
}
114+
115+
116+
if localVarTempParam, localVarOk := data.Optionals["password"].(string); localVarOk {
117+
result.QueryParams.Add("Password", parameterToString(localVarTempParam, ""))
118+
}
119+
120+
121+
if localVarTempParam, localVarOk := data.Optionals["encryptedPassword"].(string); localVarOk {
122+
result.QueryParams.Add("EncryptedPassword", parameterToString(localVarTempParam, ""))
123+
}
124+
125+
126+
if localVarTempParam, localVarOk := data.Optionals["openTypeSupport"].(bool); localVarOk {
127+
result.QueryParams.Add("OpenTypeSupport", parameterToString(localVarTempParam, ""))
128+
}
129+
130+
131+
132+
133+
result.FileReferences = filesContentData
134+
for _, fileContentData := range filesContentData {
135+
if fileContentData.Source == "Request" {
136+
fbs, _ := ioutil.ReadAll(fileContentData.Content)
137+
result.FormParams = append(result.FormParams, NewFileFormParamContainer(fileContentData.Reference, fbs))
138+
}
139+
}
140+
141+
return result, nil
142+
}
143+
144+
func (data *GetSignaturesRequest) CreateResponse(reader io.Reader, boundary string) (response interface{}, err error) {
145+
var successPayload ISignatureCollectionResponse = new(SignatureCollectionResponse)
146+
var jsonMap map[string]interface{}
147+
if err = json.NewDecoder(reader).Decode(&jsonMap); err != nil {
148+
return nil, err
149+
}
150+
151+
successPayload.Deserialize(jsonMap)
152+
return successPayload, err
153+
}

0 commit comments

Comments
 (0)