plaza-sdk 1.0.2 → 1.0.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/lib/browser/bundle.iife.js +1 -1
- package/lib/browser/bundle.umd.js +1 -1
- package/lib/cjs/common/index.d.ts +3 -0
- package/lib/cjs/common/index.js +1 -0
- package/lib/cjs/common/interfaces.d.ts +4 -0
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/modules/index.d.ts +1 -1
- package/lib/cjs/modules/index.js +1 -1
- package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/interfaces.d.ts +43 -7
- package/lib/cjs/modules/uzum-market-api/core/index.js +1 -0
- package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/api.d.ts +6 -0
- package/lib/cjs/modules/uzum-market-api/core/products/api.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/products/index.js +1 -0
- package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/params.d.ts +3 -0
- package/lib/cjs/modules/uzum-market-api/core/products/types.d.ts +37 -0
- package/lib/cjs/modules/uzum-market-api/core/types.d.ts +220 -0
- package/lib/{esm/modules/uzum-market → cjs/modules/uzum-market-api}/index.d.ts +1 -0
- package/lib/cjs/modules/uzum-market-api/index.js +1 -0
- package/lib/esm/common/index.d.ts +3 -0
- package/lib/esm/common/index.js +1 -0
- package/lib/esm/common/interfaces.d.ts +4 -0
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/modules/index.d.ts +1 -1
- package/lib/esm/modules/index.js +1 -1
- package/lib/esm/modules/{uzum-market → uzum-market-api}/common/interfaces.d.ts +43 -7
- package/lib/esm/modules/uzum-market-api/core/index.js +1 -0
- package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/api.d.ts +6 -0
- package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/api.js +1 -1
- package/lib/esm/modules/uzum-market-api/core/products/index.js +1 -0
- package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/params.d.ts +3 -0
- package/lib/esm/modules/uzum-market-api/core/products/types.d.ts +37 -0
- package/lib/esm/modules/uzum-market-api/core/types.d.ts +220 -0
- package/lib/{cjs/modules/uzum-market → esm/modules/uzum-market-api}/index.d.ts +1 -0
- package/lib/esm/modules/uzum-market-api/index.js +1 -0
- package/package.json +9 -6
- package/lib/cjs/modules/uzum-market/core/index.js +0 -1
- package/lib/cjs/modules/uzum-market/core/products/api.js +0 -1
- package/lib/cjs/modules/uzum-market/core/products/index.js +0 -1
- package/lib/cjs/modules/uzum-market/core/products/types.d.ts +0 -46
- package/lib/cjs/modules/uzum-market/core/types.d.ts +0 -109
- package/lib/cjs/modules/uzum-market/index.js +0 -1
- package/lib/esm/modules/uzum-market/core/index.js +0 -1
- package/lib/esm/modules/uzum-market/core/products/index.js +0 -1
- package/lib/esm/modules/uzum-market/core/products/types.d.ts +0 -46
- package/lib/esm/modules/uzum-market/core/types.d.ts +0 -109
- package/lib/esm/modules/uzum-market/index.js +0 -1
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/interfaces.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/types.d.ts +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/types.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/utils.d.ts +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/utils.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/index.d.ts +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/index.d.ts +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/mappers.d.ts +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/mappers.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/params.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/types.js +0 -0
- /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/types.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/interfaces.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/types.d.ts +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/types.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/utils.d.ts +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/utils.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/index.d.ts +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/index.d.ts +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/mappers.d.ts +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/mappers.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/params.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/types.js +0 -0
- /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var plazaSdk=function(
|
|
1
|
+
var plazaSdk=function(r){"use strict";return r.getNumber=(r,t=0)=>{if("number"==typeof r)return r;if("string"==typeof r){const e=parseFloat(r);return isNaN(e)?t:e}return t},r}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).plazaSdk={})}(this,function(e){"use strict";e.getNumber=(e,t=0)=>{if("number"==typeof e)return e;if("string"==typeof e){const n=parseFloat(e);return isNaN(n)?t:n}return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./utils.js");exports.getNumber=e.getNumber;
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./common";
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./common/utils.js");exports.getNumber=e.getNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./uzum-market";
|
|
1
|
+
export * from "./uzum-market-api";
|
package/lib/cjs/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("./uzum-market-api/common/utils.js"),r=require("./uzum-market-api/core/products/api.js");exports.pasteAuthHeader=t.pasteAuthHeader,exports.AddPromotion=r.AddPromotion,exports.ArchiveProduct=r.ArchiveProduct,exports.CheckSkuExists=r.CheckSkuExists,exports.CreateProduct=r.CreateProduct,exports.GetProduct=r.GetProduct,exports.InvolvedProductsList=r.InvolvedProductsList,exports.ProductDescription=r.ProductDescription,exports.ProductsList=r.ProductsList,exports.RemovePromotion=r.RemovePromotion,exports.SendSkuData=r.SendSkuData,exports.UnarchiveProduct=r.UnarchiveProduct;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NumberNullable } from "@/common/types";
|
|
1
|
+
import { BooleanNullable, NumberNullable, StringNullable } from "@/common/types";
|
|
2
2
|
import { IMultiLang } from "@/common/interfaces";
|
|
3
3
|
import { ProductStatuses } from "./types";
|
|
4
4
|
export interface StatusValue {
|
|
@@ -34,7 +34,7 @@ export interface SkuCharacteristic {
|
|
|
34
34
|
definedType: boolean;
|
|
35
35
|
characteristicValue: IMultiLang;
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface Commission {
|
|
38
38
|
minCommission: number;
|
|
39
39
|
maxCommission: number;
|
|
40
40
|
}
|
|
@@ -42,13 +42,13 @@ export interface CharacteristicValue {
|
|
|
42
42
|
title: IMultiLang;
|
|
43
43
|
value: string;
|
|
44
44
|
skuValue: string;
|
|
45
|
-
wantToPhotoStudio:
|
|
45
|
+
wantToPhotoStudio: BooleanNullable;
|
|
46
46
|
}
|
|
47
47
|
export interface DefinedCharacteristic {
|
|
48
48
|
orderingNumber: number;
|
|
49
49
|
characteristicValues: CharacteristicValue[];
|
|
50
50
|
characteristicTitle: IMultiLang;
|
|
51
|
-
characteristicId:
|
|
51
|
+
characteristicId: NumberNullable;
|
|
52
52
|
defined: boolean;
|
|
53
53
|
requiredType?: string;
|
|
54
54
|
}
|
|
@@ -57,16 +57,52 @@ export interface FilterValue {
|
|
|
57
57
|
value: string;
|
|
58
58
|
title: string;
|
|
59
59
|
predefined: boolean;
|
|
60
|
-
isApproved:
|
|
60
|
+
isApproved: BooleanNullable;
|
|
61
61
|
}
|
|
62
62
|
export interface Filter {
|
|
63
63
|
id: number;
|
|
64
64
|
title: string;
|
|
65
|
-
description:
|
|
65
|
+
description: StringNullable;
|
|
66
66
|
extendableValues: boolean;
|
|
67
67
|
required: boolean;
|
|
68
68
|
values: FilterValue[];
|
|
69
69
|
emptyValue: FilterValue;
|
|
70
|
-
maxLength:
|
|
70
|
+
maxLength: NumberNullable;
|
|
71
71
|
brandFilter: boolean;
|
|
72
72
|
}
|
|
73
|
+
export interface ColorImage {
|
|
74
|
+
colorImage: string;
|
|
75
|
+
imageUrl: string;
|
|
76
|
+
ordering: number;
|
|
77
|
+
deletable: boolean;
|
|
78
|
+
color: IMultiLang;
|
|
79
|
+
status: string;
|
|
80
|
+
}
|
|
81
|
+
export interface Comment {
|
|
82
|
+
comment: IMultiLang;
|
|
83
|
+
commentType: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ProductFilterValue {
|
|
86
|
+
filterId: number;
|
|
87
|
+
filterValueId: number;
|
|
88
|
+
}
|
|
89
|
+
export interface ProductMedia {
|
|
90
|
+
deletable: boolean;
|
|
91
|
+
url: string;
|
|
92
|
+
key: string;
|
|
93
|
+
status: string;
|
|
94
|
+
}
|
|
95
|
+
export interface DimensionalGroup {
|
|
96
|
+
group: string;
|
|
97
|
+
title: string;
|
|
98
|
+
}
|
|
99
|
+
export interface Category {
|
|
100
|
+
id: number;
|
|
101
|
+
title: string;
|
|
102
|
+
productAmount: number;
|
|
103
|
+
parent: Category | null;
|
|
104
|
+
}
|
|
105
|
+
export interface RatingInfo {
|
|
106
|
+
rating: string;
|
|
107
|
+
feedbackQuantity: string;
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./products/api.js");exports.AddPromotion=t.AddPromotion,exports.ArchiveProduct=t.ArchiveProduct,exports.CheckSkuExists=t.CheckSkuExists,exports.CreateProduct=t.CreateProduct,exports.GetProduct=t.GetProduct,exports.InvolvedProductsList=t.InvolvedProductsList,exports.ProductDescription=t.ProductDescription,exports.ProductsList=t.ProductsList,exports.RemovePromotion=t.RemovePromotion,exports.SendSkuData=t.SendSkuData,exports.UnarchiveProduct=t.UnarchiveProduct;
|
|
@@ -8,3 +8,9 @@ export declare const RemovePromotion: CallerParamPayload<Params.TokenAndShopId,
|
|
|
8
8
|
export declare const AddPromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.AddPromotion.Request>;
|
|
9
9
|
export declare const InvolvedProductsList: CallerParam<Params.InvolvedProductsParams>;
|
|
10
10
|
export declare const ProductDescription: CallerParam<Params.ProductIdBasedParams, Types.IApi.ProductDescription.Response>;
|
|
11
|
+
export declare const CheckSkuExists: CallerParam<Params.SkuBasedParams, {
|
|
12
|
+
exists: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const CreateProduct: CallerParamPayload<Params.TokenAndShopId, Types.IApi.CreateProduct.Request, Types.IApi.CreateProduct.Response>;
|
|
15
|
+
export declare const GetProduct: CallerParam<Params.ProductIdBasedParams, Types.IApi.GetProduct.Response>;
|
|
16
|
+
export declare const SendSkuData: CallerParamPayload<Params.TokenAndShopId, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../../common/utils.js"),s=require("./mappers.js");exports.AddPromotion=(s,t,r)=>s.post(`/seller/shop/${t.shopId}/marketing/calendar-event/add`,r,{headers:e.pasteAuthHeader(t.token)}),exports.ArchiveProduct=(s,{token:t,shopId:r,skuId:o})=>s.post(`/seller/shop/${r}/product/sku/${o}/archive`,null,{headers:e.pasteAuthHeader(t)}),exports.CheckSkuExists=async(s,t)=>s.get(`/seller/shop/${t.shopId}/product/checkSku`,{headers:e.pasteAuthHeader(t.token),params:{sku:t.sku}}),exports.CreateProduct=async(s,t,r)=>s.post(`/seller/shop/${t.shopId}/product/createProduct`,r,{headers:e.pasteAuthHeader(t.token)}),exports.GetProduct=async(s,t)=>s.get(`/seller/shop/${t.shopId}/product`,{params:{productId:t.productId},headers:e.pasteAuthHeader(t.token)}),exports.InvolvedProductsList=async(s,t)=>s.get(`/seller/shop/${t.shopId}/marketing/calendar-event/products-involved`,{params:{eventId:t.eventId,page:t.page,size:t.size},headers:e.pasteAuthHeader(t.token)}),exports.ProductDescription=async(s,t)=>s.get(`/seller/shop/${t.shopId}/product/${t.productId}/description-response`,{headers:e.pasteAuthHeader(t.token)}),exports.ProductsList=async(t,r)=>await t.get(`/seller/shop/${r.shopId}/product/getProducts`,{params:s.ProductListParamsMapper(r),headers:e.pasteAuthHeader(r.token)}),exports.RemovePromotion=(s,t,r)=>s.post(`/seller/shop/${t.shopId}/marketing/calendar-event/remove`,r,{headers:e.pasteAuthHeader(t.token)}),exports.SendSkuData=async(s,t,r)=>s.post(`/seller/shop/${t.shopId}/product/sendSkuData`,r,{headers:e.pasteAuthHeader(t.token)}),exports.UnarchiveProduct=(s,{token:t,shopId:r,skuId:o})=>s.post(`/seller/shop/${r}/product/sku/${o}/archive/restore`,null,{headers:e.pasteAuthHeader(t)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./api.js");exports.AddPromotion=t.AddPromotion,exports.ArchiveProduct=t.ArchiveProduct,exports.CheckSkuExists=t.CheckSkuExists,exports.CreateProduct=t.CreateProduct,exports.GetProduct=t.GetProduct,exports.InvolvedProductsList=t.InvolvedProductsList,exports.ProductDescription=t.ProductDescription,exports.ProductsList=t.ProductsList,exports.RemovePromotion=t.RemovePromotion,exports.SendSkuData=t.SendSkuData,exports.UnarchiveProduct=t.UnarchiveProduct;
|
|
@@ -12,6 +12,9 @@ export interface CorePaginationParams {
|
|
|
12
12
|
export interface SkuIdBasedParams extends TokenAndShopId {
|
|
13
13
|
skuId: number;
|
|
14
14
|
}
|
|
15
|
+
export interface SkuBasedParams extends TokenAndShopId {
|
|
16
|
+
sku: string;
|
|
17
|
+
}
|
|
15
18
|
export type ProductListParams = TokenAndShopId & CorePaginationParams & {
|
|
16
19
|
searchQuery?: string;
|
|
17
20
|
filter: "ALL" & (string & {});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UzumMarketEntity } from "../types";
|
|
2
|
+
export declare namespace IApi {
|
|
3
|
+
namespace ArchiveProduct {
|
|
4
|
+
type Response = UzumMarketEntity.SkuCore;
|
|
5
|
+
}
|
|
6
|
+
namespace UnarchiveProduct {
|
|
7
|
+
type Response = UzumMarketEntity.SkuCore;
|
|
8
|
+
}
|
|
9
|
+
namespace ProductsList {
|
|
10
|
+
interface Response {
|
|
11
|
+
productList: UzumMarketEntity.ProductItem[];
|
|
12
|
+
totalProductsAmount: number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
namespace RemovePromotion {
|
|
16
|
+
interface Request {
|
|
17
|
+
calendarEventId: number;
|
|
18
|
+
productId: number;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
namespace AddPromotion {
|
|
22
|
+
interface Request {
|
|
23
|
+
calendarEventId: number;
|
|
24
|
+
products: UzumMarketEntity.PromotionProduct[];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
namespace ProductDescription {
|
|
28
|
+
type Response = UzumMarketEntity.ProductDescriptionInfo;
|
|
29
|
+
}
|
|
30
|
+
namespace CreateProduct {
|
|
31
|
+
type Request = UzumMarketEntity.CreatableProduct;
|
|
32
|
+
type Response = UzumMarketEntity.ProductDescriptionInfo;
|
|
33
|
+
}
|
|
34
|
+
namespace GetProduct {
|
|
35
|
+
type Response = UzumMarketEntity.FullProductDetails;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { NumberNullable, StringNullable } from "@/common/types";
|
|
2
|
+
import { Category, ColorImage, Commission, DefinedCharacteristic, DimensionalGroup, Dimensions, Filter, ProductFilterValue, ProductMedia, PromotionSku, RankInfo, RatingInfo, SkuCharacteristic, Status, StatusValue } from "../common/interfaces";
|
|
3
|
+
import { IMultiLang, IMultiLangArray } from "@/common/interfaces";
|
|
4
|
+
export declare namespace UzumMarketEntity {
|
|
5
|
+
interface SkuCore {
|
|
6
|
+
id: number;
|
|
7
|
+
skuTitle: string;
|
|
8
|
+
quantityCreated: number;
|
|
9
|
+
fullPrice: number;
|
|
10
|
+
sellPrice: number;
|
|
11
|
+
barcode: string;
|
|
12
|
+
ikpu: string;
|
|
13
|
+
skuCharacteristicList: SkuCharacteristic[];
|
|
14
|
+
isActive: boolean;
|
|
15
|
+
canEdit: boolean;
|
|
16
|
+
blocked: boolean;
|
|
17
|
+
status: StatusValue;
|
|
18
|
+
commission: number;
|
|
19
|
+
}
|
|
20
|
+
interface FilledSkuItem extends SkuCore {
|
|
21
|
+
dimensions: Dimensions;
|
|
22
|
+
article: StringNullable;
|
|
23
|
+
switchbackActive: boolean;
|
|
24
|
+
marketPrice: number;
|
|
25
|
+
blockReasons: unknown[];
|
|
26
|
+
}
|
|
27
|
+
interface SkuWithDetails extends SkuCore {
|
|
28
|
+
dimensions: Dimensions;
|
|
29
|
+
article: StringNullable;
|
|
30
|
+
switchbackActive: boolean;
|
|
31
|
+
marketPrice: number;
|
|
32
|
+
blockReasons: unknown[];
|
|
33
|
+
}
|
|
34
|
+
interface PromotionProduct {
|
|
35
|
+
productId: number;
|
|
36
|
+
skus: PromotionSku[];
|
|
37
|
+
}
|
|
38
|
+
interface ProductQuantity {
|
|
39
|
+
quantityCreated: number;
|
|
40
|
+
quantityActive: number;
|
|
41
|
+
quantityFbs: number;
|
|
42
|
+
quantityAdditional: number;
|
|
43
|
+
quantityOnPhotoStudio: number;
|
|
44
|
+
quantityArchived?: number;
|
|
45
|
+
quantitySold: number;
|
|
46
|
+
quantityReturned: number;
|
|
47
|
+
quantityMissing: number;
|
|
48
|
+
quantityDefected: number;
|
|
49
|
+
quantityPending: number;
|
|
50
|
+
returnedPercentage: number;
|
|
51
|
+
pstorage: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface SkuWithCardDetails {
|
|
54
|
+
skuTitle: string;
|
|
55
|
+
productTitle: string;
|
|
56
|
+
skuFullTitle: string;
|
|
57
|
+
archived: boolean;
|
|
58
|
+
characteristics: string;
|
|
59
|
+
previewImage: string;
|
|
60
|
+
ikpu: string;
|
|
61
|
+
recommendedTotalPrice: NumberNullable;
|
|
62
|
+
blockingReason: StringNullable;
|
|
63
|
+
blockReasons: string[];
|
|
64
|
+
skuBlockReason: StringNullable;
|
|
65
|
+
blocked: boolean;
|
|
66
|
+
rankInfo: RankInfo;
|
|
67
|
+
article: unknown;
|
|
68
|
+
paidStorageDimensionalGroup: StringNullable;
|
|
69
|
+
actualDimensionalGroup: DimensionalGroup | null;
|
|
70
|
+
hasStudioPhoto: unknown;
|
|
71
|
+
forecastOutOfStock: boolean;
|
|
72
|
+
activeSale: boolean;
|
|
73
|
+
switchbackActive: boolean;
|
|
74
|
+
marketPrice: number;
|
|
75
|
+
characteristicsList: SkuCharacteristic[];
|
|
76
|
+
status: StatusValue;
|
|
77
|
+
skuDimension: Dimensions;
|
|
78
|
+
}
|
|
79
|
+
interface CreatableSku extends SkuWithCardDetails {
|
|
80
|
+
quantityArchived: number;
|
|
81
|
+
quantityMissing: number;
|
|
82
|
+
returnedPercentage: number;
|
|
83
|
+
}
|
|
84
|
+
type SkuWithQuantities = SkuWithCardDetails & Required<ProductQuantity> & {
|
|
85
|
+
skuId: number;
|
|
86
|
+
barcode: number;
|
|
87
|
+
commission: NumberNullable;
|
|
88
|
+
purchasePrice: NumberNullable;
|
|
89
|
+
price: number;
|
|
90
|
+
turnover: StringNullable;
|
|
91
|
+
dimensionalGroup: StringNullable;
|
|
92
|
+
paidStoragePriceItem: StringNullable;
|
|
93
|
+
paidStorageAmount: StringNullable;
|
|
94
|
+
avgdsales: NumberNullable;
|
|
95
|
+
avgdquantity: NumberNullable;
|
|
96
|
+
};
|
|
97
|
+
interface ProductItem extends ProductQuantity {
|
|
98
|
+
productId: number;
|
|
99
|
+
category: string;
|
|
100
|
+
rating: string;
|
|
101
|
+
commission: NumberNullable;
|
|
102
|
+
status: Status;
|
|
103
|
+
skuList: SkuWithQuantities[];
|
|
104
|
+
skuTitle: string;
|
|
105
|
+
image: string;
|
|
106
|
+
title: string;
|
|
107
|
+
price: number;
|
|
108
|
+
clicks: NumberNullable;
|
|
109
|
+
viewers: number;
|
|
110
|
+
conversion: number;
|
|
111
|
+
blockReason: StringNullable;
|
|
112
|
+
blockComment: StringNullable;
|
|
113
|
+
dateModerated: StringNullable;
|
|
114
|
+
auctionMember: boolean;
|
|
115
|
+
isActive: boolean;
|
|
116
|
+
}
|
|
117
|
+
interface CreatableProduct {
|
|
118
|
+
attributes: IMultiLangArray;
|
|
119
|
+
blockReason: string;
|
|
120
|
+
blockReasons: string[];
|
|
121
|
+
blockComment: string;
|
|
122
|
+
blockedImages: Record<string, unknown>;
|
|
123
|
+
categoryId: number;
|
|
124
|
+
categoryEditable: boolean;
|
|
125
|
+
allFiltersFilled: boolean;
|
|
126
|
+
colorImages: ColorImage[];
|
|
127
|
+
colorCollectionImages: unknown[];
|
|
128
|
+
colorVideos: unknown[];
|
|
129
|
+
comments: Comment[];
|
|
130
|
+
customCharacteristics: unknown[];
|
|
131
|
+
dateModerated: StringNullable;
|
|
132
|
+
definedCharacteristics: DefinedCharacteristic[];
|
|
133
|
+
description: IMultiLang;
|
|
134
|
+
filterValues: ProductFilterValue[];
|
|
135
|
+
filters: unknown[];
|
|
136
|
+
imageCollection: unknown | null;
|
|
137
|
+
okpd2: unknown | null;
|
|
138
|
+
hasAnySkuBlocked: boolean;
|
|
139
|
+
photoOnPreview: boolean;
|
|
140
|
+
productFields: Record<string, unknown>;
|
|
141
|
+
productImages: ProductMedia[];
|
|
142
|
+
productCertificates: unknown[];
|
|
143
|
+
ratingInfo: unknown | null;
|
|
144
|
+
shortDescription: IMultiLang;
|
|
145
|
+
skuBlockReason: unknown | null;
|
|
146
|
+
title: IMultiLang;
|
|
147
|
+
video: ProductMedia | null;
|
|
148
|
+
skuList: UzumMarketEntity.CreatableSku[];
|
|
149
|
+
switchbackActive: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface ProductDescriptionInfo {
|
|
152
|
+
id: number;
|
|
153
|
+
shopSkuTitle: string;
|
|
154
|
+
title: IMultiLang;
|
|
155
|
+
productSkuTitle: string;
|
|
156
|
+
commission: number;
|
|
157
|
+
commissionDto: Commission;
|
|
158
|
+
hasCustomCharacteristics: boolean;
|
|
159
|
+
definedCharacteristicList: DefinedCharacteristic[];
|
|
160
|
+
customCharacteristicList: unknown[];
|
|
161
|
+
skuList: UzumMarketEntity.FilledSkuItem[] | null;
|
|
162
|
+
filters: Filter[];
|
|
163
|
+
newYearStatus: StatusValue;
|
|
164
|
+
hasActiveCalendarEvents: boolean;
|
|
165
|
+
}
|
|
166
|
+
interface FullProductDetails {
|
|
167
|
+
title: IMultiLang;
|
|
168
|
+
productImages: ProductMedia[];
|
|
169
|
+
video: ProductMedia | null;
|
|
170
|
+
imageCollection: unknown | null;
|
|
171
|
+
colorImages: ColorImage[];
|
|
172
|
+
colorVideos: unknown[];
|
|
173
|
+
colorCollectionImages: unknown[];
|
|
174
|
+
status: Status;
|
|
175
|
+
moderationStatus: StatusValue & {
|
|
176
|
+
hasAnySkuBlocked: boolean;
|
|
177
|
+
};
|
|
178
|
+
commissionDto: Commission;
|
|
179
|
+
commission: null;
|
|
180
|
+
ratingInfo: RatingInfo;
|
|
181
|
+
category: Category;
|
|
182
|
+
skuTitle: string;
|
|
183
|
+
skuList: CreatableSku[];
|
|
184
|
+
definedCharacteristics: DefinedCharacteristic[];
|
|
185
|
+
customCharacteristics: DefinedCharacteristic[];
|
|
186
|
+
description: IMultiLang;
|
|
187
|
+
attributes: IMultiLangArray;
|
|
188
|
+
tags: IMultiLang[];
|
|
189
|
+
synonyms: [];
|
|
190
|
+
comments: Comment[];
|
|
191
|
+
filters: Filter[];
|
|
192
|
+
shortDescription: IMultiLang;
|
|
193
|
+
vat: string;
|
|
194
|
+
newYearStatus: StatusValue;
|
|
195
|
+
tnVedCode: unknown | null;
|
|
196
|
+
okpd2: unknown | null;
|
|
197
|
+
conversion: number;
|
|
198
|
+
rankInfo: RankInfo;
|
|
199
|
+
roi: Record<string, number>;
|
|
200
|
+
productFields: Record<string, unknown>;
|
|
201
|
+
applyWatermark: boolean;
|
|
202
|
+
moderationBlockReason: StringNullable;
|
|
203
|
+
blockReason: StringNullable;
|
|
204
|
+
blockComment: StringNullable;
|
|
205
|
+
dateModerated: null;
|
|
206
|
+
blockReasons: [];
|
|
207
|
+
skusHasAllRequiredFilters: true;
|
|
208
|
+
allFiltersFilled: boolean;
|
|
209
|
+
hasAnySkuBlocked: boolean;
|
|
210
|
+
wantToPhotoStudio: null;
|
|
211
|
+
isIlliquid: boolean;
|
|
212
|
+
customCharacteristicClosed: boolean;
|
|
213
|
+
productCertificates: unknown[];
|
|
214
|
+
switchbackActive: boolean;
|
|
215
|
+
promotionStatus: string;
|
|
216
|
+
categoryEditable: boolean;
|
|
217
|
+
keSeller: boolean;
|
|
218
|
+
pstorage: boolean;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("./common/utils.js"),o=require("./core/products/api.js");exports.pasteAuthHeader=t.pasteAuthHeader,exports.AddPromotion=o.AddPromotion,exports.ArchiveProduct=o.ArchiveProduct,exports.CheckSkuExists=o.CheckSkuExists,exports.CreateProduct=o.CreateProduct,exports.GetProduct=o.GetProduct,exports.InvolvedProductsList=o.InvolvedProductsList,exports.ProductDescription=o.ProductDescription,exports.ProductsList=o.ProductsList,exports.RemovePromotion=o.RemovePromotion,exports.SendSkuData=o.SendSkuData,exports.UnarchiveProduct=o.UnarchiveProduct;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{getNumber}from"./utils.js";
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./common";
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{getNumber}from"./common/utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./uzum-market";
|
|
1
|
+
export * from "./uzum-market-api";
|
package/lib/esm/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddPromotion,ArchiveProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,UnarchiveProduct}from"./uzum-market/core/products/api.js";
|
|
1
|
+
export{pasteAuthHeader}from"./uzum-market-api/common/utils.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./uzum-market-api/core/products/api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NumberNullable } from "@/common/types";
|
|
1
|
+
import { BooleanNullable, NumberNullable, StringNullable } from "@/common/types";
|
|
2
2
|
import { IMultiLang } from "@/common/interfaces";
|
|
3
3
|
import { ProductStatuses } from "./types";
|
|
4
4
|
export interface StatusValue {
|
|
@@ -34,7 +34,7 @@ export interface SkuCharacteristic {
|
|
|
34
34
|
definedType: boolean;
|
|
35
35
|
characteristicValue: IMultiLang;
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface Commission {
|
|
38
38
|
minCommission: number;
|
|
39
39
|
maxCommission: number;
|
|
40
40
|
}
|
|
@@ -42,13 +42,13 @@ export interface CharacteristicValue {
|
|
|
42
42
|
title: IMultiLang;
|
|
43
43
|
value: string;
|
|
44
44
|
skuValue: string;
|
|
45
|
-
wantToPhotoStudio:
|
|
45
|
+
wantToPhotoStudio: BooleanNullable;
|
|
46
46
|
}
|
|
47
47
|
export interface DefinedCharacteristic {
|
|
48
48
|
orderingNumber: number;
|
|
49
49
|
characteristicValues: CharacteristicValue[];
|
|
50
50
|
characteristicTitle: IMultiLang;
|
|
51
|
-
characteristicId:
|
|
51
|
+
characteristicId: NumberNullable;
|
|
52
52
|
defined: boolean;
|
|
53
53
|
requiredType?: string;
|
|
54
54
|
}
|
|
@@ -57,16 +57,52 @@ export interface FilterValue {
|
|
|
57
57
|
value: string;
|
|
58
58
|
title: string;
|
|
59
59
|
predefined: boolean;
|
|
60
|
-
isApproved:
|
|
60
|
+
isApproved: BooleanNullable;
|
|
61
61
|
}
|
|
62
62
|
export interface Filter {
|
|
63
63
|
id: number;
|
|
64
64
|
title: string;
|
|
65
|
-
description:
|
|
65
|
+
description: StringNullable;
|
|
66
66
|
extendableValues: boolean;
|
|
67
67
|
required: boolean;
|
|
68
68
|
values: FilterValue[];
|
|
69
69
|
emptyValue: FilterValue;
|
|
70
|
-
maxLength:
|
|
70
|
+
maxLength: NumberNullable;
|
|
71
71
|
brandFilter: boolean;
|
|
72
72
|
}
|
|
73
|
+
export interface ColorImage {
|
|
74
|
+
colorImage: string;
|
|
75
|
+
imageUrl: string;
|
|
76
|
+
ordering: number;
|
|
77
|
+
deletable: boolean;
|
|
78
|
+
color: IMultiLang;
|
|
79
|
+
status: string;
|
|
80
|
+
}
|
|
81
|
+
export interface Comment {
|
|
82
|
+
comment: IMultiLang;
|
|
83
|
+
commentType: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ProductFilterValue {
|
|
86
|
+
filterId: number;
|
|
87
|
+
filterValueId: number;
|
|
88
|
+
}
|
|
89
|
+
export interface ProductMedia {
|
|
90
|
+
deletable: boolean;
|
|
91
|
+
url: string;
|
|
92
|
+
key: string;
|
|
93
|
+
status: string;
|
|
94
|
+
}
|
|
95
|
+
export interface DimensionalGroup {
|
|
96
|
+
group: string;
|
|
97
|
+
title: string;
|
|
98
|
+
}
|
|
99
|
+
export interface Category {
|
|
100
|
+
id: number;
|
|
101
|
+
title: string;
|
|
102
|
+
productAmount: number;
|
|
103
|
+
parent: Category | null;
|
|
104
|
+
}
|
|
105
|
+
export interface RatingInfo {
|
|
106
|
+
rating: string;
|
|
107
|
+
feedbackQuantity: string;
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./products/api.js";
|
|
@@ -8,3 +8,9 @@ export declare const RemovePromotion: CallerParamPayload<Params.TokenAndShopId,
|
|
|
8
8
|
export declare const AddPromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.AddPromotion.Request>;
|
|
9
9
|
export declare const InvolvedProductsList: CallerParam<Params.InvolvedProductsParams>;
|
|
10
10
|
export declare const ProductDescription: CallerParam<Params.ProductIdBasedParams, Types.IApi.ProductDescription.Response>;
|
|
11
|
+
export declare const CheckSkuExists: CallerParam<Params.SkuBasedParams, {
|
|
12
|
+
exists: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const CreateProduct: CallerParamPayload<Params.TokenAndShopId, Types.IApi.CreateProduct.Request, Types.IApi.CreateProduct.Response>;
|
|
15
|
+
export declare const GetProduct: CallerParam<Params.ProductIdBasedParams, Types.IApi.GetProduct.Response>;
|
|
16
|
+
export declare const SendSkuData: CallerParamPayload<Params.TokenAndShopId, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pasteAuthHeader as e}from"../../common/utils.js";import{ProductListParamsMapper as s}from"./mappers.js";const o=(s,{token:o,shopId:r,skuId:t})=>s.post(`/seller/shop/${r}/product/sku/${t}/archive`,null,{headers:e(o)}),r=(s,{token:o,shopId:r,skuId:t})=>s.post(`/seller/shop/${r}/product/sku/${t}/archive/restore`,null,{headers:e(o)}),t=async(o,r)=>await o.get(`/seller/shop/${r.shopId}/product/getProducts`,{params:s(r),headers:e(r.token)}),p=(s,o,r)=>s.post(`/seller/shop/${o.shopId}/marketing/calendar-event/remove`,r,{headers:e(o.token)}),d=(s,o,r)=>s.post(`/seller/shop/${o.shopId}/marketing/calendar-event/add`,r,{headers:e(o.token)}),a=async(s,o)=>s.get(`/seller/shop/${o.shopId}/marketing/calendar-event/products-involved`,{params:{eventId:o.eventId,page:o.page,size:o.size},headers:e(o.token)}),n=async(s,o)=>s.get(`/seller/shop/${o.shopId}/product/${o.productId}/description-response`,{headers:e(o.token)});export{d as AddPromotion,o as ArchiveProduct,a as InvolvedProductsList,n as ProductDescription,t as ProductsList,p as RemovePromotion,r as UnarchiveProduct};
|
|
1
|
+
import{pasteAuthHeader as e}from"../../common/utils.js";import{ProductListParamsMapper as s}from"./mappers.js";const o=(s,{token:o,shopId:r,skuId:t})=>s.post(`/seller/shop/${r}/product/sku/${t}/archive`,null,{headers:e(o)}),r=(s,{token:o,shopId:r,skuId:t})=>s.post(`/seller/shop/${r}/product/sku/${t}/archive/restore`,null,{headers:e(o)}),t=async(o,r)=>await o.get(`/seller/shop/${r.shopId}/product/getProducts`,{params:s(r),headers:e(r.token)}),p=(s,o,r)=>s.post(`/seller/shop/${o.shopId}/marketing/calendar-event/remove`,r,{headers:e(o.token)}),d=(s,o,r)=>s.post(`/seller/shop/${o.shopId}/marketing/calendar-event/add`,r,{headers:e(o.token)}),a=async(s,o)=>s.get(`/seller/shop/${o.shopId}/marketing/calendar-event/products-involved`,{params:{eventId:o.eventId,page:o.page,size:o.size},headers:e(o.token)}),n=async(s,o)=>s.get(`/seller/shop/${o.shopId}/product/${o.productId}/description-response`,{headers:e(o.token)}),h=async(s,o)=>s.get(`/seller/shop/${o.shopId}/product/checkSku`,{headers:e(o.token),params:{sku:o.sku}}),c=async(s,o,r)=>s.post(`/seller/shop/${o.shopId}/product/createProduct`,r,{headers:e(o.token)}),l=async(s,o)=>s.get(`/seller/shop/${o.shopId}/product`,{params:{productId:o.productId},headers:e(o.token)}),u=async(s,o,r)=>s.post(`/seller/shop/${o.shopId}/product/sendSkuData`,r,{headers:e(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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./api.js";
|
|
@@ -12,6 +12,9 @@ export interface CorePaginationParams {
|
|
|
12
12
|
export interface SkuIdBasedParams extends TokenAndShopId {
|
|
13
13
|
skuId: number;
|
|
14
14
|
}
|
|
15
|
+
export interface SkuBasedParams extends TokenAndShopId {
|
|
16
|
+
sku: string;
|
|
17
|
+
}
|
|
15
18
|
export type ProductListParams = TokenAndShopId & CorePaginationParams & {
|
|
16
19
|
searchQuery?: string;
|
|
17
20
|
filter: "ALL" & (string & {});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UzumMarketEntity } from "../types";
|
|
2
|
+
export declare namespace IApi {
|
|
3
|
+
namespace ArchiveProduct {
|
|
4
|
+
type Response = UzumMarketEntity.SkuCore;
|
|
5
|
+
}
|
|
6
|
+
namespace UnarchiveProduct {
|
|
7
|
+
type Response = UzumMarketEntity.SkuCore;
|
|
8
|
+
}
|
|
9
|
+
namespace ProductsList {
|
|
10
|
+
interface Response {
|
|
11
|
+
productList: UzumMarketEntity.ProductItem[];
|
|
12
|
+
totalProductsAmount: number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
namespace RemovePromotion {
|
|
16
|
+
interface Request {
|
|
17
|
+
calendarEventId: number;
|
|
18
|
+
productId: number;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
namespace AddPromotion {
|
|
22
|
+
interface Request {
|
|
23
|
+
calendarEventId: number;
|
|
24
|
+
products: UzumMarketEntity.PromotionProduct[];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
namespace ProductDescription {
|
|
28
|
+
type Response = UzumMarketEntity.ProductDescriptionInfo;
|
|
29
|
+
}
|
|
30
|
+
namespace CreateProduct {
|
|
31
|
+
type Request = UzumMarketEntity.CreatableProduct;
|
|
32
|
+
type Response = UzumMarketEntity.ProductDescriptionInfo;
|
|
33
|
+
}
|
|
34
|
+
namespace GetProduct {
|
|
35
|
+
type Response = UzumMarketEntity.FullProductDetails;
|
|
36
|
+
}
|
|
37
|
+
}
|