idosell 0.3.13 → 0.3.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/changelog.md +7 -0
  2. package/dist/app.d.ts +1 -1
  3. package/dist/gateways.d.ts +23 -10
  4. package/dist/helpers.js +21 -0
  5. package/dist/methods/getOrdersAuctionDetails.js +3 -3
  6. package/dist/methods/getProductsAuctions.js +2 -2
  7. package/dist/methods/postEntries.js +1 -1
  8. package/dist/methods/postOrdersDocuments.js +3 -0
  9. package/dist/methods/putClients.js +1 -1
  10. package/dist/methods/putProductsOmnibusPrices.js +6 -0
  11. package/dist/methods/putProductsStrikethroughPrices.js +8 -1
  12. package/dist/methods/searchOrders.js +2 -2
  13. package/dist/methods/searchOrdersUnfinished.js +2 -2
  14. package/dist/methods/searchPackages.js +2 -1
  15. package/dist/methods/searchProducts.js +2 -2
  16. package/dist/methods/searchProductsDeliveryTime.js +1 -1
  17. package/dist/request.js +8 -6
  18. package/package.json +1 -1
  19. package/tests/getClientsPayerAddress.test.js +2 -2
  20. package/tests/getClientsPricelistsProducts.test.js +2 -2
  21. package/tests/getCouriers.test.js +3 -2
  22. package/tests/getCouriersPickupPoints.test.js +4 -4
  23. package/tests/getMenu.test.js +4 -4
  24. package/tests/getMenuFilter.test.js +3 -3
  25. package/tests/getOrdersAuctionDetails.test.js +13 -3
  26. package/tests/getOrdersExportdocumentsEPP.test.js +6 -16
  27. package/tests/getOrdersExportdocumentsJPK.test.js +2 -2
  28. package/tests/getOrdersOpinionsRate.test.js +3 -3
  29. package/tests/getOrdersPackages.test.js +5 -5
  30. package/tests/getPayments.test.js +4 -9
  31. package/tests/getProductsAuctions.test.js +8 -2
  32. package/tests/getProductsBrandsFilter.test.js +4 -3
  33. package/tests/getProductsOpinionsRate.test.js +2 -2
  34. package/tests/getProductsProductsToFacebookCatalog.test.js +4 -3
  35. package/tests/getProductsSeriesFilter.test.js +3 -2
  36. package/tests/getReturns.test.js +2 -2
  37. package/tests/getWmsLocations.test.js +2 -2
  38. package/tests/getWmsStocksdocumentsDocuments.test.js +9 -9
  39. package/tests/getWmsStocksdocumentsProducts.test.js +2 -7
  40. package/tests/postEntries.test.js +5 -5
  41. package/tests/postOrdersDocuments.test.js +5 -0
  42. package/tests/postProducts.test.js +2 -2
  43. package/tests/putOrdersDevide.test.js +3 -3
  44. package/tests/putProductsOmnibusPrices.test.js +15 -0
  45. package/tests/putProductsStrikethroughPrices.test.js +16 -1
  46. package/tests/putSizes.test.js +2 -2
package/changelog.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.15] - 2025-07-21
9
+ ### Fixed
10
+ - Added custom requirements
11
+ - Fixed requirements
12
+ - Updates tests
13
+ - Fixed several gates and tests
14
+
8
15
  ## [0.3.13] - 2025-07-19
9
16
  ### Fixed
10
17
  - Fixed requirements
package/dist/app.d.ts CHANGED
@@ -20,7 +20,7 @@ export type RequestProxyObject = {
20
20
 
21
21
  export type RequirementType = {
22
22
  any: string[]|true
23
- } | string;
23
+ } | string | ((RequestProxyObject) => string|false);
24
24
 
25
25
  export type GatewayRequestProxyObject = {
26
26
  gate: {
@@ -1365,10 +1365,8 @@ export interface GetOrdersAuctionDetailsRequest extends Gateway {
1365
1365
  identType: (value: 'orders_id'|'orders_sn') => this;
1366
1366
  /** Orders Id values. */
1367
1367
  orders: (value: string|string[]) => this;
1368
- /** Define orders values by passing them as an array */
1369
- ids: (values: string|string[]) => this;
1370
- /** Define orders values by passing them as an array */
1371
- serialNumbers: (values: number|string|number[]|string[]) => this;
1368
+ ids: (value: string|string[]) => this;
1369
+ serialNumbers: (value: number|string|number[]|string[]) => this;
1372
1370
  }
1373
1371
 
1374
1372
  export interface PutOrdersClientRequest extends Gateway {
@@ -1455,6 +1453,8 @@ export interface PostOrdersDocumentsRequest extends AppendableGateway<PostOrders
1455
1453
  returnedInOrderDetails: (returnedInOrderDetails: 'y'|'n') => this
1456
1454
  /** Additional information. */
1457
1455
  additionalData: (additionalData: JSObject) => this
1456
+ /** Set Issue date */
1457
+ date: (date: string) => this;
1458
1458
  }
1459
1459
 
1460
1460
  export interface GetOrdersExportdocumentsEPPRequest extends Gateway {
@@ -2167,8 +2167,7 @@ export interface GetProductsAuctionsRequest extends PagableGateway<GetProductsAu
2167
2167
  resultsPage: (value: number|string) => this;
2168
2168
  /** Number of results on page. Value from 1 to 100 */
2169
2169
  resultsLimit: (value: number|string) => this;
2170
- /** Define products values by passing them as an array */
2171
- ids: (values: number|string|number[]|string[]) => this;
2170
+ ids: (value: number|string|number[]|string[]) => this;
2172
2171
  /** Get auction data on products */
2173
2172
  fromAllegro: () => this;
2174
2173
  }
@@ -2422,7 +2421,7 @@ export interface PutProductsDescriptionsRequest extends AppendableGateway<PutPro
2422
2421
  productAuctionDescriptionsData: (productAuctionDescriptionsData: Array<JSObject>) => this
2423
2422
  productId: (value: number|string) => this;
2424
2423
  /** Set various types of names or descriptions to the product */
2425
- setText: (text: string, type?: "productName"|"productAuctionName"|"productPriceComparerName"|"productDescription"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeywords", language?: string, shopId?: number|string) => this;
2424
+ setText: (text: string, type: "productName"|"productAuctionName"|"productPriceComparerName"|"productDescription"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeywords" = 'productName', language?: string, shopId?: number|string) => this;
2426
2425
  }
2427
2426
 
2428
2427
  export interface PutProductsGroupsMainProductRequest extends AppendableGateway<PutProductsGroupsMainProductRequest> {
@@ -2612,6 +2611,12 @@ export interface PutProductsOmnibusPricesRequest extends AppendableGateway<PutPr
2612
2611
  omnibusPrices: (omnibusPrices: JSObject) => this
2613
2612
  /** Strikethrough price settings for the page. */
2614
2613
  shops: (shops: Array<JSObject>) => this
2614
+ /** Set product identifiers */
2615
+ productId: (productId: number|string, type: 'id'|'index'|'codeExtern'|'codeProducer' = 'id') => this;
2616
+ /** Set retail or wholesale price */
2617
+ setPrice: (price: number, wholesale: boolean = false) => this;
2618
+ /** Set mode to automatic */
2619
+ mode: (automatic: boolean = false) => this;
2615
2620
  }
2616
2621
 
2617
2622
  export interface DeleteProductsOpinionsRequest extends Gateway {
@@ -2922,9 +2927,9 @@ export interface PostProductsRequest extends AppendableGateway<PostProductsReque
2922
2927
  /** Responsible person code */
2923
2928
  responsiblePersonCode: (responsiblePersonCode: string) => this
2924
2929
  /** Set various types of names or descriptions to the product */
2925
- setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: string, shopId?: number|string) => this;
2930
+ setText: (text: string, type: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer" = 'productName', language?: string, shopId?: number|string) => this;
2926
2931
  /** Sets product price by amount */
2927
- setPrice: (value: number, type?: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation') => this;
2932
+ setPrice: (value: number, type: 'retail'|'wholesale'|'pos'|'minimal'|'strikethroughRetail'|'strikethroughWholesale'|'suggested'|'automaticCalculation' = 'retail') => this;
2928
2933
  }
2929
2934
 
2930
2935
  export interface PutProductsRequest extends AppendableGateway<PutProductsRequest> {
@@ -3199,7 +3204,7 @@ export interface PutProductsRequest extends AppendableGateway<PutProductsRequest
3199
3204
  /** Responsible person code */
3200
3205
  responsiblePersonCode: (responsiblePersonCode: string) => this
3201
3206
  /** Set various types of names or descriptions to the product */
3202
- setText: (text: string, type?: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer", language?: string, shopId?: number|string) => this;
3207
+ setText: (text: string, type: "productName"|"productParamDescriptions"|"productLongDescription"|"productMetaTitle"|"productMetaDescription"|"productMetaKeyword"|"productAuctionName"|"productAuctionDescription"|"productAuctionAdditionalName"|"productNameInPriceComparer" = 'productName', language?: string, shopId?: number|string) => this;
3203
3208
  /** Set edit mode - disables adding new product */
3204
3209
  editMode: () => this;
3205
3210
  /** Set add mode - Api is allowed to create new products */
@@ -3603,6 +3608,14 @@ export interface PutProductsStrikethroughPricesRequest extends AppendableGateway
3603
3608
  stp_settings: (stp_settings: JSObject) => this
3604
3609
  /** Strikethrough price settings for the page. */
3605
3610
  shops: (shops: Array<JSObject>) => this
3611
+ /** Set product identifiers */
3612
+ productId: (productId: number|string, type: 'id'|'index'|'codeExtern'|'codeProducer' = 'id') => this;
3613
+ /** Set precise price */
3614
+ setPrice: (price: number, wholesale: boolean = false) => this;
3615
+ /** Set price relative to current price */
3616
+ addPrice: (value: number, wholesale: boolean = false, base: 'price' | 'price_minimal' | 'price_pos' | 'price_srp' | 'price_crossed' = 'price') => this;
3617
+ /** Set price relative to current price by percent */
3618
+ addPricePercent: (value: number, wholesale: boolean = false, base: 'price' | 'price_minimal' | 'price_pos' | 'price_srp' | 'price_crossed' = 'price') => this;
3606
3619
  }
3607
3620
 
3608
3621
  export interface PutProductsSupplierCodeRequest extends AppendableGateway<PutProductsSupplierCodeRequest> {
package/dist/helpers.js CHANGED
@@ -111,6 +111,8 @@ export const nest = (valueName, nodeName, obj = {}, forceArray = false) => (valu
111
111
  value = [value];
112
112
  const node = { ...obj }, params = {};
113
113
  node[valueName] = value;
114
+ if (!nodeName.length)
115
+ return node;
114
116
  params[nodeName] = node;
115
117
  return params;
116
118
  };
@@ -303,3 +305,22 @@ export const setProductDescription = (object) => (text, node = 'productName', la
303
305
  langData[node] = text;
304
306
  return product;
305
307
  };
308
+ export const setStp = (object, value, wholesale = false, base = 'price', mode = 'amount_set') => {
309
+ const node = getAppendedNode(object);
310
+ const stp_settings = node.stp_settings ?? {};
311
+ stp_settings.price_change_mode = mode;
312
+ stp_settings.price_change_basevalue = base;
313
+ stp_settings[wholesale ? "wholesale_price_change_value" : "retail_price_change_value"] = value;
314
+ return { stp_settings };
315
+ };
316
+ export const setOmp = (object, value = false, wholesale = false, mode = false) => {
317
+ const node = getAppendedNode(object);
318
+ const omnibusPrices = node.omnibusPrices ?? {};
319
+ if (value) {
320
+ omnibusPrices[wholesale ? "omnibusPriceWholesale" : "omnibusPriceRetail"] = value;
321
+ }
322
+ else if (mode) {
323
+ omnibusPrices.omnibusPriceManagement = mode;
324
+ }
325
+ return { omnibusPrices };
326
+ };
@@ -1,10 +1,10 @@
1
1
  import { paramsProxy } from "../params.js";
2
- import { arrayOfObjects } from "../helpers.js";
2
+ import { nest } from "../helpers.js";
3
3
  export default (object) => {
4
4
  object.gate = { method: 'get', node: '/orders/auctionDetails' };
5
5
  object.custom = {
6
- ids: arrayOfObjects("orders", "identValue", { "identType": "orders_id" }),
7
- serialNumbers: arrayOfObjects("orders", "identValue", { "identType": "orders_sn" })
6
+ ids: nest("orders", "", { "identType": "order_id" }, true),
7
+ serialNumbers: nest("orders", "", { "identType": "order_sn" }, true)
8
8
  };
9
9
  return new Proxy(object, paramsProxy);
10
10
  };
@@ -1,9 +1,9 @@
1
1
  import { paramsProxy } from "../params.js";
2
- import { arrayOfObjects, page } from "../helpers.js";
2
+ import { nest, page } from "../helpers.js";
3
3
  export default (object) => {
4
4
  object.gate = { method: 'get', node: '/products/auctions' };
5
5
  object.custom = {
6
- ids: arrayOfObjects("products", "identValue", { "identType": "id" }),
6
+ ids: nest("products", "", { "identType": "id" }, true),
7
7
  fromAllegro: () => { const auctionSites = ["allegro"]; return { auctionSites }; },
8
8
  page
9
9
  };
@@ -3,7 +3,7 @@ export default (object) => {
3
3
  object.gate = { method: 'post', node: '/entries/entries' };
4
4
  object.custom = {
5
5
  blog: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({ siteId: "display_on_blog" }); return { root: { visibleOnSitesList } }; },
6
- news: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({ sizeId: "display_on_news" }); return { root: { visibleOnSitesList } }; }
6
+ news: () => { const visibleOnSitesList = object.params.visibleOnSitesList ?? []; visibleOnSitesList.push({ siteId: "display_on_news" }); return { root: { visibleOnSitesList } }; }
7
7
  };
8
8
  object.appendable = {
9
9
  except: ["shopId", "date", "visible", "visibleOnSitesList", "products", "pictureData", "titleLinkType", "link"],
@@ -1,6 +1,9 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'post', node: '/orders/documents' };
4
+ object.custom = {
5
+ date: (date) => ({ additionalData: { documentIssuedDate: date } })
6
+ };
4
7
  object.appendable = {
5
8
  except: [],
6
9
  arrayNode: "documents",
@@ -6,7 +6,7 @@ export default (object) => {
6
6
  arrayNode: "clients",
7
7
  index: 0
8
8
  };
9
- object.req = ["clientLogin", "shopsIds"];
9
+ object.req = ["clientLogin"];
10
10
  object.arrays = ["clients"];
11
11
  return new Proxy(object, paramsProxy);
12
12
  };
@@ -1,6 +1,12 @@
1
1
  import { paramsProxy } from "../params.js";
2
+ import { setOmp } from "../helpers.js";
2
3
  export default (object) => {
3
4
  object.gate = { method: 'put', node: '/products/omnibusPrices' };
5
+ object.custom = {
6
+ productId: (value, type = "id") => ({ ident: { type, value } }),
7
+ setPrice: (price, wholesale = false) => setOmp(object, price, wholesale),
8
+ mode: (manual = false) => setOmp(object, false, false, manual ? "manual" : "automatic")
9
+ };
4
10
  object.appendable = {
5
11
  except: [],
6
12
  arrayNode: "products",
@@ -1,12 +1,19 @@
1
1
  import { paramsProxy } from "../params.js";
2
+ import { setStp } from "../helpers.js";
2
3
  export default (object) => {
3
4
  object.gate = { method: 'put', node: '/products/strikethroughPrices' };
5
+ object.custom = {
6
+ productId: (value, type = "id") => ({ ident: { type, value } }),
7
+ setPrice: (value, wholesale = false) => setStp(object, value, wholesale),
8
+ addPrice: (value, wholesale = false, base = "price") => setStp(object, value, wholesale, base, "amount_diff"),
9
+ addPricePercent: (value, wholesale = false, base = "price") => setStp(object, value, wholesale, base, "percent_diff")
10
+ };
4
11
  object.appendable = {
5
12
  except: [],
6
13
  arrayNode: "products",
7
14
  index: 0
8
15
  };
9
- object.req = ["ident", "sizes"];
16
+ object.req = ["ident"];
10
17
  object.arrays = ["products"];
11
18
  return new Proxy(object, paramsProxy);
12
19
  };
@@ -3,8 +3,8 @@ import { nest, dateRangeType, orderBy, arrayOfObjects, orderSource, page } from
3
3
  export default (object) => {
4
4
  object.gate = { method: 'post', node: '/orders/orders/search' };
5
5
  object.custom = {
6
- shopIds: nest("shopsIds", "orderSource", {}),
7
- byPackageNumbers: nest("packagesNumbers", "packages", { "orderHasPackageNumbers": "y" }),
6
+ shopIds: nest("shopsIds", "orderSource", {}, true),
7
+ byPackageNumbers: nest("packagesNumbers", "packages", { "orderHasPackageNumbers": "y" }, true),
8
8
  dates: dateRangeType({ "nodeName": "ordersDateRange", "fromName": "ordersDateBegin", "toName": "ordersDateEnd", "typeName": "ordersDateType", "format": "YYYY-MM-DD HH:mm:ss", "nested": "ordersRange", "defaultType": "add" }),
9
9
  orderBy,
10
10
  logins: arrayOfObjects("clients", "clientLogin", { "type": "login" }),
@@ -3,8 +3,8 @@ import { nest, dateRangeType, orderBy, arrayOfObjects, orderSource, page } from
3
3
  export default (object) => {
4
4
  object.gate = { method: 'post', node: '/orders/unfinished/search' };
5
5
  object.custom = {
6
- shopIds: nest("shopsIds", "orderSource", {}),
7
- byPackageNumbers: nest("packagesNumbers", "packages", { "orderHasPackageNumbers": "y" }),
6
+ shopIds: nest("shopsIds", "orderSource", {}, true),
7
+ byPackageNumbers: nest("packagesNumbers", "packages", { "orderHasPackageNumbers": "y" }, true),
8
8
  dates: dateRangeType({ "nodeName": "ordersDateRange", "fromName": "ordersDateBegin", "toName": "ordersDateEnd", "typeName": "ordersDateType", "format": "YYYY-MM-DD HH:mm:ss", "nested": "ordersRange", "defaultType": "add" }),
9
9
  orderBy,
10
10
  logins: arrayOfObjects("clients", "clientLogin", { "type": "login" }),
@@ -11,7 +11,8 @@ export default (object) => {
11
11
  arrayNode: "events",
12
12
  index: 0
13
13
  };
14
- object.req = [{ "any": ["events", "deliveryPackageNumbers"] }];
14
+ object.req = [(object) => { if (object.eventType || object.eventIds)
15
+ return false; return (object.events?.length || object.deliveryPackageNumbers?.length) ? false : 'events | deliveryPackageNumbers'; }];
15
16
  object.arrays = ["deliveryPackageNumbers", "events"];
16
17
  return new Proxy(object, paramsProxy);
17
18
  };
@@ -3,8 +3,8 @@ import { nest, dateRangeType, orderBy, arrayOfObjects, page } from "../helpers.j
3
3
  export default (object) => {
4
4
  object.gate = { method: 'post', node: '/products/products/search' };
5
5
  object.custom = {
6
- byMenus: nest("menuItemsIds", "productMenuItems", {}),
7
- byShops: nest("shopsIds", "searchByShops", {}),
6
+ byMenus: nest("menuItemsIds", "productMenuItems", {}, true),
7
+ byShops: nest("shopsIds", "searchByShops", {}, true),
8
8
  dates: dateRangeType({ "nodeName": "productDate", "fromName": "productDateBegin", "toName": "productDateEnd", "typeName": "productDateMode", "defaultType": "added" }),
9
9
  orderBy,
10
10
  shops: arrayOfObjects("productShops", "shopId"),
@@ -6,7 +6,7 @@ export default (object) => {
6
6
  arrayNode: "products",
7
7
  index: 0
8
8
  };
9
- object.req = ["productId", "sizeId", "products"];
9
+ object.req = [(object) => ((object.productId && object.sizeId) || object.productIndex) ? false : 'productId + sizeId or productIndex'];
10
10
  object.arrays = ["products"];
11
11
  return new Proxy(object, paramsProxy);
12
12
  };
package/dist/request.js CHANGED
@@ -76,6 +76,9 @@ const isMissingRequirement = (obj, required) => {
76
76
  else
77
77
  return required;
78
78
  }
79
+ else if (typeof required === 'function') {
80
+ return required(obj);
81
+ }
79
82
  else if (required.any) {
80
83
  if (required.any === true) {
81
84
  const keys = Object.keys(obj).filter(field => !['results_page', 'results_limit', 'resultsLimit', 'resultsPage'].includes(field)).length;
@@ -110,12 +113,11 @@ const processRequired = (request) => {
110
113
  if (typeof req === 'string') {
111
114
  if (request.appendable.except.includes(req))
112
115
  continue;
113
- missing.delete(req);
114
- for (const obj of request.params[request.appendable.arrayNode]) {
115
- const missingField = isMissingRequirement(obj, req);
116
- if (missingField)
117
- missing.add(missingField);
118
- }
116
+ }
117
+ for (const obj of request.params[request.appendable.arrayNode]) {
118
+ const missingField = isMissingRequirement(obj, req);
119
+ if (missingField)
120
+ missing.add(missingField);
119
121
  }
120
122
  }
121
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idosell",
3
- "version": "0.3.13",
3
+ "version": "0.3.15",
4
4
  "description": "Idosell 3 REST connector",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/gateways.d.ts",
@@ -7,6 +7,6 @@ test("getClientsPayerAddressClientId", () => {
7
7
  })
8
8
 
9
9
  test("getClientsPayerAddressPage", () => {
10
- const params = idosell().getClientsPayerAddress.page(2,10).checkParams();
11
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
10
+ const params = idosell().getClientsPayerAddress.clientId("iaisystem").page(2,10).checkParams();
11
+ expect(params).toEqual({"resultsPage":2,"resultsLimit":10,"clientId":"iaisystem"});
12
12
  })
@@ -7,6 +7,6 @@ test("getClientsPricelistsProductsPriceListId", () => {
7
7
  })
8
8
 
9
9
  test("getClientsPricelistsProductsPage", () => {
10
- const params = idosell().getClientsPricelistsProducts.page(2,10).checkParams();
11
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
10
+ const params = idosell().getClientsPricelistsProducts.priceListId(4).page(2,10).checkParams();
11
+ expect(params).toEqual({"resultsPage":2,"resultsLimit":10,"priceListId":4});
12
12
  })
@@ -6,7 +6,8 @@ test("getCouriersCountryCode", () => {
6
6
  expect(params).toEqual({"countryCode":"PL"});
7
7
  })
8
8
 
9
+
9
10
  test("getCouriersPage", () => {
10
- const params = idosell().getCouriers.page(2,10).checkParams();
11
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
11
+ const params = idosell().getCouriers.countryCode("PL").page(2,10).checkParams();
12
+ expect(params).toEqual({"countryCode":"PL","resultsPage":2,"resultsLimit":10});
12
13
  })
@@ -7,11 +7,11 @@ test("getCouriersPickupPointsCourierId", () => {
7
7
  })
8
8
 
9
9
  test("getCouriersPickupPointsPickupPointExternalId", () => {
10
- const params = idosell().getCouriersPickupPoints.pickupPointExternalId("101293B").checkParams();
11
- expect(params).toEqual({"pickupPointExternalId":"101293B"});
10
+ const params = idosell().getCouriersPickupPoints.courierId(2270020).pickupPointExternalId("101293B").checkParams();
11
+ expect(params).toEqual({"pickupPointExternalId":"101293B","courierId":2270020});
12
12
  })
13
13
 
14
14
  test("getCouriersPickupPointsPage", () => {
15
- const params = idosell().getCouriersPickupPoints.page(2,10).checkParams();
16
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
15
+ const params = idosell().getCouriersPickupPoints.courierId(2270020).page(2,10).checkParams();
16
+ expect(params).toEqual({"resultsPage":2,"resultsLimit":10,"courierId":2270020});
17
17
  })
@@ -1,7 +1,7 @@
1
- import idosell from "./dist/index"
1
+ import idosell from "./dist/index.ts"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getMenuLang_id", () => {
5
- const params = idosell().getMenu.lang_id("pol").checkParams();
6
- expect(params).toEqual({"lang_id":"pol"});
4
+ test("getMenu", () => {
5
+ const params = idosell().getMenu.shop_id(1).menu_id(1).lang_id("pol").checkParams();
6
+ expect(params).toEqual({"shop_id":1,"menu_id":1,"lang_id":"pol"});
7
7
  })
@@ -1,7 +1,7 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getMenuFilterLanguageId", () => {
5
- const params = idosell().getMenuFilter.languageId("pol").checkParams();
6
- expect(params).toEqual({"languageId":"pol"});
4
+ test("getMenuFilterProductMenu", () => {
5
+ const params = idosell().getMenuFilter.shopId(1).languageId("pol").productMenuTreeId(1).productMenuNodeId(161).checkParams();
6
+ expect(params).toEqual({"shopId":1,"languageId":"pol","productMenuTreeId":1,"productMenuNodeId":161});
7
7
  })
@@ -1,7 +1,17 @@
1
- import idosell from "./dist/index"
1
+ import idosell from "./dist/index.ts"
2
2
  import { expect, test } from "vitest"
3
3
 
4
4
  test("getOrdersAuctionDetailsSerialNumbers", () => {
5
- const params = idosell().getOrdersAuctionDetails.serialNumbers([2900,2916,3083]).checkParams();
6
- expect(params).toEqual({"orders":[{"identType":"orders_sn","identValue":2900},{"identType":"orders_sn","identValue":2916},{"identType":"orders_sn","identValue":3083}]});
5
+ const params = idosell().getOrdersAuctionDetails.serialNumbers([1706995,1706991]).checkParams();
6
+ expect(params).toEqual({"identType":"order_sn","orders":[1706995,1706991]});
7
+ })
8
+
9
+ test("getOrdersAuctionDetailsOrders", () => {
10
+ const params = idosell().getOrdersAuctionDetails.identType("orders_sn").orders([1706995]).checkParams();
11
+ expect(params).toEqual({"identType":"orders_sn","orders":[1706995]});
12
+ })
13
+
14
+ test("getOrdersAuctionDetailsIds", () => {
15
+ const params = idosell().getOrdersAuctionDetails.ids("client-1").checkParams();
16
+ expect(params).toEqual({"identType":"order_id","orders":["client-1"]});
7
17
  })
@@ -1,22 +1,12 @@
1
- import idosell from "./dist/index"
1
+ import idosell from "./dist/index.ts"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getOrdersExportdocumentsEPPStocks", () => {
5
- const params = idosell().getOrdersExportdocumentsEPP.stocks([1,2,3]).checkParams();
6
- expect(params).toEqual({"stocks":[1,2,3]});
7
- })
8
-
9
- test("getOrdersExportdocumentsEPPApplicationType", () => {
10
- const params = idosell().getOrdersExportdocumentsEPP.applicationType("SubiektGT").checkParams();
11
- expect(params).toEqual({"applicationType":"SubiektGT"});
12
- })
13
-
14
- test("getOrdersExportdocumentsEPPDocumentType", () => {
15
- const params = idosell().getOrdersExportdocumentsEPP.documentType("all").checkParams();
16
- expect(params).toEqual({"documentType":"all"});
4
+ test("getOrdersExportdocuments", () => {
5
+ const params = idosell().getOrdersExportdocumentsEPP.dateBegin("2025-01-01").dateEnd("2025-01-31").applicationType("SubiektGT").documentType("all").checkParams();
6
+ expect(params).toEqual({"dateBegin":"2025-01-01","dateEnd":"2025-01-31","applicationType":"SubiektGT","documentType":"all"});
17
7
  })
18
8
 
19
9
  test("getOrdersExportdocumentsEPPDates", () => {
20
- const params = idosell().getOrdersExportdocumentsEPP.dates("2023-01-01", 1672704000000).checkParams();
21
- expect(params).toEqual({"dateBegin":"2023-01-01","dateEnd":"2023-01-03"});
10
+ const params = idosell().getOrdersExportdocumentsEPP.applicationType("SubiektGT").documentType("all").dates("2023-01-01", 1672704000000).checkParams();
11
+ expect(params).toEqual({"applicationType":"SubiektGT","documentType":"all","dateBegin":"2023-01-01","dateEnd":"2023-01-03"});
22
12
  })
@@ -2,8 +2,8 @@ import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
4
  test("getOrdersExportdocumentsJPK_MAG", () => {
5
- const params = idosell().getOrdersExportdocumentsJPK.documentType("JPK_MAG").dateBegin("2023-12-01").dateEnd("2023-12-31").stockId([1]).checkParams();
6
- expect(params).toEqual({"documentType":"JPK_MAG","dateBegin":"2023-12-01","dateEnd":"2023-12-31","stockId":[1]});
5
+ const params = idosell().getOrdersExportdocumentsJPK.documentType("JPK_MAG").dateBegin("2023-12-01").dateEnd("2023-12-31").stockId([1]).currency("PLN").checkParams();
6
+ expect(params).toEqual({"documentType":"JPK_MAG","dateBegin":"2023-12-01","dateEnd":"2023-12-31","stockId":[1],"currency":"PLN"});
7
7
  })
8
8
 
9
9
  test("getOrdersExportdocumentsJPK", () => {
@@ -1,7 +1,7 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getOrdersOpinionsRateOperation", () => {
5
- const params = idosell().getOrdersOpinionsRate.operation("positive").checkParams();
6
- expect(params).toEqual({"operation":"positive"});
4
+ test("getOrdersOpinionsRateId", () => {
5
+ const params = idosell().getOrdersOpinionsRate.operation("positive").id(123).checkParams();
6
+ expect(params).toEqual({"operation":"positive","id":123});
7
7
  })
@@ -6,12 +6,12 @@ test("getOrdersPackagesDeliveryPackageNumbers", () => {
6
6
  expect(params).toEqual({"deliveryPackageNumbers":["13489301116623"]});
7
7
  })
8
8
 
9
- test("getOrdersPackagesReturnLabels", () => {
10
- const params = idosell().getOrdersPackages.returnLabels(true).checkParams();
11
- expect(params).toEqual({"returnLabels":true});
12
- })
13
-
14
9
  test("getOrdersPackagesOrderNumbers", () => {
15
10
  const params = idosell().getOrdersPackages.orderNumbers([3]).checkParams();
16
11
  expect(params).toEqual({"orderNumbers":[3]});
12
+ })
13
+
14
+ test("getOrdersPackagesReturnLabels", () => {
15
+ const params = idosell().getOrdersPackages.returnNumbers(3).returnLabels(true).checkParams();
16
+ expect(params).toEqual({"returnNumbers":3,"returnLabels":true});
17
17
  })
@@ -1,12 +1,7 @@
1
- import idosell from "./dist/index"
1
+ import idosell from "./dist/index.ts"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getPaymentsPaymentNumber", () => {
5
- const params = idosell().getPayments.paymentNumber("3532-1").checkParams();
6
- expect(params).toEqual({"paymentNumber":"3532-1"});
7
- })
8
-
9
- test("getPaymentsSourceType", () => {
10
- const params = idosell().getPayments.sourceType("order").checkParams();
11
- expect(params).toEqual({"sourceType":"order"});
4
+ test("getPayments", () => {
5
+ const params = idosell().getPayments.paymentNumber("3532-1").sourceType("order").checkParams();
6
+ expect(params).toEqual({"paymentNumber":"3532-1","sourceType":"order"});
12
7
  })
@@ -1,12 +1,18 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
+
4
5
  test("getProductsAuctionsPage", () => {
5
6
  const params = idosell().getProductsAuctions.page(2,10).checkParams();
6
7
  expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
7
8
  })
8
9
 
9
10
  test("getProductsAuctionsFromAllegro", () => {
10
- const params = idosell().getProductsAuctions.ids(33).fromAllegro().checkParams();
11
- expect(params).toEqual({"products":[{"identType":"id","identValue":33}],"auctionSites":["allegro"]});
11
+ const params = idosell().getProductsAuctions.fromAllegro().checkParams();
12
+ expect(params).toEqual({"auctionSites":["allegro"]});
13
+ })
14
+
15
+ test("getProductsAuctionsIds", () => {
16
+ const params = idosell().getProductsAuctions.ids(38204).checkParams();
17
+ expect(params).toEqual({"identType":"id","products":[38204]});
12
18
  })
@@ -1,7 +1,8 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getProductsBrandsFilterProducerId", () => {
5
- const params = idosell().getProductsBrandsFilter.producerId(1644776320).checkParams();
6
- expect(params).toEqual({"producerId":1644776320});
4
+
5
+ test("getProductsBrandsFilter", () => {
6
+ const params = idosell().getProductsBrandsFilter.producerId(1644776320).languageId("pol").shopId(1).checkParams();
7
+ expect(params).toEqual({"producerId":1644776320,"languageId":"pol","shopId":1});
7
8
  })
@@ -2,6 +2,6 @@ import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
4
  test("getProductsOpinionsRateOperation", () => {
5
- const params = idosell().getProductsOpinionsRate.operation("positive").checkParams();
6
- expect(params).toEqual({"operation":"positive"});
5
+ const params = idosell().getProductsOpinionsRate.id(1).operation("positive").checkParams();
6
+ expect(params).toEqual({"operation":"positive","id":1});
7
7
  })
@@ -1,7 +1,8 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getProductsProductsToFacebookCatalogShopId", () => {
5
- const params = idosell().getProductsProductsToFacebookCatalog.shopId(123).checkParams();
6
- expect(params).toEqual({"shopId":123});
4
+
5
+ test("getProductsProductsToFacebookCatalogFacebookCatalogId", () => {
6
+ const params = idosell().getProductsProductsToFacebookCatalog.shopId(1).facebookCatalogId(123).checkParams();
7
+ expect(params).toEqual({"shopId":1,"facebookCatalogId":123});
7
8
  })
@@ -1,7 +1,8 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
+
4
5
  test("getProductsSeriesFilterSerieId", () => {
5
- const params = idosell().getProductsSeriesFilter.serieId(1).checkParams();
6
- expect(params).toEqual({"serieId":1});
6
+ const params = idosell().getProductsSeriesFilter.shopId(1).languageId("pol").serieId(9).checkParams();
7
+ expect(params).toEqual({"shopId":1,"languageId":"pol","serieId":9});
7
8
  })
@@ -22,6 +22,6 @@ test("getReturnsDates", () => {
22
22
  })
23
23
 
24
24
  test("getReturnsPage", () => {
25
- const params = idosell().getReturns.page(2,10).checkParams();
26
- expect(params).toEqual({"results_page":2,"results_limit":10});
25
+ const params = idosell().getReturns.status(14).page(2,10).checkParams();
26
+ expect(params).toEqual({"status":14,"results_page":2,"results_limit":10});
27
27
  })
@@ -7,6 +7,6 @@ test("getWmsLocationsStockId", () => {
7
7
  })
8
8
 
9
9
  test("getWmsLocationsPage", () => {
10
- const params = idosell().getWmsLocations.page(2,10).checkParams();
11
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
10
+ const params = idosell().getWmsLocations.stockId(1).page(2,10).checkParams();
11
+ expect(params).toEqual({"stockId":1,"resultsPage":2,"resultsLimit":10});
12
12
  })
@@ -6,17 +6,17 @@ test("getWmsStocksdocumentsDocumentsStockDocumentType", () => {
6
6
  expect(params).toEqual({"stockDocumentType":"pz"});
7
7
  })
8
8
 
9
- test("getWmsStocksdocumentsDocumentsStockDocumentStatus", () => {
10
- const params = idosell().getWmsStocksdocumentsDocuments.stockDocumentStatus("open").checkParams();
11
- expect(params).toEqual({"stockDocumentStatus":"open"});
9
+ test("getWmsStocksdocumentsDocumentsDates", () => {
10
+ const params = idosell().getWmsStocksdocumentsDocuments.stockDocumentType("pz").dates("2023-12-18", "2023-12-31", "open").checkParams();
11
+ expect(params).toEqual({"stockDocumentType":"pz","dateRange":{"dateBegin":"2023-12-18 00:00:00","dateEnd":"2023-12-31 23:59:59","dateType":"open"}});
12
12
  })
13
13
 
14
- test("getWmsStocksdocumentsDocumentsPage", () => {
15
- const params = idosell().getWmsStocksdocumentsDocuments.page(2,10).checkParams();
16
- expect(params).toEqual({"resultsPage":2,"resultsLimit":10});
14
+ test("getWmsStocksdocumentsDocumentsStockDocumentStatus", () => {
15
+ const params = idosell().getWmsStocksdocumentsDocuments.stockDocumentType("pz").stockDocumentStatus("open").checkParams();
16
+ expect(params).toEqual({"stockDocumentType":"pz","stockDocumentStatus":"open"});
17
17
  })
18
18
 
19
- test("getWmsStocksdocumentsDocumentsDates", () => {
20
- const params = idosell().getWmsStocksdocumentsDocuments.stockDocumentType("pz").dates("2023-12-18", "2023-12-31", "open").checkParams();
21
- expect(params).toEqual({"stockDocumentType":"pz","dateRange":{"dateBegin":"2023-12-18 00:00:00","dateEnd":"2023-12-31 23:59:59","dateType":"open"}});
19
+ test("getWmsStocksdocumentsDocumentsPage", () => {
20
+ const params = idosell().getWmsStocksdocumentsDocuments.stockDocumentType("pz").page(2,10).checkParams();
21
+ expect(params).toEqual({"stockDocumentType":"pz","resultsPage":2,"resultsLimit":10});
22
22
  })
@@ -1,12 +1,7 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("getWmsStocksdocumentsProductsType", () => {
5
- const params = idosell().getWmsStocksdocumentsProducts.type("pz").checkParams();
6
- expect(params).toEqual({"type":"pz"});
7
- })
8
-
9
4
  test("getWmsStocksdocumentsProductsId", () => {
10
- const params = idosell().getWmsStocksdocumentsProducts.id(123).checkParams();
11
- expect(params).toEqual({"id":123});
5
+ const params = idosell().getWmsStocksdocumentsProducts.type("pz").id(123).checkParams();
6
+ expect(params).toEqual({"type":"pz","id":123});
12
7
  })
@@ -1,12 +1,12 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("postEntriesTitle", () => {
5
- const params = idosell().postEntries.langId("pol").shopId(1).shortDescription("entry").longDescription("My Entry").visible("y").date("2023-12-18").titleLinkType("fullContentLink").title("title").checkParams();
6
- expect(params).toEqual({"langs":[{"langId":"pol","shortDescription":"entry","longDescription":"My Entry","title":"title"}],"shopId":1,"visible":"y","date":"2023-12-18","titleLinkType":"fullContentLink"});
4
+ test("postEntriesVisibleOnSitesList", () => {
5
+ const params = idosell().postEntries.langId("pol").shopId(1).shortDescription("entry").longDescription("My entry").visible("y").date("2025-01-01").titleLinkType("fullContentLink").title("Entry").visibleOnSitesList([{"siteId":"display_on_blog"}]).checkParams();
6
+ expect(params).toEqual({"langs":[{"langId":"pol","shortDescription":"entry","longDescription":"My entry","title":"Entry"}],"shopId":1,"visible":"y","date":"2025-01-01","titleLinkType":"fullContentLink","visibleOnSitesList":[{"siteId":"display_on_blog"}]});
7
7
  })
8
8
 
9
9
  test("postEntriesNews", () => {
10
- const params = idosell().postEntries.blog().news().checkParams();
11
- expect(params).toEqual({"langs":[{}],"visibleOnSitesList":[{"siteId":"display_on_blog"},{"sizeId":"display_on_news"}]});
10
+ const params = idosell().postEntries.langId("pol").shopId(1).shortDescription("entry").longDescription("My entry").visible("y").date("2025-01-01").titleLinkType("fullContentLink").title("Entry").blog().news().checkParams();
11
+ expect(params).toEqual({"langs":[{"langId":"pol","shortDescription":"entry","longDescription":"My entry","title":"Entry"}],"shopId":1,"visible":"y","date":"2025-01-01","titleLinkType":"fullContentLink","visibleOnSitesList":[{"siteId":"display_on_blog"},{"siteId":"display_on_news"}]});
12
12
  })
@@ -4,4 +4,9 @@ import { expect, test } from "vitest"
4
4
  test("postOrdersDocumentsName", () => {
5
5
  const params = idosell().postOrdersDocuments.orderSerialNumber(9).type("other").name("document").checkParams();
6
6
  expect(params).toEqual({"documents":[{"orderSerialNumber":9,"type":"other","name":"document"}]});
7
+ })
8
+
9
+ test("postOrdersDocumentsDate", () => {
10
+ const params = idosell().postOrdersDocuments.orderSerialNumber(33).name("FAK123").date("2025-07-01").checkParams();
11
+ expect(params).toEqual({"documents":[{"orderSerialNumber":33,"name":"FAK123","additionalData":{"documentIssuedDate":"2025-07-01"}}]});
7
12
  })
@@ -2,8 +2,8 @@ import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
4
  test("postProductsProductSizes", () => {
5
- const params = idosell().postProducts.productSizes([{"sizeId":"uniw"}]).checkParams();
6
- expect(params).toEqual({"products":[{"productSizes":[{"sizeId":"uniw"}]}]});
5
+ const params = idosell().postProducts.shopsMask(1).productSizes([{"sizeId":"uniw"}]).checkParams();
6
+ expect(params).toEqual({"products":[{"shopsMask":1,"productSizes":[{"sizeId":"uniw"}]}]});
7
7
  })
8
8
 
9
9
  test("postProductsShopsMask", () => {
@@ -1,7 +1,7 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("putOrdersDevideQuantity", () => {
5
- const params = idosell().putOrdersDevide.orderSerialNumber(3).basketPosition(0).quantity(1).checkParams();
6
- expect(params).toEqual({"orderSerialNumber":3,"products":[{"basketPosition":0,"quantity":1}]});
4
+ test("putOrdersDevideBasketPosition", () => {
5
+ const params = idosell().putOrdersDevide.orderSerialNumber(241).basketPosition(1).checkParams();
6
+ expect(params).toEqual({"orderSerialNumber":241,"products":[{"basketPosition":1}]});
7
7
  })
@@ -4,4 +4,19 @@ import { expect, test } from "vitest"
4
4
  test("putProductsOmnibusPricesOmnibusPrices", () => {
5
5
  const params = idosell().putProductsOmnibusPrices.ident({"type":"id","value":"33"}).omnibusPrices({"omnibusPriceRetail":299}).checkParams();
6
6
  expect(params).toEqual({"products":[{"ident":{"type":"id","value":"33"},"omnibusPrices":{"omnibusPriceRetail":299}}]});
7
+ })
8
+
9
+ test("putProductsOmnibusPricesProductId", () => {
10
+ const params = idosell().putProductsOmnibusPrices.productId(33).checkParams();
11
+ expect(params).toEqual({"products":[{"ident":{"type":"id","value":33}}]});
12
+ })
13
+
14
+ test("putProductsOmnibusPricesSetPrice", () => {
15
+ const params = idosell().putProductsOmnibusPrices.productId(33).setPrice(299).setPrice(259, true).checkParams();
16
+ expect(params).toEqual({"products":[{"ident":{"type":"id","value":33},"omnibusPrices":{"omnibusPriceRetail":299,"omnibusPriceWholesale":259}}]});
17
+ })
18
+
19
+ test("putProductsOmnibusPricesMode", () => {
20
+ const params = idosell().putProductsOmnibusPrices.productId(33).mode(true).checkParams();
21
+ expect(params).toEqual({"products":[{"ident":{"type":"id","value":33},"omnibusPrices":{"omnibusPriceManagement":"manual"}}]});
7
22
  })
@@ -1,7 +1,22 @@
1
1
  import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
- test("putProductsStrikethroughPricesStp_settings", () => {
4
+ test("putProductsStrikethroughPricesRetail", () => {
5
5
  const params = idosell().putProductsStrikethroughPrices.ident({"type":"id","value":"33"}).stp_settings({"price_change_mode":"amount_set","price_change_basevalue":"price","retail_price_change_value":199}).checkParams();
6
6
  expect(params).toEqual({"products":[{"ident":{"type":"id","value":"33"},"stp_settings":{"price_change_mode":"amount_set","price_change_basevalue":"price","retail_price_change_value":199}}]});
7
+ })
8
+
9
+ test("putProductsStrikethroughPricesProductId", () => {
10
+ const params = idosell().putProductsStrikethroughPrices.stp_settings({"price_change_mode":"amount_set","retail_price_change_value":249}).productId(33).checkParams();
11
+ expect(params).toEqual({"products":[{"stp_settings":{"price_change_mode":"amount_set","retail_price_change_value":249},"ident":{"type":"id","value":33}}]});
12
+ })
13
+
14
+ test("putProductsStrikethroughPricesSetPrice", () => {
15
+ const params = idosell().putProductsStrikethroughPrices.productId(33).setPrice(349).checkParams();
16
+ expect(params).toEqual({"products":[{"ident":{"type":"id","value":33},"stp_settings":{"price_change_mode":"amount_set","price_change_basevalue":"price","retail_price_change_value":349}}]});
17
+ })
18
+
19
+ test("putProductsStrikethroughPricesAddPricePercent", () => {
20
+ const params = idosell().putProductsStrikethroughPrices.productId(33).addPricePercent(20).addPricePercent(5, true).checkParams();
21
+ expect(params).toEqual({"products":[{"ident":{"type":"id","value":33},"stp_settings":{"price_change_mode":"percent_diff","price_change_basevalue":"price","retail_price_change_value":20,"wholesale_price_change_value":5}}]});
7
22
  })
@@ -2,8 +2,8 @@ import idosell from "./dist/index"
2
2
  import { expect, test } from "vitest"
3
3
 
4
4
  test("putSizesName", () => {
5
- const params = idosell().putSizes.id("W").name("512GB").checkParams();
6
- expect(params).toEqual({"sizes":[{"id":"W","name":"512GB"}]});
5
+ const params = idosell().putSizes.id("W").operation("add").name("512GB").checkParams();
6
+ expect(params).toEqual({"sizes":[{"id":"W","name":"512GB","operation":"add"}]});
7
7
  })
8
8
 
9
9
  test("putSizesOperation", () => {