docspring 3.2.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.
Files changed (157) hide show
  1. package/AGENTS.md +79 -19
  2. package/README.md +65 -63
  3. package/dist/ApiClient.js +62 -27
  4. package/dist/RequestSchemas.js +2297 -0
  5. package/dist/RequestValidator.js +494 -0
  6. package/dist/api/Client.js +1345 -946
  7. package/dist/index.js +655 -151
  8. package/dist/model/AiFieldNamingLanguage.js +64 -0
  9. package/dist/model/{AddFieldsData.js → AuthenticationCheck.js} +31 -31
  10. package/dist/model/BarcodeSymbology.js +89 -0
  11. package/dist/model/CheckCharacter.js +74 -0
  12. package/dist/model/CombinedFieldType.js +59 -0
  13. package/dist/model/CombinedPdf.js +294 -0
  14. package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +26 -26
  15. package/dist/model/CombinedPdfList.js +132 -0
  16. package/dist/model/{SubmissionDataRequestToken.js → CombinedPdfSource.js} +55 -52
  17. package/dist/model/CombinedPdfSourceInput.js +270 -0
  18. package/dist/model/{SuccessErrorResponse.js → CombinedPdfSourcePdf.js} +41 -55
  19. package/dist/model/CombinedPdfSourceType.js +74 -0
  20. package/dist/model/CombinedPdfState.js +74 -0
  21. package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +25 -21
  22. package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +68 -52
  23. package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +24 -22
  24. package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +46 -27
  25. package/dist/model/{CreateSubmissionDataRequestEventRequest.js → CreateSignatureRequestEventRequest.js} +41 -137
  26. package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
  27. package/dist/model/{CreatePdfSubmissionData.js → CreateSubmissionBatchRequest.js} +63 -87
  28. package/dist/model/CreateSubmissionRequest.js +212 -0
  29. package/dist/model/CreateTemplateRequest.js +545 -0
  30. package/dist/model/CreateWebhookRequest.js +234 -0
  31. package/dist/model/CustomFile.js +66 -15
  32. package/dist/model/CustomFileList.js +132 -0
  33. package/dist/model/CustomFileSourcePdf.js +130 -0
  34. package/dist/model/ErrorCode.js +154 -0
  35. package/dist/model/{BatchGeneratePdfs201Response.js → ErrorDetail.js} +65 -76
  36. package/dist/model/ErrorInfo.js +211 -0
  37. package/dist/model/ErrorResponse.js +11 -40
  38. package/dist/model/ExpirationInterval.js +64 -0
  39. package/dist/model/{CreateSubmissionResponse.js → FieldComparisonCondition.js} +46 -64
  40. package/dist/model/FieldComparisonOperator.js +69 -0
  41. package/dist/model/FieldDisplayType.js +79 -0
  42. package/dist/model/FieldEqualsCondition.js +137 -0
  43. package/dist/model/FieldEqualsOperator.js +59 -0
  44. package/dist/model/FieldInCondition.js +145 -0
  45. package/dist/model/FieldOverride.js +722 -0
  46. package/dist/model/{MultipleErrorsResponse.js → FieldPresenceCondition.js} +39 -54
  47. package/dist/model/FieldPresenceOperator.js +59 -0
  48. package/dist/model/FieldRangeCondition.js +148 -0
  49. package/dist/model/FieldReimportState.js +69 -0
  50. package/dist/model/FieldSetupLogic.js +59 -0
  51. package/dist/model/FieldSetupNaming.js +59 -0
  52. package/dist/model/FieldSetupSource.js +64 -0
  53. package/dist/model/Folder.js +37 -10
  54. package/dist/model/FolderList.js +132 -0
  55. package/dist/model/GeneratedFile.js +214 -0
  56. package/dist/model/GeneratedFileState.js +64 -0
  57. package/dist/model/HtmlEngineOptions.js +230 -0
  58. package/dist/model/HtmlEngineOptionsInput.js +193 -0
  59. package/dist/model/ImageGravity.js +94 -0
  60. package/dist/model/ImageScaleType.js +64 -0
  61. package/dist/model/ModelCodeLanguage.js +94 -0
  62. package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +33 -27
  63. package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +24 -34
  64. package/dist/model/NumberConditionType.js +79 -0
  65. package/dist/model/PageFormat.js +114 -0
  66. package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +32 -32
  67. package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +24 -22
  68. package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +24 -22
  69. package/dist/model/ShapeType.js +79 -0
  70. package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +164 -239
  71. package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
  72. package/dist/model/SignatureRequestAuthType.js +84 -0
  73. package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +66 -148
  74. package/dist/model/SignatureRequestEventType.js +79 -0
  75. package/dist/model/SignatureRequestInput.js +278 -0
  76. package/dist/model/SignatureRequestMessageType.js +94 -0
  77. package/dist/model/SignatureRequestState.js +64 -0
  78. package/dist/model/SignatureRequestToken.js +195 -0
  79. package/dist/model/SignatureRequestTokenType.js +59 -0
  80. package/dist/model/StringConditionType.js +74 -0
  81. package/dist/model/Submission.js +185 -339
  82. package/dist/model/SubmissionAction.js +29 -114
  83. package/dist/model/SubmissionActionState.js +69 -0
  84. package/dist/model/SubmissionActionType.js +84 -0
  85. package/dist/model/SubmissionBatch.js +73 -54
  86. package/dist/model/SubmissionBatchState.js +64 -0
  87. package/dist/model/SubmissionFiles.js +108 -0
  88. package/dist/model/SubmissionInput.js +204 -0
  89. package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +34 -41
  90. package/dist/model/SubmissionSource.js +69 -0
  91. package/dist/model/SubmissionSourcePdf.js +130 -0
  92. package/dist/model/SubmissionState.js +114 -0
  93. package/dist/model/Template.js +309 -572
  94. package/dist/model/TemplateActor.js +171 -0
  95. package/dist/model/TemplateActorType.js +64 -0
  96. package/dist/model/TemplateDefaults.js +307 -0
  97. package/dist/model/TemplateDefaultsInput.js +305 -0
  98. package/dist/model/TemplateDocument.js +280 -0
  99. package/dist/model/TemplateDocumentState.js +74 -0
  100. package/dist/model/TemplateFieldDependency.js +184 -0
  101. package/dist/model/TemplateFieldDependencyAction.js +64 -0
  102. package/dist/model/{CreateCombinedSubmissionResponse.js → TemplateFieldDependencyCondition.js} +50 -61
  103. package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
  104. package/dist/model/TemplateFieldDependencyInput.js +182 -0
  105. package/dist/model/TemplateFieldDependencyMatch.js +59 -0
  106. package/dist/model/TemplateFieldDependencyOperator.js +99 -0
  107. package/dist/model/TemplateFieldLogicStatus.js +74 -0
  108. package/dist/model/TemplateFormMode.js +64 -0
  109. package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +33 -85
  110. package/dist/model/TemplatePageAiError.js +69 -0
  111. package/dist/model/TemplatePageAiNamingStatus.js +59 -0
  112. package/dist/model/TemplatePageFieldsStatus.js +74 -0
  113. package/dist/model/TemplatePageImageStatus.js +59 -0
  114. package/dist/model/TemplatePageProcessingStatus.js +162 -0
  115. package/dist/model/{SubmissionBatchData.js → TemplateSourcePdf.js} +49 -49
  116. package/dist/model/TemplateSummary.js +560 -0
  117. package/dist/model/{SuccessMultipleErrorsResponse.js → TemplateSummaryList.js} +43 -55
  118. package/dist/model/TemplateType.js +59 -0
  119. package/dist/model/{Submission422Response.js → TemplateVersion.js} +59 -62
  120. package/dist/model/TemplateVersionType.js +64 -0
  121. package/dist/model/TextAlignment.js +69 -0
  122. package/dist/model/TextOverflow.js +59 -0
  123. package/dist/model/TextVerticalAlignment.js +64 -0
  124. package/dist/model/Typeface.js +134 -0
  125. package/dist/model/UpdateSignatureRequestRequest.js +183 -0
  126. package/dist/model/{ErrorOrMultipleErrorsResponse.js → UpdateTemplateDocumentRequest.js} +43 -60
  127. package/dist/model/UpdateTemplateRequest.js +450 -0
  128. package/dist/model/UpdateWebhookRequest.js +209 -0
  129. package/dist/model/UploadMethod.js +54 -0
  130. package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +52 -57
  131. package/dist/model/UrlSourcePdf.js +130 -0
  132. package/dist/model/Webhook.js +57 -72
  133. package/dist/model/WebhookEventType.js +174 -0
  134. package/dist/model/WebhookList.js +132 -0
  135. package/dist/model/WebhookMode.js +59 -0
  136. package/package.json +1 -1
  137. package/dist/model/CombinedSubmission.js +0 -308
  138. package/dist/model/CombinedSubmissionAction.js +0 -268
  139. package/dist/model/CreateCustomFileResponse.js +0 -155
  140. package/dist/model/CreateHtmlTemplate.js +0 -108
  141. package/dist/model/CreatePdfTemplate.js +0 -108
  142. package/dist/model/CreateSubmissionDataRequestData.js +0 -314
  143. package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -155
  144. package/dist/model/CreateSubmissionDataRequestResponse.js +0 -155
  145. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -155
  146. package/dist/model/CreateWebhookData.js +0 -108
  147. package/dist/model/JsonSchema.js +0 -205
  148. package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
  149. package/dist/model/SubmissionDataRequest.js +0 -496
  150. package/dist/model/SubmissionPreview.js +0 -504
  151. package/dist/model/TemplateAddFieldsResponse.js +0 -156
  152. package/dist/model/TemplateDeleteResponse.js +0 -168
  153. package/dist/model/TemplatePreview.js +0 -796
  154. package/dist/model/TemplatePublishVersionResponse.js +0 -154
  155. package/dist/model/UpdateHtmlTemplate.js +0 -108
  156. package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
  157. package/dist/model/UpdateWebhookData.js +0 -108
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _TemplateSummary = _interopRequireDefault(require("./TemplateSummary"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
10
  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
11
  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; } } }; }
@@ -18,7 +19,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
18
19
  * DocSpring API
19
20
  * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
21
  *
21
- * The version of the OpenAPI document: v1
22
+ * The version of the OpenAPI document: v2
22
23
  *
23
24
  *
24
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,20 +28,22 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
27
28
  *
28
29
  */
29
30
  /**
30
- * The SuccessMultipleErrorsResponse model module.
31
- * @module model/SuccessMultipleErrorsResponse
32
- * @version 3.2.0
31
+ * The TemplateSummaryList model module.
32
+ * @module model/TemplateSummaryList
33
+ * @version 4.0.0
33
34
  */
34
- var SuccessMultipleErrorsResponse = /*#__PURE__*/function () {
35
+ var TemplateSummaryList = /*#__PURE__*/function () {
35
36
  /**
36
- * Constructs a new <code>SuccessMultipleErrorsResponse</code>.
37
- * @alias module:model/SuccessMultipleErrorsResponse
37
+ * Constructs a new <code>TemplateSummaryList</code>.
38
+ * A page of templates (drafts), newest first.
39
+ * @alias module:model/TemplateSummaryList
38
40
  * @extends Object
39
- * @param status {module:model/SuccessMultipleErrorsResponse.StatusEnum}
41
+ * @param data {Array.<module:model/TemplateSummary>} The items on this page.
42
+ * @param next_cursor {String} Pass it as `cursor` to get the next page. Null on the last page.
40
43
  */
41
- function SuccessMultipleErrorsResponse(status) {
42
- _classCallCheck(this, SuccessMultipleErrorsResponse);
43
- SuccessMultipleErrorsResponse.initialize(this, status);
44
+ function TemplateSummaryList(data, next_cursor) {
45
+ _classCallCheck(this, TemplateSummaryList);
46
+ TemplateSummaryList.initialize(this, data, next_cursor);
44
47
  }
45
48
 
46
49
  /**
@@ -48,45 +51,46 @@ var SuccessMultipleErrorsResponse = /*#__PURE__*/function () {
48
51
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
52
  * Only for internal use.
50
53
  */
51
- return _createClass(SuccessMultipleErrorsResponse, null, [{
54
+ return _createClass(TemplateSummaryList, null, [{
52
55
  key: "initialize",
53
- value: function initialize(obj, status) {
54
- obj['status'] = status;
56
+ value: function initialize(obj, data, next_cursor) {
57
+ obj['data'] = data;
58
+ obj['next_cursor'] = next_cursor;
55
59
  }
56
60
 
57
61
  /**
58
- * Constructs a <code>SuccessMultipleErrorsResponse</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Constructs a <code>TemplateSummaryList</code> from a plain JavaScript object, optionally creating a new instance.
59
63
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
64
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/SuccessMultipleErrorsResponse} obj Optional instance to populate.
62
- * @return {module:model/SuccessMultipleErrorsResponse} The populated <code>SuccessMultipleErrorsResponse</code> instance.
65
+ * @param {module:model/TemplateSummaryList} obj Optional instance to populate.
66
+ * @return {module:model/TemplateSummaryList} The populated <code>TemplateSummaryList</code> instance.
63
67
  */
64
68
  }, {
65
69
  key: "constructFromObject",
66
70
  value: function constructFromObject(data, obj) {
67
71
  if (data) {
68
- obj = obj || new SuccessMultipleErrorsResponse();
72
+ obj = obj || new TemplateSummaryList();
69
73
  _ApiClient["default"].constructFromObject(data, obj, 'Object');
70
- if (data.hasOwnProperty('status')) {
71
- obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
74
+ if (data.hasOwnProperty('data')) {
75
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_TemplateSummary["default"]]);
72
76
  }
73
- if (data.hasOwnProperty('errors')) {
74
- obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
77
+ if (data.hasOwnProperty('next_cursor')) {
78
+ obj['next_cursor'] = _ApiClient["default"].convertToType(data['next_cursor'], 'String');
75
79
  }
76
80
  }
77
81
  return obj;
78
82
  }
79
83
 
80
84
  /**
81
- * Validates the JSON data with respect to <code>SuccessMultipleErrorsResponse</code>.
85
+ * Validates the JSON data with respect to <code>TemplateSummaryList</code>.
82
86
  * @param {Object} data The plain JavaScript object bearing properties of interest.
83
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SuccessMultipleErrorsResponse</code>.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateSummaryList</code>.
84
88
  */
85
89
  }, {
86
90
  key: "validateJSON",
87
91
  value: function validateJSON(data) {
88
92
  // check to make sure all required properties are present in the JSON string
89
- var _iterator = _createForOfIteratorHelper(SuccessMultipleErrorsResponse.RequiredProperties),
93
+ var _iterator = _createForOfIteratorHelper(TemplateSummaryList.RequiredProperties),
90
94
  _step;
91
95
  try {
92
96
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -95,50 +99,34 @@ var SuccessMultipleErrorsResponse = /*#__PURE__*/function () {
95
99
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
100
  }
97
101
  }
98
- // ensure the json data is a string
102
+ // ensure the json data is an array
99
103
  } catch (err) {
100
104
  _iterator.e(err);
101
105
  } finally {
102
106
  _iterator.f();
103
107
  }
104
- if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
105
- throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
108
+ if (!Array.isArray(data['data'])) {
109
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
106
110
  }
107
- // ensure the json data is an array
108
- if (!Array.isArray(data['errors'])) {
109
- throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
111
+ // ensure the json data is a string
112
+ if (data['next_cursor'] && !(typeof data['next_cursor'] === 'string' || data['next_cursor'] instanceof String)) {
113
+ throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data['next_cursor']);
110
114
  }
111
115
  return true;
112
116
  }
113
117
  }]);
114
118
  }();
115
- SuccessMultipleErrorsResponse.RequiredProperties = ["status"];
119
+ TemplateSummaryList.RequiredProperties = ["data", "next_cursor"];
116
120
 
117
121
  /**
118
- * @member {module:model/SuccessMultipleErrorsResponse.StatusEnum} status
122
+ * The items on this page.
123
+ * @member {Array.<module:model/TemplateSummary>} data
119
124
  */
120
- SuccessMultipleErrorsResponse.prototype['status'] = undefined;
125
+ TemplateSummaryList.prototype['data'] = undefined;
121
126
 
122
127
  /**
123
- * @member {Array.<String>} errors
128
+ * Pass it as `cursor` to get the next page. Null on the last page.
129
+ * @member {String} next_cursor
124
130
  */
125
- SuccessMultipleErrorsResponse.prototype['errors'] = undefined;
126
-
127
- /**
128
- * Allowed values for the <code>status</code> property.
129
- * @enum {String}
130
- * @readonly
131
- */
132
- SuccessMultipleErrorsResponse['StatusEnum'] = {
133
- /**
134
- * value: "success"
135
- * @const
136
- */
137
- "success": "success",
138
- /**
139
- * value: "error"
140
- * @const
141
- */
142
- "error": "error"
143
- };
144
- var _default = exports["default"] = SuccessMultipleErrorsResponse;
131
+ TemplateSummaryList.prototype['next_cursor'] = undefined;
132
+ var _default = exports["default"] = TemplateSummaryList;
@@ -0,0 +1,59 @@
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
16
+ * DocSpring API
17
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ *
19
+ * The version of the OpenAPI document: v2
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * Enum class TemplateType.
29
+ * @enum {}
30
+ * @readonly
31
+ */
32
+ var TemplateType = exports["default"] = /*#__PURE__*/function () {
33
+ function TemplateType() {
34
+ _classCallCheck(this, TemplateType);
35
+ }
36
+ return _createClass(TemplateType, null, [{
37
+ key: "constructFromObject",
38
+ value:
39
+ /**
40
+ * Returns a <code>TemplateType</code> enum value from a Javascript object name.
41
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
42
+ * @return {module:model/TemplateType} The enum <code>TemplateType</code> value.
43
+ */
44
+ function constructFromObject(object) {
45
+ // Any value, including one added to the API after this client was released
46
+ return object;
47
+ }
48
+ }]);
49
+ }();
50
+ /**
51
+ * value: "pdf"
52
+ * @const
53
+ */
54
+ _defineProperty(TemplateType, "pdf", "pdf");
55
+ /**
56
+ * value: "html"
57
+ * @const
58
+ */
59
+ _defineProperty(TemplateType, "html", "html");
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _SubmissionPreview = _interopRequireDefault(require("./SubmissionPreview"));
8
+ var _TemplateActor = _interopRequireDefault(require("./TemplateActor"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
11
  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; } } }; }
@@ -19,7 +19,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
19
19
  * DocSpring API
20
20
  * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
21
21
  *
22
- * The version of the OpenAPI document: v1
22
+ * The version of the OpenAPI document: v2
23
23
  *
24
24
  *
25
25
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,20 +28,24 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
28
28
  *
29
29
  */
30
30
  /**
31
- * The Submission422Response model module.
32
- * @module model/Submission422Response
33
- * @version 3.2.0
31
+ * The TemplateVersion model module.
32
+ * @module model/TemplateVersion
33
+ * @version 4.0.0
34
34
  */
35
- var Submission422Response = /*#__PURE__*/function () {
35
+ var TemplateVersion = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new <code>Submission422Response</code>.
38
- * @alias module:model/Submission422Response
37
+ * Constructs a new <code>TemplateVersion</code>.
38
+ * A published version of a template.
39
+ * @alias module:model/TemplateVersion
39
40
  * @extends Object
40
- * @param status {module:model/Submission422Response.StatusEnum}
41
+ * @param version {String} The version number, such as `1.2.0`.
42
+ * @param description {String} What changed in the version, as written when it was published.
43
+ * @param published_at {Date} When the version was published.
44
+ * @param published_by {module:model/TemplateActor} Who published the version. Null when that wasn't recorded.
41
45
  */
42
- function Submission422Response(status) {
43
- _classCallCheck(this, Submission422Response);
44
- Submission422Response.initialize(this, status);
46
+ function TemplateVersion(version, description, published_at, published_by) {
47
+ _classCallCheck(this, TemplateVersion);
48
+ TemplateVersion.initialize(this, version, description, published_at, published_by);
45
49
  }
46
50
 
47
51
  /**
@@ -49,51 +53,54 @@ var Submission422Response = /*#__PURE__*/function () {
49
53
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
54
  * Only for internal use.
51
55
  */
52
- return _createClass(Submission422Response, null, [{
56
+ return _createClass(TemplateVersion, null, [{
53
57
  key: "initialize",
54
- value: function initialize(obj, status) {
55
- obj['status'] = status;
58
+ value: function initialize(obj, version, description, published_at, published_by) {
59
+ obj['version'] = version;
60
+ obj['description'] = description;
61
+ obj['published_at'] = published_at;
62
+ obj['published_by'] = published_by;
56
63
  }
57
64
 
58
65
  /**
59
- * Constructs a <code>Submission422Response</code> from a plain JavaScript object, optionally creating a new instance.
66
+ * Constructs a <code>TemplateVersion</code> from a plain JavaScript object, optionally creating a new instance.
60
67
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
68
  * @param {Object} data The plain JavaScript object bearing properties of interest.
62
- * @param {module:model/Submission422Response} obj Optional instance to populate.
63
- * @return {module:model/Submission422Response} The populated <code>Submission422Response</code> instance.
69
+ * @param {module:model/TemplateVersion} obj Optional instance to populate.
70
+ * @return {module:model/TemplateVersion} The populated <code>TemplateVersion</code> instance.
64
71
  */
65
72
  }, {
66
73
  key: "constructFromObject",
67
74
  value: function constructFromObject(data, obj) {
68
75
  if (data) {
69
- obj = obj || new Submission422Response();
76
+ obj = obj || new TemplateVersion();
70
77
  _ApiClient["default"].constructFromObject(data, obj, 'Object');
71
- if (data.hasOwnProperty('status')) {
72
- obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
78
+ if (data.hasOwnProperty('version')) {
79
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
73
80
  }
74
- if (data.hasOwnProperty('error')) {
75
- obj['error'] = _ApiClient["default"].convertToType(data['error'], 'String');
81
+ if (data.hasOwnProperty('description')) {
82
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
76
83
  }
77
- if (data.hasOwnProperty('submission')) {
78
- obj['submission'] = _SubmissionPreview["default"].constructFromObject(data['submission']);
84
+ if (data.hasOwnProperty('published_at')) {
85
+ obj['published_at'] = _ApiClient["default"].convertToType(data['published_at'], 'Date');
79
86
  }
80
- if (data.hasOwnProperty('errors')) {
81
- obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
87
+ if (data.hasOwnProperty('published_by')) {
88
+ obj['published_by'] = _ApiClient["default"].convertToType(data['published_by'], _TemplateActor["default"]);
82
89
  }
83
90
  }
84
91
  return obj;
85
92
  }
86
93
 
87
94
  /**
88
- * Validates the JSON data with respect to <code>Submission422Response</code>.
95
+ * Validates the JSON data with respect to <code>TemplateVersion</code>.
89
96
  * @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>Submission422Response</code>.
97
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateVersion</code>.
91
98
  */
92
99
  }, {
93
100
  key: "validateJSON",
94
101
  value: function validateJSON(data) {
95
102
  // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(Submission422Response.RequiredProperties),
103
+ var _iterator = _createForOfIteratorHelper(TemplateVersion.RequiredProperties),
97
104
  _step;
98
105
  try {
99
106
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -108,55 +115,45 @@ var Submission422Response = /*#__PURE__*/function () {
108
115
  } finally {
109
116
  _iterator.f();
110
117
  }
111
- if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
112
- throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
118
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
119
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
113
120
  }
114
121
  // ensure the json data is a string
115
- if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
116
- throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
122
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
123
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
117
124
  }
118
- // ensure the json data is an array
119
- if (!Array.isArray(data['errors'])) {
120
- throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
125
+ // validate the optional field `published_by`
126
+ if (data['published_by']) {
127
+ // data not null
128
+ _TemplateActor["default"].validateJSON(data['published_by']);
121
129
  }
122
130
  return true;
123
131
  }
124
132
  }]);
125
133
  }();
126
- Submission422Response.RequiredProperties = ["status"];
134
+ TemplateVersion.RequiredProperties = ["version", "description", "published_at", "published_by"];
127
135
 
128
136
  /**
129
- * @member {module:model/Submission422Response.StatusEnum} status
137
+ * The version number, such as `1.2.0`.
138
+ * @member {String} version
130
139
  */
131
- Submission422Response.prototype['status'] = undefined;
140
+ TemplateVersion.prototype['version'] = undefined;
132
141
 
133
142
  /**
134
- * Single error message (for non-validation errors)
135
- * @member {String} error
143
+ * What changed in the version, as written when it was published.
144
+ * @member {String} description
136
145
  */
137
- Submission422Response.prototype['error'] = undefined;
146
+ TemplateVersion.prototype['description'] = undefined;
138
147
 
139
148
  /**
140
- * @member {module:model/SubmissionPreview} submission
149
+ * When the version was published.
150
+ * @member {Date} published_at
141
151
  */
142
- Submission422Response.prototype['submission'] = undefined;
152
+ TemplateVersion.prototype['published_at'] = undefined;
143
153
 
144
154
  /**
145
- * Array of validation error messages (when submission data is invalid)
146
- * @member {Array.<String>} errors
155
+ * Who published the version. Null when that wasn't recorded.
156
+ * @member {module:model/TemplateActor} published_by
147
157
  */
148
- Submission422Response.prototype['errors'] = undefined;
149
-
150
- /**
151
- * Allowed values for the <code>status</code> property.
152
- * @enum {String}
153
- * @readonly
154
- */
155
- Submission422Response['StatusEnum'] = {
156
- /**
157
- * value: "error"
158
- * @const
159
- */
160
- "error": "error"
161
- };
162
- var _default = exports["default"] = Submission422Response;
158
+ TemplateVersion.prototype['published_by'] = undefined;
159
+ var _default = exports["default"] = TemplateVersion;
@@ -0,0 +1,64 @@
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
16
+ * DocSpring API
17
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ *
19
+ * The version of the OpenAPI document: v2
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * Enum class TemplateVersionType.
29
+ * @enum {}
30
+ * @readonly
31
+ */
32
+ var TemplateVersionType = exports["default"] = /*#__PURE__*/function () {
33
+ function TemplateVersionType() {
34
+ _classCallCheck(this, TemplateVersionType);
35
+ }
36
+ return _createClass(TemplateVersionType, null, [{
37
+ key: "constructFromObject",
38
+ value:
39
+ /**
40
+ * Returns a <code>TemplateVersionType</code> enum value from a Javascript object name.
41
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
42
+ * @return {module:model/TemplateVersionType} The enum <code>TemplateVersionType</code> value.
43
+ */
44
+ function constructFromObject(object) {
45
+ // Any value, including one added to the API after this client was released
46
+ return object;
47
+ }
48
+ }]);
49
+ }();
50
+ /**
51
+ * value: "major"
52
+ * @const
53
+ */
54
+ _defineProperty(TemplateVersionType, "major", "major");
55
+ /**
56
+ * value: "minor"
57
+ * @const
58
+ */
59
+ _defineProperty(TemplateVersionType, "minor", "minor");
60
+ /**
61
+ * value: "patch"
62
+ * @const
63
+ */
64
+ _defineProperty(TemplateVersionType, "patch", "patch");
@@ -0,0 +1,69 @@
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
16
+ * DocSpring API
17
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ *
19
+ * The version of the OpenAPI document: v2
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * Enum class TextAlignment.
29
+ * @enum {}
30
+ * @readonly
31
+ */
32
+ var TextAlignment = exports["default"] = /*#__PURE__*/function () {
33
+ function TextAlignment() {
34
+ _classCallCheck(this, TextAlignment);
35
+ }
36
+ return _createClass(TextAlignment, null, [{
37
+ key: "constructFromObject",
38
+ value:
39
+ /**
40
+ * Returns a <code>TextAlignment</code> enum value from a Javascript object name.
41
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
42
+ * @return {module:model/TextAlignment} The enum <code>TextAlignment</code> value.
43
+ */
44
+ function constructFromObject(object) {
45
+ // Any value, including one added to the API after this client was released
46
+ return object;
47
+ }
48
+ }]);
49
+ }();
50
+ /**
51
+ * value: "left"
52
+ * @const
53
+ */
54
+ _defineProperty(TextAlignment, "left", "left");
55
+ /**
56
+ * value: "center"
57
+ * @const
58
+ */
59
+ _defineProperty(TextAlignment, "center", "center");
60
+ /**
61
+ * value: "right"
62
+ * @const
63
+ */
64
+ _defineProperty(TextAlignment, "right", "right");
65
+ /**
66
+ * value: "justify"
67
+ * @const
68
+ */
69
+ _defineProperty(TextAlignment, "justify", "justify");
@@ -0,0 +1,59 @@
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
16
+ * DocSpring API
17
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
18
+ *
19
+ * The version of the OpenAPI document: v2
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * Enum class TextOverflow.
29
+ * @enum {}
30
+ * @readonly
31
+ */
32
+ var TextOverflow = exports["default"] = /*#__PURE__*/function () {
33
+ function TextOverflow() {
34
+ _classCallCheck(this, TextOverflow);
35
+ }
36
+ return _createClass(TextOverflow, null, [{
37
+ key: "constructFromObject",
38
+ value:
39
+ /**
40
+ * Returns a <code>TextOverflow</code> enum value from a Javascript object name.
41
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
42
+ * @return {module:model/TextOverflow} The enum <code>TextOverflow</code> value.
43
+ */
44
+ function constructFromObject(object) {
45
+ // Any value, including one added to the API after this client was released
46
+ return object;
47
+ }
48
+ }]);
49
+ }();
50
+ /**
51
+ * value: "shrink_to_fit"
52
+ * @const
53
+ */
54
+ _defineProperty(TextOverflow, "shrink_to_fit", "shrink_to_fit");
55
+ /**
56
+ * value: "truncate"
57
+ * @const
58
+ */
59
+ _defineProperty(TextOverflow, "truncate", "truncate");