@orchesty/connector-wflow 1.0.2 → 1.0.3

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 (30) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/coverage/clover.xml +137 -119
  3. package/coverage/coverage-final.json +10 -9
  4. package/coverage/lcov-report/index.html +16 -16
  5. package/coverage/lcov-report/src/Batch/WflowSubscribeWebhookBatch.ts.html +10 -10
  6. package/coverage/lcov-report/src/Batch/WflowUnsubscribeWebhookBatch.ts.html +9 -9
  7. package/coverage/lcov-report/src/Batch/index.html +1 -1
  8. package/coverage/lcov-report/src/Connector/WflowGetDocumentConnector.ts.html +7 -7
  9. package/coverage/lcov-report/src/Connector/WflowGetDocumentMainFileConnector.ts.html +193 -0
  10. package/coverage/lcov-report/src/Connector/WflowGetDocumentTypesConnector.ts.html +9 -9
  11. package/coverage/lcov-report/src/Connector/WflowGetOrganizationsConnector.ts.html +9 -9
  12. package/coverage/lcov-report/src/Connector/WflowPutDocumentConnector.ts.html +7 -7
  13. package/coverage/lcov-report/src/Connector/WflowUpdateDocumentStateConnector.ts.html +7 -7
  14. package/coverage/lcov-report/src/Connector/index.html +20 -5
  15. package/coverage/lcov-report/src/WflowApplication.ts.html +33 -33
  16. package/coverage/lcov-report/src/index.html +1 -1
  17. package/coverage/lcov-report/test/dataProvider.ts.html +39 -33
  18. package/coverage/lcov-report/test/index.html +5 -5
  19. package/coverage/lcov.info +163 -135
  20. package/dist/Connector/WflowGetDocumentMainFileConnector.d.ts +10 -0
  21. package/dist/Connector/WflowGetDocumentMainFileConnector.js +25 -0
  22. package/dist/package.json +1 -1
  23. package/package.json +1 -1
  24. package/src/Connector/WflowGetDocumentMainFileConnector.ts +36 -0
  25. package/src/Connector/__tests__/Data/WflowGetDocumentMainFileConnector/input.json +8 -0
  26. package/src/Connector/__tests__/Data/WflowGetDocumentMainFileConnector/mock.json +5 -0
  27. package/src/Connector/__tests__/Data/WflowGetDocumentMainFileConnector/output.json +6 -0
  28. package/src/Connector/__tests__/WflowGetDocumentMainFileConnector.ts +17 -0
  29. package/test/dataProvider.ts +2 -0
  30. package/tsconfig.prod.tsbuildinfo +1 -1
@@ -25,7 +25,7 @@
25
25
  <div class='fl pad1y space-right2'>
26
26
  <span class="strong">100% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>30/30</span>
28
+ <span class='fraction'>32/32</span>
29
29
  </div>
30
30
 
31
31
 
@@ -46,7 +46,7 @@
46
46
  <div class='fl pad1y space-right2'>
47
47
  <span class="strong">100% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>30/30</span>
49
+ <span class='fraction'>32/32</span>
50
50
  </div>
51
51
 
52
52
 
@@ -120,26 +120,29 @@
120
120
  <a name='L55'></a><a href='#L55'>55</a>
121
121
  <a name='L56'></a><a href='#L56'>56</a>
122
122
  <a name='L57'></a><a href='#L57'>57</a>
123
- <a name='L58'></a><a href='#L58'>58</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">7x</span>
124
- <span class="cline-any cline-yes">7x</span>
125
- <span class="cline-any cline-yes">7x</span>
126
- <span class="cline-any cline-yes">7x</span>
127
- <span class="cline-any cline-yes">7x</span>
128
- <span class="cline-any cline-yes">7x</span>
129
- <span class="cline-any cline-yes">7x</span>
130
- <span class="cline-any cline-yes">7x</span>
131
- <span class="cline-any cline-yes">7x</span>
132
- <span class="cline-any cline-yes">7x</span>
133
- <span class="cline-any cline-yes">7x</span>
134
- <span class="cline-any cline-yes">7x</span>
135
- <span class="cline-any cline-yes">7x</span>
136
- <span class="cline-any cline-yes">7x</span>
137
- <span class="cline-any cline-yes">7x</span>
138
- <span class="cline-any cline-yes">7x</span>
139
- <span class="cline-any cline-yes">7x</span>
123
+ <a name='L58'></a><a href='#L58'>58</a>
124
+ <a name='L59'></a><a href='#L59'>59</a>
125
+ <a name='L60'></a><a href='#L60'>60</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">8x</span>
126
+ <span class="cline-any cline-yes">8x</span>
127
+ <span class="cline-any cline-yes">8x</span>
128
+ <span class="cline-any cline-yes">8x</span>
129
+ <span class="cline-any cline-yes">8x</span>
130
+ <span class="cline-any cline-yes">8x</span>
131
+ <span class="cline-any cline-yes">8x</span>
132
+ <span class="cline-any cline-yes">8x</span>
133
+ <span class="cline-any cline-yes">8x</span>
134
+ <span class="cline-any cline-yes">8x</span>
135
+ <span class="cline-any cline-yes">8x</span>
136
+ <span class="cline-any cline-yes">8x</span>
137
+ <span class="cline-any cline-yes">8x</span>
138
+ <span class="cline-any cline-yes">8x</span>
139
+ <span class="cline-any cline-yes">8x</span>
140
+ <span class="cline-any cline-yes">8x</span>
141
+ <span class="cline-any cline-yes">8x</span>
142
+ <span class="cline-any cline-yes">8x</span>
140
143
  <span class="cline-any cline-neutral">&nbsp;</span>
141
- <span class="cline-any cline-yes">7x</span>
142
- <span class="cline-any cline-yes">7x</span>
144
+ <span class="cline-any cline-yes">8x</span>
145
+ <span class="cline-any cline-yes">8x</span>
143
146
  <span class="cline-any cline-neutral">&nbsp;</span>
144
147
  <span class="cline-any cline-neutral">&nbsp;</span>
145
148
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -152,7 +155,7 @@
152
155
  <span class="cline-any cline-neutral">&nbsp;</span>
153
156
  <span class="cline-any cline-neutral">&nbsp;</span>
154
157
  <span class="cline-any cline-neutral">&nbsp;</span>
155
- <span class="cline-any cline-yes">7x</span>
158
+ <span class="cline-any cline-yes">8x</span>
156
159
  <span class="cline-any cline-neutral">&nbsp;</span>
157
160
  <span class="cline-any cline-neutral">&nbsp;</span>
158
161
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -165,17 +168,18 @@
165
168
  <span class="cline-any cline-neutral">&nbsp;</span>
166
169
  <span class="cline-any cline-neutral">&nbsp;</span>
167
170
  <span class="cline-any cline-neutral">&nbsp;</span>
168
- <span class="cline-any cline-yes">7x</span>
169
- <span class="cline-any cline-yes">7x</span>
170
- <span class="cline-any cline-yes">7x</span>
171
+ <span class="cline-any cline-yes">8x</span>
172
+ <span class="cline-any cline-yes">8x</span>
173
+ <span class="cline-any cline-yes">8x</span>
171
174
  <span class="cline-any cline-neutral">&nbsp;</span>
172
- <span class="cline-any cline-yes">7x</span>
173
- <span class="cline-any cline-yes">7x</span>
174
- <span class="cline-any cline-yes">7x</span>
175
- <span class="cline-any cline-yes">7x</span>
176
- <span class="cline-any cline-yes">7x</span>
177
- <span class="cline-any cline-yes">7x</span>
178
- <span class="cline-any cline-yes">7x</span>
175
+ <span class="cline-any cline-yes">8x</span>
176
+ <span class="cline-any cline-yes">8x</span>
177
+ <span class="cline-any cline-yes">8x</span>
178
+ <span class="cline-any cline-yes">8x</span>
179
+ <span class="cline-any cline-yes">8x</span>
180
+ <span class="cline-any cline-yes">8x</span>
181
+ <span class="cline-any cline-yes">8x</span>
182
+ <span class="cline-any cline-yes">8x</span>
179
183
  <span class="cline-any cline-neutral">&nbsp;</span>
180
184
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { appInstall, DEFAULT_ACCESS_TOKEN, DEFAULT_CLIENT_ID, DEFAULT_CLIENT_SECRET, DEFAULT_USER } from '@orchesty/nodejs-connectors/test/DataProvider';
181
185
  import { container, db, oauth2Provider, sender } from '@orchesty/nodejs-connectors/test/TestAbstract';
@@ -189,6 +193,7 @@ import { mockOnce } from '@orchesty/nodejs-sdk/dist/test/MockServer';
189
193
  import WflowSubscribeWebhookBatch from '../src/Batch/WflowSubscribeWebhookBatch';
190
194
  import WflowUnsubscribeWebhookBatch from '../src/Batch/WflowUnsubscribeWebhookBatch';
191
195
  import WflowGetDocumentConnector from '../src/Connector/WflowGetDocumentConnector';
196
+ import WflowGetDocumentMainFileConnector from '../src/Connector/WflowGetDocumentMainFileConnector';
192
197
  import WflowGetDocumentTypesConnector from '../src/Connector/WflowGetDocumentTypesConnector';
193
198
  import WflowGetOrganizationsConnector from '../src/Connector/WflowGetOrganizationsConnector';
194
199
  import WflowPutDocumentConnector from '../src/Connector/WflowPutDocumentConnector';
@@ -227,6 +232,7 @@ export default function init(): void {
227
232
  container.setApplication(app);
228
233
  &nbsp;
229
234
  container.setNode(new WflowGetDocumentConnector(), app);
235
+ container.setNode(new WflowGetDocumentMainFileConnector(), app);
230
236
  container.setNode(new WflowGetDocumentTypesConnector(), app);
231
237
  container.setNode(new WflowUpdateDocumentStateConnector(), app);
232
238
  container.setNode(new WflowSubscribeWebhookBatch(), app);
@@ -241,7 +247,7 @@ export default function init(): void {
241
247
  <div class='footer quiet pad2 space-top1 center small'>
242
248
  Code coverage generated by
243
249
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
244
- at 2026-02-18T10:10:46.442Z
250
+ at 2026-03-15T13:12:10.239Z
245
251
  </div>
246
252
  <script src="../prettify.js"></script>
247
253
  <script>
@@ -25,7 +25,7 @@
25
25
  <div class='fl pad1y space-right2'>
26
26
  <span class="strong">100% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>30/30</span>
28
+ <span class='fraction'>32/32</span>
29
29
  </div>
30
30
 
31
31
 
@@ -46,7 +46,7 @@
46
46
  <div class='fl pad1y space-right2'>
47
47
  <span class="strong">100% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>30/30</span>
49
+ <span class='fraction'>32/32</span>
50
50
  </div>
51
51
 
52
52
 
@@ -84,13 +84,13 @@
84
84
  <div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
85
85
  </td>
86
86
  <td data-value="100" class="pct high">100%</td>
87
- <td data-value="30" class="abs high">30/30</td>
87
+ <td data-value="32" class="abs high">32/32</td>
88
88
  <td data-value="100" class="pct high">100%</td>
89
89
  <td data-value="0" class="abs high">0/0</td>
90
90
  <td data-value="100" class="pct high">100%</td>
91
91
  <td data-value="1" class="abs high">1/1</td>
92
92
  <td data-value="100" class="pct high">100%</td>
93
- <td data-value="30" class="abs high">30/30</td>
93
+ <td data-value="32" class="abs high">32/32</td>
94
94
  </tr>
95
95
 
96
96
  </tbody>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2026-02-18T10:10:46.442Z
104
+ at 2026-03-15T13:12:10.239Z
105
105
  </div>
106
106
  <script src="../prettify.js"></script>
107
107
  <script>
@@ -19,14 +19,14 @@ FN:129,(anonymous_25)
19
19
  FN:137,(anonymous_26)
20
20
  FNF:17
21
21
  FNH:6
22
- FNDA:7,(anonymous_10)
23
- FNDA:7,(anonymous_11)
24
- FNDA:14,(anonymous_12)
22
+ FNDA:8,(anonymous_10)
23
+ FNDA:8,(anonymous_11)
24
+ FNDA:16,(anonymous_12)
25
25
  FNDA:0,(anonymous_13)
26
26
  FNDA:0,(anonymous_14)
27
27
  FNDA:0,(anonymous_15)
28
28
  FNDA:0,(anonymous_16)
29
- FNDA:5,(anonymous_17)
29
+ FNDA:6,(anonymous_17)
30
30
  FNDA:1,(anonymous_18)
31
31
  FNDA:0,(anonymous_19)
32
32
  FNDA:0,(anonymous_20)
@@ -36,42 +36,42 @@ FNDA:1,(anonymous_23)
36
36
  FNDA:0,(anonymous_24)
37
37
  FNDA:0,(anonymous_25)
38
38
  FNDA:0,(anonymous_26)
39
- DA:1,7
40
- DA:3,7
41
- DA:4,7
42
- DA:5,7
43
- DA:6,7
44
- DA:9,7
45
- DA:10,7
46
- DA:11,7
47
- DA:12,7
48
- DA:15,7
49
- DA:16,7
50
- DA:19,7
51
- DA:20,7
52
- DA:21,7
53
- DA:23,7
54
- DA:24,7
55
- DA:25,7
56
- DA:26,7
57
- DA:27,7
58
- DA:28,7
59
- DA:29,7
60
- DA:30,7
61
- DA:31,7
62
- DA:32,7
63
- DA:33,7
64
- DA:36,7
65
- DA:40,7
66
- DA:42,7
67
- DA:46,14
39
+ DA:1,8
40
+ DA:3,8
41
+ DA:4,8
42
+ DA:5,8
43
+ DA:6,8
44
+ DA:9,8
45
+ DA:10,8
46
+ DA:11,8
47
+ DA:12,8
48
+ DA:15,8
49
+ DA:16,8
50
+ DA:19,8
51
+ DA:20,8
52
+ DA:21,8
53
+ DA:23,8
54
+ DA:24,8
55
+ DA:25,8
56
+ DA:26,8
57
+ DA:27,8
58
+ DA:28,8
59
+ DA:29,8
60
+ DA:30,8
61
+ DA:31,8
62
+ DA:32,8
63
+ DA:33,8
64
+ DA:36,8
65
+ DA:40,8
66
+ DA:42,8
67
+ DA:46,16
68
68
  DA:50,0
69
69
  DA:54,0
70
70
  DA:58,0
71
71
  DA:62,0
72
- DA:80,5
73
- DA:84,5
74
- DA:86,5
72
+ DA:80,6
73
+ DA:84,6
74
+ DA:86,6
75
75
  DA:90,1
76
76
  DA:92,1
77
77
  DA:93,0
@@ -90,9 +90,9 @@ DA:137,0
90
90
  DA:139,0
91
91
  LF:52
92
92
  LH:36
93
- BRDA:23,0,0,7
94
- BRDA:23,0,1,7
95
- BRDA:84,1,0,5
93
+ BRDA:23,0,0,8
94
+ BRDA:23,0,1,8
95
+ BRDA:84,1,0,6
96
96
  BRDA:84,1,1,0
97
97
  BRDA:92,2,0,0
98
98
  BRDA:92,2,1,1
@@ -110,20 +110,20 @@ FN:31,(anonymous_4)
110
110
  FN:32,(anonymous_5)
111
111
  FNF:5
112
112
  FNH:2
113
- FNDA:7,(anonymous_1)
113
+ FNDA:8,(anonymous_1)
114
114
  FNDA:1,(anonymous_2)
115
115
  FNDA:0,(anonymous_3)
116
116
  FNDA:0,(anonymous_4)
117
117
  FNDA:0,(anonymous_5)
118
- DA:1,7
119
- DA:3,7
120
- DA:4,7
121
- DA:5,7
122
- DA:7,7
123
- DA:8,7
124
- DA:10,7
125
- DA:12,7
126
- DA:15,7
118
+ DA:1,8
119
+ DA:3,8
120
+ DA:4,8
121
+ DA:5,8
122
+ DA:7,8
123
+ DA:8,8
124
+ DA:10,8
125
+ DA:12,8
126
+ DA:15,8
127
127
  DA:19,1
128
128
  DA:20,1
129
129
  DA:22,1
@@ -158,16 +158,16 @@ FN:13,(anonymous_1)
158
158
  FN:17,(anonymous_2)
159
159
  FNF:2
160
160
  FNH:2
161
- FNDA:7,(anonymous_1)
161
+ FNDA:8,(anonymous_1)
162
162
  FNDA:1,(anonymous_2)
163
- DA:1,7
164
- DA:3,7
165
- DA:4,7
166
- DA:5,7
167
- DA:7,7
168
- DA:9,7
169
- DA:11,7
170
- DA:14,7
163
+ DA:1,8
164
+ DA:3,8
165
+ DA:4,8
166
+ DA:5,8
167
+ DA:7,8
168
+ DA:9,8
169
+ DA:11,8
170
+ DA:14,8
171
171
  DA:18,1
172
172
  DA:19,1
173
173
  DA:20,1
@@ -201,14 +201,14 @@ FN:10,(anonymous_1)
201
201
  FN:14,(anonymous_2)
202
202
  FNF:2
203
203
  FNH:2
204
- FNDA:7,(anonymous_1)
204
+ FNDA:8,(anonymous_1)
205
205
  FNDA:1,(anonymous_2)
206
- DA:1,7
207
- DA:2,7
208
- DA:4,7
209
- DA:6,7
210
- DA:8,7
211
- DA:11,7
206
+ DA:1,8
207
+ DA:2,8
208
+ DA:4,8
209
+ DA:6,8
210
+ DA:8,8
211
+ DA:11,8
212
212
  DA:15,1
213
213
  DA:16,1
214
214
  DA:17,1
@@ -222,23 +222,49 @@ BRF:0
222
222
  BRH:0
223
223
  end_of_record
224
224
  TN:
225
+ SF:src/Connector/WflowGetDocumentMainFileConnector.ts
226
+ FN:11,(anonymous_1)
227
+ FN:15,(anonymous_2)
228
+ FNF:2
229
+ FNH:2
230
+ FNDA:8,(anonymous_1)
231
+ FNDA:1,(anonymous_2)
232
+ DA:1,8
233
+ DA:2,8
234
+ DA:3,8
235
+ DA:5,8
236
+ DA:7,8
237
+ DA:9,8
238
+ DA:12,8
239
+ DA:16,1
240
+ DA:17,1
241
+ DA:18,1
242
+ DA:20,1
243
+ DA:27,1
244
+ DA:29,1
245
+ LF:13
246
+ LH:13
247
+ BRF:0
248
+ BRH:0
249
+ end_of_record
250
+ TN:
225
251
  SF:src/Connector/WflowGetDocumentTypesConnector.ts
226
252
  FN:10,(anonymous_1)
227
253
  FN:14,(anonymous_2)
228
254
  FN:18,(anonymous_3)
229
255
  FNF:3
230
256
  FNH:3
231
- FNDA:7,(anonymous_1)
232
- FNDA:7,(anonymous_2)
257
+ FNDA:8,(anonymous_1)
258
+ FNDA:8,(anonymous_2)
233
259
  FNDA:1,(anonymous_3)
234
- DA:1,7
235
- DA:2,7
236
- DA:4,7
237
- DA:6,7
238
- DA:8,7
239
- DA:10,7
240
- DA:11,7
241
- DA:15,7
260
+ DA:1,8
261
+ DA:2,8
262
+ DA:4,8
263
+ DA:6,8
264
+ DA:8,8
265
+ DA:10,8
266
+ DA:11,8
267
+ DA:15,8
242
268
  DA:19,1
243
269
  DA:20,1
244
270
  DA:22,1
@@ -246,7 +272,7 @@ DA:29,1
246
272
  DA:31,1
247
273
  LF:13
248
274
  LH:13
249
- BRDA:10,0,0,7
275
+ BRDA:10,0,0,8
250
276
  BRDA:20,1,0,0
251
277
  BRDA:20,1,1,1
252
278
  BRF:3
@@ -259,24 +285,24 @@ FN:14,(anonymous_2)
259
285
  FN:18,(anonymous_3)
260
286
  FNF:3
261
287
  FNH:3
262
- FNDA:7,(anonymous_1)
263
- FNDA:7,(anonymous_2)
288
+ FNDA:8,(anonymous_1)
289
+ FNDA:8,(anonymous_2)
264
290
  FNDA:1,(anonymous_3)
265
- DA:1,7
266
- DA:2,7
267
- DA:4,7
268
- DA:6,7
269
- DA:8,7
270
- DA:10,7
271
- DA:11,7
272
- DA:15,7
291
+ DA:1,8
292
+ DA:2,8
293
+ DA:4,8
294
+ DA:6,8
295
+ DA:8,8
296
+ DA:10,8
297
+ DA:11,8
298
+ DA:15,8
273
299
  DA:19,1
274
300
  DA:21,1
275
301
  DA:28,1
276
302
  DA:30,1
277
303
  LF:12
278
304
  LH:12
279
- BRDA:10,0,0,7
305
+ BRDA:10,0,0,8
280
306
  BRDA:23,1,0,0
281
307
  BRDA:23,1,1,1
282
308
  BRF:3
@@ -288,14 +314,14 @@ FN:10,(anonymous_1)
288
314
  FN:14,(anonymous_2)
289
315
  FNF:2
290
316
  FNH:2
291
- FNDA:7,(anonymous_1)
317
+ FNDA:8,(anonymous_1)
292
318
  FNDA:1,(anonymous_2)
293
- DA:1,7
294
- DA:2,7
295
- DA:4,7
296
- DA:6,7
297
- DA:8,7
298
- DA:11,7
319
+ DA:1,8
320
+ DA:2,8
321
+ DA:4,8
322
+ DA:6,8
323
+ DA:8,8
324
+ DA:11,8
299
325
  DA:15,1
300
326
  DA:16,1
301
327
  DA:17,1
@@ -326,14 +352,14 @@ FN:10,(anonymous_1)
326
352
  FN:14,(anonymous_2)
327
353
  FNF:2
328
354
  FNH:2
329
- FNDA:7,(anonymous_1)
355
+ FNDA:8,(anonymous_1)
330
356
  FNDA:1,(anonymous_2)
331
- DA:1,7
332
- DA:2,7
333
- DA:4,7
334
- DA:6,7
335
- DA:8,7
336
- DA:11,7
357
+ DA:1,8
358
+ DA:2,8
359
+ DA:4,8
360
+ DA:6,8
361
+ DA:8,8
362
+ DA:11,8
337
363
  DA:15,1
338
364
  DA:16,1
339
365
  DA:17,1
@@ -348,42 +374,44 @@ BRH:0
348
374
  end_of_record
349
375
  TN:
350
376
  SF:test/dataProvider.ts
351
- FN:19,init
377
+ FN:20,init
352
378
  FNF:1
353
379
  FNH:1
354
- FNDA:7,init
355
- DA:1,7
356
- DA:2,7
357
- DA:3,7
358
- DA:4,7
359
- DA:5,7
360
- DA:6,7
361
- DA:7,7
362
- DA:8,7
363
- DA:9,7
364
- DA:10,7
365
- DA:11,7
366
- DA:12,7
367
- DA:13,7
368
- DA:14,7
369
- DA:15,7
370
- DA:16,7
371
- DA:17,7
372
- DA:19,7
373
- DA:20,7
374
- DA:33,7
375
- DA:46,7
376
- DA:47,7
377
- DA:48,7
378
- DA:50,7
379
- DA:51,7
380
- DA:52,7
381
- DA:53,7
382
- DA:54,7
383
- DA:55,7
384
- DA:56,7
385
- LF:30
386
- LH:30
380
+ FNDA:8,init
381
+ DA:1,8
382
+ DA:2,8
383
+ DA:3,8
384
+ DA:4,8
385
+ DA:5,8
386
+ DA:6,8
387
+ DA:7,8
388
+ DA:8,8
389
+ DA:9,8
390
+ DA:10,8
391
+ DA:11,8
392
+ DA:12,8
393
+ DA:13,8
394
+ DA:14,8
395
+ DA:15,8
396
+ DA:16,8
397
+ DA:17,8
398
+ DA:18,8
399
+ DA:20,8
400
+ DA:21,8
401
+ DA:34,8
402
+ DA:47,8
403
+ DA:48,8
404
+ DA:49,8
405
+ DA:51,8
406
+ DA:52,8
407
+ DA:53,8
408
+ DA:54,8
409
+ DA:55,8
410
+ DA:56,8
411
+ DA:57,8
412
+ DA:58,8
413
+ LF:32
414
+ LH:32
387
415
  BRF:0
388
416
  BRH:0
389
417
  end_of_record
@@ -0,0 +1,10 @@
1
+ import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
2
+ import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
3
+ export declare const NAME = "wflow-get-document-main-file-connector";
4
+ export default class WflowGetDocumentMainFileConnector extends AConnector {
5
+ getName(): string;
6
+ processAction(dto: ProcessDto<IInput>): Promise<ProcessDto>;
7
+ }
8
+ export interface IInput {
9
+ documentId: string;
10
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NAME = void 0;
7
+ const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
8
+ const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
9
+ const Headers_1 = require("@orchesty/nodejs-sdk/dist/lib/Utils/Headers");
10
+ const WflowApplication_1 = require("../WflowApplication");
11
+ exports.NAME = `${WflowApplication_1.NAME}-get-document-main-file-connector`;
12
+ class WflowGetDocumentMainFileConnector extends AConnector_1.default {
13
+ getName() {
14
+ return exports.NAME;
15
+ }
16
+ async processAction(dto) {
17
+ const { documentId } = dto.getJsonData();
18
+ const applicationInstall = await this.getApplicationInstallFromProcess(dto);
19
+ const organization = applicationInstall.getSettings()[WflowApplication_1.ORGANIZATION_FORM]?.[WflowApplication_1.ORGANIZATION];
20
+ const requestDto = (await this.getApplication().getRequestDto(dto, applicationInstall, HttpMethods_1.HttpMethods.GET, `/${organization}/documents/${documentId}/files/main/download`)).addHeaders({ [Headers_1.CommonHeaders.ACCEPT]: 'application/octet-stream' });
21
+ const responseDto = await this.getSender().send(requestDto, [200]);
22
+ return dto.setData(responseDto.getBody());
23
+ }
24
+ }
25
+ exports.default = WflowGetDocumentMainFileConnector;
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-wflow",
3
3
  "description": "",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-wflow",
3
3
  "description": "",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -0,0 +1,36 @@
1
+ import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
2
+ import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
3
+ import { CommonHeaders } from '@orchesty/nodejs-sdk/dist/lib/Utils/Headers';
4
+ import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
5
+ import { NAME as WFLOW_APP_NAME, ORGANIZATION, ORGANIZATION_FORM } from '../WflowApplication';
6
+
7
+ export const NAME = `${WFLOW_APP_NAME}-get-document-main-file-connector`;
8
+
9
+ export default class WflowGetDocumentMainFileConnector extends AConnector {
10
+
11
+ public getName(): string {
12
+ return NAME;
13
+ }
14
+
15
+ public async processAction(dto: ProcessDto<IInput>): Promise<ProcessDto> {
16
+ const { documentId } = dto.getJsonData();
17
+ const applicationInstall = await this.getApplicationInstallFromProcess(dto);
18
+ const organization = applicationInstall.getSettings()[ORGANIZATION_FORM]?.[ORGANIZATION];
19
+
20
+ const requestDto = (await this.getApplication().getRequestDto(
21
+ dto,
22
+ applicationInstall,
23
+ HttpMethods.GET,
24
+ `/${organization}/documents/${documentId}/files/main/download`,
25
+ )).addHeaders({ [CommonHeaders.ACCEPT]: 'application/octet-stream' });
26
+
27
+ const responseDto = await this.getSender().send(requestDto, [200]);
28
+
29
+ return dto.setData(responseDto.getBody());
30
+ }
31
+
32
+ }
33
+
34
+ export interface IInput {
35
+ documentId: string;
36
+ }