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.
Files changed (59) hide show
  1. package/README.md +53 -46
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/{PDFApi.js → Client.js} +534 -372
  4. package/dist/index.js +52 -17
  5. package/dist/model/AddFieldsData.js +2 -2
  6. package/dist/model/BatchGeneratePdfs201Response.js +7 -7
  7. package/dist/model/CombinePdfsData.js +7 -7
  8. package/dist/model/CombinedSubmission.js +21 -21
  9. package/dist/model/CombinedSubmissionAction.js +13 -13
  10. package/dist/model/CopyTemplateOptions.js +7 -7
  11. package/dist/model/CreateCombinedSubmissionResponse.js +7 -7
  12. package/dist/model/CreateCustomFileData.js +7 -7
  13. package/dist/model/CreateCustomFileResponse.js +7 -7
  14. package/dist/model/CreateFolderData.js +2 -2
  15. package/dist/model/CreateHtmlTemplate.js +2 -2
  16. package/dist/model/CreatePdfSubmissionData.js +14 -2
  17. package/dist/model/CreatePdfTemplate.js +2 -2
  18. package/dist/model/CreateSubmissionDataRequestData.js +106 -2
  19. package/dist/model/CreateSubmissionDataRequestEventRequest.js +31 -7
  20. package/dist/model/CreateSubmissionDataRequestEventResponse.js +2 -2
  21. package/dist/model/CreateSubmissionDataRequestResponse.js +7 -7
  22. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +2 -2
  23. package/dist/model/CreateSubmissionResponse.js +2 -2
  24. package/dist/model/CustomFile.js +2 -2
  25. package/dist/model/ErrorOrMultipleErrorsResponse.js +151 -0
  26. package/dist/model/ErrorResponse.js +2 -2
  27. package/dist/model/Folder.js +7 -7
  28. package/dist/model/JsonSchema.js +2 -2
  29. package/dist/model/ListSubmissionsResponse.js +7 -7
  30. package/dist/model/MoveFolderData.js +2 -2
  31. package/dist/model/MoveTemplateData.js +7 -7
  32. package/dist/model/MultipleErrorsResponse.js +2 -2
  33. package/dist/model/PublishVersionData.js +124 -0
  34. package/dist/model/RenameFolderData.js +2 -2
  35. package/dist/model/RestoreVersionData.js +112 -0
  36. package/dist/model/Submission.js +78 -32
  37. package/dist/model/Submission422Response.js +165 -0
  38. package/dist/model/SubmissionAction.js +13 -13
  39. package/dist/model/SubmissionBatch.js +15 -15
  40. package/dist/model/SubmissionBatchData.js +26 -2
  41. package/dist/model/SubmissionBatchWithSubmissions.js +15 -15
  42. package/dist/model/SubmissionDataRequest.js +31 -31
  43. package/dist/model/SubmissionDataRequestEvent.js +17 -17
  44. package/dist/model/SubmissionDataRequestShow.js +33 -33
  45. package/dist/model/SubmissionDataRequestToken.js +9 -9
  46. package/dist/model/SubmissionPreview.js +78 -32
  47. package/dist/model/SuccessErrorResponse.js +2 -2
  48. package/dist/model/SuccessMultipleErrorsResponse.js +2 -2
  49. package/dist/model/Template.js +194 -78
  50. package/dist/model/TemplateAddFieldsResponse.js +2 -2
  51. package/dist/model/TemplateDeleteResponse.js +166 -0
  52. package/dist/model/TemplatePreview.js +168 -66
  53. package/dist/model/{CombinedSubmissionData.js → TemplatePublishVersionResponse.js} +56 -52
  54. package/dist/model/UpdateHtmlTemplate.js +2 -2
  55. package/dist/model/UpdatePdfTemplate.js +108 -0
  56. package/dist/model/UpdateSubmissionDataRequestData.js +153 -2
  57. package/dist/model/UploadPresignResponse.js +2 -2
  58. package/package.json +1 -1
  59. package/dist/model/CreateHtmlSubmissionData.js +0 -161
@@ -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 provides an API that helps you fill out and sign PDF templates.
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,52 +29,58 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The TemplatePreview model module.
31
31
  * @module model/TemplatePreview
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var TemplatePreview = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>TemplatePreview</code>.
37
37
  * @alias module:model/TemplatePreview
38
- * @param addDataRequestSubmissionIdFooters {Boolean}
39
- * @param allowAdditionalProperties {Boolean}
38
+ * @param add_data_request_submission_id_footers {Boolean}
39
+ * @param allow_additional_properties {Boolean}
40
40
  * @param description {String}
41
- * @param documentFilename {String}
42
- * @param documentMd5 {String}
43
- * @param documentParseError {Boolean}
44
- * @param documentProcessed {Boolean}
45
- * @param documentState {module:model/TemplatePreview.DocumentStateEnum}
46
- * @param documentUrl {String}
47
- * @param editableSubmissions {Boolean}
48
- * @param embedDomains {String}
49
- * @param encryptPdfsPassword {String}
50
- * @param encryptPdfs {Boolean}
51
- * @param expirationInterval {String}
52
- * @param expireAfter {Number}
53
- * @param expireSubmissions {Boolean}
54
- * @param externalPredefinedFieldsTemplateId {String}
55
- * @param externalPredefinedFieldsTemplateName {String}
56
- * @param firstTemplate {Boolean}
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/TemplatePreview.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 mergeAuditTrailPdf {Boolean}
59
+ * @param merge_audit_trail_pdf {Boolean}
60
60
  * @param name {String}
61
- * @param pageCount {Number}
62
- * @param pageDimensions {Array.<Array.<Number>>}
63
- * @param parentFolderId {String}
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 permanentDocumentUrl {String}
66
- * @param publicSubmissions {Boolean}
67
- * @param publicWebForm {Boolean}
68
- * @param redirectUrl {String}
69
- * @param slackWebhookUrl {String}
70
- * @param templateType {module:model/TemplatePreview.TemplateTypeEnum}
71
- * @param updatedAt {String}
72
- * @param webhookUrl {String}
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/TemplatePreview.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/TemplatePreview.LastChangedByTypeEnum}
79
+ * @param last_changed_by_id {String}
74
80
  */
75
- function TemplatePreview(addDataRequestSubmissionIdFooters, allowAdditionalProperties, description, documentFilename, documentMd5, documentParseError, documentProcessed, documentState, documentUrl, editableSubmissions, embedDomains, encryptPdfsPassword, encryptPdfs, expirationInterval, expireAfter, expireSubmissions, externalPredefinedFieldsTemplateId, externalPredefinedFieldsTemplateName, firstTemplate, id, locked, mergeAuditTrailPdf, name, pageCount, pageDimensions, parentFolderId, path, permanentDocumentUrl, publicSubmissions, publicWebForm, redirectUrl, slackWebhookUrl, templateType, updatedAt, webhookUrl, demo) {
81
+ function TemplatePreview(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) {
76
82
  _classCallCheck(this, TemplatePreview);
77
- TemplatePreview.initialize(this, addDataRequestSubmissionIdFooters, allowAdditionalProperties, description, documentFilename, documentMd5, documentParseError, documentProcessed, documentState, documentUrl, editableSubmissions, embedDomains, encryptPdfsPassword, encryptPdfs, expirationInterval, expireAfter, expireSubmissions, externalPredefinedFieldsTemplateId, externalPredefinedFieldsTemplateName, firstTemplate, id, locked, mergeAuditTrailPdf, name, pageCount, pageDimensions, parentFolderId, path, permanentDocumentUrl, publicSubmissions, publicWebForm, redirectUrl, slackWebhookUrl, templateType, updatedAt, webhookUrl, demo);
83
+ TemplatePreview.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);
78
84
  }
79
85
 
80
86
  /**
@@ -84,43 +90,49 @@ var TemplatePreview = /*#__PURE__*/function () {
84
90
  */
85
91
  return _createClass(TemplatePreview, null, [{
86
92
  key: "initialize",
87
- value: function initialize(obj, addDataRequestSubmissionIdFooters, allowAdditionalProperties, description, documentFilename, documentMd5, documentParseError, documentProcessed, documentState, documentUrl, editableSubmissions, embedDomains, encryptPdfsPassword, encryptPdfs, expirationInterval, expireAfter, expireSubmissions, externalPredefinedFieldsTemplateId, externalPredefinedFieldsTemplateName, firstTemplate, id, locked, mergeAuditTrailPdf, name, pageCount, pageDimensions, parentFolderId, path, permanentDocumentUrl, publicSubmissions, publicWebForm, redirectUrl, slackWebhookUrl, templateType, updatedAt, webhookUrl, demo) {
88
- obj['add_data_request_submission_id_footers'] = addDataRequestSubmissionIdFooters;
89
- obj['allow_additional_properties'] = allowAdditionalProperties;
93
+ 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) {
94
+ obj['add_data_request_submission_id_footers'] = add_data_request_submission_id_footers;
95
+ obj['allow_additional_properties'] = allow_additional_properties;
90
96
  obj['description'] = description;
91
- obj['document_filename'] = documentFilename;
92
- obj['document_md5'] = documentMd5;
93
- obj['document_parse_error'] = documentParseError;
94
- obj['document_processed'] = documentProcessed;
95
- obj['document_state'] = documentState;
96
- obj['document_url'] = documentUrl;
97
- obj['editable_submissions'] = editableSubmissions;
98
- obj['embed_domains'] = embedDomains;
99
- obj['encrypt_pdfs_password'] = encryptPdfsPassword;
100
- obj['encrypt_pdfs'] = encryptPdfs;
101
- obj['expiration_interval'] = expirationInterval;
102
- obj['expire_after'] = expireAfter;
103
- obj['expire_submissions'] = expireSubmissions;
104
- obj['external_predefined_fields_template_id'] = externalPredefinedFieldsTemplateId;
105
- obj['external_predefined_fields_template_name'] = externalPredefinedFieldsTemplateName;
106
- obj['first_template'] = firstTemplate;
97
+ obj['document_filename'] = document_filename;
98
+ obj['document_md5'] = document_md5;
99
+ obj['document_parse_error'] = document_parse_error;
100
+ obj['document_processed'] = document_processed;
101
+ obj['document_state'] = document_state;
102
+ obj['document_url'] = document_url;
103
+ obj['editable_submissions'] = editable_submissions;
104
+ obj['embed_domains'] = embed_domains;
105
+ obj['encrypt_pdfs_password'] = encrypt_pdfs_password;
106
+ obj['encrypt_pdfs'] = encrypt_pdfs;
107
+ obj['expiration_interval'] = expiration_interval;
108
+ obj['expire_after'] = expire_after;
109
+ obj['expire_submissions'] = expire_submissions;
110
+ obj['external_predefined_fields_template_id'] = external_predefined_fields_template_id;
111
+ obj['external_predefined_fields_template_name'] = external_predefined_fields_template_name;
112
+ obj['first_template'] = first_template;
107
113
  obj['id'] = id;
108
114
  obj['locked'] = locked;
109
- obj['merge_audit_trail_pdf'] = mergeAuditTrailPdf;
115
+ obj['merge_audit_trail_pdf'] = merge_audit_trail_pdf;
110
116
  obj['name'] = name;
111
- obj['page_count'] = pageCount;
112
- obj['page_dimensions'] = pageDimensions;
113
- obj['parent_folder_id'] = parentFolderId;
117
+ obj['page_count'] = page_count;
118
+ obj['page_dimensions'] = page_dimensions;
119
+ obj['parent_folder_id'] = parent_folder_id;
114
120
  obj['path'] = path;
115
- obj['permanent_document_url'] = permanentDocumentUrl;
116
- obj['public_submissions'] = publicSubmissions;
117
- obj['public_web_form'] = publicWebForm;
118
- obj['redirect_url'] = redirectUrl;
119
- obj['slack_webhook_url'] = slackWebhookUrl;
120
- obj['template_type'] = templateType;
121
- obj['updated_at'] = updatedAt;
122
- obj['webhook_url'] = webhookUrl;
121
+ obj['permanent_document_url'] = permanent_document_url;
122
+ obj['public_submissions'] = public_submissions;
123
+ obj['public_web_form'] = public_web_form;
124
+ obj['redirect_url'] = redirect_url;
125
+ obj['slack_webhook_url'] = slack_webhook_url;
126
+ obj['template_type'] = template_type;
127
+ obj['updated_at'] = updated_at;
128
+ obj['version_published_at'] = version_published_at;
129
+ obj['version'] = version;
130
+ obj['webhook_url'] = webhook_url;
123
131
  obj['demo'] = demo;
132
+ obj['latest_version'] = latest_version;
133
+ obj['last_changed_at'] = last_changed_at;
134
+ obj['last_changed_by_type'] = last_changed_by_type;
135
+ obj['last_changed_by_id'] = last_changed_by_id;
124
136
  }
125
137
 
126
138
  /**
@@ -237,12 +249,30 @@ var TemplatePreview = /*#__PURE__*/function () {
237
249
  if (data.hasOwnProperty('updated_at')) {
238
250
  obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'String');
239
251
  }
252
+ if (data.hasOwnProperty('version_published_at')) {
253
+ obj['version_published_at'] = _ApiClient["default"].convertToType(data['version_published_at'], 'String');
254
+ }
255
+ if (data.hasOwnProperty('version')) {
256
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
257
+ }
240
258
  if (data.hasOwnProperty('webhook_url')) {
241
259
  obj['webhook_url'] = _ApiClient["default"].convertToType(data['webhook_url'], 'String');
242
260
  }
243
261
  if (data.hasOwnProperty('demo')) {
244
262
  obj['demo'] = _ApiClient["default"].convertToType(data['demo'], 'Boolean');
245
263
  }
264
+ if (data.hasOwnProperty('latest_version')) {
265
+ obj['latest_version'] = _ApiClient["default"].convertToType(data['latest_version'], 'String');
266
+ }
267
+ if (data.hasOwnProperty('last_changed_at')) {
268
+ obj['last_changed_at'] = _ApiClient["default"].convertToType(data['last_changed_at'], 'String');
269
+ }
270
+ if (data.hasOwnProperty('last_changed_by_type')) {
271
+ obj['last_changed_by_type'] = _ApiClient["default"].convertToType(data['last_changed_by_type'], 'String');
272
+ }
273
+ if (data.hasOwnProperty('last_changed_by_id')) {
274
+ obj['last_changed_by_id'] = _ApiClient["default"].convertToType(data['last_changed_by_id'], 'String');
275
+ }
246
276
  }
247
277
  return obj;
248
278
  }
@@ -351,14 +381,38 @@ var TemplatePreview = /*#__PURE__*/function () {
351
381
  throw new Error("Expected the field `updated_at` to be a primitive type in the JSON string but got " + data['updated_at']);
352
382
  }
353
383
  // ensure the json data is a string
384
+ if (data['version_published_at'] && !(typeof data['version_published_at'] === 'string' || data['version_published_at'] instanceof String)) {
385
+ throw new Error("Expected the field `version_published_at` to be a primitive type in the JSON string but got " + data['version_published_at']);
386
+ }
387
+ // ensure the json data is a string
388
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
389
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
390
+ }
391
+ // ensure the json data is a string
354
392
  if (data['webhook_url'] && !(typeof data['webhook_url'] === 'string' || data['webhook_url'] instanceof String)) {
355
393
  throw new Error("Expected the field `webhook_url` to be a primitive type in the JSON string but got " + data['webhook_url']);
356
394
  }
395
+ // ensure the json data is a string
396
+ if (data['latest_version'] && !(typeof data['latest_version'] === 'string' || data['latest_version'] instanceof String)) {
397
+ throw new Error("Expected the field `latest_version` to be a primitive type in the JSON string but got " + data['latest_version']);
398
+ }
399
+ // ensure the json data is a string
400
+ if (data['last_changed_at'] && !(typeof data['last_changed_at'] === 'string' || data['last_changed_at'] instanceof String)) {
401
+ throw new Error("Expected the field `last_changed_at` to be a primitive type in the JSON string but got " + data['last_changed_at']);
402
+ }
403
+ // ensure the json data is a string
404
+ if (data['last_changed_by_type'] && !(typeof data['last_changed_by_type'] === 'string' || data['last_changed_by_type'] instanceof String)) {
405
+ 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']);
406
+ }
407
+ // ensure the json data is a string
408
+ if (data['last_changed_by_id'] && !(typeof data['last_changed_by_id'] === 'string' || data['last_changed_by_id'] instanceof String)) {
409
+ 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']);
410
+ }
357
411
  return true;
358
412
  }
359
413
  }]);
360
414
  }();
361
- TemplatePreview.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"];
415
+ TemplatePreview.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"];
362
416
 
363
417
  /**
364
418
  * @member {Boolean} add_data_request_submission_id_footers
@@ -530,6 +584,16 @@ TemplatePreview.prototype['template_type'] = undefined;
530
584
  */
531
585
  TemplatePreview.prototype['updated_at'] = undefined;
532
586
 
587
+ /**
588
+ * @member {String} version_published_at
589
+ */
590
+ TemplatePreview.prototype['version_published_at'] = undefined;
591
+
592
+ /**
593
+ * @member {String} version
594
+ */
595
+ TemplatePreview.prototype['version'] = undefined;
596
+
533
597
  /**
534
598
  * @member {String} webhook_url
535
599
  */
@@ -540,6 +604,26 @@ TemplatePreview.prototype['webhook_url'] = undefined;
540
604
  */
541
605
  TemplatePreview.prototype['demo'] = undefined;
542
606
 
607
+ /**
608
+ * @member {String} latest_version
609
+ */
610
+ TemplatePreview.prototype['latest_version'] = undefined;
611
+
612
+ /**
613
+ * @member {String} last_changed_at
614
+ */
615
+ TemplatePreview.prototype['last_changed_at'] = undefined;
616
+
617
+ /**
618
+ * @member {module:model/TemplatePreview.LastChangedByTypeEnum} last_changed_by_type
619
+ */
620
+ TemplatePreview.prototype['last_changed_by_type'] = undefined;
621
+
622
+ /**
623
+ * @member {String} last_changed_by_id
624
+ */
625
+ TemplatePreview.prototype['last_changed_by_id'] = undefined;
626
+
543
627
  /**
544
628
  * Allowed values for the <code>document_state</code> property.
545
629
  * @enum {String}
@@ -590,4 +674,22 @@ TemplatePreview['TemplateTypeEnum'] = {
590
674
  */
591
675
  "html": "html"
592
676
  };
677
+
678
+ /**
679
+ * Allowed values for the <code>last_changed_by_type</code> property.
680
+ * @enum {String}
681
+ * @readonly
682
+ */
683
+ TemplatePreview['LastChangedByTypeEnum'] = {
684
+ /**
685
+ * value: "user"
686
+ * @const
687
+ */
688
+ "user": "user",
689
+ /**
690
+ * value: "api"
691
+ * @const
692
+ */
693
+ "api": "api"
694
+ };
593
695
  var _default = exports["default"] = TemplatePreview;
@@ -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 provides an API that helps you fill out and sign PDF templates.
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
  *
@@ -27,19 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The CombinedSubmissionData model module.
31
- * @module model/CombinedSubmissionData
32
- * @version 2.0.0
30
+ * The TemplatePublishVersionResponse model module.
31
+ * @module model/TemplatePublishVersionResponse
32
+ * @version 3.0.0
33
33
  */
34
- var CombinedSubmissionData = /*#__PURE__*/function () {
34
+ var TemplatePublishVersionResponse = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>CombinedSubmissionData</code>.
37
- * @alias module:model/CombinedSubmissionData
38
- * @param submissionIds {Array.<String>}
36
+ * Constructs a new <code>TemplatePublishVersionResponse</code>.
37
+ * @alias module:model/TemplatePublishVersionResponse
38
+ * @param status {module:model/TemplatePublishVersionResponse.StatusEnum}
39
+ * @param result {Object}
39
40
  */
40
- function CombinedSubmissionData(submissionIds) {
41
- _classCallCheck(this, CombinedSubmissionData);
42
- CombinedSubmissionData.initialize(this, submissionIds);
41
+ function TemplatePublishVersionResponse(status, result) {
42
+ _classCallCheck(this, TemplatePublishVersionResponse);
43
+ TemplatePublishVersionResponse.initialize(this, status, result);
43
44
  }
44
45
 
45
46
  /**
@@ -47,53 +48,48 @@ var CombinedSubmissionData = /*#__PURE__*/function () {
47
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
49
  * Only for internal use.
49
50
  */
50
- return _createClass(CombinedSubmissionData, null, [{
51
+ return _createClass(TemplatePublishVersionResponse, null, [{
51
52
  key: "initialize",
52
- value: function initialize(obj, submissionIds) {
53
- obj['submission_ids'] = submissionIds;
53
+ value: function initialize(obj, status, result) {
54
+ obj['status'] = status;
55
+ obj['result'] = result;
54
56
  }
55
57
 
56
58
  /**
57
- * Constructs a <code>CombinedSubmissionData</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Constructs a <code>TemplatePublishVersionResponse</code> from a plain JavaScript object, optionally creating a new instance.
58
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
61
  * @param {Object} data The plain JavaScript object bearing properties of interest.
60
- * @param {module:model/CombinedSubmissionData} obj Optional instance to populate.
61
- * @return {module:model/CombinedSubmissionData} The populated <code>CombinedSubmissionData</code> instance.
62
+ * @param {module:model/TemplatePublishVersionResponse} obj Optional instance to populate.
63
+ * @return {module:model/TemplatePublishVersionResponse} The populated <code>TemplatePublishVersionResponse</code> instance.
62
64
  */
63
65
  }, {
64
66
  key: "constructFromObject",
65
67
  value: function constructFromObject(data, obj) {
66
68
  if (data) {
67
- obj = obj || new CombinedSubmissionData();
68
- if (data.hasOwnProperty('expires_in')) {
69
- obj['expires_in'] = _ApiClient["default"].convertToType(data['expires_in'], 'Number');
69
+ obj = obj || new TemplatePublishVersionResponse();
70
+ if (data.hasOwnProperty('status')) {
71
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
70
72
  }
71
- if (data.hasOwnProperty('metadata')) {
72
- obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
73
+ if (data.hasOwnProperty('result')) {
74
+ obj['result'] = _ApiClient["default"].convertToType(data['result'], Object);
73
75
  }
74
- if (data.hasOwnProperty('password')) {
75
- obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
76
- }
77
- if (data.hasOwnProperty('submission_ids')) {
78
- obj['submission_ids'] = _ApiClient["default"].convertToType(data['submission_ids'], ['String']);
79
- }
80
- if (data.hasOwnProperty('test')) {
81
- obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean');
76
+ if (data.hasOwnProperty('errors')) {
77
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
82
78
  }
83
79
  }
84
80
  return obj;
85
81
  }
86
82
 
87
83
  /**
88
- * Validates the JSON data with respect to <code>CombinedSubmissionData</code>.
84
+ * Validates the JSON data with respect to <code>TemplatePublishVersionResponse</code>.
89
85
  * @param {Object} data The plain JavaScript object bearing properties of interest.
90
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CombinedSubmissionData</code>.
86
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplatePublishVersionResponse</code>.
91
87
  */
92
88
  }, {
93
89
  key: "validateJSON",
94
90
  value: function validateJSON(data) {
95
91
  // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(CombinedSubmissionData.RequiredProperties),
92
+ var _iterator = _createForOfIteratorHelper(TemplatePublishVersionResponse.RequiredProperties),
97
93
  _step;
98
94
  try {
99
95
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -108,41 +104,49 @@ var CombinedSubmissionData = /*#__PURE__*/function () {
108
104
  } finally {
109
105
  _iterator.f();
110
106
  }
111
- if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
112
- throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
107
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
108
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
113
109
  }
114
110
  // ensure the json data is an array
115
- if (!Array.isArray(data['submission_ids'])) {
116
- throw new Error("Expected the field `submission_ids` to be an array in the JSON data but got " + data['submission_ids']);
111
+ if (!Array.isArray(data['errors'])) {
112
+ throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
117
113
  }
118
114
  return true;
119
115
  }
120
116
  }]);
121
117
  }();
122
- CombinedSubmissionData.RequiredProperties = ["submission_ids"];
123
-
124
- /**
125
- * @member {Number} expires_in
126
- */
127
- CombinedSubmissionData.prototype['expires_in'] = undefined;
118
+ TemplatePublishVersionResponse.RequiredProperties = ["status", "result"];
128
119
 
129
120
  /**
130
- * @member {Object} metadata
121
+ * @member {module:model/TemplatePublishVersionResponse.StatusEnum} status
131
122
  */
132
- CombinedSubmissionData.prototype['metadata'] = undefined;
123
+ TemplatePublishVersionResponse.prototype['status'] = undefined;
133
124
 
134
125
  /**
135
- * @member {String} password
126
+ * @member {Object} result
136
127
  */
137
- CombinedSubmissionData.prototype['password'] = undefined;
128
+ TemplatePublishVersionResponse.prototype['result'] = undefined;
138
129
 
139
130
  /**
140
- * @member {Array.<String>} submission_ids
131
+ * @member {Array.<String>} errors
141
132
  */
142
- CombinedSubmissionData.prototype['submission_ids'] = undefined;
133
+ TemplatePublishVersionResponse.prototype['errors'] = undefined;
143
134
 
144
135
  /**
145
- * @member {Boolean} test
136
+ * Allowed values for the <code>status</code> property.
137
+ * @enum {String}
138
+ * @readonly
146
139
  */
147
- CombinedSubmissionData.prototype['test'] = undefined;
148
- var _default = exports["default"] = CombinedSubmissionData;
140
+ TemplatePublishVersionResponse['StatusEnum'] = {
141
+ /**
142
+ * value: "success"
143
+ * @const
144
+ */
145
+ "success": "success",
146
+ /**
147
+ * value: "error"
148
+ * @const
149
+ */
150
+ "error": "error"
151
+ };
152
+ var _default = exports["default"] = TemplatePublishVersionResponse;
@@ -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 provides an API that helps you fill out and sign PDF templates.
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 UpdateHtmlTemplate model module.
31
31
  * @module model/UpdateHtmlTemplate
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var UpdateHtmlTemplate = /*#__PURE__*/function () {
35
35
  /**
@@ -0,0 +1,108 @@
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 UpdatePdfTemplate model module.
31
+ * @module model/UpdatePdfTemplate
32
+ * @version 3.0.0
33
+ */
34
+ var UpdatePdfTemplate = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>UpdatePdfTemplate</code>.
37
+ * @alias module:model/UpdatePdfTemplate
38
+ * @param template {Object}
39
+ */
40
+ function UpdatePdfTemplate(template) {
41
+ _classCallCheck(this, UpdatePdfTemplate);
42
+ UpdatePdfTemplate.initialize(this, template);
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(UpdatePdfTemplate, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, template) {
53
+ obj['template'] = template;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>UpdatePdfTemplate</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/UpdatePdfTemplate} obj Optional instance to populate.
61
+ * @return {module:model/UpdatePdfTemplate} The populated <code>UpdatePdfTemplate</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new UpdatePdfTemplate();
68
+ if (data.hasOwnProperty('template')) {
69
+ obj['template'] = _ApiClient["default"].convertToType(data['template'], Object);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>UpdatePdfTemplate</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdatePdfTemplate</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // check to make sure all required properties are present in the JSON string
84
+ var _iterator = _createForOfIteratorHelper(UpdatePdfTemplate.RequiredProperties),
85
+ _step;
86
+ try {
87
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
88
+ var property = _step.value;
89
+ if (!data.hasOwnProperty(property)) {
90
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
91
+ }
92
+ }
93
+ } catch (err) {
94
+ _iterator.e(err);
95
+ } finally {
96
+ _iterator.f();
97
+ }
98
+ return true;
99
+ }
100
+ }]);
101
+ }();
102
+ UpdatePdfTemplate.RequiredProperties = ["template"];
103
+
104
+ /**
105
+ * @member {Object} template
106
+ */
107
+ UpdatePdfTemplate.prototype['template'] = undefined;
108
+ var _default = exports["default"] = UpdatePdfTemplate;