@orchesty/connector-wflow 1.0.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +102 -0
- package/coverage/clover.xml +36 -35
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/index.html +11 -11
- package/coverage/lcov-report/src/Batch/WflowSubscribeWebhookBatch.ts.html +11 -2
- package/coverage/lcov-report/src/Batch/WflowUnsubscribeWebhookBatch.ts.html +16 -7
- package/coverage/lcov-report/src/Batch/index.html +11 -11
- package/coverage/lcov-report/src/Connector/WflowGetDocumentConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowGetDocumentMainFileConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowGetDocumentTypesConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowGetOrganizationsConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchAccountingRulesConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchChartOfAccountsConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchContractsConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchCostCentersConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchSeriesConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchVatControlStatementLinesConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPatchVatReturnLinesConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowPutDocumentConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/WflowUpdateDocumentStateConnector.ts.html +1 -1
- package/coverage/lcov-report/src/Connector/index.html +1 -1
- package/coverage/lcov-report/src/WflowApplication.ts.html +5 -2
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/test/dataProvider.ts.html +1 -1
- package/coverage/lcov-report/test/index.html +1 -1
- package/coverage/lcov.info +46 -45
- package/dist/Batch/WflowSubscribeWebhookBatch.js +2 -0
- package/dist/Batch/WflowUnsubscribeWebhookBatch.js +3 -1
- package/dist/WflowApplication.js +1 -1
- package/dist/package.json +3 -2
- package/package.json +3 -2
- package/src/Batch/WflowSubscribeWebhookBatch.ts +2 -0
- package/src/Batch/WflowUnsubscribeWebhookBatch.ts +3 -1
- package/src/Batch/__tests__/Data/WflowSubscribeWebhookBatch/input.json +2 -1
- package/src/Batch/__tests__/Data/WflowSubscribeWebhookBatch/output.json +3 -2
- package/src/Batch/__tests__/Data/WflowUnsubscribeWebhookBatch/input.json +3 -2
- package/src/Batch/__tests__/Data/WflowUnsubscribeWebhookBatch/output.json +3 -2
- package/src/Connector/__tests__/Data/WflowGetDocumentConnector/input.json +8 -7
- package/src/Connector/__tests__/Data/WflowGetDocumentConnector/output.json +431 -430
- package/src/Connector/__tests__/Data/WflowGetDocumentMainFileConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowGetDocumentMainFileConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowGetDocumentTypesConnector/input.json +3 -3
- package/src/Connector/__tests__/Data/WflowGetDocumentTypesConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowGetOrganizationsConnector/input.json +5 -4
- package/src/Connector/__tests__/Data/WflowGetOrganizationsConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchAccountingRulesConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchAccountingRulesConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchAccountingRulesConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchAccountingRulesConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchChartOfAccountsConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchChartOfAccountsConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchChartOfAccountsConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchChartOfAccountsConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchContractsConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchContractsConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchContractsConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchContractsConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchCostCentersConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchCostCentersConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchCostCentersConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchCostCentersConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchSeriesConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchSeriesConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchSeriesConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchSeriesConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatControlStatementLinesConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatControlStatementLinesConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatControlStatementLinesConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatControlStatementLinesConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatReturnLinesConnector/batch-input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatReturnLinesConnector/batch-output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatReturnLinesConnector/input.json +2 -1
- package/src/Connector/__tests__/Data/WflowPatchVatReturnLinesConnector/output.json +2 -1
- package/src/Connector/__tests__/Data/WflowPutDocumentConnector/input.json +3 -2
- package/src/Connector/__tests__/Data/WflowPutDocumentConnector/output.json +3 -2
- package/src/Connector/__tests__/Data/WflowUpdateDocumentState/input.json +3 -2
- package/src/Connector/__tests__/Data/WflowUpdateDocumentState/output.json +3 -2
- package/src/WflowApplication.ts +1 -0
- package/tsconfig.prod.tsbuildinfo +1 -1
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">60% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>15/25</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">60% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>15/25</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -119,13 +119,17 @@
|
|
|
119
119
|
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
120
|
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
121
|
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
-
<a name='L57'></a><a href='#L57'>57</a
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
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">15x</span>
|
|
123
126
|
<span class="cline-any cline-neutral"> </span>
|
|
124
127
|
<span class="cline-any cline-yes">15x</span>
|
|
125
128
|
<span class="cline-any cline-yes">15x</span>
|
|
126
129
|
<span class="cline-any cline-yes">15x</span>
|
|
127
130
|
<span class="cline-any cline-neutral"> </span>
|
|
128
131
|
<span class="cline-any cline-yes">15x</span>
|
|
132
|
+
<span class="cline-any cline-yes">15x</span>
|
|
129
133
|
<span class="cline-any cline-neutral"> </span>
|
|
130
134
|
<span class="cline-any cline-yes">15x</span>
|
|
131
135
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -145,11 +149,13 @@
|
|
|
145
149
|
<span class="cline-any cline-neutral"> </span>
|
|
146
150
|
<span class="cline-any cline-neutral"> </span>
|
|
147
151
|
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-neutral"> </span>
|
|
148
153
|
<span class="cline-any cline-yes">1x</span>
|
|
149
154
|
<span class="cline-any cline-yes">1x</span>
|
|
150
155
|
<span class="cline-any cline-neutral"> </span>
|
|
151
156
|
<span class="cline-any cline-neutral"> </span>
|
|
152
157
|
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
153
159
|
<span class="cline-any cline-no"> </span>
|
|
154
160
|
<span class="cline-any cline-no"> </span>
|
|
155
161
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -181,6 +187,7 @@ import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
|
181
187
|
import OnRepeatException from '@orchesty/nodejs-sdk/dist/lib/Exception/OnRepeatException';
|
|
182
188
|
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
183
189
|
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
190
|
+
import { StatusCodes } from 'http-status-codes';
|
|
184
191
|
import WflowApplication, { NAME as WFLOW_APP_NAME } from '../WflowApplication';
|
|
185
192
|
|
|
186
193
|
export const NAME = `${WFLOW_APP_NAME}-unsubscribe-webhooks-batch`;
|
|
@@ -199,6 +206,7 @@ export default class WflowUnsubscribeWebhookBatch extends ABatchNode {
|
|
|
199
206
|
const webhook = await repository.findOne({
|
|
200
207
|
users: [appInstall.getUser()],
|
|
201
208
|
apps: [appInstall.getName()],
|
|
209
|
+
sdks: [appInstall.getSdk()],
|
|
202
210
|
});
|
|
203
211
|
|
|
204
212
|
<span class="missing-if-branch" title="else path not taken" >E</span>if (!webhook) {
|
|
@@ -206,6 +214,7 @@ export default class WflowUnsubscribeWebhookBatch extends ABatchNode {
|
|
|
206
214
|
}
|
|
207
215
|
|
|
208
216
|
let organization: string;
|
|
217
|
+
|
|
209
218
|
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
210
219
|
<span class="cstat-no" title="statement not covered" > organization = app.getOrganization(appInstall);</span>
|
|
211
220
|
} catch {
|
|
@@ -221,7 +230,7 @@ export default class WflowUnsubscribeWebhookBatch extends ABatchNode {
|
|
|
221
230
|
|
|
222
231
|
const response = <span class="cstat-no" title="statement not covered" >await this.getSender().send(request);</span>
|
|
223
232
|
|
|
224
|
-
<span class="cstat-no" title="statement not covered" > if (response.getResponseCode()
|
|
233
|
+
<span class="cstat-no" title="statement not covered" > if (response.getResponseCode() !== StatusCodes.OK) {</span>
|
|
225
234
|
<span class="cstat-no" title="statement not covered" > await repository.update(webhook.setUnsubscribeFailed(true));</span>
|
|
226
235
|
<span class="cstat-no" title="statement not covered" > throw new OnRepeatException(300, 12, response.getBody());</span>
|
|
227
236
|
}
|
|
@@ -238,7 +247,7 @@ export default class WflowUnsubscribeWebhookBatch extends ABatchNode {
|
|
|
238
247
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
239
248
|
Code coverage generated by
|
|
240
249
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
241
|
-
at 2026-
|
|
250
|
+
at 2026-04-27T09:22:16.212Z
|
|
242
251
|
</div>
|
|
243
252
|
<script src="../../prettify.js"></script>
|
|
244
253
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">60.37% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>32/53</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">60.37% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>32/53</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
97
97
|
<td class="file medium" data-value="WflowUnsubscribeWebhookBatch.ts"><a href="WflowUnsubscribeWebhookBatch.ts.html">WflowUnsubscribeWebhookBatch.ts</a></td>
|
|
98
|
-
<td data-value="
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
98
|
+
<td data-value="60" class="pic medium">
|
|
99
|
+
<div class="chart"><div class="cover-fill" style="width: 60%"></div><div class="cover-empty" style="width: 40%"></div></div>
|
|
100
100
|
</td>
|
|
101
|
-
<td data-value="
|
|
102
|
-
<td data-value="
|
|
101
|
+
<td data-value="60" class="pct medium">60%</td>
|
|
102
|
+
<td data-value="25" class="abs medium">15/25</td>
|
|
103
103
|
<td data-value="25" class="pct low">25%</td>
|
|
104
104
|
<td data-value="4" class="abs low">1/4</td>
|
|
105
105
|
<td data-value="100" class="pct high">100%</td>
|
|
106
106
|
<td data-value="2" class="abs high">2/2</td>
|
|
107
|
-
<td data-value="
|
|
108
|
-
<td data-value="
|
|
107
|
+
<td data-value="60" class="pct medium">60%</td>
|
|
108
|
+
<td data-value="25" class="abs medium">15/25</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
</tbody>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2026-
|
|
119
|
+
at 2026-04-27T09:22:16.212Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -1090,7 +1090,7 @@ export interface Activity {
|
|
|
1090
1090
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1091
1091
|
Code coverage generated by
|
|
1092
1092
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1093
|
-
at 2026-
|
|
1093
|
+
at 2026-04-27T09:22:16.212Z
|
|
1094
1094
|
</div>
|
|
1095
1095
|
<script src="../../prettify.js"></script>
|
|
1096
1096
|
<script>
|
|
@@ -190,7 +190,7 @@ export interface IOutput {
|
|
|
190
190
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
191
191
|
Code coverage generated by
|
|
192
192
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
193
|
-
at 2026-
|
|
193
|
+
at 2026-04-27T09:22:16.212Z
|
|
194
194
|
</div>
|
|
195
195
|
<script src="../../prettify.js"></script>
|
|
196
196
|
<script>
|
|
@@ -277,7 +277,7 @@ interface IResponse {
|
|
|
277
277
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
278
278
|
Code coverage generated by
|
|
279
279
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
280
|
-
at 2026-
|
|
280
|
+
at 2026-04-27T09:22:16.212Z
|
|
281
281
|
</div>
|
|
282
282
|
<script src="../../prettify.js"></script>
|
|
283
283
|
<script>
|
|
@@ -190,7 +190,7 @@ export interface IOutput {
|
|
|
190
190
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
191
191
|
Code coverage generated by
|
|
192
192
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
193
|
-
at 2026-
|
|
193
|
+
at 2026-04-27T09:22:16.212Z
|
|
194
194
|
</div>
|
|
195
195
|
<script src="../../prettify.js"></script>
|
|
196
196
|
<script>
|
|
@@ -229,7 +229,7 @@ export type IOutput = IInput | IInput[];
|
|
|
229
229
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
230
230
|
Code coverage generated by
|
|
231
231
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
232
|
-
at 2026-
|
|
232
|
+
at 2026-04-27T09:22:16.212Z
|
|
233
233
|
</div>
|
|
234
234
|
<script src="../../prettify.js"></script>
|
|
235
235
|
<script>
|
|
@@ -196,7 +196,7 @@ export type IOutput = IInput | IInput[];
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at 2026-
|
|
199
|
+
at 2026-04-27T09:22:16.212Z
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../../prettify.js"></script>
|
|
202
202
|
<script>
|
|
@@ -196,7 +196,7 @@ export type IOutput = IInput | IInput[];
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at 2026-
|
|
199
|
+
at 2026-04-27T09:22:16.212Z
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../../prettify.js"></script>
|
|
202
202
|
<script>
|
|
@@ -196,7 +196,7 @@ export type IOutput = IInput | IInput[];
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at 2026-
|
|
199
|
+
at 2026-04-27T09:22:16.212Z
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../../prettify.js"></script>
|
|
202
202
|
<script>
|
|
@@ -253,7 +253,7 @@ export type IOutput = IInput | IInput[];
|
|
|
253
253
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
254
254
|
Code coverage generated by
|
|
255
255
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
256
|
-
at 2026-
|
|
256
|
+
at 2026-04-27T09:22:16.212Z
|
|
257
257
|
</div>
|
|
258
258
|
<script src="../../prettify.js"></script>
|
|
259
259
|
<script>
|
package/coverage/lcov-report/src/Connector/WflowPatchVatControlStatementLinesConnector.ts.html
CHANGED
|
@@ -196,7 +196,7 @@ export type IOutput = IInput | IInput[];
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at 2026-
|
|
199
|
+
at 2026-04-27T09:22:16.212Z
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../../prettify.js"></script>
|
|
202
202
|
<script>
|
|
@@ -199,7 +199,7 @@ export type IOutput = IInput | IInput[];
|
|
|
199
199
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
200
200
|
Code coverage generated by
|
|
201
201
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
202
|
-
at 2026-
|
|
202
|
+
at 2026-04-27T09:22:16.212Z
|
|
203
203
|
</div>
|
|
204
204
|
<script src="../../prettify.js"></script>
|
|
205
205
|
<script>
|
|
@@ -517,7 +517,7 @@ export type IOutput = IInput;
|
|
|
517
517
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
518
518
|
Code coverage generated by
|
|
519
519
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
520
|
-
at 2026-
|
|
520
|
+
at 2026-04-27T09:22:16.212Z
|
|
521
521
|
</div>
|
|
522
522
|
<script src="../../prettify.js"></script>
|
|
523
523
|
<script>
|
|
@@ -178,7 +178,7 @@ export type IOutput = IInput;
|
|
|
178
178
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
179
179
|
Code coverage generated by
|
|
180
180
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
181
|
-
at 2026-
|
|
181
|
+
at 2026-04-27T09:22:16.212Z
|
|
182
182
|
</div>
|
|
183
183
|
<script src="../../prettify.js"></script>
|
|
184
184
|
<script>
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
282
282
|
Code coverage generated by
|
|
283
283
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
284
|
-
at 2026-
|
|
284
|
+
at 2026-04-27T09:22:16.212Z
|
|
285
285
|
</div>
|
|
286
286
|
<script src="../../prettify.js"></script>
|
|
287
287
|
<script>
|
|
@@ -213,7 +213,8 @@
|
|
|
213
213
|
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
214
|
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
215
|
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
-
<a name='L151'></a><a href='#L151'>151</a
|
|
216
|
+
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
+
<a name='L152'></a><a href='#L152'>152</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">15x</span>
|
|
217
218
|
<span class="cline-any cline-neutral"> </span>
|
|
218
219
|
<span class="cline-any cline-yes">15x</span>
|
|
219
220
|
<span class="cline-any cline-yes">15x</span>
|
|
@@ -341,6 +342,7 @@
|
|
|
341
342
|
<span class="cline-any cline-neutral"> </span>
|
|
342
343
|
<span class="cline-any cline-neutral"> </span>
|
|
343
344
|
<span class="cline-any cline-neutral"> </span>
|
|
345
|
+
<span class="cline-any cline-neutral"> </span>
|
|
344
346
|
<span class="cline-any cline-no"> </span>
|
|
345
347
|
<span class="cline-any cline-no"> </span>
|
|
346
348
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -486,6 +488,7 @@ export default class WflowApplication extends AOAuth2Application {
|
|
|
486
488
|
ProcessDto.createForFormRequest(
|
|
487
489
|
NAME,
|
|
488
490
|
applicationInstall.getUser(),
|
|
491
|
+
applicationInstall.getSdk(),
|
|
489
492
|
crypto.randomUUID(),
|
|
490
493
|
'form',
|
|
491
494
|
),
|
|
@@ -520,7 +523,7 @@ export default class WflowApplication extends AOAuth2Application {
|
|
|
520
523
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
521
524
|
Code coverage generated by
|
|
522
525
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
523
|
-
at 2026-
|
|
526
|
+
at 2026-04-27T09:22:16.212Z
|
|
524
527
|
</div>
|
|
525
528
|
<script src="../prettify.js"></script>
|
|
526
529
|
<script>
|
|
@@ -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-
|
|
104
|
+
at 2026-04-27T09:22:16.212Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -292,7 +292,7 @@ export default function init(): void {
|
|
|
292
292
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
293
293
|
Code coverage generated by
|
|
294
294
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
295
|
-
at 2026-
|
|
295
|
+
at 2026-04-27T09:22:16.212Z
|
|
296
296
|
</div>
|
|
297
297
|
<script src="../prettify.js"></script>
|
|
298
298
|
<script>
|
|
@@ -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-
|
|
104
|
+
at 2026-04-27T09:22:16.212Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -15,8 +15,8 @@ FN:107,(anonymous_21)
|
|
|
15
15
|
FN:111,(anonymous_22)
|
|
16
16
|
FN:115,(anonymous_23)
|
|
17
17
|
FN:119,(anonymous_24)
|
|
18
|
-
FN:
|
|
19
|
-
FN:
|
|
18
|
+
FN:130,(anonymous_25)
|
|
19
|
+
FN:138,(anonymous_26)
|
|
20
20
|
FNF:17
|
|
21
21
|
FNH:6
|
|
22
22
|
FNDA:15,(anonymous_10)
|
|
@@ -82,12 +82,12 @@ DA:108,0
|
|
|
82
82
|
DA:112,0
|
|
83
83
|
DA:116,1
|
|
84
84
|
DA:120,0
|
|
85
|
-
DA:129,0
|
|
86
85
|
DA:130,0
|
|
87
|
-
DA:
|
|
86
|
+
DA:131,0
|
|
88
87
|
DA:133,0
|
|
89
|
-
DA:
|
|
90
|
-
DA:
|
|
88
|
+
DA:134,0
|
|
89
|
+
DA:138,0
|
|
90
|
+
DA:140,0
|
|
91
91
|
LF:52
|
|
92
92
|
LH:36
|
|
93
93
|
BRDA:23,0,0,15
|
|
@@ -96,8 +96,8 @@ BRDA:84,1,0,20
|
|
|
96
96
|
BRDA:84,1,1,0
|
|
97
97
|
BRDA:92,2,0,0
|
|
98
98
|
BRDA:92,2,1,19
|
|
99
|
-
BRDA:
|
|
100
|
-
BRDA:
|
|
99
|
+
BRDA:133,3,0,0
|
|
100
|
+
BRDA:133,3,1,0
|
|
101
101
|
BRF:8
|
|
102
102
|
BRH:4
|
|
103
103
|
end_of_record
|
|
@@ -105,9 +105,9 @@ TN:
|
|
|
105
105
|
SF:src/Batch/WflowSubscribeWebhookBatch.ts
|
|
106
106
|
FN:14,(anonymous_1)
|
|
107
107
|
FN:18,(anonymous_2)
|
|
108
|
-
FN:
|
|
109
|
-
FN:
|
|
110
|
-
FN:
|
|
108
|
+
FN:29,(anonymous_3)
|
|
109
|
+
FN:32,(anonymous_4)
|
|
110
|
+
FN:33,(anonymous_5)
|
|
111
111
|
FNF:5
|
|
112
112
|
FNH:2
|
|
113
113
|
FNDA:15,(anonymous_1)
|
|
@@ -129,31 +129,31 @@ DA:20,1
|
|
|
129
129
|
DA:22,1
|
|
130
130
|
DA:23,1
|
|
131
131
|
DA:25,1
|
|
132
|
-
DA:
|
|
133
|
-
DA:
|
|
134
|
-
DA:31,0
|
|
132
|
+
DA:29,0
|
|
133
|
+
DA:31,1
|
|
135
134
|
DA:32,0
|
|
136
|
-
DA:
|
|
135
|
+
DA:33,0
|
|
137
136
|
DA:37,1
|
|
138
|
-
DA:
|
|
139
|
-
DA:
|
|
137
|
+
DA:38,1
|
|
138
|
+
DA:43,0
|
|
140
139
|
DA:44,0
|
|
141
|
-
DA:
|
|
142
|
-
DA:
|
|
143
|
-
DA:
|
|
144
|
-
DA:
|
|
145
|
-
DA:
|
|
140
|
+
DA:46,0
|
|
141
|
+
DA:49,0
|
|
142
|
+
DA:50,0
|
|
143
|
+
DA:65,0
|
|
144
|
+
DA:69,0
|
|
145
|
+
DA:81,0
|
|
146
146
|
LF:28
|
|
147
147
|
LH:17
|
|
148
|
-
BRDA:
|
|
149
|
-
BRDA:
|
|
148
|
+
BRDA:37,0,0,1
|
|
149
|
+
BRDA:37,0,1,0
|
|
150
150
|
BRF:2
|
|
151
151
|
BRH:1
|
|
152
152
|
end_of_record
|
|
153
153
|
TN:
|
|
154
154
|
SF:src/Batch/WflowUnsubscribeWebhookBatch.ts
|
|
155
|
-
FN:
|
|
156
|
-
FN:
|
|
155
|
+
FN:14,(anonymous_1)
|
|
156
|
+
FN:18,(anonymous_2)
|
|
157
157
|
FNF:2
|
|
158
158
|
FNH:2
|
|
159
159
|
FNDA:15,(anonymous_1)
|
|
@@ -163,31 +163,32 @@ DA:3,15
|
|
|
163
163
|
DA:4,15
|
|
164
164
|
DA:5,15
|
|
165
165
|
DA:7,15
|
|
166
|
-
DA:
|
|
167
|
-
DA:
|
|
168
|
-
DA:
|
|
169
|
-
DA:
|
|
166
|
+
DA:8,15
|
|
167
|
+
DA:10,15
|
|
168
|
+
DA:12,15
|
|
169
|
+
DA:15,15
|
|
170
170
|
DA:19,1
|
|
171
171
|
DA:20,1
|
|
172
|
-
DA:
|
|
173
|
-
DA:
|
|
174
|
-
DA:
|
|
175
|
-
DA:
|
|
176
|
-
DA:33,0
|
|
172
|
+
DA:21,1
|
|
173
|
+
DA:23,1
|
|
174
|
+
DA:29,1
|
|
175
|
+
DA:30,1
|
|
177
176
|
DA:35,0
|
|
177
|
+
DA:36,0
|
|
178
178
|
DA:38,0
|
|
179
|
-
DA:
|
|
180
|
-
DA:47,0
|
|
179
|
+
DA:41,0
|
|
181
180
|
DA:48,0
|
|
182
|
-
DA:
|
|
181
|
+
DA:50,0
|
|
182
|
+
DA:51,0
|
|
183
183
|
DA:52,0
|
|
184
|
-
DA:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
BRDA:
|
|
189
|
-
BRDA:
|
|
190
|
-
BRDA:
|
|
184
|
+
DA:55,0
|
|
185
|
+
DA:56,0
|
|
186
|
+
LF:25
|
|
187
|
+
LH:15
|
|
188
|
+
BRDA:29,0,0,1
|
|
189
|
+
BRDA:29,0,1,0
|
|
190
|
+
BRDA:50,1,0,0
|
|
191
|
+
BRDA:50,1,1,0
|
|
191
192
|
BRF:4
|
|
192
193
|
BRH:1
|
|
193
194
|
end_of_record
|
|
@@ -23,6 +23,7 @@ class WflowSubscribeWebhookBatch extends ABatchNode_1.default {
|
|
|
23
23
|
const registeredEvents = (await repository.findMany({
|
|
24
24
|
users: [appInstall.getUser()],
|
|
25
25
|
apps: [appInstall.getName()],
|
|
26
|
+
sdks: [appInstall.getSdk()],
|
|
26
27
|
})).map((webhook) => webhook.getName());
|
|
27
28
|
const unsubscribed = subscriptions.find((subscription) => !registeredEvents.some((event) => subscription.getName() === event));
|
|
28
29
|
if (!unsubscribed) {
|
|
@@ -44,6 +45,7 @@ class WflowSubscribeWebhookBatch extends ABatchNode_1.default {
|
|
|
44
45
|
await repository.insert(new Webhook_1.default()
|
|
45
46
|
.setWebhookId(id)
|
|
46
47
|
.setUser(appInstall.getUser())
|
|
48
|
+
.setSdk(appInstall.getSdk())
|
|
47
49
|
.setNode(unsubscribed.getNode())
|
|
48
50
|
.setToken(token)
|
|
49
51
|
.setApplication(appInstall.getName())
|
|
@@ -8,6 +8,7 @@ const Webhook_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Applica
|
|
|
8
8
|
const ABatchNode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode"));
|
|
9
9
|
const OnRepeatException_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Exception/OnRepeatException"));
|
|
10
10
|
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
11
|
+
const http_status_codes_1 = require("http-status-codes");
|
|
11
12
|
const WflowApplication_1 = require("../WflowApplication");
|
|
12
13
|
exports.NAME = `${WflowApplication_1.NAME}-unsubscribe-webhooks-batch`;
|
|
13
14
|
class WflowUnsubscribeWebhookBatch extends ABatchNode_1.default {
|
|
@@ -21,6 +22,7 @@ class WflowUnsubscribeWebhookBatch extends ABatchNode_1.default {
|
|
|
21
22
|
const webhook = await repository.findOne({
|
|
22
23
|
users: [appInstall.getUser()],
|
|
23
24
|
apps: [appInstall.getName()],
|
|
25
|
+
sdks: [appInstall.getSdk()],
|
|
24
26
|
});
|
|
25
27
|
if (!webhook) {
|
|
26
28
|
return dto;
|
|
@@ -34,7 +36,7 @@ class WflowUnsubscribeWebhookBatch extends ABatchNode_1.default {
|
|
|
34
36
|
}
|
|
35
37
|
const request = app.getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.DELETE, `/${organization}/webhookregistrations/${webhook.getWebhookId()}`);
|
|
36
38
|
const response = await this.getSender().send(request);
|
|
37
|
-
if (response.getResponseCode() !==
|
|
39
|
+
if (response.getResponseCode() !== http_status_codes_1.StatusCodes.OK) {
|
|
38
40
|
await repository.update(webhook.setUnsubscribeFailed(true));
|
|
39
41
|
throw new OnRepeatException_1.default(300, 12, response.getBody());
|
|
40
42
|
}
|
package/dist/WflowApplication.js
CHANGED
|
@@ -120,7 +120,7 @@ class WflowApplication extends AOAuth2Application_1.default {
|
|
|
120
120
|
return [];
|
|
121
121
|
}
|
|
122
122
|
async customFormReplace(formStack, applicationInstall) {
|
|
123
|
-
const organizations = (await this.wflowGetOrganizationsConnector.processAction(ProcessDto_1.default.createForFormRequest(exports.NAME, applicationInstall.getUser(), crypto.randomUUID(), 'form'))).getJsonData();
|
|
123
|
+
const organizations = (await this.wflowGetOrganizationsConnector.processAction(ProcessDto_1.default.createForFormRequest(exports.NAME, applicationInstall.getUser(), applicationInstall.getSdk(), crypto.randomUUID(), 'form'))).getJsonData();
|
|
124
124
|
const form = formStack.getForms().find((item) => item.getKey() === exports.ORGANIZATION_FORM);
|
|
125
125
|
const settings = applicationInstall.getSettings()[exports.ORGANIZATION_FORM];
|
|
126
126
|
if (!form) {
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-wflow",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
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",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"keywords": [],
|
|
15
15
|
"author": "info@hanaboso.com",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@orchesty/nodejs-sdk": "^
|
|
17
|
+
"@orchesty/nodejs-sdk": "^5.0.8",
|
|
18
|
+
"http-status-codes": "^2.3.0"
|
|
18
19
|
},
|
|
19
20
|
"engines": {
|
|
20
21
|
"node": ">=24"
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orchesty/connector-wflow",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
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",
|
|
8
8
|
"keywords": [],
|
|
9
9
|
"author": "info@hanaboso.com",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@orchesty/nodejs-sdk": "^
|
|
11
|
+
"@orchesty/nodejs-sdk": "^5.0.8",
|
|
12
|
+
"http-status-codes": "^2.3.0"
|
|
12
13
|
},
|
|
13
14
|
"engines": {
|
|
14
15
|
"node": ">=24"
|
|
@@ -25,6 +25,7 @@ export default class WflowSubscribeWebhookBatch extends ABatchNode {
|
|
|
25
25
|
const registeredEvents = (await repository.findMany({
|
|
26
26
|
users: [appInstall.getUser()],
|
|
27
27
|
apps: [appInstall.getName()],
|
|
28
|
+
sdks: [appInstall.getSdk()],
|
|
28
29
|
})).map((webhook) => webhook.getName());
|
|
29
30
|
|
|
30
31
|
const unsubscribed = subscriptions.find(
|
|
@@ -69,6 +70,7 @@ export default class WflowSubscribeWebhookBatch extends ABatchNode {
|
|
|
69
70
|
new Webhook()
|
|
70
71
|
.setWebhookId(id)
|
|
71
72
|
.setUser(appInstall.getUser())
|
|
73
|
+
.setSdk(appInstall.getSdk())
|
|
72
74
|
.setNode(unsubscribed.getNode())
|
|
73
75
|
.setToken(token)
|
|
74
76
|
.setApplication(appInstall.getName())
|