idosell 0.4.3 → 0.4.4

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.
@@ -36,9 +36,9 @@ export interface PostClientsBalanceRequest extends Gateway {
36
36
  /** Order payment identifier. */
37
37
  prepaidId: (value: number|string) => this;
38
38
  /** Adds value to client balance */
39
- add: (balance: number, currency: string) => this;
39
+ add: (balance: number, currency?: string) => this;
40
40
  /** Subtracts value to client balance */
41
- remove: (balance: number, currency: string) => this;
41
+ remove: (balance: number, currency?: string) => this;
42
42
  }
43
43
 
44
44
  export interface GetClientsRequest extends PagableGateway<GetClientsRequest, GetClientsResponse> {
@@ -438,11 +438,11 @@ export interface PutClientsGiftcardsRequest extends AppendableGateway<PutClients
438
438
  /** */
439
439
  note: (note: string) => this
440
440
  /** Adds balance to current gift card */
441
- add: (amount: number, currency: string) => this;
441
+ add: (amount: number, currency?: string) => this;
442
442
  /** Subtract from balance to current gift card */
443
- subtract: (amount: number, currency: string) => this;
443
+ subtract: (amount: number, currency?: string) => this;
444
444
  /** Set balance to current gift card */
445
- set: (amount: number, currency: string) => this;
445
+ set: (amount: number, currency?: string) => this;
446
446
  }
447
447
 
448
448
  export interface SearchClientsGiftcardsRequest extends Gateway<SearchClientsGiftcardsResponse, RequestParams.SearchClientsGiftcardsParams> {
@@ -1550,6 +1550,8 @@ export interface PostOrdersImagesRequest extends AppendableGateway<PostOrdersIma
1550
1550
  name: (name: string) => this
1551
1551
  orderId: (value: string) => this;
1552
1552
  orderSerialNumber: (value: number|string) => this;
1553
+ /** Sets image source for order */
1554
+ source: (value: string) => this;
1553
1555
  }
1554
1556
 
1555
1557
  export interface GetOrdersLabelsRequest extends Gateway {
@@ -1580,7 +1582,7 @@ export interface SearchOrdersOpinionsRequest extends PagableGateway<SearchOrders
1580
1582
  /** Define range of dates */
1581
1583
  dates: (dateFrom: DateLike, dateTo: DateLike) => this;
1582
1584
  /** Define ordering of records */
1583
- orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending: boolean) => this;
1585
+ orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending?: boolean) => this;
1584
1586
  }
1585
1587
 
1586
1588
  export interface GetOrdersOpinionsRateRequest extends Gateway {
@@ -1759,12 +1761,18 @@ export interface SearchOrdersRequest extends PagableGateway<SearchOrdersRequest,
1759
1761
  orderExternalId: (value: string) => this;
1760
1762
  /** Order currency */
1761
1763
  orderCurrency: (value: string) => this;
1764
+ /** Subscription id */
1765
+ subscription: (value: number|string) => this;
1766
+ /** Subscription ids */
1767
+ subscriptionIds: (value: number|string|number[]|string[]) => this;
1768
+ /** Orders from subscriptions */
1769
+ subscriptionsOrders: (value: 'y'|'n') => this;
1762
1770
  shopIds: (value: number|string|number[]|string[]) => this;
1763
1771
  byPackageNumbers: (value: string|string[]) => this;
1764
1772
  /** Define range of dates and their type */
1765
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "add"|"modified"|"dispatch"|"payment"|"last_payments_operation"|"declared_payments") => this;
1773
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "add"|"modified"|"dispatch"|"payment"|"last_payments_operation"|"declared_payments") => this;
1766
1774
  /** Define ordering of records */
1767
- orderBy: (elementName: "id"|"sn"|"order_time"|"status"|"order_source"|"order_cost"|"discount_code"|"ready_to_send_date", descending: boolean) => this;
1775
+ orderBy: (elementName: "id"|"sn"|"order_time"|"status"|"order_source"|"order_cost"|"discount_code"|"ready_to_send_date", descending?: boolean) => this;
1768
1776
  /** Define clients values by passing them as an array */
1769
1777
  logins: (values: string|string[]) => this;
1770
1778
  /** Define clients values by passing them as an array */
@@ -1780,13 +1788,13 @@ export interface SearchOrdersRequest extends PagableGateway<SearchOrdersRequest,
1780
1788
  /** Filter orders that contain select product */
1781
1789
  hasProduct: (productId: number|string, sizeId?: number|string) => this;
1782
1790
  /** Filter orders that have package */
1783
- hasPackage: (orderHasPackage: boolean) => this;
1791
+ hasPackage: (orderHasPackage?: boolean) => this;
1784
1792
  /** Filter orders by an any or selected Allegro account */
1785
1793
  fromAllegro: (allegroAccount?: string) => this;
1786
1794
  /** Filter orders by an any or selected Amazon account */
1787
- fromAmazon: (allegroAccount?: string) => this;
1795
+ fromAmazon: (amazonAccount?: string) => this;
1788
1796
  /** Filter orders by an any or selected EBay account */
1789
- fromEbay: (allegroAccount?: string) => this;
1797
+ fromEbay: (ebayAccount?: string) => this;
1790
1798
  }
1791
1799
 
1792
1800
  export interface GetOrdersPackagesRequest extends Gateway<GetOrdersPackagesResponse> {
@@ -1932,9 +1940,9 @@ export interface SearchOrdersUnfinishedRequest extends PagableGateway<SearchOrde
1932
1940
  shopIds: (value: number|string|number[]|string[]) => this;
1933
1941
  byPackageNumbers: (value: string|string[]) => this;
1934
1942
  /** Define range of dates and their type */
1935
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "add"|"modified"|"dispatch"|"payment"|"last_payments_operation"|"declared_payments") => this;
1943
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "add"|"modified"|"dispatch"|"payment"|"last_payments_operation"|"declared_payments") => this;
1936
1944
  /** Define ordering of records */
1937
- orderBy: (elementName: "id"|"sn"|"order_time"|"status"|"order_source"|"order_cost"|"discount_code"|"ready_to_send_date", descending: boolean) => this;
1945
+ orderBy: (elementName: "id"|"sn"|"order_time"|"status"|"order_source"|"order_cost"|"discount_code"|"ready_to_send_date", descending?: boolean) => this;
1938
1946
  /** Define clients values by passing them as an array */
1939
1947
  logins: (values: string|string[]) => this;
1940
1948
  /** Define clients values by passing them as an array */
@@ -1950,13 +1958,13 @@ export interface SearchOrdersUnfinishedRequest extends PagableGateway<SearchOrde
1950
1958
  /** Filter orders that contain select product */
1951
1959
  hasProduct: (productId: number|string, sizeId?: number|string) => this;
1952
1960
  /** Filter orders that have package */
1953
- hasPackage: (orderHasPackage: boolean) => this;
1961
+ hasPackage: (orderHasPackage?: boolean) => this;
1954
1962
  /** Filter orders by an any or selected Allegro account */
1955
1963
  fromAllegro: (allegroAccount?: string) => this;
1956
1964
  /** Filter orders by an any or selected Amazon account */
1957
- fromAmazon: (allegroAccount?: string) => this;
1965
+ fromAmazon: (amazonAccount?: string) => this;
1958
1966
  /** Filter orders by an any or selected EBay account */
1959
- fromEbay: (allegroAccount?: string) => this;
1967
+ fromEbay: (ebayAccount?: string) => this;
1960
1968
  }
1961
1969
 
1962
1970
  export interface GetOrdersWarehouseRequest extends Gateway {
@@ -2499,7 +2507,7 @@ export interface PutProductsImagesRequest extends AppendableGateway<PutProductsI
2499
2507
  productImagesSettings: (productImagesSettings: JSObject) => this
2500
2508
  productId: (value: number|string) => this;
2501
2509
  /** Adds image source with selected priority */
2502
- addImage: (source: string, priority: number|string) => this;
2510
+ addImage: (source: string, priority?: number|string) => this;
2503
2511
  /** Set global image source to base64 */
2504
2512
  base64: () => this;
2505
2513
  }
@@ -2625,7 +2633,7 @@ export interface PutProductsOmnibusPricesRequest extends AppendableGateway<PutPr
2625
2633
  /** Set retail or wholesale price */
2626
2634
  setPrice: (price: number, wholesale?: boolean) => this;
2627
2635
  /** Set mode to automatic */
2628
- mode: (automatic: boolean) => this;
2636
+ mode: (manual?: boolean) => this;
2629
2637
  }
2630
2638
 
2631
2639
  export interface DeleteProductsOpinionsRequest extends Gateway {
@@ -2654,7 +2662,7 @@ export interface GetProductsOpinionsRequest extends PagableGateway<GetProductsOp
2654
2662
  /** Define range of dates */
2655
2663
  dates: (dateFrom: DateLike, dateTo: DateLike) => this;
2656
2664
  /** Define ordering of records */
2657
- orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending: boolean) => this;
2665
+ orderBy: (elementName: "date"|"rating"|"scorePositive"|"scoreNegative"|"modificationDatetime", descending?: boolean) => this;
2658
2666
  }
2659
2667
 
2660
2668
  export interface PostProductsOpinionsRequest extends AppendableGateway<PostProductsOpinionsRequest> {
@@ -3349,9 +3357,9 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
3349
3357
  byMenus: (value: number|string|number[]|string[]) => this;
3350
3358
  byShops: (value: number|string|number[]|string[]) => this;
3351
3359
  /** Define range of dates and their type */
3352
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "added"|"finished"|"resumed"|"modified"|"quantity_changed"|"price_changed"|"modified_and_quantity_changed") => this;
3360
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "added"|"finished"|"resumed"|"modified"|"quantity_changed"|"price_changed"|"modified_and_quantity_changed") => this;
3353
3361
  /** Define ordering of records */
3354
- orderBy: (elementName: "id"|"name"|"code"|"product_sizecode"|"code_producer"|"retail_price"|"pos_price"|"vat"|"wholesale_price"|"minimal_price"|"pictures_count"|"auction_name"|"pricecomparer_name"|"version_name"|"series_name"|"category_name"|"deliverer_name"|"adding_time"|"modification_time"|"price_changed_time"|"quantity_changed_time"|"currency"|"currency_shop"|"taxcode"|"meta_title"|"meta_description"|"meta_keywords"|"suggested_price"|"observed_clients"|"observed_time"|"wishes_clients"|"wishes_time", descending: boolean) => this;
3362
+ orderBy: (elementName: "id"|"name"|"code"|"product_sizecode"|"code_producer"|"retail_price"|"pos_price"|"vat"|"wholesale_price"|"minimal_price"|"pictures_count"|"auction_name"|"pricecomparer_name"|"version_name"|"series_name"|"category_name"|"deliverer_name"|"adding_time"|"modification_time"|"price_changed_time"|"quantity_changed_time"|"currency"|"currency_shop"|"taxcode"|"meta_title"|"meta_description"|"meta_keywords"|"suggested_price"|"observed_clients"|"observed_time"|"wishes_clients"|"wishes_time", descending?: boolean) => this;
3355
3363
  /** Define productShops values by passing them as an array */
3356
3364
  shops: (values: number|string|number[]|string[]) => this;
3357
3365
  /** Define productParams values by passing them as an array */
@@ -3369,11 +3377,11 @@ export interface SearchProductsRequest extends PagableGateway<SearchProductsRequ
3369
3377
  /** Define productIndexes values by passing them as an array */
3370
3378
  byIndexes: (values: number|string|number[]|string[]) => this;
3371
3379
  /** Toogle to return only main versions */
3372
- onlyMainVersion: (onlyMain: boolean) => this;
3380
+ onlyMainVersion: (onlyMain?: boolean) => this;
3373
3381
  /** Filter by minimum and maximum price */
3374
- byPrice: (minPrice: number, maxPrice: number, priceType: "retail_price"|"wholesale_price"|"minimal_price"|"pos_price"|"last_purchase_price") => this;
3382
+ byPrice: (minPrice: number, maxPrice: number, priceType?: "retail_price"|"wholesale_price"|"minimal_price"|"pos_price"|"last_purchase_price") => this;
3375
3383
  /** Filter by availibility on any stock or selected stocks */
3376
- inStock: (stockIds: boolean|number|string|number[]|string[]) => this;
3384
+ inStock: (stockIds?: boolean|number|string|number[]|string[]) => this;
3377
3385
  }
3378
3386
 
3379
3387
  export interface DeleteProductsProductsToFacebookCatalogRequest extends Gateway {
@@ -3865,7 +3873,7 @@ export interface GetReturnsRequest extends PagableGateway<GetReturnsRequest, Get
3865
3873
  /** Return a set as its constituent products */
3866
3874
  bundleAsProducts: (value: boolean) => this;
3867
3875
  /** Define range of dates and their type */
3868
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "date_add"|"date_end") => this;
3876
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "date_add"|"date_end") => this;
3869
3877
  }
3870
3878
 
3871
3879
  export interface PostReturnsRequest extends AppendableGateway<PostReturnsRequest, PostReturnsResponse, RequestParams.PostReturnsParams> {
@@ -4620,7 +4628,7 @@ export interface GetWmsStocksdocumentsDocumentsRequest extends PagableGateway<Ge
4620
4628
  /** Number of results on page. Value from 1 to 100 */
4621
4629
  resultsLimit: (value: number|string) => this;
4622
4630
  /** Define range of dates and their type */
4623
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "open"|"modify"|"close"|"stockOperation") => this;
4631
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "open"|"modify"|"close"|"stockOperation") => this;
4624
4632
  }
4625
4633
 
4626
4634
  export interface PostWmsStocksdocumentsDocumentsRequest extends Gateway<PostWmsStocksdocumentsDocumentsResponse, RequestParams.PostWmsStocksdocumentsDocumentsParams> {
@@ -4708,7 +4716,7 @@ export interface GetWmsStocksdocumentsOpenedDocumentsRequest extends PagableGate
4708
4716
  /** Number of results on page. Value from 1 to 100 */
4709
4717
  resultsLimit: (value: number|string) => this;
4710
4718
  /** Define range of dates and their type */
4711
- dates: (dateFrom: DateLike, dateTo: DateLike, type: "open"|"modify") => this;
4719
+ dates: (dateFrom: DateLike, dateTo: DateLike, type?: "open"|"modify") => this;
4712
4720
  }
4713
4721
 
4714
4722
  export interface DeleteWmsStocksdocumentsProductsRequest extends AppendableGateway<DeleteWmsStocksdocumentsProductsRequest> {
@@ -3,7 +3,7 @@ export default (object) => {
3
3
  object.gate = { method: 'get', node: '/packages/labels' };
4
4
  object.custom = {
5
5
  order: (orderSerialNumber) => ({ eventType: "order", eventId: orderSerialNumber }),
6
- rm: (rmaId) => ({ eventType: "rma", eventId: rmaId }),
6
+ rma: (rmaId) => ({ eventType: "rma", eventId: rmaId }),
7
7
  return: (returnId) => ({ eventType: "return", eventId: returnId })
8
8
  };
9
9
  object.req = ["eventId", "eventType"];
@@ -21,6 +21,6 @@ export default (object) => {
21
21
  fromAmazon: orderSource("amazon"),
22
22
  page
23
23
  };
24
- object.arrays = ["ordersStatuses", "ordersStatusesIds", "couriersName", "couriersId", "withMissingSalesDocuments", "ordersIds", "ordersSerialNumbers", "clients", "products", "stocks", "ordersBy"];
24
+ object.arrays = ["ordersStatuses", "ordersStatusesIds", "couriersName", "couriersId", "withMissingSalesDocuments", "ordersIds", "ordersSerialNumbers", "clients", "products", "stocks", "ordersBy", "subscriptionIds"];
25
25
  return new Proxy(object, paramsProxy);
26
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idosell",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Idosell 3 REST connector",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/gateways.d.ts",