docspring 2.0.0 → 3.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/README.md +53 -46
- package/dist/ApiClient.js +3 -3
- package/dist/api/{PDFApi.js → Client.js} +534 -372
- package/dist/index.js +52 -17
- package/dist/model/AddFieldsData.js +2 -2
- package/dist/model/BatchGeneratePdfs201Response.js +7 -7
- package/dist/model/CombinePdfsData.js +7 -7
- package/dist/model/CombinedSubmission.js +21 -21
- package/dist/model/CombinedSubmissionAction.js +13 -13
- package/dist/model/CopyTemplateOptions.js +7 -7
- package/dist/model/CreateCombinedSubmissionResponse.js +7 -7
- package/dist/model/CreateCustomFileData.js +7 -7
- package/dist/model/CreateCustomFileResponse.js +7 -7
- package/dist/model/CreateFolderData.js +2 -2
- package/dist/model/CreateHtmlTemplate.js +2 -2
- package/dist/model/CreatePdfSubmissionData.js +14 -2
- package/dist/model/CreatePdfTemplate.js +2 -2
- package/dist/model/CreateSubmissionDataRequestData.js +106 -2
- package/dist/model/CreateSubmissionDataRequestEventRequest.js +31 -7
- package/dist/model/CreateSubmissionDataRequestEventResponse.js +2 -2
- package/dist/model/CreateSubmissionDataRequestResponse.js +7 -7
- package/dist/model/CreateSubmissionDataRequestTokenResponse.js +2 -2
- package/dist/model/CreateSubmissionResponse.js +2 -2
- package/dist/model/CustomFile.js +2 -2
- package/dist/model/ErrorOrMultipleErrorsResponse.js +151 -0
- package/dist/model/ErrorResponse.js +2 -2
- package/dist/model/Folder.js +7 -7
- package/dist/model/JsonSchema.js +2 -2
- package/dist/model/ListSubmissionsResponse.js +7 -7
- package/dist/model/MoveFolderData.js +2 -2
- package/dist/model/MoveTemplateData.js +7 -7
- package/dist/model/MultipleErrorsResponse.js +2 -2
- package/dist/model/PublishVersionData.js +124 -0
- package/dist/model/RenameFolderData.js +2 -2
- package/dist/model/RestoreVersionData.js +112 -0
- package/dist/model/Submission.js +78 -32
- package/dist/model/Submission422Response.js +165 -0
- package/dist/model/SubmissionAction.js +13 -13
- package/dist/model/SubmissionBatch.js +15 -15
- package/dist/model/SubmissionBatchData.js +26 -2
- package/dist/model/SubmissionBatchWithSubmissions.js +15 -15
- package/dist/model/SubmissionDataRequest.js +31 -31
- package/dist/model/SubmissionDataRequestEvent.js +17 -17
- package/dist/model/SubmissionDataRequestShow.js +33 -33
- package/dist/model/SubmissionDataRequestToken.js +9 -9
- package/dist/model/SubmissionPreview.js +78 -32
- package/dist/model/SuccessErrorResponse.js +2 -2
- package/dist/model/SuccessMultipleErrorsResponse.js +2 -2
- package/dist/model/Template.js +194 -78
- package/dist/model/TemplateAddFieldsResponse.js +2 -2
- package/dist/model/TemplateDeleteResponse.js +166 -0
- package/dist/model/TemplatePreview.js +168 -66
- package/dist/model/{CombinedSubmissionData.js → TemplatePublishVersionResponse.js} +56 -52
- package/dist/model/UpdateHtmlTemplate.js +2 -2
- package/dist/model/UpdatePdfTemplate.js +108 -0
- package/dist/model/UpdateSubmissionDataRequestData.js +153 -2
- package/dist/model/UploadPresignResponse.js +2 -2
- package/package.json +1 -1
- package/dist/model/CreateHtmlSubmissionData.js +0 -161
package/dist/model/Template.js
CHANGED
|
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
18
|
* DocSpring API
|
|
19
|
-
* DocSpring
|
|
19
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: v1
|
|
22
22
|
*
|
|
@@ -29,62 +29,69 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The Template model module.
|
|
31
31
|
* @module model/Template
|
|
32
|
-
* @version
|
|
32
|
+
* @version 3.0.0
|
|
33
33
|
*/
|
|
34
34
|
var Template = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
36
36
|
* Constructs a new <code>Template</code>.
|
|
37
37
|
* @alias module:model/Template
|
|
38
|
-
* @param
|
|
39
|
-
* @param
|
|
38
|
+
* @param add_data_request_submission_id_footers {Boolean}
|
|
39
|
+
* @param allow_additional_properties {Boolean}
|
|
40
40
|
* @param description {String}
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @param
|
|
52
|
-
* @param
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
41
|
+
* @param document_filename {String}
|
|
42
|
+
* @param document_md5 {String}
|
|
43
|
+
* @param document_parse_error {Boolean}
|
|
44
|
+
* @param document_processed {Boolean}
|
|
45
|
+
* @param document_state {module:model/Template.DocumentStateEnum}
|
|
46
|
+
* @param document_url {String}
|
|
47
|
+
* @param editable_submissions {Boolean}
|
|
48
|
+
* @param embed_domains {String}
|
|
49
|
+
* @param encrypt_pdfs_password {String}
|
|
50
|
+
* @param encrypt_pdfs {Boolean}
|
|
51
|
+
* @param expiration_interval {String}
|
|
52
|
+
* @param expire_after {Number}
|
|
53
|
+
* @param expire_submissions {Boolean}
|
|
54
|
+
* @param external_predefined_fields_template_id {String}
|
|
55
|
+
* @param external_predefined_fields_template_name {String}
|
|
56
|
+
* @param first_template {Boolean}
|
|
57
57
|
* @param id {String}
|
|
58
58
|
* @param locked {Boolean}
|
|
59
|
-
* @param
|
|
59
|
+
* @param merge_audit_trail_pdf {Boolean}
|
|
60
60
|
* @param name {String}
|
|
61
|
-
* @param
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
61
|
+
* @param page_count {Number}
|
|
62
|
+
* @param page_dimensions {Array.<Array.<Number>>}
|
|
63
|
+
* @param parent_folder_id {String}
|
|
64
64
|
* @param path {String}
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @param
|
|
65
|
+
* @param permanent_document_url {String}
|
|
66
|
+
* @param public_submissions {Boolean}
|
|
67
|
+
* @param public_web_form {Boolean}
|
|
68
|
+
* @param redirect_url {String}
|
|
69
|
+
* @param slack_webhook_url {String}
|
|
70
|
+
* @param template_type {module:model/Template.TemplateTypeEnum}
|
|
71
|
+
* @param updated_at {String}
|
|
72
|
+
* @param version_published_at {String}
|
|
73
|
+
* @param version {String}
|
|
74
|
+
* @param webhook_url {String}
|
|
73
75
|
* @param demo {Boolean}
|
|
76
|
+
* @param latest_version {String}
|
|
77
|
+
* @param last_changed_at {String}
|
|
78
|
+
* @param last_changed_by_type {module:model/Template.LastChangedByTypeEnum}
|
|
79
|
+
* @param last_changed_by_id {String}
|
|
74
80
|
* @param defaults {Object}
|
|
75
|
-
* @param
|
|
81
|
+
* @param field_order {Array.<Array.<Number>>}
|
|
76
82
|
* @param fields {Object}
|
|
77
|
-
* @param
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
83
|
+
* @param footer_html {String}
|
|
84
|
+
* @param header_html {String}
|
|
85
|
+
* @param html_engine_options {Object}
|
|
80
86
|
* @param html {String}
|
|
81
|
-
* @param
|
|
87
|
+
* @param predefined_fields {Array.<Object>}
|
|
82
88
|
* @param scss {String}
|
|
83
|
-
* @param
|
|
89
|
+
* @param shared_field_data {Object}
|
|
90
|
+
* @param versions {Array.<Object>}
|
|
84
91
|
*/
|
|
85
|
-
function Template(
|
|
92
|
+
function Template(add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, defaults, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, versions) {
|
|
86
93
|
_classCallCheck(this, Template);
|
|
87
|
-
Template.initialize(this,
|
|
94
|
+
Template.initialize(this, add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, defaults, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, versions);
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
/**
|
|
@@ -94,53 +101,60 @@ var Template = /*#__PURE__*/function () {
|
|
|
94
101
|
*/
|
|
95
102
|
return _createClass(Template, null, [{
|
|
96
103
|
key: "initialize",
|
|
97
|
-
value: function initialize(obj,
|
|
98
|
-
obj['add_data_request_submission_id_footers'] =
|
|
99
|
-
obj['allow_additional_properties'] =
|
|
104
|
+
value: function initialize(obj, add_data_request_submission_id_footers, allow_additional_properties, description, document_filename, document_md5, document_parse_error, document_processed, document_state, document_url, editable_submissions, embed_domains, encrypt_pdfs_password, encrypt_pdfs, expiration_interval, expire_after, expire_submissions, external_predefined_fields_template_id, external_predefined_fields_template_name, first_template, id, locked, merge_audit_trail_pdf, name, page_count, page_dimensions, parent_folder_id, path, permanent_document_url, public_submissions, public_web_form, redirect_url, slack_webhook_url, template_type, updated_at, version_published_at, version, webhook_url, demo, latest_version, last_changed_at, last_changed_by_type, last_changed_by_id, defaults, field_order, fields, footer_html, header_html, html_engine_options, html, predefined_fields, scss, shared_field_data, versions) {
|
|
105
|
+
obj['add_data_request_submission_id_footers'] = add_data_request_submission_id_footers;
|
|
106
|
+
obj['allow_additional_properties'] = allow_additional_properties;
|
|
100
107
|
obj['description'] = description;
|
|
101
|
-
obj['document_filename'] =
|
|
102
|
-
obj['document_md5'] =
|
|
103
|
-
obj['document_parse_error'] =
|
|
104
|
-
obj['document_processed'] =
|
|
105
|
-
obj['document_state'] =
|
|
106
|
-
obj['document_url'] =
|
|
107
|
-
obj['editable_submissions'] =
|
|
108
|
-
obj['embed_domains'] =
|
|
109
|
-
obj['encrypt_pdfs_password'] =
|
|
110
|
-
obj['encrypt_pdfs'] =
|
|
111
|
-
obj['expiration_interval'] =
|
|
112
|
-
obj['expire_after'] =
|
|
113
|
-
obj['expire_submissions'] =
|
|
114
|
-
obj['external_predefined_fields_template_id'] =
|
|
115
|
-
obj['external_predefined_fields_template_name'] =
|
|
116
|
-
obj['first_template'] =
|
|
108
|
+
obj['document_filename'] = document_filename;
|
|
109
|
+
obj['document_md5'] = document_md5;
|
|
110
|
+
obj['document_parse_error'] = document_parse_error;
|
|
111
|
+
obj['document_processed'] = document_processed;
|
|
112
|
+
obj['document_state'] = document_state;
|
|
113
|
+
obj['document_url'] = document_url;
|
|
114
|
+
obj['editable_submissions'] = editable_submissions;
|
|
115
|
+
obj['embed_domains'] = embed_domains;
|
|
116
|
+
obj['encrypt_pdfs_password'] = encrypt_pdfs_password;
|
|
117
|
+
obj['encrypt_pdfs'] = encrypt_pdfs;
|
|
118
|
+
obj['expiration_interval'] = expiration_interval;
|
|
119
|
+
obj['expire_after'] = expire_after;
|
|
120
|
+
obj['expire_submissions'] = expire_submissions;
|
|
121
|
+
obj['external_predefined_fields_template_id'] = external_predefined_fields_template_id;
|
|
122
|
+
obj['external_predefined_fields_template_name'] = external_predefined_fields_template_name;
|
|
123
|
+
obj['first_template'] = first_template;
|
|
117
124
|
obj['id'] = id;
|
|
118
125
|
obj['locked'] = locked;
|
|
119
|
-
obj['merge_audit_trail_pdf'] =
|
|
126
|
+
obj['merge_audit_trail_pdf'] = merge_audit_trail_pdf;
|
|
120
127
|
obj['name'] = name;
|
|
121
|
-
obj['page_count'] =
|
|
122
|
-
obj['page_dimensions'] =
|
|
123
|
-
obj['parent_folder_id'] =
|
|
128
|
+
obj['page_count'] = page_count;
|
|
129
|
+
obj['page_dimensions'] = page_dimensions;
|
|
130
|
+
obj['parent_folder_id'] = parent_folder_id;
|
|
124
131
|
obj['path'] = path;
|
|
125
|
-
obj['permanent_document_url'] =
|
|
126
|
-
obj['public_submissions'] =
|
|
127
|
-
obj['public_web_form'] =
|
|
128
|
-
obj['redirect_url'] =
|
|
129
|
-
obj['slack_webhook_url'] =
|
|
130
|
-
obj['template_type'] =
|
|
131
|
-
obj['updated_at'] =
|
|
132
|
-
obj['
|
|
132
|
+
obj['permanent_document_url'] = permanent_document_url;
|
|
133
|
+
obj['public_submissions'] = public_submissions;
|
|
134
|
+
obj['public_web_form'] = public_web_form;
|
|
135
|
+
obj['redirect_url'] = redirect_url;
|
|
136
|
+
obj['slack_webhook_url'] = slack_webhook_url;
|
|
137
|
+
obj['template_type'] = template_type;
|
|
138
|
+
obj['updated_at'] = updated_at;
|
|
139
|
+
obj['version_published_at'] = version_published_at;
|
|
140
|
+
obj['version'] = version;
|
|
141
|
+
obj['webhook_url'] = webhook_url;
|
|
133
142
|
obj['demo'] = demo;
|
|
143
|
+
obj['latest_version'] = latest_version;
|
|
144
|
+
obj['last_changed_at'] = last_changed_at;
|
|
145
|
+
obj['last_changed_by_type'] = last_changed_by_type;
|
|
146
|
+
obj['last_changed_by_id'] = last_changed_by_id;
|
|
134
147
|
obj['defaults'] = defaults;
|
|
135
|
-
obj['field_order'] =
|
|
148
|
+
obj['field_order'] = field_order;
|
|
136
149
|
obj['fields'] = fields;
|
|
137
|
-
obj['footer_html'] =
|
|
138
|
-
obj['header_html'] =
|
|
139
|
-
obj['html_engine_options'] =
|
|
150
|
+
obj['footer_html'] = footer_html;
|
|
151
|
+
obj['header_html'] = header_html;
|
|
152
|
+
obj['html_engine_options'] = html_engine_options;
|
|
140
153
|
obj['html'] = html;
|
|
141
|
-
obj['predefined_fields'] =
|
|
154
|
+
obj['predefined_fields'] = predefined_fields;
|
|
142
155
|
obj['scss'] = scss;
|
|
143
|
-
obj['shared_field_data'] =
|
|
156
|
+
obj['shared_field_data'] = shared_field_data;
|
|
157
|
+
obj['versions'] = versions;
|
|
144
158
|
}
|
|
145
159
|
|
|
146
160
|
/**
|
|
@@ -257,12 +271,30 @@ var Template = /*#__PURE__*/function () {
|
|
|
257
271
|
if (data.hasOwnProperty('updated_at')) {
|
|
258
272
|
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'String');
|
|
259
273
|
}
|
|
274
|
+
if (data.hasOwnProperty('version_published_at')) {
|
|
275
|
+
obj['version_published_at'] = _ApiClient["default"].convertToType(data['version_published_at'], 'String');
|
|
276
|
+
}
|
|
277
|
+
if (data.hasOwnProperty('version')) {
|
|
278
|
+
obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
|
|
279
|
+
}
|
|
260
280
|
if (data.hasOwnProperty('webhook_url')) {
|
|
261
281
|
obj['webhook_url'] = _ApiClient["default"].convertToType(data['webhook_url'], 'String');
|
|
262
282
|
}
|
|
263
283
|
if (data.hasOwnProperty('demo')) {
|
|
264
284
|
obj['demo'] = _ApiClient["default"].convertToType(data['demo'], 'Boolean');
|
|
265
285
|
}
|
|
286
|
+
if (data.hasOwnProperty('latest_version')) {
|
|
287
|
+
obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
|
|
288
|
+
}
|
|
289
|
+
if (data.hasOwnProperty('last_changed_at')) {
|
|
290
|
+
obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'String');
|
|
291
|
+
}
|
|
292
|
+
if (data.hasOwnProperty('last_changed_by_type')) {
|
|
293
|
+
obj['last_changed_by_type'] = _ApiClient["default"].convertToType(data['last_changed_by_type'], 'String');
|
|
294
|
+
}
|
|
295
|
+
if (data.hasOwnProperty('last_changed_by_id')) {
|
|
296
|
+
obj['last_changed_by_id'] = _ApiClient["default"].convertToType(data['last_changed_by_id'], 'String');
|
|
297
|
+
}
|
|
266
298
|
if (data.hasOwnProperty('defaults')) {
|
|
267
299
|
obj['defaults'] = _ApiClient["default"].convertToType(data['defaults'], Object);
|
|
268
300
|
}
|
|
@@ -293,6 +325,9 @@ var Template = /*#__PURE__*/function () {
|
|
|
293
325
|
if (data.hasOwnProperty('shared_field_data')) {
|
|
294
326
|
obj['shared_field_data'] = _ApiClient["default"].convertToType(data['shared_field_data'], Object);
|
|
295
327
|
}
|
|
328
|
+
if (data.hasOwnProperty('versions')) {
|
|
329
|
+
obj['versions'] = _ApiClient["default"].convertToType(data['versions'], [Object]);
|
|
330
|
+
}
|
|
296
331
|
}
|
|
297
332
|
return obj;
|
|
298
333
|
}
|
|
@@ -401,9 +436,33 @@ var Template = /*#__PURE__*/function () {
|
|
|
401
436
|
throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
|
|
402
437
|
}
|
|
403
438
|
// ensure the json data is a string
|
|
439
|
+
if (data['version_published_at'] && !(typeof data['version_published_at'] === 'string' || data['version_published_at'] instanceof String)) {
|
|
440
|
+
throw new Error("Expected the field `version_published_at` to be a primitive type in the JSON string but got " + data['version_published_at']);
|
|
441
|
+
}
|
|
442
|
+
// ensure the json data is a string
|
|
443
|
+
if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
|
|
444
|
+
throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
|
|
445
|
+
}
|
|
446
|
+
// ensure the json data is a string
|
|
404
447
|
if (data['webhook_url'] && !(typeof data['webhook_url'] === 'string' || data['webhook_url'] instanceof String)) {
|
|
405
448
|
throw new Error("Expected the field `webhook_url` to be a primitive type in the JSON string but got " + data['webhook_url']);
|
|
406
449
|
}
|
|
450
|
+
// ensure the json data is a string
|
|
451
|
+
if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
|
|
452
|
+
throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
|
|
453
|
+
}
|
|
454
|
+
// ensure the json data is a string
|
|
455
|
+
if (data['last_changed_at'] && !(typeof data['last_changed_at'] === 'string' || data['last_changed_at'] instanceof String)) {
|
|
456
|
+
throw new Error("Expected the field `last_changed_at` to be a primitive type in the JSON string but got " + data['last_changed_at']);
|
|
457
|
+
}
|
|
458
|
+
// ensure the json data is a string
|
|
459
|
+
if (data['last_changed_by_type'] && !(typeof data['last_changed_by_type'] === 'string' || data['last_changed_by_type'] instanceof String)) {
|
|
460
|
+
throw new Error("Expected the field `last_changed_by_type` to be a primitive type in the JSON string but got " + data['last_changed_by_type']);
|
|
461
|
+
}
|
|
462
|
+
// ensure the json data is a string
|
|
463
|
+
if (data['last_changed_by_id'] && !(typeof data['last_changed_by_id'] === 'string' || data['last_changed_by_id'] instanceof String)) {
|
|
464
|
+
throw new Error("Expected the field `last_changed_by_id` to be a primitive type in the JSON string but got " + data['last_changed_by_id']);
|
|
465
|
+
}
|
|
407
466
|
// ensure the json data is an array
|
|
408
467
|
if (!Array.isArray(data['field_order'])) {
|
|
409
468
|
throw new Error("Expected the field `field_order` to be an array in the JSON data but got " + data['field_order']);
|
|
@@ -428,11 +487,15 @@ var Template = /*#__PURE__*/function () {
|
|
|
428
487
|
if (data['scss'] && !(typeof data['scss'] === 'string' || data['scss'] instanceof String)) {
|
|
429
488
|
throw new Error("Expected the field `scss` to be a primitive type in the JSON string but got " + data['scss']);
|
|
430
489
|
}
|
|
490
|
+
// ensure the json data is an array
|
|
491
|
+
if (!Array.isArray(data['versions'])) {
|
|
492
|
+
throw new Error("Expected the field `versions` to be an array in the JSON data but got " + data['versions']);
|
|
493
|
+
}
|
|
431
494
|
return true;
|
|
432
495
|
}
|
|
433
496
|
}]);
|
|
434
497
|
}();
|
|
435
|
-
Template.RequiredProperties = ["add_data_request_submission_id_footers", "allow_additional_properties", "description", "document_filename", "document_md5", "document_parse_error", "document_processed", "document_state", "document_url", "editable_submissions", "embed_domains", "encrypt_pdfs_password", "encrypt_pdfs", "expiration_interval", "expire_after", "expire_submissions", "external_predefined_fields_template_id", "external_predefined_fields_template_name", "first_template", "id", "locked", "merge_audit_trail_pdf", "name", "page_count", "page_dimensions", "parent_folder_id", "path", "permanent_document_url", "public_submissions", "public_web_form", "redirect_url", "slack_webhook_url", "template_type", "updated_at", "webhook_url", "demo", "defaults", "field_order", "fields", "footer_html", "header_html", "html_engine_options", "html", "predefined_fields", "scss", "shared_field_data"];
|
|
498
|
+
Template.RequiredProperties = ["add_data_request_submission_id_footers", "allow_additional_properties", "description", "document_filename", "document_md5", "document_parse_error", "document_processed", "document_state", "document_url", "editable_submissions", "embed_domains", "encrypt_pdfs_password", "encrypt_pdfs", "expiration_interval", "expire_after", "expire_submissions", "external_predefined_fields_template_id", "external_predefined_fields_template_name", "first_template", "id", "locked", "merge_audit_trail_pdf", "name", "page_count", "page_dimensions", "parent_folder_id", "path", "permanent_document_url", "public_submissions", "public_web_form", "redirect_url", "slack_webhook_url", "template_type", "updated_at", "version_published_at", "version", "webhook_url", "demo", "latest_version", "last_changed_at", "last_changed_by_type", "last_changed_by_id", "defaults", "field_order", "fields", "footer_html", "header_html", "html_engine_options", "html", "predefined_fields", "scss", "shared_field_data", "versions"];
|
|
436
499
|
|
|
437
500
|
/**
|
|
438
501
|
* @member {Boolean} add_data_request_submission_id_footers
|
|
@@ -604,6 +667,16 @@ Template.prototype['template_type'] = undefined;
|
|
|
604
667
|
*/
|
|
605
668
|
Template.prototype['updated_at'] = undefined;
|
|
606
669
|
|
|
670
|
+
/**
|
|
671
|
+
* @member {String} version_published_at
|
|
672
|
+
*/
|
|
673
|
+
Template.prototype['version_published_at'] = undefined;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* @member {String} version
|
|
677
|
+
*/
|
|
678
|
+
Template.prototype['version'] = undefined;
|
|
679
|
+
|
|
607
680
|
/**
|
|
608
681
|
* @member {String} webhook_url
|
|
609
682
|
*/
|
|
@@ -614,6 +687,26 @@ Template.prototype['webhook_url'] = undefined;
|
|
|
614
687
|
*/
|
|
615
688
|
Template.prototype['demo'] = undefined;
|
|
616
689
|
|
|
690
|
+
/**
|
|
691
|
+
* @member {String} latest_version
|
|
692
|
+
*/
|
|
693
|
+
Template.prototype['latest_version'] = undefined;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* @member {String} last_changed_at
|
|
697
|
+
*/
|
|
698
|
+
Template.prototype['last_changed_at'] = undefined;
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* @member {module:model/Template.LastChangedByTypeEnum} last_changed_by_type
|
|
702
|
+
*/
|
|
703
|
+
Template.prototype['last_changed_by_type'] = undefined;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* @member {String} last_changed_by_id
|
|
707
|
+
*/
|
|
708
|
+
Template.prototype['last_changed_by_id'] = undefined;
|
|
709
|
+
|
|
617
710
|
/**
|
|
618
711
|
* @member {Object} defaults
|
|
619
712
|
*/
|
|
@@ -664,6 +757,11 @@ Template.prototype['scss'] = undefined;
|
|
|
664
757
|
*/
|
|
665
758
|
Template.prototype['shared_field_data'] = undefined;
|
|
666
759
|
|
|
760
|
+
/**
|
|
761
|
+
* @member {Array.<Object>} versions
|
|
762
|
+
*/
|
|
763
|
+
Template.prototype['versions'] = undefined;
|
|
764
|
+
|
|
667
765
|
/**
|
|
668
766
|
* Allowed values for the <code>document_state</code> property.
|
|
669
767
|
* @enum {String}
|
|
@@ -714,4 +812,22 @@ Template['TemplateTypeEnum'] = {
|
|
|
714
812
|
*/
|
|
715
813
|
"html": "html"
|
|
716
814
|
};
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Allowed values for the <code>last_changed_by_type</code> property.
|
|
818
|
+
* @enum {String}
|
|
819
|
+
* @readonly
|
|
820
|
+
*/
|
|
821
|
+
Template['LastChangedByTypeEnum'] = {
|
|
822
|
+
/**
|
|
823
|
+
* value: "user"
|
|
824
|
+
* @const
|
|
825
|
+
*/
|
|
826
|
+
"user": "user",
|
|
827
|
+
/**
|
|
828
|
+
* value: "api"
|
|
829
|
+
* @const
|
|
830
|
+
*/
|
|
831
|
+
"api": "api"
|
|
832
|
+
};
|
|
717
833
|
var _default = exports["default"] = Template;
|
|
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
18
|
* DocSpring API
|
|
19
|
-
* DocSpring
|
|
19
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
20
20
|
*
|
|
21
21
|
* The version of the OpenAPI document: v1
|
|
22
22
|
*
|
|
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
29
29
|
/**
|
|
30
30
|
* The TemplateAddFieldsResponse model module.
|
|
31
31
|
* @module model/TemplateAddFieldsResponse
|
|
32
|
-
* @version
|
|
32
|
+
* @version 3.0.0
|
|
33
33
|
*/
|
|
34
34
|
var TemplateAddFieldsResponse = /*#__PURE__*/function () {
|
|
35
35
|
/**
|
|
@@ -0,0 +1,166 @@
|
|
|
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
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
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); }
|
|
10
|
+
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; } } }; }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* DocSpring API
|
|
19
|
+
* Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document: v1
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The TemplateDeleteResponse model module.
|
|
31
|
+
* @module model/TemplateDeleteResponse
|
|
32
|
+
* @version 3.0.0
|
|
33
|
+
*/
|
|
34
|
+
var TemplateDeleteResponse = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>TemplateDeleteResponse</code>.
|
|
37
|
+
* @alias module:model/TemplateDeleteResponse
|
|
38
|
+
* @param status {module:model/TemplateDeleteResponse.StatusEnum}
|
|
39
|
+
*/
|
|
40
|
+
function TemplateDeleteResponse(status) {
|
|
41
|
+
_classCallCheck(this, TemplateDeleteResponse);
|
|
42
|
+
TemplateDeleteResponse.initialize(this, status);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(TemplateDeleteResponse, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj, status) {
|
|
53
|
+
obj['status'] = status;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Constructs a <code>TemplateDeleteResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
60
|
+
* @param {module:model/TemplateDeleteResponse} obj Optional instance to populate.
|
|
61
|
+
* @return {module:model/TemplateDeleteResponse} The populated <code>TemplateDeleteResponse</code> instance.
|
|
62
|
+
*/
|
|
63
|
+
}, {
|
|
64
|
+
key: "constructFromObject",
|
|
65
|
+
value: function constructFromObject(data, obj) {
|
|
66
|
+
if (data) {
|
|
67
|
+
obj = obj || new TemplateDeleteResponse();
|
|
68
|
+
if (data.hasOwnProperty('status')) {
|
|
69
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('errors')) {
|
|
72
|
+
obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('latest_version')) {
|
|
75
|
+
obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('versions')) {
|
|
78
|
+
obj['versions'] = _ApiClient["default"].convertToType(data['versions'], [Object]);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Validates the JSON data with respect to <code>TemplateDeleteResponse</code>.
|
|
86
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
87
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateDeleteResponse</code>.
|
|
88
|
+
*/
|
|
89
|
+
}, {
|
|
90
|
+
key: "validateJSON",
|
|
91
|
+
value: function validateJSON(data) {
|
|
92
|
+
// check to make sure all required properties are present in the JSON string
|
|
93
|
+
var _iterator = _createForOfIteratorHelper(TemplateDeleteResponse.RequiredProperties),
|
|
94
|
+
_step;
|
|
95
|
+
try {
|
|
96
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
97
|
+
var property = _step.value;
|
|
98
|
+
if (!data.hasOwnProperty(property)) {
|
|
99
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// ensure the json data is a string
|
|
103
|
+
} catch (err) {
|
|
104
|
+
_iterator.e(err);
|
|
105
|
+
} finally {
|
|
106
|
+
_iterator.f();
|
|
107
|
+
}
|
|
108
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
109
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
110
|
+
}
|
|
111
|
+
// ensure the json data is an array
|
|
112
|
+
if (!Array.isArray(data['errors'])) {
|
|
113
|
+
throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
|
|
114
|
+
}
|
|
115
|
+
// ensure the json data is a string
|
|
116
|
+
if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is an array
|
|
120
|
+
if (!Array.isArray(data['versions'])) {
|
|
121
|
+
throw new Error("Expected the field `versions` to be an array in the JSON data but got " + data['versions']);
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
}]);
|
|
126
|
+
}();
|
|
127
|
+
TemplateDeleteResponse.RequiredProperties = ["status"];
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @member {module:model/TemplateDeleteResponse.StatusEnum} status
|
|
131
|
+
*/
|
|
132
|
+
TemplateDeleteResponse.prototype['status'] = undefined;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @member {Array.<String>} errors
|
|
136
|
+
*/
|
|
137
|
+
TemplateDeleteResponse.prototype['errors'] = undefined;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @member {String} latest_version
|
|
141
|
+
*/
|
|
142
|
+
TemplateDeleteResponse.prototype['latest_version'] = undefined;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @member {Array.<Object>} versions
|
|
146
|
+
*/
|
|
147
|
+
TemplateDeleteResponse.prototype['versions'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Allowed values for the <code>status</code> property.
|
|
151
|
+
* @enum {String}
|
|
152
|
+
* @readonly
|
|
153
|
+
*/
|
|
154
|
+
TemplateDeleteResponse['StatusEnum'] = {
|
|
155
|
+
/**
|
|
156
|
+
* value: "success"
|
|
157
|
+
* @const
|
|
158
|
+
*/
|
|
159
|
+
"success": "success",
|
|
160
|
+
/**
|
|
161
|
+
* value: "error"
|
|
162
|
+
* @const
|
|
163
|
+
*/
|
|
164
|
+
"error": "error"
|
|
165
|
+
};
|
|
166
|
+
var _default = exports["default"] = TemplateDeleteResponse;
|