docspring 1.4.0 → 2.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 (221) hide show
  1. package/README.md +58 -52
  2. package/dist/ApiClient.js +701 -0
  3. package/dist/api/PDFApi.js +1509 -0
  4. package/dist/index.js +356 -0
  5. package/dist/model/AddFieldsData.js +112 -0
  6. package/dist/model/BatchGeneratePdfs201Response.js +184 -0
  7. package/dist/model/CombinePdfsData.js +156 -0
  8. package/dist/model/CombinedSubmission.js +323 -0
  9. package/dist/model/CombinedSubmissionAction.js +252 -0
  10. package/dist/model/CombinedSubmissionData.js +148 -0
  11. package/dist/model/CopyTemplateOptions.js +124 -0
  12. package/dist/model/CreateCombinedSubmissionResponse.js +158 -0
  13. package/dist/model/CreateCustomFileData.js +112 -0
  14. package/dist/model/CreateCustomFileResponse.js +158 -0
  15. package/dist/model/CreateFolderData.js +108 -0
  16. package/dist/model/CreateHtmlSubmissionData.js +161 -0
  17. package/dist/model/CreateHtmlTemplate.js +108 -0
  18. package/dist/model/CreatePdfSubmissionData.js +190 -0
  19. package/dist/model/CreatePdfTemplate.js +108 -0
  20. package/dist/model/CreateSubmissionDataRequestData.js +210 -0
  21. package/dist/model/CreateSubmissionDataRequestEventRequest.js +215 -0
  22. package/dist/model/CreateSubmissionDataRequestEventResponse.js +158 -0
  23. package/dist/model/CreateSubmissionDataRequestResponse.js +158 -0
  24. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +158 -0
  25. package/dist/model/CreateSubmissionResponse.js +158 -0
  26. package/dist/model/CustomFile.js +126 -0
  27. package/dist/model/ErrorResponse.js +139 -0
  28. package/dist/model/Folder.js +154 -0
  29. package/dist/model/JsonSchema.js +173 -0
  30. package/dist/model/ListSubmissionsResponse.js +154 -0
  31. package/dist/model/MoveFolderData.js +89 -0
  32. package/dist/model/MoveTemplateData.js +112 -0
  33. package/dist/model/MultipleErrorsResponse.js +139 -0
  34. package/dist/model/RenameFolderData.js +112 -0
  35. package/dist/model/Submission.js +537 -0
  36. package/dist/model/SubmissionAction.js +252 -0
  37. package/dist/model/SubmissionBatch.js +213 -0
  38. package/dist/model/SubmissionBatchData.js +128 -0
  39. package/dist/model/SubmissionBatchWithSubmissions.js +243 -0
  40. package/dist/model/SubmissionDataRequest.js +475 -0
  41. package/dist/model/SubmissionDataRequestEvent.js +287 -0
  42. package/dist/model/SubmissionDataRequestShow.js +489 -0
  43. package/dist/model/SubmissionDataRequestToken.js +154 -0
  44. package/dist/model/SubmissionPreview.js +471 -0
  45. package/dist/model/SuccessErrorResponse.js +142 -0
  46. package/dist/model/SuccessMultipleErrorsResponse.js +142 -0
  47. package/dist/model/Template.js +717 -0
  48. package/dist/model/TemplateAddFieldsResponse.js +154 -0
  49. package/dist/model/TemplatePreview.js +593 -0
  50. package/dist/model/UpdateHtmlTemplate.js +108 -0
  51. package/dist/model/UpdateSubmissionDataRequestData.js +160 -0
  52. package/dist/model/UploadPresignResponse.js +157 -0
  53. package/package.json +33 -8
  54. package/.openapi-generator/VERSION +0 -1
  55. package/.openapi-generator-ignore +0 -23
  56. package/.travis.yml +0 -7
  57. package/CHANGELOG.md +0 -33
  58. package/docs/AddFieldsData.md +0 -8
  59. package/docs/AddFieldsTemplateResponse.md +0 -21
  60. package/docs/AuthenticationError.md +0 -18
  61. package/docs/AuthenticationSuccessResponse.md +0 -17
  62. package/docs/CombinePdfsData.md +0 -13
  63. package/docs/CombinedSubmission.md +0 -31
  64. package/docs/CombinedSubmissionAction.md +0 -54
  65. package/docs/CombinedSubmissionData.md +0 -12
  66. package/docs/CopyTemplateData.md +0 -9
  67. package/docs/CreateCombinedSubmissionResponse.md +0 -21
  68. package/docs/CreateCustomFileData.md +0 -8
  69. package/docs/CreateCustomFileResponse.md +0 -21
  70. package/docs/CreateFolderData.md +0 -8
  71. package/docs/CreateHtmlTemplateData.md +0 -8
  72. package/docs/CreateSubmissionBatchResponse.md +0 -23
  73. package/docs/CreateSubmissionBatchSubmissionsResponse.md +0 -23
  74. package/docs/CreateSubmissionDataRequestData.md +0 -60
  75. package/docs/CreateSubmissionDataRequestTokenResponse.md +0 -21
  76. package/docs/CreateSubmissionDataRequestTokenResponseToken.md +0 -11
  77. package/docs/CreateSubmissionResponse.md +0 -21
  78. package/docs/CreateTemplateFromUploadData.md +0 -8
  79. package/docs/CustomFile.md +0 -9
  80. package/docs/Error.md +0 -18
  81. package/docs/Folder.md +0 -11
  82. package/docs/FoldersFolder.md +0 -9
  83. package/docs/FullTemplate.md +0 -59
  84. package/docs/FullTemplateDefaults.md +0 -10
  85. package/docs/HtmlTemplateData.md +0 -48
  86. package/docs/InvalidRequest.md +0 -18
  87. package/docs/ListSubmissionsResponse.md +0 -10
  88. package/docs/MoveFolderData.md +0 -8
  89. package/docs/MoveTemplateData.md +0 -8
  90. package/docs/PDFApi.md +0 -1700
  91. package/docs/PendingTemplate.md +0 -37
  92. package/docs/RenameFolderData.md +0 -8
  93. package/docs/Submission.md +0 -55
  94. package/docs/SubmissionAction.md +0 -54
  95. package/docs/SubmissionBatch.md +0 -29
  96. package/docs/SubmissionBatchData.md +0 -11
  97. package/docs/SubmissionData.md +0 -15
  98. package/docs/SubmissionDataBatchRequest.md +0 -13
  99. package/docs/SubmissionDataRequest.md +0 -78
  100. package/docs/Template.md +0 -40
  101. package/docs/TemplateData.md +0 -36
  102. package/docs/TemplatestemplateIdaddFieldsFields.md +0 -286
  103. package/docs/UpdateDataRequestResponse.md +0 -21
  104. package/docs/UpdateSubmissionDataRequestData.md +0 -60
  105. package/docs/UpdateTemplateData.md +0 -8
  106. package/docs/UpdateTemplateResponse.md +0 -20
  107. package/docs/UploadTemplateData.md +0 -49
  108. package/docs/UploadTemplateDataDocument.md +0 -19
  109. package/docs/UploadTemplateDataDocumentMetadata.md +0 -19
  110. package/git_push.sh +0 -52
  111. package/mocha.opts +0 -1
  112. package/src/ApiClient.js +0 -605
  113. package/src/api/Client.js +0 -395
  114. package/src/api/PDFApi.js +0 -1722
  115. package/src/index.js +0 -334
  116. package/src/model/AddFieldsData.js +0 -82
  117. package/src/model/AddFieldsTemplateResponse.js +0 -114
  118. package/src/model/AuthenticationError.js +0 -102
  119. package/src/model/AuthenticationSuccessResponse.js +0 -93
  120. package/src/model/CombinePdfsData.js +0 -122
  121. package/src/model/CombinedSubmission.js +0 -183
  122. package/src/model/CombinedSubmissionAction.js +0 -198
  123. package/src/model/CombinedSubmissionData.js +0 -114
  124. package/src/model/CopyTemplateData.js +0 -90
  125. package/src/model/CreateCombinedSubmissionResponse.js +0 -114
  126. package/src/model/CreateCustomFileData.js +0 -82
  127. package/src/model/CreateCustomFileResponse.js +0 -114
  128. package/src/model/CreateFolderData.js +0 -82
  129. package/src/model/CreateHtmlTemplateData.js +0 -82
  130. package/src/model/CreateSubmissionBatchResponse.js +0 -130
  131. package/src/model/CreateSubmissionBatchSubmissionsResponse.js +0 -119
  132. package/src/model/CreateSubmissionDataRequestData.js +0 -256
  133. package/src/model/CreateSubmissionDataRequestTokenResponse.js +0 -114
  134. package/src/model/CreateSubmissionDataRequestTokenResponseToken.js +0 -105
  135. package/src/model/CreateSubmissionResponse.js +0 -114
  136. package/src/model/CreateTemplateFromUploadData.js +0 -82
  137. package/src/model/CustomFile.js +0 -89
  138. package/src/model/Error.js +0 -103
  139. package/src/model/Folder.js +0 -105
  140. package/src/model/FoldersFolder.js +0 -89
  141. package/src/model/FullTemplate.js +0 -407
  142. package/src/model/FullTemplateDefaults.js +0 -97
  143. package/src/model/HtmlTemplateData.js +0 -248
  144. package/src/model/InvalidRequest.js +0 -103
  145. package/src/model/ListSubmissionsResponse.js +0 -97
  146. package/src/model/MoveFolderData.js +0 -81
  147. package/src/model/MoveTemplateData.js +0 -82
  148. package/src/model/PendingTemplate.js +0 -231
  149. package/src/model/RenameFolderData.js +0 -82
  150. package/src/model/Submission.js +0 -291
  151. package/src/model/SubmissionAction.js +0 -198
  152. package/src/model/SubmissionBatch.js +0 -167
  153. package/src/model/SubmissionBatchData.js +0 -106
  154. package/src/model/SubmissionData.js +0 -138
  155. package/src/model/SubmissionDataBatchRequest.js +0 -121
  156. package/src/model/SubmissionDataRequest.js +0 -337
  157. package/src/model/Template.js +0 -255
  158. package/src/model/TemplateData.js +0 -223
  159. package/src/model/TemplatestemplateIdaddFieldsFields.js +0 -1128
  160. package/src/model/UpdateDataRequestResponse.js +0 -114
  161. package/src/model/UpdateSubmissionDataRequestData.js +0 -256
  162. package/src/model/UpdateTemplateData.js +0 -82
  163. package/src/model/UpdateTemplateResponse.js +0 -106
  164. package/src/model/UploadTemplateData.js +0 -256
  165. package/src/model/UploadTemplateDataDocument.js +0 -109
  166. package/src/model/UploadTemplateDataDocumentMetadata.js +0 -109
  167. package/test/api/ClientIntegration.spec.js +0 -275
  168. package/test/api/PDFApi.spec.js.original +0 -395
  169. package/test/api/PDFApiIntegration.spec.js +0 -301
  170. package/test/model/AddFieldsData.spec.js +0 -67
  171. package/test/model/AddFieldsTemplateResponse.spec.js +0 -79
  172. package/test/model/AuthenticationError.spec.js +0 -73
  173. package/test/model/AuthenticationSuccessResponse.spec.js +0 -67
  174. package/test/model/CombinePdfsData.spec.js +0 -97
  175. package/test/model/CombinedSubmission.spec.js +0 -127
  176. package/test/model/CombinedSubmissionAction.spec.js +0 -97
  177. package/test/model/CombinedSubmissionData.spec.js +0 -91
  178. package/test/model/CopyTemplateData.spec.js +0 -73
  179. package/test/model/CreateCombinedSubmissionResponse.spec.js +0 -79
  180. package/test/model/CreateCustomFileData.spec.js +0 -67
  181. package/test/model/CreateCustomFileResponse.spec.js +0 -79
  182. package/test/model/CreateFolderData.spec.js +0 -67
  183. package/test/model/CreateHtmlTemplateData.spec.js +0 -67
  184. package/test/model/CreateSubmissionBatchResponse.spec.js +0 -91
  185. package/test/model/CreateSubmissionBatchSubmissionsResponse.spec.js +0 -79
  186. package/test/model/CreateSubmissionDataRequestData.spec.js +0 -139
  187. package/test/model/CreateSubmissionDataRequestTokenResponse.spec.js +0 -79
  188. package/test/model/CreateSubmissionDataRequestTokenResponseToken.spec.js +0 -85
  189. package/test/model/CreateSubmissionResponse.spec.js +0 -79
  190. package/test/model/CreateTemplateFromUploadData.spec.js +0 -67
  191. package/test/model/CustomFile.spec.js +0 -73
  192. package/test/model/Error.spec.js +0 -73
  193. package/test/model/Folder.spec.js +0 -85
  194. package/test/model/FoldersFolder.spec.js +0 -73
  195. package/test/model/FullTemplate.spec.js +0 -295
  196. package/test/model/FullTemplateDefaults.spec.js +0 -79
  197. package/test/model/HtmlTemplateData.spec.js +0 -163
  198. package/test/model/InvalidRequest.spec.js +0 -73
  199. package/test/model/ListSubmissionsResponse.spec.js +0 -79
  200. package/test/model/MoveFolderData.spec.js +0 -67
  201. package/test/model/MoveTemplateData.spec.js +0 -67
  202. package/test/model/PendingTemplate.spec.js +0 -163
  203. package/test/model/RenameFolderData.spec.js +0 -67
  204. package/test/model/Submission.spec.js +0 -175
  205. package/test/model/SubmissionAction.spec.js +0 -97
  206. package/test/model/SubmissionBatch.spec.js +0 -115
  207. package/test/model/SubmissionBatchData.spec.js +0 -85
  208. package/test/model/SubmissionData.spec.js +0 -109
  209. package/test/model/SubmissionDataBatchRequest.spec.js +0 -97
  210. package/test/model/SubmissionDataRequest.spec.js +0 -181
  211. package/test/model/Template.spec.js +0 -181
  212. package/test/model/TemplateData.spec.js +0 -157
  213. package/test/model/TemplatestemplateIdaddFieldsFields.spec.js +0 -577
  214. package/test/model/UpdateDataRequestResponse.spec.js +0 -79
  215. package/test/model/UpdateSubmissionDataRequestData.spec.js +0 -139
  216. package/test/model/UpdateTemplateData.spec.js +0 -67
  217. package/test/model/UpdateTemplateResponse.spec.js +0 -73
  218. package/test/model/UploadTemplateData.spec.js +0 -169
  219. package/test/model/UploadTemplateDataDocument.spec.js +0 -79
  220. package/test/model/UploadTemplateDataDocumentMetadata.spec.js +0 -79
  221. package/yarn.lock +0 -263
@@ -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
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
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 UpdateHtmlTemplate model module.
31
+ * @module model/UpdateHtmlTemplate
32
+ * @version 2.0.0
33
+ */
34
+ var UpdateHtmlTemplate = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>UpdateHtmlTemplate</code>.
37
+ * @alias module:model/UpdateHtmlTemplate
38
+ * @param template {Object}
39
+ */
40
+ function UpdateHtmlTemplate(template) {
41
+ _classCallCheck(this, UpdateHtmlTemplate);
42
+ UpdateHtmlTemplate.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(UpdateHtmlTemplate, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, template) {
53
+ obj['template'] = template;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>UpdateHtmlTemplate</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/UpdateHtmlTemplate} obj Optional instance to populate.
61
+ * @return {module:model/UpdateHtmlTemplate} The populated <code>UpdateHtmlTemplate</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new UpdateHtmlTemplate();
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>UpdateHtmlTemplate</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>UpdateHtmlTemplate</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(UpdateHtmlTemplate.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
+ UpdateHtmlTemplate.RequiredProperties = ["template"];
103
+
104
+ /**
105
+ * @member {Object} template
106
+ */
107
+ UpdateHtmlTemplate.prototype['template'] = undefined;
108
+ var _default = exports["default"] = UpdateHtmlTemplate;
@@ -0,0 +1,160 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * DocSpring API
16
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
17
+ *
18
+ * The version of the OpenAPI document: v1
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The UpdateSubmissionDataRequestData model module.
28
+ * @module model/UpdateSubmissionDataRequestData
29
+ * @version 2.0.0
30
+ */
31
+ var UpdateSubmissionDataRequestData = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>UpdateSubmissionDataRequestData</code>.
34
+ * @alias module:model/UpdateSubmissionDataRequestData
35
+ */
36
+ function UpdateSubmissionDataRequestData() {
37
+ _classCallCheck(this, UpdateSubmissionDataRequestData);
38
+ UpdateSubmissionDataRequestData.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(UpdateSubmissionDataRequestData, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>UpdateSubmissionDataRequestData</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/UpdateSubmissionDataRequestData} obj Optional instance to populate.
55
+ * @return {module:model/UpdateSubmissionDataRequestData} The populated <code>UpdateSubmissionDataRequestData</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new UpdateSubmissionDataRequestData();
62
+ if (data.hasOwnProperty('auth_type')) {
63
+ obj['auth_type'] = _ApiClient["default"].convertToType(data['auth_type'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('fields')) {
66
+ obj['fields'] = _ApiClient["default"].convertToType(data['fields'], ['String']);
67
+ }
68
+ if (data.hasOwnProperty('metadata')) {
69
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object);
70
+ }
71
+ if (data.hasOwnProperty('order')) {
72
+ obj['order'] = _ApiClient["default"].convertToType(data['order'], 'Number');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>UpdateSubmissionDataRequestData</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateSubmissionDataRequestData</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // ensure the json data is a string
87
+ if (data['auth_type'] && !(typeof data['auth_type'] === 'string' || data['auth_type'] instanceof String)) {
88
+ throw new Error("Expected the field `auth_type` to be a primitive type in the JSON string but got " + data['auth_type']);
89
+ }
90
+ // ensure the json data is an array
91
+ if (!Array.isArray(data['fields'])) {
92
+ throw new Error("Expected the field `fields` to be an array in the JSON data but got " + data['fields']);
93
+ }
94
+ return true;
95
+ }
96
+ }]);
97
+ }();
98
+ /**
99
+ * @member {module:model/UpdateSubmissionDataRequestData.AuthTypeEnum} auth_type
100
+ */
101
+ UpdateSubmissionDataRequestData.prototype['auth_type'] = undefined;
102
+
103
+ /**
104
+ * @member {Array.<String>} fields
105
+ */
106
+ UpdateSubmissionDataRequestData.prototype['fields'] = undefined;
107
+
108
+ /**
109
+ * @member {Object} metadata
110
+ */
111
+ UpdateSubmissionDataRequestData.prototype['metadata'] = undefined;
112
+
113
+ /**
114
+ * @member {Number} order
115
+ */
116
+ UpdateSubmissionDataRequestData.prototype['order'] = undefined;
117
+
118
+ /**
119
+ * Allowed values for the <code>auth_type</code> property.
120
+ * @enum {String}
121
+ * @readonly
122
+ */
123
+ UpdateSubmissionDataRequestData['AuthTypeEnum'] = {
124
+ /**
125
+ * value: "none"
126
+ * @const
127
+ */
128
+ "none": "none",
129
+ /**
130
+ * value: "password"
131
+ * @const
132
+ */
133
+ "password": "password",
134
+ /**
135
+ * value: "oauth"
136
+ * @const
137
+ */
138
+ "oauth": "oauth",
139
+ /**
140
+ * value: "email_link"
141
+ * @const
142
+ */
143
+ "email_link": "email_link",
144
+ /**
145
+ * value: "phone_number"
146
+ * @const
147
+ */
148
+ "phone_number": "phone_number",
149
+ /**
150
+ * value: "ldap"
151
+ * @const
152
+ */
153
+ "ldap": "ldap",
154
+ /**
155
+ * value: "saml"
156
+ * @const
157
+ */
158
+ "saml": "saml"
159
+ };
160
+ var _default = exports["default"] = UpdateSubmissionDataRequestData;
@@ -0,0 +1,157 @@
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
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
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 UploadPresignResponse model module.
31
+ * @module model/UploadPresignResponse
32
+ * @version 2.0.0
33
+ */
34
+ var UploadPresignResponse = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>UploadPresignResponse</code>.
37
+ * @alias module:model/UploadPresignResponse
38
+ * @param fields {Object}
39
+ * @param headers {Object}
40
+ * @param url {String}
41
+ */
42
+ function UploadPresignResponse(fields, headers, url) {
43
+ _classCallCheck(this, UploadPresignResponse);
44
+ UploadPresignResponse.initialize(this, fields, headers, url);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(UploadPresignResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, fields, headers, url) {
55
+ obj['fields'] = fields;
56
+ obj['headers'] = headers;
57
+ obj['url'] = url;
58
+ }
59
+
60
+ /**
61
+ * Constructs a <code>UploadPresignResponse</code> from a plain JavaScript object, optionally creating a new instance.
62
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
64
+ * @param {module:model/UploadPresignResponse} obj Optional instance to populate.
65
+ * @return {module:model/UploadPresignResponse} The populated <code>UploadPresignResponse</code> instance.
66
+ */
67
+ }, {
68
+ key: "constructFromObject",
69
+ value: function constructFromObject(data, obj) {
70
+ if (data) {
71
+ obj = obj || new UploadPresignResponse();
72
+ if (data.hasOwnProperty('fields')) {
73
+ obj['fields'] = _ApiClient["default"].convertToType(data['fields'], Object);
74
+ }
75
+ if (data.hasOwnProperty('headers')) {
76
+ obj['headers'] = _ApiClient["default"].convertToType(data['headers'], Object);
77
+ }
78
+ if (data.hasOwnProperty('url')) {
79
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
80
+ }
81
+ if (data.hasOwnProperty('method')) {
82
+ obj['method'] = _ApiClient["default"].convertToType(data['method'], 'String');
83
+ }
84
+ }
85
+ return obj;
86
+ }
87
+
88
+ /**
89
+ * Validates the JSON data with respect to <code>UploadPresignResponse</code>.
90
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UploadPresignResponse</code>.
92
+ */
93
+ }, {
94
+ key: "validateJSON",
95
+ value: function validateJSON(data) {
96
+ // check to make sure all required properties are present in the JSON string
97
+ var _iterator = _createForOfIteratorHelper(UploadPresignResponse.RequiredProperties),
98
+ _step;
99
+ try {
100
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
101
+ var property = _step.value;
102
+ if (!data.hasOwnProperty(property)) {
103
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
104
+ }
105
+ }
106
+ // ensure the json data is a string
107
+ } catch (err) {
108
+ _iterator.e(err);
109
+ } finally {
110
+ _iterator.f();
111
+ }
112
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
113
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
114
+ }
115
+ // ensure the json data is a string
116
+ if (data['method'] && !(typeof data['method'] === 'string' || data['method'] instanceof String)) {
117
+ throw new Error("Expected the field `method` to be a primitive type in the JSON string but got " + data['method']);
118
+ }
119
+ return true;
120
+ }
121
+ }]);
122
+ }();
123
+ UploadPresignResponse.RequiredProperties = ["fields", "headers", "url"];
124
+
125
+ /**
126
+ * @member {Object} fields
127
+ */
128
+ UploadPresignResponse.prototype['fields'] = undefined;
129
+
130
+ /**
131
+ * @member {Object} headers
132
+ */
133
+ UploadPresignResponse.prototype['headers'] = undefined;
134
+
135
+ /**
136
+ * @member {String} url
137
+ */
138
+ UploadPresignResponse.prototype['url'] = undefined;
139
+
140
+ /**
141
+ * @member {module:model/UploadPresignResponse.MethodEnum} method
142
+ */
143
+ UploadPresignResponse.prototype['method'] = undefined;
144
+
145
+ /**
146
+ * Allowed values for the <code>method</code> property.
147
+ * @enum {String}
148
+ * @readonly
149
+ */
150
+ UploadPresignResponse['MethodEnum'] = {
151
+ /**
152
+ * value: "post"
153
+ * @const
154
+ */
155
+ "post": "post"
156
+ };
157
+ var _default = exports["default"] = UploadPresignResponse;
package/package.json CHANGED
@@ -1,21 +1,46 @@
1
1
  {
2
2
  "name": "docspring",
3
- "version": "1.4.0",
3
+ "version": "2.0.0",
4
4
  "description": "An API client for the DocSpring PDF generation service",
5
5
  "license": "Unlicense",
6
- "main": "src/index.js",
6
+ "main": "dist/index.js",
7
7
  "scripts": {
8
- "test": "./node_modules/mocha/bin/mocha --recursive"
8
+ "build": "babel src -d dist",
9
+ "prepare": "npm run build",
10
+ "test": "mocha --require @babel/register --recursive"
9
11
  },
10
12
  "browser": {
11
13
  "fs": false
12
14
  },
13
15
  "dependencies": {
14
- "superagent": "3.7.0"
16
+ "@babel/cli": "^7.0.0",
17
+ "superagent": "^5.3.0"
15
18
  },
16
19
  "devDependencies": {
17
- "mocha": "~2.3.4",
18
- "sinon": "1.17.3",
19
- "expect.js": "~0.3.1"
20
- }
20
+ "@babel/core": "^7.0.0",
21
+ "@babel/plugin-proposal-class-properties": "^7.0.0",
22
+ "@babel/plugin-proposal-decorators": "^7.0.0",
23
+ "@babel/plugin-proposal-do-expressions": "^7.0.0",
24
+ "@babel/plugin-proposal-export-default-from": "^7.0.0",
25
+ "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
26
+ "@babel/plugin-proposal-function-bind": "^7.0.0",
27
+ "@babel/plugin-proposal-function-sent": "^7.0.0",
28
+ "@babel/plugin-proposal-json-strings": "^7.0.0",
29
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
30
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
31
+ "@babel/plugin-proposal-numeric-separator": "^7.0.0",
32
+ "@babel/plugin-proposal-optional-chaining": "^7.0.0",
33
+ "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
34
+ "@babel/plugin-proposal-throw-expressions": "^7.0.0",
35
+ "@babel/plugin-syntax-dynamic-import": "^7.0.0",
36
+ "@babel/plugin-syntax-import-meta": "^7.0.0",
37
+ "@babel/preset-env": "^7.0.0",
38
+ "@babel/register": "^7.0.0",
39
+ "expect.js": "^0.3.1",
40
+ "mocha": "^8.0.1",
41
+ "sinon": "^7.2.0"
42
+ },
43
+ "files": [
44
+ "dist"
45
+ ]
21
46
  }
@@ -1 +0,0 @@
1
- 3.3.0
@@ -1,23 +0,0 @@
1
- # OpenAPI Generator Ignore
2
- # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
-
4
- # Use this file to prevent files from being overwritten by the generator.
5
- # The patterns follow closely to .gitignore or .dockerignore.
6
-
7
- # As an example, the C# client generator defines ApiClient.cs.
8
- # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
- #ApiClient.cs
10
-
11
- # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
- #foo/*/qux
13
- # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
-
15
- # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
- #foo/**/qux
17
- # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
-
19
- # You can also negate patterns with an exclamation (!).
20
- # For example, you can ignore all files in a docs folder with the file extension .md:
21
- #docs/*.md
22
- # Then explicitly reverse the ignore rule for a single file:
23
- #!docs/README.md
package/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "6"
4
- - "6.1"
5
- - "5"
6
- - "5.11"
7
-
package/CHANGELOG.md DELETED
@@ -1,33 +0,0 @@
1
- ### 1.4.0 [March 22, 2022]
2
-
3
- - Renamed "Template1" model to "FullTemplate" since it includes all properties
4
-
5
- ### 1.3.2 [November 28, 2021]
6
-
7
- - Added 'password' parameter to Generate PDF and Combine PDF API endpoints. You can now encrypt each generated PDF with a unique password.
8
-
9
- ### 1.3.1 [November 19, 2020]
10
-
11
- - Added "sort_order" property for Submission Data Requests
12
-
13
- ### 1.3.0 [September 26, 2020]
14
-
15
- - Updated OpenAPI Generator to v3.3.0
16
-
17
- ### 1.2.1 [September 24, 2020]
18
-
19
- - Fixed the "include_data=true" option for the "Get Submission" API endpoint. Added the "data" property to the Submission model so that this is parsed and returned correctly when requested
20
-
21
- ### 1.2.0 [September 21, 2020]
22
-
23
- - Renamed some internal models for template creation API endpoints. (CreateTemplateData / CreateTemplateData1 renamed to CreateHtmlTemplateData and CreateTemplateFromUploadData)
24
-
25
- ### 1.1.0 [September 12, 2020]
26
-
27
- - **BREAKING CHANGE**: Renamed createTemplate operation to createPDFTemplate
28
- - Added createHTMLTemplate operation. (This uses the same API endpoint as createPDFTemplate, but the example shows how to set html, scss, etc. fields)
29
- - Added updateTemplate operation, to update a PDF or HTML template
30
-
31
- ### 1.0.0 [May 20, 2019]
32
-
33
- - Renamed FormAPI to DocSpring. (View the CHANGELOG in the original FormAPI API client for prior releases.)
@@ -1,8 +0,0 @@
1
- # DocSpring.AddFieldsData
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **fields** | [**[TemplatestemplateIdaddFieldsFields]**](TemplatestemplateIdaddFieldsFields.md) | |
7
-
8
-
@@ -1,21 +0,0 @@
1
- # DocSpring.AddFieldsTemplateResponse
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **newFieldIds** | **[Number]** | | [optional]
7
- **errors** | **[String]** | | [optional]
8
- **status** | **String** | | [optional]
9
-
10
-
11
- <a name="StatusEnum"></a>
12
- ## Enum: StatusEnum
13
-
14
-
15
- * `success` (value: `"success"`)
16
-
17
- * `error` (value: `"error"`)
18
-
19
-
20
-
21
-
@@ -1,18 +0,0 @@
1
- # DocSpring.AuthenticationError
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **status** | **String** | | [optional]
7
- **error** | **String** | |
8
-
9
-
10
- <a name="StatusEnum"></a>
11
- ## Enum: StatusEnum
12
-
13
-
14
- * `error` (value: `"error"`)
15
-
16
-
17
-
18
-
@@ -1,17 +0,0 @@
1
- # DocSpring.AuthenticationSuccessResponse
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **status** | **String** | | [optional]
7
-
8
-
9
- <a name="StatusEnum"></a>
10
- ## Enum: StatusEnum
11
-
12
-
13
- * `success` (value: `"success"`)
14
-
15
-
16
-
17
-
@@ -1,13 +0,0 @@
1
- # DocSpring.CombinePdfsData
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **deleteCustomFiles** | **Boolean** | | [optional]
7
- **expiresIn** | **Number** | | [optional]
8
- **metadata** | **Object** | | [optional]
9
- **password** | **String** | | [optional]
10
- **sourcePdfs** | **[Object]** | |
11
- **test** | **Boolean** | | [optional]
12
-
13
-
@@ -1,31 +0,0 @@
1
- # DocSpring.CombinedSubmission
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **metadata** | **Object** | | [optional]
7
- **password** | **String** | | [optional]
8
- **expired** | **Boolean** | | [optional]
9
- **expiresAt** | **String** | | [optional]
10
- **sourcePdfs** | **[Object]** | | [optional]
11
- **pdfHash** | **String** | | [optional]
12
- **downloadUrl** | **String** | | [optional]
13
- **submissionIds** | **[String]** | | [optional]
14
- **id** | **String** | | [optional]
15
- **state** | **String** | | [optional]
16
- **actions** | [**[CombinedSubmissionAction]**](CombinedSubmissionAction.md) | | [optional]
17
-
18
-
19
- <a name="StateEnum"></a>
20
- ## Enum: StateEnum
21
-
22
-
23
- * `pending` (value: `"pending"`)
24
-
25
- * `processed` (value: `"processed"`)
26
-
27
- * `error` (value: `"error"`)
28
-
29
-
30
-
31
-