@sales-planner/shared 0.14.1 → 0.15.1
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/README.md +31 -5
- package/dist/dto/competitor-products.d.ts +30 -0
- package/dist/dto/competitor-products.d.ts.map +1 -0
- package/dist/dto/competitor-products.js +2 -0
- package/dist/dto/competitor-sales.d.ts +29 -0
- package/dist/dto/competitor-sales.d.ts.map +1 -0
- package/dist/dto/competitor-sales.js +2 -0
- package/dist/dto/index.d.ts +6 -0
- package/dist/dto/index.d.ts.map +1 -1
- package/dist/dto/index.js +6 -0
- package/dist/dto/leftovers.d.ts +31 -0
- package/dist/dto/leftovers.d.ts.map +1 -0
- package/dist/dto/leftovers.js +2 -0
- package/dist/dto/seasonal-coefficients.d.ts +22 -0
- package/dist/dto/seasonal-coefficients.d.ts.map +1 -0
- package/dist/dto/seasonal-coefficients.js +2 -0
- package/dist/dto/sku-competitor-mappings.d.ts +20 -0
- package/dist/dto/sku-competitor-mappings.d.ts.map +1 -0
- package/dist/dto/sku-competitor-mappings.js +2 -0
- package/dist/dto/warehouses.d.ts +7 -0
- package/dist/dto/warehouses.d.ts.map +1 -0
- package/dist/dto/warehouses.js +2 -0
- package/dist/entities/competitor-products.d.ts +12 -0
- package/dist/entities/competitor-products.d.ts.map +1 -0
- package/dist/entities/competitor-products.js +2 -0
- package/dist/entities/competitor-sales.d.ts +11 -0
- package/dist/entities/competitor-sales.d.ts.map +1 -0
- package/dist/entities/competitor-sales.js +2 -0
- package/dist/entities/index.d.ts +6 -0
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +6 -0
- package/dist/entities/leftovers.d.ts +12 -0
- package/dist/entities/leftovers.d.ts.map +1 -0
- package/dist/entities/leftovers.js +2 -0
- package/dist/entities/seasonal-coefficients.d.ts +11 -0
- package/dist/entities/seasonal-coefficients.d.ts.map +1 -0
- package/dist/entities/seasonal-coefficients.js +2 -0
- package/dist/entities/sku-competitor-mappings.d.ts +10 -0
- package/dist/entities/sku-competitor-mappings.d.ts.map +1 -0
- package/dist/entities/sku-competitor-mappings.js +2 -0
- package/dist/entities/warehouses.d.ts +4 -0
- package/dist/entities/warehouses.d.ts.map +1 -0
- package/dist/entities/warehouses.js +2 -0
- package/dist/metadata.d.ts +6 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +176 -0
- package/dist/responses/export.d.ts +29 -0
- package/dist/responses/export.d.ts.map +1 -1
- package/dist/responses/import.d.ts +6 -0
- package/dist/responses/import.d.ts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -55,8 +55,9 @@ export type CreateUserRequest = CreateUserDto;
|
|
|
55
55
|
```typescript
|
|
56
56
|
import type {
|
|
57
57
|
// Entities
|
|
58
|
-
User, Tenant, Shop, Sku, Brand, Category, Group, Status, Supplier,
|
|
59
|
-
SalesHistory,
|
|
58
|
+
User, Tenant, Shop, Sku, Brand, Category, Group, Status, Supplier, Warehouse,
|
|
59
|
+
SalesHistory, Leftover, SeasonalCoefficient, SkuCompetitorMapping, CompetitorSale,
|
|
60
|
+
Role, UserRole, ApiKey, Marketplace,
|
|
60
61
|
|
|
61
62
|
// Request types (HTTP layer)
|
|
62
63
|
CreateUserRequest, UpdateUserRequest,
|
|
@@ -66,7 +67,12 @@ import type {
|
|
|
66
67
|
CreateGroupRequest, UpdateGroupRequest,
|
|
67
68
|
CreateStatusRequest, UpdateStatusRequest,
|
|
68
69
|
CreateSupplierRequest, UpdateSupplierRequest,
|
|
70
|
+
CreateWarehouseRequest, UpdateWarehouseRequest,
|
|
69
71
|
CreateSalesHistoryRequest, UpdateSalesHistoryRequest,
|
|
72
|
+
CreateLeftoverRequest, UpdateLeftoverRequest,
|
|
73
|
+
CreateSeasonalCoefficientRequest, UpdateSeasonalCoefficientRequest,
|
|
74
|
+
CreateSkuCompetitorMappingRequest, UpdateSkuCompetitorMappingRequest,
|
|
75
|
+
CreateCompetitorSaleRequest, UpdateCompetitorSaleRequest,
|
|
70
76
|
|
|
71
77
|
// DTO types (Service layer)
|
|
72
78
|
CreateUserDto, UpdateUserDto,
|
|
@@ -76,21 +82,29 @@ import type {
|
|
|
76
82
|
CreateGroupDto, UpdateGroupDto,
|
|
77
83
|
CreateStatusDto, UpdateStatusDto,
|
|
78
84
|
CreateSupplierDto, UpdateSupplierDto,
|
|
85
|
+
CreateWarehouseDto, UpdateWarehouseDto,
|
|
79
86
|
CreateSalesHistoryDto, UpdateSalesHistoryDto,
|
|
87
|
+
CreateLeftoverDto, UpdateLeftoverDto,
|
|
88
|
+
CreateSeasonalCoefficientDto, UpdateSeasonalCoefficientDto,
|
|
89
|
+
CreateSkuCompetitorMappingDto, UpdateSkuCompetitorMappingDto,
|
|
90
|
+
CreateCompetitorSaleDto, UpdateCompetitorSaleDto,
|
|
80
91
|
|
|
81
92
|
// Import types
|
|
82
93
|
ImportSkuItem, ImportBrandItem, ImportCategoryItem, ImportGroupItem, ImportStatusItem,
|
|
83
|
-
ImportSupplierItem, ImportSalesHistoryItem, ImportMarketplaceItem,
|
|
94
|
+
ImportSupplierItem, ImportWarehouseItem, ImportSalesHistoryItem, ImportMarketplaceItem,
|
|
95
|
+
ImportLeftoverItem, ImportSeasonalCoefficientItem, ImportSkuCompetitorMappingItem, ImportCompetitorSaleItem,
|
|
84
96
|
|
|
85
97
|
// Query types
|
|
86
98
|
ShopContextParams, PaginationQuery, PeriodQuery, SalesHistoryQuery,
|
|
99
|
+
LeftoverQuery, CompetitorSaleQuery,
|
|
87
100
|
|
|
88
101
|
// Response types
|
|
89
102
|
PaginatedResponse,
|
|
90
103
|
UserWithRolesAndTenants, TenantWithShopAndApiKey,
|
|
91
104
|
ImportResult, DeleteDataResult,
|
|
92
105
|
SkuExportItem, BrandExportItem, CategoryExportItem, GroupExportItem, StatusExportItem,
|
|
93
|
-
SupplierExportItem, MarketplaceExportItem, SalesHistoryExportItem
|
|
106
|
+
SupplierExportItem, WarehouseExportItem, MarketplaceExportItem, SalesHistoryExportItem,
|
|
107
|
+
LeftoverExportItem, SeasonalCoefficientExportItem, SkuCompetitorMappingExportItem, CompetitorSaleExportItem
|
|
94
108
|
} from '@sales-planner/shared';
|
|
95
109
|
```
|
|
96
110
|
|
|
@@ -116,7 +130,12 @@ The API uses **numeric IDs** internally for referential integrity:
|
|
|
116
130
|
| `Group` | Product group for classification (shop-scoped) |
|
|
117
131
|
| `Status` | Product status for classification (shop-scoped) |
|
|
118
132
|
| `Supplier` | Product supplier (shop-scoped) |
|
|
133
|
+
| `Warehouse` | Storage location (shop-scoped) |
|
|
119
134
|
| `SalesHistory` | Sales record for a period (uses numeric marketplace_id) |
|
|
135
|
+
| `Leftover` | Inventory leftover for a warehouse/sku/period |
|
|
136
|
+
| `SeasonalCoefficient` | Seasonal sales coefficient for a group/month |
|
|
137
|
+
| `SkuCompetitorMapping` | Mapping between our SKU and competitor's SKU code |
|
|
138
|
+
| `CompetitorSale` | Competitor sales data (marketplace + marketplace_product_id + period) |
|
|
120
139
|
| `Role` | Access role |
|
|
121
140
|
| `UserRole` | User-role assignment |
|
|
122
141
|
| `ApiKey` | API authentication key |
|
|
@@ -130,6 +149,8 @@ The API uses **numeric IDs** internally for referential integrity:
|
|
|
130
149
|
| `PaginationQuery` | `{ limit?: number; offset?: number }` |
|
|
131
150
|
| `PeriodQuery` | `{ period_from?: string; period_to?: string }` |
|
|
132
151
|
| `SalesHistoryQuery` | `PaginationQuery & PeriodQuery` |
|
|
152
|
+
| `LeftoverQuery` | `PaginationQuery & PeriodQuery` |
|
|
153
|
+
| `CompetitorSaleQuery` | `PaginationQuery & PeriodQuery` |
|
|
133
154
|
|
|
134
155
|
### Response Types
|
|
135
156
|
|
|
@@ -137,15 +158,20 @@ The API uses **numeric IDs** internally for referential integrity:
|
|
|
137
158
|
|------|-------------|| `PaginatedResponse<T>` | `{ items: T[]; total: number; limit: number; offset: number }` || `UserWithRolesAndTenants` | User with their roles and tenants |
|
|
138
159
|
| `TenantWithShopAndApiKey` | Created tenant with shop and API key |
|
|
139
160
|
| `ImportResult` | `{ created: number; updated: number; errors: string[] }` |
|
|
140
|
-
| `DeleteDataResult` | `{ skusDeleted, salesHistoryDeleted, marketplacesDeleted, brandsDeleted, categoriesDeleted, groupsDeleted, statusesDeleted, suppliersDeleted: number }` |
|
|
161
|
+
| `DeleteDataResult` | `{ skusDeleted, salesHistoryDeleted, leftoversDeleted, seasonalCoefficientsDeleted, skuCompetitorMappingsDeleted, competitorSalesDeleted, marketplacesDeleted, brandsDeleted, categoriesDeleted, groupsDeleted, statusesDeleted, suppliersDeleted, warehousesDeleted: number }` |
|
|
141
162
|
| `SkuExportItem` | SKU data for export |
|
|
142
163
|
| `BrandExportItem` | Brand data for export |
|
|
143
164
|
| `CategoryExportItem` | Category data for export |
|
|
144
165
|
| `GroupExportItem` | Group data for export |
|
|
145
166
|
| `StatusExportItem` | Status data for export |
|
|
146
167
|
| `SupplierExportItem` | Supplier data for export |
|
|
168
|
+
| `WarehouseExportItem` | Warehouse data for export |
|
|
147
169
|
| `MarketplaceExportItem` | Marketplace data for export |
|
|
148
170
|
| `SalesHistoryExportItem` | Sales history data for export |
|
|
171
|
+
| `LeftoverExportItem` | Leftover data for export |
|
|
172
|
+
| `SeasonalCoefficientExportItem` | Seasonal coefficient data for export |
|
|
173
|
+
| `SkuCompetitorMappingExportItem` | SKU competitor mapping data for export |
|
|
174
|
+
| `CompetitorSaleExportItem` | Competitor sale data for export |
|
|
149
175
|
|
|
150
176
|
## Related Packages
|
|
151
177
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface CreateCompetitorProductRequest {
|
|
2
|
+
marketplace_id: number;
|
|
3
|
+
marketplace_product_id: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
brand?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateCompetitorProductDto {
|
|
8
|
+
tenant_id: number;
|
|
9
|
+
shop_id: number;
|
|
10
|
+
marketplace_id: number;
|
|
11
|
+
marketplace_product_id: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
brand?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface UpdateCompetitorProductDto {
|
|
16
|
+
title?: string;
|
|
17
|
+
brand?: string;
|
|
18
|
+
}
|
|
19
|
+
export type UpdateCompetitorProductRequest = UpdateCompetitorProductDto;
|
|
20
|
+
export interface ImportCompetitorProductItem {
|
|
21
|
+
marketplace: string;
|
|
22
|
+
marketplaceProductId: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
brand?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CompetitorProductQuery {
|
|
27
|
+
limit?: number;
|
|
28
|
+
offset?: number;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=competitor-products.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competitor-products.d.ts","sourceRoot":"","sources":["../../src/dto/competitor-products.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,8BAA8B;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface CreateCompetitorSaleRequest {
|
|
2
|
+
competitor_product_id: number;
|
|
3
|
+
period: string;
|
|
4
|
+
quantity: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CreateCompetitorSaleDto {
|
|
7
|
+
tenant_id: number;
|
|
8
|
+
shop_id: number;
|
|
9
|
+
competitor_product_id: number;
|
|
10
|
+
period: string;
|
|
11
|
+
quantity: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateCompetitorSaleDto {
|
|
14
|
+
quantity?: number;
|
|
15
|
+
}
|
|
16
|
+
export type UpdateCompetitorSaleRequest = UpdateCompetitorSaleDto;
|
|
17
|
+
export interface ImportCompetitorSaleItem {
|
|
18
|
+
marketplace: string;
|
|
19
|
+
marketplaceProductId: string;
|
|
20
|
+
period: string;
|
|
21
|
+
quantity: number;
|
|
22
|
+
}
|
|
23
|
+
export interface CompetitorSaleQuery {
|
|
24
|
+
period_from?: string;
|
|
25
|
+
period_to?: string;
|
|
26
|
+
limit?: number;
|
|
27
|
+
offset?: number;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=competitor-sales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competitor-sales.d.ts","sourceRoot":"","sources":["../../src/dto/competitor-sales.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,2BAA2B;IAC1C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC;AAElE,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/dist/dto/index.d.ts
CHANGED
|
@@ -17,7 +17,13 @@ export * from './categories';
|
|
|
17
17
|
export * from './groups';
|
|
18
18
|
export * from './statuses';
|
|
19
19
|
export * from './suppliers';
|
|
20
|
+
export * from './warehouses';
|
|
20
21
|
export * from './sales-history';
|
|
22
|
+
export * from './leftovers';
|
|
23
|
+
export * from './seasonal-coefficients';
|
|
24
|
+
export * from './competitor-products';
|
|
25
|
+
export * from './sku-competitor-mappings';
|
|
26
|
+
export * from './competitor-sales';
|
|
21
27
|
export * from './marketplaces';
|
|
22
28
|
export * from './api-keys';
|
|
23
29
|
export * from './roles';
|
package/dist/dto/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
package/dist/dto/index.js
CHANGED
|
@@ -33,7 +33,13 @@ __exportStar(require("./categories"), exports);
|
|
|
33
33
|
__exportStar(require("./groups"), exports);
|
|
34
34
|
__exportStar(require("./statuses"), exports);
|
|
35
35
|
__exportStar(require("./suppliers"), exports);
|
|
36
|
+
__exportStar(require("./warehouses"), exports);
|
|
36
37
|
__exportStar(require("./sales-history"), exports);
|
|
38
|
+
__exportStar(require("./leftovers"), exports);
|
|
39
|
+
__exportStar(require("./seasonal-coefficients"), exports);
|
|
40
|
+
__exportStar(require("./competitor-products"), exports);
|
|
41
|
+
__exportStar(require("./sku-competitor-mappings"), exports);
|
|
42
|
+
__exportStar(require("./competitor-sales"), exports);
|
|
37
43
|
__exportStar(require("./marketplaces"), exports);
|
|
38
44
|
__exportStar(require("./api-keys"), exports);
|
|
39
45
|
__exportStar(require("./roles"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface CreateLeftoverRequest {
|
|
2
|
+
warehouse_id: number;
|
|
3
|
+
sku_id: number;
|
|
4
|
+
period: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateLeftoverDto {
|
|
8
|
+
tenant_id: number;
|
|
9
|
+
shop_id: number;
|
|
10
|
+
warehouse_id: number;
|
|
11
|
+
sku_id: number;
|
|
12
|
+
period: string;
|
|
13
|
+
quantity: number;
|
|
14
|
+
}
|
|
15
|
+
export interface UpdateLeftoverDto {
|
|
16
|
+
quantity?: number;
|
|
17
|
+
}
|
|
18
|
+
export type UpdateLeftoverRequest = UpdateLeftoverDto;
|
|
19
|
+
export interface ImportLeftoverItem {
|
|
20
|
+
warehouse: string;
|
|
21
|
+
sku: string;
|
|
22
|
+
period: string;
|
|
23
|
+
quantity: number;
|
|
24
|
+
}
|
|
25
|
+
export interface LeftoverQuery {
|
|
26
|
+
period_from?: string;
|
|
27
|
+
period_to?: string;
|
|
28
|
+
limit?: number;
|
|
29
|
+
offset?: number;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=leftovers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leftovers.d.ts","sourceRoot":"","sources":["../../src/dto/leftovers.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CreateSeasonalCoefficientRequest {
|
|
2
|
+
group_id: number;
|
|
3
|
+
month: number;
|
|
4
|
+
coefficient: number;
|
|
5
|
+
}
|
|
6
|
+
export interface CreateSeasonalCoefficientDto {
|
|
7
|
+
tenant_id: number;
|
|
8
|
+
shop_id: number;
|
|
9
|
+
group_id: number;
|
|
10
|
+
month: number;
|
|
11
|
+
coefficient: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateSeasonalCoefficientDto {
|
|
14
|
+
coefficient?: number;
|
|
15
|
+
}
|
|
16
|
+
export type UpdateSeasonalCoefficientRequest = UpdateSeasonalCoefficientDto;
|
|
17
|
+
export interface ImportSeasonalCoefficientItem {
|
|
18
|
+
group: string;
|
|
19
|
+
month: number;
|
|
20
|
+
coefficient: number;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=seasonal-coefficients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seasonal-coefficients.d.ts","sourceRoot":"","sources":["../../src/dto/seasonal-coefficients.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AAE5E,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CreateSkuCompetitorMappingRequest {
|
|
2
|
+
sku_id: number;
|
|
3
|
+
competitor_product_id: number;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateSkuCompetitorMappingDto {
|
|
6
|
+
tenant_id: number;
|
|
7
|
+
shop_id: number;
|
|
8
|
+
sku_id: number;
|
|
9
|
+
competitor_product_id: number;
|
|
10
|
+
}
|
|
11
|
+
export interface UpdateSkuCompetitorMappingDto {
|
|
12
|
+
competitor_product_id?: number;
|
|
13
|
+
}
|
|
14
|
+
export type UpdateSkuCompetitorMappingRequest = UpdateSkuCompetitorMappingDto;
|
|
15
|
+
export interface ImportSkuCompetitorMappingItem {
|
|
16
|
+
sku: string;
|
|
17
|
+
marketplace: string;
|
|
18
|
+
marketplaceProductId: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sku-competitor-mappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sku-competitor-mappings.d.ts","sourceRoot":"","sources":["../../src/dto/sku-competitor-mappings.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,6BAA6B;IAC5C,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAE9E,MAAM,WAAW,8BAA8B;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CodedTitledItem, CodedTitledShopScopedCreateDto, CodedTitledUpdateDto } from './base';
|
|
2
|
+
export type CreateWarehouseRequest = CodedTitledItem;
|
|
3
|
+
export type CreateWarehouseDto = CodedTitledShopScopedCreateDto;
|
|
4
|
+
export type UpdateWarehouseDto = CodedTitledUpdateDto;
|
|
5
|
+
export type UpdateWarehouseRequest = CodedTitledUpdateDto;
|
|
6
|
+
export type ImportWarehouseItem = CodedTitledItem;
|
|
7
|
+
//# sourceMappingURL=warehouses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses.d.ts","sourceRoot":"","sources":["../../src/dto/warehouses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAGpG,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACtD,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CompetitorProduct {
|
|
2
|
+
id: number;
|
|
3
|
+
tenant_id: number;
|
|
4
|
+
shop_id: number;
|
|
5
|
+
marketplace_id: number;
|
|
6
|
+
marketplace_product_id: string;
|
|
7
|
+
title: string | null;
|
|
8
|
+
brand: string | null;
|
|
9
|
+
created_at: Date;
|
|
10
|
+
updated_at: Date;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=competitor-products.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competitor-products.d.ts","sourceRoot":"","sources":["../../src/entities/competitor-products.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"competitor-sales.d.ts","sourceRoot":"","sources":["../../src/entities/competitor-sales.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -11,8 +11,14 @@ export * from './categories';
|
|
|
11
11
|
export * from './groups';
|
|
12
12
|
export * from './statuses';
|
|
13
13
|
export * from './suppliers';
|
|
14
|
+
export * from './warehouses';
|
|
14
15
|
export * from './marketplaces';
|
|
15
16
|
export * from './sales-history';
|
|
17
|
+
export * from './leftovers';
|
|
18
|
+
export * from './seasonal-coefficients';
|
|
19
|
+
export * from './competitor-products';
|
|
20
|
+
export * from './sku-competitor-mappings';
|
|
21
|
+
export * from './competitor-sales';
|
|
16
22
|
export * from './roles';
|
|
17
23
|
export * from './api-keys';
|
|
18
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
package/dist/entities/index.js
CHANGED
|
@@ -27,7 +27,13 @@ __exportStar(require("./categories"), exports);
|
|
|
27
27
|
__exportStar(require("./groups"), exports);
|
|
28
28
|
__exportStar(require("./statuses"), exports);
|
|
29
29
|
__exportStar(require("./suppliers"), exports);
|
|
30
|
+
__exportStar(require("./warehouses"), exports);
|
|
30
31
|
__exportStar(require("./marketplaces"), exports);
|
|
31
32
|
__exportStar(require("./sales-history"), exports);
|
|
33
|
+
__exportStar(require("./leftovers"), exports);
|
|
34
|
+
__exportStar(require("./seasonal-coefficients"), exports);
|
|
35
|
+
__exportStar(require("./competitor-products"), exports);
|
|
36
|
+
__exportStar(require("./sku-competitor-mappings"), exports);
|
|
37
|
+
__exportStar(require("./competitor-sales"), exports);
|
|
32
38
|
__exportStar(require("./roles"), exports);
|
|
33
39
|
__exportStar(require("./api-keys"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leftovers.d.ts","sourceRoot":"","sources":["../../src/entities/leftovers.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seasonal-coefficients.d.ts","sourceRoot":"","sources":["../../src/entities/seasonal-coefficients.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sku-competitor-mappings.d.ts","sourceRoot":"","sources":["../../src/entities/sku-competitor-mappings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouses.d.ts","sourceRoot":"","sources":["../../src/entities/warehouses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAEpD,MAAM,WAAW,SAAU,SAAQ,qBAAqB;CAAG"}
|
package/dist/metadata.d.ts
CHANGED
|
@@ -17,9 +17,15 @@ export interface EntitiesMetadata {
|
|
|
17
17
|
groups: EntityMetadata;
|
|
18
18
|
statuses: EntityMetadata;
|
|
19
19
|
suppliers: EntityMetadata;
|
|
20
|
+
warehouses: EntityMetadata;
|
|
20
21
|
marketplaces: EntityMetadata;
|
|
21
22
|
skus: EntityMetadata;
|
|
22
23
|
salesHistory: EntityMetadata;
|
|
24
|
+
leftovers: EntityMetadata;
|
|
25
|
+
seasonalCoefficients: EntityMetadata;
|
|
26
|
+
competitorProducts: EntityMetadata;
|
|
27
|
+
skuCompetitorMappings: EntityMetadata;
|
|
28
|
+
competitorSales: EntityMetadata;
|
|
23
29
|
}
|
|
24
30
|
export declare const ENTITIES_METADATA: EntitiesMetadata;
|
|
25
31
|
//# sourceMappingURL=metadata.d.ts.map
|
package/dist/metadata.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,cAAc,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,cAAc,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC;IAC7B,SAAS,EAAE,cAAc,CAAC;IAC1B,oBAAoB,EAAE,cAAc,CAAC;IACrC,kBAAkB,EAAE,cAAc,CAAC;IACnC,qBAAqB,EAAE,cAAc,CAAC;IACtC,eAAe,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,EAAE,gBA2X/B,CAAC"}
|
package/dist/metadata.js
CHANGED
|
@@ -102,6 +102,26 @@ exports.ENTITIES_METADATA = {
|
|
|
102
102
|
},
|
|
103
103
|
],
|
|
104
104
|
},
|
|
105
|
+
warehouses: {
|
|
106
|
+
name: 'Warehouses',
|
|
107
|
+
description: 'Storage locations for inventory',
|
|
108
|
+
fields: [
|
|
109
|
+
{
|
|
110
|
+
name: 'code',
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'Unique warehouse identifier',
|
|
113
|
+
required: true,
|
|
114
|
+
example: 'main-warehouse',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: 'title',
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'Warehouse display name',
|
|
120
|
+
required: true,
|
|
121
|
+
example: 'Main Warehouse',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
105
125
|
marketplaces: {
|
|
106
126
|
name: 'Marketplaces',
|
|
107
127
|
description: 'Sales channels where products are sold',
|
|
@@ -204,4 +224,160 @@ exports.ENTITIES_METADATA = {
|
|
|
204
224
|
},
|
|
205
225
|
],
|
|
206
226
|
},
|
|
227
|
+
leftovers: {
|
|
228
|
+
name: 'Leftovers',
|
|
229
|
+
description: 'Inventory levels by warehouse, SKU, and period',
|
|
230
|
+
fields: [
|
|
231
|
+
{
|
|
232
|
+
name: 'warehouse',
|
|
233
|
+
type: 'string',
|
|
234
|
+
description: 'Warehouse code',
|
|
235
|
+
required: true,
|
|
236
|
+
example: 'main-warehouse',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'sku',
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Product SKU code',
|
|
242
|
+
required: true,
|
|
243
|
+
example: 'IPHONE-15-PRO',
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'period',
|
|
247
|
+
type: 'period',
|
|
248
|
+
description: 'Inventory period in YYYY-MM format',
|
|
249
|
+
required: true,
|
|
250
|
+
example: '2024-01',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'quantity',
|
|
254
|
+
type: 'number',
|
|
255
|
+
description: 'Number of units in stock',
|
|
256
|
+
required: true,
|
|
257
|
+
example: '500',
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
seasonalCoefficients: {
|
|
262
|
+
name: 'Seasonal Coefficients',
|
|
263
|
+
description: 'Monthly demand multipliers by product group',
|
|
264
|
+
fields: [
|
|
265
|
+
{
|
|
266
|
+
name: 'group',
|
|
267
|
+
type: 'string',
|
|
268
|
+
description: 'Product group code',
|
|
269
|
+
required: true,
|
|
270
|
+
example: 'smartphones',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: 'month',
|
|
274
|
+
type: 'number',
|
|
275
|
+
description: 'Month number (1-12)',
|
|
276
|
+
required: true,
|
|
277
|
+
example: '12',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'coefficient',
|
|
281
|
+
type: 'number',
|
|
282
|
+
description: 'Demand multiplier (1.0 = normal, 1.5 = 50% higher)',
|
|
283
|
+
required: true,
|
|
284
|
+
example: '1.25',
|
|
285
|
+
},
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
competitorProducts: {
|
|
289
|
+
name: 'Competitor Products',
|
|
290
|
+
description: 'Competitor product catalog with marketplace product IDs',
|
|
291
|
+
fields: [
|
|
292
|
+
{
|
|
293
|
+
name: 'marketplace',
|
|
294
|
+
type: 'string',
|
|
295
|
+
description: 'Marketplace code',
|
|
296
|
+
required: true,
|
|
297
|
+
example: 'ozon',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'marketplace_product_id',
|
|
301
|
+
type: 'string',
|
|
302
|
+
description: 'Product ID on the marketplace (numeric string)',
|
|
303
|
+
required: true,
|
|
304
|
+
example: '1628467935',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: 'title',
|
|
308
|
+
type: 'string',
|
|
309
|
+
description: 'Product title',
|
|
310
|
+
required: false,
|
|
311
|
+
example: 'Фильтр салонный',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: 'brand',
|
|
315
|
+
type: 'string',
|
|
316
|
+
description: 'Product brand',
|
|
317
|
+
required: false,
|
|
318
|
+
example: 'mavyko',
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
skuCompetitorMappings: {
|
|
323
|
+
name: 'SKU Competitor Mappings',
|
|
324
|
+
description: 'Mappings between your SKUs and competitor product codes',
|
|
325
|
+
fields: [
|
|
326
|
+
{
|
|
327
|
+
name: 'sku',
|
|
328
|
+
type: 'string',
|
|
329
|
+
description: 'Your product SKU code',
|
|
330
|
+
required: true,
|
|
331
|
+
example: 'IPHONE-15-PRO',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: 'marketplace',
|
|
335
|
+
type: 'string',
|
|
336
|
+
description: 'Marketplace code',
|
|
337
|
+
required: true,
|
|
338
|
+
example: 'ozon',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: 'marketplace_product_id',
|
|
342
|
+
type: 'string',
|
|
343
|
+
description: 'Product ID on the marketplace (numeric string)',
|
|
344
|
+
required: true,
|
|
345
|
+
example: '1628467935',
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
competitorSales: {
|
|
350
|
+
name: 'Competitor Sales',
|
|
351
|
+
description: 'Competitor sales data by marketplace and product',
|
|
352
|
+
fields: [
|
|
353
|
+
{
|
|
354
|
+
name: 'marketplace',
|
|
355
|
+
type: 'string',
|
|
356
|
+
description: 'Marketplace code',
|
|
357
|
+
required: true,
|
|
358
|
+
example: 'ozon',
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: 'marketplace_product_id',
|
|
362
|
+
type: 'string',
|
|
363
|
+
description: 'Product ID on the marketplace (numeric string)',
|
|
364
|
+
required: true,
|
|
365
|
+
example: '1628467935',
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: 'period',
|
|
369
|
+
type: 'period',
|
|
370
|
+
description: 'Sales period in YYYY-MM format',
|
|
371
|
+
required: true,
|
|
372
|
+
example: '2024-01',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: 'quantity',
|
|
376
|
+
type: 'number',
|
|
377
|
+
description: 'Number of units sold',
|
|
378
|
+
required: true,
|
|
379
|
+
example: '250',
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
},
|
|
207
383
|
};
|
|
@@ -13,6 +13,7 @@ export type CategoryExportItem = CodedTitledItem;
|
|
|
13
13
|
export type GroupExportItem = CodedTitledItem;
|
|
14
14
|
export type StatusExportItem = CodedTitledItem;
|
|
15
15
|
export type SupplierExportItem = CodedTitledItem;
|
|
16
|
+
export type WarehouseExportItem = CodedTitledItem;
|
|
16
17
|
export type MarketplaceExportItem = CodedTitledItem;
|
|
17
18
|
export interface SalesHistoryExportItem {
|
|
18
19
|
marketplace: string;
|
|
@@ -20,4 +21,32 @@ export interface SalesHistoryExportItem {
|
|
|
20
21
|
sku: string;
|
|
21
22
|
quantity: number;
|
|
22
23
|
}
|
|
24
|
+
export interface LeftoverExportItem {
|
|
25
|
+
warehouse: string;
|
|
26
|
+
sku: string;
|
|
27
|
+
period: string;
|
|
28
|
+
quantity: number;
|
|
29
|
+
}
|
|
30
|
+
export interface SeasonalCoefficientExportItem {
|
|
31
|
+
group: string;
|
|
32
|
+
month: number;
|
|
33
|
+
coefficient: number;
|
|
34
|
+
}
|
|
35
|
+
export interface CompetitorProductExportItem {
|
|
36
|
+
marketplace: string;
|
|
37
|
+
marketplace_product_id: string;
|
|
38
|
+
title?: string;
|
|
39
|
+
brand?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface SkuCompetitorMappingExportItem {
|
|
42
|
+
sku: string;
|
|
43
|
+
marketplace: string;
|
|
44
|
+
marketplace_product_id: string;
|
|
45
|
+
}
|
|
46
|
+
export interface CompetitorSaleExportItem {
|
|
47
|
+
marketplace: string;
|
|
48
|
+
marketplace_product_id: string;
|
|
49
|
+
period: string;
|
|
50
|
+
quantity: number;
|
|
51
|
+
}
|
|
23
52
|
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/responses/export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/responses/export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,8BAA8B;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -22,5 +22,11 @@ export interface DeleteDataResult {
|
|
|
22
22
|
groupsDeleted: number;
|
|
23
23
|
statusesDeleted: number;
|
|
24
24
|
suppliersDeleted: number;
|
|
25
|
+
warehousesDeleted: number;
|
|
26
|
+
leftoversDeleted: number;
|
|
27
|
+
seasonalCoefficientsDeleted: number;
|
|
28
|
+
skuCompetitorMappingsDeleted: number;
|
|
29
|
+
competitorSalesDeleted: number;
|
|
30
|
+
competitorProductsDeleted: number;
|
|
25
31
|
}
|
|
26
32
|
//# sourceMappingURL=import.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/responses/import.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/responses/import.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B,EAAE,MAAM,CAAC;IACpC,4BAA4B,EAAE,MAAM,CAAC;IACrC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,yBAAyB,EAAE,MAAM,CAAC;CACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sales-planner/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Shared types and DTOs for Sales Planner API",
|
|
5
5
|
"author": "Damir Manapov",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"dist",
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"typescript": "^5.7.3"
|
|
28
|
+
},
|
|
26
29
|
"scripts": {
|
|
27
30
|
"build": "tsc",
|
|
28
31
|
"typecheck": "tsc --noEmit",
|
|
29
32
|
"lint": "biome lint --error-on-warnings src",
|
|
30
33
|
"format": "biome format --write src",
|
|
31
34
|
"format:check": "biome format src"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"typescript": "^5.7.3"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|