plaza-sdk 1.0.1 → 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.
Files changed (77) hide show
  1. package/lib/browser/bundle.iife.js +1 -1
  2. package/lib/browser/bundle.umd.js +1 -1
  3. package/lib/cjs/common/index.d.ts +3 -0
  4. package/lib/cjs/common/index.js +1 -0
  5. package/lib/cjs/common/interfaces.d.ts +4 -0
  6. package/lib/cjs/index.d.ts +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/modules/index.d.ts +1 -1
  9. package/lib/cjs/modules/index.js +1 -1
  10. package/lib/cjs/modules/uzum-market-api/common/interfaces.d.ts +108 -0
  11. package/lib/cjs/modules/uzum-market-api/core/index.js +1 -0
  12. package/lib/cjs/modules/uzum-market-api/core/products/api.d.ts +16 -0
  13. package/lib/cjs/modules/uzum-market-api/core/products/api.js +1 -0
  14. package/lib/cjs/modules/uzum-market-api/core/products/index.js +1 -0
  15. package/lib/cjs/modules/uzum-market-api/core/products/params.d.ts +26 -0
  16. package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/types.d.ts +12 -2
  17. package/lib/cjs/modules/uzum-market-api/core/types.d.ts +220 -0
  18. package/lib/{esm/modules/uzum-market → cjs/modules/uzum-market-api}/index.d.ts +1 -0
  19. package/lib/cjs/modules/uzum-market-api/index.js +1 -0
  20. package/lib/esm/common/index.d.ts +3 -0
  21. package/lib/esm/common/index.js +1 -0
  22. package/lib/esm/common/interfaces.d.ts +4 -0
  23. package/lib/esm/index.d.ts +1 -1
  24. package/lib/esm/index.js +1 -1
  25. package/lib/esm/modules/index.d.ts +1 -1
  26. package/lib/esm/modules/index.js +1 -1
  27. package/lib/esm/modules/uzum-market-api/common/interfaces.d.ts +108 -0
  28. package/lib/esm/modules/uzum-market-api/core/index.js +1 -0
  29. package/lib/esm/modules/uzum-market-api/core/products/api.d.ts +16 -0
  30. package/lib/esm/modules/uzum-market-api/core/products/api.js +1 -0
  31. package/lib/esm/modules/uzum-market-api/core/products/index.js +1 -0
  32. package/lib/esm/modules/uzum-market-api/core/products/params.d.ts +26 -0
  33. package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/types.d.ts +12 -2
  34. package/lib/esm/modules/uzum-market-api/core/types.d.ts +220 -0
  35. package/lib/{cjs/modules/uzum-market → esm/modules/uzum-market-api}/index.d.ts +1 -0
  36. package/lib/esm/modules/uzum-market-api/index.js +1 -0
  37. package/package.json +9 -6
  38. package/lib/cjs/modules/uzum-market/common/interfaces.d.ts +0 -36
  39. package/lib/cjs/modules/uzum-market/core/index.js +0 -1
  40. package/lib/cjs/modules/uzum-market/core/products/api.d.ts +0 -8
  41. package/lib/cjs/modules/uzum-market/core/products/api.js +0 -1
  42. package/lib/cjs/modules/uzum-market/core/products/index.js +0 -1
  43. package/lib/cjs/modules/uzum-market/core/products/params.d.ts +0 -15
  44. package/lib/cjs/modules/uzum-market/core/types.d.ts +0 -102
  45. package/lib/cjs/modules/uzum-market/index.js +0 -1
  46. package/lib/esm/modules/uzum-market/common/interfaces.d.ts +0 -36
  47. package/lib/esm/modules/uzum-market/core/index.js +0 -1
  48. package/lib/esm/modules/uzum-market/core/products/api.d.ts +0 -8
  49. package/lib/esm/modules/uzum-market/core/products/api.js +0 -1
  50. package/lib/esm/modules/uzum-market/core/products/index.js +0 -1
  51. package/lib/esm/modules/uzum-market/core/products/params.d.ts +0 -15
  52. package/lib/esm/modules/uzum-market/core/types.d.ts +0 -102
  53. package/lib/esm/modules/uzum-market/index.js +0 -1
  54. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/interfaces.js +0 -0
  55. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/types.d.ts +0 -0
  56. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/types.js +0 -0
  57. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/utils.d.ts +0 -0
  58. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/common/utils.js +0 -0
  59. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/index.d.ts +0 -0
  60. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/index.d.ts +0 -0
  61. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/mappers.d.ts +0 -0
  62. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/mappers.js +0 -0
  63. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/params.js +0 -0
  64. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/products/types.js +0 -0
  65. /package/lib/cjs/modules/{uzum-market → uzum-market-api}/core/types.js +0 -0
  66. /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/interfaces.js +0 -0
  67. /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/types.d.ts +0 -0
  68. /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/types.js +0 -0
  69. /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/utils.d.ts +0 -0
  70. /package/lib/esm/modules/{uzum-market → uzum-market-api}/common/utils.js +0 -0
  71. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/index.d.ts +0 -0
  72. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/index.d.ts +0 -0
  73. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/mappers.d.ts +0 -0
  74. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/mappers.js +0 -0
  75. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/params.js +0 -0
  76. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/products/types.js +0 -0
  77. /package/lib/esm/modules/{uzum-market → uzum-market-api}/core/types.js +0 -0
@@ -0,0 +1,26 @@
1
+ export interface TokenAndShopId {
2
+ token: string;
3
+ shopId: number;
4
+ }
5
+ export interface ProductIdBasedParams extends TokenAndShopId {
6
+ productId: number;
7
+ }
8
+ export interface CorePaginationParams {
9
+ page: number;
10
+ size: number;
11
+ }
12
+ export interface SkuIdBasedParams extends TokenAndShopId {
13
+ skuId: number;
14
+ }
15
+ export interface SkuBasedParams extends TokenAndShopId {
16
+ sku: string;
17
+ }
18
+ export type ProductListParams = TokenAndShopId & CorePaginationParams & {
19
+ searchQuery?: string;
20
+ filter: "ALL" & (string & {});
21
+ sortBy: "id" & (string & {});
22
+ order: "ascending" | "descending";
23
+ };
24
+ export type InvolvedProductsParams = TokenAndShopId & CorePaginationParams & {
25
+ eventId: number;
26
+ };
@@ -1,4 +1,4 @@
1
- import { UzumMarketEntity } from "@/modules/uzum-market/core/types";
1
+ import { UzumMarketEntity } from "../types";
2
2
  export declare namespace IApi {
3
3
  namespace ArchiveProduct {
4
4
  type Response = UzumMarketEntity.SkuCore;
@@ -8,7 +8,7 @@ export declare namespace IApi {
8
8
  }
9
9
  namespace ProductsList {
10
10
  interface Response {
11
- productList: UzumMarketEntity.Product[];
11
+ productList: UzumMarketEntity.ProductItem[];
12
12
  totalProductsAmount: number;
13
13
  }
14
14
  }
@@ -24,4 +24,14 @@ export declare namespace IApi {
24
24
  products: UzumMarketEntity.PromotionProduct[];
25
25
  }
26
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
+ }
27
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
+ }
@@ -1 +1,2 @@
1
+ export * from "./common/utils";
1
2
  export * from "./core/products";
@@ -0,0 +1 @@
1
+ export{pasteAuthHeader}from"./common/utils.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./core/products/api.js";
package/package.json CHANGED
@@ -1,15 +1,17 @@
1
1
  {
2
2
  "name": "plaza-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
6
  "import": {
7
7
  "types": "./lib/esm/index.d.ts",
8
- "default": "./lib/esm/index.js"
8
+ "default": "./lib/esm/index.js",
9
+ "uzum-market": "./lib/esm/modules/uzum-market-api/index.js"
9
10
  },
10
11
  "require": {
11
12
  "types": "./lib/cjs/index.d.ts",
12
- "default": "./lib/cjs/index.js"
13
+ "default": "./lib/cjs/index.js",
14
+ "uzum-market": "./lib/cjs/modules/uzum-market-api/index.js"
13
15
  },
14
16
  "types": "./lib/esm/index.d.ts"
15
17
  },
@@ -49,6 +51,7 @@
49
51
  "@rollup/plugin-typescript": "^12.1.4",
50
52
  "@types/lodash": "^4.17.20",
51
53
  "eslint": "^9.32.0",
54
+ "eslint-plugin-import": "^2.32.0",
52
55
  "globals": "^16.3.0",
53
56
  "jiti": "^2.5.1",
54
57
  "prettier": "^3.6.2",
@@ -58,12 +61,12 @@
58
61
  "rollup-plugin-terser": "^7.0.2",
59
62
  "tslib": "^2.8.1",
60
63
  "typescript": "5.8.3",
61
- "typescript-eslint": "^8.38.0"
64
+ "typescript-eslint": "^8.38.0",
65
+ "eslint-config-prettier": "^10.1.8",
66
+ "@typescript-eslint/parser": "^8.38.0"
62
67
  },
63
68
  "dependencies": {
64
- "@typescript-eslint/parser": "^8.38.0",
65
69
  "axios": "^1.11.0",
66
- "eslint-config-prettier": "^10.1.8",
67
70
  "lodash": "^4.17.21"
68
71
  }
69
72
  }
@@ -1,36 +0,0 @@
1
- import { NumberNullable } from "@/common/types";
2
- import { IMultiLang } from "@/common/interfaces";
3
- import { ProductStatuses } from "./types";
4
- export interface StatusValue {
5
- value: string;
6
- title: string;
7
- color: string;
8
- }
9
- export interface PromotionSku {
10
- skuId: number;
11
- newPrice: number;
12
- }
13
- export interface Status {
14
- id: number;
15
- title: string;
16
- value: ProductStatuses;
17
- description: string;
18
- color: string;
19
- additional: unknown[];
20
- }
21
- export interface Dimensions {
22
- length: NumberNullable;
23
- width: NumberNullable;
24
- height: NumberNullable;
25
- weight: NumberNullable;
26
- }
27
- export interface RankInfo {
28
- rank: string;
29
- rankValue: string;
30
- dateUpdated: number;
31
- }
32
- export interface SkuCharacteristic {
33
- characteristicTitle: IMultiLang;
34
- definedType: boolean;
35
- characteristicValue: IMultiLang;
36
- }
@@ -1 +0,0 @@
1
- "use strict";var o=require("./products/api.js");exports.AddPromotion=o.AddPromotion,exports.ArchiveProduct=o.ArchiveProduct,exports.ProductsList=o.ProductsList,exports.RemovePromotion=o.RemovePromotion,exports.UnarchiveProduct=o.UnarchiveProduct;
@@ -1,8 +0,0 @@
1
- import * as Types from "./types";
2
- import * as Params from "./params";
3
- import { CallerParam, CallerParamPayload } from "@/common/types";
4
- export declare const ArchiveProduct: CallerParam<Params.SkuIdBasedParams>;
5
- export declare const UnarchiveProduct: CallerParam<Params.SkuIdBasedParams>;
6
- export declare const ProductsList: CallerParam<Params.ProductListParams>;
7
- export declare const RemovePromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.RemovePromotion.Request>;
8
- export declare const AddPromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.AddPromotion.Request>;
@@ -1 +0,0 @@
1
- "use strict";var e=require("../../common/utils.js"),s=require("./mappers.js");exports.AddPromotion=(s,r,t)=>s.post(`/seller/shop/${r.shopId}/marketing/calendar-event/add`,t,{headers:e.pasteAuthHeader(r.token)}),exports.ArchiveProduct=(s,{token:r,shopId:t,skuId:o})=>s.post(`/seller/shop/${t}/product/sku/${o}/archive`,null,{headers:e.pasteAuthHeader(r)}),exports.ProductsList=async(r,t)=>await r.get(`/seller/shop/${t.shopId}/product/getProducts`,{params:s.ProductListParamsMapper(t),headers:e.pasteAuthHeader(t.token)}),exports.RemovePromotion=(s,r,t)=>s.post(`/seller/shop/${r.shopId}/marketing/calendar-event/remove`,t,{headers:e.pasteAuthHeader(r.token)}),exports.UnarchiveProduct=(s,{token:r,shopId:t,skuId:o})=>s.post(`/seller/shop/${t}/product/sku/${o}/archive/restore`,null,{headers:e.pasteAuthHeader(r)});
@@ -1 +0,0 @@
1
- "use strict";var o=require("./api.js");exports.AddPromotion=o.AddPromotion,exports.ArchiveProduct=o.ArchiveProduct,exports.ProductsList=o.ProductsList,exports.RemovePromotion=o.RemovePromotion,exports.UnarchiveProduct=o.UnarchiveProduct;
@@ -1,15 +0,0 @@
1
- export interface TokenAndShopId {
2
- token: string;
3
- shopId: number;
4
- }
5
- export interface SkuIdBasedParams extends TokenAndShopId {
6
- skuId: number;
7
- }
8
- export interface ProductListParams extends TokenAndShopId {
9
- page: number;
10
- size: number;
11
- searchQuery?: string;
12
- filter: "ALL" & (string & {});
13
- sortBy: "id" & (string & {});
14
- order: "ascending" | "descending";
15
- }
@@ -1,102 +0,0 @@
1
- import { NumberNullable, StringNullable } from "@/common/types";
2
- import { Dimensions, PromotionSku, RankInfo, SkuCharacteristic, Status, StatusValue } from "../common/interfaces";
3
- export declare namespace UzumMarketEntity {
4
- interface SkuCore {
5
- id: number;
6
- skuTitle: string;
7
- quantityCreated: number;
8
- fullPrice: number;
9
- sellPrice: number;
10
- barcode: string;
11
- ikpu: string;
12
- skuCharacteristicList: SkuCharacteristic[];
13
- isActive: boolean;
14
- canEdit: boolean;
15
- blocked: boolean;
16
- status: StatusValue;
17
- commission: number;
18
- }
19
- interface SkuWithDetails extends SkuCore {
20
- dimensions: Dimensions;
21
- article: StringNullable;
22
- switchbackActive: boolean;
23
- marketPrice: number;
24
- blockReasons: unknown[];
25
- }
26
- interface PromotionProduct {
27
- productId: number;
28
- skus: PromotionSku[];
29
- }
30
- interface ProductQuantity {
31
- quantityCreated: number;
32
- quantityActive: number;
33
- quantityFbs: number;
34
- quantityAdditional: number;
35
- quantityOnPhotoStudio: number;
36
- quantityArchived?: number;
37
- quantitySold: number;
38
- quantityReturned: number;
39
- quantityMissing: number;
40
- quantityDefected: number;
41
- quantityPending: number;
42
- returnedPercentage: number;
43
- pstorage: boolean;
44
- }
45
- interface SkuWithQuantities extends Required<ProductQuantity> {
46
- skuTitle: string;
47
- skuFullTitle: string;
48
- productTitle: string;
49
- skuId: number;
50
- barcode: number;
51
- archived: boolean;
52
- commission: NumberNullable;
53
- characteristics: string;
54
- previewImage: string;
55
- ikpu: string;
56
- purchasePrice: NumberNullable;
57
- price: number;
58
- recommendedTotalPrice: NumberNullable;
59
- blockingReason: StringNullable;
60
- blockReasons: string[];
61
- skuBlockReason: StringNullable;
62
- blocked: boolean;
63
- rankInfo: RankInfo;
64
- article: unknown;
65
- turnover: StringNullable;
66
- dimensionalGroup: StringNullable;
67
- paidStorageDimensionalGroup: StringNullable;
68
- paidStoragePriceItem: StringNullable;
69
- paidStorageAmount: StringNullable;
70
- actualDimensionalGroup: StringNullable;
71
- hasStudioPhoto: unknown;
72
- forecastOutOfStock: boolean;
73
- activeSale: boolean;
74
- switchbackActive: boolean;
75
- marketPrice: number;
76
- characteristicsList: SkuCharacteristic[];
77
- status: StatusValue;
78
- skuDimension: Dimensions;
79
- avgdsales: NumberNullable;
80
- avgdquantity: NumberNullable;
81
- }
82
- interface Product extends ProductQuantity {
83
- productId: number;
84
- category: string;
85
- rating: string;
86
- commission: NumberNullable;
87
- status: Status;
88
- skuList: SkuWithQuantities[];
89
- skuTitle: string;
90
- image: string;
91
- title: string;
92
- price: number;
93
- clicks: NumberNullable;
94
- viewers: number;
95
- conversion: number;
96
- blockReason: StringNullable;
97
- blockComment: StringNullable;
98
- dateModerated: StringNullable;
99
- auctionMember: boolean;
100
- isActive: boolean;
101
- }
102
- }
@@ -1 +0,0 @@
1
- "use strict";var o=require("./core/products/api.js");exports.AddPromotion=o.AddPromotion,exports.ArchiveProduct=o.ArchiveProduct,exports.ProductsList=o.ProductsList,exports.RemovePromotion=o.RemovePromotion,exports.UnarchiveProduct=o.UnarchiveProduct;
@@ -1,36 +0,0 @@
1
- import { NumberNullable } from "@/common/types";
2
- import { IMultiLang } from "@/common/interfaces";
3
- import { ProductStatuses } from "./types";
4
- export interface StatusValue {
5
- value: string;
6
- title: string;
7
- color: string;
8
- }
9
- export interface PromotionSku {
10
- skuId: number;
11
- newPrice: number;
12
- }
13
- export interface Status {
14
- id: number;
15
- title: string;
16
- value: ProductStatuses;
17
- description: string;
18
- color: string;
19
- additional: unknown[];
20
- }
21
- export interface Dimensions {
22
- length: NumberNullable;
23
- width: NumberNullable;
24
- height: NumberNullable;
25
- weight: NumberNullable;
26
- }
27
- export interface RankInfo {
28
- rank: string;
29
- rankValue: string;
30
- dateUpdated: number;
31
- }
32
- export interface SkuCharacteristic {
33
- characteristicTitle: IMultiLang;
34
- definedType: boolean;
35
- characteristicValue: IMultiLang;
36
- }
@@ -1 +0,0 @@
1
- export{AddPromotion,ArchiveProduct,ProductsList,RemovePromotion,UnarchiveProduct}from"./products/api.js";
@@ -1,8 +0,0 @@
1
- import * as Types from "./types";
2
- import * as Params from "./params";
3
- import { CallerParam, CallerParamPayload } from "@/common/types";
4
- export declare const ArchiveProduct: CallerParam<Params.SkuIdBasedParams>;
5
- export declare const UnarchiveProduct: CallerParam<Params.SkuIdBasedParams>;
6
- export declare const ProductsList: CallerParam<Params.ProductListParams>;
7
- export declare const RemovePromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.RemovePromotion.Request>;
8
- export declare const AddPromotion: CallerParamPayload<Params.TokenAndShopId, Types.IApi.AddPromotion.Request>;
@@ -1 +0,0 @@
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)}),a=(s,o,r)=>s.post(`/seller/shop/${o.shopId}/marketing/calendar-event/add`,r,{headers:e(o.token)});export{a as AddPromotion,o as ArchiveProduct,t as ProductsList,p as RemovePromotion,r as UnarchiveProduct};
@@ -1 +0,0 @@
1
- export{AddPromotion,ArchiveProduct,ProductsList,RemovePromotion,UnarchiveProduct}from"./api.js";
@@ -1,15 +0,0 @@
1
- export interface TokenAndShopId {
2
- token: string;
3
- shopId: number;
4
- }
5
- export interface SkuIdBasedParams extends TokenAndShopId {
6
- skuId: number;
7
- }
8
- export interface ProductListParams extends TokenAndShopId {
9
- page: number;
10
- size: number;
11
- searchQuery?: string;
12
- filter: "ALL" & (string & {});
13
- sortBy: "id" & (string & {});
14
- order: "ascending" | "descending";
15
- }