docspring 3.3.0 → 4.0.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 +79 -19
- package/README.md +65 -63
- package/dist/ApiClient.js +63 -28
- package/dist/RequestSchemas.js +2297 -0
- package/dist/RequestValidator.js +494 -0
- package/dist/api/Client.js +1346 -948
- package/dist/index.js +651 -154
- package/dist/model/AiFieldNamingLanguage.js +64 -0
- package/dist/model/{CreateWebhookData.js → AuthenticationCheck.js} +32 -28
- package/dist/model/BarcodeSymbology.js +89 -0
- package/dist/model/CheckCharacter.js +74 -0
- package/dist/model/CombinedFieldType.js +59 -0
- package/dist/model/CombinedPdf.js +294 -0
- package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +27 -27
- package/dist/model/CombinedPdfList.js +132 -0
- package/dist/model/{ForbiddenErrorResponse.js → CombinedPdfSource.js} +59 -73
- package/dist/model/CombinedPdfSourceInput.js +270 -0
- package/dist/model/CombinedPdfSourcePdf.js +130 -0
- package/dist/model/CombinedPdfSourceType.js +74 -0
- package/dist/model/CombinedPdfState.js +74 -0
- package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +26 -22
- package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +69 -53
- package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +25 -23
- package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +47 -28
- package/dist/model/{TemplateDeleteResponse.js → CreateSignatureRequestEventRequest.js} +49 -74
- package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
- package/dist/model/{SubmissionBatchData.js → CreateSubmissionBatchRequest.js} +67 -42
- package/dist/model/CreateSubmissionRequest.js +212 -0
- package/dist/model/CreateTemplateRequest.js +545 -0
- package/dist/model/CreateWebhookRequest.js +234 -0
- package/dist/model/CustomFile.js +67 -16
- package/dist/model/CustomFileList.js +132 -0
- package/dist/model/CustomFileSourcePdf.js +130 -0
- package/dist/model/ErrorCode.js +154 -0
- package/dist/model/{CreateSubmissionResponse.js → ErrorDetail.js} +65 -75
- package/dist/model/ErrorInfo.js +211 -0
- package/dist/model/ErrorResponse.js +12 -41
- package/dist/model/ExpirationInterval.js +64 -0
- package/dist/model/FieldComparisonCondition.js +137 -0
- package/dist/model/FieldComparisonOperator.js +69 -0
- package/dist/model/FieldDisplayType.js +79 -0
- package/dist/model/{MultipleErrorsResponse.js → FieldEqualsCondition.js} +48 -52
- package/dist/model/FieldEqualsOperator.js +59 -0
- package/dist/model/{SuccessMultipleErrorsResponse.js → FieldInCondition.js} +54 -53
- package/dist/model/FieldOverride.js +722 -0
- package/dist/model/FieldPresenceCondition.js +126 -0
- package/dist/model/FieldPresenceOperator.js +59 -0
- package/dist/model/FieldRangeCondition.js +148 -0
- package/dist/model/FieldReimportState.js +69 -0
- package/dist/model/FieldSetupLogic.js +59 -0
- package/dist/model/FieldSetupNaming.js +59 -0
- package/dist/model/FieldSetupSource.js +64 -0
- package/dist/model/Folder.js +38 -11
- package/dist/model/FolderList.js +132 -0
- package/dist/model/GeneratedFile.js +214 -0
- package/dist/model/GeneratedFileState.js +64 -0
- package/dist/model/HtmlEngineOptions.js +230 -0
- package/dist/model/HtmlEngineOptionsInput.js +193 -0
- package/dist/model/ImageGravity.js +94 -0
- package/dist/model/ImageScaleType.js +64 -0
- package/dist/model/ModelCodeLanguage.js +94 -0
- package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +34 -28
- package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +25 -35
- package/dist/model/NumberConditionType.js +79 -0
- package/dist/model/PageFormat.js +114 -0
- package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +33 -33
- package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +25 -23
- package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +25 -23
- package/dist/model/ShapeType.js +79 -0
- package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +165 -240
- package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
- package/dist/model/SignatureRequestAuthType.js +84 -0
- package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +67 -149
- package/dist/model/SignatureRequestEventType.js +79 -0
- package/dist/model/SignatureRequestInput.js +278 -0
- package/dist/model/SignatureRequestMessageType.js +94 -0
- package/dist/model/SignatureRequestState.js +64 -0
- package/dist/model/SignatureRequestToken.js +195 -0
- package/dist/model/SignatureRequestTokenType.js +59 -0
- package/dist/model/StringConditionType.js +74 -0
- package/dist/model/Submission.js +186 -345
- package/dist/model/SubmissionAction.js +30 -115
- package/dist/model/SubmissionActionState.js +69 -0
- package/dist/model/SubmissionActionType.js +84 -0
- package/dist/model/SubmissionBatch.js +74 -55
- package/dist/model/SubmissionBatchState.js +64 -0
- package/dist/model/SubmissionFiles.js +108 -0
- package/dist/model/SubmissionInput.js +204 -0
- package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +35 -42
- package/dist/model/SubmissionSource.js +69 -0
- package/dist/model/SubmissionSourcePdf.js +130 -0
- package/dist/model/SubmissionState.js +114 -0
- package/dist/model/Template.js +310 -573
- package/dist/model/TemplateActor.js +171 -0
- package/dist/model/TemplateActorType.js +64 -0
- package/dist/model/TemplateDefaults.js +307 -0
- package/dist/model/TemplateDefaultsInput.js +305 -0
- package/dist/model/TemplateDocument.js +280 -0
- package/dist/model/TemplateDocumentState.js +74 -0
- package/dist/model/{CreatePdfSubmissionData.js → TemplateFieldDependency.js} +70 -89
- package/dist/model/TemplateFieldDependencyAction.js +64 -0
- package/dist/model/{TemplatePublishVersionResponse.js → TemplateFieldDependencyCondition.js} +51 -61
- package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
- package/dist/model/TemplateFieldDependencyInput.js +182 -0
- package/dist/model/TemplateFieldDependencyMatch.js +59 -0
- package/dist/model/TemplateFieldDependencyOperator.js +99 -0
- package/dist/model/TemplateFieldLogicStatus.js +74 -0
- package/dist/model/TemplateFormMode.js +64 -0
- package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +34 -86
- package/dist/model/TemplatePageAiError.js +69 -0
- package/dist/model/TemplatePageAiNamingStatus.js +59 -0
- package/dist/model/TemplatePageFieldsStatus.js +74 -0
- package/dist/model/TemplatePageImageStatus.js +59 -0
- package/dist/model/TemplatePageProcessingStatus.js +162 -0
- package/dist/model/{SubmissionDataRequestToken.js → TemplateSourcePdf.js} +52 -56
- package/dist/model/TemplateSummary.js +560 -0
- package/dist/model/{SuccessErrorResponse.js → TemplateSummaryList.js} +43 -55
- package/dist/model/TemplateType.js +59 -0
- package/dist/model/{Submission422Response.js → TemplateVersion.js} +60 -63
- package/dist/model/TemplateVersionType.js +64 -0
- package/dist/model/TextAlignment.js +69 -0
- package/dist/model/TextOverflow.js +59 -0
- package/dist/model/TextVerticalAlignment.js +64 -0
- package/dist/model/Typeface.js +134 -0
- package/dist/model/UpdateSignatureRequestRequest.js +183 -0
- package/dist/model/UpdateTemplateDocumentRequest.js +136 -0
- package/dist/model/UpdateTemplateRequest.js +450 -0
- package/dist/model/UpdateWebhookRequest.js +209 -0
- package/dist/model/UploadMethod.js +54 -0
- package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +53 -58
- package/dist/model/{AddFieldsData.js → UrlSourcePdf.js} +49 -31
- package/dist/model/Webhook.js +58 -73
- package/dist/model/WebhookEventType.js +174 -0
- package/dist/model/WebhookList.js +132 -0
- package/dist/model/WebhookMode.js +59 -0
- package/package.json +1 -1
- package/dist/model/BatchGeneratePdfs201Response.js +0 -194
- package/dist/model/CombinedSubmission.js +0 -313
- package/dist/model/CombinedSubmissionAction.js +0 -268
- package/dist/model/CreateCombinedSubmissionResponse.js +0 -180
- package/dist/model/CreateCustomFileResponse.js +0 -167
- package/dist/model/CreateHtmlTemplate.js +0 -108
- package/dist/model/CreatePdfTemplate.js +0 -108
- package/dist/model/CreateSubmissionDataRequestData.js +0 -314
- package/dist/model/CreateSubmissionDataRequestEventRequest.js +0 -239
- package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestResponse.js +0 -167
- package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -167
- package/dist/model/ErrorOrMultipleErrorsResponse.js +0 -153
- package/dist/model/JsonSchema.js +0 -205
- package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
- package/dist/model/SubmissionDataRequest.js +0 -496
- package/dist/model/SubmissionPreview.js +0 -509
- package/dist/model/TemplateAddFieldsResponse.js +0 -156
- package/dist/model/TemplatePreview.js +0 -796
- package/dist/model/UpdateHtmlTemplate.js +0 -108
- package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
- package/dist/model/UpdateWebhookData.js +0 -108
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _AiFieldNamingLanguage = _interopRequireDefault(require("./AiFieldNamingLanguage"));
|
|
9
|
+
var _ExpirationInterval = _interopRequireDefault(require("./ExpirationInterval"));
|
|
10
|
+
var _FieldSetupLogic = _interopRequireDefault(require("./FieldSetupLogic"));
|
|
11
|
+
var _FieldSetupNaming = _interopRequireDefault(require("./FieldSetupNaming"));
|
|
12
|
+
var _FieldSetupSource = _interopRequireDefault(require("./FieldSetupSource"));
|
|
13
|
+
var _HtmlEngineOptionsInput = _interopRequireDefault(require("./HtmlEngineOptionsInput"));
|
|
14
|
+
var _TemplateDefaultsInput = _interopRequireDefault(require("./TemplateDefaultsInput"));
|
|
15
|
+
var _TemplateFieldDependencyInput = _interopRequireDefault(require("./TemplateFieldDependencyInput"));
|
|
16
|
+
var _TemplateFormMode = _interopRequireDefault(require("./TemplateFormMode"));
|
|
17
|
+
var _TemplateType = _interopRequireDefault(require("./TemplateType"));
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
20
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
21
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
22
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
24
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
25
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
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); } /**
|
|
28
|
+
* DocSpring API
|
|
29
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
30
|
+
*
|
|
31
|
+
* The version of the OpenAPI document: v2
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
35
|
+
* https://openapi-generator.tech
|
|
36
|
+
* Do not edit the class manually.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The CreateTemplateRequest model module.
|
|
41
|
+
* @module model/CreateTemplateRequest
|
|
42
|
+
* @version 4.0.0
|
|
43
|
+
*/
|
|
44
|
+
var CreateTemplateRequest = /*#__PURE__*/function () {
|
|
45
|
+
/**
|
|
46
|
+
* Constructs a new <code>CreateTemplateRequest</code>.
|
|
47
|
+
* The template to create.
|
|
48
|
+
* @alias module:model/CreateTemplateRequest
|
|
49
|
+
* @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.
|
|
50
|
+
*/
|
|
51
|
+
function CreateTemplateRequest(template_type) {
|
|
52
|
+
_classCallCheck(this, CreateTemplateRequest);
|
|
53
|
+
CreateTemplateRequest.initialize(this, template_type);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the fields of this object.
|
|
58
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
59
|
+
* Only for internal use.
|
|
60
|
+
*/
|
|
61
|
+
return _createClass(CreateTemplateRequest, null, [{
|
|
62
|
+
key: "initialize",
|
|
63
|
+
value: function initialize(obj, template_type) {
|
|
64
|
+
obj['template_type'] = template_type;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Constructs a <code>CreateTemplateRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
69
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
70
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
71
|
+
* @param {module:model/CreateTemplateRequest} obj Optional instance to populate.
|
|
72
|
+
* @return {module:model/CreateTemplateRequest} The populated <code>CreateTemplateRequest</code> instance.
|
|
73
|
+
*/
|
|
74
|
+
}, {
|
|
75
|
+
key: "constructFromObject",
|
|
76
|
+
value: function constructFromObject(data, obj) {
|
|
77
|
+
if (data) {
|
|
78
|
+
obj = obj || new CreateTemplateRequest();
|
|
79
|
+
if (data.hasOwnProperty('name')) {
|
|
80
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('description')) {
|
|
83
|
+
obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('template_type')) {
|
|
86
|
+
obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], _TemplateType["default"]);
|
|
87
|
+
}
|
|
88
|
+
if (data.hasOwnProperty('parent_folder_id')) {
|
|
89
|
+
obj['parent_folder_id'] = _ApiClient["default"].convertToType(data['parent_folder_id'], 'String');
|
|
90
|
+
}
|
|
91
|
+
if (data.hasOwnProperty('locked')) {
|
|
92
|
+
obj['locked'] = _ApiClient["default"].convertToType(data['locked'], 'Boolean');
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('add_signature_request_submission_id_footers')) {
|
|
95
|
+
obj['add_signature_request_submission_id_footers'] = _ApiClient["default"].convertToType(data['add_signature_request_submission_id_footers'], 'Boolean');
|
|
96
|
+
}
|
|
97
|
+
if (data.hasOwnProperty('ai_field_naming_language')) {
|
|
98
|
+
obj['ai_field_naming_language'] = _ApiClient["default"].convertToType(data['ai_field_naming_language'], _AiFieldNamingLanguage["default"]);
|
|
99
|
+
}
|
|
100
|
+
if (data.hasOwnProperty('allow_additional_properties')) {
|
|
101
|
+
obj['allow_additional_properties'] = _ApiClient["default"].convertToType(data['allow_additional_properties'], 'Boolean');
|
|
102
|
+
}
|
|
103
|
+
if (data.hasOwnProperty('allow_skipping_optional_fields')) {
|
|
104
|
+
obj['allow_skipping_optional_fields'] = _ApiClient["default"].convertToType(data['allow_skipping_optional_fields'], 'Boolean');
|
|
105
|
+
}
|
|
106
|
+
if (data.hasOwnProperty('default_form_mode')) {
|
|
107
|
+
obj['default_form_mode'] = _ApiClient["default"].convertToType(data['default_form_mode'], _TemplateFormMode["default"]);
|
|
108
|
+
}
|
|
109
|
+
if (data.hasOwnProperty('editable_submissions')) {
|
|
110
|
+
obj['editable_submissions'] = _ApiClient["default"].convertToType(data['editable_submissions'], 'Boolean');
|
|
111
|
+
}
|
|
112
|
+
if (data.hasOwnProperty('embed_domains')) {
|
|
113
|
+
obj['embed_domains'] = _ApiClient["default"].convertToType(data['embed_domains'], ['String']);
|
|
114
|
+
}
|
|
115
|
+
if (data.hasOwnProperty('embed_edit_allow_settings')) {
|
|
116
|
+
obj['embed_edit_allow_settings'] = _ApiClient["default"].convertToType(data['embed_edit_allow_settings'], 'Boolean');
|
|
117
|
+
}
|
|
118
|
+
if (data.hasOwnProperty('embed_edit_allow_versioning')) {
|
|
119
|
+
obj['embed_edit_allow_versioning'] = _ApiClient["default"].convertToType(data['embed_edit_allow_versioning'], 'Boolean');
|
|
120
|
+
}
|
|
121
|
+
if (data.hasOwnProperty('embed_edit_allow_document_replacement')) {
|
|
122
|
+
obj['embed_edit_allow_document_replacement'] = _ApiClient["default"].convertToType(data['embed_edit_allow_document_replacement'], 'Boolean');
|
|
123
|
+
}
|
|
124
|
+
if (data.hasOwnProperty('encrypt_pdfs')) {
|
|
125
|
+
obj['encrypt_pdfs'] = _ApiClient["default"].convertToType(data['encrypt_pdfs'], 'Boolean');
|
|
126
|
+
}
|
|
127
|
+
if (data.hasOwnProperty('encrypt_pdfs_password')) {
|
|
128
|
+
obj['encrypt_pdfs_password'] = _ApiClient["default"].convertToType(data['encrypt_pdfs_password'], 'String');
|
|
129
|
+
}
|
|
130
|
+
if (data.hasOwnProperty('expire_submissions')) {
|
|
131
|
+
obj['expire_submissions'] = _ApiClient["default"].convertToType(data['expire_submissions'], 'Boolean');
|
|
132
|
+
}
|
|
133
|
+
if (data.hasOwnProperty('expire_after')) {
|
|
134
|
+
obj['expire_after'] = _ApiClient["default"].convertToType(data['expire_after'], 'Number');
|
|
135
|
+
}
|
|
136
|
+
if (data.hasOwnProperty('expiration_interval')) {
|
|
137
|
+
obj['expiration_interval'] = _ApiClient["default"].convertToType(data['expiration_interval'], _ExpirationInterval["default"]);
|
|
138
|
+
}
|
|
139
|
+
if (data.hasOwnProperty('merge_audit_trail_pdf')) {
|
|
140
|
+
obj['merge_audit_trail_pdf'] = _ApiClient["default"].convertToType(data['merge_audit_trail_pdf'], 'Boolean');
|
|
141
|
+
}
|
|
142
|
+
if (data.hasOwnProperty('parse_dates_using_template_date_format')) {
|
|
143
|
+
obj['parse_dates_using_template_date_format'] = _ApiClient["default"].convertToType(data['parse_dates_using_template_date_format'], 'Boolean');
|
|
144
|
+
}
|
|
145
|
+
if (data.hasOwnProperty('public_submissions')) {
|
|
146
|
+
obj['public_submissions'] = _ApiClient["default"].convertToType(data['public_submissions'], 'Boolean');
|
|
147
|
+
}
|
|
148
|
+
if (data.hasOwnProperty('public_web_form')) {
|
|
149
|
+
obj['public_web_form'] = _ApiClient["default"].convertToType(data['public_web_form'], 'Boolean');
|
|
150
|
+
}
|
|
151
|
+
if (data.hasOwnProperty('redirect_url')) {
|
|
152
|
+
obj['redirect_url'] = _ApiClient["default"].convertToType(data['redirect_url'], 'String');
|
|
153
|
+
}
|
|
154
|
+
if (data.hasOwnProperty('slack_webhook_url')) {
|
|
155
|
+
obj['slack_webhook_url'] = _ApiClient["default"].convertToType(data['slack_webhook_url'], 'String');
|
|
156
|
+
}
|
|
157
|
+
if (data.hasOwnProperty('defaults')) {
|
|
158
|
+
obj['defaults'] = _ApiClient["default"].convertToType(data['defaults'], _TemplateDefaultsInput["default"]);
|
|
159
|
+
}
|
|
160
|
+
if (data.hasOwnProperty('field_dependencies')) {
|
|
161
|
+
obj['field_dependencies'] = _ApiClient["default"].convertToType(data['field_dependencies'], [_TemplateFieldDependencyInput["default"]]);
|
|
162
|
+
}
|
|
163
|
+
if (data.hasOwnProperty('html')) {
|
|
164
|
+
obj['html'] = _ApiClient["default"].convertToType(data['html'], 'String');
|
|
165
|
+
}
|
|
166
|
+
if (data.hasOwnProperty('scss')) {
|
|
167
|
+
obj['scss'] = _ApiClient["default"].convertToType(data['scss'], 'String');
|
|
168
|
+
}
|
|
169
|
+
if (data.hasOwnProperty('header_html')) {
|
|
170
|
+
obj['header_html'] = _ApiClient["default"].convertToType(data['header_html'], 'String');
|
|
171
|
+
}
|
|
172
|
+
if (data.hasOwnProperty('footer_html')) {
|
|
173
|
+
obj['footer_html'] = _ApiClient["default"].convertToType(data['footer_html'], 'String');
|
|
174
|
+
}
|
|
175
|
+
if (data.hasOwnProperty('html_engine_options')) {
|
|
176
|
+
obj['html_engine_options'] = _ApiClient["default"].convertToType(data['html_engine_options'], _HtmlEngineOptionsInput["default"]);
|
|
177
|
+
}
|
|
178
|
+
if (data.hasOwnProperty('cache_id')) {
|
|
179
|
+
obj['cache_id'] = _ApiClient["default"].convertToType(data['cache_id'], 'String');
|
|
180
|
+
}
|
|
181
|
+
if (data.hasOwnProperty('filename')) {
|
|
182
|
+
obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String');
|
|
183
|
+
}
|
|
184
|
+
if (data.hasOwnProperty('detect_fields')) {
|
|
185
|
+
obj['detect_fields'] = _ApiClient["default"].convertToType(data['detect_fields'], 'Boolean');
|
|
186
|
+
}
|
|
187
|
+
if (data.hasOwnProperty('field_source')) {
|
|
188
|
+
obj['field_source'] = _ApiClient["default"].convertToType(data['field_source'], _FieldSetupSource["default"]);
|
|
189
|
+
}
|
|
190
|
+
if (data.hasOwnProperty('field_naming')) {
|
|
191
|
+
obj['field_naming'] = _ApiClient["default"].convertToType(data['field_naming'], _FieldSetupNaming["default"]);
|
|
192
|
+
}
|
|
193
|
+
if (data.hasOwnProperty('field_logic')) {
|
|
194
|
+
obj['field_logic'] = _ApiClient["default"].convertToType(data['field_logic'], _FieldSetupLogic["default"]);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return obj;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Validates the JSON data with respect to <code>CreateTemplateRequest</code>.
|
|
202
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
203
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateTemplateRequest</code>.
|
|
204
|
+
*/
|
|
205
|
+
}, {
|
|
206
|
+
key: "validateJSON",
|
|
207
|
+
value: function validateJSON(data) {
|
|
208
|
+
// check to make sure all required properties are present in the JSON string
|
|
209
|
+
var _iterator = _createForOfIteratorHelper(CreateTemplateRequest.RequiredProperties),
|
|
210
|
+
_step;
|
|
211
|
+
try {
|
|
212
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
213
|
+
var property = _step.value;
|
|
214
|
+
if (!data.hasOwnProperty(property)) {
|
|
215
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// ensure the json data is a string
|
|
219
|
+
} catch (err) {
|
|
220
|
+
_iterator.e(err);
|
|
221
|
+
} finally {
|
|
222
|
+
_iterator.f();
|
|
223
|
+
}
|
|
224
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
225
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
226
|
+
}
|
|
227
|
+
// ensure the json data is a string
|
|
228
|
+
if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
|
|
229
|
+
throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
|
|
230
|
+
}
|
|
231
|
+
// ensure the json data is a string
|
|
232
|
+
if (data['parent_folder_id'] && !(typeof data['parent_folder_id'] === 'string' || data['parent_folder_id'] instanceof String)) {
|
|
233
|
+
throw new Error("Expected the field `parent_folder_id` to be a primitive type in the JSON string but got " + data['parent_folder_id']);
|
|
234
|
+
}
|
|
235
|
+
// ensure the json data is an array
|
|
236
|
+
if (!Array.isArray(data['embed_domains'])) {
|
|
237
|
+
throw new Error("Expected the field `embed_domains` to be an array in the JSON data but got " + data['embed_domains']);
|
|
238
|
+
}
|
|
239
|
+
// ensure the json data is a string
|
|
240
|
+
if (data['encrypt_pdfs_password'] && !(typeof data['encrypt_pdfs_password'] === 'string' || data['encrypt_pdfs_password'] instanceof String)) {
|
|
241
|
+
throw new Error("Expected the field `encrypt_pdfs_password` to be a primitive type in the JSON string but got " + data['encrypt_pdfs_password']);
|
|
242
|
+
}
|
|
243
|
+
// ensure the json data is a string
|
|
244
|
+
if (data['redirect_url'] && !(typeof data['redirect_url'] === 'string' || data['redirect_url'] instanceof String)) {
|
|
245
|
+
throw new Error("Expected the field `redirect_url` to be a primitive type in the JSON string but got " + data['redirect_url']);
|
|
246
|
+
}
|
|
247
|
+
// ensure the json data is a string
|
|
248
|
+
if (data['slack_webhook_url'] && !(typeof data['slack_webhook_url'] === 'string' || data['slack_webhook_url'] instanceof String)) {
|
|
249
|
+
throw new Error("Expected the field `slack_webhook_url` to be a primitive type in the JSON string but got " + data['slack_webhook_url']);
|
|
250
|
+
}
|
|
251
|
+
// validate the optional field `defaults`
|
|
252
|
+
if (data['defaults']) {
|
|
253
|
+
// data not null
|
|
254
|
+
_TemplateDefaultsInput["default"].validateJSON(data['defaults']);
|
|
255
|
+
}
|
|
256
|
+
if (data['field_dependencies']) {
|
|
257
|
+
// data not null
|
|
258
|
+
// ensure the json data is an array
|
|
259
|
+
if (!Array.isArray(data['field_dependencies'])) {
|
|
260
|
+
throw new Error("Expected the field `field_dependencies` to be an array in the JSON data but got " + data['field_dependencies']);
|
|
261
|
+
}
|
|
262
|
+
// validate the optional field `field_dependencies` (array)
|
|
263
|
+
var _iterator2 = _createForOfIteratorHelper(data['field_dependencies']),
|
|
264
|
+
_step2;
|
|
265
|
+
try {
|
|
266
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
267
|
+
var item = _step2.value;
|
|
268
|
+
_TemplateFieldDependencyInput["default"].validateJSON(item);
|
|
269
|
+
}
|
|
270
|
+
} catch (err) {
|
|
271
|
+
_iterator2.e(err);
|
|
272
|
+
} finally {
|
|
273
|
+
_iterator2.f();
|
|
274
|
+
}
|
|
275
|
+
;
|
|
276
|
+
}
|
|
277
|
+
// ensure the json data is a string
|
|
278
|
+
if (data['html'] && !(typeof data['html'] === 'string' || data['html'] instanceof String)) {
|
|
279
|
+
throw new Error("Expected the field `html` to be a primitive type in the JSON string but got " + data['html']);
|
|
280
|
+
}
|
|
281
|
+
// ensure the json data is a string
|
|
282
|
+
if (data['scss'] && !(typeof data['scss'] === 'string' || data['scss'] instanceof String)) {
|
|
283
|
+
throw new Error("Expected the field `scss` to be a primitive type in the JSON string but got " + data['scss']);
|
|
284
|
+
}
|
|
285
|
+
// ensure the json data is a string
|
|
286
|
+
if (data['header_html'] && !(typeof data['header_html'] === 'string' || data['header_html'] instanceof String)) {
|
|
287
|
+
throw new Error("Expected the field `header_html` to be a primitive type in the JSON string but got " + data['header_html']);
|
|
288
|
+
}
|
|
289
|
+
// ensure the json data is a string
|
|
290
|
+
if (data['footer_html'] && !(typeof data['footer_html'] === 'string' || data['footer_html'] instanceof String)) {
|
|
291
|
+
throw new Error("Expected the field `footer_html` to be a primitive type in the JSON string but got " + data['footer_html']);
|
|
292
|
+
}
|
|
293
|
+
// validate the optional field `html_engine_options`
|
|
294
|
+
if (data['html_engine_options']) {
|
|
295
|
+
// data not null
|
|
296
|
+
_HtmlEngineOptionsInput["default"].validateJSON(data['html_engine_options']);
|
|
297
|
+
}
|
|
298
|
+
// ensure the json data is a string
|
|
299
|
+
if (data['cache_id'] && !(typeof data['cache_id'] === 'string' || data['cache_id'] instanceof String)) {
|
|
300
|
+
throw new Error("Expected the field `cache_id` to be a primitive type in the JSON string but got " + data['cache_id']);
|
|
301
|
+
}
|
|
302
|
+
// ensure the json data is a string
|
|
303
|
+
if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) {
|
|
304
|
+
throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
|
|
305
|
+
}
|
|
306
|
+
return true;
|
|
307
|
+
}
|
|
308
|
+
}]);
|
|
309
|
+
}();
|
|
310
|
+
CreateTemplateRequest.RequiredProperties = ["template_type"];
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* The template's name.
|
|
314
|
+
* @member {String} name
|
|
315
|
+
*/
|
|
316
|
+
CreateTemplateRequest.prototype['name'] = undefined;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* 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.
|
|
320
|
+
* @member {String} description
|
|
321
|
+
*/
|
|
322
|
+
CreateTemplateRequest.prototype['description'] = undefined;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* `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.
|
|
326
|
+
* @member {module:model/TemplateType} template_type
|
|
327
|
+
*/
|
|
328
|
+
CreateTemplateRequest.prototype['template_type'] = undefined;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* 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.
|
|
332
|
+
* @member {String} parent_folder_id
|
|
333
|
+
*/
|
|
334
|
+
CreateTemplateRequest.prototype['parent_folder_id'] = undefined;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* A locked template can't be changed or deleted until it's unlocked (`locked` can always be changed).
|
|
338
|
+
* @member {Boolean} locked
|
|
339
|
+
*/
|
|
340
|
+
CreateTemplateRequest.prototype['locked'] = undefined;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Print the submission ID in the footer of each page of PDFs signed through signature requests.
|
|
344
|
+
* @member {Boolean} add_signature_request_submission_id_footers
|
|
345
|
+
*/
|
|
346
|
+
CreateTemplateRequest.prototype['add_signature_request_submission_id_footers'] = undefined;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* 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.
|
|
350
|
+
* @member {module:model/AiFieldNamingLanguage} ai_field_naming_language
|
|
351
|
+
*/
|
|
352
|
+
CreateTemplateRequest.prototype['ai_field_naming_language'] = undefined;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Accept submission data with properties that aren't fields of the template.
|
|
356
|
+
* @member {Boolean} allow_additional_properties
|
|
357
|
+
*/
|
|
358
|
+
CreateTemplateRequest.prototype['allow_additional_properties'] = undefined;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* 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.
|
|
362
|
+
* @member {Boolean} allow_skipping_optional_fields
|
|
363
|
+
*/
|
|
364
|
+
CreateTemplateRequest.prototype['allow_skipping_optional_fields'] = undefined;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* 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). HTML templates have no visual form, so `web` is the only value they accept.
|
|
368
|
+
* @member {module:model/TemplateFormMode} default_form_mode
|
|
369
|
+
*/
|
|
370
|
+
CreateTemplateRequest.prototype['default_form_mode'] = undefined;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Generate PDFs whose text and check fields stay fillable ("Generate Editable PDFs"). A submission's `editable` overrides it.
|
|
374
|
+
* @member {Boolean} editable_submissions
|
|
375
|
+
*/
|
|
376
|
+
CreateTemplateRequest.prototype['editable_submissions'] = undefined;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* The sites where the template's signature requests, forms and embedded template editor can be loaded: 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). When it's empty, live signature requests don't load on any site, and the embedded template editor loads on every site.
|
|
380
|
+
* @member {Array.<String>} embed_domains
|
|
381
|
+
*/
|
|
382
|
+
CreateTemplateRequest.prototype['embed_domains'] = undefined;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Allow the embedded template editor to change sensitive template settings (webhooks, redirect URL, encryption, public access, expiration and so on).
|
|
386
|
+
* @member {Boolean} embed_edit_allow_settings
|
|
387
|
+
*/
|
|
388
|
+
CreateTemplateRequest.prototype['embed_edit_allow_settings'] = undefined;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Allow the embedded template editor to publish, restore, compare and delete published versions.
|
|
392
|
+
* @member {Boolean} embed_edit_allow_versioning
|
|
393
|
+
*/
|
|
394
|
+
CreateTemplateRequest.prototype['embed_edit_allow_versioning'] = undefined;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Allow the embedded template editor to replace the template's PDF.
|
|
398
|
+
* @member {Boolean} embed_edit_allow_document_replacement
|
|
399
|
+
*/
|
|
400
|
+
CreateTemplateRequest.prototype['embed_edit_allow_document_replacement'] = undefined;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Encrypt generated PDFs with `encrypt_pdfs_password`.
|
|
404
|
+
* @member {Boolean} encrypt_pdfs
|
|
405
|
+
*/
|
|
406
|
+
CreateTemplateRequest.prototype['encrypt_pdfs'] = undefined;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The password that opens encrypted PDFs. It's never returned; `has_encrypt_pdfs_password` says if it's set.
|
|
410
|
+
* @member {String} encrypt_pdfs_password
|
|
411
|
+
*/
|
|
412
|
+
CreateTemplateRequest.prototype['encrypt_pdfs_password'] = undefined;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Delete each submission's data and PDF after `expire_after` `expiration_interval`.
|
|
416
|
+
* @member {Boolean} expire_submissions
|
|
417
|
+
*/
|
|
418
|
+
CreateTemplateRequest.prototype['expire_submissions'] = undefined;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* 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).
|
|
422
|
+
* @member {Number} expire_after
|
|
423
|
+
*/
|
|
424
|
+
CreateTemplateRequest.prototype['expire_after'] = undefined;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The unit of `expire_after`.
|
|
428
|
+
* @member {module:model/ExpirationInterval} expiration_interval
|
|
429
|
+
*/
|
|
430
|
+
CreateTemplateRequest.prototype['expiration_interval'] = undefined;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Add the audit trail to the end of PDFs signed through signature requests.
|
|
434
|
+
* @member {Boolean} merge_audit_trail_pdf
|
|
435
|
+
*/
|
|
436
|
+
CreateTemplateRequest.prototype['merge_audit_trail_pdf'] = undefined;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* 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.
|
|
440
|
+
* @member {Boolean} parse_dates_using_template_date_format
|
|
441
|
+
*/
|
|
442
|
+
CreateTemplateRequest.prototype['parse_dates_using_template_date_format'] = undefined;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Allow anyone with a submission's ID to download its PDF.
|
|
446
|
+
* @member {Boolean} public_submissions
|
|
447
|
+
*/
|
|
448
|
+
CreateTemplateRequest.prototype['public_submissions'] = undefined;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Allow anyone to fill in the template's web form.
|
|
452
|
+
* @member {Boolean} public_web_form
|
|
453
|
+
*/
|
|
454
|
+
CreateTemplateRequest.prototype['public_web_form'] = undefined;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Where the web form sends people after they submit it.
|
|
458
|
+
* @member {String} redirect_url
|
|
459
|
+
*/
|
|
460
|
+
CreateTemplateRequest.prototype['redirect_url'] = undefined;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set.
|
|
464
|
+
* @member {String} slack_webhook_url
|
|
465
|
+
*/
|
|
466
|
+
CreateTemplateRequest.prototype['slack_webhook_url'] = undefined;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The default style of the template's fields. Setting it replaces the whole object.
|
|
470
|
+
* @member {module:model/TemplateDefaultsInput} defaults
|
|
471
|
+
*/
|
|
472
|
+
CreateTemplateRequest.prototype['defaults'] = undefined;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* The template's conditional logic rules. Setting them replaces all of the rules.
|
|
476
|
+
* @member {Array.<module:model/TemplateFieldDependencyInput>} field_dependencies
|
|
477
|
+
*/
|
|
478
|
+
CreateTemplateRequest.prototype['field_dependencies'] = undefined;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The HTML of an HTML template, as a Liquid template. Null for PDF templates.
|
|
482
|
+
* @member {String} html
|
|
483
|
+
*/
|
|
484
|
+
CreateTemplateRequest.prototype['html'] = undefined;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* The SCSS of an HTML template.
|
|
488
|
+
* @member {String} scss
|
|
489
|
+
*/
|
|
490
|
+
CreateTemplateRequest.prototype['scss'] = undefined;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* The HTML printed at the top of each page of an HTML template.
|
|
494
|
+
* @member {String} header_html
|
|
495
|
+
*/
|
|
496
|
+
CreateTemplateRequest.prototype['header_html'] = undefined;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The HTML printed at the bottom of each page of an HTML template.
|
|
500
|
+
* @member {String} footer_html
|
|
501
|
+
*/
|
|
502
|
+
CreateTemplateRequest.prototype['footer_html'] = undefined;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Null resets the options to their defaults.
|
|
506
|
+
* @member {module:model/HtmlEngineOptionsInput} html_engine_options
|
|
507
|
+
*/
|
|
508
|
+
CreateTemplateRequest.prototype['html_engine_options'] = undefined;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* A PDF template's document: the `fields.key` of a file you uploaded with the presigned upload (GET /uploads/presign). Required for a PDF template. To upload the PDF with the request, use POST /templates/upload.
|
|
512
|
+
* @member {String} cache_id
|
|
513
|
+
*/
|
|
514
|
+
CreateTemplateRequest.prototype['cache_id'] = undefined;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* The PDF's file name, for a `cache_id` (presigned uploads don't send one).
|
|
518
|
+
* @member {String} filename
|
|
519
|
+
*/
|
|
520
|
+
CreateTemplateRequest.prototype['filename'] = undefined;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
|
|
524
|
+
* @member {Boolean} detect_fields
|
|
525
|
+
*/
|
|
526
|
+
CreateTemplateRequest.prototype['detect_fields'] = undefined;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
530
|
+
* @member {module:model/FieldSetupSource} field_source
|
|
531
|
+
*/
|
|
532
|
+
CreateTemplateRequest.prototype['field_source'] = undefined;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
536
|
+
* @member {module:model/FieldSetupNaming} field_naming
|
|
537
|
+
*/
|
|
538
|
+
CreateTemplateRequest.prototype['field_naming'] = undefined;
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
542
|
+
* @member {module:model/FieldSetupLogic} field_logic
|
|
543
|
+
*/
|
|
544
|
+
CreateTemplateRequest.prototype['field_logic'] = undefined;
|
|
545
|
+
var _default = exports["default"] = CreateTemplateRequest;
|