@orchesty/connector-upgates 1.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 +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +302 -0
- package/coverage/coverage-final.json +11 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/UpgatesCreateWebhooks.ts.html +358 -0
- package/coverage/lcov-report/src/Batch/UpgatesGetOrders.ts.html +727 -0
- package/coverage/lcov-report/src/Batch/UpgatesGetProducts.ts.html +733 -0
- package/coverage/lcov-report/src/Batch/index.html +146 -0
- package/coverage/lcov-report/src/Connector/UpgatesDeleteWebhooks.ts.html +370 -0
- package/coverage/lcov-report/src/Connector/UpgatesGetOrderStates.ts.html +190 -0
- package/coverage/lcov-report/src/Connector/UpgatesGetPayments.ts.html +268 -0
- package/coverage/lcov-report/src/Connector/UpgatesGetProductParameters.ts.html +316 -0
- package/coverage/lcov-report/src/Connector/UpgatesGetShipments.ts.html +274 -0
- package/coverage/lcov-report/src/Connector/index.html +176 -0
- package/coverage/lcov-report/src/UpgatesApplication.ts.html +379 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +223 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +485 -0
- package/dist/Batch/UpgatesCreateWebhooks.d.ts +17 -0
- package/dist/Batch/UpgatesCreateWebhooks.js +61 -0
- package/dist/Batch/UpgatesGetOrders.d.ts +148 -0
- package/dist/Batch/UpgatesGetOrders.js +51 -0
- package/dist/Batch/UpgatesGetProducts.d.ts +146 -0
- package/dist/Batch/UpgatesGetProducts.js +70 -0
- package/dist/Connector/UpgatesDeleteWebhooks.d.ts +15 -0
- package/dist/Connector/UpgatesDeleteWebhooks.js +62 -0
- package/dist/Connector/UpgatesGetOrderStates.d.ts +15 -0
- package/dist/Connector/UpgatesGetOrderStates.js +21 -0
- package/dist/Connector/UpgatesGetPayments.d.ts +38 -0
- package/dist/Connector/UpgatesGetPayments.js +21 -0
- package/dist/Connector/UpgatesGetProductParameters.d.ts +37 -0
- package/dist/Connector/UpgatesGetProductParameters.js +33 -0
- package/dist/Connector/UpgatesGetShipments.d.ts +40 -0
- package/dist/Connector/UpgatesGetShipments.js +21 -0
- package/dist/Connector/UpgatesUpdateOrder.d.ts +37 -0
- package/dist/Connector/UpgatesUpdateOrder.js +24 -0
- package/dist/Connector/UpgatesUpdateStock.d.ts +21 -0
- package/dist/Connector/UpgatesUpdateStock.js +24 -0
- package/dist/UpgatesApplication.d.ts +21 -0
- package/dist/UpgatesApplication.js +105 -0
- package/dist/package.json +27 -0
- package/jest.config.js +13 -0
- package/package.json +27 -0
- package/src/Batch/UpgatesCreateWebhooks.ts +91 -0
- package/src/Batch/UpgatesGetOrders.ts +214 -0
- package/src/Batch/UpgatesGetProducts.ts +216 -0
- package/src/Batch/__tests__/Data/UpgatesCreateWebhooks/input.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesCreateWebhooks/mock.json +14 -0
- package/src/Batch/__tests__/Data/UpgatesCreateWebhooks/output.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/input.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/lastRun-input.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/lastRun-mock.json +191 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/lastRun-output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/mock.json +191 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumber-input.json +8 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumber-mock.json +191 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumber-output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumbers-input.json +8 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumbers-mock.json +191 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/orderNumbers-output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetOrders/output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/input.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/lastRun-input.json +6 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/lastRun-mock.json +147 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/lastRun-output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/mock.json +146 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productId-input.json +8 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productId-mock.json +146 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productId-output.json +11 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productIds-input.json +8 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productIds-mock.json +146 -0
- package/src/Batch/__tests__/Data/UpgatesGetProducts/productIds-output.json +11 -0
- package/src/Batch/__tests__/UpgatesCreateWebhooks.ts +17 -0
- package/src/Batch/__tests__/UpgatesGetOrders.ts +33 -0
- package/src/Batch/__tests__/UpgatesGetProducts.ts +33 -0
- package/src/Connector/UpgatesDeleteWebhooks.ts +95 -0
- package/src/Connector/UpgatesGetOrderStates.ts +35 -0
- package/src/Connector/UpgatesGetPayments.ts +61 -0
- package/src/Connector/UpgatesGetProductParameters.ts +77 -0
- package/src/Connector/UpgatesGetShipments.ts +63 -0
- package/src/Connector/UpgatesUpdateOrder.ts +73 -0
- package/src/Connector/UpgatesUpdateStock.ts +59 -0
- package/src/Connector/__tests__/Data/UpgatesDeleteWebhooks/input.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesDeleteWebhooks/mock.json +16 -0
- package/src/Connector/__tests__/Data/UpgatesDeleteWebhooks/output.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetOrderStates/input.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetOrderStates/mock.json +14 -0
- package/src/Connector/__tests__/Data/UpgatesGetOrderStates/output.json +15 -0
- package/src/Connector/__tests__/Data/UpgatesGetPayments/input.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetPayments/mock.json +42 -0
- package/src/Connector/__tests__/Data/UpgatesGetPayments/output.json +43 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/both-input.json +9 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/both-mock.json +108 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/both-output.json +109 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/input.json +8 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/mock.json +108 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/none-input.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/none-mock.json +5 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/none-output.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetProductParameters/output.json +109 -0
- package/src/Connector/__tests__/Data/UpgatesGetShipments/input.json +6 -0
- package/src/Connector/__tests__/Data/UpgatesGetShipments/mock.json +58 -0
- package/src/Connector/__tests__/Data/UpgatesGetShipments/output.json +59 -0
- package/src/Connector/__tests__/UpgatesDeleteWebhooks.ts +61 -0
- package/src/Connector/__tests__/UpgatesGetOrderStates.ts +18 -0
- package/src/Connector/__tests__/UpgatesGetPayments.ts +18 -0
- package/src/Connector/__tests__/UpgatesGetProductParameters.ts +28 -0
- package/src/Connector/__tests__/UpgatesGetShipments.ts +18 -0
- package/src/UpgatesApplication.ts +98 -0
- package/test/dataProvider.ts +46 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
TN:
|
|
2
|
+
SF:src/UpgatesApplication.ts
|
|
3
|
+
FN:25,(anonymous_10)
|
|
4
|
+
FN:29,(anonymous_11)
|
|
5
|
+
FN:33,(anonymous_12)
|
|
6
|
+
FN:37,(anonymous_13)
|
|
7
|
+
FN:41,(anonymous_14)
|
|
8
|
+
FN:66,(anonymous_15)
|
|
9
|
+
FN:76,(anonymous_16)
|
|
10
|
+
FN:85,(anonymous_17)
|
|
11
|
+
FN:90,(anonymous_18)
|
|
12
|
+
FN:94,(anonymous_19)
|
|
13
|
+
FNF:10
|
|
14
|
+
FNH:5
|
|
15
|
+
FNDA:0,(anonymous_10)
|
|
16
|
+
FNDA:23,(anonymous_11)
|
|
17
|
+
FNDA:0,(anonymous_12)
|
|
18
|
+
FNDA:0,(anonymous_13)
|
|
19
|
+
FNDA:14,(anonymous_14)
|
|
20
|
+
FNDA:14,(anonymous_15)
|
|
21
|
+
FNDA:0,(anonymous_16)
|
|
22
|
+
FNDA:0,(anonymous_17)
|
|
23
|
+
FNDA:4,(anonymous_18)
|
|
24
|
+
FNDA:1,(anonymous_19)
|
|
25
|
+
DA:1,8
|
|
26
|
+
DA:3,8
|
|
27
|
+
DA:4,8
|
|
28
|
+
DA:5,8
|
|
29
|
+
DA:6,8
|
|
30
|
+
DA:8,8
|
|
31
|
+
DA:13,8
|
|
32
|
+
DA:14,8
|
|
33
|
+
DA:16,8
|
|
34
|
+
DA:17,8
|
|
35
|
+
DA:19,8
|
|
36
|
+
DA:21,8
|
|
37
|
+
DA:23,8
|
|
38
|
+
DA:26,0
|
|
39
|
+
DA:30,23
|
|
40
|
+
DA:34,0
|
|
41
|
+
DA:38,0
|
|
42
|
+
DA:48,14
|
|
43
|
+
DA:49,14
|
|
44
|
+
DA:52,14
|
|
45
|
+
DA:58,14
|
|
46
|
+
DA:59,14
|
|
47
|
+
DA:60,14
|
|
48
|
+
DA:63,14
|
|
49
|
+
DA:67,14
|
|
50
|
+
DA:68,14
|
|
51
|
+
DA:69,14
|
|
52
|
+
DA:70,0
|
|
53
|
+
DA:73,14
|
|
54
|
+
DA:77,0
|
|
55
|
+
DA:82,0
|
|
56
|
+
DA:86,0
|
|
57
|
+
DA:87,0
|
|
58
|
+
DA:91,4
|
|
59
|
+
DA:95,1
|
|
60
|
+
LF:35
|
|
61
|
+
LH:27
|
|
62
|
+
BRDA:58,0,0,14
|
|
63
|
+
BRDA:58,0,1,0
|
|
64
|
+
BRDA:59,1,0,14
|
|
65
|
+
BRDA:59,1,1,0
|
|
66
|
+
BRDA:67,2,0,14
|
|
67
|
+
BRDA:67,2,1,0
|
|
68
|
+
BRDA:69,3,0,0
|
|
69
|
+
BRDA:69,3,1,14
|
|
70
|
+
BRDA:87,4,0,0
|
|
71
|
+
BRDA:87,4,1,0
|
|
72
|
+
BRDA:87,4,2,0
|
|
73
|
+
BRDA:91,5,0,2
|
|
74
|
+
BRDA:91,5,1,2
|
|
75
|
+
BRF:13
|
|
76
|
+
BRH:6
|
|
77
|
+
end_of_record
|
|
78
|
+
TN:
|
|
79
|
+
SF:src/Batch/UpgatesCreateWebhooks.ts
|
|
80
|
+
FN:16,(anonymous_1)
|
|
81
|
+
FN:20,(anonymous_2)
|
|
82
|
+
FN:76,(anonymous_3)
|
|
83
|
+
FNF:3
|
|
84
|
+
FNH:2
|
|
85
|
+
FNDA:8,(anonymous_1)
|
|
86
|
+
FNDA:1,(anonymous_2)
|
|
87
|
+
FNDA:0,(anonymous_3)
|
|
88
|
+
DA:1,8
|
|
89
|
+
DA:2,8
|
|
90
|
+
DA:3,8
|
|
91
|
+
DA:4,8
|
|
92
|
+
DA:5,8
|
|
93
|
+
DA:7,8
|
|
94
|
+
DA:8,8
|
|
95
|
+
DA:11,8
|
|
96
|
+
DA:12,8
|
|
97
|
+
DA:14,8
|
|
98
|
+
DA:17,8
|
|
99
|
+
DA:21,1
|
|
100
|
+
DA:23,1
|
|
101
|
+
DA:24,1
|
|
102
|
+
DA:26,1
|
|
103
|
+
DA:27,0
|
|
104
|
+
DA:28,0
|
|
105
|
+
DA:30,0
|
|
106
|
+
DA:31,0
|
|
107
|
+
DA:48,0
|
|
108
|
+
DA:49,0
|
|
109
|
+
DA:50,0
|
|
110
|
+
DA:52,0
|
|
111
|
+
DA:61,0
|
|
112
|
+
DA:62,0
|
|
113
|
+
DA:66,0
|
|
114
|
+
DA:67,0
|
|
115
|
+
DA:69,0
|
|
116
|
+
DA:73,1
|
|
117
|
+
DA:77,0
|
|
118
|
+
LF:30
|
|
119
|
+
LH:16
|
|
120
|
+
BRDA:26,0,0,0
|
|
121
|
+
BRDA:26,0,1,1
|
|
122
|
+
BRDA:61,1,0,0
|
|
123
|
+
BRDA:61,1,1,0
|
|
124
|
+
BRDA:69,2,0,0
|
|
125
|
+
BRDA:69,2,1,0
|
|
126
|
+
BRF:6
|
|
127
|
+
BRH:1
|
|
128
|
+
end_of_record
|
|
129
|
+
TN:
|
|
130
|
+
SF:src/Batch/UpgatesGetOrders.ts
|
|
131
|
+
FN:13,(anonymous_1)
|
|
132
|
+
FN:17,(anonymous_2)
|
|
133
|
+
FNF:2
|
|
134
|
+
FNH:2
|
|
135
|
+
FNDA:8,(anonymous_1)
|
|
136
|
+
FNDA:4,(anonymous_2)
|
|
137
|
+
DA:1,8
|
|
138
|
+
DA:2,8
|
|
139
|
+
DA:4,8
|
|
140
|
+
DA:5,8
|
|
141
|
+
DA:7,8
|
|
142
|
+
DA:9,8
|
|
143
|
+
DA:11,8
|
|
144
|
+
DA:14,8
|
|
145
|
+
DA:18,4
|
|
146
|
+
DA:19,4
|
|
147
|
+
DA:21,4
|
|
148
|
+
DA:22,4
|
|
149
|
+
DA:26,4
|
|
150
|
+
DA:27,1
|
|
151
|
+
DA:28,3
|
|
152
|
+
DA:29,1
|
|
153
|
+
DA:31,2
|
|
154
|
+
DA:33,2
|
|
155
|
+
DA:34,2
|
|
156
|
+
DA:35,1
|
|
157
|
+
DA:39,4
|
|
158
|
+
DA:40,4
|
|
159
|
+
DA:46,4
|
|
160
|
+
DA:48,4
|
|
161
|
+
DA:49,0
|
|
162
|
+
DA:50,4
|
|
163
|
+
DA:51,3
|
|
164
|
+
DA:52,3
|
|
165
|
+
DA:53,3
|
|
166
|
+
DA:55,4
|
|
167
|
+
DA:57,4
|
|
168
|
+
LF:31
|
|
169
|
+
LH:30
|
|
170
|
+
BRDA:26,0,0,1
|
|
171
|
+
BRDA:26,0,1,3
|
|
172
|
+
BRDA:28,1,0,1
|
|
173
|
+
BRDA:28,1,1,2
|
|
174
|
+
BRDA:33,2,0,2
|
|
175
|
+
BRDA:33,2,1,2
|
|
176
|
+
BRDA:34,3,0,1
|
|
177
|
+
BRDA:34,3,1,1
|
|
178
|
+
BRDA:48,4,0,0
|
|
179
|
+
BRDA:48,4,1,4
|
|
180
|
+
BRDA:50,5,0,3
|
|
181
|
+
BRDA:50,5,1,1
|
|
182
|
+
BRF:12
|
|
183
|
+
BRH:11
|
|
184
|
+
end_of_record
|
|
185
|
+
TN:
|
|
186
|
+
SF:src/Batch/UpgatesGetProducts.ts
|
|
187
|
+
FN:13,(anonymous_1)
|
|
188
|
+
FN:17,(anonymous_2)
|
|
189
|
+
FN:198,(anonymous_3)
|
|
190
|
+
FN:205,(anonymous_4)
|
|
191
|
+
FNF:4
|
|
192
|
+
FNH:4
|
|
193
|
+
FNDA:8,(anonymous_1)
|
|
194
|
+
FNDA:4,(anonymous_2)
|
|
195
|
+
FNDA:8,(anonymous_3)
|
|
196
|
+
FNDA:8,(anonymous_4)
|
|
197
|
+
DA:1,8
|
|
198
|
+
DA:2,8
|
|
199
|
+
DA:4,8
|
|
200
|
+
DA:7,8
|
|
201
|
+
DA:9,8
|
|
202
|
+
DA:11,8
|
|
203
|
+
DA:14,8
|
|
204
|
+
DA:18,4
|
|
205
|
+
DA:19,4
|
|
206
|
+
DA:21,4
|
|
207
|
+
DA:22,4
|
|
208
|
+
DA:24,4
|
|
209
|
+
DA:26,4
|
|
210
|
+
DA:27,1
|
|
211
|
+
DA:28,3
|
|
212
|
+
DA:29,1
|
|
213
|
+
DA:31,2
|
|
214
|
+
DA:33,2
|
|
215
|
+
DA:34,2
|
|
216
|
+
DA:35,1
|
|
217
|
+
DA:38,4
|
|
218
|
+
DA:40,4
|
|
219
|
+
DA:41,4
|
|
220
|
+
DA:43,4
|
|
221
|
+
DA:44,0
|
|
222
|
+
DA:45,4
|
|
223
|
+
DA:46,3
|
|
224
|
+
DA:47,3
|
|
225
|
+
DA:48,3
|
|
226
|
+
DA:51,4
|
|
227
|
+
DA:53,4
|
|
228
|
+
DA:198,8
|
|
229
|
+
DA:199,8
|
|
230
|
+
DA:200,8
|
|
231
|
+
DA:201,8
|
|
232
|
+
DA:202,8
|
|
233
|
+
DA:205,8
|
|
234
|
+
DA:206,8
|
|
235
|
+
DA:207,8
|
|
236
|
+
DA:208,8
|
|
237
|
+
DA:209,8
|
|
238
|
+
DA:210,8
|
|
239
|
+
DA:211,8
|
|
240
|
+
DA:212,8
|
|
241
|
+
DA:213,8
|
|
242
|
+
DA:214,8
|
|
243
|
+
DA:215,8
|
|
244
|
+
LF:47
|
|
245
|
+
LH:46
|
|
246
|
+
BRDA:26,0,0,1
|
|
247
|
+
BRDA:26,0,1,3
|
|
248
|
+
BRDA:28,1,0,1
|
|
249
|
+
BRDA:28,1,1,2
|
|
250
|
+
BRDA:33,2,0,2
|
|
251
|
+
BRDA:33,2,1,2
|
|
252
|
+
BRDA:34,3,0,1
|
|
253
|
+
BRDA:34,3,1,1
|
|
254
|
+
BRDA:43,4,0,0
|
|
255
|
+
BRDA:43,4,1,4
|
|
256
|
+
BRDA:45,5,0,3
|
|
257
|
+
BRDA:45,5,1,1
|
|
258
|
+
BRDA:198,6,0,8
|
|
259
|
+
BRDA:198,6,1,8
|
|
260
|
+
BRDA:205,7,0,8
|
|
261
|
+
BRDA:205,7,1,8
|
|
262
|
+
BRF:16
|
|
263
|
+
BRH:15
|
|
264
|
+
end_of_record
|
|
265
|
+
TN:
|
|
266
|
+
SF:src/Connector/UpgatesDeleteWebhooks.ts
|
|
267
|
+
FN:16,(anonymous_1)
|
|
268
|
+
FN:20,(anonymous_2)
|
|
269
|
+
FN:33,(anonymous_3)
|
|
270
|
+
FN:37,(anonymous_4)
|
|
271
|
+
FN:51,(anonymous_5)
|
|
272
|
+
FN:62,(anonymous_6)
|
|
273
|
+
FN:64,(anonymous_7)
|
|
274
|
+
FNF:7
|
|
275
|
+
FNH:6
|
|
276
|
+
FNDA:8,(anonymous_1)
|
|
277
|
+
FNDA:1,(anonymous_2)
|
|
278
|
+
FNDA:2,(anonymous_3)
|
|
279
|
+
FNDA:1,(anonymous_4)
|
|
280
|
+
FNDA:0,(anonymous_5)
|
|
281
|
+
FNDA:1,(anonymous_6)
|
|
282
|
+
FNDA:1,(anonymous_7)
|
|
283
|
+
DA:2,8
|
|
284
|
+
DA:4,8
|
|
285
|
+
DA:5,8
|
|
286
|
+
DA:6,8
|
|
287
|
+
DA:8,8
|
|
288
|
+
DA:11,8
|
|
289
|
+
DA:12,8
|
|
290
|
+
DA:14,8
|
|
291
|
+
DA:17,8
|
|
292
|
+
DA:21,1
|
|
293
|
+
DA:24,1
|
|
294
|
+
DA:25,1
|
|
295
|
+
DA:28,0
|
|
296
|
+
DA:31,1
|
|
297
|
+
DA:32,1
|
|
298
|
+
DA:33,2
|
|
299
|
+
DA:35,1
|
|
300
|
+
DA:37,1
|
|
301
|
+
DA:38,1
|
|
302
|
+
DA:41,1
|
|
303
|
+
DA:42,1
|
|
304
|
+
DA:48,1
|
|
305
|
+
DA:49,1
|
|
306
|
+
DA:50,0
|
|
307
|
+
DA:52,0
|
|
308
|
+
DA:53,0
|
|
309
|
+
DA:56,0
|
|
310
|
+
DA:59,1
|
|
311
|
+
DA:60,1
|
|
312
|
+
DA:61,1
|
|
313
|
+
DA:63,1
|
|
314
|
+
DA:64,1
|
|
315
|
+
DA:66,1
|
|
316
|
+
DA:67,1
|
|
317
|
+
DA:70,0
|
|
318
|
+
DA:71,0
|
|
319
|
+
DA:72,0
|
|
320
|
+
DA:76,1
|
|
321
|
+
DA:77,0
|
|
322
|
+
DA:81,1
|
|
323
|
+
LF:40
|
|
324
|
+
LH:31
|
|
325
|
+
BRDA:41,0,0,1
|
|
326
|
+
BRDA:41,0,1,0
|
|
327
|
+
BRDA:41,1,0,1
|
|
328
|
+
BRDA:41,1,1,1
|
|
329
|
+
BRDA:49,2,0,0
|
|
330
|
+
BRDA:49,2,1,1
|
|
331
|
+
BRDA:49,3,0,1
|
|
332
|
+
BRDA:49,3,1,0
|
|
333
|
+
BRDA:66,4,0,1
|
|
334
|
+
BRDA:66,4,1,0
|
|
335
|
+
BRDA:76,5,0,0
|
|
336
|
+
BRDA:76,5,1,1
|
|
337
|
+
BRF:12
|
|
338
|
+
BRH:7
|
|
339
|
+
end_of_record
|
|
340
|
+
TN:
|
|
341
|
+
SF:src/Connector/UpgatesGetOrderStates.ts
|
|
342
|
+
FN:10,(anonymous_1)
|
|
343
|
+
FN:14,(anonymous_2)
|
|
344
|
+
FNF:2
|
|
345
|
+
FNH:2
|
|
346
|
+
FNDA:8,(anonymous_1)
|
|
347
|
+
FNDA:1,(anonymous_2)
|
|
348
|
+
DA:1,8
|
|
349
|
+
DA:2,8
|
|
350
|
+
DA:5,8
|
|
351
|
+
DA:6,8
|
|
352
|
+
DA:8,8
|
|
353
|
+
DA:11,8
|
|
354
|
+
DA:15,1
|
|
355
|
+
DA:21,1
|
|
356
|
+
DA:23,1
|
|
357
|
+
LF:9
|
|
358
|
+
LH:9
|
|
359
|
+
BRF:0
|
|
360
|
+
BRH:0
|
|
361
|
+
end_of_record
|
|
362
|
+
TN:
|
|
363
|
+
SF:src/Connector/UpgatesGetPayments.ts
|
|
364
|
+
FN:10,(anonymous_1)
|
|
365
|
+
FN:14,(anonymous_2)
|
|
366
|
+
FNF:2
|
|
367
|
+
FNH:2
|
|
368
|
+
FNDA:8,(anonymous_1)
|
|
369
|
+
FNDA:1,(anonymous_2)
|
|
370
|
+
DA:1,8
|
|
371
|
+
DA:2,8
|
|
372
|
+
DA:5,8
|
|
373
|
+
DA:6,8
|
|
374
|
+
DA:8,8
|
|
375
|
+
DA:11,8
|
|
376
|
+
DA:15,1
|
|
377
|
+
DA:21,1
|
|
378
|
+
DA:23,1
|
|
379
|
+
LF:9
|
|
380
|
+
LH:9
|
|
381
|
+
BRF:0
|
|
382
|
+
BRH:0
|
|
383
|
+
end_of_record
|
|
384
|
+
TN:
|
|
385
|
+
SF:src/Connector/UpgatesGetProductParameters.ts
|
|
386
|
+
FN:10,(anonymous_1)
|
|
387
|
+
FN:14,(anonymous_2)
|
|
388
|
+
FNF:2
|
|
389
|
+
FNH:2
|
|
390
|
+
FNDA:8,(anonymous_1)
|
|
391
|
+
FNDA:3,(anonymous_2)
|
|
392
|
+
DA:1,8
|
|
393
|
+
DA:2,8
|
|
394
|
+
DA:5,8
|
|
395
|
+
DA:6,8
|
|
396
|
+
DA:8,8
|
|
397
|
+
DA:11,8
|
|
398
|
+
DA:15,3
|
|
399
|
+
DA:17,3
|
|
400
|
+
DA:18,1
|
|
401
|
+
DA:21,2
|
|
402
|
+
DA:22,2
|
|
403
|
+
DA:23,1
|
|
404
|
+
DA:26,2
|
|
405
|
+
DA:27,2
|
|
406
|
+
DA:28,2
|
|
407
|
+
DA:31,2
|
|
408
|
+
DA:37,2
|
|
409
|
+
DA:39,2
|
|
410
|
+
LF:18
|
|
411
|
+
LH:18
|
|
412
|
+
BRDA:17,0,0,1
|
|
413
|
+
BRDA:17,0,1,2
|
|
414
|
+
BRDA:17,1,0,3
|
|
415
|
+
BRDA:17,1,1,2
|
|
416
|
+
BRDA:22,2,0,1
|
|
417
|
+
BRDA:22,2,1,1
|
|
418
|
+
BRDA:26,3,0,2
|
|
419
|
+
BRDA:26,3,1,0
|
|
420
|
+
BRDA:27,4,0,1
|
|
421
|
+
BRDA:27,4,1,1
|
|
422
|
+
BRF:10
|
|
423
|
+
BRH:9
|
|
424
|
+
end_of_record
|
|
425
|
+
TN:
|
|
426
|
+
SF:src/Connector/UpgatesGetShipments.ts
|
|
427
|
+
FN:10,(anonymous_1)
|
|
428
|
+
FN:14,(anonymous_2)
|
|
429
|
+
FNF:2
|
|
430
|
+
FNH:2
|
|
431
|
+
FNDA:8,(anonymous_1)
|
|
432
|
+
FNDA:1,(anonymous_2)
|
|
433
|
+
DA:1,8
|
|
434
|
+
DA:2,8
|
|
435
|
+
DA:5,8
|
|
436
|
+
DA:6,8
|
|
437
|
+
DA:8,8
|
|
438
|
+
DA:11,8
|
|
439
|
+
DA:15,1
|
|
440
|
+
DA:21,1
|
|
441
|
+
DA:23,1
|
|
442
|
+
LF:9
|
|
443
|
+
LH:9
|
|
444
|
+
BRF:0
|
|
445
|
+
BRH:0
|
|
446
|
+
end_of_record
|
|
447
|
+
TN:
|
|
448
|
+
SF:test/dataProvider.ts
|
|
449
|
+
FN:19,mock
|
|
450
|
+
FN:34,init
|
|
451
|
+
FNF:2
|
|
452
|
+
FNH:2
|
|
453
|
+
FNDA:15,mock
|
|
454
|
+
FNDA:8,init
|
|
455
|
+
DA:1,8
|
|
456
|
+
DA:2,8
|
|
457
|
+
DA:3,8
|
|
458
|
+
DA:8,8
|
|
459
|
+
DA:9,8
|
|
460
|
+
DA:10,8
|
|
461
|
+
DA:11,8
|
|
462
|
+
DA:12,8
|
|
463
|
+
DA:13,8
|
|
464
|
+
DA:14,8
|
|
465
|
+
DA:15,8
|
|
466
|
+
DA:16,8
|
|
467
|
+
DA:17,8
|
|
468
|
+
DA:19,8
|
|
469
|
+
DA:20,15
|
|
470
|
+
DA:34,8
|
|
471
|
+
DA:35,8
|
|
472
|
+
DA:36,8
|
|
473
|
+
DA:38,8
|
|
474
|
+
DA:39,8
|
|
475
|
+
DA:40,8
|
|
476
|
+
DA:41,8
|
|
477
|
+
DA:42,8
|
|
478
|
+
DA:43,8
|
|
479
|
+
DA:44,8
|
|
480
|
+
DA:45,8
|
|
481
|
+
LF:26
|
|
482
|
+
LH:26
|
|
483
|
+
BRF:0
|
|
484
|
+
BRH:0
|
|
485
|
+
end_of_record
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
3
|
+
export declare const NAME = "upgates-create-webhooks";
|
|
4
|
+
export default class UpgatesCreateWebhooks extends ABatchNode {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: BatchProcessDto): Promise<BatchProcessDto>;
|
|
7
|
+
private getRandomToken;
|
|
8
|
+
}
|
|
9
|
+
export interface IResponse {
|
|
10
|
+
webhook: {
|
|
11
|
+
id: number;
|
|
12
|
+
active_yn: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
url: string;
|
|
15
|
+
event: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 ApplicationInstall_1 = require("@orchesty/nodejs-sdk/dist/lib/Application/Database/ApplicationInstall");
|
|
8
|
+
const Webhook_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Application/Database/Webhook"));
|
|
9
|
+
const ABatchNode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode"));
|
|
10
|
+
const TopologyRunner_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Topology/TopologyRunner"));
|
|
11
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
12
|
+
const ResultCode_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Utils/ResultCode"));
|
|
13
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
14
|
+
exports.NAME = 'upgates-create-webhooks';
|
|
15
|
+
const UPGATES_CREATE_WEBHOOK_ENDPOINT = 'api/v2/webhooks';
|
|
16
|
+
class UpgatesCreateWebhooks extends ABatchNode_1.default {
|
|
17
|
+
getName() {
|
|
18
|
+
return exports.NAME;
|
|
19
|
+
}
|
|
20
|
+
async processAction(dto) {
|
|
21
|
+
const app = this.getApplication();
|
|
22
|
+
const webhookIndex = Number(dto.getBatchCursor('0'));
|
|
23
|
+
const webhooks = app.getWebhookSubscriptions();
|
|
24
|
+
if (webhooks.length > 0) {
|
|
25
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
26
|
+
const repo = this.getDbClient().getRepository(Webhook_1.default);
|
|
27
|
+
const token = this.getRandomToken();
|
|
28
|
+
const requestDto = app.getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.POST, UPGATES_CREATE_WEBHOOK_ENDPOINT, JSON.stringify({
|
|
29
|
+
name: webhooks[webhookIndex].getName(),
|
|
30
|
+
event: webhooks[webhookIndex].getName(),
|
|
31
|
+
url: TopologyRunner_1.default.getWebhookUrl(webhooks[webhookIndex].getTopology(), webhooks[webhookIndex].getNode(), token),
|
|
32
|
+
}));
|
|
33
|
+
let res;
|
|
34
|
+
try {
|
|
35
|
+
res = await this.getSender().send(requestDto);
|
|
36
|
+
const respBody = res.getJsonBody();
|
|
37
|
+
await repo.insert(new Webhook_1.default()
|
|
38
|
+
.setWebhookId(respBody.webhook.id.toString())
|
|
39
|
+
.setUser(appInstall.getUser())
|
|
40
|
+
.setNode(webhooks[webhookIndex].getNode())
|
|
41
|
+
.setToken(token)
|
|
42
|
+
.setApplication(app.getName())
|
|
43
|
+
.setTopology(webhooks[webhookIndex].getTopology())
|
|
44
|
+
.setName(webhooks[webhookIndex].getName()));
|
|
45
|
+
if (webhooks.length - 1 > webhookIndex) {
|
|
46
|
+
dto.setBatchCursor((webhookIndex + 1).toString());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
appInstall.setEnabled(false);
|
|
51
|
+
await this.getDbClient().getRepository(ApplicationInstall_1.ApplicationInstall).update(appInstall);
|
|
52
|
+
dto.setStopProcess(ResultCode_1.default.STOP_AND_FAILED, res?.getBody() ?? 'Webhook could not be registered!');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return dto;
|
|
56
|
+
}
|
|
57
|
+
getRandomToken() {
|
|
58
|
+
return crypto_1.default.randomBytes(64).toString('hex');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.default = UpgatesCreateWebhooks;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import ABatchNode from '@orchesty/nodejs-sdk/dist/lib/Batch/ABatchNode';
|
|
2
|
+
import BatchProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/BatchProcessDto';
|
|
3
|
+
export declare const NAME: string;
|
|
4
|
+
export default class UpgatesGetOrders extends ABatchNode {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: BatchProcessDto<IInput>): Promise<BatchProcessDto>;
|
|
7
|
+
}
|
|
8
|
+
export interface IInput {
|
|
9
|
+
from?: string;
|
|
10
|
+
orderNumber?: string;
|
|
11
|
+
orderNumbers?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IOrder {
|
|
14
|
+
order_number: string;
|
|
15
|
+
external_order_number: string;
|
|
16
|
+
language_id: string;
|
|
17
|
+
prices_with_vat_yn: string;
|
|
18
|
+
status_id: string;
|
|
19
|
+
currency_id: string;
|
|
20
|
+
status: string;
|
|
21
|
+
paid_date: string;
|
|
22
|
+
tracking_code: string;
|
|
23
|
+
resolved_yn: string;
|
|
24
|
+
internal_note: string;
|
|
25
|
+
last_update_time: string;
|
|
26
|
+
creation_time: string;
|
|
27
|
+
variable_symbol: string;
|
|
28
|
+
total_weight: string;
|
|
29
|
+
order_total: string;
|
|
30
|
+
order_total_before_round: string;
|
|
31
|
+
order_total_rest: string;
|
|
32
|
+
invoice_number: string;
|
|
33
|
+
origin: string;
|
|
34
|
+
customer: {
|
|
35
|
+
email: string;
|
|
36
|
+
phone: string;
|
|
37
|
+
firstname_invoice: string;
|
|
38
|
+
surname_invoice: string;
|
|
39
|
+
street_invoice: string;
|
|
40
|
+
city_invoice: string;
|
|
41
|
+
state_invoice: string;
|
|
42
|
+
zip_invoice: string;
|
|
43
|
+
country_id_invoice: string;
|
|
44
|
+
postal_yn: string;
|
|
45
|
+
firstname_postal: string;
|
|
46
|
+
surname_postal: string;
|
|
47
|
+
street_postal: string;
|
|
48
|
+
city_postal: string;
|
|
49
|
+
state_postal: string;
|
|
50
|
+
zip_postal: string;
|
|
51
|
+
country_id_postal: string;
|
|
52
|
+
company_postal: string;
|
|
53
|
+
company_yn: string;
|
|
54
|
+
company: string;
|
|
55
|
+
ico: string;
|
|
56
|
+
dic: string;
|
|
57
|
+
vat_payer_yn: string;
|
|
58
|
+
customer_note: string;
|
|
59
|
+
agreements: {
|
|
60
|
+
name: string;
|
|
61
|
+
valid_to: string;
|
|
62
|
+
status: string;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
products: {
|
|
66
|
+
product_id: string;
|
|
67
|
+
option_set_id: string;
|
|
68
|
+
code: string;
|
|
69
|
+
code_supplier: string;
|
|
70
|
+
ean: string;
|
|
71
|
+
title: string;
|
|
72
|
+
unit: string;
|
|
73
|
+
quantity: string;
|
|
74
|
+
price_per_unit: string;
|
|
75
|
+
price: string;
|
|
76
|
+
price_with_vat: string;
|
|
77
|
+
price_without_vat: string;
|
|
78
|
+
vat: string;
|
|
79
|
+
buy_price: string;
|
|
80
|
+
weight: string;
|
|
81
|
+
invoice_info: string;
|
|
82
|
+
parameters: {
|
|
83
|
+
name: string;
|
|
84
|
+
value: string;
|
|
85
|
+
}[];
|
|
86
|
+
configurations: {
|
|
87
|
+
name: string;
|
|
88
|
+
values: {
|
|
89
|
+
value: string;
|
|
90
|
+
operation: string;
|
|
91
|
+
price: string;
|
|
92
|
+
}[];
|
|
93
|
+
}[];
|
|
94
|
+
}[];
|
|
95
|
+
discount_voucher: {
|
|
96
|
+
code: string;
|
|
97
|
+
type: string;
|
|
98
|
+
amount: string;
|
|
99
|
+
discounts: {
|
|
100
|
+
vat: string;
|
|
101
|
+
price: string;
|
|
102
|
+
}[];
|
|
103
|
+
};
|
|
104
|
+
quantity_discount: {
|
|
105
|
+
type: string;
|
|
106
|
+
amount: string;
|
|
107
|
+
discounts: {
|
|
108
|
+
vat: string;
|
|
109
|
+
price: string;
|
|
110
|
+
}[];
|
|
111
|
+
};
|
|
112
|
+
loyalty_points: {
|
|
113
|
+
one_point_for: string;
|
|
114
|
+
amount: string;
|
|
115
|
+
discounts: {
|
|
116
|
+
vat: string;
|
|
117
|
+
price: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
shipment: {
|
|
121
|
+
id: number;
|
|
122
|
+
code: string;
|
|
123
|
+
name: string;
|
|
124
|
+
price: string;
|
|
125
|
+
vat: string;
|
|
126
|
+
affiliate_id: string;
|
|
127
|
+
affiliate_name: string;
|
|
128
|
+
};
|
|
129
|
+
payment: {
|
|
130
|
+
id: number;
|
|
131
|
+
code: string;
|
|
132
|
+
name: string;
|
|
133
|
+
price: string;
|
|
134
|
+
vat: string;
|
|
135
|
+
eet_yn: string;
|
|
136
|
+
};
|
|
137
|
+
metas: {
|
|
138
|
+
key: string;
|
|
139
|
+
type: string;
|
|
140
|
+
value: string;
|
|
141
|
+
values: {
|
|
142
|
+
cs: {
|
|
143
|
+
language: string;
|
|
144
|
+
value: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}[];
|
|
148
|
+
}
|