idosell 0.3.20 → 0.4.3

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 CHANGED
@@ -13,7 +13,7 @@ const idosellRequest = idosell('SHOP_URL', 'API_KEY', API_VERSION)
13
13
 
14
14
  **API_KEY** can be obtained in your Idosell panel.
15
15
  **SHOP_URL** is the base URI of your shop.
16
- **API_VERSION** version of the API to call, current default version is **v3**
16
+ **API_VERSION** version of the API to call, current default version is **v6**
17
17
  Here are some examples:
18
18
  ```
19
19
  https://yourdomain.com
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.4.3] - 2025-08-28
9
+ ### Changed
10
+ - Added type RequestParams for typescript support
11
+ - Added new explanatory and examples page
12
+ - Improved typings
13
+
8
14
  ## [0.3.20] - 2025-08-23
9
15
  ### Changed
10
16
  - Updated default version to v6.3
package/dist/app.d.ts CHANGED
@@ -40,7 +40,7 @@ export type GatewayRequestProxyObject = {
40
40
  req?: RequirementType[],
41
41
  } & RequestProxyObject;
42
42
 
43
- export interface Gateway<R = JSObject> {
43
+ export interface Gateway<R = JSObject, P = JSObject> {
44
44
  /**
45
45
  * Executes the query to designated API endpoint
46
46
  * @param options Use options: log - to console log params, url and method, logPage - to console log current page in a loop
@@ -51,15 +51,15 @@ export interface Gateway<R = JSObject> {
51
51
  /**
52
52
  * @returns Object with currently mapped parameters
53
53
  */
54
- getParams: () => JSObject,
54
+ getParams: () => P,
55
55
 
56
56
  /**
57
57
  * @description Set object as params
58
58
  */
59
- setParams: (params: JSObject) => this
59
+ setParams: (params: P) => this
60
60
  }
61
61
 
62
- export interface PagableGateway<T,R = JSObject> extends Gateway<R> {
62
+ export interface PagableGateway<T,R = JSObject, P = JSObject> extends Gateway<R, P> {
63
63
  /**
64
64
  * @returns number of items i.e. products, orders, documents, etc.
65
65
  */
@@ -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,R = JSObject> extends Gateway<R> {
82
+ export interface AppendableGateway<T,R = JSObject, P = JSObject> extends Gateway<R, P> {
83
83
  /**
84
84
  * Start creating next item in list
85
85
  */