idosell 0.3.20 → 0.4.1

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/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,12 +51,12 @@ 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
62
  export interface PagableGateway<T,R = JSObject> extends Gateway<R> {
@@ -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
  */