docspring 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -4
- package/README.md +10 -6
- package/dist/ApiClient.js +3 -3
- package/dist/RequestSchemas.js +94 -15
- package/dist/WebhookSignature.js +86 -0
- package/dist/api/Client.js +193 -57
- package/dist/index.js +42 -0
- package/dist/model/AddTemplateFieldsRequest.js +2 -2
- package/dist/model/AiFieldNamingLanguage.js +1 -1
- package/dist/model/AuthenticationCheck.js +2 -2
- package/dist/model/BarcodeSymbology.js +1 -1
- package/dist/model/CheckCharacter.js +1 -1
- package/dist/model/CombinedFieldType.js +1 -1
- package/dist/model/CombinedPdf.js +4 -4
- package/dist/model/CombinedPdfFiles.js +2 -2
- package/dist/model/CombinedPdfList.js +2 -2
- package/dist/model/CombinedPdfSource.js +2 -2
- package/dist/model/CombinedPdfSourceInput.js +2 -2
- package/dist/model/CombinedPdfSourcePdf.js +2 -2
- package/dist/model/CombinedPdfSourceType.js +1 -1
- package/dist/model/CombinedPdfState.js +1 -1
- package/dist/model/CopyTemplateRequest.js +2 -2
- package/dist/model/CreateCombinedPdfRequest.js +3 -3
- package/dist/model/CreateCustomFileFromUploadRequest.js +2 -2
- package/dist/model/CreateFolderRequest.js +2 -2
- package/dist/model/CreateSignatureRequestEventRequest.js +2 -2
- package/dist/model/CreateSignatureRequestTokenRequest.js +2 -2
- package/dist/model/CreateSubmissionBatchRequest.js +2 -2
- package/dist/model/CreateSubmissionRequest.js +7 -7
- package/dist/model/CreateTemplatePreviewRequest.js +112 -0
- package/dist/model/CreateTemplateRequest.js +32 -13
- package/dist/model/CreateWebhookRequest.js +2 -2
- package/dist/model/CustomFile.js +2 -2
- package/dist/model/CustomFileList.js +2 -2
- package/dist/model/CustomFileSourcePdf.js +2 -2
- package/dist/model/ErrorCode.js +12 -2
- package/dist/model/ErrorDetail.js +3 -3
- package/dist/model/ErrorInfo.js +7 -7
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/ExpirationInterval.js +1 -1
- package/dist/model/Field.js +3 -3
- package/dist/model/FieldComparisonCondition.js +2 -2
- package/dist/model/FieldComparisonOperator.js +1 -1
- package/dist/model/FieldDependency.js +2 -2
- package/dist/model/FieldDependencyInput.js +2 -2
- package/dist/model/FieldDisplayType.js +1 -1
- package/dist/model/FieldEqualsCondition.js +2 -2
- package/dist/model/FieldEqualsOperator.js +1 -1
- package/dist/model/FieldGroup.js +6 -6
- package/dist/model/FieldGroupInput.js +3 -3
- package/dist/model/FieldGroupType.js +1 -1
- package/dist/model/FieldInCondition.js +2 -2
- package/dist/model/FieldInput.js +3 -3
- package/dist/model/FieldOverride.js +2 -2
- package/dist/model/FieldPresenceCondition.js +2 -2
- package/dist/model/FieldPresenceOperator.js +1 -1
- package/dist/model/FieldRangeCondition.js +2 -2
- package/dist/model/FieldReimportState.js +1 -1
- package/dist/model/FieldSetupLogic.js +1 -1
- package/dist/model/FieldSetupNaming.js +1 -1
- package/dist/model/FieldSetupSource.js +1 -1
- package/dist/model/FieldType.js +1 -1
- package/dist/model/Folder.js +2 -2
- package/dist/model/FolderList.js +2 -2
- package/dist/model/GenerateFilesFormat.js +16 -1
- package/dist/model/GenerateSubmissionFilesRequest.js +4 -4
- package/dist/model/GeneratedFile.js +7 -7
- package/dist/model/GeneratedFileState.js +1 -1
- package/dist/model/HtmlEngineOptions.js +2 -2
- package/dist/model/HtmlEngineOptionsInput.js +2 -2
- package/dist/model/ImageGravity.js +1 -1
- package/dist/model/ImageScaleType.js +1 -1
- package/dist/model/ModelCodeLanguage.js +7 -2
- package/dist/model/MoveFolderRequest.js +2 -2
- package/dist/model/MoveTemplateRequest.js +2 -2
- package/dist/model/NumberConditionType.js +1 -1
- package/dist/model/OutputFormat.js +11 -1
- package/dist/model/PageFormat.js +1 -1
- package/dist/model/PageImage.js +2 -2
- package/dist/model/PageImages.js +2 -2
- package/dist/model/PredefinedField.js +2 -2
- package/dist/model/PredefinedFieldInput.js +2 -2
- package/dist/model/PublishTemplateVersionRequest.js +2 -2
- package/dist/model/RemoveTemplateFieldsRequest.js +2 -2
- package/dist/model/RenameFolderRequest.js +2 -2
- package/dist/model/ReorderTemplateFieldsRequest.js +2 -2
- package/dist/model/RestoreTemplateVersionRequest.js +2 -2
- package/dist/model/ShapeType.js +1 -1
- package/dist/model/SignatureRequest.js +2 -2
- package/dist/model/SignatureRequestAuthSecondFactorType.js +1 -1
- package/dist/model/SignatureRequestAuthType.js +1 -1
- package/dist/model/SignatureRequestEvent.js +2 -2
- package/dist/model/SignatureRequestEventType.js +1 -1
- package/dist/model/SignatureRequestInput.js +2 -2
- package/dist/model/SignatureRequestMessageType.js +1 -1
- package/dist/model/SignatureRequestState.js +1 -1
- package/dist/model/SignatureRequestToken.js +2 -2
- package/dist/model/SignatureRequestTokenType.js +1 -1
- package/dist/model/StringConditionType.js +1 -1
- package/dist/model/Submission.js +82 -82
- package/dist/model/SubmissionAction.js +2 -2
- package/dist/model/SubmissionActionState.js +1 -1
- package/dist/model/SubmissionActionType.js +1 -1
- package/dist/model/SubmissionBatch.js +9 -9
- package/dist/model/SubmissionBatchState.js +1 -1
- package/dist/model/SubmissionFiles.js +20 -2
- package/dist/model/SubmissionInput.js +7 -7
- package/dist/model/SubmissionList.js +6 -6
- package/dist/model/SubmissionSource.js +1 -1
- package/dist/model/SubmissionSourcePdf.js +2 -2
- package/dist/model/SubmissionState.js +1 -1
- package/dist/model/SubmissionSummary.js +343 -0
- package/dist/model/SubmissionValidation.js +2 -2
- package/dist/model/Template.js +95 -72
- package/dist/model/TemplateActor.js +4 -4
- package/dist/model/TemplateActorType.js +1 -1
- package/dist/model/TemplateDefaults.js +2 -2
- package/dist/model/TemplateDefaultsInput.js +2 -2
- package/dist/model/TemplateDiff.js +6 -6
- package/dist/model/TemplateDiffSummary.js +2 -2
- package/dist/model/TemplateDocument.js +49 -49
- package/dist/model/TemplateDocumentState.js +12 -2
- package/dist/model/TemplateDocumentSummary.js +152 -0
- package/dist/model/TemplateFieldChange.js +2 -2
- package/dist/model/TemplateFieldChanges.js +2 -2
- package/dist/model/TemplateFieldDependency.js +2 -2
- package/dist/model/TemplateFieldDependencyAction.js +1 -1
- package/dist/model/TemplateFieldDependencyCondition.js +2 -2
- package/dist/model/TemplateFieldDependencyConditionInput.js +2 -2
- package/dist/model/TemplateFieldDependencyInput.js +2 -2
- package/dist/model/TemplateFieldDependencyMatch.js +1 -1
- package/dist/model/TemplateFieldDependencyOperator.js +1 -1
- package/dist/model/TemplateFieldLogicStatus.js +1 -1
- package/dist/model/TemplateFieldMove.js +2 -2
- package/dist/model/TemplateFields.js +2 -2
- package/dist/model/TemplateFormMode.js +1 -1
- package/dist/model/TemplateModelCode.js +2 -2
- package/dist/model/TemplatePageAiError.js +1 -1
- package/dist/model/TemplatePageAiNamingStatus.js +1 -1
- package/dist/model/TemplatePageFieldsStatus.js +1 -1
- package/dist/model/TemplatePageImageStatus.js +1 -1
- package/dist/model/TemplatePageImages.js +2 -2
- package/dist/model/TemplatePageProcessingStatus.js +2 -2
- package/dist/model/TemplatePreview.js +211 -0
- package/dist/model/TemplatePreviewState.js +64 -0
- package/dist/model/TemplateSourcePdf.js +2 -2
- package/dist/model/TemplateSummary.js +29 -291
- package/dist/model/TemplateSummaryList.js +2 -2
- package/dist/model/TemplateType.js +7 -2
- package/dist/model/TemplateVersion.js +2 -2
- package/dist/model/TemplateVersionType.js +1 -1
- package/dist/model/TextAlignment.js +1 -1
- package/dist/model/TextOverflow.js +1 -1
- package/dist/model/TextVerticalAlignment.js +1 -1
- package/dist/model/Typeface.js +1 -1
- package/dist/model/UpdateSignatureRequestRequest.js +2 -2
- package/dist/model/UpdateTemplateDocumentRequest.js +8 -8
- package/dist/model/UpdateTemplateFieldsRequest.js +2 -2
- package/dist/model/UpdateTemplateRequest.js +26 -7
- package/dist/model/UpdateWebhookRequest.js +2 -2
- package/dist/model/UploadMethod.js +1 -1
- package/dist/model/UploadPresign.js +2 -2
- package/dist/model/UrlSourcePdf.js +2 -2
- package/dist/model/ValidateSubmissionRequest.js +7 -7
- package/dist/model/Webhook.js +2 -2
- package/dist/model/WebhookEventType.js +1 -1
- package/dist/model/WebhookList.js +2 -2
- package/dist/model/WebhookMode.js +1 -1
- package/package.json +4 -3
package/dist/model/Template.js
CHANGED
|
@@ -9,6 +9,7 @@ var _AiFieldNamingLanguage = _interopRequireDefault(require("./AiFieldNamingLang
|
|
|
9
9
|
var _ExpirationInterval = _interopRequireDefault(require("./ExpirationInterval"));
|
|
10
10
|
var _FieldGroup = _interopRequireDefault(require("./FieldGroup"));
|
|
11
11
|
var _HtmlEngineOptions = _interopRequireDefault(require("./HtmlEngineOptions"));
|
|
12
|
+
var _OutputFormat = _interopRequireDefault(require("./OutputFormat"));
|
|
12
13
|
var _PredefinedField = _interopRequireDefault(require("./PredefinedField"));
|
|
13
14
|
var _TemplateActor = _interopRequireDefault(require("./TemplateActor"));
|
|
14
15
|
var _TemplateDefaults = _interopRequireDefault(require("./TemplateDefaults"));
|
|
@@ -28,7 +29,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
28
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
29
30
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
30
31
|
* DocSpring API
|
|
31
|
-
* Use DocSpring's API to
|
|
32
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
32
33
|
*
|
|
33
34
|
* The version of the OpenAPI document: v2
|
|
34
35
|
*
|
|
@@ -41,7 +42,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
41
42
|
/**
|
|
42
43
|
* The Template model module.
|
|
43
44
|
* @module model/Template
|
|
44
|
-
* @version 4.
|
|
45
|
+
* @version 4.3.0
|
|
45
46
|
*/
|
|
46
47
|
var Template = /*#__PURE__*/function () {
|
|
47
48
|
/**
|
|
@@ -52,56 +53,58 @@ var Template = /*#__PURE__*/function () {
|
|
|
52
53
|
* @param id {String} The template's ID.
|
|
53
54
|
* @param name {String} The template's name.
|
|
54
55
|
* @param description {String} Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests.
|
|
55
|
-
* @param template_type {module:model/TemplateType} `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created.
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
56
|
+
* @param template_type {module:model/TemplateType} `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created.
|
|
57
|
+
* @param output_format {module:model/OutputFormat} What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
|
|
58
|
+
* @param ready {Boolean} Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
|
|
59
|
+
* @param document {module:model/TemplateDocument} The PDF of a PDF template, or the Word document of a Word template. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url` has one, with no file, while it's downloaded.
|
|
58
60
|
* @param parent_folder_id {String} The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions.
|
|
59
61
|
* @param path {String} The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
|
|
60
|
-
* @param version {String} The published version this is, such as `1.2.0`. Null for the draft.
|
|
61
62
|
* @param latest_version {String} The template's latest published version. Null if no version has been published.
|
|
62
63
|
* @param version_published_at {Date} When this version was published. Null for the draft.
|
|
63
64
|
* @param locked {Boolean} A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
|
|
65
|
+
* @param last_changed_at {Date} When the draft was last changed.
|
|
66
|
+
* @param created_at {Date} When the template was created.
|
|
67
|
+
* @param updated_at {Date} When the template was last updated.
|
|
68
|
+
* @param version {String} The published version this is, such as `1.2.0`. Null for the draft.
|
|
64
69
|
* @param add_signature_request_submission_id_footers {Boolean} Print the submission ID in the footer of each page of PDFs signed through signature requests.
|
|
65
70
|
* @param ai_field_naming_language {module:model/AiFieldNamingLanguage} The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. New templates take it from your account's template settings. Null for HTML templates.
|
|
66
71
|
* @param allow_additional_properties {Boolean} Accept submission data with properties that aren't fields of the template.
|
|
67
72
|
* @param allow_skipping_optional_fields {Boolean} Visual forms and signature request forms show the Continue button as soon as the required fields are filled in, without visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it.
|
|
68
|
-
* @param default_form_mode {module:model/TemplateFormMode} The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs).
|
|
73
|
+
* @param default_form_mode {module:model/TemplateFormMode} The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`.
|
|
69
74
|
* @param editable_submissions {Boolean} Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
|
|
70
|
-
* @param embed_domains {Array.<String>} The sites
|
|
75
|
+
* @param embed_domains {Array.<String>} The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted.
|
|
71
76
|
* @param embed_edit_allow_settings {Boolean} Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
|
|
72
77
|
* @param embed_edit_allow_versioning {Boolean} Allow the embedded template editor to publish, restore, compare and delete published versions.
|
|
73
78
|
* @param embed_edit_allow_document_replacement {Boolean} Allow the embedded template editor to replace the template's PDF.
|
|
74
|
-
* @param encrypt_pdfs {Boolean} Encrypt generated PDFs with `encrypt_pdfs_password`.
|
|
79
|
+
* @param encrypt_pdfs {Boolean} Encrypt generated PDFs with `encrypt_pdfs_password`. A Word template can only encrypt its PDFs when its `output_format` is `pdf`, because Word documents and OpenDocument files can't be password-protected.
|
|
75
80
|
* @param has_encrypt_pdfs_password {Boolean} Whether `encrypt_pdfs_password` is set.
|
|
76
81
|
* @param expire_submissions {Boolean} Delete each submission's data and PDF after `expire_after` `expiration_interval`.
|
|
77
82
|
* @param expire_after {Number} How many `expiration_interval`s a submission's data and PDF are kept for, when `expire_submissions` is on. At most 5256000 (10 years in minutes).
|
|
78
83
|
* @param expiration_interval {module:model/ExpirationInterval} The unit of `expire_after`.
|
|
79
84
|
* @param merge_audit_trail_pdf {Boolean} Add the audit trail to the end of PDFs signed through signature requests.
|
|
80
|
-
* @param parse_dates_using_template_date_format {Boolean} Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way.
|
|
85
|
+
* @param parse_dates_using_template_date_format {Boolean} Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way.
|
|
81
86
|
* @param public_submissions {Boolean} Allow anyone with a submission's ID to download its PDF.
|
|
82
87
|
* @param public_web_form {Boolean} Allow anyone to fill in the template's web form.
|
|
83
88
|
* @param redirect_url {String} Where the web form sends people after they submit it.
|
|
84
89
|
* @param has_slack_webhook_url {Boolean} Whether `slack_webhook_url` is set.
|
|
85
|
-
* @param last_changed_at {Date} When the draft was last changed.
|
|
86
90
|
* @param last_changed_by {module:model/TemplateActor} Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded.
|
|
87
|
-
* @param created_at {Date} When the template was created.
|
|
88
|
-
* @param updated_at {Date} When the template was last updated.
|
|
89
91
|
* @param defaults {module:model/TemplateDefaults}
|
|
90
92
|
* @param field_dependencies {Array.<module:model/TemplateFieldDependency>} Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields.
|
|
91
93
|
* @param field_groups {Array.<module:model/FieldGroup>} The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`.
|
|
92
94
|
* @param predefined_fields {Array.<module:model/PredefinedField>} The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off.
|
|
93
95
|
* @param predefined_fields_sample_data {Object.<String, Object>} Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for.
|
|
94
|
-
* @param html {String} The HTML of an HTML template, as a Liquid template. Null for PDF templates.
|
|
96
|
+
* @param html {String} The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates.
|
|
95
97
|
* @param scss {String} The SCSS of an HTML template.
|
|
96
98
|
* @param header_html {String} The HTML printed at the top of each page of an HTML template.
|
|
97
99
|
* @param footer_html {String} The HTML printed at the bottom of each page of an HTML template.
|
|
98
|
-
* @param html_engine_options {module:model/HtmlEngineOptions} How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
|
|
100
|
+
* @param html_engine_options {module:model/HtmlEngineOptions} How an HTML template's PDFs are printed. Null for PDF and Word templates. Setting it replaces the whole object: options left out use their defaults.
|
|
101
|
+
* @param html_escape_data {Boolean} Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates.
|
|
99
102
|
* @param embed_edit_token {String} The token that opens the template in the embedded template editor.
|
|
100
103
|
* @param versions {Array.<module:model/TemplateVersion>} The template's published versions, newest first (up to 100).
|
|
101
104
|
*/
|
|
102
|
-
function Template(id, name, description, template_type, ready, document, parent_folder_id, path,
|
|
105
|
+
function Template(id, name, description, template_type, output_format, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions) {
|
|
103
106
|
_classCallCheck(this, Template);
|
|
104
|
-
Template.initialize(this, id, name, description, template_type, ready, document, parent_folder_id, path,
|
|
107
|
+
Template.initialize(this, id, name, description, template_type, output_format, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions);
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
/**
|
|
@@ -111,19 +114,23 @@ var Template = /*#__PURE__*/function () {
|
|
|
111
114
|
*/
|
|
112
115
|
return _createClass(Template, null, [{
|
|
113
116
|
key: "initialize",
|
|
114
|
-
value: function initialize(obj, id, name, description, template_type, ready, document, parent_folder_id, path,
|
|
117
|
+
value: function initialize(obj, id, name, description, template_type, output_format, ready, document, parent_folder_id, path, latest_version, version_published_at, locked, last_changed_at, created_at, updated_at, version, add_signature_request_submission_id_footers, ai_field_naming_language, allow_additional_properties, allow_skipping_optional_fields, default_form_mode, editable_submissions, embed_domains, embed_edit_allow_settings, embed_edit_allow_versioning, embed_edit_allow_document_replacement, encrypt_pdfs, has_encrypt_pdfs_password, expire_submissions, expire_after, expiration_interval, merge_audit_trail_pdf, parse_dates_using_template_date_format, public_submissions, public_web_form, redirect_url, has_slack_webhook_url, last_changed_by, defaults, field_dependencies, field_groups, predefined_fields, predefined_fields_sample_data, html, scss, header_html, footer_html, html_engine_options, html_escape_data, embed_edit_token, versions) {
|
|
115
118
|
obj['id'] = id;
|
|
116
119
|
obj['name'] = name;
|
|
117
120
|
obj['description'] = description;
|
|
118
121
|
obj['template_type'] = template_type;
|
|
122
|
+
obj['output_format'] = output_format;
|
|
119
123
|
obj['ready'] = ready;
|
|
120
124
|
obj['document'] = document;
|
|
121
125
|
obj['parent_folder_id'] = parent_folder_id;
|
|
122
126
|
obj['path'] = path;
|
|
123
|
-
obj['version'] = version;
|
|
124
127
|
obj['latest_version'] = latest_version;
|
|
125
128
|
obj['version_published_at'] = version_published_at;
|
|
126
129
|
obj['locked'] = locked;
|
|
130
|
+
obj['last_changed_at'] = last_changed_at;
|
|
131
|
+
obj['created_at'] = created_at;
|
|
132
|
+
obj['updated_at'] = updated_at;
|
|
133
|
+
obj['version'] = version;
|
|
127
134
|
obj['add_signature_request_submission_id_footers'] = add_signature_request_submission_id_footers;
|
|
128
135
|
obj['ai_field_naming_language'] = ai_field_naming_language;
|
|
129
136
|
obj['allow_additional_properties'] = allow_additional_properties;
|
|
@@ -145,10 +152,7 @@ var Template = /*#__PURE__*/function () {
|
|
|
145
152
|
obj['public_web_form'] = public_web_form;
|
|
146
153
|
obj['redirect_url'] = redirect_url;
|
|
147
154
|
obj['has_slack_webhook_url'] = has_slack_webhook_url;
|
|
148
|
-
obj['last_changed_at'] = last_changed_at;
|
|
149
155
|
obj['last_changed_by'] = last_changed_by;
|
|
150
|
-
obj['created_at'] = created_at;
|
|
151
|
-
obj['updated_at'] = updated_at;
|
|
152
156
|
obj['defaults'] = defaults;
|
|
153
157
|
obj['field_dependencies'] = field_dependencies;
|
|
154
158
|
obj['field_groups'] = field_groups;
|
|
@@ -159,6 +163,7 @@ var Template = /*#__PURE__*/function () {
|
|
|
159
163
|
obj['header_html'] = header_html;
|
|
160
164
|
obj['footer_html'] = footer_html;
|
|
161
165
|
obj['html_engine_options'] = html_engine_options;
|
|
166
|
+
obj['html_escape_data'] = html_escape_data;
|
|
162
167
|
obj['embed_edit_token'] = embed_edit_token;
|
|
163
168
|
obj['versions'] = versions;
|
|
164
169
|
}
|
|
@@ -188,6 +193,9 @@ var Template = /*#__PURE__*/function () {
|
|
|
188
193
|
if (data.hasOwnProperty('template_type')) {
|
|
189
194
|
obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], _TemplateType["default"]);
|
|
190
195
|
}
|
|
196
|
+
if (data.hasOwnProperty('output_format')) {
|
|
197
|
+
obj['output_format'] = _ApiClient["default"].convertToType(data['output_format'], _OutputFormat["default"]);
|
|
198
|
+
}
|
|
191
199
|
if (data.hasOwnProperty('ready')) {
|
|
192
200
|
obj['ready'] = _ApiClient["default"].convertToType(data['ready'], 'Boolean');
|
|
193
201
|
}
|
|
@@ -200,9 +208,6 @@ var Template = /*#__PURE__*/function () {
|
|
|
200
208
|
if (data.hasOwnProperty('path')) {
|
|
201
209
|
obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
|
|
202
210
|
}
|
|
203
|
-
if (data.hasOwnProperty('version')) {
|
|
204
|
-
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
205
|
-
}
|
|
206
211
|
if (data.hasOwnProperty('latest_version')) {
|
|
207
212
|
obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
|
|
208
213
|
}
|
|
@@ -212,6 +217,18 @@ var Template = /*#__PURE__*/function () {
|
|
|
212
217
|
if (data.hasOwnProperty('locked')) {
|
|
213
218
|
obj['locked'] = _ApiClient["default"].convertToType(data['locked'], 'Boolean');
|
|
214
219
|
}
|
|
220
|
+
if (data.hasOwnProperty('last_changed_at')) {
|
|
221
|
+
obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'Date');
|
|
222
|
+
}
|
|
223
|
+
if (data.hasOwnProperty('created_at')) {
|
|
224
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
225
|
+
}
|
|
226
|
+
if (data.hasOwnProperty('updated_at')) {
|
|
227
|
+
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
|
|
228
|
+
}
|
|
229
|
+
if (data.hasOwnProperty('version')) {
|
|
230
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
231
|
+
}
|
|
215
232
|
if (data.hasOwnProperty('add_signature_request_submission_id_footers')) {
|
|
216
233
|
obj['add_signature_request_submission_id_footers'] = _ApiClient["default"].convertToType(data['add_signature_request_submission_id_footers'], 'Boolean');
|
|
217
234
|
}
|
|
@@ -275,18 +292,9 @@ var Template = /*#__PURE__*/function () {
|
|
|
275
292
|
if (data.hasOwnProperty('has_slack_webhook_url')) {
|
|
276
293
|
obj['has_slack_webhook_url'] = _ApiClient["default"].convertToType(data['has_slack_webhook_url'], 'Boolean');
|
|
277
294
|
}
|
|
278
|
-
if (data.hasOwnProperty('last_changed_at')) {
|
|
279
|
-
obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'Date');
|
|
280
|
-
}
|
|
281
295
|
if (data.hasOwnProperty('last_changed_by')) {
|
|
282
296
|
obj['last_changed_by'] = _ApiClient["default"].convertToType(data['last_changed_by'], _TemplateActor["default"]);
|
|
283
297
|
}
|
|
284
|
-
if (data.hasOwnProperty('created_at')) {
|
|
285
|
-
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
286
|
-
}
|
|
287
|
-
if (data.hasOwnProperty('updated_at')) {
|
|
288
|
-
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
|
|
289
|
-
}
|
|
290
298
|
if (data.hasOwnProperty('defaults')) {
|
|
291
299
|
obj['defaults'] = data['defaults'] === null ? null : _TemplateDefaults["default"].constructFromObject(data['defaults']);
|
|
292
300
|
}
|
|
@@ -319,6 +327,9 @@ var Template = /*#__PURE__*/function () {
|
|
|
319
327
|
if (data.hasOwnProperty('html_engine_options')) {
|
|
320
328
|
obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], _HtmlEngineOptions["default"]);
|
|
321
329
|
}
|
|
330
|
+
if (data.hasOwnProperty('html_escape_data')) {
|
|
331
|
+
obj['html_escape_data'] = _ApiClient["default"].convertToType(data['html_escape_data'], 'Boolean');
|
|
332
|
+
}
|
|
322
333
|
if (data.hasOwnProperty('embed_edit_token')) {
|
|
323
334
|
obj['embed_edit_token'] = _ApiClient["default"].convertToType(data['embed_edit_token'], 'String');
|
|
324
335
|
}
|
|
@@ -378,13 +389,13 @@ var Template = /*#__PURE__*/function () {
|
|
|
378
389
|
throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
|
|
379
390
|
}
|
|
380
391
|
// ensure the json data is a string
|
|
381
|
-
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
382
|
-
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
383
|
-
}
|
|
384
|
-
// ensure the json data is a string
|
|
385
392
|
if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
|
|
386
393
|
throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
|
|
387
394
|
}
|
|
395
|
+
// ensure the json data is a string
|
|
396
|
+
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
397
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
398
|
+
}
|
|
388
399
|
// ensure the json data is an array
|
|
389
400
|
if (!Array.isArray(data['embed_domains'])) {
|
|
390
401
|
throw new Error("Expected the field `embed_domains` to be an array in the JSON data but got " + data['embed_domains']);
|
|
@@ -460,7 +471,7 @@ var Template = /*#__PURE__*/function () {
|
|
|
460
471
|
}
|
|
461
472
|
}]);
|
|
462
473
|
}();
|
|
463
|
-
Template.RequiredProperties = ["id", "name", "description", "template_type", "ready", "document", "parent_folder_id", "path", "
|
|
474
|
+
Template.RequiredProperties = ["id", "name", "description", "template_type", "output_format", "ready", "document", "parent_folder_id", "path", "latest_version", "version_published_at", "locked", "last_changed_at", "created_at", "updated_at", "version", "add_signature_request_submission_id_footers", "ai_field_naming_language", "allow_additional_properties", "allow_skipping_optional_fields", "default_form_mode", "editable_submissions", "embed_domains", "embed_edit_allow_settings", "embed_edit_allow_versioning", "embed_edit_allow_document_replacement", "encrypt_pdfs", "has_encrypt_pdfs_password", "expire_submissions", "expire_after", "expiration_interval", "merge_audit_trail_pdf", "parse_dates_using_template_date_format", "public_submissions", "public_web_form", "redirect_url", "has_slack_webhook_url", "last_changed_by", "defaults", "field_dependencies", "field_groups", "predefined_fields", "predefined_fields_sample_data", "html", "scss", "header_html", "footer_html", "html_engine_options", "html_escape_data", "embed_edit_token", "versions"];
|
|
464
475
|
|
|
465
476
|
/**
|
|
466
477
|
* The template's ID.
|
|
@@ -481,19 +492,25 @@ Template.prototype['name'] = undefined;
|
|
|
481
492
|
Template.prototype['description'] = undefined;
|
|
482
493
|
|
|
483
494
|
/**
|
|
484
|
-
* `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. It can't be changed after the template is created.
|
|
495
|
+
* `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created.
|
|
485
496
|
* @member {module:model/TemplateType} template_type
|
|
486
497
|
*/
|
|
487
498
|
Template.prototype['template_type'] = undefined;
|
|
488
499
|
|
|
489
500
|
/**
|
|
490
|
-
*
|
|
501
|
+
* What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
|
|
502
|
+
* @member {module:model/OutputFormat} output_format
|
|
503
|
+
*/
|
|
504
|
+
Template.prototype['output_format'] = undefined;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
|
|
491
508
|
* @member {Boolean} ready
|
|
492
509
|
*/
|
|
493
510
|
Template.prototype['ready'] = undefined;
|
|
494
511
|
|
|
495
512
|
/**
|
|
496
|
-
* The PDF of a PDF template. Null for HTML templates, and for a PDF template that has no PDF yet.
|
|
513
|
+
* The PDF of a PDF template, or the Word document of a Word template. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url` has one, with no file, while it's downloaded.
|
|
497
514
|
* @member {module:model/TemplateDocument} document
|
|
498
515
|
*/
|
|
499
516
|
Template.prototype['document'] = undefined;
|
|
@@ -510,12 +527,6 @@ Template.prototype['parent_folder_id'] = undefined;
|
|
|
510
527
|
*/
|
|
511
528
|
Template.prototype['path'] = undefined;
|
|
512
529
|
|
|
513
|
-
/**
|
|
514
|
-
* The published version this is, such as `1.2.0`. Null for the draft.
|
|
515
|
-
* @member {String} version
|
|
516
|
-
*/
|
|
517
|
-
Template.prototype['version'] = undefined;
|
|
518
|
-
|
|
519
530
|
/**
|
|
520
531
|
* The template's latest published version. Null if no version has been published.
|
|
521
532
|
* @member {String} latest_version
|
|
@@ -534,6 +545,30 @@ Template.prototype['version_published_at'] = undefined;
|
|
|
534
545
|
*/
|
|
535
546
|
Template.prototype['locked'] = undefined;
|
|
536
547
|
|
|
548
|
+
/**
|
|
549
|
+
* When the draft was last changed.
|
|
550
|
+
* @member {Date} last_changed_at
|
|
551
|
+
*/
|
|
552
|
+
Template.prototype['last_changed_at'] = undefined;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* When the template was created.
|
|
556
|
+
* @member {Date} created_at
|
|
557
|
+
*/
|
|
558
|
+
Template.prototype['created_at'] = undefined;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* When the template was last updated.
|
|
562
|
+
* @member {Date} updated_at
|
|
563
|
+
*/
|
|
564
|
+
Template.prototype['updated_at'] = undefined;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* The published version this is, such as `1.2.0`. Null for the draft.
|
|
568
|
+
* @member {String} version
|
|
569
|
+
*/
|
|
570
|
+
Template.prototype['version'] = undefined;
|
|
571
|
+
|
|
537
572
|
/**
|
|
538
573
|
* Print the submission ID in the footer of each page of PDFs signed through signature requests.
|
|
539
574
|
* @member {Boolean} add_signature_request_submission_id_footers
|
|
@@ -559,7 +594,7 @@ Template.prototype['allow_additional_properties'] = undefined;
|
|
|
559
594
|
Template.prototype['allow_skipping_optional_fields'] = undefined;
|
|
560
595
|
|
|
561
596
|
/**
|
|
562
|
-
* The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs).
|
|
597
|
+
* The hosted form that /templates/{template_id}/form shows when its URL has no `mode` parameter: `web` (the web form), `visual` (the visual form, where fields are filled in on the PDF) or `dual` (both, in tabs). Only PDF templates have a visual form, so other templates accept only `web`.
|
|
563
598
|
* @member {module:model/TemplateFormMode} default_form_mode
|
|
564
599
|
*/
|
|
565
600
|
Template.prototype['default_form_mode'] = undefined;
|
|
@@ -571,7 +606,7 @@ Template.prototype['default_form_mode'] = undefined;
|
|
|
571
606
|
Template.prototype['editable_submissions'] = undefined;
|
|
572
607
|
|
|
573
608
|
/**
|
|
574
|
-
* The sites
|
|
609
|
+
* The sites that can embed the template's live signature requests and its embedded template editor: a host such as `app.example.com`, with an optional leading wildcard (`*.example.com`), port (`localhost:3000`) or scheme (`https://app.example.com`; without one, `http` and `https` both work). Browsers open a live signature request in a frame only on these sites (and DocSpring's), so with an empty list it can't be embedded anywhere; a test signature request can be embedded on any site. The embedded template editor loads only for a page on one of these sites (by its Referer or Origin header), and on any site when the list is empty. Forms embedded on a page (Visual Forms JS and the simple form) aren't restricted.
|
|
575
610
|
* @member {Array.<String>} embed_domains
|
|
576
611
|
*/
|
|
577
612
|
Template.prototype['embed_domains'] = undefined;
|
|
@@ -595,7 +630,7 @@ Template.prototype['embed_edit_allow_versioning'] = undefined;
|
|
|
595
630
|
Template.prototype['embed_edit_allow_document_replacement'] = undefined;
|
|
596
631
|
|
|
597
632
|
/**
|
|
598
|
-
* Encrypt generated PDFs with `encrypt_pdfs_password`.
|
|
633
|
+
* Encrypt generated PDFs with `encrypt_pdfs_password`. A Word template can only encrypt its PDFs when its `output_format` is `pdf`, because Word documents and OpenDocument files can't be password-protected.
|
|
599
634
|
* @member {Boolean} encrypt_pdfs
|
|
600
635
|
*/
|
|
601
636
|
Template.prototype['encrypt_pdfs'] = undefined;
|
|
@@ -631,7 +666,7 @@ Template.prototype['expiration_interval'] = undefined;
|
|
|
631
666
|
Template.prototype['merge_audit_trail_pdf'] = undefined;
|
|
632
667
|
|
|
633
668
|
/**
|
|
634
|
-
* Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way.
|
|
669
|
+
* Date fields also accept NN/NN/YYYY dates (with slashes, dashes or dots), read in the order of the template's default date format: month first for %m/%d/%Y, day first for %d/%m/%Y. When false, date fields only accept YYYY-MM-DD. Applies to PDF templates: an HTML or Word template's date fields only accept YYYY-MM-DD. Date fields that include a time take RFC 3339 date-times either way.
|
|
635
670
|
* @member {Boolean} parse_dates_using_template_date_format
|
|
636
671
|
*/
|
|
637
672
|
Template.prototype['parse_dates_using_template_date_format'] = undefined;
|
|
@@ -660,30 +695,12 @@ Template.prototype['redirect_url'] = undefined;
|
|
|
660
695
|
*/
|
|
661
696
|
Template.prototype['has_slack_webhook_url'] = undefined;
|
|
662
697
|
|
|
663
|
-
/**
|
|
664
|
-
* When the draft was last changed.
|
|
665
|
-
* @member {Date} last_changed_at
|
|
666
|
-
*/
|
|
667
|
-
Template.prototype['last_changed_at'] = undefined;
|
|
668
|
-
|
|
669
698
|
/**
|
|
670
699
|
* Who last changed the draft: a user in your account, an API token, or someone using the embedded template editor. Null if no change has been recorded.
|
|
671
700
|
* @member {module:model/TemplateActor} last_changed_by
|
|
672
701
|
*/
|
|
673
702
|
Template.prototype['last_changed_by'] = undefined;
|
|
674
703
|
|
|
675
|
-
/**
|
|
676
|
-
* When the template was created.
|
|
677
|
-
* @member {Date} created_at
|
|
678
|
-
*/
|
|
679
|
-
Template.prototype['created_at'] = undefined;
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* When the template was last updated.
|
|
683
|
-
* @member {Date} updated_at
|
|
684
|
-
*/
|
|
685
|
-
Template.prototype['updated_at'] = undefined;
|
|
686
|
-
|
|
687
704
|
/**
|
|
688
705
|
* @member {module:model/TemplateDefaults} defaults
|
|
689
706
|
*/
|
|
@@ -714,7 +731,7 @@ Template.prototype['predefined_fields'] = undefined;
|
|
|
714
731
|
Template.prototype['predefined_fields_sample_data'] = undefined;
|
|
715
732
|
|
|
716
733
|
/**
|
|
717
|
-
* The HTML of an HTML template, as a Liquid template. Null for PDF templates.
|
|
734
|
+
* The HTML of an HTML template, as a Liquid template. Null for PDF and Word templates.
|
|
718
735
|
* @member {String} html
|
|
719
736
|
*/
|
|
720
737
|
Template.prototype['html'] = undefined;
|
|
@@ -738,11 +755,17 @@ Template.prototype['header_html'] = undefined;
|
|
|
738
755
|
Template.prototype['footer_html'] = undefined;
|
|
739
756
|
|
|
740
757
|
/**
|
|
741
|
-
* How an HTML template's PDFs are printed. Null for PDF templates. Setting it replaces the whole object: options left out use their defaults.
|
|
758
|
+
* How an HTML template's PDFs are printed. Null for PDF and Word templates. Setting it replaces the whole object: options left out use their defaults.
|
|
742
759
|
* @member {module:model/HtmlEngineOptions} html_engine_options
|
|
743
760
|
*/
|
|
744
761
|
Template.prototype['html_engine_options'] = undefined;
|
|
745
762
|
|
|
763
|
+
/**
|
|
764
|
+
* Whether an HTML template HTML-escapes the values it prints. When true, `{{ value }}` prints a value as text, so a `<` or `&` in it is printed as that character, and `{{ value | raw }}` prints a value as HTML. New HTML templates default to true. Templates created before October 2026, or with API v1, default to false, which prints every value as HTML. Null for PDF templates.
|
|
765
|
+
* @member {Boolean} html_escape_data
|
|
766
|
+
*/
|
|
767
|
+
Template.prototype['html_escape_data'] = undefined;
|
|
768
|
+
|
|
746
769
|
/**
|
|
747
770
|
* The token that opens the template in the embedded template editor.
|
|
748
771
|
* @member {String} embed_edit_token
|
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
19
19
|
* DocSpring API
|
|
20
|
-
* Use DocSpring's API to
|
|
20
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
21
21
|
*
|
|
22
22
|
* The version of the OpenAPI document: v2
|
|
23
23
|
*
|
|
@@ -30,14 +30,14 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
30
30
|
/**
|
|
31
31
|
* The TemplateActor model module.
|
|
32
32
|
* @module model/TemplateActor
|
|
33
|
-
* @version 4.
|
|
33
|
+
* @version 4.3.0
|
|
34
34
|
*/
|
|
35
35
|
var TemplateActor = /*#__PURE__*/function () {
|
|
36
36
|
/**
|
|
37
37
|
* Constructs a new <code>TemplateActor</code>.
|
|
38
38
|
* A user in your account, an API token, or someone using the embedded template editor.
|
|
39
39
|
* @alias module:model/TemplateActor
|
|
40
|
-
* @param type {module:model/TemplateActorType} `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
40
|
+
* @param type {module:model/TemplateActorType} `user`: a user in your account, also when they make the change with an app they connected (an OAuth access token). `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
41
41
|
* @param user_id {String} The user's ID, for `user`.
|
|
42
42
|
* @param external_id {String} The ID your app gave the embedded editor's user, for `external_user`.
|
|
43
43
|
* @param name {String} The user's name, or the name your app gave the embedded editor's user.
|
|
@@ -140,7 +140,7 @@ var TemplateActor = /*#__PURE__*/function () {
|
|
|
140
140
|
TemplateActor.RequiredProperties = ["type", "user_id", "external_id", "name", "email"];
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
-
* `user`: a user in your account. `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
143
|
+
* `user`: a user in your account, also when they make the change with an app they connected (an OAuth access token). `api`: an API token. `external_user`: someone using the embedded template editor, as identified by your app.
|
|
144
144
|
* @member {module:model/TemplateActorType} type
|
|
145
145
|
*/
|
|
146
146
|
TemplateActor.prototype['type'] = undefined;
|
|
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
16
16
|
* DocSpring API
|
|
17
|
-
* Use DocSpring's API to
|
|
17
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
18
18
|
*
|
|
19
19
|
* The version of the OpenAPI document: v2
|
|
20
20
|
*
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
18
18
|
* DocSpring API
|
|
19
|
-
* Use DocSpring's API to
|
|
19
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: v2
|
|
22
22
|
*
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
29
29
|
/**
|
|
30
30
|
* The TemplateDefaults model module.
|
|
31
31
|
* @module model/TemplateDefaults
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.3.0
|
|
33
33
|
*/
|
|
34
34
|
var TemplateDefaults = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
18
18
|
* DocSpring API
|
|
19
|
-
* Use DocSpring's API to
|
|
19
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: v2
|
|
22
22
|
*
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
29
29
|
/**
|
|
30
30
|
* The TemplateDefaultsInput model module.
|
|
31
31
|
* @module model/TemplateDefaultsInput
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.3.0
|
|
33
33
|
*/
|
|
34
34
|
var TemplateDefaultsInput = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
18
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
19
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
20
20
|
* DocSpring API
|
|
21
|
-
* Use DocSpring's API to
|
|
21
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
22
22
|
*
|
|
23
23
|
* The version of the OpenAPI document: v2
|
|
24
24
|
*
|
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
31
31
|
/**
|
|
32
32
|
* The TemplateDiff model module.
|
|
33
33
|
* @module model/TemplateDiff
|
|
34
|
-
* @version 4.
|
|
34
|
+
* @version 4.3.0
|
|
35
35
|
*/
|
|
36
36
|
var TemplateDiff = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
|
@@ -44,8 +44,8 @@ var TemplateDiff = /*#__PURE__*/function () {
|
|
|
44
44
|
* @param to_version {String} The later version, such as `1.2.0`. Null for the draft.
|
|
45
45
|
* @param summary {module:model/TemplateDiffSummary} How many changes of each kind there are.
|
|
46
46
|
* @param fields {module:model/TemplateFieldChanges} The fields that changed.
|
|
47
|
-
* @param changed_settings {Array.<String>} The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `
|
|
48
|
-
* @param document_changed {Boolean} The template's PDF was replaced (or added, when there's no `from_version`).
|
|
47
|
+
* @param changed_settings {Array.<String>} The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `merge_audit_trail_pdf`, ...). Values aren't included. Settings that apply to every version, such as `webhook_url` and `encrypt_pdfs_password`, are the same on every version, so they're named only when there's no earlier version to compare with; a secret is named without its value.
|
|
48
|
+
* @param document_changed {Boolean} The template's PDF was replaced, or its Word document replaced or edited (or added, when there's no `from_version`).
|
|
49
49
|
*/
|
|
50
50
|
function TemplateDiff(template_id, from_version, to_version, summary, fields, changed_settings, document_changed) {
|
|
51
51
|
_classCallCheck(this, TemplateDiff);
|
|
@@ -193,13 +193,13 @@ TemplateDiff.prototype['summary'] = undefined;
|
|
|
193
193
|
TemplateDiff.prototype['fields'] = undefined;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
* The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `
|
|
196
|
+
* The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `merge_audit_trail_pdf`, ...). Values aren't included. Settings that apply to every version, such as `webhook_url` and `encrypt_pdfs_password`, are the same on every version, so they're named only when there's no earlier version to compare with; a secret is named without its value.
|
|
197
197
|
* @member {Array.<String>} changed_settings
|
|
198
198
|
*/
|
|
199
199
|
TemplateDiff.prototype['changed_settings'] = undefined;
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* The template's PDF was replaced (or added, when there's no `from_version`).
|
|
202
|
+
* The template's PDF was replaced, or its Word document replaced or edited (or added, when there's no `from_version`).
|
|
203
203
|
* @member {Boolean} document_changed
|
|
204
204
|
*/
|
|
205
205
|
TemplateDiff.prototype['document_changed'] = undefined;
|
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
|
|
18
18
|
* DocSpring API
|
|
19
|
-
* Use DocSpring's API to
|
|
19
|
+
* Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: v2
|
|
22
22
|
*
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
|
|
|
29
29
|
/**
|
|
30
30
|
* The TemplateDiffSummary model module.
|
|
31
31
|
* @module model/TemplateDiffSummary
|
|
32
|
-
* @version 4.
|
|
32
|
+
* @version 4.3.0
|
|
33
33
|
*/
|
|
34
34
|
var TemplateDiffSummary = /*#__PURE__*/function () {
|
|
35
35
|
/**
|