docspring 1.5.0 → 2.1.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 (224) hide show
  1. package/README.md +63 -53
  2. package/dist/ApiClient.js +701 -0
  3. package/dist/api/PDFApi.js +1598 -0
  4. package/dist/index.js +384 -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 +173 -0
  17. package/dist/model/CreateHtmlTemplate.js +108 -0
  18. package/dist/model/CreatePdfSubmissionData.js +202 -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/PublishVersionData.js +124 -0
  35. package/dist/model/RenameFolderData.js +112 -0
  36. package/dist/model/RestoreVersionData.js +112 -0
  37. package/dist/model/Submission.js +583 -0
  38. package/dist/model/SubmissionAction.js +252 -0
  39. package/dist/model/SubmissionBatch.js +213 -0
  40. package/dist/model/SubmissionBatchData.js +128 -0
  41. package/dist/model/SubmissionBatchWithSubmissions.js +243 -0
  42. package/dist/model/SubmissionDataRequest.js +475 -0
  43. package/dist/model/SubmissionDataRequestEvent.js +287 -0
  44. package/dist/model/SubmissionDataRequestShow.js +489 -0
  45. package/dist/model/SubmissionDataRequestToken.js +154 -0
  46. package/dist/model/SubmissionPreview.js +517 -0
  47. package/dist/model/SuccessErrorResponse.js +142 -0
  48. package/dist/model/SuccessMultipleErrorsResponse.js +142 -0
  49. package/dist/model/Template.js +833 -0
  50. package/dist/model/TemplateAddFieldsResponse.js +154 -0
  51. package/dist/model/TemplateDeleteResponse.js +166 -0
  52. package/dist/model/TemplatePreview.js +695 -0
  53. package/dist/model/TemplatePublishVersionResponse.js +152 -0
  54. package/dist/model/UpdateHtmlTemplate.js +108 -0
  55. package/dist/model/UpdateSubmissionDataRequestData.js +160 -0
  56. package/dist/model/UploadPresignResponse.js +157 -0
  57. package/package.json +33 -8
  58. package/.openapi-generator/VERSION +0 -1
  59. package/.openapi-generator-ignore +0 -23
  60. package/.travis.yml +0 -7
  61. package/CHANGELOG.md +0 -37
  62. package/docs/AddFieldsData.md +0 -8
  63. package/docs/AddFieldsTemplateResponse.md +0 -21
  64. package/docs/AuthenticationError.md +0 -18
  65. package/docs/AuthenticationSuccessResponse.md +0 -17
  66. package/docs/CombinePdfsData.md +0 -13
  67. package/docs/CombinedSubmission.md +0 -33
  68. package/docs/CombinedSubmissionAction.md +0 -54
  69. package/docs/CombinedSubmissionData.md +0 -12
  70. package/docs/CopyTemplateData.md +0 -9
  71. package/docs/CreateCombinedSubmissionResponse.md +0 -21
  72. package/docs/CreateCustomFileData.md +0 -8
  73. package/docs/CreateCustomFileResponse.md +0 -21
  74. package/docs/CreateFolderData.md +0 -8
  75. package/docs/CreateHtmlTemplateData.md +0 -8
  76. package/docs/CreateSubmissionBatchResponse.md +0 -23
  77. package/docs/CreateSubmissionBatchSubmissionsResponse.md +0 -23
  78. package/docs/CreateSubmissionDataRequestData.md +0 -60
  79. package/docs/CreateSubmissionDataRequestTokenResponse.md +0 -21
  80. package/docs/CreateSubmissionDataRequestTokenResponseToken.md +0 -11
  81. package/docs/CreateSubmissionResponse.md +0 -21
  82. package/docs/CreateTemplateFromUploadData.md +0 -8
  83. package/docs/CustomFile.md +0 -9
  84. package/docs/Error.md +0 -18
  85. package/docs/Folder.md +0 -11
  86. package/docs/FoldersFolder.md +0 -9
  87. package/docs/FullTemplate.md +0 -59
  88. package/docs/FullTemplateDefaults.md +0 -10
  89. package/docs/HtmlTemplateData.md +0 -48
  90. package/docs/InvalidRequest.md +0 -18
  91. package/docs/ListSubmissionsResponse.md +0 -10
  92. package/docs/MoveFolderData.md +0 -8
  93. package/docs/MoveTemplateData.md +0 -8
  94. package/docs/PDFApi.md +0 -1800
  95. package/docs/PendingTemplate.md +0 -37
  96. package/docs/RenameFolderData.md +0 -8
  97. package/docs/Submission.md +0 -55
  98. package/docs/SubmissionAction.md +0 -54
  99. package/docs/SubmissionBatch.md +0 -29
  100. package/docs/SubmissionBatchData.md +0 -11
  101. package/docs/SubmissionData.md +0 -16
  102. package/docs/SubmissionDataBatchRequest.md +0 -13
  103. package/docs/SubmissionDataRequest.md +0 -79
  104. package/docs/Template.md +0 -40
  105. package/docs/TemplateData.md +0 -36
  106. package/docs/TemplatestemplateIdaddFieldsFields.md +0 -286
  107. package/docs/UpdateDataRequestResponse.md +0 -21
  108. package/docs/UpdateSubmissionDataRequestData.md +0 -60
  109. package/docs/UpdateTemplateData.md +0 -8
  110. package/docs/UpdateTemplateResponse.md +0 -20
  111. package/docs/UploadTemplateData.md +0 -49
  112. package/docs/UploadTemplateDataDocument.md +0 -19
  113. package/docs/UploadTemplateDataDocumentMetadata.md +0 -19
  114. package/git_push.sh +0 -52
  115. package/mocha.opts +0 -1
  116. package/src/ApiClient.js +0 -605
  117. package/src/api/Client.js +0 -408
  118. package/src/api/PDFApi.js +0 -1815
  119. package/src/index.js +0 -334
  120. package/src/model/AddFieldsData.js +0 -82
  121. package/src/model/AddFieldsTemplateResponse.js +0 -114
  122. package/src/model/AuthenticationError.js +0 -102
  123. package/src/model/AuthenticationSuccessResponse.js +0 -93
  124. package/src/model/CombinePdfsData.js +0 -122
  125. package/src/model/CombinedSubmission.js +0 -199
  126. package/src/model/CombinedSubmissionAction.js +0 -198
  127. package/src/model/CombinedSubmissionData.js +0 -114
  128. package/src/model/CopyTemplateData.js +0 -90
  129. package/src/model/CreateCombinedSubmissionResponse.js +0 -114
  130. package/src/model/CreateCustomFileData.js +0 -82
  131. package/src/model/CreateCustomFileResponse.js +0 -114
  132. package/src/model/CreateFolderData.js +0 -82
  133. package/src/model/CreateHtmlTemplateData.js +0 -82
  134. package/src/model/CreateSubmissionBatchResponse.js +0 -130
  135. package/src/model/CreateSubmissionBatchSubmissionsResponse.js +0 -119
  136. package/src/model/CreateSubmissionDataRequestData.js +0 -256
  137. package/src/model/CreateSubmissionDataRequestTokenResponse.js +0 -114
  138. package/src/model/CreateSubmissionDataRequestTokenResponseToken.js +0 -105
  139. package/src/model/CreateSubmissionResponse.js +0 -114
  140. package/src/model/CreateTemplateFromUploadData.js +0 -82
  141. package/src/model/CustomFile.js +0 -89
  142. package/src/model/Error.js +0 -103
  143. package/src/model/Folder.js +0 -105
  144. package/src/model/FoldersFolder.js +0 -89
  145. package/src/model/FullTemplate.js +0 -407
  146. package/src/model/FullTemplateDefaults.js +0 -97
  147. package/src/model/HtmlTemplateData.js +0 -248
  148. package/src/model/InvalidRequest.js +0 -103
  149. package/src/model/ListSubmissionsResponse.js +0 -97
  150. package/src/model/MoveFolderData.js +0 -81
  151. package/src/model/MoveTemplateData.js +0 -82
  152. package/src/model/PendingTemplate.js +0 -231
  153. package/src/model/RenameFolderData.js +0 -82
  154. package/src/model/Submission.js +0 -291
  155. package/src/model/SubmissionAction.js +0 -198
  156. package/src/model/SubmissionBatch.js +0 -167
  157. package/src/model/SubmissionBatchData.js +0 -106
  158. package/src/model/SubmissionData.js +0 -146
  159. package/src/model/SubmissionDataBatchRequest.js +0 -121
  160. package/src/model/SubmissionDataRequest.js +0 -345
  161. package/src/model/Template.js +0 -255
  162. package/src/model/TemplateData.js +0 -223
  163. package/src/model/TemplatestemplateIdaddFieldsFields.js +0 -1128
  164. package/src/model/UpdateDataRequestResponse.js +0 -114
  165. package/src/model/UpdateSubmissionDataRequestData.js +0 -256
  166. package/src/model/UpdateTemplateData.js +0 -82
  167. package/src/model/UpdateTemplateResponse.js +0 -106
  168. package/src/model/UploadTemplateData.js +0 -256
  169. package/src/model/UploadTemplateDataDocument.js +0 -109
  170. package/src/model/UploadTemplateDataDocumentMetadata.js +0 -109
  171. package/test/api/ClientIntegration.spec.js +0 -281
  172. package/test/api/PDFApi.spec.js.original +0 -415
  173. package/test/api/PDFApiIntegration.spec.js +0 -305
  174. package/test/model/AddFieldsData.spec.js +0 -67
  175. package/test/model/AddFieldsTemplateResponse.spec.js +0 -79
  176. package/test/model/AuthenticationError.spec.js +0 -73
  177. package/test/model/AuthenticationSuccessResponse.spec.js +0 -67
  178. package/test/model/CombinePdfsData.spec.js +0 -97
  179. package/test/model/CombinedSubmission.spec.js +0 -139
  180. package/test/model/CombinedSubmissionAction.spec.js +0 -97
  181. package/test/model/CombinedSubmissionData.spec.js +0 -91
  182. package/test/model/CopyTemplateData.spec.js +0 -73
  183. package/test/model/CreateCombinedSubmissionResponse.spec.js +0 -79
  184. package/test/model/CreateCustomFileData.spec.js +0 -67
  185. package/test/model/CreateCustomFileResponse.spec.js +0 -79
  186. package/test/model/CreateFolderData.spec.js +0 -67
  187. package/test/model/CreateHtmlTemplateData.spec.js +0 -67
  188. package/test/model/CreateSubmissionBatchResponse.spec.js +0 -91
  189. package/test/model/CreateSubmissionBatchSubmissionsResponse.spec.js +0 -79
  190. package/test/model/CreateSubmissionDataRequestData.spec.js +0 -139
  191. package/test/model/CreateSubmissionDataRequestTokenResponse.spec.js +0 -79
  192. package/test/model/CreateSubmissionDataRequestTokenResponseToken.spec.js +0 -85
  193. package/test/model/CreateSubmissionResponse.spec.js +0 -79
  194. package/test/model/CreateTemplateFromUploadData.spec.js +0 -67
  195. package/test/model/CustomFile.spec.js +0 -73
  196. package/test/model/Error.spec.js +0 -73
  197. package/test/model/Folder.spec.js +0 -85
  198. package/test/model/FoldersFolder.spec.js +0 -73
  199. package/test/model/FullTemplate.spec.js +0 -295
  200. package/test/model/FullTemplateDefaults.spec.js +0 -79
  201. package/test/model/HtmlTemplateData.spec.js +0 -163
  202. package/test/model/InvalidRequest.spec.js +0 -73
  203. package/test/model/ListSubmissionsResponse.spec.js +0 -79
  204. package/test/model/MoveFolderData.spec.js +0 -67
  205. package/test/model/MoveTemplateData.spec.js +0 -67
  206. package/test/model/PendingTemplate.spec.js +0 -163
  207. package/test/model/RenameFolderData.spec.js +0 -67
  208. package/test/model/Submission.spec.js +0 -175
  209. package/test/model/SubmissionAction.spec.js +0 -97
  210. package/test/model/SubmissionBatch.spec.js +0 -115
  211. package/test/model/SubmissionBatchData.spec.js +0 -85
  212. package/test/model/SubmissionData.spec.js +0 -115
  213. package/test/model/SubmissionDataBatchRequest.spec.js +0 -97
  214. package/test/model/SubmissionDataRequest.spec.js +0 -187
  215. package/test/model/Template.spec.js +0 -181
  216. package/test/model/TemplateData.spec.js +0 -157
  217. package/test/model/TemplatestemplateIdaddFieldsFields.spec.js +0 -577
  218. package/test/model/UpdateDataRequestResponse.spec.js +0 -79
  219. package/test/model/UpdateSubmissionDataRequestData.spec.js +0 -139
  220. package/test/model/UpdateTemplateData.spec.js +0 -67
  221. package/test/model/UpdateTemplateResponse.spec.js +0 -73
  222. package/test/model/UploadTemplateData.spec.js +0 -169
  223. package/test/model/UploadTemplateDataDocument.spec.js +0 -79
  224. package/test/model/UploadTemplateDataDocumentMetadata.spec.js +0 -79
@@ -0,0 +1,287 @@
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 SubmissionDataRequestEvent model module.
31
+ * @module model/SubmissionDataRequestEvent
32
+ * @version 2.1.0
33
+ */
34
+ var SubmissionDataRequestEvent = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SubmissionDataRequestEvent</code>.
37
+ * @alias module:model/SubmissionDataRequestEvent
38
+ * @param id {String}
39
+ * @param submissionId {String}
40
+ * @param submissionDataRequestId {String}
41
+ * @param eventType {module:model/SubmissionDataRequestEvent.EventTypeEnum}
42
+ * @param messageType {module:model/SubmissionDataRequestEvent.MessageTypeEnum}
43
+ * @param messageRecipient {String}
44
+ * @param occurredAt {String}
45
+ */
46
+ function SubmissionDataRequestEvent(id, submissionId, submissionDataRequestId, eventType, messageType, messageRecipient, occurredAt) {
47
+ _classCallCheck(this, SubmissionDataRequestEvent);
48
+ SubmissionDataRequestEvent.initialize(this, id, submissionId, submissionDataRequestId, eventType, messageType, messageRecipient, occurredAt);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(SubmissionDataRequestEvent, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, id, submissionId, submissionDataRequestId, eventType, messageType, messageRecipient, occurredAt) {
59
+ obj['id'] = id;
60
+ obj['submission_id'] = submissionId;
61
+ obj['submission_data_request_id'] = submissionDataRequestId;
62
+ obj['event_type'] = eventType;
63
+ obj['message_type'] = messageType;
64
+ obj['message_recipient'] = messageRecipient;
65
+ obj['occurred_at'] = occurredAt;
66
+ }
67
+
68
+ /**
69
+ * Constructs a <code>SubmissionDataRequestEvent</code> from a plain JavaScript object, optionally creating a new instance.
70
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @param {module:model/SubmissionDataRequestEvent} obj Optional instance to populate.
73
+ * @return {module:model/SubmissionDataRequestEvent} The populated <code>SubmissionDataRequestEvent</code> instance.
74
+ */
75
+ }, {
76
+ key: "constructFromObject",
77
+ value: function constructFromObject(data, obj) {
78
+ if (data) {
79
+ obj = obj || new SubmissionDataRequestEvent();
80
+ if (data.hasOwnProperty('id')) {
81
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('submission_id')) {
84
+ obj['submission_id'] = _ApiClient["default"].convertToType(data['submission_id'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('submission_data_request_id')) {
87
+ obj['submission_data_request_id'] = _ApiClient["default"].convertToType(data['submission_data_request_id'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('event_type')) {
90
+ obj['event_type'] = _ApiClient["default"].convertToType(data['event_type'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('message_type')) {
93
+ obj['message_type'] = _ApiClient["default"].convertToType(data['message_type'], 'String');
94
+ }
95
+ if (data.hasOwnProperty('message_recipient')) {
96
+ obj['message_recipient'] = _ApiClient["default"].convertToType(data['message_recipient'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('occurred_at')) {
99
+ obj['occurred_at'] = _ApiClient["default"].convertToType(data['occurred_at'], 'String');
100
+ }
101
+ }
102
+ return obj;
103
+ }
104
+
105
+ /**
106
+ * Validates the JSON data with respect to <code>SubmissionDataRequestEvent</code>.
107
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
108
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SubmissionDataRequestEvent</code>.
109
+ */
110
+ }, {
111
+ key: "validateJSON",
112
+ value: function validateJSON(data) {
113
+ // check to make sure all required properties are present in the JSON string
114
+ var _iterator = _createForOfIteratorHelper(SubmissionDataRequestEvent.RequiredProperties),
115
+ _step;
116
+ try {
117
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
118
+ var property = _step.value;
119
+ if (!data.hasOwnProperty(property)) {
120
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
121
+ }
122
+ }
123
+ // ensure the json data is a string
124
+ } catch (err) {
125
+ _iterator.e(err);
126
+ } finally {
127
+ _iterator.f();
128
+ }
129
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
130
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['submission_id'] && !(typeof data['submission_id'] === 'string' || data['submission_id'] instanceof String)) {
134
+ throw new Error("Expected the field `submission_id` to be a primitive type in the JSON string but got " + data['submission_id']);
135
+ }
136
+ // ensure the json data is a string
137
+ if (data['submission_data_request_id'] && !(typeof data['submission_data_request_id'] === 'string' || data['submission_data_request_id'] instanceof String)) {
138
+ throw new Error("Expected the field `submission_data_request_id` to be a primitive type in the JSON string but got " + data['submission_data_request_id']);
139
+ }
140
+ // ensure the json data is a string
141
+ if (data['event_type'] && !(typeof data['event_type'] === 'string' || data['event_type'] instanceof String)) {
142
+ throw new Error("Expected the field `event_type` to be a primitive type in the JSON string but got " + data['event_type']);
143
+ }
144
+ // ensure the json data is a string
145
+ if (data['message_type'] && !(typeof data['message_type'] === 'string' || data['message_type'] instanceof String)) {
146
+ throw new Error("Expected the field `message_type` to be a primitive type in the JSON string but got " + data['message_type']);
147
+ }
148
+ // ensure the json data is a string
149
+ if (data['message_recipient'] && !(typeof data['message_recipient'] === 'string' || data['message_recipient'] instanceof String)) {
150
+ throw new Error("Expected the field `message_recipient` to be a primitive type in the JSON string but got " + data['message_recipient']);
151
+ }
152
+ // ensure the json data is a string
153
+ if (data['occurred_at'] && !(typeof data['occurred_at'] === 'string' || data['occurred_at'] instanceof String)) {
154
+ throw new Error("Expected the field `occurred_at` to be a primitive type in the JSON string but got " + data['occurred_at']);
155
+ }
156
+ return true;
157
+ }
158
+ }]);
159
+ }();
160
+ SubmissionDataRequestEvent.RequiredProperties = ["id", "submission_id", "submission_data_request_id", "event_type", "message_type", "message_recipient", "occurred_at"];
161
+
162
+ /**
163
+ * @member {String} id
164
+ */
165
+ SubmissionDataRequestEvent.prototype['id'] = undefined;
166
+
167
+ /**
168
+ * @member {String} submission_id
169
+ */
170
+ SubmissionDataRequestEvent.prototype['submission_id'] = undefined;
171
+
172
+ /**
173
+ * @member {String} submission_data_request_id
174
+ */
175
+ SubmissionDataRequestEvent.prototype['submission_data_request_id'] = undefined;
176
+
177
+ /**
178
+ * @member {module:model/SubmissionDataRequestEvent.EventTypeEnum} event_type
179
+ */
180
+ SubmissionDataRequestEvent.prototype['event_type'] = undefined;
181
+
182
+ /**
183
+ * @member {module:model/SubmissionDataRequestEvent.MessageTypeEnum} message_type
184
+ */
185
+ SubmissionDataRequestEvent.prototype['message_type'] = undefined;
186
+
187
+ /**
188
+ * @member {String} message_recipient
189
+ */
190
+ SubmissionDataRequestEvent.prototype['message_recipient'] = undefined;
191
+
192
+ /**
193
+ * @member {String} occurred_at
194
+ */
195
+ SubmissionDataRequestEvent.prototype['occurred_at'] = undefined;
196
+
197
+ /**
198
+ * Allowed values for the <code>event_type</code> property.
199
+ * @enum {String}
200
+ * @readonly
201
+ */
202
+ SubmissionDataRequestEvent['EventTypeEnum'] = {
203
+ /**
204
+ * value: "send_request"
205
+ * @const
206
+ */
207
+ "send_request": "send_request",
208
+ /**
209
+ * value: "view_request"
210
+ * @const
211
+ */
212
+ "view_request": "view_request",
213
+ /**
214
+ * value: "accepted_terms"
215
+ * @const
216
+ */
217
+ "accepted_terms": "accepted_terms",
218
+ /**
219
+ * value: "decline_request"
220
+ * @const
221
+ */
222
+ "decline_request": "decline_request",
223
+ /**
224
+ * value: "sign_request"
225
+ * @const
226
+ */
227
+ "sign_request": "sign_request",
228
+ /**
229
+ * value: "all_completed"
230
+ * @const
231
+ */
232
+ "all_completed": "all_completed"
233
+ };
234
+
235
+ /**
236
+ * Allowed values for the <code>message_type</code> property.
237
+ * @enum {String}
238
+ * @readonly
239
+ */
240
+ SubmissionDataRequestEvent['MessageTypeEnum'] = {
241
+ /**
242
+ * value: "email"
243
+ * @const
244
+ */
245
+ "email": "email",
246
+ /**
247
+ * value: "sms"
248
+ * @const
249
+ */
250
+ "sms": "sms",
251
+ /**
252
+ * value: "fax"
253
+ * @const
254
+ */
255
+ "fax": "fax",
256
+ /**
257
+ * value: "mail"
258
+ * @const
259
+ */
260
+ "mail": "mail",
261
+ /**
262
+ * value: "slack"
263
+ * @const
264
+ */
265
+ "slack": "slack",
266
+ /**
267
+ * value: "msteams"
268
+ * @const
269
+ */
270
+ "msteams": "msteams",
271
+ /**
272
+ * value: "discord"
273
+ * @const
274
+ */
275
+ "discord": "discord",
276
+ /**
277
+ * value: "telegram"
278
+ * @const
279
+ */
280
+ "telegram": "telegram",
281
+ /**
282
+ * value: "whatsapp"
283
+ * @const
284
+ */
285
+ "whatsapp": "whatsapp"
286
+ };
287
+ var _default = exports["default"] = SubmissionDataRequestEvent;