idosell 0.3.15 → 0.3.17
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/changelog.md +6 -0
- package/dist/enums.d.ts +14 -4
- package/dist/enums.js +14 -4
- package/dist/gateways.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/methods/getOrdersAuctionDetails.js +1 -1
- package/dist/responses.d.ts +576 -278
- 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.17] - 2025-08-02
|
|
9
|
+
### Changed
|
|
10
|
+
- Updated default version to v6
|
|
11
|
+
- Updated order status enums
|
|
12
|
+
- Modified response types to match reality instead of API specification
|
|
13
|
+
|
|
8
14
|
## [0.3.15] - 2025-07-21
|
|
9
15
|
### Fixed
|
|
10
16
|
- Added custom requirements
|
package/dist/enums.d.ts
CHANGED
|
@@ -114,6 +114,16 @@ export enum ORDER_STATUS {
|
|
|
114
114
|
WAIT_FOR_DISPATCH = 'wait_for_dispatch',
|
|
115
115
|
SUSPENDED = 'suspended',
|
|
116
116
|
FINISHED_EXT = 'finished_ext',
|
|
117
|
+
JOINED = 'joined',
|
|
118
|
+
FALSE = 'false',
|
|
119
|
+
CANCELED = 'canceled',
|
|
120
|
+
LOST = 'lost',
|
|
121
|
+
MISSING = 'missing',
|
|
122
|
+
WAIT_FOR_PACKAGING = 'wait_for_packaging',
|
|
123
|
+
WAIT_FOR_RECEIVE = 'wait_for_receive',
|
|
124
|
+
FINISHED = 'finished',
|
|
125
|
+
RETURNED = 'returned',
|
|
126
|
+
COMPLAINED = 'complained'
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
export enum STOCK_DOCUMENT_TYPE {
|
|
@@ -149,9 +159,9 @@ export enum RETURN_STATUS {
|
|
|
149
159
|
/** @description Zwrot rozpatrzony pozytywnie - Zwrot pieniędzy - wypłata zrealizowana */
|
|
150
160
|
ACCEPTED_REFUNDED = 11,
|
|
151
161
|
/** @description Zwrot anulowany przez klienta */
|
|
152
|
-
|
|
162
|
+
CANCELED_BY_CUSTOMER = 13,
|
|
153
163
|
/** @description Zwrot anulowany */
|
|
154
|
-
|
|
164
|
+
CANCELED = 14,
|
|
155
165
|
/** @description Ponowna wysyłka zamówienia */
|
|
156
166
|
RESEND = 15,
|
|
157
167
|
/** @description Zaniechanie ponownej wysyłki zamówienia */
|
|
@@ -192,9 +202,9 @@ export enum RMA_STATUS {
|
|
|
192
202
|
/** @description Reklamacja niepotwierdzona przez obsługę */
|
|
193
203
|
UNCONFIRMED = 15,
|
|
194
204
|
/** @description Reklamacja anulowana */
|
|
195
|
-
|
|
205
|
+
CANCELED = 17,
|
|
196
206
|
/** @description Reklamacja anulowana przez klienta */
|
|
197
|
-
|
|
207
|
+
CANCELED_BY_CUSTOMER = 18,
|
|
198
208
|
/** @description Reklamacja potwierdzona */
|
|
199
209
|
CONFIRMED = 19,
|
|
200
210
|
/** @description Reklamacja nieobsłużona */
|
package/dist/enums.js
CHANGED
|
@@ -115,6 +115,16 @@ var ORDER_STATUS;
|
|
|
115
115
|
ORDER_STATUS["WAIT_FOR_DISPATCH"] = "wait_for_dispatch";
|
|
116
116
|
ORDER_STATUS["SUSPENDED"] = "suspended";
|
|
117
117
|
ORDER_STATUS["FINISHED_EXT"] = "finished_ext";
|
|
118
|
+
ORDER_STATUS["JOINED"] = "joined";
|
|
119
|
+
ORDER_STATUS["FALSE"] = "false";
|
|
120
|
+
ORDER_STATUS["CANCELED"] = "canceled";
|
|
121
|
+
ORDER_STATUS["LOST"] = "lost";
|
|
122
|
+
ORDER_STATUS["MISSING"] = "missing";
|
|
123
|
+
ORDER_STATUS["WAIT_FOR_PACKAGING"] = "wait_for_packaging";
|
|
124
|
+
ORDER_STATUS["WAIT_FOR_RECEIVE"] = "wait_for_receive";
|
|
125
|
+
ORDER_STATUS["FINISHED"] = "finished";
|
|
126
|
+
ORDER_STATUS["RETURNED"] = "returned";
|
|
127
|
+
ORDER_STATUS["COMPLAINED"] = "complained";
|
|
118
128
|
})(ORDER_STATUS || (ORDER_STATUS = {}));
|
|
119
129
|
var STOCK_DOCUMENT_TYPE;
|
|
120
130
|
(function (STOCK_DOCUMENT_TYPE) {
|
|
@@ -150,9 +160,9 @@ var RETURN_STATUS;
|
|
|
150
160
|
/** @description Zwrot rozpatrzony pozytywnie - Zwrot pieniędzy - wypłata zrealizowana */
|
|
151
161
|
RETURN_STATUS[RETURN_STATUS["ACCEPTED_REFUNDED"] = 11] = "ACCEPTED_REFUNDED";
|
|
152
162
|
/** @description Zwrot anulowany przez klienta */
|
|
153
|
-
RETURN_STATUS[RETURN_STATUS["
|
|
163
|
+
RETURN_STATUS[RETURN_STATUS["CANCELED_BY_CUSTOMER"] = 13] = "CANCELED_BY_CUSTOMER";
|
|
154
164
|
/** @description Zwrot anulowany */
|
|
155
|
-
RETURN_STATUS[RETURN_STATUS["
|
|
165
|
+
RETURN_STATUS[RETURN_STATUS["CANCELED"] = 14] = "CANCELED";
|
|
156
166
|
/** @description Ponowna wysyłka zamówienia */
|
|
157
167
|
RETURN_STATUS[RETURN_STATUS["RESEND"] = 15] = "RESEND";
|
|
158
168
|
/** @description Zaniechanie ponownej wysyłki zamówienia */
|
|
@@ -193,9 +203,9 @@ var RMA_STATUS;
|
|
|
193
203
|
/** @description Reklamacja niepotwierdzona przez obsługę */
|
|
194
204
|
RMA_STATUS[RMA_STATUS["UNCONFIRMED"] = 15] = "UNCONFIRMED";
|
|
195
205
|
/** @description Reklamacja anulowana */
|
|
196
|
-
RMA_STATUS[RMA_STATUS["
|
|
206
|
+
RMA_STATUS[RMA_STATUS["CANCELED"] = 17] = "CANCELED";
|
|
197
207
|
/** @description Reklamacja anulowana przez klienta */
|
|
198
|
-
RMA_STATUS[RMA_STATUS["
|
|
208
|
+
RMA_STATUS[RMA_STATUS["CANCELED_BY_CUSTOMER"] = 18] = "CANCELED_BY_CUSTOMER";
|
|
199
209
|
/** @description Reklamacja potwierdzona */
|
|
200
210
|
RMA_STATUS[RMA_STATUS["CONFIRMED"] = 19] = "CONFIRMED";
|
|
201
211
|
/** @description Reklamacja nieobsłużona */
|
package/dist/gateways.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PagableGateway, AppendableGateway, Gateway, DateLike, JSObject } from "./app.d.ts"
|
|
2
|
-
import type { GetClientsResponse, SearchClientsCrmResponse, SearchGiftcardsResponse, SearchNewsletterEmailResponse, SearchNewsletterSmsResponse, SearchOpinionsResponse, SearchOrdersResponse, SearchPackagesResponse, SearchCategoriesIdosellResponse, SearchDeliveryTimeResponse, SearchProductsParametersResponse, SearchProductsResponse, GetReturnsResponse, GetRmaResponse, GetSizechartsResponse, GetConfigResponse, GetShopsDataResponse, GetWarrantiesResponse, GetLocationsResponse, GetStocksdocumentsDocumentsResponse, GetStocksdocumentsProductsResponse } from "./responses.d.ts"
|
|
2
|
+
import type { GetClientsResponse, SearchClientsCrmResponse, SearchGiftcardsResponse, SearchNewsletterEmailResponse, SearchNewsletterSmsResponse, GetMenuResponse, GetAuctionDetailsResponse, GetOrdersDocumentsResponse, SearchOpinionsResponse, SearchOrdersResponse, SearchPackagesResponse, GetCategoriesResponse, SearchCategoriesIdosellResponse, SearchDeliveryTimeResponse, SearchProductsParametersResponse, SearchProductsResponse, GetReturnsResponse, GetRmaResponse, GetSizechartsResponse, GetConfigResponse, GetShopsDataResponse, GetWarrantiesResponse, GetLocationsResponse, GetStocksdocumentsDocumentsResponse, GetStocksdocumentsProductsResponse } from "./responses.d.ts"
|
|
3
3
|
import * as ENUMS from "./enums";
|
|
4
4
|
|
|
5
5
|
export interface GetClientsBalanceRequest extends PagableGateway<GetClientsBalanceRequest> {
|
|
@@ -1290,7 +1290,7 @@ export interface DeleteMenuRequest extends AppendableGateway<DeleteMenuRequest>
|
|
|
1290
1290
|
item_textid: (item_textid: string) => this
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
-
export interface GetMenuRequest extends Gateway {
|
|
1293
|
+
export interface GetMenuRequest extends Gateway<GetMenuResponse> {
|
|
1294
1294
|
/** Shop Id. */
|
|
1295
1295
|
shop_id: (value: number|string) => this;
|
|
1296
1296
|
/** Tree menu ID. */
|
|
@@ -1360,7 +1360,7 @@ export interface GetOrdersAnalyticsRequest extends Gateway {
|
|
|
1360
1360
|
orderSerialNumber: (value: number|string|number[]|string[]) => this;
|
|
1361
1361
|
}
|
|
1362
1362
|
|
|
1363
|
-
export interface GetOrdersAuctionDetailsRequest extends Gateway {
|
|
1363
|
+
export interface GetOrdersAuctionDetailsRequest extends Gateway<GetAuctionDetailsResponse> {
|
|
1364
1364
|
/** Identifier type. */
|
|
1365
1365
|
identType: (value: 'orders_id'|'orders_sn') => this;
|
|
1366
1366
|
/** Orders Id values. */
|
|
@@ -1429,7 +1429,7 @@ export interface DeleteOrdersDocumentsRequest extends AppendableGateway<DeleteOr
|
|
|
1429
1429
|
id: (id: number|string) => this
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
1432
|
-
export interface GetOrdersDocumentsRequest extends Gateway {
|
|
1432
|
+
export interface GetOrdersDocumentsRequest extends Gateway<GetOrdersDocumentsResponse> {
|
|
1433
1433
|
/** Order serial number. */
|
|
1434
1434
|
orderSerialNumber: (value: string|string[]) => this;
|
|
1435
1435
|
/** Document type */
|
|
@@ -2284,7 +2284,7 @@ export interface PutProductsBundlesRenewRequest extends AppendableGateway<PutPro
|
|
|
2284
2284
|
bundleIdent: (bundleIdent: JSObject) => this
|
|
2285
2285
|
}
|
|
2286
2286
|
|
|
2287
|
-
export interface GetProductsCategoriesRequest extends PagableGateway<GetProductsCategoriesRequest> {
|
|
2287
|
+
export interface GetProductsCategoriesRequest extends PagableGateway<GetProductsCategoriesRequest,GetCategoriesResponse> {
|
|
2288
2288
|
/** List of product category identifiers in the panel */
|
|
2289
2289
|
ids: (value: number|string|number[]|string[]) => this;
|
|
2290
2290
|
/** Array of languages categories names should be returned in. "Defaults" value returns categories names in store default language. Not using languages parameter causes a situation, that categories names are returned in all available languages. */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ENUMS from "./enums.js";
|
|
2
2
|
import { gateProxy } from "./gates.js";
|
|
3
|
-
const DEFAULT_VERSION =
|
|
3
|
+
const DEFAULT_VERSION = 6;
|
|
4
4
|
const idosell = (url, apiKey = "", version = DEFAULT_VERSION) => {
|
|
5
5
|
const auth = { url, apiKey, version, apikey: apiKey.slice(0, 6) + '*'.repeat(20) };
|
|
6
6
|
Object.defineProperty(auth, 'apiKey', { enumerable: false });
|
|
@@ -4,7 +4,7 @@ export default (object) => {
|
|
|
4
4
|
object.gate = { method: 'get', node: '/orders/auctionDetails' };
|
|
5
5
|
object.custom = {
|
|
6
6
|
ids: nest("orders", "", { "identType": "order_id" }, true),
|
|
7
|
-
serialNumbers: nest("orders", "", { "identType": "
|
|
7
|
+
serialNumbers: nest("orders", "", { "identType": "orders_sn" }, true)
|
|
8
8
|
};
|
|
9
9
|
return new Proxy(object, paramsProxy);
|
|
10
10
|
};
|