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
@@ -1,305 +0,0 @@
1
- /**
2
- * API V1
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0-SNAPSHOT
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- ;(function (root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory)
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'))
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring)
26
- }
27
- })(this, function (expect, DocSpring) {
28
- 'use strict'
29
-
30
- var instance
31
-
32
- beforeEach(function () {
33
- // We test the default configuration in this test,
34
- // and a configuration instance in Client.spec.js
35
- var defaultConfiguration = DocSpring.Configuration.instance
36
- // Configure HTTP basic authorization: api_token_basic
37
- defaultConfiguration.apiTokenId = 'api_token123'
38
- defaultConfiguration.apiTokenSecret = 'testsecret123'
39
- defaultConfiguration.basePath = 'http://api.docspring.local:31337/api/v1'
40
- instance = new DocSpring.PDFApi()
41
- })
42
-
43
- describe('PDFApi', function () {
44
- describe('batchGeneratePdfs', function () {
45
- it('should call batchGeneratePdfs successfully', function (done) {
46
- var submissionBatchData = {
47
- test: true,
48
- template_id: 'tpl_000000000000000001',
49
- metadata: { user_id: 42 },
50
- submissions: [
51
- {
52
- data: {
53
- first_name: 'John',
54
- last_name: 'Smith',
55
- phone_number: '+11234567890',
56
- },
57
- },
58
- {
59
- data: {
60
- first_name: 'Jane',
61
- last_name: 'Doe',
62
- phone_number: '+64215556789',
63
- },
64
- },
65
- ],
66
- }
67
-
68
- instance.batchGeneratePdfs(
69
- submissionBatchData,
70
- function (error, response) {
71
- if (error) {
72
- console.log(response, error)
73
- throw error
74
- }
75
- expect(response.status).to.be('success')
76
- expect(response.submissions.length).to.be(2)
77
- var firstSubmission = response.submissions[0]
78
- expect(firstSubmission.status).to.be('success')
79
- expect(firstSubmission.submission.id).to.match(/^sub_/)
80
- expect(firstSubmission.submission.expired).to.be(false)
81
- expect(firstSubmission.submission.state).to.be('pending')
82
- var secondSubmission = response.submissions[1]
83
- expect(secondSubmission.status).to.be('success')
84
- expect(secondSubmission.submission.id).to.match(/^sub_/)
85
- expect(secondSubmission.submission.expired).to.be(false)
86
- expect(secondSubmission.submission.state).to.be('pending')
87
- var batch = response.submission_batch
88
- expect(batch.id).to.match(/^sbb_/)
89
- expect(batch.state).to.be('pending')
90
- expect(batch.total_count).to.be(2)
91
- expect(batch.pending_count).to.be(2)
92
- done()
93
- }
94
- )
95
- })
96
- })
97
-
98
- describe('combineSubmissions', function () {
99
- it('should call combineSubmissions successfully', function (done) {
100
- var opts = {
101
- submission_ids: ['sub_000000000000000001', 'sub_000000000000000002'],
102
- }
103
- instance.combineSubmissions(opts, function (error, response) {
104
- if (error) throw error
105
- expect(response.status).to.be('success')
106
- expect(response.combined_submission.id).to.match(/^com_/)
107
- expect(response.combined_submission.state).to.be('pending')
108
- done()
109
- })
110
- })
111
- })
112
- describe('expireCombinedSubmission', function () {
113
- it('should call expireCombinedSubmission successfully', function (done) {
114
- var combinedSubmissionId = 'com_000000000000000001'
115
- instance.expireCombinedSubmission(
116
- combinedSubmissionId,
117
- function (error, response) {
118
- if (error) throw error
119
- expect(response.expired).to.be(true)
120
- done()
121
- }
122
- )
123
- })
124
- })
125
- describe('expireSubmission', function () {
126
- it('should call expireSubmission successfully', function (done) {
127
- var submissionId = 'sub_000000000000000001'
128
- instance.expireSubmission(submissionId, function (error, response) {
129
- if (error) throw error
130
- expect(response.expired).to.be(true)
131
- done()
132
- })
133
- })
134
- })
135
- describe('generatePDF', function () {
136
- it('should call generatePDF successfully', function (done) {
137
- var templateId = 'tpl_000000000000000001'
138
- var submissionData = {
139
- data: {
140
- first_name: 'John',
141
- last_name: 'Smith',
142
- phone_number: '+11234567890',
143
- },
144
- }
145
- instance.generatePDF(
146
- templateId,
147
- submissionData,
148
- function (error, response) {
149
- if (error) throw error
150
- expect(response.status).to.be('success')
151
- var submission = response.submission
152
- expect(submission.id).to.match(/^sub_/)
153
- expect(submission.expired).to.be(false)
154
- expect(submission.state).to.be('pending')
155
- done()
156
- }
157
- )
158
- })
159
- })
160
- describe('generatePDF with data_requests', function () {
161
- it('should call generatePDF with data_requests successfully', function (done) {
162
- var templateId = 'tpl_000000000000000001'
163
- var submissionData = {
164
- data: {
165
- first_name: 'John',
166
- last_name: 'Smith',
167
- },
168
- data_requests: [
169
- {
170
- name: 'John Smith',
171
- email: 'jsmith@example.com',
172
- fields: ['phone_number'],
173
- order: 1,
174
- auth_type: 'email_link',
175
- },
176
- ],
177
- }
178
- instance.generatePDF(
179
- templateId,
180
- submissionData,
181
- function (error, response) {
182
- if (error) throw error
183
- expect(response.status).to.be('success')
184
- var submission = response.submission
185
- expect(submission.id).to.match(/^sub_/)
186
- expect(submission.expired).to.be(false)
187
- expect(submission.state).to.be('waiting_for_data_requests')
188
-
189
- var data_requests = submission.data_requests
190
- expect(data_requests.length).to.be(1)
191
- var data_request = data_requests[0]
192
-
193
- expect(data_request.id).to.match(/^drq_/)
194
- expect(data_request.state).to.be('pending')
195
- expect(data_request.fields).to.eql(['phone_number'])
196
- expect(data_request.order).to.be(1)
197
- expect(data_request.name).to.be('John Smith')
198
- expect(data_request.email).to.be('jsmith@example.com')
199
-
200
- done()
201
- }
202
- )
203
- })
204
- })
205
- describe('getCombinedSubmission', function () {
206
- it('should call getCombinedSubmission successfully', function (done) {
207
- var combinedSubmissionId = 'com_000000000000000001'
208
- instance.getCombinedSubmission(
209
- combinedSubmissionId,
210
- function (error, response) {
211
- if (error) throw error
212
- expect(response.id).to.match(/^com_/)
213
- done()
214
- }
215
- )
216
- })
217
- })
218
- describe('getSubmission', function () {
219
- it('should call getSubmission successfully', function (done) {
220
- var submissionId = 'sub_000000000000000001'
221
- instance.getSubmission(submissionId, {}, function (error, response) {
222
- if (error) throw error
223
- expect(response.id).to.match(/^sub_/)
224
- done()
225
- })
226
- })
227
- })
228
- describe('listTemplates', function () {
229
- it('should call listTemplates successfully', function (done) {
230
- var opts = {
231
- query: 'API Client Test Template 2',
232
- page: 1,
233
- per_page: 10,
234
- }
235
- instance.listTemplates(opts, function (error, templates) {
236
- if (error) throw error
237
- expect(templates.length).to.be(1)
238
- expect(templates[0].id).to.be('tpl_000000000000000002')
239
- done()
240
- })
241
- })
242
- })
243
- describe('testAuthentication', function () {
244
- it('should call testAuthentication successfully', function (done) {
245
- instance.testAuthentication(function (error, response) {
246
- if (error) throw error
247
- expect(response.status).to.be('success')
248
- done()
249
- })
250
- })
251
- })
252
- describe('createPDFTemplate', function () {
253
- it('should call createPDFTemplate successfully', function (done) {
254
- this.timeout(10000)
255
- var fs = require('fs')
256
- var templateDocument = fs.createReadStream(
257
- '../../../spec/fixtures/all_features.pdf'
258
- ) // File |
259
- var templateName = 'testPDFTemplate' // String |
260
- var parentFolderId = null
261
- instance.createPDFTemplate(
262
- templateDocument,
263
- templateName,
264
- parentFolderId,
265
- function (error, data, response) {
266
- if (error) throw error
267
- expect(data.name).to.be('testPDFTemplate')
268
- expect(data.id).to.match(/^tpl_/)
269
- done()
270
- }
271
- )
272
- })
273
- })
274
-
275
- describe('createHTMLTemplate', function () {
276
- it('should call createHTMLTemplate successfully', function (done) {
277
- this.timeout(10000)
278
- var templateName = 'testHTMLTemplate' // String |
279
-
280
- var parentFolderId = null
281
- var templateData = {
282
- template: {
283
- name: 'Test HTML Template',
284
- description: 'HTML template created via API',
285
- template_type: 'html',
286
- html: '<html><body><p>Test Content</p></body></html>',
287
- scss: 'body { color: #444; }',
288
- header_html: 'Test Header',
289
- footer_html: 'Test Footer',
290
- },
291
- }
292
- instance.createHTMLTemplate(
293
- templateData,
294
- function (error, data, response) {
295
- if (error) throw error
296
- expect(data.name).to.be('Test HTML Template')
297
- expect(data.description).to.be('HTML template created via API')
298
- expect(data.id).to.match(/^tpl_/)
299
- done()
300
- }
301
- )
302
- })
303
- })
304
- })
305
- })
@@ -1,67 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'));
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring);
26
- }
27
- }(this, function(expect, DocSpring) {
28
- 'use strict';
29
-
30
- var instance;
31
-
32
- beforeEach(function() {
33
- instance = new DocSpring.AddFieldsData();
34
- });
35
-
36
- var getProperty = function(object, getter, property) {
37
- // Use getter method if present; otherwise, get the property directly.
38
- if (typeof object[getter] === 'function')
39
- return object[getter]();
40
- else
41
- return object[property];
42
- }
43
-
44
- var setProperty = function(object, setter, property, value) {
45
- // Use setter method if present; otherwise, set the property directly.
46
- if (typeof object[setter] === 'function')
47
- object[setter](value);
48
- else
49
- object[property] = value;
50
- }
51
-
52
- describe('AddFieldsData', function() {
53
- it('should create an instance of AddFieldsData', function() {
54
- // uncomment below and update the code to test AddFieldsData
55
- //var instance = new DocSpring.AddFieldsData();
56
- //expect(instance).to.be.a(DocSpring.AddFieldsData);
57
- });
58
-
59
- it('should have the property fields (base name: "fields")', function() {
60
- // uncomment below and update the code to test the property fields
61
- //var instance = new DocSpring.AddFieldsData();
62
- //expect(instance).to.be();
63
- });
64
-
65
- });
66
-
67
- }));
@@ -1,79 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'));
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring);
26
- }
27
- }(this, function(expect, DocSpring) {
28
- 'use strict';
29
-
30
- var instance;
31
-
32
- beforeEach(function() {
33
- instance = new DocSpring.AddFieldsTemplateResponse();
34
- });
35
-
36
- var getProperty = function(object, getter, property) {
37
- // Use getter method if present; otherwise, get the property directly.
38
- if (typeof object[getter] === 'function')
39
- return object[getter]();
40
- else
41
- return object[property];
42
- }
43
-
44
- var setProperty = function(object, setter, property, value) {
45
- // Use setter method if present; otherwise, set the property directly.
46
- if (typeof object[setter] === 'function')
47
- object[setter](value);
48
- else
49
- object[property] = value;
50
- }
51
-
52
- describe('AddFieldsTemplateResponse', function() {
53
- it('should create an instance of AddFieldsTemplateResponse', function() {
54
- // uncomment below and update the code to test AddFieldsTemplateResponse
55
- //var instance = new DocSpring.AddFieldsTemplateResponse();
56
- //expect(instance).to.be.a(DocSpring.AddFieldsTemplateResponse);
57
- });
58
-
59
- it('should have the property newFieldIds (base name: "new_field_ids")', function() {
60
- // uncomment below and update the code to test the property newFieldIds
61
- //var instance = new DocSpring.AddFieldsTemplateResponse();
62
- //expect(instance).to.be();
63
- });
64
-
65
- it('should have the property errors (base name: "errors")', function() {
66
- // uncomment below and update the code to test the property errors
67
- //var instance = new DocSpring.AddFieldsTemplateResponse();
68
- //expect(instance).to.be();
69
- });
70
-
71
- it('should have the property status (base name: "status")', function() {
72
- // uncomment below and update the code to test the property status
73
- //var instance = new DocSpring.AddFieldsTemplateResponse();
74
- //expect(instance).to.be();
75
- });
76
-
77
- });
78
-
79
- }));
@@ -1,73 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'));
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring);
26
- }
27
- }(this, function(expect, DocSpring) {
28
- 'use strict';
29
-
30
- var instance;
31
-
32
- beforeEach(function() {
33
- instance = new DocSpring.AuthenticationError();
34
- });
35
-
36
- var getProperty = function(object, getter, property) {
37
- // Use getter method if present; otherwise, get the property directly.
38
- if (typeof object[getter] === 'function')
39
- return object[getter]();
40
- else
41
- return object[property];
42
- }
43
-
44
- var setProperty = function(object, setter, property, value) {
45
- // Use setter method if present; otherwise, set the property directly.
46
- if (typeof object[setter] === 'function')
47
- object[setter](value);
48
- else
49
- object[property] = value;
50
- }
51
-
52
- describe('AuthenticationError', function() {
53
- it('should create an instance of AuthenticationError', function() {
54
- // uncomment below and update the code to test AuthenticationError
55
- //var instance = new DocSpring.AuthenticationError();
56
- //expect(instance).to.be.a(DocSpring.AuthenticationError);
57
- });
58
-
59
- it('should have the property status (base name: "status")', function() {
60
- // uncomment below and update the code to test the property status
61
- //var instance = new DocSpring.AuthenticationError();
62
- //expect(instance).to.be();
63
- });
64
-
65
- it('should have the property error (base name: "error")', function() {
66
- // uncomment below and update the code to test the property error
67
- //var instance = new DocSpring.AuthenticationError();
68
- //expect(instance).to.be();
69
- });
70
-
71
- });
72
-
73
- }));
@@ -1,67 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'));
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring);
26
- }
27
- }(this, function(expect, DocSpring) {
28
- 'use strict';
29
-
30
- var instance;
31
-
32
- beforeEach(function() {
33
- instance = new DocSpring.AuthenticationSuccessResponse();
34
- });
35
-
36
- var getProperty = function(object, getter, property) {
37
- // Use getter method if present; otherwise, get the property directly.
38
- if (typeof object[getter] === 'function')
39
- return object[getter]();
40
- else
41
- return object[property];
42
- }
43
-
44
- var setProperty = function(object, setter, property, value) {
45
- // Use setter method if present; otherwise, set the property directly.
46
- if (typeof object[setter] === 'function')
47
- object[setter](value);
48
- else
49
- object[property] = value;
50
- }
51
-
52
- describe('AuthenticationSuccessResponse', function() {
53
- it('should create an instance of AuthenticationSuccessResponse', function() {
54
- // uncomment below and update the code to test AuthenticationSuccessResponse
55
- //var instance = new DocSpring.AuthenticationSuccessResponse();
56
- //expect(instance).to.be.a(DocSpring.AuthenticationSuccessResponse);
57
- });
58
-
59
- it('should have the property status (base name: "status")', function() {
60
- // uncomment below and update the code to test the property status
61
- //var instance = new DocSpring.AuthenticationSuccessResponse();
62
- //expect(instance).to.be();
63
- });
64
-
65
- });
66
-
67
- }));
@@ -1,97 +0,0 @@
1
- /**
2
- * API v1
3
- * DocSpring is a service that helps you fill out and sign PDF templates.
4
- *
5
- * OpenAPI spec version: v1
6
- *
7
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8
- * https://openapi-generator.tech
9
- *
10
- * OpenAPI Generator version: 3.3.0
11
- *
12
- * Do not edit the class manually.
13
- *
14
- */
15
-
16
- (function(root, factory) {
17
- if (typeof define === 'function' && define.amd) {
18
- // AMD.
19
- define(['expect.js', '../../src/index'], factory);
20
- } else if (typeof module === 'object' && module.exports) {
21
- // CommonJS-like environments that support module.exports, like Node.
22
- factory(require('expect.js'), require('../../src/index'));
23
- } else {
24
- // Browser globals (root is window)
25
- factory(root.expect, root.DocSpring);
26
- }
27
- }(this, function(expect, DocSpring) {
28
- 'use strict';
29
-
30
- var instance;
31
-
32
- beforeEach(function() {
33
- instance = new DocSpring.CombinePdfsData();
34
- });
35
-
36
- var getProperty = function(object, getter, property) {
37
- // Use getter method if present; otherwise, get the property directly.
38
- if (typeof object[getter] === 'function')
39
- return object[getter]();
40
- else
41
- return object[property];
42
- }
43
-
44
- var setProperty = function(object, setter, property, value) {
45
- // Use setter method if present; otherwise, set the property directly.
46
- if (typeof object[setter] === 'function')
47
- object[setter](value);
48
- else
49
- object[property] = value;
50
- }
51
-
52
- describe('CombinePdfsData', function() {
53
- it('should create an instance of CombinePdfsData', function() {
54
- // uncomment below and update the code to test CombinePdfsData
55
- //var instance = new DocSpring.CombinePdfsData();
56
- //expect(instance).to.be.a(DocSpring.CombinePdfsData);
57
- });
58
-
59
- it('should have the property deleteCustomFiles (base name: "delete_custom_files")', function() {
60
- // uncomment below and update the code to test the property deleteCustomFiles
61
- //var instance = new DocSpring.CombinePdfsData();
62
- //expect(instance).to.be();
63
- });
64
-
65
- it('should have the property expiresIn (base name: "expires_in")', function() {
66
- // uncomment below and update the code to test the property expiresIn
67
- //var instance = new DocSpring.CombinePdfsData();
68
- //expect(instance).to.be();
69
- });
70
-
71
- it('should have the property metadata (base name: "metadata")', function() {
72
- // uncomment below and update the code to test the property metadata
73
- //var instance = new DocSpring.CombinePdfsData();
74
- //expect(instance).to.be();
75
- });
76
-
77
- it('should have the property password (base name: "password")', function() {
78
- // uncomment below and update the code to test the property password
79
- //var instance = new DocSpring.CombinePdfsData();
80
- //expect(instance).to.be();
81
- });
82
-
83
- it('should have the property sourcePdfs (base name: "source_pdfs")', function() {
84
- // uncomment below and update the code to test the property sourcePdfs
85
- //var instance = new DocSpring.CombinePdfsData();
86
- //expect(instance).to.be();
87
- });
88
-
89
- it('should have the property test (base name: "test")', function() {
90
- // uncomment below and update the code to test the property test
91
- //var instance = new DocSpring.CombinePdfsData();
92
- //expect(instance).to.be();
93
- });
94
-
95
- });
96
-
97
- }));