From 86843f55f48c41e62ac56b0523328c06dfddfe1b Mon Sep 17 00:00:00 2001 From: mchatlas Date: Thu, 31 Jul 2025 14:40:27 +0200 Subject: [PATCH 1/5] Regenerated docs, added new translations, updated example template --- examples/json/TemplateUpdateRequest.json | 12 +++++++++++- openapi-raw.yaml | 16 ++++++++++++++++ openapi-sdk.yaml | 20 ++++++++++++++++++-- openapi.yaml | 16 ++++++++++++++++ test_fixtures/TemplateUpdateRequest.json | 12 +++++++++++- translations/en.yaml | 8 ++++++-- 6 files changed, 78 insertions(+), 6 deletions(-) diff --git a/examples/json/TemplateUpdateRequest.json b/examples/json/TemplateUpdateRequest.json index 070aba6d2..dbef5e530 100644 --- a/examples/json/TemplateUpdateRequest.json +++ b/examples/json/TemplateUpdateRequest.json @@ -3,5 +3,15 @@ "title": "Test Title", "subject": "Test Subject", "message": "Test Message", - "cc_roles": ["CC Role 1", "CC Role 2"] + "cc_roles": ["CC Role 1", "CC Role 2"], + "form_fields": [ + { + "api_id": "uniqueIdHere_1", + "name": "New name 1" + }, + { + "api_id": "uniqueIdHere_2", + "name": "New name 2" + } + ] } diff --git a/openapi-raw.yaml b/openapi-raw.yaml index b3dabf5bb..936e581fa 100644 --- a/openapi-raw.yaml +++ b/openapi-raw.yaml @@ -9467,6 +9467,17 @@ components: type: integer default: 12 type: object + SubUpdateFormField: + required: + - api_id + properties: + api_id: + description: '_t__Sub::UpdateFormField::API_ID' + type: string + name: + description: '_t__Sub::UpdateFormField::NAME' + type: string + type: object SubFormFieldsPerDocumentHyperlink: description: '_t__Sub::FormFieldsPerDocument::DESCRIPTION_EXTENDS' allOf: @@ -10325,6 +10336,11 @@ components: description: '_t__TemplateUpdate::MESSAGE' type: string maxLength: 5000 + form_fields: + description: '_t__TemplateUpdate::FORM_FIELDS' + type: array + items: + $ref: '#/components/schemas/SubUpdateFormField' type: object TemplateUpdateFilesRequest: properties: diff --git a/openapi-sdk.yaml b/openapi-sdk.yaml index 2bb178817..ab99b9805 100644 --- a/openapi-sdk.yaml +++ b/openapi-sdk.yaml @@ -7249,8 +7249,8 @@ paths: post: tags: - Template - summary: 'Edit Template' - description: 'Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged.' + summary: 'Update Template' + description: 'Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged.' operationId: templateUpdate parameters: - @@ -9955,6 +9955,17 @@ components: type: integer default: 12 type: object + SubUpdateFormField: + required: + - api_id + properties: + api_id: + description: 'The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found' + type: string + name: + description: 'The new name of the field. If not passed the name will remain unchanged.' + type: string + type: object SubFormFieldsPerDocumentHyperlink: description: 'This class extends `SubFormFieldsPerDocumentBase`.' allOf: @@ -10962,6 +10973,11 @@ components: description: 'The new default template email message.' type: string maxLength: 5000 + form_fields: + description: 'A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.' + type: array + items: + $ref: '#/components/schemas/SubUpdateFormField' type: object TemplateUpdateFilesRequest: properties: diff --git a/openapi.yaml b/openapi.yaml index 99098f471..9c8f84f50 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9818,6 +9818,17 @@ components: type: integer default: 12 type: object + SubUpdateFormField: + required: + - api_id + properties: + api_id: + description: 'The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found' + type: string + name: + description: 'The new name of the field. If not passed the name will remain unchanged.' + type: string + type: object SubFormFieldsPerDocumentHyperlink: description: 'This class extends `SubFormFieldsPerDocumentBase`.' allOf: @@ -10825,6 +10836,11 @@ components: description: 'The new default template email message.' type: string maxLength: 5000 + form_fields: + description: 'A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.' + type: array + items: + $ref: '#/components/schemas/SubUpdateFormField' type: object TemplateUpdateFilesRequest: properties: diff --git a/test_fixtures/TemplateUpdateRequest.json b/test_fixtures/TemplateUpdateRequest.json index fb4d2017d..26ae3711b 100644 --- a/test_fixtures/TemplateUpdateRequest.json +++ b/test_fixtures/TemplateUpdateRequest.json @@ -4,6 +4,16 @@ "title": "Test Title", "subject": "Test Subject", "message": "Test Message", - "cc_roles": ["one", "two"] + "cc_roles": ["one", "two"], + "form_fields": [ + { + "api_id": "uniqueIdHere_1", + "name": "New name 1" + }, + { + "api_id": "uniqueIdHere_2", + "name": "New name 2" + } + ] } } \ No newline at end of file diff --git a/translations/en.yaml b/translations/en.yaml index 42f635bef..fd3a65970 100644 --- a/translations/en.yaml +++ b/translations/en.yaml @@ -777,11 +777,12 @@ "TemplateRemoveUser::EMAIL_ADDRESS": The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. "TemplateRemoveUser::TEMPLATE_ID": The id of the Template to remove the Account's access to. -"TemplateUpdate::SUMMARY": Edit Template -"TemplateUpdate::DESCRIPTION": Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +"TemplateUpdate::SUMMARY": Update Template +"TemplateUpdate::DESCRIPTION": Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. "TemplateUpdate::TEMPLATE_ID": The ID of the template to update. "TemplateUpdate::CC_ROLES": The CC roles that must be assigned when using the template to send a signature request. "TemplateUpdate::ALLOW_FORM_VIEW": "The CC roles that must be assigned when using the template to send a signature request. If set to `true` all the form fields on template document must have non-empty names." +"TemplateUpdate::FORM_FIELDS": A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. "TemplateUpdate::TITLE": The title you want to assign to the SignatureRequest. "TemplateUpdate::SUBJECT": The new default template email subject. "TemplateUpdate::MESSAGE": The new default template email message. @@ -1230,6 +1231,9 @@ "Sub::SigningOptions::TYPE": Allows typing the signature "Sub::SigningOptions::UPLOAD": Allows uploading the signature +"Sub::UpdateFormField::API_ID": The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found +"Sub::UpdateFormField::NAME": The new name of the field. If not passed the name will remain unchanged. + "Sub::UnclaimedDraftSigner::DESCRIPTION": Add Signers to your Unclaimed Draft Signature Request. "Sub::UnclaimedDraftSigner::EMAIL_ADDRESS": The email address of the signer. "Sub::UnclaimedDraftSigner::NAME": The name of the signer. From 73c1823e9277026d413af35e35a0f551b4ec4710 Mon Sep 17 00:00:00 2001 From: mchatlas Date: Thu, 31 Jul 2025 14:46:34 +0200 Subject: [PATCH 2/5] Regenerated SDKs --- sdks/dotnet/README.md | 3 +- sdks/dotnet/docs/SubUpdateFormField.md | 10 + sdks/dotnet/docs/TemplateApi.md | 8 +- sdks/dotnet/docs/TemplateUpdateRequest.md | 2 +- .../src/Dropbox.Sign/Api/TemplateApi.cs | 24 +- .../Dropbox.Sign/Model/SubUpdateFormField.cs | 197 ++++++++ .../Model/TemplateUpdateRequest.cs | 29 +- sdks/java-v1/README.md | 3 +- sdks/java-v1/docs/SubUpdateFormField.md | 15 + sdks/java-v1/docs/TemplateApi.md | 6 +- sdks/java-v1/docs/TemplateUpdateRequest.md | 1 + .../com/dropbox/sign/api/TemplateApi.java | 10 +- .../sign/model/SubUpdateFormField.java | 212 +++++++++ .../sign/model/TemplateUpdateRequest.java | 65 ++- sdks/java-v2/README.md | 3 +- sdks/java-v2/docs/SubUpdateFormField.md | 15 + sdks/java-v2/docs/TemplateApi.md | 6 +- sdks/java-v2/docs/TemplateUpdateRequest.md | 1 + .../com/dropbox/sign/api/TemplateApi.java | 8 +- .../sign/model/SubUpdateFormField.java | 230 +++++++++ .../sign/model/TemplateUpdateRequest.java | 66 ++- sdks/node/README.md | 3 +- sdks/node/api/templateApi.ts | 4 +- sdks/node/dist/api.js | 40 +- sdks/node/docs/api/TemplateApi.md | 6 +- sdks/node/docs/model/SubUpdateFormField.md | 12 + sdks/node/docs/model/TemplateUpdateRequest.md | 1 + sdks/node/model/index.ts | 3 + sdks/node/model/subUpdateFormField.ts | 60 +++ sdks/node/model/templateUpdateRequest.ts | 10 + sdks/node/types/model/index.d.ts | 3 +- sdks/node/types/model/subUpdateFormField.d.ts | 9 + .../types/model/templateUpdateRequest.d.ts | 2 + sdks/php/README.md | 3 +- sdks/php/docs/Api/TemplateApi.md | 6 +- sdks/php/docs/Model/SubUpdateFormField.md | 12 + sdks/php/docs/Model/TemplateUpdateRequest.md | 1 + sdks/php/src/Api/TemplateApi.php | 8 +- sdks/php/src/Model/SubUpdateFormField.php | 450 ++++++++++++++++++ sdks/php/src/Model/TemplateUpdateRequest.php | 34 ++ sdks/python/README.md | 3 +- sdks/python/docs/SubUpdateFormField.md | 13 + sdks/python/docs/TemplateApi.md | 6 +- sdks/python/docs/TemplateUpdateRequest.md | 1 + sdks/python/dropbox_sign/__init__.py | 1 + sdks/python/dropbox_sign/api/template_api.py | 12 +- sdks/python/dropbox_sign/models/__init__.py | 1 + .../models/sub_update_form_field.py | 129 +++++ .../models/template_update_request.py | 23 + sdks/ruby/README.md | 3 +- sdks/ruby/docs/SubUpdateFormField.md | 11 + sdks/ruby/docs/TemplateApi.md | 8 +- sdks/ruby/docs/TemplateUpdateRequest.md | 1 + sdks/ruby/lib/dropbox-sign.rb | 1 + .../ruby/lib/dropbox-sign/api/template_api.rb | 8 +- .../models/sub_update_form_field.rb | 278 +++++++++++ .../models/template_update_request.rb | 21 +- 57 files changed, 2020 insertions(+), 81 deletions(-) create mode 100644 sdks/dotnet/docs/SubUpdateFormField.md create mode 100644 sdks/dotnet/src/Dropbox.Sign/Model/SubUpdateFormField.cs create mode 100644 sdks/java-v1/docs/SubUpdateFormField.md create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java create mode 100644 sdks/java-v2/docs/SubUpdateFormField.md create mode 100644 sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java create mode 100644 sdks/node/docs/model/SubUpdateFormField.md create mode 100644 sdks/node/model/subUpdateFormField.ts create mode 100644 sdks/node/types/model/subUpdateFormField.d.ts create mode 100644 sdks/php/docs/Model/SubUpdateFormField.md create mode 100644 sdks/php/src/Model/SubUpdateFormField.php create mode 100644 sdks/python/docs/SubUpdateFormField.md create mode 100644 sdks/python/dropbox_sign/models/sub_update_form_field.py create mode 100644 sdks/ruby/docs/SubUpdateFormField.md create mode 100644 sdks/ruby/lib/dropbox-sign/models/sub_update_form_field.rb diff --git a/sdks/dotnet/README.md b/sdks/dotnet/README.md index 644657b4c..12e2a2d19 100644 --- a/sdks/dotnet/README.md +++ b/sdks/dotnet/README.md @@ -199,7 +199,7 @@ Class | Method | HTTP request | Description *TemplateApi* | [**TemplateGet**](docs/TemplateApi.md#templateget) | **GET** /template/{template_id} | Get Template *TemplateApi* | [**TemplateList**](docs/TemplateApi.md#templatelist) | **GET** /template/list | List Templates *TemplateApi* | [**TemplateRemoveUser**](docs/TemplateApi.md#templateremoveuser) | **POST** /template/remove_user/{template_id} | Remove User from Template -*TemplateApi* | [**TemplateUpdate**](docs/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Edit Template +*TemplateApi* | [**TemplateUpdate**](docs/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Update Template *TemplateApi* | [**TemplateUpdateFiles**](docs/TemplateApi.md#templateupdatefiles) | **POST** /template/update_files/{template_id} | Update Template Files *UnclaimedDraftApi* | [**UnclaimedDraftCreate**](docs/UnclaimedDraftApi.md#unclaimeddraftcreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft *UnclaimedDraftApi* | [**UnclaimedDraftCreateEmbedded**](docs/UnclaimedDraftApi.md#unclaimeddraftcreateembedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft @@ -336,6 +336,7 @@ Class | Method | HTTP request | Description - [Model.SubTemplateRole](docs/SubTemplateRole.md) - [Model.SubUnclaimedDraftSigner](docs/SubUnclaimedDraftSigner.md) - [Model.SubUnclaimedDraftTemplateSigner](docs/SubUnclaimedDraftTemplateSigner.md) + - [Model.SubUpdateFormField](docs/SubUpdateFormField.md) - [Model.SubWhiteLabelingOptions](docs/SubWhiteLabelingOptions.md) - [Model.TeamAddMemberRequest](docs/TeamAddMemberRequest.md) - [Model.TeamCreateRequest](docs/TeamCreateRequest.md) diff --git a/sdks/dotnet/docs/SubUpdateFormField.md b/sdks/dotnet/docs/SubUpdateFormField.md new file mode 100644 index 000000000..2760bfbd9 --- /dev/null +++ b/sdks/dotnet/docs/SubUpdateFormField.md @@ -0,0 +1,10 @@ +# Dropbox.Sign.Model.SubUpdateFormField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiId** | **string** | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | **Name** | **string** | The new name of the field. If not passed the name will remain unchanged. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/sdks/dotnet/docs/TemplateApi.md b/sdks/dotnet/docs/TemplateApi.md index fffb3cfa9..6e3e49113 100644 --- a/sdks/dotnet/docs/TemplateApi.md +++ b/sdks/dotnet/docs/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [**TemplateGet**](TemplateApi.md#templateget) | **GET** /template/{template_id} | Get Template | | [**TemplateList**](TemplateApi.md#templatelist) | **GET** /template/list | List Templates | | [**TemplateRemoveUser**](TemplateApi.md#templateremoveuser) | **POST** /template/remove_user/{template_id} | Remove User from Template | -| [**TemplateUpdate**](TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Edit Template | +| [**TemplateUpdate**](TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Update Template | | [**TemplateUpdateFiles**](TemplateApi.md#templateupdatefiles) | **POST** /template/update_files/{template_id} | Update Template Files | @@ -1148,9 +1148,9 @@ catch (ApiException e) # **TemplateUpdate** > TemplateGetResponse TemplateUpdate (string templateId, TemplateUpdateRequest templateUpdateRequest) -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Example ```csharp @@ -1210,7 +1210,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - // Edit Template + // Update Template ApiResponse response = apiInstance.TemplateUpdateWithHttpInfo(templateId, templateUpdateRequest); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); diff --git a/sdks/dotnet/docs/TemplateUpdateRequest.md b/sdks/dotnet/docs/TemplateUpdateRequest.md index 76565ccfa..374eb6720 100644 --- a/sdks/dotnet/docs/TemplateUpdateRequest.md +++ b/sdks/dotnet/docs/TemplateUpdateRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request. | [optional] **AllowFormView** | **bool** | The CC roles that must be assigned when using the template to send a signature request. If set to `true` all the form fields on template document must have non-empty names. | [optional] **Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **Subject** | **string** | The new default template email subject. | [optional] **Message** | **string** | The new default template email message. | [optional] +**CcRoles** | **List<string>** | The CC roles that must be assigned when using the template to send a signature request. | [optional] **AllowFormView** | **bool** | The CC roles that must be assigned when using the template to send a signature request. If set to `true` all the form fields on template document must have non-empty names. | [optional] **Title** | **string** | The title you want to assign to the SignatureRequest. | [optional] **Subject** | **string** | The new default template email subject. | [optional] **Message** | **string** | The new default template email message. | [optional] **FormFields** | [**List<SubUpdateFormField>**](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs index ec79ef59c..8ca0ec8ed 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Api/TemplateApi.cs @@ -272,10 +272,10 @@ public interface ITemplateApiSync : IApiAccessor /// ApiResponse of TemplateGetResponse ApiResponse TemplateRemoveUserWithHttpInfo(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0); /// - /// Edit Template + /// Update Template /// /// - /// Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -285,10 +285,10 @@ public interface ITemplateApiSync : IApiAccessor TemplateGetResponse TemplateUpdate(string templateId, TemplateUpdateRequest templateUpdateRequest, int operationIndex = 0); /// - /// Edit Template + /// Update Template /// /// - /// Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -595,10 +595,10 @@ public interface ITemplateApiAsync : IApiAccessor /// Task of ApiResponse (TemplateGetResponse) System.Threading.Tasks.Task> TemplateRemoveUserWithHttpInfoAsync(string templateId, TemplateRemoveUserRequest templateRemoveUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Edit Template + /// Update Template /// /// - /// Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -609,10 +609,10 @@ public interface ITemplateApiAsync : IApiAccessor System.Threading.Tasks.Task TemplateUpdateAsync(string templateId, TemplateUpdateRequest templateUpdateRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Edit Template + /// Update Template /// /// - /// Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -2605,7 +2605,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateRemoveUserWi } /// - /// Edit Template Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update Template Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -2619,7 +2619,7 @@ public TemplateGetResponse TemplateUpdate(string templateId, TemplateUpdateReque } /// - /// Edit Template Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update Template Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -2704,7 +2704,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpdateWithHt } /// - /// Edit Template Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update Template Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. @@ -2719,7 +2719,7 @@ public Dropbox.Sign.Client.ApiResponse TemplateUpdateWithHt } /// - /// Edit Template Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + /// Update Template Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. /// /// Thrown when fails to make API call /// The ID of the template to update. diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/SubUpdateFormField.cs b/sdks/dotnet/src/Dropbox.Sign/Model/SubUpdateFormField.cs new file mode 100644 index 000000000..18dde7b0f --- /dev/null +++ b/sdks/dotnet/src/Dropbox.Sign/Model/SubUpdateFormField.cs @@ -0,0 +1,197 @@ +/* + * Dropbox Sign API + * + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Dropbox.Sign.Client.OpenAPIDateConverter; + +namespace Dropbox.Sign.Model +{ + /// + /// SubUpdateFormField + /// + [DataContract(Name = "SubUpdateFormField")] + [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)] + public partial class SubUpdateFormField : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SubUpdateFormField() { } + /// + /// Initializes a new instance of the class. + /// + /// The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found (required). + /// The new name of the field. If not passed the name will remain unchanged.. + public SubUpdateFormField(string apiId = default(string), string name = default(string)) + { + + // to ensure "apiId" is required (not null) + if (apiId == null) + { + throw new ArgumentNullException("apiId is a required property for SubUpdateFormField and cannot be null"); + } + this.ApiId = apiId; + this.Name = name; + } + + /// + /// Attempt to instantiate and hydrate a new instance of this class + /// + /// String of JSON data representing target object + public static SubUpdateFormField Init(string jsonData) + { + var obj = JsonConvert.DeserializeObject(jsonData); + + if (obj == null) + { + throw new Exception("Unable to deserialize JSON to instance of SubUpdateFormField"); + } + + return obj; + } + + /// + /// The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + /// + /// The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + [DataMember(Name = "api_id", IsRequired = true, EmitDefaultValue = true)] + public string ApiId { get; set; } + + /// + /// The new name of the field. If not passed the name will remain unchanged. + /// + /// The new name of the field. If not passed the name will remain unchanged. + [DataMember(Name = "name", EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SubUpdateFormField {\n"); + sb.Append(" ApiId: ").Append(ApiId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SubUpdateFormField); + } + + /// + /// Returns true if SubUpdateFormField instances are equal + /// + /// Instance of SubUpdateFormField to be compared + /// Boolean + public bool Equals(SubUpdateFormField input) + { + if (input == null) + { + return false; + } + return + ( + this.ApiId == input.ApiId || + (this.ApiId != null && + this.ApiId.Equals(input.ApiId)) + ) && + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ApiId != null) + { + hashCode = (hashCode * 59) + this.ApiId.GetHashCode(); + } + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + public List GetOpenApiTypes() + { + var types = new List(); + types.Add(new OpenApiType() + { + Name = "api_id", + Property = "ApiId", + Type = "string", + Value = ApiId, + }); + types.Add(new OpenApiType() + { + Name = "name", + Property = "Name", + Type = "string", + Value = Name, + }); + + return types; + } + } + +} diff --git a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateRequest.cs b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateRequest.cs index 6d034d9de..e5cfe892a 100644 --- a/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateRequest.cs +++ b/sdks/dotnet/src/Dropbox.Sign/Model/TemplateUpdateRequest.cs @@ -46,7 +46,8 @@ protected TemplateUpdateRequest() { } /// The title you want to assign to the SignatureRequest.. /// The new default template email subject.. /// The new default template email message.. - public TemplateUpdateRequest(List ccRoles = default(List), bool allowFormView = default(bool), string title = default(string), string subject = default(string), string message = default(string)) + /// A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.. + public TemplateUpdateRequest(List ccRoles = default(List), bool allowFormView = default(bool), string title = default(string), string subject = default(string), string message = default(string), List formFields = default(List)) { this.CcRoles = ccRoles; @@ -54,6 +55,7 @@ protected TemplateUpdateRequest() { } this.Title = title; this.Subject = subject; this.Message = message; + this.FormFields = formFields; } /// @@ -107,6 +109,13 @@ public static TemplateUpdateRequest Init(string jsonData) [DataMember(Name = "message", EmitDefaultValue = true)] public string Message { get; set; } + /// + /// A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + /// + /// A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + [DataMember(Name = "form_fields", EmitDefaultValue = true)] + public List FormFields { get; set; } + /// /// Returns the string presentation of the object /// @@ -120,6 +129,7 @@ public override string ToString() sb.Append(" Title: ").Append(Title).Append("\n"); sb.Append(" Subject: ").Append(Subject).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" FormFields: ").Append(FormFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -179,6 +189,12 @@ public bool Equals(TemplateUpdateRequest input) this.Message == input.Message || (this.Message != null && this.Message.Equals(input.Message)) + ) && + ( + this.FormFields == input.FormFields || + this.FormFields != null && + input.FormFields != null && + this.FormFields.SequenceEqual(input.FormFields) ); } @@ -208,6 +224,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Message.GetHashCode(); } + if (this.FormFields != null) + { + hashCode = (hashCode * 59) + this.FormFields.GetHashCode(); + } return hashCode; } } @@ -271,6 +291,13 @@ public List GetOpenApiTypes() Type = "string", Value = Message, }); + types.Add(new OpenApiType() + { + Name = "form_fields", + Property = "FormFields", + Type = "List", + Value = FormFields, + }); return types; } diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 5be9bb99d..a6ba86f6c 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -242,7 +242,7 @@ Class | Method | HTTP request | Description *TemplateApi* | [**templateGet**](docs/TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template *TemplateApi* | [**templateList**](docs/TemplateApi.md#templateList) | **GET** /template/list | List Templates *TemplateApi* | [**templateRemoveUser**](docs/TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template -*TemplateApi* | [**templateUpdate**](docs/TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template +*TemplateApi* | [**templateUpdate**](docs/TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template *TemplateApi* | [**templateUpdateFiles**](docs/TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files *UnclaimedDraftApi* | [**unclaimedDraftCreate**](docs/UnclaimedDraftApi.md#unclaimedDraftCreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft *UnclaimedDraftApi* | [**unclaimedDraftCreateEmbedded**](docs/UnclaimedDraftApi.md#unclaimedDraftCreateEmbedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft @@ -378,6 +378,7 @@ Class | Method | HTTP request | Description - [SubTemplateRole](docs/SubTemplateRole.md) - [SubUnclaimedDraftSigner](docs/SubUnclaimedDraftSigner.md) - [SubUnclaimedDraftTemplateSigner](docs/SubUnclaimedDraftTemplateSigner.md) + - [SubUpdateFormField](docs/SubUpdateFormField.md) - [SubWhiteLabelingOptions](docs/SubWhiteLabelingOptions.md) - [TeamAddMemberRequest](docs/TeamAddMemberRequest.md) - [TeamCreateRequest](docs/TeamCreateRequest.md) diff --git a/sdks/java-v1/docs/SubUpdateFormField.md b/sdks/java-v1/docs/SubUpdateFormField.md new file mode 100644 index 000000000..0f09c17e9 --- /dev/null +++ b/sdks/java-v1/docs/SubUpdateFormField.md @@ -0,0 +1,15 @@ + + +# SubUpdateFormField + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiId`*_required_ | ```String``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```String``` | The new name of the field. If not passed the name will remain unchanged. | | + + + diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md index 123e25a4d..95a78d81e 100644 --- a/sdks/java-v1/docs/TemplateApi.md +++ b/sdks/java-v1/docs/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.hellosign.com/v3* [**templateGet**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template [**templateList**](TemplateApi.md#templateList) | **GET** /template/list | List Templates [**templateRemoveUser**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template -[**templateUpdate**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template +[**templateUpdate**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template [**templateUpdateFiles**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files @@ -992,9 +992,9 @@ public class TemplateRemoveUserExample > TemplateGetResponse templateUpdate(templateId, templateUpdateRequest) -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Example diff --git a/sdks/java-v1/docs/TemplateUpdateRequest.md b/sdks/java-v1/docs/TemplateUpdateRequest.md index cfe85c5e7..56d80eced 100644 --- a/sdks/java-v1/docs/TemplateUpdateRequest.md +++ b/sdks/java-v1/docs/TemplateUpdateRequest.md @@ -13,6 +13,7 @@ | `title` | ```String``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```String``` | The new default template email subject. | | | `message` | ```String``` | The new default template email message. | | +| `formFields` | [```List```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java index 5342e0b30..e6547c390 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -999,8 +999,9 @@ public ApiResponse templateRemoveUserWithHttpInfo( } /** - * Edit Template Edit template fields. Every field is optional and the endpoint will only change - * whatever is provided. The fields not included in the request payload will remain unchanged. + * Update Template Update template fields. Every field is optional and the endpoint will only + * change whatever is provided. The fields not included in the request payload will remain + * unchanged. * * @param templateId The ID of the template to update. (required) * @param templateUpdateRequest (required) @@ -1020,8 +1021,9 @@ public TemplateGetResponse templateUpdate( } /** - * Edit Template Edit template fields. Every field is optional and the endpoint will only change - * whatever is provided. The fields not included in the request payload will remain unchanged. + * Update Template Update template fields. Every field is optional and the endpoint will only + * change whatever is provided. The fields not included in the request payload will remain + * unchanged. * * @param templateId The ID of the template to update. (required) * @param templateUpdateRequest (required) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java new file mode 100644 index 000000000..65e0fe1c9 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java @@ -0,0 +1,212 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.dropbox.sign.model; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** SubUpdateFormField */ +@JsonPropertyOrder({SubUpdateFormField.JSON_PROPERTY_API_ID, SubUpdateFormField.JSON_PROPERTY_NAME}) +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown = true) +public class SubUpdateFormField { + public static final String JSON_PROPERTY_API_ID = "api_id"; + @javax.annotation.Nonnull private String apiId; + + public static final String JSON_PROPERTY_NAME = "name"; + @javax.annotation.Nullable private String name; + + public SubUpdateFormField() {} + + /** + * Attempt to instantiate and hydrate a new instance of this class + * + * @param jsonData String of JSON data representing target object + */ + public static SubUpdateFormField init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SubUpdateFormField.class); + } + + public static SubUpdateFormField init(HashMap data) throws Exception { + return new ObjectMapper() + .readValue(new ObjectMapper().writeValueAsString(data), SubUpdateFormField.class); + } + + public SubUpdateFormField apiId(@javax.annotation.Nonnull String apiId) { + this.apiId = apiId; + return this; + } + + /** + * The unique ID for this field. The endpoint will update an existing field with matching + * `api_id`, and warn you if no matches are found + * + * @return apiId + */ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApiId() { + return apiId; + } + + @JsonProperty(JSON_PROPERTY_API_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiId(@javax.annotation.Nonnull String apiId) { + this.apiId = apiId; + } + + public SubUpdateFormField name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The new name of the field. If not passed the name will remain unchanged. + * + * @return name + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** Return true if this SubUpdateFormField object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubUpdateFormField subUpdateFormField = (SubUpdateFormField) o; + return Objects.equals(this.apiId, subUpdateFormField.apiId) + && Objects.equals(this.name, subUpdateFormField.name); + } + + @Override + public int hashCode() { + return Objects.hash(apiId, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubUpdateFormField {\n"); + sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (apiId != null) { + if (isFileTypeOrListOfFiles(apiId)) { + fileTypeFound = true; + } + + if (apiId.getClass().equals(java.io.File.class) + || apiId.getClass().equals(Integer.class) + || apiId.getClass().equals(String.class) + || apiId.getClass().isEnum()) { + map.put("api_id", apiId); + } else if (isListOfFile(apiId)) { + for (int i = 0; i < getListSize(apiId); i++) { + map.put("api_id[" + i + "]", getFromList(apiId, i)); + } + } else { + map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); + } + } + if (name != null) { + if (isFileTypeOrListOfFiles(name)) { + fileTypeFound = true; + } + + if (name.getClass().equals(java.io.File.class) + || name.getClass().equals(Integer.class) + || name.getClass().equals(String.class) + || name.getClass().isEnum()) { + map.put("name", name); + } else if (isListOfFile(name)) { + for (int i = 0; i < getListSize(name); i++) { + map.put("name[" + i + "]", getFromList(name, i)); + } + } else { + map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List + && !isListEmpty(obj) + && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) + Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()) + .getMethod("get", int.class) + .invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java index 66b9d4ee1..7c76d4a2a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java @@ -31,7 +31,8 @@ TemplateUpdateRequest.JSON_PROPERTY_ALLOW_FORM_VIEW, TemplateUpdateRequest.JSON_PROPERTY_TITLE, TemplateUpdateRequest.JSON_PROPERTY_SUBJECT, - TemplateUpdateRequest.JSON_PROPERTY_MESSAGE + TemplateUpdateRequest.JSON_PROPERTY_MESSAGE, + TemplateUpdateRequest.JSON_PROPERTY_FORM_FIELDS }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -53,6 +54,9 @@ public class TemplateUpdateRequest { public static final String JSON_PROPERTY_MESSAGE = "message"; @javax.annotation.Nullable private String message; + public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; + @javax.annotation.Nullable private List formFields = null; + public TemplateUpdateRequest() {} /** @@ -189,6 +193,39 @@ public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } + public TemplateUpdateRequest formFields( + @javax.annotation.Nullable List formFields) { + this.formFields = formFields; + return this; + } + + public TemplateUpdateRequest addFormFieldsItem(SubUpdateFormField formFieldsItem) { + if (this.formFields == null) { + this.formFields = new ArrayList<>(); + } + this.formFields.add(formFieldsItem); + return this; + } + + /** + * A list of document form fields to update. The endpoint will not create or remove any fields. + * Every field must be identified by `api_id`, and the only supported change is + * renaming the field. + * + * @return formFields + */ + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFormFields() { + return formFields; + } + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFields(@javax.annotation.Nullable List formFields) { + this.formFields = formFields; + } + /** Return true if this TemplateUpdateRequest object is equal to o. */ @Override public boolean equals(Object o) { @@ -203,12 +240,13 @@ public boolean equals(Object o) { && Objects.equals(this.allowFormView, templateUpdateRequest.allowFormView) && Objects.equals(this.title, templateUpdateRequest.title) && Objects.equals(this.subject, templateUpdateRequest.subject) - && Objects.equals(this.message, templateUpdateRequest.message); + && Objects.equals(this.message, templateUpdateRequest.message) + && Objects.equals(this.formFields, templateUpdateRequest.formFields); } @Override public int hashCode() { - return Objects.hash(ccRoles, allowFormView, title, subject, message); + return Objects.hash(ccRoles, allowFormView, title, subject, message, formFields); } @Override @@ -220,6 +258,7 @@ public String toString() { sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" formFields: ").append(toIndentedString(formFields)).append("\n"); sb.append("}"); return sb.toString(); } @@ -320,6 +359,26 @@ public Map createFormData() throws ApiException { map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); } } + if (formFields != null) { + if (isFileTypeOrListOfFiles(formFields)) { + fileTypeFound = true; + } + + if (formFields.getClass().equals(java.io.File.class) + || formFields.getClass().equals(Integer.class) + || formFields.getClass().equals(String.class) + || formFields.getClass().isEnum()) { + map.put("form_fields", formFields); + } else if (isListOfFile(formFields)) { + for (int i = 0; i < getListSize(formFields); i++) { + map.put("form_fields[" + i + "]", getFromList(formFields, i)); + } + } else { + map.put( + "form_fields", + JSON.getDefault().getMapper().writeValueAsString(formFields)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/java-v2/README.md b/sdks/java-v2/README.md index 4e2114f82..13bb5fc7d 100644 --- a/sdks/java-v2/README.md +++ b/sdks/java-v2/README.md @@ -218,7 +218,7 @@ Class | Method | HTTP request | Description *TemplateApi* | [**templateGet**](docs/TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template *TemplateApi* | [**templateList**](docs/TemplateApi.md#templateList) | **GET** /template/list | List Templates *TemplateApi* | [**templateRemoveUser**](docs/TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template -*TemplateApi* | [**templateUpdate**](docs/TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template +*TemplateApi* | [**templateUpdate**](docs/TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template *TemplateApi* | [**templateUpdateFiles**](docs/TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files *UnclaimedDraftApi* | [**unclaimedDraftCreate**](docs/UnclaimedDraftApi.md#unclaimedDraftCreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft *UnclaimedDraftApi* | [**unclaimedDraftCreateEmbedded**](docs/UnclaimedDraftApi.md#unclaimedDraftCreateEmbedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft @@ -354,6 +354,7 @@ Class | Method | HTTP request | Description - [SubTemplateRole](docs/SubTemplateRole.md) - [SubUnclaimedDraftSigner](docs/SubUnclaimedDraftSigner.md) - [SubUnclaimedDraftTemplateSigner](docs/SubUnclaimedDraftTemplateSigner.md) + - [SubUpdateFormField](docs/SubUpdateFormField.md) - [SubWhiteLabelingOptions](docs/SubWhiteLabelingOptions.md) - [TeamAddMemberRequest](docs/TeamAddMemberRequest.md) - [TeamCreateRequest](docs/TeamCreateRequest.md) diff --git a/sdks/java-v2/docs/SubUpdateFormField.md b/sdks/java-v2/docs/SubUpdateFormField.md new file mode 100644 index 000000000..0f09c17e9 --- /dev/null +++ b/sdks/java-v2/docs/SubUpdateFormField.md @@ -0,0 +1,15 @@ + + +# SubUpdateFormField + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiId`*_required_ | ```String``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```String``` | The new name of the field. If not passed the name will remain unchanged. | | + + + diff --git a/sdks/java-v2/docs/TemplateApi.md b/sdks/java-v2/docs/TemplateApi.md index 123e25a4d..95a78d81e 100644 --- a/sdks/java-v2/docs/TemplateApi.md +++ b/sdks/java-v2/docs/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.hellosign.com/v3* [**templateGet**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template [**templateList**](TemplateApi.md#templateList) | **GET** /template/list | List Templates [**templateRemoveUser**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template -[**templateUpdate**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template +[**templateUpdate**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template [**templateUpdateFiles**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files @@ -992,9 +992,9 @@ public class TemplateRemoveUserExample > TemplateGetResponse templateUpdate(templateId, templateUpdateRequest) -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Example diff --git a/sdks/java-v2/docs/TemplateUpdateRequest.md b/sdks/java-v2/docs/TemplateUpdateRequest.md index cfe85c5e7..56d80eced 100644 --- a/sdks/java-v2/docs/TemplateUpdateRequest.md +++ b/sdks/java-v2/docs/TemplateUpdateRequest.md @@ -13,6 +13,7 @@ | `title` | ```String``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```String``` | The new default template email subject. | | | `message` | ```String``` | The new default template email message. | | +| `formFields` | [```List```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java index c71fc7f37..02d92aacd 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -882,8 +882,8 @@ public ApiResponse templateRemoveUserWithHttpInfo(String te ); } /** - * Edit Template - * Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + * Update Template + * Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. * @param templateId The ID of the template to update. (required) * @param templateUpdateRequest (required) * @return TemplateGetResponse @@ -902,8 +902,8 @@ public TemplateGetResponse templateUpdate(String templateId, TemplateUpdateReque /** - * Edit Template - * Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + * Update Template + * Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. * @param templateId The ID of the template to update. (required) * @param templateUpdateRequest (required) * @return ApiResponse<TemplateGetResponse> diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java new file mode 100644 index 000000000..1c9fe6b84 --- /dev/null +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/SubUpdateFormField.java @@ -0,0 +1,230 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.dropbox.sign.model; + +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.dropbox.sign.JSON; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.databind.ObjectMapper; + + +import com.dropbox.sign.ApiException; +/** + * SubUpdateFormField + */ +@JsonPropertyOrder({ + SubUpdateFormField.JSON_PROPERTY_API_ID, + SubUpdateFormField.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") +@JsonIgnoreProperties(ignoreUnknown=true) +public class SubUpdateFormField { + public static final String JSON_PROPERTY_API_ID = "api_id"; + @jakarta.annotation.Nonnull + private String apiId; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nullable + private String name; + + public SubUpdateFormField() { + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + * @param jsonData String of JSON data representing target object + */ + static public SubUpdateFormField init(String jsonData) throws Exception { + return new ObjectMapper().readValue(jsonData, SubUpdateFormField.class); + } + + static public SubUpdateFormField init(HashMap data) throws Exception { + return new ObjectMapper().readValue( + new ObjectMapper().writeValueAsString(data), + SubUpdateFormField.class + ); + } + + public SubUpdateFormField apiId(@jakarta.annotation.Nonnull String apiId) { + this.apiId = apiId; + return this; + } + + /** + * The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + * @return apiId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_API_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getApiId() { + return apiId; + } + + + @JsonProperty(JSON_PROPERTY_API_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setApiId(@jakarta.annotation.Nonnull String apiId) { + this.apiId = apiId; + } + + + public SubUpdateFormField name(@jakarta.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The new name of the field. If not passed the name will remain unchanged. + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(@jakarta.annotation.Nullable String name) { + this.name = name; + } + + + /** + * Return true if this SubUpdateFormField object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubUpdateFormField subUpdateFormField = (SubUpdateFormField) o; + return Objects.equals(this.apiId, subUpdateFormField.apiId) && + Objects.equals(this.name, subUpdateFormField.name); + } + + @Override + public int hashCode() { + return Objects.hash(apiId, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubUpdateFormField {\n"); + sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public Map createFormData() throws ApiException { + Map map = new HashMap<>(); + boolean fileTypeFound = false; + try { + if (apiId != null) { + if (isFileTypeOrListOfFiles(apiId)) { + fileTypeFound = true; + } + + if (apiId.getClass().equals(java.io.File.class) || + apiId.getClass().equals(Integer.class) || + apiId.getClass().equals(String.class) || + apiId.getClass().isEnum()) { + map.put("api_id", apiId); + } else if (isListOfFile(apiId)) { + for(int i = 0; i< getListSize(apiId); i++) { + map.put("api_id[" + i + "]", getFromList(apiId, i)); + } + } + else { + map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); + } + } + if (name != null) { + if (isFileTypeOrListOfFiles(name)) { + fileTypeFound = true; + } + + if (name.getClass().equals(java.io.File.class) || + name.getClass().equals(Integer.class) || + name.getClass().equals(String.class) || + name.getClass().isEnum()) { + map.put("name", name); + } else if (isListOfFile(name)) { + for(int i = 0; i< getListSize(name); i++) { + map.put("name[" + i + "]", getFromList(name, i)); + } + } + else { + map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); + } + } + } catch (Exception e) { + throw new ApiException(e); + } + + return fileTypeFound ? map : new HashMap<>(); + } + + private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { + return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); + } + + private boolean isListOfFile(Object obj) throws Exception { + return obj instanceof java.util.List && !isListEmpty(obj) && getFromList(obj, 0) instanceof java.io.File; + } + + private boolean isListEmpty(Object obj) throws Exception { + return (boolean) Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); + } + + private Object getFromList(Object obj, int index) throws Exception { + return Class.forName(java.util.List.class.getName()).getMethod("get", int.class).invoke(obj, index); + } + + private int getListSize(Object obj) throws Exception { + return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java index 9b8b7e7f1..5b42e7eb7 100644 --- a/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java +++ b/sdks/java-v2/src/main/java/com/dropbox/sign/model/TemplateUpdateRequest.java @@ -16,6 +16,7 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.dropbox.sign.model.SubUpdateFormField; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -39,7 +40,8 @@ TemplateUpdateRequest.JSON_PROPERTY_ALLOW_FORM_VIEW, TemplateUpdateRequest.JSON_PROPERTY_TITLE, TemplateUpdateRequest.JSON_PROPERTY_SUBJECT, - TemplateUpdateRequest.JSON_PROPERTY_MESSAGE + TemplateUpdateRequest.JSON_PROPERTY_MESSAGE, + TemplateUpdateRequest.JSON_PROPERTY_FORM_FIELDS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown=true) @@ -64,6 +66,10 @@ public class TemplateUpdateRequest { @jakarta.annotation.Nullable private String message; + public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; + @jakarta.annotation.Nullable + private List formFields = null; + public TemplateUpdateRequest() { } @@ -215,6 +221,39 @@ public void setMessage(@jakarta.annotation.Nullable String message) { } + public TemplateUpdateRequest formFields(@jakarta.annotation.Nullable List formFields) { + this.formFields = formFields; + return this; + } + + public TemplateUpdateRequest addFormFieldsItem(SubUpdateFormField formFieldsItem) { + if (this.formFields == null) { + this.formFields = new ArrayList<>(); + } + this.formFields.add(formFieldsItem); + return this; + } + + /** + * A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + * @return formFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getFormFields() { + return formFields; + } + + + @JsonProperty(JSON_PROPERTY_FORM_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFormFields(@jakarta.annotation.Nullable List formFields) { + this.formFields = formFields; + } + + /** * Return true if this TemplateUpdateRequest object is equal to o. */ @@ -231,12 +270,13 @@ public boolean equals(Object o) { Objects.equals(this.allowFormView, templateUpdateRequest.allowFormView) && Objects.equals(this.title, templateUpdateRequest.title) && Objects.equals(this.subject, templateUpdateRequest.subject) && - Objects.equals(this.message, templateUpdateRequest.message); + Objects.equals(this.message, templateUpdateRequest.message) && + Objects.equals(this.formFields, templateUpdateRequest.formFields); } @Override public int hashCode() { - return Objects.hash(ccRoles, allowFormView, title, subject, message); + return Objects.hash(ccRoles, allowFormView, title, subject, message, formFields); } @Override @@ -248,6 +288,7 @@ public String toString() { sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" formFields: ").append(toIndentedString(formFields)).append("\n"); sb.append("}"); return sb.toString(); } @@ -351,6 +392,25 @@ public Map createFormData() throws ApiException { map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); } } + if (formFields != null) { + if (isFileTypeOrListOfFiles(formFields)) { + fileTypeFound = true; + } + + if (formFields.getClass().equals(java.io.File.class) || + formFields.getClass().equals(Integer.class) || + formFields.getClass().equals(String.class) || + formFields.getClass().isEnum()) { + map.put("form_fields", formFields); + } else if (isListOfFile(formFields)) { + for(int i = 0; i< getListSize(formFields); i++) { + map.put("form_fields[" + i + "]", getFromList(formFields, i)); + } + } + else { + map.put("form_fields", JSON.getDefault().getMapper().writeValueAsString(formFields)); + } + } } catch (Exception e) { throw new ApiException(e); } diff --git a/sdks/node/README.md b/sdks/node/README.md index ad01065c0..eb324de36 100644 --- a/sdks/node/README.md +++ b/sdks/node/README.md @@ -147,7 +147,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TemplateApi* | [**templateGet**](./docs/api/TemplateApi.md#templateget) | **GET** /template/{template_id} | Get Template | | *TemplateApi* | [**templateList**](./docs/api/TemplateApi.md#templatelist) | **GET** /template/list | List Templates | | *TemplateApi* | [**templateRemoveUser**](./docs/api/TemplateApi.md#templateremoveuser) | **POST** /template/remove_user/{template_id} | Remove User from Template | -| *TemplateApi* | [**templateUpdate**](./docs/api/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Edit Template | +| *TemplateApi* | [**templateUpdate**](./docs/api/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Update Template | | *TemplateApi* | [**templateUpdateFiles**](./docs/api/TemplateApi.md#templateupdatefiles) | **POST** /template/update_files/{template_id} | Update Template Files | | *UnclaimedDraftApi* | [**unclaimedDraftCreate**](./docs/api/UnclaimedDraftApi.md#unclaimeddraftcreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft | | *UnclaimedDraftApi* | [**unclaimedDraftCreateEmbedded**](./docs/api/UnclaimedDraftApi.md#unclaimeddraftcreateembedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft | @@ -282,6 +282,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SubTemplateRole](./docs/model/SubTemplateRole.md) - [SubUnclaimedDraftSigner](./docs/model/SubUnclaimedDraftSigner.md) - [SubUnclaimedDraftTemplateSigner](./docs/model/SubUnclaimedDraftTemplateSigner.md) +- [SubUpdateFormField](./docs/model/SubUpdateFormField.md) - [SubWhiteLabelingOptions](./docs/model/SubWhiteLabelingOptions.md) - [TeamAddMemberRequest](./docs/model/TeamAddMemberRequest.md) - [TeamCreateRequest](./docs/model/TeamCreateRequest.md) diff --git a/sdks/node/api/templateApi.ts b/sdks/node/api/templateApi.ts index 6cc43a036..49f7f54bd 100644 --- a/sdks/node/api/templateApi.ts +++ b/sdks/node/api/templateApi.ts @@ -1508,8 +1508,8 @@ export class TemplateApi { }); } /** - * Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. - * @summary Edit Template + * Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + * @summary Update Template * @param templateId The ID of the template to update. * @param templateUpdateRequest * @param options diff --git a/sdks/node/dist/api.js b/sdks/node/dist/api.js index 98b4dd3b5..4c5a18ded 100644 --- a/sdks/node/dist/api.js +++ b/sdks/node/dist/api.js @@ -13286,6 +13286,7 @@ __export(api_exports, { SubTemplateRole: () => SubTemplateRole, SubUnclaimedDraftSigner: () => SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner: () => SubUnclaimedDraftTemplateSigner, + SubUpdateFormField: () => SubUpdateFormField, SubWhiteLabelingOptions: () => SubWhiteLabelingOptions, TeamAddMemberRequest: () => TeamAddMemberRequest, TeamApi: () => TeamApi, @@ -23311,6 +23312,34 @@ var SubUnclaimedDraftTemplateSigner = class _SubUnclaimedDraftTemplateSigner { } }; +// model/subUpdateFormField.ts +var SubUpdateFormField = class _SubUpdateFormField { + static { + this.discriminator = void 0; + } + static { + this.attributeTypeMap = [ + { + name: "apiId", + baseName: "api_id", + type: "string" + }, + { + name: "name", + baseName: "name", + type: "string" + } + ]; + } + static getAttributeTypeMap() { + return _SubUpdateFormField.attributeTypeMap; + } + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data) { + return ObjectSerializer.deserialize(data, "SubUpdateFormField"); + } +}; + // model/subWhiteLabelingOptions.ts var SubWhiteLabelingOptions = class _SubWhiteLabelingOptions { constructor() { @@ -25997,6 +26026,11 @@ var TemplateUpdateRequest = class _TemplateUpdateRequest { name: "message", baseName: "message", type: "string" + }, + { + name: "formFields", + baseName: "form_fields", + type: "Array" } ]; } @@ -27023,6 +27057,7 @@ var typeMap = { SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, + SubUpdateFormField, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, @@ -35575,8 +35610,8 @@ var TemplateApi = class { }); } /** - * Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. - * @summary Edit Template + * Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + * @summary Update Template * @param templateId The ID of the template to update. * @param templateUpdateRequest * @param options @@ -36689,6 +36724,7 @@ var APIS = [ SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, + SubUpdateFormField, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamApi, diff --git a/sdks/node/docs/api/TemplateApi.md b/sdks/node/docs/api/TemplateApi.md index 2afccaf4c..10ff634b2 100644 --- a/sdks/node/docs/api/TemplateApi.md +++ b/sdks/node/docs/api/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to https://api.hellosign.com/v3. | [**templateGet()**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template | | [**templateList()**](TemplateApi.md#templateList) | **GET** /template/list | List Templates | | [**templateRemoveUser()**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template | -| [**templateUpdate()**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template | +| [**templateUpdate()**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template | | [**templateUpdateFiles()**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files | @@ -732,9 +732,9 @@ apiCaller.templateRemoveUser( templateUpdate(templateId: string, templateUpdateRequest: TemplateUpdateRequest): TemplateGetResponse ``` -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### TypeScript Example diff --git a/sdks/node/docs/model/SubUpdateFormField.md b/sdks/node/docs/model/SubUpdateFormField.md new file mode 100644 index 000000000..2228401c2 --- /dev/null +++ b/sdks/node/docs/model/SubUpdateFormField.md @@ -0,0 +1,12 @@ +# # SubUpdateFormField + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `apiId`*_required_ | ```string``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```string``` | The new name of the field. If not passed the name will remain unchanged. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/docs/model/TemplateUpdateRequest.md b/sdks/node/docs/model/TemplateUpdateRequest.md index 1e38af681..68b4543ca 100644 --- a/sdks/node/docs/model/TemplateUpdateRequest.md +++ b/sdks/node/docs/model/TemplateUpdateRequest.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `title` | ```string``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```string``` | The new default template email subject. | | | `message` | ```string``` | The new default template email message. | | +| `formFields` | [```Array```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/node/model/index.ts b/sdks/node/model/index.ts index 8215317b9..cd4da181f 100644 --- a/sdks/node/model/index.ts +++ b/sdks/node/model/index.ts @@ -138,6 +138,7 @@ import { SubTeamResponse } from "./subTeamResponse"; import { SubTemplateRole } from "./subTemplateRole"; import { SubUnclaimedDraftSigner } from "./subUnclaimedDraftSigner"; import { SubUnclaimedDraftTemplateSigner } from "./subUnclaimedDraftTemplateSigner"; +import { SubUpdateFormField } from "./subUpdateFormField"; import { SubWhiteLabelingOptions } from "./subWhiteLabelingOptions"; import { TeamAddMemberRequest } from "./teamAddMemberRequest"; import { TeamCreateRequest } from "./teamCreateRequest"; @@ -392,6 +393,7 @@ export let typeMap: { [index: string]: any } = { SubTemplateRole: SubTemplateRole, SubUnclaimedDraftSigner: SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner: SubUnclaimedDraftTemplateSigner, + SubUpdateFormField: SubUpdateFormField, SubWhiteLabelingOptions: SubWhiteLabelingOptions, TeamAddMemberRequest: TeamAddMemberRequest, TeamCreateRequest: TeamCreateRequest, @@ -620,6 +622,7 @@ export { SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, + SubUpdateFormField, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, diff --git a/sdks/node/model/subUpdateFormField.ts b/sdks/node/model/subUpdateFormField.ts new file mode 100644 index 000000000..50f206cf7 --- /dev/null +++ b/sdks/node/model/subUpdateFormField.ts @@ -0,0 +1,60 @@ +/** + * The MIT License (MIT) + * + * Copyright (C) 2023 dropbox.com + * + * 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. + */ + +import { AttributeTypeMap, ObjectSerializer } from "./"; + +export class SubUpdateFormField { + /** + * The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + */ + "apiId": string; + /** + * The new name of the field. If not passed the name will remain unchanged. + */ + "name"?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: AttributeTypeMap = [ + { + name: "apiId", + baseName: "api_id", + type: "string", + }, + { + name: "name", + baseName: "name", + type: "string", + }, + ]; + + static getAttributeTypeMap(): AttributeTypeMap { + return SubUpdateFormField.attributeTypeMap; + } + + /** Attempt to instantiate and hydrate a new instance of this class */ + static init(data: any): SubUpdateFormField { + return ObjectSerializer.deserialize(data, "SubUpdateFormField"); + } +} diff --git a/sdks/node/model/templateUpdateRequest.ts b/sdks/node/model/templateUpdateRequest.ts index 990a6a339..b6e94e6e0 100644 --- a/sdks/node/model/templateUpdateRequest.ts +++ b/sdks/node/model/templateUpdateRequest.ts @@ -23,6 +23,7 @@ */ import { AttributeTypeMap, ObjectSerializer } from "./"; +import { SubUpdateFormField } from "./subUpdateFormField"; export class TemplateUpdateRequest { /** @@ -45,6 +46,10 @@ export class TemplateUpdateRequest { * The new default template email message. */ "message"?: string; + /** + * A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + */ + "formFields"?: Array; static discriminator: string | undefined = undefined; @@ -74,6 +79,11 @@ export class TemplateUpdateRequest { baseName: "message", type: "string", }, + { + name: "formFields", + baseName: "form_fields", + type: "Array", + }, ]; static getAttributeTypeMap(): AttributeTypeMap { diff --git a/sdks/node/types/model/index.d.ts b/sdks/node/types/model/index.d.ts index 5b00b530c..097631a55 100644 --- a/sdks/node/types/model/index.d.ts +++ b/sdks/node/types/model/index.d.ts @@ -126,6 +126,7 @@ import { SubTeamResponse } from "./subTeamResponse"; import { SubTemplateRole } from "./subTemplateRole"; import { SubUnclaimedDraftSigner } from "./subUnclaimedDraftSigner"; import { SubUnclaimedDraftTemplateSigner } from "./subUnclaimedDraftTemplateSigner"; +import { SubUpdateFormField } from "./subUpdateFormField"; import { SubWhiteLabelingOptions } from "./subWhiteLabelingOptions"; import { TeamAddMemberRequest } from "./teamAddMemberRequest"; import { TeamCreateRequest } from "./teamCreateRequest"; @@ -198,4 +199,4 @@ export declare let enumsMap: { export declare let typeMap: { [index: string]: any; }; -export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, TemplateUpdateRequest, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; +export { AccountCreateRequest, AccountCreateResponse, AccountGetResponse, AccountResponse, AccountResponseQuotas, AccountResponseUsage, AccountUpdateRequest, AccountVerifyRequest, AccountVerifyResponse, AccountVerifyResponseAccount, ApiAppCreateRequest, ApiAppGetResponse, ApiAppListResponse, ApiAppResponse, ApiAppResponseOAuth, ApiAppResponseOptions, ApiAppResponseOwnerAccount, ApiAppResponseWhiteLabelingOptions, ApiAppUpdateRequest, ApiKeyAuth, AttributeTypeMap, Authentication, BulkSendJobGetResponse, BulkSendJobGetResponseSignatureRequests, BulkSendJobListResponse, BulkSendJobResponse, BulkSendJobSendResponse, EmbeddedEditUrlRequest, EmbeddedEditUrlResponse, EmbeddedEditUrlResponseEmbedded, EmbeddedSignUrlResponse, EmbeddedSignUrlResponseEmbedded, ErrorResponse, ErrorResponseError, EventCallbackHelper, EventCallbackRequest, EventCallbackRequestEvent, EventCallbackRequestEventMetadata, FaxGetResponse, FaxLineAddUserRequest, FaxLineAreaCodeGetCountryEnum, FaxLineAreaCodeGetProvinceEnum, FaxLineAreaCodeGetResponse, FaxLineAreaCodeGetStateEnum, FaxLineCreateRequest, FaxLineDeleteRequest, FaxLineListResponse, FaxLineRemoveUserRequest, FaxLineResponse, FaxLineResponseFaxLine, FaxListResponse, FaxResponse, FaxResponseTransmission, FaxSendRequest, FileResponse, FileResponseDataUri, HttpBasicAuth, HttpBearerAuth, Interceptor, ListInfoResponse, OAuth, OAuthTokenGenerateRequest, OAuthTokenRefreshRequest, OAuthTokenResponse, ObjectSerializer, ReportCreateRequest, ReportCreateResponse, ReportResponse, RequestDetailedFile, RequestFile, SignatureRequestBulkCreateEmbeddedWithTemplateRequest, SignatureRequestBulkSendWithTemplateRequest, SignatureRequestCreateEmbeddedRequest, SignatureRequestCreateEmbeddedWithTemplateRequest, SignatureRequestEditEmbeddedRequest, SignatureRequestEditEmbeddedWithTemplateRequest, SignatureRequestEditRequest, SignatureRequestEditWithTemplateRequest, SignatureRequestGetResponse, SignatureRequestListResponse, SignatureRequestRemindRequest, SignatureRequestResponse, SignatureRequestResponseAttachment, SignatureRequestResponseCustomFieldBase, SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText, SignatureRequestResponseCustomFieldTypeEnum, SignatureRequestResponseDataBase, SignatureRequestResponseDataTypeEnum, SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge, SignatureRequestResponseSignatures, SignatureRequestSendRequest, SignatureRequestSendWithTemplateRequest, SignatureRequestUpdateRequest, SubAttachment, SubBulkSignerList, SubBulkSignerListCustomField, SubCC, SubCustomField, SubEditorOptions, SubFieldOptions, SubFormFieldGroup, SubFormFieldRule, SubFormFieldRuleAction, SubFormFieldRuleTrigger, SubFormFieldsPerDocumentBase, SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentFontEnum, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge, SubFormFieldsPerDocumentTypeEnum, SubMergeField, SubOAuth, SubOptions, SubSignatureRequestGroupedSigners, SubSignatureRequestSigner, SubSignatureRequestTemplateSigner, SubSigningOptions, SubTeamResponse, SubTemplateRole, SubUnclaimedDraftSigner, SubUnclaimedDraftTemplateSigner, SubUpdateFormField, SubWhiteLabelingOptions, TeamAddMemberRequest, TeamCreateRequest, TeamGetInfoResponse, TeamGetResponse, TeamInfoResponse, TeamInviteResponse, TeamInvitesResponse, TeamMemberResponse, TeamMembersResponse, TeamParentResponse, TeamRemoveMemberRequest, TeamResponse, TeamSubTeamsResponse, TeamUpdateRequest, TemplateAddUserRequest, TemplateCreateEmbeddedDraftRequest, TemplateCreateEmbeddedDraftResponse, TemplateCreateEmbeddedDraftResponseTemplate, TemplateCreateRequest, TemplateCreateResponse, TemplateCreateResponseTemplate, TemplateGetResponse, TemplateListResponse, TemplateRemoveUserRequest, TemplateResponse, TemplateResponseAccount, TemplateResponseAccountQuota, TemplateResponseCCRole, TemplateResponseDocument, TemplateResponseDocumentCustomFieldBase, TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText, TemplateResponseDocumentFieldGroup, TemplateResponseDocumentFieldGroupRule, TemplateResponseDocumentFormFieldBase, TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText, TemplateResponseDocumentStaticFieldBase, TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText, TemplateResponseFieldAvgTextLength, TemplateResponseSignerRole, TemplateUpdateFilesRequest, TemplateUpdateFilesResponse, TemplateUpdateFilesResponseTemplate, TemplateUpdateRequest, UnclaimedDraftCreateEmbeddedRequest, UnclaimedDraftCreateEmbeddedWithTemplateRequest, UnclaimedDraftCreateRequest, UnclaimedDraftCreateResponse, UnclaimedDraftEditAndResendRequest, UnclaimedDraftResponse, VoidAuth, WarningResponse, }; diff --git a/sdks/node/types/model/subUpdateFormField.d.ts b/sdks/node/types/model/subUpdateFormField.d.ts new file mode 100644 index 000000000..545043ecd --- /dev/null +++ b/sdks/node/types/model/subUpdateFormField.d.ts @@ -0,0 +1,9 @@ +import { AttributeTypeMap } from "./"; +export declare class SubUpdateFormField { + "apiId": string; + "name"?: string; + static discriminator: string | undefined; + static attributeTypeMap: AttributeTypeMap; + static getAttributeTypeMap(): AttributeTypeMap; + static init(data: any): SubUpdateFormField; +} diff --git a/sdks/node/types/model/templateUpdateRequest.d.ts b/sdks/node/types/model/templateUpdateRequest.d.ts index 1ecd5055a..ff23398e1 100644 --- a/sdks/node/types/model/templateUpdateRequest.d.ts +++ b/sdks/node/types/model/templateUpdateRequest.d.ts @@ -1,10 +1,12 @@ import { AttributeTypeMap } from "./"; +import { SubUpdateFormField } from "./subUpdateFormField"; export declare class TemplateUpdateRequest { "ccRoles"?: Array; "allowFormView"?: boolean; "title"?: string; "subject"?: string; "message"?: string; + "formFields"?: Array; static discriminator: string | undefined; static attributeTypeMap: AttributeTypeMap; static getAttributeTypeMap(): AttributeTypeMap; diff --git a/sdks/php/README.md b/sdks/php/README.md index c94b62a8c..8d1fa2d17 100644 --- a/sdks/php/README.md +++ b/sdks/php/README.md @@ -215,7 +215,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | *TemplateApi* | [**templateGet**](docs/Api/TemplateApi.md#templateget) | **GET** /template/{template_id} | Get Template | | *TemplateApi* | [**templateList**](docs/Api/TemplateApi.md#templatelist) | **GET** /template/list | List Templates | | *TemplateApi* | [**templateRemoveUser**](docs/Api/TemplateApi.md#templateremoveuser) | **POST** /template/remove_user/{template_id} | Remove User from Template | -| *TemplateApi* | [**templateUpdate**](docs/Api/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Edit Template | +| *TemplateApi* | [**templateUpdate**](docs/Api/TemplateApi.md#templateupdate) | **POST** /template/update/{template_id} | Update Template | | *TemplateApi* | [**templateUpdateFiles**](docs/Api/TemplateApi.md#templateupdatefiles) | **POST** /template/update_files/{template_id} | Update Template Files | | *UnclaimedDraftApi* | [**unclaimedDraftCreate**](docs/Api/UnclaimedDraftApi.md#unclaimeddraftcreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft | | *UnclaimedDraftApi* | [**unclaimedDraftCreateEmbedded**](docs/Api/UnclaimedDraftApi.md#unclaimeddraftcreateembedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft | @@ -351,6 +351,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [SubTemplateRole](docs/Model/SubTemplateRole.md) - [SubUnclaimedDraftSigner](docs/Model/SubUnclaimedDraftSigner.md) - [SubUnclaimedDraftTemplateSigner](docs/Model/SubUnclaimedDraftTemplateSigner.md) +- [SubUpdateFormField](docs/Model/SubUpdateFormField.md) - [SubWhiteLabelingOptions](docs/Model/SubWhiteLabelingOptions.md) - [TeamAddMemberRequest](docs/Model/TeamAddMemberRequest.md) - [TeamCreateRequest](docs/Model/TeamCreateRequest.md) diff --git a/sdks/php/docs/Api/TemplateApi.md b/sdks/php/docs/Api/TemplateApi.md index 3288d0a45..196d99bfe 100644 --- a/sdks/php/docs/Api/TemplateApi.md +++ b/sdks/php/docs/Api/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to https://api.hellosign.com/v3. | [**templateGet()**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template | | [**templateList()**](TemplateApi.md#templateList) | **GET** /template/list | List Templates | | [**templateRemoveUser()**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template | -| [**templateUpdate()**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Edit Template | +| [**templateUpdate()**](TemplateApi.md#templateUpdate) | **POST** /template/update/{template_id} | Update Template | | [**templateUpdateFiles()**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files | @@ -760,9 +760,9 @@ try { ```php templateUpdate($template_id, $template_update_request): \Dropbox\Sign\Model\TemplateGetResponse ``` -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Example diff --git a/sdks/php/docs/Model/SubUpdateFormField.md b/sdks/php/docs/Model/SubUpdateFormField.md new file mode 100644 index 000000000..1398a7960 --- /dev/null +++ b/sdks/php/docs/Model/SubUpdateFormField.md @@ -0,0 +1,12 @@ +# # SubUpdateFormField + + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `api_id`*_required_ | ```string``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```string``` | The new name of the field. If not passed the name will remain unchanged. | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/docs/Model/TemplateUpdateRequest.md b/sdks/php/docs/Model/TemplateUpdateRequest.md index e6dcc2c30..bfca7b51d 100644 --- a/sdks/php/docs/Model/TemplateUpdateRequest.md +++ b/sdks/php/docs/Model/TemplateUpdateRequest.md @@ -11,5 +11,6 @@ Name | Type | Description | Notes | `title` | ```string``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```string``` | The new default template email subject. | | | `message` | ```string``` | The new default template email message. | | +| `form_fields` | [```\Dropbox\Sign\Model\SubUpdateFormField[]```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/sdks/php/src/Api/TemplateApi.php b/sdks/php/src/Api/TemplateApi.php index a0b7a8388..69a6937d1 100644 --- a/sdks/php/src/Api/TemplateApi.php +++ b/sdks/php/src/Api/TemplateApi.php @@ -3531,7 +3531,7 @@ public function templateRemoveUserRequest(string $template_id, Model\TemplateRem /** * Operation templateUpdate * - * Edit Template + * Update Template * * @param string $template_id The ID of the template to update. (required) * @param Model\TemplateUpdateRequest $template_update_request template_update_request (required) @@ -3549,7 +3549,7 @@ public function templateUpdate(string $template_id, Model\TemplateUpdateRequest /** * Operation templateUpdateWithHttpInfo * - * Edit Template + * Update Template * * @param string $template_id The ID of the template to update. (required) * @param Model\TemplateUpdateRequest $template_update_request (required) @@ -3687,7 +3687,7 @@ public function templateUpdateWithHttpInfo(string $template_id, Model\TemplateUp /** * Operation templateUpdateAsync * - * Edit Template + * Update Template * * @param string $template_id The ID of the template to update. (required) * @param Model\TemplateUpdateRequest $template_update_request (required) @@ -3710,7 +3710,7 @@ function ($response) { /** * Operation templateUpdateAsyncWithHttpInfo * - * Edit Template + * Update Template * * @param string $template_id The ID of the template to update. (required) * @param Model\TemplateUpdateRequest $template_update_request (required) diff --git a/sdks/php/src/Model/SubUpdateFormField.php b/sdks/php/src/Model/SubUpdateFormField.php new file mode 100644 index 000000000..9dcbeee00 --- /dev/null +++ b/sdks/php/src/Model/SubUpdateFormField.php @@ -0,0 +1,450 @@ + + */ +class SubUpdateFormField implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubUpdateFormField'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'api_id' => 'string', + 'name' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'api_id' => null, + 'name' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'api_id' => false, + 'name' => false, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'api_id' => 'api_id', + 'name' => 'name', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'api_id' => 'setApiId', + 'name' => 'setName', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'api_id' => 'getApiId', + 'name' => 'getName', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('api_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + } + + /** + * @deprecated use ::init() + */ + public static function fromArray(array $data): SubUpdateFormField + { + return self::init($data); + } + + /** + * Attempt to instantiate and hydrate a new instance of this class + */ + public static function init(array $data): SubUpdateFormField + { + /** @var SubUpdateFormField */ + return ObjectSerializer::deserialize( + $data, + SubUpdateFormField::class, + ); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string|int|object|array|mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['api_id'] === null) { + $invalidProperties[] = "'api_id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Gets api_id + * + * @return string + */ + public function getApiId() + { + return $this->container['api_id']; + } + + /** + * Sets api_id + * + * @param string $api_id The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + * + * @return self + */ + public function setApiId(string $api_id) + { + if (is_null($api_id)) { + throw new InvalidArgumentException('non-nullable api_id cannot be null'); + } + $this->container['api_id'] = $api_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The new name of the field. If not passed the name will remain unchanged. + * + * @return self + */ + public function setName(?string $name) + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + */ + #[ReturnTypeWillChange] + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + */ + #[ReturnTypeWillChange] + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @see https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + #[ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_UNESCAPED_SLASHES + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/sdks/php/src/Model/TemplateUpdateRequest.php b/sdks/php/src/Model/TemplateUpdateRequest.php index 49f28c0ec..4814f540f 100644 --- a/sdks/php/src/Model/TemplateUpdateRequest.php +++ b/sdks/php/src/Model/TemplateUpdateRequest.php @@ -62,6 +62,7 @@ class TemplateUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializ 'title' => 'string', 'subject' => 'string', 'message' => 'string', + 'form_fields' => '\Dropbox\Sign\Model\SubUpdateFormField[]', ]; /** @@ -77,6 +78,7 @@ class TemplateUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializ 'title' => null, 'subject' => null, 'message' => null, + 'form_fields' => null, ]; /** @@ -90,6 +92,7 @@ class TemplateUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializ 'title' => false, 'subject' => false, 'message' => false, + 'form_fields' => false, ]; /** @@ -175,6 +178,7 @@ public function isNullableSetToNull(string $property): bool 'title' => 'title', 'subject' => 'subject', 'message' => 'message', + 'form_fields' => 'form_fields', ]; /** @@ -188,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'title' => 'setTitle', 'subject' => 'setSubject', 'message' => 'setMessage', + 'form_fields' => 'setFormFields', ]; /** @@ -201,6 +206,7 @@ public function isNullableSetToNull(string $property): bool 'title' => 'getTitle', 'subject' => 'getSubject', 'message' => 'getMessage', + 'form_fields' => 'getFormFields', ]; /** @@ -264,6 +270,7 @@ public function __construct(?array $data = null) $this->setIfExists('title', $data ?? [], null); $this->setIfExists('subject', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('form_fields', $data ?? [], null); } /** @@ -476,6 +483,33 @@ public function setMessage(?string $message) return $this; } + /** + * Gets form_fields + * + * @return SubUpdateFormField[]|null + */ + public function getFormFields() + { + return $this->container['form_fields']; + } + + /** + * Sets form_fields + * + * @param SubUpdateFormField[]|null $form_fields A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + * + * @return self + */ + public function setFormFields(?array $form_fields) + { + if (is_null($form_fields)) { + throw new InvalidArgumentException('non-nullable form_fields cannot be null'); + } + $this->container['form_fields'] = $form_fields; + + return $this; + } + /** * Returns true if offset exists. False otherwise. * diff --git a/sdks/python/README.md b/sdks/python/README.md index 16360a95f..ccc6d09d3 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -171,7 +171,7 @@ Class | Method | HTTP request | Description ```TemplateApi``` | [```template_get```](docs/TemplateApi.md#template_get) | ```GET /template/{template_id}``` | Get Template| ```TemplateApi``` | [```template_list```](docs/TemplateApi.md#template_list) | ```GET /template/list``` | List Templates| ```TemplateApi``` | [```template_remove_user```](docs/TemplateApi.md#template_remove_user) | ```POST /template/remove_user/{template_id}``` | Remove User from Template| -```TemplateApi``` | [```template_update```](docs/TemplateApi.md#template_update) | ```POST /template/update/{template_id}``` | Edit Template| +```TemplateApi``` | [```template_update```](docs/TemplateApi.md#template_update) | ```POST /template/update/{template_id}``` | Update Template| ```TemplateApi``` | [```template_update_files```](docs/TemplateApi.md#template_update_files) | ```POST /template/update_files/{template_id}``` | Update Template Files| |```UnclaimedDraftApi``` | [```unclaimed_draft_create```](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | ```POST /unclaimed_draft/create``` | Create Unclaimed Draft| ```UnclaimedDraftApi``` | [```unclaimed_draft_create_embedded```](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | ```POST /unclaimed_draft/create_embedded``` | Create Embedded Unclaimed Draft| @@ -307,6 +307,7 @@ Class | Method | HTTP request | Description - [SubTemplateRole](docs/SubTemplateRole.md) - [SubUnclaimedDraftSigner](docs/SubUnclaimedDraftSigner.md) - [SubUnclaimedDraftTemplateSigner](docs/SubUnclaimedDraftTemplateSigner.md) + - [SubUpdateFormField](docs/SubUpdateFormField.md) - [SubWhiteLabelingOptions](docs/SubWhiteLabelingOptions.md) - [TeamAddMemberRequest](docs/TeamAddMemberRequest.md) - [TeamCreateRequest](docs/TeamCreateRequest.md) diff --git a/sdks/python/docs/SubUpdateFormField.md b/sdks/python/docs/SubUpdateFormField.md new file mode 100644 index 000000000..f227abfda --- /dev/null +++ b/sdks/python/docs/SubUpdateFormField.md @@ -0,0 +1,13 @@ +# SubUpdateFormField + + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +| `api_id`*_required_ | ```str``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```str``` | The new name of the field. If not passed the name will remain unchanged. | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index fb39b718e..3ab262ddb 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description |[```template_get```](TemplateApi.md#template_get) | ```GET /template/{template_id}``` | Get Template| |[```template_list```](TemplateApi.md#template_list) | ```GET /template/list``` | List Templates| |[```template_remove_user```](TemplateApi.md#template_remove_user) | ```POST /template/remove_user/{template_id}``` | Remove User from Template| -|[```template_update```](TemplateApi.md#template_update) | ```POST /template/update/{template_id}``` | Edit Template| +|[```template_update```](TemplateApi.md#template_update) | ```POST /template/update/{template_id}``` | Update Template| |[```template_update_files```](TemplateApi.md#template_update_files) | ```POST /template/update_files/{template_id}``` | Update Template Files| @@ -827,9 +827,9 @@ with ApiClient(configuration) as api_client: # ```template_update``` > ```TemplateGetResponse template_update(template_id, template_update_request)``` -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Example diff --git a/sdks/python/docs/TemplateUpdateRequest.md b/sdks/python/docs/TemplateUpdateRequest.md index e12fa3274..0b43db639 100644 --- a/sdks/python/docs/TemplateUpdateRequest.md +++ b/sdks/python/docs/TemplateUpdateRequest.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes | `title` | ```str``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```str``` | The new default template email subject. | | | `message` | ```str``` | The new default template email message. | | +| `form_fields` | [```List[SubUpdateFormField]```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index 68fc1be94..434f62d03 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -276,6 +276,7 @@ from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( SubUnclaimedDraftTemplateSigner, ) +from dropbox_sign.models.sub_update_form_field import SubUpdateFormField from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest from dropbox_sign.models.team_create_request import TeamCreateRequest diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index 8a43a9da1..ec5545853 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -2916,9 +2916,9 @@ def template_update( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> TemplateGetResponse: - """Edit Template + """Update Template - Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. :param template_id: The ID of the template to update. (required) :type template_id: str @@ -2987,9 +2987,9 @@ def template_update_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[TemplateGetResponse]: - """Edit Template + """Update Template - Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. :param template_id: The ID of the template to update. (required) :type template_id: str @@ -3058,9 +3058,9 @@ def template_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Edit Template + """Update Template - Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. :param template_id: The ID of the template to update. (required) :type template_id: str diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index b4e421f19..9608ce6eb 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -259,6 +259,7 @@ from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( SubUnclaimedDraftTemplateSigner, ) +from dropbox_sign.models.sub_update_form_field import SubUpdateFormField from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest from dropbox_sign.models.team_create_request import TeamCreateRequest diff --git a/sdks/python/dropbox_sign/models/sub_update_form_field.py b/sdks/python/dropbox_sign/models/sub_update_form_field.py new file mode 100644 index 000000000..b997ef564 --- /dev/null +++ b/sdks/python/dropbox_sign/models/sub_update_form_field.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" +Dropbox Sign API + +Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from typing import Tuple, Union +import io +from pydantic import StrictBool + + +class SubUpdateFormField(BaseModel): + """ + SubUpdateFormField + """ # noqa: E501 + + api_id: StrictStr = Field( + description="The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found" + ) + name: Optional[StrictStr] = Field( + default=None, + description="The new name of the field. If not passed the name will remain unchanged.", + ) + __properties: ClassVar[List[str]] = ["api_id", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + arbitrary_types_allowed=True, + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: + data: List[Tuple[str, str]] = [] + + for key, value in self.to_dict(excluded_fields).items(): + if isinstance(value, (int, str, bool)): + data.append((key, value)) + else: + data.append((key, json.dumps(value, ensure_ascii=False))) + + return data + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubUpdateFormField from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubUpdateFormField from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"api_id": obj.get("api_id"), "name": obj.get("name")} + ) + return _obj + + @classmethod + def init(cls, data: Any) -> Self: + """ + Attempt to instantiate and hydrate a new instance of this class + """ + if isinstance(data, str): + data = json.loads(data) + + return cls.from_dict(data) + + @classmethod + def openapi_types(cls) -> Dict[str, str]: + return { + "api_id": "(str,)", + "name": "(str,)", + } + + @classmethod + def openapi_type_is_array(cls, property_name: str) -> bool: + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_update_request.py b/sdks/python/dropbox_sign/models/template_update_request.py index 3941b9fe0..1f924b35b 100644 --- a/sdks/python/dropbox_sign/models/template_update_request.py +++ b/sdks/python/dropbox_sign/models/template_update_request.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from dropbox_sign.models.sub_update_form_field import SubUpdateFormField from typing import Optional, Set from typing_extensions import Self from typing import Tuple, Union @@ -51,12 +52,17 @@ class TemplateUpdateRequest(BaseModel): message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( default=None, description="The new default template email message." ) + form_fields: Optional[List[SubUpdateFormField]] = Field( + default=None, + description="A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field.", + ) __properties: ClassVar[List[str]] = [ "cc_roles", "allow_form_view", "title", "subject", "message", + "form_fields", ] model_config = ConfigDict( @@ -109,6 +115,13 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in form_fields (list) + _items = [] + if self.form_fields: + for _item_form_fields in self.form_fields: + if _item_form_fields: + _items.append(_item_form_fields.to_dict()) + _dict["form_fields"] = _items return _dict @classmethod @@ -127,6 +140,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "title": obj.get("title"), "subject": obj.get("subject"), "message": obj.get("message"), + "form_fields": ( + [ + SubUpdateFormField.from_dict(_item) + for _item in obj["form_fields"] + ] + if obj.get("form_fields") is not None + else None + ), } ) return _obj @@ -149,10 +170,12 @@ def openapi_types(cls) -> Dict[str, str]: "title": "(str,)", "subject": "(str,)", "message": "(str,)", + "form_fields": "(List[SubUpdateFormField],)", } @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "cc_roles", + "form_fields", ] diff --git a/sdks/ruby/README.md b/sdks/ruby/README.md index 62186f8fa..147a91868 100644 --- a/sdks/ruby/README.md +++ b/sdks/ruby/README.md @@ -175,7 +175,7 @@ All URIs are relative to *https://api.hellosign.com/v3* |*Dropbox::Sign::TemplateApi* | [**template_get**](docs/TemplateApi.md#template_get) | **GET** /template/{template_id} | Get Template | |*Dropbox::Sign::TemplateApi* | [**template_list**](docs/TemplateApi.md#template_list) | **GET** /template/list | List Templates | |*Dropbox::Sign::TemplateApi* | [**template_remove_user**](docs/TemplateApi.md#template_remove_user) | **POST** /template/remove_user/{template_id} | Remove User from Template | -|*Dropbox::Sign::TemplateApi* | [**template_update**](docs/TemplateApi.md#template_update) | **POST** /template/update/{template_id} | Edit Template | +|*Dropbox::Sign::TemplateApi* | [**template_update**](docs/TemplateApi.md#template_update) | **POST** /template/update/{template_id} | Update Template | |*Dropbox::Sign::TemplateApi* | [**template_update_files**](docs/TemplateApi.md#template_update_files) | **POST** /template/update_files/{template_id} | Update Template Files | |*Dropbox::Sign::UnclaimedDraftApi* | [**unclaimed_draft_create**](docs/UnclaimedDraftApi.md#unclaimed_draft_create) | **POST** /unclaimed_draft/create | Create Unclaimed Draft | |*Dropbox::Sign::UnclaimedDraftApi* | [**unclaimed_draft_create_embedded**](docs/UnclaimedDraftApi.md#unclaimed_draft_create_embedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft | @@ -311,6 +311,7 @@ All URIs are relative to *https://api.hellosign.com/v3* - [Dropbox::Sign::SubTemplateRole](docs/SubTemplateRole.md) - [Dropbox::Sign::SubUnclaimedDraftSigner](docs/SubUnclaimedDraftSigner.md) - [Dropbox::Sign::SubUnclaimedDraftTemplateSigner](docs/SubUnclaimedDraftTemplateSigner.md) + - [Dropbox::Sign::SubUpdateFormField](docs/SubUpdateFormField.md) - [Dropbox::Sign::SubWhiteLabelingOptions](docs/SubWhiteLabelingOptions.md) - [Dropbox::Sign::TeamAddMemberRequest](docs/TeamAddMemberRequest.md) - [Dropbox::Sign::TeamCreateRequest](docs/TeamCreateRequest.md) diff --git a/sdks/ruby/docs/SubUpdateFormField.md b/sdks/ruby/docs/SubUpdateFormField.md new file mode 100644 index 000000000..f65ea0c51 --- /dev/null +++ b/sdks/ruby/docs/SubUpdateFormField.md @@ -0,0 +1,11 @@ +# Dropbox::Sign::SubUpdateFormField + + + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| `api_id`*_required_ | ```String``` | The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found | | +| `name` | ```String``` | The new name of the field. If not passed the name will remain unchanged. | | + diff --git a/sdks/ruby/docs/TemplateApi.md b/sdks/ruby/docs/TemplateApi.md index e59532feb..97f0df00b 100644 --- a/sdks/ruby/docs/TemplateApi.md +++ b/sdks/ruby/docs/TemplateApi.md @@ -14,7 +14,7 @@ All URIs are relative to *https://api.hellosign.com/v3* | [`template_get`](TemplateApi.md#template_get) | **GET** `/template/{template_id}` | Get Template | | [`template_list`](TemplateApi.md#template_list) | **GET** `/template/list` | List Templates | | [`template_remove_user`](TemplateApi.md#template_remove_user) | **POST** `/template/remove_user/{template_id}` | Remove User from Template | -| [`template_update`](TemplateApi.md#template_update) | **POST** `/template/update/{template_id}` | Edit Template | +| [`template_update`](TemplateApi.md#template_update) | **POST** `/template/update/{template_id}` | Update Template | | [`template_update_files`](TemplateApi.md#template_update_files) | **POST** `/template/update_files/{template_id}` | Update Template Files | @@ -857,9 +857,9 @@ end > ` template_update(template_id, template_update_request)` -Edit Template +Update Template -Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. +Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. ### Examples @@ -903,7 +903,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Edit Template + # Update Template data, status_code, headers = api_instance.template_update_with_http_info(template_id, template_update_request) p status_code # => 2xx p headers # => { ... } diff --git a/sdks/ruby/docs/TemplateUpdateRequest.md b/sdks/ruby/docs/TemplateUpdateRequest.md index b17d48fc6..5a7f641d7 100644 --- a/sdks/ruby/docs/TemplateUpdateRequest.md +++ b/sdks/ruby/docs/TemplateUpdateRequest.md @@ -11,4 +11,5 @@ | `title` | ```String``` | The title you want to assign to the SignatureRequest. | | | `subject` | ```String``` | The new default template email subject. | | | `message` | ```String``` | The new default template email message. | | +| `form_fields` | [```Array```](SubUpdateFormField.md) | A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. | | diff --git a/sdks/ruby/lib/dropbox-sign.rb b/sdks/ruby/lib/dropbox-sign.rb index 06035409a..42b56d949 100644 --- a/sdks/ruby/lib/dropbox-sign.rb +++ b/sdks/ruby/lib/dropbox-sign.rb @@ -122,6 +122,7 @@ require 'dropbox-sign/models/sub_template_role' require 'dropbox-sign/models/sub_unclaimed_draft_signer' require 'dropbox-sign/models/sub_unclaimed_draft_template_signer' +require 'dropbox-sign/models/sub_update_form_field' require 'dropbox-sign/models/sub_white_labeling_options' require 'dropbox-sign/models/team_add_member_request' require 'dropbox-sign/models/team_create_request' diff --git a/sdks/ruby/lib/dropbox-sign/api/template_api.rb b/sdks/ruby/lib/dropbox-sign/api/template_api.rb index 56957782a..39d4a6228 100644 --- a/sdks/ruby/lib/dropbox-sign/api/template_api.rb +++ b/sdks/ruby/lib/dropbox-sign/api/template_api.rb @@ -1031,8 +1031,8 @@ def template_remove_user_with_http_info(template_id, template_remove_user_reques return data, status_code, headers end - # Edit Template - # Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + # Update Template + # Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. # @param template_id [String] The ID of the template to update. # @param template_update_request [TemplateUpdateRequest] # @param [Hash] opts the optional parameters @@ -1042,8 +1042,8 @@ def template_update(template_id, template_update_request, opts = {}) data end - # Edit Template - # Edit template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. + # Update Template + # Update template fields. Every field is optional and the endpoint will only change whatever is provided. The fields not included in the request payload will remain unchanged. # @param template_id [String] The ID of the template to update. # @param template_update_request [TemplateUpdateRequest] # @param [Hash] opts the optional parameters diff --git a/sdks/ruby/lib/dropbox-sign/models/sub_update_form_field.rb b/sdks/ruby/lib/dropbox-sign/models/sub_update_form_field.rb new file mode 100644 index 000000000..0e9d10732 --- /dev/null +++ b/sdks/ruby/lib/dropbox-sign/models/sub_update_form_field.rb @@ -0,0 +1,278 @@ +=begin +#Dropbox Sign API + +#Dropbox Sign v3 API + +The version of the OpenAPI document: 3.0.0 +Contact: apisupport@hellosign.com +Generated by: https://openapi-generator.tech +Generator version: 7.12.0 + +=end + +require 'date' +require 'time' + +module Dropbox +end + +module Dropbox::Sign + class SubUpdateFormField + # The unique ID for this field. The endpoint will update an existing field with matching `api_id`, and warn you if no matches are found + # @return [String] + attr_accessor :api_id + + # The new name of the field. If not passed the name will remain unchanged. + # @return [String] + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'api_id' => :'api_id', + :'name' => :'name' + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'api_id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Returns attribute map of this model + parent + def self.merged_attributes + self.attribute_map + end + + # Attribute type mapping of this model + parent + def self.merged_types + self.openapi_types + end + + # Returns list of attributes with nullable: true of this model + parent + def self.merged_nullable + self.openapi_nullable + end + + # Attempt to instantiate and hydrate a new instance of this class + # @param [Object] data Data to be converted + # @return [SubUpdateFormField] + def self.init(data) + ApiClient.default.convert_to_type( + data, + "SubUpdateFormField" + ) || SubUpdateFormField.new + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Dropbox::Sign::SubUpdateFormField` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.merged_attributes.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Dropbox::Sign::SubUpdateFormField`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'api_id') + self.api_id = attributes[:'api_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @api_id.nil? + invalid_properties.push('invalid value for "api_id", api_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @api_id.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] api_id Value to be assigned + def api_id=(api_id) + if api_id.nil? + fail ArgumentError, 'api_id cannot be nil' + end + + @api_id = api_id + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_id == o.api_id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [api_id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attribute_map = self.class.merged_attributes + + self.class.merged_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + klass = Dropbox::Sign.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash(include_nil = true) + hash = {} + self.class.merged_attributes.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + next unless include_nil + is_nullable = self.class.merged_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value, include_nil) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value, include_nil = true) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v, include_nil) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v, include_nil) } + end + elsif value.respond_to? :to_hash + value.to_hash(include_nil) + else + value + end + end + end +end diff --git a/sdks/ruby/lib/dropbox-sign/models/template_update_request.rb b/sdks/ruby/lib/dropbox-sign/models/template_update_request.rb index 66f9b8408..0578713b1 100644 --- a/sdks/ruby/lib/dropbox-sign/models/template_update_request.rb +++ b/sdks/ruby/lib/dropbox-sign/models/template_update_request.rb @@ -38,6 +38,10 @@ class TemplateUpdateRequest # @return [String] attr_accessor :message + # A list of document form fields to update. The endpoint will not create or remove any fields. Every field must be identified by `api_id`, and the only supported change is renaming the field. + # @return [Array] + attr_accessor :form_fields + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -45,7 +49,8 @@ def self.attribute_map :'allow_form_view' => :'allow_form_view', :'title' => :'title', :'subject' => :'subject', - :'message' => :'message' + :'message' => :'message', + :'form_fields' => :'form_fields' } end @@ -66,7 +71,8 @@ def self.openapi_types :'allow_form_view' => :'Boolean', :'title' => :'String', :'subject' => :'String', - :'message' => :'String' + :'message' => :'String', + :'form_fields' => :'Array' } end @@ -138,6 +144,12 @@ def initialize(attributes = {}) if attributes.key?(:'message') self.message = attributes[:'message'] end + + if attributes.key?(:'form_fields') + if (value = attributes[:'form_fields']).is_a?(Array) + self.form_fields = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -192,7 +204,8 @@ def ==(o) allow_form_view == o.allow_form_view && title == o.title && subject == o.subject && - message == o.message + message == o.message && + form_fields == o.form_fields end # @see the `==` method @@ -204,7 +217,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cc_roles, allow_form_view, title, subject, message].hash + [cc_roles, allow_form_view, title, subject, message, form_fields].hash end # Builds the object from hash From 5569ff11c8ffeeee505478ec3d302145312f2147 Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 4 Aug 2025 13:25:01 -0500 Subject: [PATCH 3/5] Updates examples using OSEG --- examples/TemplateUpdateExample.cs | 19 ++++++++++++++++++- examples/TemplateUpdateExample.java | 14 ++++++++++++++ examples/TemplateUpdateExample.php | 16 +++++++++++++++- examples/TemplateUpdateExample.py | 16 ++++++++++++++++ examples/TemplateUpdateExample.rb | 14 ++++++++++++++ examples/TemplateUpdateExample.ts | 16 ++++++++++++++++ 6 files changed, 93 insertions(+), 2 deletions(-) diff --git a/examples/TemplateUpdateExample.cs b/examples/TemplateUpdateExample.cs index 23f5496fe..7333c79fd 100644 --- a/examples/TemplateUpdateExample.cs +++ b/examples/TemplateUpdateExample.cs @@ -17,6 +17,22 @@ public static void Run() config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; + var formFields1 = new SubUpdateFormField( + apiId: "uniqueIdHere_1", + name: "New name 1" + ); + + var formFields2 = new SubUpdateFormField( + apiId: "uniqueIdHere_2", + name: "New name 2" + ); + + var formFields = new List + { + formFields1, + formFields2, + }; + var templateUpdateRequest = new TemplateUpdateRequest( allowFormView: false, title: "Test Title", @@ -25,7 +41,8 @@ public static void Run() ccRoles: [ "CC Role 1", "CC Role 2", - ] + ], + formFields: formFields ); try diff --git a/examples/TemplateUpdateExample.java b/examples/TemplateUpdateExample.java index 1b69f2ace..a7b731a12 100644 --- a/examples/TemplateUpdateExample.java +++ b/examples/TemplateUpdateExample.java @@ -23,6 +23,19 @@ public static void main(String[] args) ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var formFields1 = new SubUpdateFormField(); + formFields1.apiId("uniqueIdHere_1"); + formFields1.name("New name 1"); + + var formFields2 = new SubUpdateFormField(); + formFields2.apiId("uniqueIdHere_2"); + formFields2.name("New name 2"); + + var formFields = new ArrayList(List.of ( + formFields1, + formFields2 + )); + var templateUpdateRequest = new TemplateUpdateRequest(); templateUpdateRequest.allowFormView(false); templateUpdateRequest.title("Test Title"); @@ -32,6 +45,7 @@ public static void main(String[] args) "CC Role 1", "CC Role 2" )); + templateUpdateRequest.formFields(formFields); try { diff --git a/examples/TemplateUpdateExample.php b/examples/TemplateUpdateExample.php index 6dadda6c5..a94ccf9cd 100644 --- a/examples/TemplateUpdateExample.php +++ b/examples/TemplateUpdateExample.php @@ -11,6 +11,19 @@ $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); +$form_fields_1 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_1") + ->setName("New name 1"); + +$form_fields_2 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_2") + ->setName("New name 2"); + +$form_fields = [ + $form_fields_1, + $form_fields_2, +]; + $template_update_request = (new Dropbox\Sign\Model\TemplateUpdateRequest()) ->setAllowFormView(false) ->setTitle("Test Title") @@ -19,7 +32,8 @@ ->setCcRoles([ "CC Role 1", "CC Role 2", - ]); + ]) + ->setFormFields($form_fields); try { $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdate( diff --git a/examples/TemplateUpdateExample.py b/examples/TemplateUpdateExample.py index b8c85862a..3baeae497 100644 --- a/examples/TemplateUpdateExample.py +++ b/examples/TemplateUpdateExample.py @@ -10,6 +10,21 @@ ) with ApiClient(configuration) as api_client: + form_fields_1 = models.SubUpdateFormField( + api_id="uniqueIdHere_1", + name="New name 1", + ) + + form_fields_2 = models.SubUpdateFormField( + api_id="uniqueIdHere_2", + name="New name 2", + ) + + form_fields = [ + form_fields_1, + form_fields_2, + ] + template_update_request = models.TemplateUpdateRequest( allow_form_view=False, title="Test Title", @@ -19,6 +34,7 @@ "CC Role 1", "CC Role 2", ], + form_fields=form_fields, ) try: diff --git a/examples/TemplateUpdateExample.rb b/examples/TemplateUpdateExample.rb index 393bd3653..19921eb35 100644 --- a/examples/TemplateUpdateExample.rb +++ b/examples/TemplateUpdateExample.rb @@ -6,6 +6,19 @@ # config.access_token = "YOUR_ACCESS_TOKEN" end +form_fields_1 = Dropbox::Sign::SubUpdateFormField.new +form_fields_1.api_id = "uniqueIdHere_1" +form_fields_1.name = "New name 1" + +form_fields_2 = Dropbox::Sign::SubUpdateFormField.new +form_fields_2.api_id = "uniqueIdHere_2" +form_fields_2.name = "New name 2" + +form_fields = [ + form_fields_1, + form_fields_2, +] + template_update_request = Dropbox::Sign::TemplateUpdateRequest.new template_update_request.allow_form_view = false template_update_request.title = "Test Title" @@ -15,6 +28,7 @@ "CC Role 1", "CC Role 2", ] +template_update_request.form_fields = form_fields begin response = Dropbox::Sign::TemplateApi.new.template_update( diff --git a/examples/TemplateUpdateExample.ts b/examples/TemplateUpdateExample.ts index 62ca78172..4740cc51e 100644 --- a/examples/TemplateUpdateExample.ts +++ b/examples/TemplateUpdateExample.ts @@ -6,6 +6,21 @@ const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; +const formFields1: models.SubUpdateFormField = { + apiId: "uniqueIdHere_1", + name: "New name 1", +}; + +const formFields2: models.SubUpdateFormField = { + apiId: "uniqueIdHere_2", + name: "New name 2", +}; + +const formFields = [ + formFields1, + formFields2, +]; + const templateUpdateRequest: models.TemplateUpdateRequest = { allowFormView: false, title: "Test Title", @@ -15,6 +30,7 @@ const templateUpdateRequest: models.TemplateUpdateRequest = { "CC Role 1", "CC Role 2", ], + formFields: formFields, }; apiCaller.templateUpdate( From 97ecab58889394161501aa36bc3c361b825c606f Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 4 Aug 2025 13:40:18 -0500 Subject: [PATCH 4/5] Updates sandbox examples --- .../TemplateUpdateExample.cs | 19 ++++++++++++++++++- .../sign_sandbox/TemplateUpdateExample.java | 14 ++++++++++++++ sandbox/node/src/TemplateUpdateExample.ts | 16 ++++++++++++++++ sandbox/php/src/TemplateUpdateExample.php | 16 +++++++++++++++- sandbox/python/src/TemplateUpdateExample.py | 16 ++++++++++++++++ sandbox/ruby/src/TemplateUpdateExample.rb | 14 ++++++++++++++ 6 files changed, 93 insertions(+), 2 deletions(-) diff --git a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateExample.cs b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateExample.cs index 23f5496fe..7333c79fd 100644 --- a/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateExample.cs +++ b/sandbox/dotnet/src/Dropbox.SignSandbox/TemplateUpdateExample.cs @@ -17,6 +17,22 @@ public static void Run() config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; + var formFields1 = new SubUpdateFormField( + apiId: "uniqueIdHere_1", + name: "New name 1" + ); + + var formFields2 = new SubUpdateFormField( + apiId: "uniqueIdHere_2", + name: "New name 2" + ); + + var formFields = new List + { + formFields1, + formFields2, + }; + var templateUpdateRequest = new TemplateUpdateRequest( allowFormView: false, title: "Test Title", @@ -25,7 +41,8 @@ public static void Run() ccRoles: [ "CC Role 1", "CC Role 2", - ] + ], + formFields: formFields ); try diff --git a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateExample.java b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateExample.java index 1b69f2ace..a7b731a12 100644 --- a/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateExample.java +++ b/sandbox/java/src/main/java/com/dropbox/sign_sandbox/TemplateUpdateExample.java @@ -23,6 +23,19 @@ public static void main(String[] args) ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var formFields1 = new SubUpdateFormField(); + formFields1.apiId("uniqueIdHere_1"); + formFields1.name("New name 1"); + + var formFields2 = new SubUpdateFormField(); + formFields2.apiId("uniqueIdHere_2"); + formFields2.name("New name 2"); + + var formFields = new ArrayList(List.of ( + formFields1, + formFields2 + )); + var templateUpdateRequest = new TemplateUpdateRequest(); templateUpdateRequest.allowFormView(false); templateUpdateRequest.title("Test Title"); @@ -32,6 +45,7 @@ public static void main(String[] args) "CC Role 1", "CC Role 2" )); + templateUpdateRequest.formFields(formFields); try { diff --git a/sandbox/node/src/TemplateUpdateExample.ts b/sandbox/node/src/TemplateUpdateExample.ts index 62ca78172..4740cc51e 100644 --- a/sandbox/node/src/TemplateUpdateExample.ts +++ b/sandbox/node/src/TemplateUpdateExample.ts @@ -6,6 +6,21 @@ const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; +const formFields1: models.SubUpdateFormField = { + apiId: "uniqueIdHere_1", + name: "New name 1", +}; + +const formFields2: models.SubUpdateFormField = { + apiId: "uniqueIdHere_2", + name: "New name 2", +}; + +const formFields = [ + formFields1, + formFields2, +]; + const templateUpdateRequest: models.TemplateUpdateRequest = { allowFormView: false, title: "Test Title", @@ -15,6 +30,7 @@ const templateUpdateRequest: models.TemplateUpdateRequest = { "CC Role 1", "CC Role 2", ], + formFields: formFields, }; apiCaller.templateUpdate( diff --git a/sandbox/php/src/TemplateUpdateExample.php b/sandbox/php/src/TemplateUpdateExample.php index 6dadda6c5..a94ccf9cd 100644 --- a/sandbox/php/src/TemplateUpdateExample.php +++ b/sandbox/php/src/TemplateUpdateExample.php @@ -11,6 +11,19 @@ $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); +$form_fields_1 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_1") + ->setName("New name 1"); + +$form_fields_2 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_2") + ->setName("New name 2"); + +$form_fields = [ + $form_fields_1, + $form_fields_2, +]; + $template_update_request = (new Dropbox\Sign\Model\TemplateUpdateRequest()) ->setAllowFormView(false) ->setTitle("Test Title") @@ -19,7 +32,8 @@ ->setCcRoles([ "CC Role 1", "CC Role 2", - ]); + ]) + ->setFormFields($form_fields); try { $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdate( diff --git a/sandbox/python/src/TemplateUpdateExample.py b/sandbox/python/src/TemplateUpdateExample.py index b8c85862a..3baeae497 100644 --- a/sandbox/python/src/TemplateUpdateExample.py +++ b/sandbox/python/src/TemplateUpdateExample.py @@ -10,6 +10,21 @@ ) with ApiClient(configuration) as api_client: + form_fields_1 = models.SubUpdateFormField( + api_id="uniqueIdHere_1", + name="New name 1", + ) + + form_fields_2 = models.SubUpdateFormField( + api_id="uniqueIdHere_2", + name="New name 2", + ) + + form_fields = [ + form_fields_1, + form_fields_2, + ] + template_update_request = models.TemplateUpdateRequest( allow_form_view=False, title="Test Title", @@ -19,6 +34,7 @@ "CC Role 1", "CC Role 2", ], + form_fields=form_fields, ) try: diff --git a/sandbox/ruby/src/TemplateUpdateExample.rb b/sandbox/ruby/src/TemplateUpdateExample.rb index 393bd3653..19921eb35 100644 --- a/sandbox/ruby/src/TemplateUpdateExample.rb +++ b/sandbox/ruby/src/TemplateUpdateExample.rb @@ -6,6 +6,19 @@ # config.access_token = "YOUR_ACCESS_TOKEN" end +form_fields_1 = Dropbox::Sign::SubUpdateFormField.new +form_fields_1.api_id = "uniqueIdHere_1" +form_fields_1.name = "New name 1" + +form_fields_2 = Dropbox::Sign::SubUpdateFormField.new +form_fields_2.api_id = "uniqueIdHere_2" +form_fields_2.name = "New name 2" + +form_fields = [ + form_fields_1, + form_fields_2, +] + template_update_request = Dropbox::Sign::TemplateUpdateRequest.new template_update_request.allow_form_view = false template_update_request.title = "Test Title" @@ -15,6 +28,7 @@ "CC Role 1", "CC Role 2", ] +template_update_request.form_fields = form_fields begin response = Dropbox::Sign::TemplateApi.new.template_update( From 92b6a53522d3d3040c71e631a0f13daa42a3dd2c Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 4 Aug 2025 13:47:20 -0500 Subject: [PATCH 5/5] Update md file --- sdks/dotnet/docs/TemplateApi.md | 19 ++++++++++++++++++- sdks/java-v1/docs/TemplateApi.md | 14 ++++++++++++++ sdks/java-v2/docs/TemplateApi.md | 14 ++++++++++++++ sdks/node/docs/api/TemplateApi.md | 16 ++++++++++++++++ sdks/php/docs/Api/TemplateApi.md | 16 +++++++++++++++- sdks/python/docs/TemplateApi.md | 16 ++++++++++++++++ sdks/ruby/docs/TemplateApi.md | 14 ++++++++++++++ 7 files changed, 107 insertions(+), 2 deletions(-) diff --git a/sdks/dotnet/docs/TemplateApi.md b/sdks/dotnet/docs/TemplateApi.md index 6e3e49113..c11d86fff 100644 --- a/sdks/dotnet/docs/TemplateApi.md +++ b/sdks/dotnet/docs/TemplateApi.md @@ -1173,6 +1173,22 @@ public class TemplateUpdateExample config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; + var formFields1 = new SubUpdateFormField( + apiId: "uniqueIdHere_1", + name: "New name 1" + ); + + var formFields2 = new SubUpdateFormField( + apiId: "uniqueIdHere_2", + name: "New name 2" + ); + + var formFields = new List + { + formFields1, + formFields2, + }; + var templateUpdateRequest = new TemplateUpdateRequest( allowFormView: false, title: "Test Title", @@ -1181,7 +1197,8 @@ public class TemplateUpdateExample ccRoles: [ "CC Role 1", "CC Role 2", - ] + ], + formFields: formFields ); try diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md index 95a78d81e..ad8f86a70 100644 --- a/sdks/java-v1/docs/TemplateApi.md +++ b/sdks/java-v1/docs/TemplateApi.md @@ -1024,6 +1024,19 @@ public class TemplateUpdateExample ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var formFields1 = new SubUpdateFormField(); + formFields1.apiId("uniqueIdHere_1"); + formFields1.name("New name 1"); + + var formFields2 = new SubUpdateFormField(); + formFields2.apiId("uniqueIdHere_2"); + formFields2.name("New name 2"); + + var formFields = new ArrayList(List.of ( + formFields1, + formFields2 + )); + var templateUpdateRequest = new TemplateUpdateRequest(); templateUpdateRequest.allowFormView(false); templateUpdateRequest.title("Test Title"); @@ -1033,6 +1046,7 @@ public class TemplateUpdateExample "CC Role 1", "CC Role 2" )); + templateUpdateRequest.formFields(formFields); try { diff --git a/sdks/java-v2/docs/TemplateApi.md b/sdks/java-v2/docs/TemplateApi.md index 95a78d81e..ad8f86a70 100644 --- a/sdks/java-v2/docs/TemplateApi.md +++ b/sdks/java-v2/docs/TemplateApi.md @@ -1024,6 +1024,19 @@ public class TemplateUpdateExample ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); + var formFields1 = new SubUpdateFormField(); + formFields1.apiId("uniqueIdHere_1"); + formFields1.name("New name 1"); + + var formFields2 = new SubUpdateFormField(); + formFields2.apiId("uniqueIdHere_2"); + formFields2.name("New name 2"); + + var formFields = new ArrayList(List.of ( + formFields1, + formFields2 + )); + var templateUpdateRequest = new TemplateUpdateRequest(); templateUpdateRequest.allowFormView(false); templateUpdateRequest.title("Test Title"); @@ -1033,6 +1046,7 @@ public class TemplateUpdateExample "CC Role 1", "CC Role 2" )); + templateUpdateRequest.formFields(formFields); try { diff --git a/sdks/node/docs/api/TemplateApi.md b/sdks/node/docs/api/TemplateApi.md index 10ff634b2..6fee7936f 100644 --- a/sdks/node/docs/api/TemplateApi.md +++ b/sdks/node/docs/api/TemplateApi.md @@ -747,6 +747,21 @@ const apiCaller = new api.TemplateApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; +const formFields1: models.SubUpdateFormField = { + apiId: "uniqueIdHere_1", + name: "New name 1", +}; + +const formFields2: models.SubUpdateFormField = { + apiId: "uniqueIdHere_2", + name: "New name 2", +}; + +const formFields = [ + formFields1, + formFields2, +]; + const templateUpdateRequest: models.TemplateUpdateRequest = { allowFormView: false, title: "Test Title", @@ -756,6 +771,7 @@ const templateUpdateRequest: models.TemplateUpdateRequest = { "CC Role 1", "CC Role 2", ], + formFields: formFields, }; apiCaller.templateUpdate( diff --git a/sdks/php/docs/Api/TemplateApi.md b/sdks/php/docs/Api/TemplateApi.md index 196d99bfe..d3850f71b 100644 --- a/sdks/php/docs/Api/TemplateApi.md +++ b/sdks/php/docs/Api/TemplateApi.md @@ -780,6 +780,19 @@ $config = Dropbox\Sign\Configuration::getDefaultConfiguration(); $config->setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); +$form_fields_1 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_1") + ->setName("New name 1"); + +$form_fields_2 = (new Dropbox\Sign\Model\SubUpdateFormField()) + ->setApiId("uniqueIdHere_2") + ->setName("New name 2"); + +$form_fields = [ + $form_fields_1, + $form_fields_2, +]; + $template_update_request = (new Dropbox\Sign\Model\TemplateUpdateRequest()) ->setAllowFormView(false) ->setTitle("Test Title") @@ -788,7 +801,8 @@ $template_update_request = (new Dropbox\Sign\Model\TemplateUpdateRequest()) ->setCcRoles([ "CC Role 1", "CC Role 2", - ]); + ]) + ->setFormFields($form_fields); try { $response = (new Dropbox\Sign\Api\TemplateApi(config: $config))->templateUpdate( diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index 3ab262ddb..bb2544081 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -849,6 +849,21 @@ configuration = Configuration( ) with ApiClient(configuration) as api_client: + form_fields_1 = models.SubUpdateFormField( + api_id="uniqueIdHere_1", + name="New name 1", + ) + + form_fields_2 = models.SubUpdateFormField( + api_id="uniqueIdHere_2", + name="New name 2", + ) + + form_fields = [ + form_fields_1, + form_fields_2, + ] + template_update_request = models.TemplateUpdateRequest( allow_form_view=False, title="Test Title", @@ -858,6 +873,7 @@ with ApiClient(configuration) as api_client: "CC Role 1", "CC Role 2", ], + form_fields=form_fields, ) try: diff --git a/sdks/ruby/docs/TemplateApi.md b/sdks/ruby/docs/TemplateApi.md index 97f0df00b..7c9ccb405 100644 --- a/sdks/ruby/docs/TemplateApi.md +++ b/sdks/ruby/docs/TemplateApi.md @@ -872,6 +872,19 @@ Dropbox::Sign.configure do |config| # config.access_token = "YOUR_ACCESS_TOKEN" end +form_fields_1 = Dropbox::Sign::SubUpdateFormField.new +form_fields_1.api_id = "uniqueIdHere_1" +form_fields_1.name = "New name 1" + +form_fields_2 = Dropbox::Sign::SubUpdateFormField.new +form_fields_2.api_id = "uniqueIdHere_2" +form_fields_2.name = "New name 2" + +form_fields = [ + form_fields_1, + form_fields_2, +] + template_update_request = Dropbox::Sign::TemplateUpdateRequest.new template_update_request.allow_form_view = false template_update_request.title = "Test Title" @@ -881,6 +894,7 @@ template_update_request.cc_roles = [ "CC Role 1", "CC Role 2", ] +template_update_request.form_fields = form_fields begin response = Dropbox::Sign::TemplateApi.new.template_update(