docspring 4.3.0 → 4.4.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 (141) hide show
  1. package/README.md +20 -1
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/RequestSchemas.js +1118 -93
  4. package/dist/RequestValidator.js +4 -0
  5. package/dist/api/Client.js +1360 -206
  6. package/dist/index.js +196 -0
  7. package/dist/model/AddTemplateFieldsRequest.js +3 -3
  8. package/dist/model/AuthenticationCheck.js +1 -1
  9. package/dist/model/CombinedPdf.js +1 -1
  10. package/dist/model/CombinedPdfFiles.js +1 -1
  11. package/dist/model/CombinedPdfList.js +1 -1
  12. package/dist/model/CombinedPdfSource.js +2 -2
  13. package/dist/model/CombinedPdfSourceInput.js +2 -2
  14. package/dist/model/CombinedPdfSourcePdf.js +1 -1
  15. package/dist/model/CopyTemplateRequest.js +1 -1
  16. package/dist/model/CreateAccountEmailActionRequest.js +306 -0
  17. package/dist/model/CreateCombinedPdfRequest.js +1 -1
  18. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  19. package/dist/model/CreateEmailActionRequest.js +280 -0
  20. package/dist/model/CreateEmailDomainRequest.js +114 -0
  21. package/dist/model/CreateFolderRequest.js +1 -1
  22. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  23. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  24. package/dist/model/CreateSubmissionBatchRequest.js +4 -4
  25. package/dist/model/CreateSubmissionRequest.js +112 -4
  26. package/dist/model/CreateTemplatePreviewRequest.js +1 -1
  27. package/dist/model/CreateTemplateRequest.js +103 -8
  28. package/dist/model/CreateWebhookRequest.js +1 -1
  29. package/dist/model/CustomFile.js +1 -1
  30. package/dist/model/CustomFileList.js +1 -1
  31. package/dist/model/CustomFileSourcePdf.js +1 -1
  32. package/dist/model/DnsRecordType.js +64 -0
  33. package/dist/model/EmailAction.js +510 -0
  34. package/dist/model/EmailActionConditions.js +142 -0
  35. package/dist/model/EmailActionConditionsInput.js +142 -0
  36. package/dist/model/EmailActionCustomization.js +222 -0
  37. package/dist/model/EmailActionDelivery.js +59 -0
  38. package/dist/model/EmailActionFileFormats.js +69 -0
  39. package/dist/model/EmailActionList.js +132 -0
  40. package/dist/model/EmailActionSetting.js +119 -0
  41. package/dist/model/EmailActionSubmissionType.js +64 -0
  42. package/dist/model/EmailActionTestEmail.js +116 -0
  43. package/dist/model/EmailDomain.js +245 -0
  44. package/dist/model/EmailDomainDnsRecord.js +155 -0
  45. package/dist/model/EmailDomainDnsRecordPurpose.js +64 -0
  46. package/dist/model/EmailDomainList.js +132 -0
  47. package/dist/model/EmailDomainRecordState.js +64 -0
  48. package/dist/model/EmailDomainState.js +64 -0
  49. package/dist/model/ErrorCode.js +10 -0
  50. package/dist/model/ErrorDetail.js +1 -1
  51. package/dist/model/ErrorInfo.js +46 -7
  52. package/dist/model/ErrorResponse.js +1 -1
  53. package/dist/model/Field.js +3 -3
  54. package/dist/model/FieldComparisonCondition.js +1 -1
  55. package/dist/model/FieldDependency.js +1 -1
  56. package/dist/model/FieldDependencyInput.js +1 -1
  57. package/dist/model/FieldEqualsCondition.js +1 -1
  58. package/dist/model/FieldGroup.js +1 -1
  59. package/dist/model/FieldGroupInput.js +1 -1
  60. package/dist/model/FieldInCondition.js +1 -1
  61. package/dist/model/FieldInput.js +2 -2
  62. package/dist/model/FieldOverride.js +1 -1
  63. package/dist/model/FieldPresenceCondition.js +1 -1
  64. package/dist/model/FieldRangeCondition.js +1 -1
  65. package/dist/model/Folder.js +1 -1
  66. package/dist/model/FolderList.js +1 -1
  67. package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
  68. package/dist/model/GeneratedFile.js +1 -1
  69. package/dist/model/HtmlEngineOptions.js +3 -3
  70. package/dist/model/HtmlEngineOptionsInput.js +2 -2
  71. package/dist/model/MoveFolderRequest.js +1 -1
  72. package/dist/model/MoveTemplateRequest.js +1 -1
  73. package/dist/model/PageImage.js +1 -1
  74. package/dist/model/PageImages.js +1 -1
  75. package/dist/model/PredefinedField.js +1 -1
  76. package/dist/model/PredefinedFieldInput.js +1 -1
  77. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  78. package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
  79. package/dist/model/RenameFolderRequest.js +1 -1
  80. package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
  81. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  82. package/dist/model/SendAccountEmailActionTestEmailRequest.js +91 -0
  83. package/dist/model/SignatureRequest.js +52 -7
  84. package/dist/model/SignatureRequestEmailAttachments.js +59 -0
  85. package/dist/model/SignatureRequestEmailStatus.js +89 -0
  86. package/dist/model/SignatureRequestEvent.js +1 -1
  87. package/dist/model/SignatureRequestEventType.js +11 -1
  88. package/dist/model/SignatureRequestInput.js +24 -8
  89. package/dist/model/SignatureRequestReminders.js +121 -0
  90. package/dist/model/SignatureRequestToken.js +1 -1
  91. package/dist/model/SigningOrder.js +59 -0
  92. package/dist/model/StringConditionType.js +36 -1
  93. package/dist/model/Submission.js +21 -9
  94. package/dist/model/SubmissionAction.js +27 -12
  95. package/dist/model/SubmissionBatch.js +1 -1
  96. package/dist/model/SubmissionFiles.js +1 -1
  97. package/dist/model/SubmissionInput.js +4 -4
  98. package/dist/model/SubmissionList.js +1 -1
  99. package/dist/model/SubmissionSourcePdf.js +1 -1
  100. package/dist/model/SubmissionSummary.js +3 -3
  101. package/dist/model/SubmissionValidation.js +1 -1
  102. package/dist/model/Template.js +130 -19
  103. package/dist/model/TemplateActor.js +1 -1
  104. package/dist/model/TemplateDefaults.js +1 -1
  105. package/dist/model/TemplateDefaultsInput.js +1 -1
  106. package/dist/model/TemplateDiff.js +1 -1
  107. package/dist/model/TemplateDiffSummary.js +1 -1
  108. package/dist/model/TemplateDocument.js +1 -1
  109. package/dist/model/TemplateDocumentSummary.js +1 -1
  110. package/dist/model/TemplateFieldChange.js +1 -1
  111. package/dist/model/TemplateFieldChanges.js +1 -1
  112. package/dist/model/TemplateFieldDependency.js +1 -1
  113. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  114. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  115. package/dist/model/TemplateFieldDependencyInput.js +1 -1
  116. package/dist/model/TemplateFieldMove.js +1 -1
  117. package/dist/model/TemplateFields.js +1 -1
  118. package/dist/model/TemplateModelCode.js +1 -1
  119. package/dist/model/TemplatePageImages.js +1 -1
  120. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  121. package/dist/model/TemplatePreview.js +1 -1
  122. package/dist/model/TemplateSourcePdf.js +2 -2
  123. package/dist/model/TemplateSummary.js +9 -9
  124. package/dist/model/TemplateSummaryList.js +1 -1
  125. package/dist/model/TemplateType.js +6 -1
  126. package/dist/model/TemplateVersion.js +1 -1
  127. package/dist/model/UpdateAccountEmailActionRequest.js +306 -0
  128. package/dist/model/UpdateEmailActionCustomizationRequest.js +258 -0
  129. package/dist/model/UpdateEmailActionRequest.js +280 -0
  130. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  131. package/dist/model/UpdateTemplateDocumentRequest.js +2 -2
  132. package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
  133. package/dist/model/UpdateTemplateRequest.js +100 -5
  134. package/dist/model/UpdateWebhookRequest.js +1 -1
  135. package/dist/model/UploadPresign.js +1 -1
  136. package/dist/model/UrlSourcePdf.js +1 -1
  137. package/dist/model/ValidateSubmissionRequest.js +112 -4
  138. package/dist/model/Webhook.js +1 -1
  139. package/dist/model/WebhookEventType.js +10 -0
  140. package/dist/model/WebhookList.js +1 -1
  141. package/package.json +1 -1
@@ -0,0 +1,245 @@
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 _EmailDomainDnsRecord = _interopRequireDefault(require("./EmailDomainDnsRecord"));
9
+ var _EmailDomainRecordState = _interopRequireDefault(require("./EmailDomainRecordState"));
10
+ var _EmailDomainState = _interopRequireDefault(require("./EmailDomainState"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ 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); }
13
+ 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; } } }; }
14
+ 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; } }
15
+ 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; }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ 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); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
21
+ * DocSpring API
22
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
23
+ *
24
+ * The version of the OpenAPI document: v2
25
+ *
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * The EmailDomain model module.
34
+ * @module model/EmailDomain
35
+ * @version 4.4.0
36
+ */
37
+ var EmailDomain = /*#__PURE__*/function () {
38
+ /**
39
+ * Constructs a new <code>EmailDomain</code>.
40
+ * A domain your email actions can send from once it's verified. Add its DNS records where you manage the domain's DNS: DocSpring checks for them every few minutes, and the domain is verified once its DKIM and DMARC records are found.
41
+ * @alias module:model/EmailDomain
42
+ * @extends Object
43
+ * @param id {String} The email domain's ID.
44
+ * @param domain {String} The domain name, such as `example.com` or `mail.example.com`. Email actions can send from any address at it.
45
+ * @param state {module:model/EmailDomainState} `pending` until its DNS records are found, then `verified`. `failed`: its records weren't found within 3 days, or were removed. Verify it again after fixing them.
46
+ * @param dkim_state {module:model/EmailDomainRecordState} Whether the DKIM records were found.
47
+ * @param mail_from_state {module:model/EmailDomainRecordState} Whether the MAIL FROM records were found. They're optional: they let SPF pass for your domain too.
48
+ * @param dns_records {Array.<module:model/EmailDomainDnsRecord>} The DNS records to add to the domain. Empty while DocSpring is still setting the domain up: verify it again in a few minutes to get them.
49
+ * @param dmarc_policy {String} The policy (`p=`) of the domain's DMARC record, once it has been found.
50
+ * @param last_error {String} Why the domain isn't verified yet, or what to fix.
51
+ * @param verified_at {Date} When the domain was verified.
52
+ * @param checked_at {Date} When DocSpring last checked the domain's DNS records.
53
+ * @param created_at {Date} When the domain was added.
54
+ */
55
+ function EmailDomain(id, domain, state, dkim_state, mail_from_state, dns_records, dmarc_policy, last_error, verified_at, checked_at, created_at) {
56
+ _classCallCheck(this, EmailDomain);
57
+ EmailDomain.initialize(this, id, domain, state, dkim_state, mail_from_state, dns_records, dmarc_policy, last_error, verified_at, checked_at, created_at);
58
+ }
59
+
60
+ /**
61
+ * Initializes the fields of this object.
62
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
63
+ * Only for internal use.
64
+ */
65
+ return _createClass(EmailDomain, null, [{
66
+ key: "initialize",
67
+ value: function initialize(obj, id, domain, state, dkim_state, mail_from_state, dns_records, dmarc_policy, last_error, verified_at, checked_at, created_at) {
68
+ obj['id'] = id;
69
+ obj['domain'] = domain;
70
+ obj['state'] = state;
71
+ obj['dkim_state'] = dkim_state;
72
+ obj['mail_from_state'] = mail_from_state;
73
+ obj['dns_records'] = dns_records;
74
+ obj['dmarc_policy'] = dmarc_policy;
75
+ obj['last_error'] = last_error;
76
+ obj['verified_at'] = verified_at;
77
+ obj['checked_at'] = checked_at;
78
+ obj['created_at'] = created_at;
79
+ }
80
+
81
+ /**
82
+ * Constructs a <code>EmailDomain</code> from a plain JavaScript object, optionally creating a new instance.
83
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @param {module:model/EmailDomain} obj Optional instance to populate.
86
+ * @return {module:model/EmailDomain} The populated <code>EmailDomain</code> instance.
87
+ */
88
+ }, {
89
+ key: "constructFromObject",
90
+ value: function constructFromObject(data, obj) {
91
+ if (data) {
92
+ obj = obj || new EmailDomain();
93
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
94
+ if (data.hasOwnProperty('id')) {
95
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('domain')) {
98
+ obj['domain'] = _ApiClient["default"].convertToType(data['domain'], 'String');
99
+ }
100
+ if (data.hasOwnProperty('state')) {
101
+ obj['state'] = _ApiClient["default"].convertToType(data['state'], _EmailDomainState["default"]);
102
+ }
103
+ if (data.hasOwnProperty('dkim_state')) {
104
+ obj['dkim_state'] = _ApiClient["default"].convertToType(data['dkim_state'], _EmailDomainRecordState["default"]);
105
+ }
106
+ if (data.hasOwnProperty('mail_from_state')) {
107
+ obj['mail_from_state'] = _ApiClient["default"].convertToType(data['mail_from_state'], _EmailDomainRecordState["default"]);
108
+ }
109
+ if (data.hasOwnProperty('dns_records')) {
110
+ obj['dns_records'] = _ApiClient["default"].convertToType(data['dns_records'], [_EmailDomainDnsRecord["default"]]);
111
+ }
112
+ if (data.hasOwnProperty('dmarc_policy')) {
113
+ obj['dmarc_policy'] = _ApiClient["default"].convertToType(data['dmarc_policy'], 'String');
114
+ }
115
+ if (data.hasOwnProperty('last_error')) {
116
+ obj['last_error'] = _ApiClient["default"].convertToType(data['last_error'], 'String');
117
+ }
118
+ if (data.hasOwnProperty('verified_at')) {
119
+ obj['verified_at'] = _ApiClient["default"].convertToType(data['verified_at'], 'Date');
120
+ }
121
+ if (data.hasOwnProperty('checked_at')) {
122
+ obj['checked_at'] = _ApiClient["default"].convertToType(data['checked_at'], 'Date');
123
+ }
124
+ if (data.hasOwnProperty('created_at')) {
125
+ obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
126
+ }
127
+ }
128
+ return obj;
129
+ }
130
+
131
+ /**
132
+ * Validates the JSON data with respect to <code>EmailDomain</code>.
133
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
134
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EmailDomain</code>.
135
+ */
136
+ }, {
137
+ key: "validateJSON",
138
+ value: function validateJSON(data) {
139
+ // check to make sure all required properties are present in the JSON string
140
+ var _iterator = _createForOfIteratorHelper(EmailDomain.RequiredProperties),
141
+ _step;
142
+ try {
143
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
144
+ var property = _step.value;
145
+ if (!data.hasOwnProperty(property)) {
146
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
147
+ }
148
+ }
149
+ // ensure the json data is a string
150
+ } catch (err) {
151
+ _iterator.e(err);
152
+ } finally {
153
+ _iterator.f();
154
+ }
155
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
156
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
157
+ }
158
+ // ensure the json data is a string
159
+ if (data['domain'] && !(typeof data['domain'] === 'string' || data['domain'] instanceof String)) {
160
+ throw new Error("Expected the field `domain` to be a primitive type in the JSON string but got " + data['domain']);
161
+ }
162
+ // ensure the json data is an array
163
+ if (!Array.isArray(data['dns_records'])) {
164
+ throw new Error("Expected the field `dns_records` to be an array in the JSON data but got " + data['dns_records']);
165
+ }
166
+ // ensure the json data is a string
167
+ if (data['dmarc_policy'] && !(typeof data['dmarc_policy'] === 'string' || data['dmarc_policy'] instanceof String)) {
168
+ throw new Error("Expected the field `dmarc_policy` to be a primitive type in the JSON string but got " + data['dmarc_policy']);
169
+ }
170
+ // ensure the json data is a string
171
+ if (data['last_error'] && !(typeof data['last_error'] === 'string' || data['last_error'] instanceof String)) {
172
+ throw new Error("Expected the field `last_error` to be a primitive type in the JSON string but got " + data['last_error']);
173
+ }
174
+ return true;
175
+ }
176
+ }]);
177
+ }();
178
+ EmailDomain.RequiredProperties = ["id", "domain", "state", "dkim_state", "mail_from_state", "dns_records", "dmarc_policy", "last_error", "verified_at", "checked_at", "created_at"];
179
+
180
+ /**
181
+ * The email domain's ID.
182
+ * @member {String} id
183
+ */
184
+ EmailDomain.prototype['id'] = undefined;
185
+
186
+ /**
187
+ * The domain name, such as `example.com` or `mail.example.com`. Email actions can send from any address at it.
188
+ * @member {String} domain
189
+ */
190
+ EmailDomain.prototype['domain'] = undefined;
191
+
192
+ /**
193
+ * `pending` until its DNS records are found, then `verified`. `failed`: its records weren't found within 3 days, or were removed. Verify it again after fixing them.
194
+ * @member {module:model/EmailDomainState} state
195
+ */
196
+ EmailDomain.prototype['state'] = undefined;
197
+
198
+ /**
199
+ * Whether the DKIM records were found.
200
+ * @member {module:model/EmailDomainRecordState} dkim_state
201
+ */
202
+ EmailDomain.prototype['dkim_state'] = undefined;
203
+
204
+ /**
205
+ * Whether the MAIL FROM records were found. They're optional: they let SPF pass for your domain too.
206
+ * @member {module:model/EmailDomainRecordState} mail_from_state
207
+ */
208
+ EmailDomain.prototype['mail_from_state'] = undefined;
209
+
210
+ /**
211
+ * The DNS records to add to the domain. Empty while DocSpring is still setting the domain up: verify it again in a few minutes to get them.
212
+ * @member {Array.<module:model/EmailDomainDnsRecord>} dns_records
213
+ */
214
+ EmailDomain.prototype['dns_records'] = undefined;
215
+
216
+ /**
217
+ * The policy (`p=`) of the domain's DMARC record, once it has been found.
218
+ * @member {String} dmarc_policy
219
+ */
220
+ EmailDomain.prototype['dmarc_policy'] = undefined;
221
+
222
+ /**
223
+ * Why the domain isn't verified yet, or what to fix.
224
+ * @member {String} last_error
225
+ */
226
+ EmailDomain.prototype['last_error'] = undefined;
227
+
228
+ /**
229
+ * When the domain was verified.
230
+ * @member {Date} verified_at
231
+ */
232
+ EmailDomain.prototype['verified_at'] = undefined;
233
+
234
+ /**
235
+ * When DocSpring last checked the domain's DNS records.
236
+ * @member {Date} checked_at
237
+ */
238
+ EmailDomain.prototype['checked_at'] = undefined;
239
+
240
+ /**
241
+ * When the domain was added.
242
+ * @member {Date} created_at
243
+ */
244
+ EmailDomain.prototype['created_at'] = undefined;
245
+ var _default = exports["default"] = EmailDomain;
@@ -0,0 +1,155 @@
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 _DnsRecordType = _interopRequireDefault(require("./DnsRecordType"));
9
+ var _EmailDomainDnsRecordPurpose = _interopRequireDefault(require("./EmailDomainDnsRecordPurpose"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ 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; } } }; }
13
+ 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; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
20
+ * DocSpring API
21
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
22
+ *
23
+ * The version of the OpenAPI document: v2
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The EmailDomainDnsRecord model module.
33
+ * @module model/EmailDomainDnsRecord
34
+ * @version 4.4.0
35
+ */
36
+ var EmailDomainDnsRecord = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>EmailDomainDnsRecord</code>.
39
+ * A DNS record to add to an email domain.
40
+ * @alias module:model/EmailDomainDnsRecord
41
+ * @extends Object
42
+ * @param purpose {module:model/EmailDomainDnsRecordPurpose} What the record is for. `dkim` signs the emails (required), `mail_from` lets SPF pass for your domain (recommended), and `dmarc` tells inboxes what to do with emails that fail these checks (required).
43
+ * @param type {module:model/DnsRecordType} The record's type.
44
+ * @param name {String} The record's name. Some DNS hosts add the domain to the end of a name by themselves.
45
+ * @param value {String} The record's value.
46
+ */
47
+ function EmailDomainDnsRecord(purpose, type, name, value) {
48
+ _classCallCheck(this, EmailDomainDnsRecord);
49
+ EmailDomainDnsRecord.initialize(this, purpose, type, name, value);
50
+ }
51
+
52
+ /**
53
+ * Initializes the fields of this object.
54
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
55
+ * Only for internal use.
56
+ */
57
+ return _createClass(EmailDomainDnsRecord, null, [{
58
+ key: "initialize",
59
+ value: function initialize(obj, purpose, type, name, value) {
60
+ obj['purpose'] = purpose;
61
+ obj['type'] = type;
62
+ obj['name'] = name;
63
+ obj['value'] = value;
64
+ }
65
+
66
+ /**
67
+ * Constructs a <code>EmailDomainDnsRecord</code> from a plain JavaScript object, optionally creating a new instance.
68
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
69
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
70
+ * @param {module:model/EmailDomainDnsRecord} obj Optional instance to populate.
71
+ * @return {module:model/EmailDomainDnsRecord} The populated <code>EmailDomainDnsRecord</code> instance.
72
+ */
73
+ }, {
74
+ key: "constructFromObject",
75
+ value: function constructFromObject(data, obj) {
76
+ if (data) {
77
+ obj = obj || new EmailDomainDnsRecord();
78
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
79
+ if (data.hasOwnProperty('purpose')) {
80
+ obj['purpose'] = _ApiClient["default"].convertToType(data['purpose'], _EmailDomainDnsRecordPurpose["default"]);
81
+ }
82
+ if (data.hasOwnProperty('type')) {
83
+ obj['type'] = _ApiClient["default"].convertToType(data['type'], _DnsRecordType["default"]);
84
+ }
85
+ if (data.hasOwnProperty('name')) {
86
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('value')) {
89
+ obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String');
90
+ }
91
+ }
92
+ return obj;
93
+ }
94
+
95
+ /**
96
+ * Validates the JSON data with respect to <code>EmailDomainDnsRecord</code>.
97
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
98
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EmailDomainDnsRecord</code>.
99
+ */
100
+ }, {
101
+ key: "validateJSON",
102
+ value: function validateJSON(data) {
103
+ // check to make sure all required properties are present in the JSON string
104
+ var _iterator = _createForOfIteratorHelper(EmailDomainDnsRecord.RequiredProperties),
105
+ _step;
106
+ try {
107
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
108
+ var property = _step.value;
109
+ if (!data.hasOwnProperty(property)) {
110
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
111
+ }
112
+ }
113
+ // ensure the json data is a string
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
120
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['value'] && !(typeof data['value'] === 'string' || data['value'] instanceof String)) {
124
+ throw new Error("Expected the field `value` to be a primitive type in the JSON string but got " + data['value']);
125
+ }
126
+ return true;
127
+ }
128
+ }]);
129
+ }();
130
+ EmailDomainDnsRecord.RequiredProperties = ["purpose", "type", "name", "value"];
131
+
132
+ /**
133
+ * What the record is for. `dkim` signs the emails (required), `mail_from` lets SPF pass for your domain (recommended), and `dmarc` tells inboxes what to do with emails that fail these checks (required).
134
+ * @member {module:model/EmailDomainDnsRecordPurpose} purpose
135
+ */
136
+ EmailDomainDnsRecord.prototype['purpose'] = undefined;
137
+
138
+ /**
139
+ * The record's type.
140
+ * @member {module:model/DnsRecordType} type
141
+ */
142
+ EmailDomainDnsRecord.prototype['type'] = undefined;
143
+
144
+ /**
145
+ * The record's name. Some DNS hosts add the domain to the end of a name by themselves.
146
+ * @member {String} name
147
+ */
148
+ EmailDomainDnsRecord.prototype['name'] = undefined;
149
+
150
+ /**
151
+ * The record's value.
152
+ * @member {String} value
153
+ */
154
+ EmailDomainDnsRecord.prototype['value'] = undefined;
155
+ var _default = exports["default"] = EmailDomainDnsRecord;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
16
+ * DocSpring API
17
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
18
+ *
19
+ * The version of the OpenAPI document: v2
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * Enum class EmailDomainDnsRecordPurpose.
29
+ * @enum {}
30
+ * @readonly
31
+ */
32
+ var EmailDomainDnsRecordPurpose = exports["default"] = /*#__PURE__*/function () {
33
+ function EmailDomainDnsRecordPurpose() {
34
+ _classCallCheck(this, EmailDomainDnsRecordPurpose);
35
+ }
36
+ return _createClass(EmailDomainDnsRecordPurpose, null, [{
37
+ key: "constructFromObject",
38
+ value:
39
+ /**
40
+ * Returns a <code>EmailDomainDnsRecordPurpose</code> enum value from a Javascript object name.
41
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
42
+ * @return {module:model/EmailDomainDnsRecordPurpose} The enum <code>EmailDomainDnsRecordPurpose</code> value.
43
+ */
44
+ function constructFromObject(object) {
45
+ // Any value, including one added to the API after this client was released
46
+ return object;
47
+ }
48
+ }]);
49
+ }();
50
+ /**
51
+ * value: "dkim"
52
+ * @const
53
+ */
54
+ _defineProperty(EmailDomainDnsRecordPurpose, "dkim", "dkim");
55
+ /**
56
+ * value: "mail_from"
57
+ * @const
58
+ */
59
+ _defineProperty(EmailDomainDnsRecordPurpose, "mail_from", "mail_from");
60
+ /**
61
+ * value: "dmarc"
62
+ * @const
63
+ */
64
+ _defineProperty(EmailDomainDnsRecordPurpose, "dmarc", "dmarc");
@@ -0,0 +1,132 @@
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 _EmailDomain = _interopRequireDefault(require("./EmailDomain"));
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, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
19
+ * DocSpring API
20
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
21
+ *
22
+ * The version of the OpenAPI document: v2
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 EmailDomainList model module.
32
+ * @module model/EmailDomainList
33
+ * @version 4.4.0
34
+ */
35
+ var EmailDomainList = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>EmailDomainList</code>.
38
+ * A page of the account's email domains, newest first.
39
+ * @alias module:model/EmailDomainList
40
+ * @extends Object
41
+ * @param data {Array.<module:model/EmailDomain>} The items on this page.
42
+ * @param next_cursor {String} Pass it as `cursor` to get the next page. Null on the last page.
43
+ */
44
+ function EmailDomainList(data, next_cursor) {
45
+ _classCallCheck(this, EmailDomainList);
46
+ EmailDomainList.initialize(this, data, next_cursor);
47
+ }
48
+
49
+ /**
50
+ * Initializes the fields of this object.
51
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
+ * Only for internal use.
53
+ */
54
+ return _createClass(EmailDomainList, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, data, next_cursor) {
57
+ obj['data'] = data;
58
+ obj['next_cursor'] = next_cursor;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>EmailDomainList</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/EmailDomainList} obj Optional instance to populate.
66
+ * @return {module:model/EmailDomainList} The populated <code>EmailDomainList</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new EmailDomainList();
73
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
74
+ if (data.hasOwnProperty('data')) {
75
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_EmailDomain["default"]]);
76
+ }
77
+ if (data.hasOwnProperty('next_cursor')) {
78
+ obj['next_cursor'] = _ApiClient["default"].convertToType(data['next_cursor'], 'String');
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>EmailDomainList</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>EmailDomainList</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(EmailDomainList.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 an array
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (!Array.isArray(data['data'])) {
109
+ throw new Error("Expected the field `data` to be an array in the JSON data but got " + data['data']);
110
+ }
111
+ // ensure the json data is a string
112
+ if (data['next_cursor'] && !(typeof data['next_cursor'] === 'string' || data['next_cursor'] instanceof String)) {
113
+ throw new Error("Expected the field `next_cursor` to be a primitive type in the JSON string but got " + data['next_cursor']);
114
+ }
115
+ return true;
116
+ }
117
+ }]);
118
+ }();
119
+ EmailDomainList.RequiredProperties = ["data", "next_cursor"];
120
+
121
+ /**
122
+ * The items on this page.
123
+ * @member {Array.<module:model/EmailDomain>} data
124
+ */
125
+ EmailDomainList.prototype['data'] = undefined;
126
+
127
+ /**
128
+ * Pass it as `cursor` to get the next page. Null on the last page.
129
+ * @member {String} next_cursor
130
+ */
131
+ EmailDomainList.prototype['next_cursor'] = undefined;
132
+ var _default = exports["default"] = EmailDomainList;