plaza-sdk 1.3.22 → 1.4.0
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/lib/cjs/modules/uzum-market-api/common/constants.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/orders/api.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/orders/index.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/orders/params.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/orders/types.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/products/api.js +1 -1
- package/lib/esm/modules/uzum-market-api/common/constants.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/orders/api.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/orders/index.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/orders/params.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/orders/types.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/products/api.js +1 -1
- package/lib/types/src/modules/uzum-market-api/common/constants.d.ts +3 -0
- package/lib/types/src/modules/uzum-market-api/common/interfaces.d.ts +1 -0
- package/lib/types/src/modules/uzum-market-api/common/types.d.ts +4 -1
- package/lib/types/src/modules/uzum-market-api/core/index.d.ts +1 -0
- package/lib/types/src/modules/uzum-market-api/core/orders/api.d.ts +17 -0
- package/lib/types/src/modules/uzum-market-api/core/orders/index.d.ts +2 -0
- package/lib/types/src/modules/uzum-market-api/core/orders/params.d.ts +22 -0
- package/lib/types/src/modules/uzum-market-api/core/orders/types.d.ts +53 -0
- package/lib/types/src/modules/uzum-market-api/core/products/api.d.ts +1 -0
- package/lib/types/src/modules/uzum-market-api/core/products/index.d.ts +1 -0
- package/lib/types/src/modules/uzum-market-api/core/products/types.d.ts +1 -0
- package/lib/types/src/modules/uzum-market-api/core/types.d.ts +84 -1
- package/lib/types/src/modules/uzum-market-api/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.uzumOrderStatuses=["CREATED","PACKING","PENDING_DELIVERY","DELIVERING","DELIVERED","ACCEPTED_AT_DP","DELIVERED_TO_CUSTOMER_DELIVERY_POINT","COMPLETED","CANCELED","PENDING_CANCELLATION","RETURNED"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../../../../common/utils.js");exports.CancelOrderPrice=(r,s)=>r.get("/seller/fbs/v1/penalties/order/seller-cancel/price",{params:s,headers:e.pasteAuthHeader(s?.token)}),exports.ChangeDeliverUntilPrice=(r,s)=>r.get("/seller/fbs/v1/penalties/order/seller-change-deliver-until/price",{params:s,headers:e.pasteAuthHeader(s?.token)}),exports.OrdersList=(r,s)=>r.get("/seller/fbs/v2/orders",{params:s,headers:e.pasteAuthHeader(s?.token)}),exports.SingleOrder=(r,s)=>r.get(`/seller/fbs/order/${s.orderId}`,{headers:e.pasteAuthHeader(s?.token)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./mappers.js"),s=require("../../../../common/utils.js");exports.AddPromotion=(e,t,r)=>e.post(`/seller/shop/${t.shopId}/marketing/calendar-event/add`,r,{headers:s.pasteAuthHeader(t
|
|
1
|
+
"use strict";var e=require("./mappers.js"),s=require("../../../../common/utils.js");exports.AddPromotion=(e,t,r)=>e.post(`/seller/shop/${t.shopId}/marketing/calendar-event/add`,r,{headers:s.pasteAuthHeader(t?.token)}),exports.ArchiveProduct=(e,{shopId:t,skuId:r,...o})=>e.post(`/seller/shop/${t}/product/sku/${r}/archive`,null,{headers:s.pasteAuthHeader(o?.token)}),exports.CheckSkuExists=async(e,t)=>e.get(`/seller/shop/${t.shopId}/product/checkSku`,{headers:s.pasteAuthHeader(t?.token),params:{sku:t.sku}}),exports.CreateProduct=async(e,t,r)=>e.post(`/seller/shop/${t.shopId}/product/createProduct`,r,{headers:s.pasteAuthHeader(t?.token)}),exports.GetProduct=async(e,t)=>e.get(`/seller/shop/${t.shopId}/product`,{params:{productId:t.productId},headers:s.pasteAuthHeader(t?.token)}),exports.InvolvedProductsList=async(e,t)=>e.get(`/seller/shop/${t.shopId}/marketing/calendar-event/products-involved`,{params:{eventId:t.eventId,page:t.page,size:t.size},headers:s.pasteAuthHeader(t?.token)}),exports.ProductDescription=async(e,t)=>e.get(`/seller/shop/${t.shopId}/product/${t.productId}/description-response`,{headers:s.pasteAuthHeader(t?.token)}),exports.ProductsList=async(t,r)=>await t.get(`/seller/shop/${r.shopId}/product/getProducts`,{params:e.ProductListParamsMapper(r),headers:s.pasteAuthHeader(r?.token)}),exports.RemovePromotion=(e,t,r)=>e.post(`/seller/shop/${t.shopId}/marketing/calendar-event/remove`,r,{headers:s.pasteAuthHeader(t?.token)}),exports.SendSkuData=async(e,t,r)=>e.post(`/seller/shop/${t.shopId}/product/sendSkuData`,r,{headers:s.pasteAuthHeader(t?.token)}),exports.UnarchiveProduct=(e,{shopId:t,skuId:r,...o})=>e.post(`/seller/shop/${t}/product/sku/${r}/archive/restore`,null,{headers:s.pasteAuthHeader(o?.token)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E=["CREATED","PACKING","PENDING_DELIVERY","DELIVERING","DELIVERED","ACCEPTED_AT_DP","DELIVERED_TO_CUSTOMER_DELIVERY_POINT","COMPLETED","CANCELED","PENDING_CANCELLATION","RETURNED"];export{E as uzumOrderStatuses};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pasteAuthHeader as e}from"../../../../common/utils.js";const r=(r,s)=>r.get("/seller/fbs/v2/orders",{params:s,headers:e(s?.token)}),s=(r,s)=>r.get(`/seller/fbs/order/${s.orderId}`,{headers:e(s?.token)}),l=(r,s)=>r.get("/seller/fbs/v1/penalties/order/seller-change-deliver-until/price",{params:s,headers:e(s?.token)}),o=(r,s)=>r.get("/seller/fbs/v1/penalties/order/seller-cancel/price",{params:s,headers:e(s?.token)});export{o as CancelOrderPrice,l as ChangeDeliverUntilPrice,r as OrdersList,s as SingleOrder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ProductListParamsMapper as e}from"./mappers.js";import{pasteAuthHeader as s}from"../../../../common/utils.js";const o=(e,{
|
|
1
|
+
import{ProductListParamsMapper as e}from"./mappers.js";import{pasteAuthHeader as s}from"../../../../common/utils.js";const o=(e,{shopId:o,skuId:r,...t})=>e.post(`/seller/shop/${o}/product/sku/${r}/archive`,null,{headers:s(t?.token)}),r=(e,{shopId:o,skuId:r,...t})=>e.post(`/seller/shop/${o}/product/sku/${r}/archive/restore`,null,{headers:s(t?.token)}),t=async(o,r)=>await o.get(`/seller/shop/${r.shopId}/product/getProducts`,{params:e(r),headers:s(r?.token)}),p=(e,o,r)=>e.post(`/seller/shop/${o.shopId}/marketing/calendar-event/remove`,r,{headers:s(o?.token)}),d=(e,o,r)=>e.post(`/seller/shop/${o.shopId}/marketing/calendar-event/add`,r,{headers:s(o?.token)}),a=async(e,o)=>e.get(`/seller/shop/${o.shopId}/marketing/calendar-event/products-involved`,{params:{eventId:o.eventId,page:o.page,size:o.size},headers:s(o?.token)}),n=async(e,o)=>e.get(`/seller/shop/${o.shopId}/product/${o.productId}/description-response`,{headers:s(o?.token)}),h=async(e,o)=>e.get(`/seller/shop/${o.shopId}/product/checkSku`,{headers:s(o?.token),params:{sku:o.sku}}),c=async(e,o,r)=>e.post(`/seller/shop/${o.shopId}/product/createProduct`,r,{headers:s(o?.token)}),l=async(e,o)=>e.get(`/seller/shop/${o.shopId}/product`,{params:{productId:o.productId},headers:s(o?.token)}),u=async(e,o,r)=>e.post(`/seller/shop/${o.shopId}/product/sendSkuData`,r,{headers:s(o?.token)});export{d as AddPromotion,o as ArchiveProduct,h as CheckSkuExists,c as CreateProduct,l as GetProduct,a as InvolvedProductsList,n as ProductDescription,t as ProductsList,p as RemovePromotion,u as SendSkuData,r as UnarchiveProduct};
|
|
@@ -2,6 +2,7 @@ import { NumberNullable, BooleanNullable, StringNullable } from '../../../common
|
|
|
2
2
|
import { IMultiLang } from '../../../common/interfaces.js';
|
|
3
3
|
import { ProductStatuses } from './types.js';
|
|
4
4
|
import 'axios';
|
|
5
|
+
import './constants.js';
|
|
5
6
|
|
|
6
7
|
interface StatusValue {
|
|
7
8
|
value: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { uzumOrderStatuses } from './constants.js';
|
|
2
|
+
|
|
1
3
|
type ProductStatuses = "READY_TO_SEND" | "ARCHIVED" | "IN_STOCK" | "RUN_OUT" | (string & {});
|
|
4
|
+
type OrderStatuses = (typeof uzumOrderStatuses)[number] | (string & {});
|
|
2
5
|
|
|
3
|
-
export type { ProductStatuses };
|
|
6
|
+
export type { OrderStatuses, ProductStatuses };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CallerParam } from '../../../../common/types.js';
|
|
2
|
+
import { OrdersApi } from './types.js';
|
|
3
|
+
import { OrdersListParams, OrderIdBasedParams, OrderIdsBasedParams } from './params.js';
|
|
4
|
+
import 'axios';
|
|
5
|
+
import '../types.js';
|
|
6
|
+
import '../../common/interfaces.js';
|
|
7
|
+
import '../../../../common/interfaces.js';
|
|
8
|
+
import '../../common/types.js';
|
|
9
|
+
import '../../common/constants.js';
|
|
10
|
+
import '../../../../common/params.js';
|
|
11
|
+
|
|
12
|
+
declare const OrdersList: CallerParam<OrdersListParams, OrdersApi.OrdersList.Response>;
|
|
13
|
+
declare const SingleOrder: CallerParam<OrderIdBasedParams, OrdersApi.SingleOrder.Response>;
|
|
14
|
+
declare const ChangeDeliverUntilPrice: CallerParam<OrderIdsBasedParams, OrdersApi.ChangeDeliverUntilPrice.Response>;
|
|
15
|
+
declare const CancelOrderPrice: CallerParam<OrderIdsBasedParams, OrdersApi.CancelOrderPrice.Response>;
|
|
16
|
+
|
|
17
|
+
export { CancelOrderPrice, ChangeDeliverUntilPrice, OrdersList, SingleOrder };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TokenParams } from '../../../../common/params.js';
|
|
2
|
+
import { OrderStatuses } from '../../common/types.js';
|
|
3
|
+
import '../../common/constants.js';
|
|
4
|
+
|
|
5
|
+
interface OrderIdBasedParams extends TokenParams {
|
|
6
|
+
orderId: number;
|
|
7
|
+
}
|
|
8
|
+
interface OrderIdsBasedParams extends TokenParams {
|
|
9
|
+
orderIds: string;
|
|
10
|
+
}
|
|
11
|
+
interface OrdersListParams extends TokenParams {
|
|
12
|
+
page?: number;
|
|
13
|
+
size?: number;
|
|
14
|
+
sortBy?: "CREATED_DATE";
|
|
15
|
+
sortOrder?: "DESC" | "ASC";
|
|
16
|
+
scheme: "FBS" | "DBS";
|
|
17
|
+
statuses: OrderStatuses;
|
|
18
|
+
shopIds?: string;
|
|
19
|
+
places?: "STOCK" | "DROP_OFF" | (string & {});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type { OrderIdBasedParams, OrderIdsBasedParams, OrdersListParams };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UzumMarketEntity } from '../types.js';
|
|
2
|
+
import '../../../../common/types.js';
|
|
3
|
+
import 'axios';
|
|
4
|
+
import '../../common/interfaces.js';
|
|
5
|
+
import '../../../../common/interfaces.js';
|
|
6
|
+
import '../../common/types.js';
|
|
7
|
+
import '../../common/constants.js';
|
|
8
|
+
|
|
9
|
+
declare namespace OrdersEntity {
|
|
10
|
+
interface AllowedOrder {
|
|
11
|
+
orderId: number;
|
|
12
|
+
newDeliverUntil: number;
|
|
13
|
+
price: number;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
declare namespace OrdersApi {
|
|
17
|
+
namespace OrdersList {
|
|
18
|
+
interface Response {
|
|
19
|
+
payload: {
|
|
20
|
+
orders: UzumMarketEntity.BaseOrder[];
|
|
21
|
+
};
|
|
22
|
+
timestamp: string;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
namespace SingleOrder {
|
|
26
|
+
interface Response {
|
|
27
|
+
payload: UzumMarketEntity.SingleOrder;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
namespace ChangeDeliverUntilPrice {
|
|
32
|
+
interface Response {
|
|
33
|
+
payload: {
|
|
34
|
+
prolongedOrders: unknown[];
|
|
35
|
+
allowedOrders: OrdersEntity.AllowedOrder[];
|
|
36
|
+
total: number;
|
|
37
|
+
};
|
|
38
|
+
timestamp: string;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
namespace CancelOrderPrice {
|
|
42
|
+
interface Response {
|
|
43
|
+
payload: {
|
|
44
|
+
orderId: number;
|
|
45
|
+
price: number;
|
|
46
|
+
penaltyParameters: UzumMarketEntity.PenaltyParams;
|
|
47
|
+
};
|
|
48
|
+
timestamp: string;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { OrdersApi, OrdersEntity };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StringNullable, NumberNullable } from '../../../common/types.js';
|
|
2
2
|
import { SkuCharacteristic, StatusValue, Dimensions, PromotionSku, RankInfo, DimensionalGroup, Status, ColorImage, DefinedCharacteristic, ProductFilterValue, ProductMedia, Commission, Filter, RatingInfo, Category } from '../common/interfaces.js';
|
|
3
3
|
import { IMultiLangArray, IMultiLang } from '../../../common/interfaces.js';
|
|
4
|
+
import { OrderStatuses } from '../common/types.js';
|
|
4
5
|
import 'axios';
|
|
5
|
-
import '../common/
|
|
6
|
+
import '../common/constants.js';
|
|
6
7
|
|
|
7
8
|
declare namespace UzumMarketEntity {
|
|
8
9
|
interface SkuCore {
|
|
@@ -220,6 +221,88 @@ declare namespace UzumMarketEntity {
|
|
|
220
221
|
keSeller: boolean;
|
|
221
222
|
pstorage: boolean;
|
|
222
223
|
}
|
|
224
|
+
interface OrderStock {
|
|
225
|
+
id: number;
|
|
226
|
+
externalId: string;
|
|
227
|
+
title: string;
|
|
228
|
+
address: string;
|
|
229
|
+
timeFrom: string;
|
|
230
|
+
timeTo: string;
|
|
231
|
+
poolSource: string;
|
|
232
|
+
dimensionalGroups: DimensionalGroup[];
|
|
233
|
+
}
|
|
234
|
+
interface PenaltyParams {
|
|
235
|
+
freeCancellationHours: number;
|
|
236
|
+
penaltyPercent: number;
|
|
237
|
+
maxPenalty: number;
|
|
238
|
+
minPenalty: number;
|
|
239
|
+
}
|
|
240
|
+
interface IdentifierInfo {
|
|
241
|
+
type: "IMEI";
|
|
242
|
+
required: boolean;
|
|
243
|
+
values: string[];
|
|
244
|
+
}
|
|
245
|
+
interface BaseOrderItem {
|
|
246
|
+
id: number;
|
|
247
|
+
barcode: number;
|
|
248
|
+
skuTitle: string;
|
|
249
|
+
title: string;
|
|
250
|
+
price: number;
|
|
251
|
+
amount: number;
|
|
252
|
+
photo: {
|
|
253
|
+
photo: {
|
|
254
|
+
[key: string]: {
|
|
255
|
+
high: string;
|
|
256
|
+
low: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
photoKey: string;
|
|
260
|
+
color: unknown | null;
|
|
261
|
+
hasVerticalPhoto: boolean;
|
|
262
|
+
};
|
|
263
|
+
identifierInfo: IdentifierInfo | null;
|
|
264
|
+
}
|
|
265
|
+
interface BaseOrder {
|
|
266
|
+
id: number;
|
|
267
|
+
status: OrderStatuses;
|
|
268
|
+
dateCreated: number;
|
|
269
|
+
acceptUntil: number;
|
|
270
|
+
deliverUntil: number;
|
|
271
|
+
deliveringDate: NumberNullable;
|
|
272
|
+
deliveryDate: NumberNullable;
|
|
273
|
+
acceptedDate: NumberNullable;
|
|
274
|
+
deliveredToDeliveryPointDate: NumberNullable;
|
|
275
|
+
completedDate: NumberNullable;
|
|
276
|
+
dateCancelled: NumberNullable;
|
|
277
|
+
returnDate: NumberNullable;
|
|
278
|
+
cancelReason: StringNullable;
|
|
279
|
+
identifierRequired: boolean;
|
|
280
|
+
price: number;
|
|
281
|
+
shopId: number;
|
|
282
|
+
stock: OrderStock;
|
|
283
|
+
orderItems: BaseOrderItem[];
|
|
284
|
+
place: string;
|
|
285
|
+
invoiceNumber: number;
|
|
286
|
+
timeSlot: {
|
|
287
|
+
uuid: string;
|
|
288
|
+
timeFrom: number;
|
|
289
|
+
timeTo: number;
|
|
290
|
+
};
|
|
291
|
+
dropOffPoint: {
|
|
292
|
+
uuid: string;
|
|
293
|
+
address: string;
|
|
294
|
+
type: string;
|
|
295
|
+
};
|
|
296
|
+
scheme: "FBS" | "DBS";
|
|
297
|
+
deliveryInfo: unknown | null;
|
|
298
|
+
acceptanceProlongationsCount: number;
|
|
299
|
+
sellerAcceptanceProlongationsCount: number;
|
|
300
|
+
carrierCode: "DEFAULT" | (string & {});
|
|
301
|
+
}
|
|
302
|
+
interface SingleOrder extends BaseOrder {
|
|
303
|
+
cancelPrice: number | null;
|
|
304
|
+
penaltyParameters: PenaltyParams | null;
|
|
305
|
+
}
|
|
223
306
|
}
|
|
224
307
|
|
|
225
308
|
export { UzumMarketEntity };
|