@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,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://private-anon-903e641b16-upgatesapiv2.apiary-mock.com/api/v2/products?page=1",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"current_page": 0,
|
|
6
|
+
"current_page_items": 0,
|
|
7
|
+
"number_of_pages": 0,
|
|
8
|
+
"number_of_items": 0,
|
|
9
|
+
"products": [
|
|
10
|
+
{
|
|
11
|
+
"code": "",
|
|
12
|
+
"code_supplier": "",
|
|
13
|
+
"supplier": "",
|
|
14
|
+
"ean": "",
|
|
15
|
+
"product_id": 0,
|
|
16
|
+
"active_yn": false,
|
|
17
|
+
"archived_yn": false,
|
|
18
|
+
"replacement_product_code": "",
|
|
19
|
+
"can_add_to_basket_yn": false,
|
|
20
|
+
"adult_yn": false,
|
|
21
|
+
"descriptions": [
|
|
22
|
+
{
|
|
23
|
+
"language": "",
|
|
24
|
+
"title": "",
|
|
25
|
+
"short_description": "",
|
|
26
|
+
"long_description": "",
|
|
27
|
+
"url": "",
|
|
28
|
+
"seo_title": "",
|
|
29
|
+
"seo_description": "",
|
|
30
|
+
"seo_url": "",
|
|
31
|
+
"unit": ""
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"manufacturer": "",
|
|
35
|
+
"stock": 0,
|
|
36
|
+
"stock_position": "",
|
|
37
|
+
"availability": "",
|
|
38
|
+
"availability_type": "OnRequest",
|
|
39
|
+
"weight": 0,
|
|
40
|
+
"shipment_group": "",
|
|
41
|
+
"images": [
|
|
42
|
+
{
|
|
43
|
+
"url": "",
|
|
44
|
+
"main_yn": false,
|
|
45
|
+
"list_yn": false,
|
|
46
|
+
"position": 0,
|
|
47
|
+
"titles": [{}, "language", "title"]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"categories": [
|
|
51
|
+
{
|
|
52
|
+
"category_id": 0,
|
|
53
|
+
"code": "",
|
|
54
|
+
"main_yn": false,
|
|
55
|
+
"position": 0,
|
|
56
|
+
"name": ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"groups": [],
|
|
60
|
+
"prices": [
|
|
61
|
+
{
|
|
62
|
+
"language": "",
|
|
63
|
+
"currency": "",
|
|
64
|
+
"pricelists": [
|
|
65
|
+
{
|
|
66
|
+
"name": "",
|
|
67
|
+
"price_original": 0,
|
|
68
|
+
"product_discount": 0,
|
|
69
|
+
"product_discount_real`": "",
|
|
70
|
+
"price_sale": 0,
|
|
71
|
+
"price_with_vat`": "",
|
|
72
|
+
"price_without_vat`": ""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"price_purchase": 0,
|
|
76
|
+
"price_common": 0,
|
|
77
|
+
"recycling_fee": 0
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"vats": {},
|
|
81
|
+
"variants": [
|
|
82
|
+
{
|
|
83
|
+
"code": "",
|
|
84
|
+
"code_supplier": "",
|
|
85
|
+
"ean": "",
|
|
86
|
+
"variant_id": 0,
|
|
87
|
+
"active_yn": false,
|
|
88
|
+
"can_add_to_basket_yn": false,
|
|
89
|
+
"stock": 0,
|
|
90
|
+
"stock_position": "",
|
|
91
|
+
"availability": "",
|
|
92
|
+
"availability_type": "OnRequest",
|
|
93
|
+
"weight": "",
|
|
94
|
+
"image": "",
|
|
95
|
+
"prices": [
|
|
96
|
+
{
|
|
97
|
+
"language": "",
|
|
98
|
+
"currency": "",
|
|
99
|
+
"pricelists": [
|
|
100
|
+
{
|
|
101
|
+
"name": "",
|
|
102
|
+
"price_original": 0,
|
|
103
|
+
"product_discount": 0,
|
|
104
|
+
"product_discount_real`": "",
|
|
105
|
+
"price_sale": 0,
|
|
106
|
+
"price_with_vat`": "",
|
|
107
|
+
"price_without_vat`": ""
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"price_purchase": 0,
|
|
111
|
+
"price_common": 0
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"metas": [
|
|
115
|
+
{
|
|
116
|
+
"key": "",
|
|
117
|
+
"type": "radio",
|
|
118
|
+
"value": "",
|
|
119
|
+
"values": [
|
|
120
|
+
{
|
|
121
|
+
"language": "",
|
|
122
|
+
"value": ""
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"metas": [
|
|
130
|
+
{
|
|
131
|
+
"key": "",
|
|
132
|
+
"type": "radio",
|
|
133
|
+
"value": "",
|
|
134
|
+
"values": [
|
|
135
|
+
{
|
|
136
|
+
"language": "",
|
|
137
|
+
"value": ""
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"admin_url": ""
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"body": "{\"code\":\"\",\"code_supplier\":\"\",\"supplier\":\"\",\"ean\":\"\",\"product_id\":0,\"active_yn\":false,\"archived_yn\":false,\"replacement_product_code\":\"\",\"can_add_to_basket_yn\":false,\"adult_yn\":false,\"descriptions\":[{\"language\":\"\",\"title\":\"\",\"short_description\":\"\",\"long_description\":\"\",\"url\":\"\",\"seo_title\":\"\",\"seo_description\":\"\",\"seo_url\":\"\",\"unit\":\"\"}],\"manufacturer\":\"\",\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":0,\"shipment_group\":\"\",\"images\":[{\"url\":\"\",\"main_yn\":false,\"list_yn\":false,\"position\":0,\"titles\":[{},\"language\",\"title\"]}],\"categories\":[{\"category_id\":0,\"code\":\"\",\"main_yn\":false,\"position\":0,\"name\":\"\"}],\"groups\":[],\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0,\"recycling_fee\":0}],\"vats\":{},\"variants\":[{\"code\":\"\",\"code_supplier\":\"\",\"ean\":\"\",\"variant_id\":0,\"active_yn\":false,\"can_add_to_basket_yn\":false,\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":\"\",\"image\":\"\",\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}]}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}],\"admin_url\":\"\"}",
|
|
8
|
+
"headers": {}
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://private-anon-903e641b16-upgatesapiv2.apiary-mock.com/api/v2/products?product_id=1",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"current_page": 0,
|
|
6
|
+
"current_page_items": 0,
|
|
7
|
+
"number_of_pages": 0,
|
|
8
|
+
"number_of_items": 0,
|
|
9
|
+
"products": [
|
|
10
|
+
{
|
|
11
|
+
"code": "",
|
|
12
|
+
"code_supplier": "",
|
|
13
|
+
"supplier": "",
|
|
14
|
+
"ean": "",
|
|
15
|
+
"product_id": 0,
|
|
16
|
+
"active_yn": false,
|
|
17
|
+
"archived_yn": false,
|
|
18
|
+
"replacement_product_code": "",
|
|
19
|
+
"can_add_to_basket_yn": false,
|
|
20
|
+
"adult_yn": false,
|
|
21
|
+
"descriptions": [
|
|
22
|
+
{
|
|
23
|
+
"language": "",
|
|
24
|
+
"title": "",
|
|
25
|
+
"short_description": "",
|
|
26
|
+
"long_description": "",
|
|
27
|
+
"url": "",
|
|
28
|
+
"seo_title": "",
|
|
29
|
+
"seo_description": "",
|
|
30
|
+
"seo_url": "",
|
|
31
|
+
"unit": ""
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"manufacturer": "",
|
|
35
|
+
"stock": 0,
|
|
36
|
+
"stock_position": "",
|
|
37
|
+
"availability": "",
|
|
38
|
+
"availability_type": "OnRequest",
|
|
39
|
+
"weight": 0,
|
|
40
|
+
"shipment_group": "",
|
|
41
|
+
"images": [
|
|
42
|
+
{
|
|
43
|
+
"url": "",
|
|
44
|
+
"main_yn": false,
|
|
45
|
+
"list_yn": false,
|
|
46
|
+
"position": 0,
|
|
47
|
+
"titles": [{}, "language", "title"]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"categories": [
|
|
51
|
+
{
|
|
52
|
+
"category_id": 0,
|
|
53
|
+
"code": "",
|
|
54
|
+
"main_yn": false,
|
|
55
|
+
"position": 0,
|
|
56
|
+
"name": ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"groups": [],
|
|
60
|
+
"prices": [
|
|
61
|
+
{
|
|
62
|
+
"language": "",
|
|
63
|
+
"currency": "",
|
|
64
|
+
"pricelists": [
|
|
65
|
+
{
|
|
66
|
+
"name": "",
|
|
67
|
+
"price_original": 0,
|
|
68
|
+
"product_discount": 0,
|
|
69
|
+
"product_discount_real`": "",
|
|
70
|
+
"price_sale": 0,
|
|
71
|
+
"price_with_vat`": "",
|
|
72
|
+
"price_without_vat`": ""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"price_purchase": 0,
|
|
76
|
+
"price_common": 0,
|
|
77
|
+
"recycling_fee": 0
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"vats": {},
|
|
81
|
+
"variants": [
|
|
82
|
+
{
|
|
83
|
+
"code": "",
|
|
84
|
+
"code_supplier": "",
|
|
85
|
+
"ean": "",
|
|
86
|
+
"variant_id": 0,
|
|
87
|
+
"active_yn": false,
|
|
88
|
+
"can_add_to_basket_yn": false,
|
|
89
|
+
"stock": 0,
|
|
90
|
+
"stock_position": "",
|
|
91
|
+
"availability": "",
|
|
92
|
+
"availability_type": "OnRequest",
|
|
93
|
+
"weight": "",
|
|
94
|
+
"image": "",
|
|
95
|
+
"prices": [
|
|
96
|
+
{
|
|
97
|
+
"language": "",
|
|
98
|
+
"currency": "",
|
|
99
|
+
"pricelists": [
|
|
100
|
+
{
|
|
101
|
+
"name": "",
|
|
102
|
+
"price_original": 0,
|
|
103
|
+
"product_discount": 0,
|
|
104
|
+
"product_discount_real`": "",
|
|
105
|
+
"price_sale": 0,
|
|
106
|
+
"price_with_vat`": "",
|
|
107
|
+
"price_without_vat`": ""
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"price_purchase": 0,
|
|
111
|
+
"price_common": 0
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"metas": [
|
|
115
|
+
{
|
|
116
|
+
"key": "",
|
|
117
|
+
"type": "radio",
|
|
118
|
+
"value": "",
|
|
119
|
+
"values": [
|
|
120
|
+
{
|
|
121
|
+
"language": "",
|
|
122
|
+
"value": ""
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"metas": [
|
|
130
|
+
{
|
|
131
|
+
"key": "",
|
|
132
|
+
"type": "radio",
|
|
133
|
+
"value": "",
|
|
134
|
+
"values": [
|
|
135
|
+
{
|
|
136
|
+
"language": "",
|
|
137
|
+
"value": ""
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"admin_url": ""
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"body": "{\"code\":\"\",\"code_supplier\":\"\",\"supplier\":\"\",\"ean\":\"\",\"product_id\":0,\"active_yn\":false,\"archived_yn\":false,\"replacement_product_code\":\"\",\"can_add_to_basket_yn\":false,\"adult_yn\":false,\"descriptions\":[{\"language\":\"\",\"title\":\"\",\"short_description\":\"\",\"long_description\":\"\",\"url\":\"\",\"seo_title\":\"\",\"seo_description\":\"\",\"seo_url\":\"\",\"unit\":\"\"}],\"manufacturer\":\"\",\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":0,\"shipment_group\":\"\",\"images\":[{\"url\":\"\",\"main_yn\":false,\"list_yn\":false,\"position\":0,\"titles\":[{},\"language\",\"title\"]}],\"categories\":[{\"category_id\":0,\"code\":\"\",\"main_yn\":false,\"position\":0,\"name\":\"\"}],\"groups\":[],\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0,\"recycling_fee\":0}],\"vats\":{},\"variants\":[{\"code\":\"\",\"code_supplier\":\"\",\"ean\":\"\",\"variant_id\":0,\"active_yn\":false,\"can_add_to_basket_yn\":false,\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":\"\",\"image\":\"\",\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}]}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}],\"admin_url\":\"\"}",
|
|
8
|
+
"headers": {}
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://private-anon-903e641b16-upgatesapiv2.apiary-mock.com/api/v2/products?product_ids=1;2",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"current_page": 0,
|
|
6
|
+
"current_page_items": 0,
|
|
7
|
+
"number_of_pages": 0,
|
|
8
|
+
"number_of_items": 0,
|
|
9
|
+
"products": [
|
|
10
|
+
{
|
|
11
|
+
"code": "",
|
|
12
|
+
"code_supplier": "",
|
|
13
|
+
"supplier": "",
|
|
14
|
+
"ean": "",
|
|
15
|
+
"product_id": 0,
|
|
16
|
+
"active_yn": false,
|
|
17
|
+
"archived_yn": false,
|
|
18
|
+
"replacement_product_code": "",
|
|
19
|
+
"can_add_to_basket_yn": false,
|
|
20
|
+
"adult_yn": false,
|
|
21
|
+
"descriptions": [
|
|
22
|
+
{
|
|
23
|
+
"language": "",
|
|
24
|
+
"title": "",
|
|
25
|
+
"short_description": "",
|
|
26
|
+
"long_description": "",
|
|
27
|
+
"url": "",
|
|
28
|
+
"seo_title": "",
|
|
29
|
+
"seo_description": "",
|
|
30
|
+
"seo_url": "",
|
|
31
|
+
"unit": ""
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"manufacturer": "",
|
|
35
|
+
"stock": 0,
|
|
36
|
+
"stock_position": "",
|
|
37
|
+
"availability": "",
|
|
38
|
+
"availability_type": "OnRequest",
|
|
39
|
+
"weight": 0,
|
|
40
|
+
"shipment_group": "",
|
|
41
|
+
"images": [
|
|
42
|
+
{
|
|
43
|
+
"url": "",
|
|
44
|
+
"main_yn": false,
|
|
45
|
+
"list_yn": false,
|
|
46
|
+
"position": 0,
|
|
47
|
+
"titles": [{}, "language", "title"]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"categories": [
|
|
51
|
+
{
|
|
52
|
+
"category_id": 0,
|
|
53
|
+
"code": "",
|
|
54
|
+
"main_yn": false,
|
|
55
|
+
"position": 0,
|
|
56
|
+
"name": ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"groups": [],
|
|
60
|
+
"prices": [
|
|
61
|
+
{
|
|
62
|
+
"language": "",
|
|
63
|
+
"currency": "",
|
|
64
|
+
"pricelists": [
|
|
65
|
+
{
|
|
66
|
+
"name": "",
|
|
67
|
+
"price_original": 0,
|
|
68
|
+
"product_discount": 0,
|
|
69
|
+
"product_discount_real`": "",
|
|
70
|
+
"price_sale": 0,
|
|
71
|
+
"price_with_vat`": "",
|
|
72
|
+
"price_without_vat`": ""
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"price_purchase": 0,
|
|
76
|
+
"price_common": 0,
|
|
77
|
+
"recycling_fee": 0
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"vats": {},
|
|
81
|
+
"variants": [
|
|
82
|
+
{
|
|
83
|
+
"code": "",
|
|
84
|
+
"code_supplier": "",
|
|
85
|
+
"ean": "",
|
|
86
|
+
"variant_id": 0,
|
|
87
|
+
"active_yn": false,
|
|
88
|
+
"can_add_to_basket_yn": false,
|
|
89
|
+
"stock": 0,
|
|
90
|
+
"stock_position": "",
|
|
91
|
+
"availability": "",
|
|
92
|
+
"availability_type": "OnRequest",
|
|
93
|
+
"weight": "",
|
|
94
|
+
"image": "",
|
|
95
|
+
"prices": [
|
|
96
|
+
{
|
|
97
|
+
"language": "",
|
|
98
|
+
"currency": "",
|
|
99
|
+
"pricelists": [
|
|
100
|
+
{
|
|
101
|
+
"name": "",
|
|
102
|
+
"price_original": 0,
|
|
103
|
+
"product_discount": 0,
|
|
104
|
+
"product_discount_real`": "",
|
|
105
|
+
"price_sale": 0,
|
|
106
|
+
"price_with_vat`": "",
|
|
107
|
+
"price_without_vat`": ""
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"price_purchase": 0,
|
|
111
|
+
"price_common": 0
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"metas": [
|
|
115
|
+
{
|
|
116
|
+
"key": "",
|
|
117
|
+
"type": "radio",
|
|
118
|
+
"value": "",
|
|
119
|
+
"values": [
|
|
120
|
+
{
|
|
121
|
+
"language": "",
|
|
122
|
+
"value": ""
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"metas": [
|
|
130
|
+
{
|
|
131
|
+
"key": "",
|
|
132
|
+
"type": "radio",
|
|
133
|
+
"value": "",
|
|
134
|
+
"values": [
|
|
135
|
+
{
|
|
136
|
+
"language": "",
|
|
137
|
+
"value": ""
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"admin_url": ""
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"body": "{\"code\":\"\",\"code_supplier\":\"\",\"supplier\":\"\",\"ean\":\"\",\"product_id\":0,\"active_yn\":false,\"archived_yn\":false,\"replacement_product_code\":\"\",\"can_add_to_basket_yn\":false,\"adult_yn\":false,\"descriptions\":[{\"language\":\"\",\"title\":\"\",\"short_description\":\"\",\"long_description\":\"\",\"url\":\"\",\"seo_title\":\"\",\"seo_description\":\"\",\"seo_url\":\"\",\"unit\":\"\"}],\"manufacturer\":\"\",\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":0,\"shipment_group\":\"\",\"images\":[{\"url\":\"\",\"main_yn\":false,\"list_yn\":false,\"position\":0,\"titles\":[{},\"language\",\"title\"]}],\"categories\":[{\"category_id\":0,\"code\":\"\",\"main_yn\":false,\"position\":0,\"name\":\"\"}],\"groups\":[],\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0,\"recycling_fee\":0}],\"vats\":{},\"variants\":[{\"code\":\"\",\"code_supplier\":\"\",\"ean\":\"\",\"variant_id\":0,\"active_yn\":false,\"can_add_to_basket_yn\":false,\"stock\":0,\"stock_position\":\"\",\"availability\":\"\",\"availability_type\":\"OnRequest\",\"weight\":\"\",\"image\":\"\",\"prices\":[{\"language\":\"\",\"currency\":\"\",\"pricelists\":[{\"name\":\"\",\"price_original\":0,\"product_discount\":0,\"product_discount_real`\":\"\",\"price_sale\":0,\"price_with_vat`\":\"\",\"price_without_vat`\":\"\"}],\"price_purchase\":0,\"price_common\":0}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}]}],\"metas\":[{\"key\":\"\",\"type\":\"radio\",\"value\":\"\",\"values\":[{\"language\":\"\",\"value\":\"\"}]}],\"admin_url\":\"\"}",
|
|
8
|
+
"headers": {}
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { init } from '../../../test/dataProvider';
|
|
4
|
+
import { NAME as UPGATES_CREATE_WEBHOOKS } from '../UpgatesCreateWebhooks';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for UpgatesCreateWebhooks', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
init();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(UPGATES_CREATE_WEBHOOKS);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { init, mock } from '../../../test/dataProvider';
|
|
4
|
+
import { NAME as UPGATES_GET_ORDERS } from '../UpgatesGetOrders';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for UpgatesGetOrders', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
init();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
mock();
|
|
16
|
+
await tester.testBatch(UPGATES_GET_ORDERS);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('process - lastRun', async () => {
|
|
20
|
+
mock({ orderLastRun: '2022-09-22T08:21:27.000Z' });
|
|
21
|
+
await tester.testBatch(UPGATES_GET_ORDERS, 'lastRun');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('process - orderNumber', async () => {
|
|
25
|
+
mock();
|
|
26
|
+
await tester.testBatch(UPGATES_GET_ORDERS, 'orderNumber');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('process - orderNumbers', async () => {
|
|
30
|
+
mock();
|
|
31
|
+
await tester.testBatch(UPGATES_GET_ORDERS, 'orderNumbers');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { init, mock } from '../../../test/dataProvider';
|
|
4
|
+
import { NAME as UPGATES_GET_PRODUCTS } from '../UpgatesGetProducts';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for UpgatesGetProducts', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
init();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
mock();
|
|
16
|
+
await tester.testBatch(UPGATES_GET_PRODUCTS);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('process - lastRun', async () => {
|
|
20
|
+
mock({ productLastRun: '2022-09-22T08:21:27.000Z' });
|
|
21
|
+
await tester.testBatch(UPGATES_GET_PRODUCTS, 'lastRun');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('process - productId', async () => {
|
|
25
|
+
mock();
|
|
26
|
+
await tester.testBatch(UPGATES_GET_PRODUCTS, 'productId');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('process - productIds', async () => {
|
|
30
|
+
mock();
|
|
31
|
+
await tester.testBatch(UPGATES_GET_PRODUCTS, 'productIds');
|
|
32
|
+
});
|
|
33
|
+
});
|