idosell 0.1.7 → 0.1.9
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/README.md +19 -1
- package/dist/gates.def.js +295 -55
- package/dist/gates.js +60 -8
- package/dist/helpers.js +8 -0
- package/dist/methods/deleteConfigVariables.js +6 -0
- package/dist/methods/deleteCpa.js +6 -0
- package/dist/methods/deleteCpaCampaign.js +6 -0
- package/dist/methods/deleteSnippets.js +6 -0
- package/dist/methods/deleteSnippetsCampaign.js +6 -0
- package/dist/methods/deleteSnippetsCookies.js +6 -0
- package/dist/methods/getConfigVariables.js +6 -0
- package/dist/methods/getCpa.js +6 -0
- package/dist/methods/getCpaCampaign.js +6 -0
- package/dist/methods/getEntriesSources.js +6 -0
- package/dist/methods/getPackages.js +6 -0
- package/dist/methods/getProductsAuctions.js +1 -1
- package/dist/methods/getProductsDeliveryTime.js +5 -0
- package/dist/methods/getProductsMarketingZones.js +10 -0
- package/dist/methods/getProductsOmnibusPrices.js +9 -0
- package/dist/methods/getProductsStrikethroughPrices.js +10 -0
- package/dist/methods/getSnippets.js +6 -0
- package/dist/methods/getSnippetsCampaign.js +6 -0
- package/dist/methods/getSnippetsCookies.js +6 -0
- package/dist/methods/postCpa.js +6 -0
- package/dist/methods/postCpaCampaign.js +6 -0
- package/dist/methods/postOrdersDocumentsCreate.js +6 -0
- package/dist/methods/postReturns.js +11 -0
- package/dist/methods/postSnippets.js +6 -0
- package/dist/methods/postSnippetsCampaign.js +6 -0
- package/dist/methods/postSnippetsCookies.js +6 -0
- package/dist/methods/putConfigVariables.js +6 -0
- package/dist/methods/putCpa.js +6 -0
- package/dist/methods/putCpaCampaign.js +6 -0
- package/dist/methods/putSnippets.js +6 -0
- package/dist/methods/putSnippetsCampaign.js +6 -0
- package/dist/methods/putSnippetsCookies.js +6 -0
- package/dist/params.js +3 -1
- package/package.json +1 -1
- package/tests/getEntriesSources.test.js +7 -0
- package/tests/getPackages.test.js +17 -0
- package/tests/getProductsDeliveryTime.test.js +17 -0
- package/tests/getProductsMarketingZones.test.js +17 -0
- package/tests/getProductsOmnibusPrices.test.js +17 -0
- package/tests/getProductsStrikethroughPrices.test.js +17 -0
- package/tests/postOrdersDocumentsCreate.test.js +7 -0
- package/tests/postReturns.test.js +12 -0
package/dist/gates.js
CHANGED
|
@@ -45,12 +45,23 @@ import deleteClientsTags from "./methods/deleteClientsTags.js";
|
|
|
45
45
|
import getClientsTags from "./methods/getClientsTags.js";
|
|
46
46
|
import postClientsTags from "./methods/postClientsTags.js";
|
|
47
47
|
import putClientsTags from "./methods/putClientsTags.js";
|
|
48
|
+
import getConfigVariables from "./methods/getConfigVariables.js";
|
|
49
|
+
import putConfigVariables from "./methods/putConfigVariables.js";
|
|
50
|
+
import deleteConfigVariables from "./methods/deleteConfigVariables.js";
|
|
48
51
|
import getCouriersAssignedToShippingProfiles from "./methods/getCouriersAssignedToShippingProfiles.js";
|
|
49
52
|
import getCouriers from "./methods/getCouriers.js";
|
|
50
53
|
import deleteCouriersPickupPoints from "./methods/deleteCouriersPickupPoints.js";
|
|
51
54
|
import getCouriersPickupPoints from "./methods/getCouriersPickupPoints.js";
|
|
52
55
|
import postCouriersPickupPoints from "./methods/postCouriersPickupPoints.js";
|
|
53
56
|
import putCouriersPickupPoints from "./methods/putCouriersPickupPoints.js";
|
|
57
|
+
import getCpaCampaign from "./methods/getCpaCampaign.js";
|
|
58
|
+
import postCpaCampaign from "./methods/postCpaCampaign.js";
|
|
59
|
+
import putCpaCampaign from "./methods/putCpaCampaign.js";
|
|
60
|
+
import deleteCpaCampaign from "./methods/deleteCpaCampaign.js";
|
|
61
|
+
import getCpa from "./methods/getCpa.js";
|
|
62
|
+
import postCpa from "./methods/postCpa.js";
|
|
63
|
+
import putCpa from "./methods/putCpa.js";
|
|
64
|
+
import deleteCpa from "./methods/deleteCpa.js";
|
|
54
65
|
import putDeliveriesDefaultProfiles from "./methods/putDeliveriesDefaultProfiles.js";
|
|
55
66
|
import getDeliveriesProfiles from "./methods/getDeliveriesProfiles.js";
|
|
56
67
|
import getDeliveriesRegions from "./methods/getDeliveriesRegions.js";
|
|
@@ -73,6 +84,7 @@ import getEntries from "./methods/getEntries.js";
|
|
|
73
84
|
import postEntries from "./methods/postEntries.js";
|
|
74
85
|
import putEntries from "./methods/putEntries.js";
|
|
75
86
|
import getEntriesPagesToDisplay from "./methods/getEntriesPagesToDisplay.js";
|
|
87
|
+
import getEntriesSources from "./methods/getEntriesSources.js";
|
|
76
88
|
import getMenuFilter from "./methods/getMenuFilter.js";
|
|
77
89
|
import putMenuFilter from "./methods/putMenuFilter.js";
|
|
78
90
|
import deleteMenu from "./methods/deleteMenu.js";
|
|
@@ -86,6 +98,7 @@ import putOrdersClient from "./methods/putOrdersClient.js";
|
|
|
86
98
|
import putOrdersCourier from "./methods/putOrdersCourier.js";
|
|
87
99
|
import putOrdersDeliveryAddress from "./methods/putOrdersDeliveryAddress.js";
|
|
88
100
|
import putOrdersDevide from "./methods/putOrdersDevide.js";
|
|
101
|
+
import postOrdersDocumentsCreate from "./methods/postOrdersDocumentsCreate.js";
|
|
89
102
|
import deleteOrdersDocuments from "./methods/deleteOrdersDocuments.js";
|
|
90
103
|
import getOrdersDocuments from "./methods/getOrdersDocuments.js";
|
|
91
104
|
import postOrdersDocuments from "./methods/postOrdersDocuments.js";
|
|
@@ -134,11 +147,11 @@ import getProductsSKUbyBarcode from "./methods/getProductsSKUbyBarcode.js";
|
|
|
134
147
|
import putProductsAttachments from "./methods/putProductsAttachments.js";
|
|
135
148
|
import getProductsAuctions from "./methods/getProductsAuctions.js";
|
|
136
149
|
import deleteProductsBrands from "./methods/deleteProductsBrands.js";
|
|
150
|
+
import getProductsBrandsFilter from "./methods/getProductsBrandsFilter.js";
|
|
151
|
+
import putProductsBrandsFilter from "./methods/putProductsBrandsFilter.js";
|
|
137
152
|
import getProductsBrands from "./methods/getProductsBrands.js";
|
|
138
153
|
import postProductsBrands from "./methods/postProductsBrands.js";
|
|
139
154
|
import putProductsBrands from "./methods/putProductsBrands.js";
|
|
140
|
-
import getProductsBrandsFilter from "./methods/getProductsBrandsFilter.js";
|
|
141
|
-
import putProductsBrandsFilter from "./methods/putProductsBrandsFilter.js";
|
|
142
155
|
import postProductsBundles from "./methods/postProductsBundles.js";
|
|
143
156
|
import deleteProductsBundlesProducts from "./methods/deleteProductsBundlesProducts.js";
|
|
144
157
|
import postProductsBundlesProducts from "./methods/postProductsBundlesProducts.js";
|
|
@@ -193,10 +206,10 @@ import putProductsQuestions from "./methods/putProductsQuestions.js";
|
|
|
193
206
|
import getProductsReservations from "./methods/getProductsReservations.js";
|
|
194
207
|
import postProductsRestore from "./methods/postProductsRestore.js";
|
|
195
208
|
import deleteProductsSeries from "./methods/deleteProductsSeries.js";
|
|
196
|
-
import getProductsSeries from "./methods/getProductsSeries.js";
|
|
197
|
-
import putProductsSeries from "./methods/putProductsSeries.js";
|
|
198
209
|
import getProductsSeriesFilter from "./methods/getProductsSeriesFilter.js";
|
|
199
210
|
import putProductsSeriesFilter from "./methods/putProductsSeriesFilter.js";
|
|
211
|
+
import getProductsSeries from "./methods/getProductsSeries.js";
|
|
212
|
+
import putProductsSeries from "./methods/putProductsSeries.js";
|
|
200
213
|
import deleteProductsSizes from "./methods/deleteProductsSizes.js";
|
|
201
214
|
import getProductsSizes from "./methods/getProductsSizes.js";
|
|
202
215
|
import putProductsSizes from "./methods/putProductsSizes.js";
|
|
@@ -219,6 +232,7 @@ import getRefundsGetRefundStatus from "./methods/getRefundsGetRefundStatus.js";
|
|
|
219
232
|
import getRefundsRetrieveRefundsList from "./methods/getRefundsRetrieveRefundsList.js";
|
|
220
233
|
import putRefundsUpdateRefund from "./methods/putRefundsUpdateRefund.js";
|
|
221
234
|
import getReturns from "./methods/getReturns.js";
|
|
235
|
+
import postReturns from "./methods/postReturns.js";
|
|
222
236
|
import putReturns from "./methods/putReturns.js";
|
|
223
237
|
import putReturnsSerialNumber from "./methods/putReturnsSerialNumber.js";
|
|
224
238
|
import getReturnsStatuses from "./methods/getReturnsStatuses.js";
|
|
@@ -230,6 +244,18 @@ import getSizecharts from "./methods/getSizecharts.js";
|
|
|
230
244
|
import putSizecharts from "./methods/putSizecharts.js";
|
|
231
245
|
import getSizes from "./methods/getSizes.js";
|
|
232
246
|
import putSizes from "./methods/putSizes.js";
|
|
247
|
+
import getSnippetsCampaign from "./methods/getSnippetsCampaign.js";
|
|
248
|
+
import postSnippetsCampaign from "./methods/postSnippetsCampaign.js";
|
|
249
|
+
import putSnippetsCampaign from "./methods/putSnippetsCampaign.js";
|
|
250
|
+
import deleteSnippetsCampaign from "./methods/deleteSnippetsCampaign.js";
|
|
251
|
+
import getSnippetsCookies from "./methods/getSnippetsCookies.js";
|
|
252
|
+
import postSnippetsCookies from "./methods/postSnippetsCookies.js";
|
|
253
|
+
import putSnippetsCookies from "./methods/putSnippetsCookies.js";
|
|
254
|
+
import deleteSnippetsCookies from "./methods/deleteSnippetsCookies.js";
|
|
255
|
+
import getSnippets from "./methods/getSnippets.js";
|
|
256
|
+
import postSnippets from "./methods/postSnippets.js";
|
|
257
|
+
import putSnippets from "./methods/putSnippets.js";
|
|
258
|
+
import deleteSnippets from "./methods/deleteSnippets.js";
|
|
233
259
|
import getSystemConfig from "./methods/getSystemConfig.js";
|
|
234
260
|
import putSystemConfig from "./methods/putSystemConfig.js";
|
|
235
261
|
import getSystemCurrencies from "./methods/getSystemCurrencies.js";
|
|
@@ -320,12 +346,23 @@ const gates = {
|
|
|
320
346
|
getClientsTags,
|
|
321
347
|
postClientsTags,
|
|
322
348
|
putClientsTags,
|
|
349
|
+
getConfigVariables,
|
|
350
|
+
putConfigVariables,
|
|
351
|
+
deleteConfigVariables,
|
|
323
352
|
getCouriersAssignedToShippingProfiles,
|
|
324
353
|
getCouriers,
|
|
325
354
|
deleteCouriersPickupPoints,
|
|
326
355
|
getCouriersPickupPoints,
|
|
327
356
|
postCouriersPickupPoints,
|
|
328
357
|
putCouriersPickupPoints,
|
|
358
|
+
getCpaCampaign,
|
|
359
|
+
postCpaCampaign,
|
|
360
|
+
putCpaCampaign,
|
|
361
|
+
deleteCpaCampaign,
|
|
362
|
+
getCpa,
|
|
363
|
+
postCpa,
|
|
364
|
+
putCpa,
|
|
365
|
+
deleteCpa,
|
|
329
366
|
putDeliveriesDefaultProfiles,
|
|
330
367
|
getDeliveriesProfiles,
|
|
331
368
|
getDeliveriesRegions,
|
|
@@ -348,6 +385,7 @@ const gates = {
|
|
|
348
385
|
postEntries,
|
|
349
386
|
putEntries,
|
|
350
387
|
getEntriesPagesToDisplay,
|
|
388
|
+
getEntriesSources,
|
|
351
389
|
getMenuFilter,
|
|
352
390
|
putMenuFilter,
|
|
353
391
|
deleteMenu,
|
|
@@ -361,6 +399,7 @@ const gates = {
|
|
|
361
399
|
putOrdersCourier,
|
|
362
400
|
putOrdersDeliveryAddress,
|
|
363
401
|
putOrdersDevide,
|
|
402
|
+
postOrdersDocumentsCreate,
|
|
364
403
|
deleteOrdersDocuments,
|
|
365
404
|
getOrdersDocuments,
|
|
366
405
|
postOrdersDocuments,
|
|
@@ -409,11 +448,11 @@ const gates = {
|
|
|
409
448
|
putProductsAttachments,
|
|
410
449
|
getProductsAuctions,
|
|
411
450
|
deleteProductsBrands,
|
|
451
|
+
getProductsBrandsFilter,
|
|
452
|
+
putProductsBrandsFilter,
|
|
412
453
|
getProductsBrands,
|
|
413
454
|
postProductsBrands,
|
|
414
455
|
putProductsBrands,
|
|
415
|
-
getProductsBrandsFilter,
|
|
416
|
-
putProductsBrandsFilter,
|
|
417
456
|
postProductsBundles,
|
|
418
457
|
deleteProductsBundlesProducts,
|
|
419
458
|
postProductsBundlesProducts,
|
|
@@ -468,10 +507,10 @@ const gates = {
|
|
|
468
507
|
getProductsReservations,
|
|
469
508
|
postProductsRestore,
|
|
470
509
|
deleteProductsSeries,
|
|
471
|
-
getProductsSeries,
|
|
472
|
-
putProductsSeries,
|
|
473
510
|
getProductsSeriesFilter,
|
|
474
511
|
putProductsSeriesFilter,
|
|
512
|
+
getProductsSeries,
|
|
513
|
+
putProductsSeries,
|
|
475
514
|
deleteProductsSizes,
|
|
476
515
|
getProductsSizes,
|
|
477
516
|
putProductsSizes,
|
|
@@ -494,6 +533,7 @@ const gates = {
|
|
|
494
533
|
getRefundsRetrieveRefundsList,
|
|
495
534
|
putRefundsUpdateRefund,
|
|
496
535
|
getReturns,
|
|
536
|
+
postReturns,
|
|
497
537
|
putReturns,
|
|
498
538
|
putReturnsSerialNumber,
|
|
499
539
|
getReturnsStatuses,
|
|
@@ -505,6 +545,18 @@ const gates = {
|
|
|
505
545
|
putSizecharts,
|
|
506
546
|
getSizes,
|
|
507
547
|
putSizes,
|
|
548
|
+
getSnippetsCampaign,
|
|
549
|
+
postSnippetsCampaign,
|
|
550
|
+
putSnippetsCampaign,
|
|
551
|
+
deleteSnippetsCampaign,
|
|
552
|
+
getSnippetsCookies,
|
|
553
|
+
postSnippetsCookies,
|
|
554
|
+
putSnippetsCookies,
|
|
555
|
+
deleteSnippetsCookies,
|
|
556
|
+
getSnippets,
|
|
557
|
+
postSnippets,
|
|
558
|
+
putSnippets,
|
|
559
|
+
deleteSnippets,
|
|
508
560
|
getSystemConfig,
|
|
509
561
|
putSystemConfig,
|
|
510
562
|
getSystemCurrencies,
|
package/dist/helpers.js
CHANGED
|
@@ -164,6 +164,14 @@ export const modifyPrice = (value, type, net, priceChangeMode = 'amount_set') =>
|
|
|
164
164
|
return params;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
export const getProductIdent = (productId, sizeId, type = 'id') => {
|
|
168
|
+
const params = { ident: { type, value: productId }};
|
|
169
|
+
if (sizeId) {
|
|
170
|
+
params.sizes = [{ ident: { type, value: sizeId }}]
|
|
171
|
+
}
|
|
172
|
+
return params;
|
|
173
|
+
}
|
|
174
|
+
|
|
167
175
|
const TEXT_NODES = {
|
|
168
176
|
name: {
|
|
169
177
|
main: 'productNames',
|
|
@@ -2,6 +2,12 @@ import { paramsProxy } from "../params.js";
|
|
|
2
2
|
|
|
3
3
|
export default (object) => {
|
|
4
4
|
object.gate = { method: 'get', node: '/packages/packages' };
|
|
5
|
+
object.auth.version = 1;
|
|
6
|
+
object.custom = {
|
|
7
|
+
orders: (orderSerialNumbers) => ({ eventType: "order", eventsIds: Array.isArray(orderSerialNumbers) ? orderSerialNumbers : [orderSerialNumbers] }),
|
|
8
|
+
rma: (rmaIds) => ({ eventType: "rma", eventsIds: Array.isArray(rmaIds) ? rmaIds : [rmaIds] }),
|
|
9
|
+
returns: (returnIds) => ({ eventType: "return", eventsIds: Array.isArray(returnIds) ? returnIds : [returnIds] })
|
|
10
|
+
};
|
|
5
11
|
object.appendable = {
|
|
6
12
|
except: ["deliveryPackageNumbers","returnLabels"],
|
|
7
13
|
arrayNode: "events",
|
|
@@ -5,7 +5,7 @@ export default (object) => {
|
|
|
5
5
|
object.gate = { method: 'get', node: '/products/auctions' };
|
|
6
6
|
object.custom = {
|
|
7
7
|
ids: arrayOfObjects("products", "identValue", {"identType":"id"}),
|
|
8
|
-
fromAllegro: () => { const auctionSites = object.params.
|
|
8
|
+
fromAllegro: () => { const auctionSites = object.params[object.appendable.index]; console.log("auctionSites"); auctionSites.push("allegro"); return { auctionSites }},
|
|
9
9
|
page
|
|
10
10
|
};
|
|
11
11
|
return new Proxy(object, paramsProxy);
|
|
@@ -2,5 +2,10 @@ import { paramsProxy } from "../params.js";
|
|
|
2
2
|
|
|
3
3
|
export default (object) => {
|
|
4
4
|
object.gate = { method: 'get', node: '/products/deliveryTime' };
|
|
5
|
+
object.appendable = {
|
|
6
|
+
except: [],
|
|
7
|
+
arrayNode: "products",
|
|
8
|
+
index: 0
|
|
9
|
+
}
|
|
5
10
|
return new Proxy(object, paramsProxy);
|
|
6
11
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { getProductIdent } from "../helpers.js";
|
|
2
3
|
|
|
3
4
|
export default (object) => {
|
|
4
5
|
object.gate = { method: 'get', node: '/products/marketingZones' };
|
|
6
|
+
object.auth.version = 1;
|
|
7
|
+
object.custom = {
|
|
8
|
+
productId: getProductIdent
|
|
9
|
+
};
|
|
10
|
+
object.appendable = {
|
|
11
|
+
except: [],
|
|
12
|
+
arrayNode: "products",
|
|
13
|
+
index: 0
|
|
14
|
+
}
|
|
5
15
|
return new Proxy(object, paramsProxy);
|
|
6
16
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { getProductIdent } from "../helpers.js";
|
|
2
3
|
|
|
3
4
|
export default (object) => {
|
|
4
5
|
object.gate = { method: 'get', node: '/products/omnibusPrices' };
|
|
6
|
+
object.custom = {
|
|
7
|
+
productId: getProductIdent
|
|
8
|
+
};
|
|
9
|
+
object.appendable = {
|
|
10
|
+
except: [],
|
|
11
|
+
arrayNode: "products",
|
|
12
|
+
index: 0
|
|
13
|
+
}
|
|
5
14
|
return new Proxy(object, paramsProxy);
|
|
6
15
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { paramsProxy } from "../params.js";
|
|
2
|
+
import { getProductIdent } from "../helpers.js";
|
|
2
3
|
|
|
3
4
|
export default (object) => {
|
|
4
5
|
object.gate = { method: 'get', node: '/products/strikethroughPrices' };
|
|
6
|
+
object.auth.version = 1;
|
|
7
|
+
object.custom = {
|
|
8
|
+
productId: getProductIdent
|
|
9
|
+
};
|
|
10
|
+
object.appendable = {
|
|
11
|
+
except: [],
|
|
12
|
+
arrayNode: "products",
|
|
13
|
+
index: 0
|
|
14
|
+
}
|
|
5
15
|
return new Proxy(object, paramsProxy);
|
|
6
16
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { paramsProxy } from "../params.js";
|
|
2
|
+
|
|
3
|
+
export default (object) => {
|
|
4
|
+
object.gate = { method: 'post', node: '/returns/returns' };
|
|
5
|
+
object.appendable = {
|
|
6
|
+
except: ["order_sn","stock_id","status","client_received","change_status","courier_id","return_operator","tryCorrectInvoice","include_shipping_cost","additional_payment_cost","emptyReturn"],
|
|
7
|
+
arrayNode: "products",
|
|
8
|
+
index: 0
|
|
9
|
+
}
|
|
10
|
+
return new Proxy(object, paramsProxy);
|
|
11
|
+
}
|
package/dist/params.js
CHANGED
|
@@ -35,7 +35,9 @@ export const paramsProxy = {
|
|
|
35
35
|
const param = object.custom[property](...values);
|
|
36
36
|
Object.assign(object.params, param);
|
|
37
37
|
}
|
|
38
|
-
else
|
|
38
|
+
else if (property === 'params') {
|
|
39
|
+
object.params = params;
|
|
40
|
+
} else object.params[property] = values[0];
|
|
39
41
|
return new Proxy(object, paramsProxy);
|
|
40
42
|
}
|
|
41
43
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("getPackagesOrders", () => {
|
|
5
|
+
const params = idosell().getPackages.orders([15,16]).getParams();
|
|
6
|
+
expect(params).toEqual({"events":[{"eventType":"order","eventsIds":[15,16]}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("getPackagesReturns", () => {
|
|
10
|
+
const params = idosell().getPackages.returns([2]).getParams();
|
|
11
|
+
expect(params).toEqual({"events":[{"eventType":"return","eventsIds":[2]}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("getPackagesRma", () => {
|
|
15
|
+
const params = idosell().getPackages.rma([1]).getParams();
|
|
16
|
+
expect(params).toEqual({"events":[{"eventType":"rma","eventsIds":[1]}]});
|
|
17
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("getProductsDeliveryTimeId", () => {
|
|
5
|
+
const params = idosell().getProductsDeliveryTime.productId(15).sizeId(4).getParams();
|
|
6
|
+
expect(params).toEqual({"products":[{"productId":15,"sizeId":4}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("getProductsDeliveryTimeProductSizeQuantity", () => {
|
|
10
|
+
const params = idosell().getProductsDeliveryTime.productId(15).sizeId(4).productSizeQuantity(3).getParams();
|
|
11
|
+
expect(params).toEqual({"products":[{"productId":15,"sizeId":4,"productSizeQuantity":3}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("getProductsDeliveryTimeProductIndex", () => {
|
|
15
|
+
const params = idosell().getProductsDeliveryTime.productIndex("15-4").getParams();
|
|
16
|
+
expect(params).toEqual({"products":[{"productIndex":"15-4"}]});
|
|
17
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("getProductsMarketingZonesProductOnlyId", () => {
|
|
5
|
+
const params = idosell().getProductsMarketingZones.productId(33).getParams();
|
|
6
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":33}}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("getProductsMarketingZonesSizeId", () => {
|
|
10
|
+
const params = idosell().getProductsMarketingZones.productId(15,4).getParams();
|
|
11
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("getProductsMarketingZonesProducts", () => {
|
|
15
|
+
const params = idosell().getProductsMarketingZones.products([{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]).getParams();
|
|
16
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
17
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("getProductsOmnibusPricesProductOnlyId", () => {
|
|
5
|
+
const params = idosell().getProductsOmnibusPrices.productId(33).getParams();
|
|
6
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":33}}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("getProductsOmnibusPricesProductId", () => {
|
|
10
|
+
const params = idosell().getProductsOmnibusPrices.productId(15,4).getParams();
|
|
11
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("getProductsOmnibusPricesProducts", () => {
|
|
15
|
+
const params = idosell().getProductsOmnibusPrices.products([{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]).getParams();
|
|
16
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
17
|
+
})
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("getProductsStrikethroughPricesProductOnlyId", () => {
|
|
5
|
+
const params = idosell().getProductsStrikethroughPrices.productId(33).getParams();
|
|
6
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":33}}]});
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
test("getProductsStrikethroughPricesProductSizeId", () => {
|
|
10
|
+
const params = idosell().getProductsStrikethroughPrices.productId(15,4).getParams();
|
|
11
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
test("getProductsStrikethroughPricesProducts", () => {
|
|
15
|
+
const params = idosell().getProductsStrikethroughPrices.products([{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]).getParams();
|
|
16
|
+
expect(params).toEqual({"products":[{"ident":{"type":"id","value":15},"sizes":[{"ident":{"type":"id","value":4}}]}]});
|
|
17
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import idosell from "./dist/index.js"
|
|
2
|
+
import { expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
test("postOrdersDocumentsCreateActualize", () => {
|
|
5
|
+
const params = idosell().postOrdersDocumentsCreate.orderSerialNumbers([86]).documentType("vat_invoice").actualize(false).getParams();
|
|
6
|
+
expect(params).toEqual({"orderSerialNumbers":[86],"documentType":"vat_invoice","actualize":false});
|
|
7
|
+
})
|