idosell 0.3.7 → 0.3.11

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 (56) hide show
  1. package/changelog.md +6 -0
  2. package/dist/app.d.ts +1 -1
  3. package/dist/methods/getClientsDeliveryAddress.js +1 -0
  4. package/dist/methods/getClientsPayerAddress.js +1 -0
  5. package/dist/methods/getClientsPricelistsClients.js +1 -0
  6. package/dist/methods/getClientsPricelistsProducts.js +1 -0
  7. package/dist/methods/getClientsTags.js +1 -0
  8. package/dist/methods/getConfigVariables.js +1 -0
  9. package/dist/methods/getCouriers.js +1 -0
  10. package/dist/methods/getCouriersPickupPoints.js +1 -0
  11. package/dist/methods/getDeliveriesRegions.js +1 -0
  12. package/dist/methods/getDiscountsGroupsClients.js +1 -0
  13. package/dist/methods/getMenu.js +1 -0
  14. package/dist/methods/getMenuFilter.js +1 -0
  15. package/dist/methods/getOrders.js +1 -0
  16. package/dist/methods/getOrdersAnalytics.js +1 -0
  17. package/dist/methods/getOrdersDocuments.js +1 -0
  18. package/dist/methods/getOrdersExportdocumentsEPP.js +1 -0
  19. package/dist/methods/getOrdersExportdocumentsJPK.js +1 -0
  20. package/dist/methods/getOrdersHandler.js +1 -0
  21. package/dist/methods/getOrdersHistory.js +1 -0
  22. package/dist/methods/getOrdersImages.js +1 -0
  23. package/dist/methods/getOrdersLabels.js +1 -0
  24. package/dist/methods/getOrdersOpinionsRate.js +1 -0
  25. package/dist/methods/getOrdersPackages.js +1 -0
  26. package/dist/methods/getOrdersProfitability.js +1 -0
  27. package/dist/methods/getOrdersWarehouse.js +1 -0
  28. package/dist/methods/getPackagesLabels.js +1 -0
  29. package/dist/methods/getPayments.js +1 -0
  30. package/dist/methods/getProductsBrandsFilter.js +1 -0
  31. package/dist/methods/getProductsCodeExistence.js +1 -0
  32. package/dist/methods/getProductsDescriptions.js +1 -0
  33. package/dist/methods/getProductsIdBySizecode.js +1 -0
  34. package/dist/methods/getProductsMarketingAllFacebookCatalogIds.js +1 -0
  35. package/dist/methods/getProductsMarketingZones.js +1 -0
  36. package/dist/methods/getProductsOmnibusPrices.js +1 -0
  37. package/dist/methods/getProductsOpinionsRate.js +1 -0
  38. package/dist/methods/getProductsProductsToFacebookCatalog.js +1 -0
  39. package/dist/methods/getProductsQuestions.js +1 -0
  40. package/dist/methods/getProductsReservations.js +1 -0
  41. package/dist/methods/getProductsSKUbyBarcode.js +1 -0
  42. package/dist/methods/getProductsSeriesFilter.js +1 -0
  43. package/dist/methods/getProductsStocks.js +1 -0
  44. package/dist/methods/getProductsStrikethroughPrices.js +1 -0
  45. package/dist/methods/getRefundsGetPossibleAutoRefunds.js +1 -0
  46. package/dist/methods/getRefundsGetRefundStatus.js +1 -0
  47. package/dist/methods/getRefundsRetrieveRefundsList.js +1 -0
  48. package/dist/methods/getResponsibilityEntities.js +1 -0
  49. package/dist/methods/getWmsLocations.js +1 -0
  50. package/dist/methods/getWmsStocksdocumentsDocuments.js +1 -0
  51. package/dist/methods/getWmsStocksdocumentsProducts.js +1 -0
  52. package/dist/methods/searchClientsGiftcards.js +1 -0
  53. package/dist/methods/searchPackages.js +1 -0
  54. package/dist/methods/searchProductsDeliveryTime.js +1 -0
  55. package/dist/params.js +9 -2
  56. package/package.json +1 -1
package/changelog.md CHANGED
@@ -5,6 +5,12 @@ 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.11] - 2025-07-05
9
+ ### Fixed
10
+ - Added hard requirements for search/POST and GET gates
11
+ - Auto reset current page on change parameters on paged gates
12
+ - Fixed appendable type
13
+
8
14
  ## [0.3.7] - 2025-07-05
9
15
  ### Fixed
10
16
  - Fixed chaining then after await
package/dist/app.d.ts CHANGED
@@ -79,7 +79,7 @@ export interface PagableGateway<T,R = JSObject> extends Gateway<R> {
79
79
  hasNext: () => boolean
80
80
  }
81
81
 
82
- export interface AppendableGateway<T> extends Gateway {
82
+ export interface AppendableGateway<T,R = JSObject> extends Gateway<R> {
83
83
  /**
84
84
  * Start creating next item in list
85
85
  */
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/clients/deliveryAddress' };
4
+ object.req = [{ "any": ["clientCodesExternal", "clientIds", "clientLogins"] }];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["clientId"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/clients/pricelists/clients' };
4
+ object.req = ["priceListId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["priceListId"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/clients/tags' };
4
+ object.req = ["clientId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["type"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["countryCode"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["courierId"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/deliveries/regions' };
4
+ object.req = ["shopId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/discounts/groups/clients' };
4
+ object.req = ["discountGroupId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/menu/menu' };
4
+ object.req = ["shop_id", "lang_id", "menu_id"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/menu/filter' };
4
+ object.req = ["shopId", "languageId", "productMenuTreeId", "productMenuNodeId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/orders' };
4
+ object.req = [{ "any": ["ordersIds", "ordersSerialNumbers", "orderExternalId"] }];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/analytics' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/documents' };
4
+ object.req = ["orderSerialNumber", "documentType"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  dates: dateRange({ "fromName": "dateBegin", "toName": "dateEnd" })
7
7
  };
8
+ object.req = ["dateBegin", "dateEnd", "dateEnd", "applicationType", "documentType"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  dates: dateRange({ "fromName": "dateBegin", "toName": "dateEnd" })
7
7
  };
8
+ object.req = ["documentType", "dateBegin", "dateEnd", "currency"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/handler' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/history' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/images' };
4
+ object.req = ["imageId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/labels' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/opinionsRate' };
4
+ object.req = ["id", "operation"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/packages' };
4
+ object.req = [{ "any": ["rmaNumbers", "returnNumbers", "orderNumbers", "deliveryPackageNumbers"] }];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/profitability' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/orders/warehouse' };
4
+ object.req = ["orderSerialNumber"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -6,5 +6,6 @@ export default (object) => {
6
6
  rm: (rmaId) => ({ eventType: "rma", eventId: rmaId }),
7
7
  return: (returnId) => ({ eventType: "return", eventId: returnId })
8
8
  };
9
+ object.req = ["eventId", "eventType"];
9
10
  return new Proxy(object, paramsProxy);
10
11
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/payments/payments' };
4
+ object.req = ["paymentNumber", "sourceType"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/brands/filter' };
4
+ object.req = ["shopId", "languageId", "producerId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["products", "identType"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/descriptions' };
4
+ object.req = ["type", "ids"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/idBySizecode' };
4
+ object.req = ["codes"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/marketing/allFacebookCatalogIds' };
4
+ object.req = ["shopId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["identType", "products"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["identType", "products"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/opinions/rate' };
4
+ object.req = ["id", "operation"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/productsToFacebookCatalog' };
4
+ object.req = ["facebookCatalogId", "shopId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/questions' };
4
+ object.req = [{ "any": ["id", "productId"] }];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["products", "identType"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/SKUbyBarcode' };
4
+ object.req = ["productIndices"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/products/series/filter' };
4
+ object.req = ["shopId", "languageId", "serieId"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["identType", "products"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  productId: getProductIdentList
7
7
  };
8
+ object.req = ["identType", "products"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/refunds/getPossibleAutoRefunds' };
4
+ object.req = ["sourceId", "sourceType"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -1,5 +1,6 @@
1
1
  import { paramsProxy } from "../params.js";
2
2
  export default (object) => {
3
3
  object.gate = { method: 'get', node: '/refunds/getRefundStatus' };
4
+ object.req = ["sourceId", "paymentId", "sourceType"];
4
5
  return new Proxy(object, paramsProxy);
5
6
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["sourceType"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = ["type"];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -5,5 +5,6 @@ export default (object) => {
5
5
  object.custom = {
6
6
  page
7
7
  };
8
+ object.req = [{ "any": ["locationId", "stockId"] }];
8
9
  return new Proxy(object, paramsProxy);
9
10
  };
@@ -6,5 +6,6 @@ export default (object) => {
6
6
  dates: dateRangeType({ "nodeName": "dateRange", "fromName": "dateBegin", "toName": "dateEnd", "typeName": "dateType", "format": "YYYY-MM-DD HH:mm:ss", "defaultType": "open" }),
7
7
  page
8
8
  };
9
+ object.req = ["stockDocumentType"];
9
10
  return new Proxy(object, paramsProxy);
10
11
  };
@@ -6,5 +6,6 @@ export default (object) => {
6
6
  page
7
7
  };
8
8
  object.snakeCase = true;
9
+ object.req = ["type", "id"];
9
10
  return new Proxy(object, paramsProxy);
10
11
  };
@@ -7,6 +7,7 @@ export default (object) => {
7
7
  number: arrayOfObjects("giftCards", "number"),
8
8
  pins: arrayOfObjects("giftCards", "pin")
9
9
  };
10
+ object.req = [{ "any": ["giftCards", "searchGiftCards"] }];
10
11
  object.arrays = ["giftCards"];
11
12
  return new Proxy(object, paramsProxy);
12
13
  };
@@ -11,6 +11,7 @@ export default (object) => {
11
11
  arrayNode: "events",
12
12
  index: 0
13
13
  };
14
+ object.req = [{ "any": ["events", "deliveryPackageNumbers"] }];
14
15
  object.arrays = ["deliveryPackageNumbers", "events"];
15
16
  return new Proxy(object, paramsProxy);
16
17
  };
@@ -6,6 +6,7 @@ export default (object) => {
6
6
  arrayNode: "products",
7
7
  index: 0
8
8
  };
9
+ object.req = ["productId", "sizeId", "products"];
9
10
  object.arrays = ["products"];
10
11
  return new Proxy(object, paramsProxy);
11
12
  };
package/dist/params.js CHANGED
@@ -41,8 +41,9 @@ export const paramsProxy = {
41
41
  }
42
42
  }
43
43
  else if (object.custom && typeof object.custom[property] === 'function') {
44
- if (property === 'page')
45
- values.push(Boolean(object.snakeCase));
44
+ if (property === 'page') {
45
+ values = [values[0] ?? 0, values[1] ?? 100, Boolean(object.snakeCase)];
46
+ }
46
47
  const param = object.custom[property](...values);
47
48
  Object.assign(object.params, param);
48
49
  }
@@ -55,6 +56,12 @@ export const paramsProxy = {
55
56
  else {
56
57
  object.params[property] = values[0];
57
58
  }
59
+ if (object.custom?.page && property !== 'page') {
60
+ if (object.params.resultsPage)
61
+ delete object.params.resultsPage;
62
+ if (object.params.results_page)
63
+ delete object.params.results_page;
64
+ }
58
65
  return receiver;
59
66
  };
60
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idosell",
3
- "version": "0.3.7",
3
+ "version": "0.3.11",
4
4
  "description": "Idosell 3 REST connector",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/gateways.d.ts",