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,158 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SubmissionDataRequestShow = _interopRequireDefault(require("./SubmissionDataRequestShow"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * DocSpring API
20
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
21
+ *
22
+ * The version of the OpenAPI document: v1
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The CreateSubmissionDataRequestResponse model module.
32
+ * @module model/CreateSubmissionDataRequestResponse
33
+ * @version 2.0.0
34
+ */
35
+ var CreateSubmissionDataRequestResponse = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CreateSubmissionDataRequestResponse</code>.
38
+ * @alias module:model/CreateSubmissionDataRequestResponse
39
+ * @param status {module:model/CreateSubmissionDataRequestResponse.StatusEnum}
40
+ * @param dataRequest {module:model/SubmissionDataRequestShow}
41
+ */
42
+ function CreateSubmissionDataRequestResponse(status, dataRequest) {
43
+ _classCallCheck(this, CreateSubmissionDataRequestResponse);
44
+ CreateSubmissionDataRequestResponse.initialize(this, status, dataRequest);
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(CreateSubmissionDataRequestResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, status, dataRequest) {
55
+ obj['status'] = status;
56
+ obj['data_request'] = dataRequest;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>CreateSubmissionDataRequestResponse</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/CreateSubmissionDataRequestResponse} obj Optional instance to populate.
64
+ * @return {module:model/CreateSubmissionDataRequestResponse} The populated <code>CreateSubmissionDataRequestResponse</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new CreateSubmissionDataRequestResponse();
71
+ if (data.hasOwnProperty('status')) {
72
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('data_request')) {
75
+ obj['data_request'] = _SubmissionDataRequestShow["default"].constructFromObject(data['data_request']);
76
+ }
77
+ if (data.hasOwnProperty('errors')) {
78
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>CreateSubmissionDataRequestResponse</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSubmissionDataRequestResponse</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // check to make sure all required properties are present in the JSON string
93
+ var _iterator = _createForOfIteratorHelper(CreateSubmissionDataRequestResponse.RequiredProperties),
94
+ _step;
95
+ try {
96
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
+ var property = _step.value;
98
+ if (!data.hasOwnProperty(property)) {
99
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
100
+ }
101
+ }
102
+ // ensure the json data is a string
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
109
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
110
+ }
111
+ // validate the optional field `data_request`
112
+ if (data['data_request']) {
113
+ // data not null
114
+ _SubmissionDataRequestShow["default"].validateJSON(data['data_request']);
115
+ }
116
+ // ensure the json data is an array
117
+ if (!Array.isArray(data['errors'])) {
118
+ throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ CreateSubmissionDataRequestResponse.RequiredProperties = ["status", "data_request"];
125
+
126
+ /**
127
+ * @member {module:model/CreateSubmissionDataRequestResponse.StatusEnum} status
128
+ */
129
+ CreateSubmissionDataRequestResponse.prototype['status'] = undefined;
130
+
131
+ /**
132
+ * @member {module:model/SubmissionDataRequestShow} data_request
133
+ */
134
+ CreateSubmissionDataRequestResponse.prototype['data_request'] = undefined;
135
+
136
+ /**
137
+ * @member {Array.<String>} errors
138
+ */
139
+ CreateSubmissionDataRequestResponse.prototype['errors'] = undefined;
140
+
141
+ /**
142
+ * Allowed values for the <code>status</code> property.
143
+ * @enum {String}
144
+ * @readonly
145
+ */
146
+ CreateSubmissionDataRequestResponse['StatusEnum'] = {
147
+ /**
148
+ * value: "success"
149
+ * @const
150
+ */
151
+ "success": "success",
152
+ /**
153
+ * value: "error"
154
+ * @const
155
+ */
156
+ "error": "error"
157
+ };
158
+ var _default = exports["default"] = CreateSubmissionDataRequestResponse;
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SubmissionDataRequestToken = _interopRequireDefault(require("./SubmissionDataRequestToken"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * DocSpring API
20
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
21
+ *
22
+ * The version of the OpenAPI document: v1
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The CreateSubmissionDataRequestTokenResponse model module.
32
+ * @module model/CreateSubmissionDataRequestTokenResponse
33
+ * @version 2.0.0
34
+ */
35
+ var CreateSubmissionDataRequestTokenResponse = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CreateSubmissionDataRequestTokenResponse</code>.
38
+ * @alias module:model/CreateSubmissionDataRequestTokenResponse
39
+ * @param status {module:model/CreateSubmissionDataRequestTokenResponse.StatusEnum}
40
+ * @param token {module:model/SubmissionDataRequestToken}
41
+ */
42
+ function CreateSubmissionDataRequestTokenResponse(status, token) {
43
+ _classCallCheck(this, CreateSubmissionDataRequestTokenResponse);
44
+ CreateSubmissionDataRequestTokenResponse.initialize(this, status, token);
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(CreateSubmissionDataRequestTokenResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, status, token) {
55
+ obj['status'] = status;
56
+ obj['token'] = token;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>CreateSubmissionDataRequestTokenResponse</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/CreateSubmissionDataRequestTokenResponse} obj Optional instance to populate.
64
+ * @return {module:model/CreateSubmissionDataRequestTokenResponse} The populated <code>CreateSubmissionDataRequestTokenResponse</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new CreateSubmissionDataRequestTokenResponse();
71
+ if (data.hasOwnProperty('status')) {
72
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('token')) {
75
+ obj['token'] = _SubmissionDataRequestToken["default"].constructFromObject(data['token']);
76
+ }
77
+ if (data.hasOwnProperty('errors')) {
78
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>CreateSubmissionDataRequestTokenResponse</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSubmissionDataRequestTokenResponse</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // check to make sure all required properties are present in the JSON string
93
+ var _iterator = _createForOfIteratorHelper(CreateSubmissionDataRequestTokenResponse.RequiredProperties),
94
+ _step;
95
+ try {
96
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
+ var property = _step.value;
98
+ if (!data.hasOwnProperty(property)) {
99
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
100
+ }
101
+ }
102
+ // ensure the json data is a string
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
109
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
110
+ }
111
+ // validate the optional field `token`
112
+ if (data['token']) {
113
+ // data not null
114
+ _SubmissionDataRequestToken["default"].validateJSON(data['token']);
115
+ }
116
+ // ensure the json data is an array
117
+ if (!Array.isArray(data['errors'])) {
118
+ throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ CreateSubmissionDataRequestTokenResponse.RequiredProperties = ["status", "token"];
125
+
126
+ /**
127
+ * @member {module:model/CreateSubmissionDataRequestTokenResponse.StatusEnum} status
128
+ */
129
+ CreateSubmissionDataRequestTokenResponse.prototype['status'] = undefined;
130
+
131
+ /**
132
+ * @member {module:model/SubmissionDataRequestToken} token
133
+ */
134
+ CreateSubmissionDataRequestTokenResponse.prototype['token'] = undefined;
135
+
136
+ /**
137
+ * @member {Array.<String>} errors
138
+ */
139
+ CreateSubmissionDataRequestTokenResponse.prototype['errors'] = undefined;
140
+
141
+ /**
142
+ * Allowed values for the <code>status</code> property.
143
+ * @enum {String}
144
+ * @readonly
145
+ */
146
+ CreateSubmissionDataRequestTokenResponse['StatusEnum'] = {
147
+ /**
148
+ * value: "success"
149
+ * @const
150
+ */
151
+ "success": "success",
152
+ /**
153
+ * value: "error"
154
+ * @const
155
+ */
156
+ "error": "error"
157
+ };
158
+ var _default = exports["default"] = CreateSubmissionDataRequestTokenResponse;
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SubmissionPreview = _interopRequireDefault(require("./SubmissionPreview"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * DocSpring API
20
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
21
+ *
22
+ * The version of the OpenAPI document: v1
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The CreateSubmissionResponse model module.
32
+ * @module model/CreateSubmissionResponse
33
+ * @version 2.0.0
34
+ */
35
+ var CreateSubmissionResponse = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>CreateSubmissionResponse</code>.
38
+ * @alias module:model/CreateSubmissionResponse
39
+ * @param status {module:model/CreateSubmissionResponse.StatusEnum}
40
+ * @param submission {module:model/SubmissionPreview}
41
+ */
42
+ function CreateSubmissionResponse(status, submission) {
43
+ _classCallCheck(this, CreateSubmissionResponse);
44
+ CreateSubmissionResponse.initialize(this, status, submission);
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(CreateSubmissionResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, status, submission) {
55
+ obj['status'] = status;
56
+ obj['submission'] = submission;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>CreateSubmissionResponse</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/CreateSubmissionResponse} obj Optional instance to populate.
64
+ * @return {module:model/CreateSubmissionResponse} The populated <code>CreateSubmissionResponse</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new CreateSubmissionResponse();
71
+ if (data.hasOwnProperty('status')) {
72
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('submission')) {
75
+ obj['submission'] = _SubmissionPreview["default"].constructFromObject(data['submission']);
76
+ }
77
+ if (data.hasOwnProperty('errors')) {
78
+ obj['errors'] = _ApiClient["default"].convertToType(data['errors'], ['String']);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>CreateSubmissionResponse</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateSubmissionResponse</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // check to make sure all required properties are present in the JSON string
93
+ var _iterator = _createForOfIteratorHelper(CreateSubmissionResponse.RequiredProperties),
94
+ _step;
95
+ try {
96
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
+ var property = _step.value;
98
+ if (!data.hasOwnProperty(property)) {
99
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
100
+ }
101
+ }
102
+ // ensure the json data is a string
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
109
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
110
+ }
111
+ // validate the optional field `submission`
112
+ if (data['submission']) {
113
+ // data not null
114
+ _SubmissionPreview["default"].validateJSON(data['submission']);
115
+ }
116
+ // ensure the json data is an array
117
+ if (!Array.isArray(data['errors'])) {
118
+ throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
119
+ }
120
+ return true;
121
+ }
122
+ }]);
123
+ }();
124
+ CreateSubmissionResponse.RequiredProperties = ["status", "submission"];
125
+
126
+ /**
127
+ * @member {module:model/CreateSubmissionResponse.StatusEnum} status
128
+ */
129
+ CreateSubmissionResponse.prototype['status'] = undefined;
130
+
131
+ /**
132
+ * @member {module:model/SubmissionPreview} submission
133
+ */
134
+ CreateSubmissionResponse.prototype['submission'] = undefined;
135
+
136
+ /**
137
+ * @member {Array.<String>} errors
138
+ */
139
+ CreateSubmissionResponse.prototype['errors'] = undefined;
140
+
141
+ /**
142
+ * Allowed values for the <code>status</code> property.
143
+ * @enum {String}
144
+ * @readonly
145
+ */
146
+ CreateSubmissionResponse['StatusEnum'] = {
147
+ /**
148
+ * value: "success"
149
+ * @const
150
+ */
151
+ "success": "success",
152
+ /**
153
+ * value: "error"
154
+ * @const
155
+ */
156
+ "error": "error"
157
+ };
158
+ var _default = exports["default"] = CreateSubmissionResponse;
@@ -0,0 +1,126 @@
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 CustomFile model module.
31
+ * @module model/CustomFile
32
+ * @version 2.0.0
33
+ */
34
+ var CustomFile = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>CustomFile</code>.
37
+ * @alias module:model/CustomFile
38
+ * @param id {String}
39
+ * @param url {String}
40
+ */
41
+ function CustomFile(id, url) {
42
+ _classCallCheck(this, CustomFile);
43
+ CustomFile.initialize(this, id, url);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(CustomFile, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, id, url) {
54
+ obj['id'] = id;
55
+ obj['url'] = url;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>CustomFile</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/CustomFile} obj Optional instance to populate.
63
+ * @return {module:model/CustomFile} The populated <code>CustomFile</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new CustomFile();
70
+ if (data.hasOwnProperty('id')) {
71
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('url')) {
74
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>CustomFile</code>.
82
+ * @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>CustomFile</code>.
84
+ */
85
+ }, {
86
+ key: "validateJSON",
87
+ value: function validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ var _iterator = _createForOfIteratorHelper(CustomFile.RequiredProperties),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var property = _step.value;
94
+ if (!data.hasOwnProperty(property)) {
95
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
+ }
97
+ }
98
+ // ensure the json data is a string
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
105
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
106
+ }
107
+ // ensure the json data is a string
108
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
109
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ CustomFile.RequiredProperties = ["id", "url"];
116
+
117
+ /**
118
+ * @member {String} id
119
+ */
120
+ CustomFile.prototype['id'] = undefined;
121
+
122
+ /**
123
+ * @member {String} url
124
+ */
125
+ CustomFile.prototype['url'] = undefined;
126
+ var _default = exports["default"] = CustomFile;