@sales-planner/shared 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +12 -9
  2. package/dist/dto/api-keys.d.ts +12 -0
  3. package/dist/dto/api-keys.d.ts.map +1 -0
  4. package/dist/dto/api-keys.js +1 -0
  5. package/dist/dto/brands.d.ts +16 -0
  6. package/dist/dto/brands.d.ts.map +1 -0
  7. package/dist/dto/brands.js +1 -0
  8. package/dist/dto/index.d.ts +20 -0
  9. package/dist/dto/index.d.ts.map +1 -0
  10. package/dist/dto/index.js +19 -0
  11. package/dist/dto/marketplaces.d.ts +19 -0
  12. package/dist/dto/marketplaces.d.ts.map +1 -0
  13. package/dist/dto/marketplaces.js +1 -0
  14. package/dist/dto/roles.d.ts +11 -0
  15. package/dist/dto/roles.d.ts.map +1 -0
  16. package/dist/dto/roles.js +1 -0
  17. package/dist/dto/sales-history.d.ts +25 -0
  18. package/dist/dto/sales-history.d.ts.map +1 -0
  19. package/dist/dto/sales-history.js +1 -0
  20. package/dist/dto/shops.d.ts +10 -0
  21. package/dist/dto/shops.d.ts.map +1 -0
  22. package/dist/dto/shops.js +1 -0
  23. package/dist/dto/skus.d.ts +20 -0
  24. package/dist/dto/skus.d.ts.map +1 -0
  25. package/dist/dto/skus.js +1 -0
  26. package/dist/dto/tenants.d.ts +21 -0
  27. package/dist/dto/tenants.d.ts.map +1 -0
  28. package/dist/dto/tenants.js +1 -0
  29. package/dist/dto/user-roles.d.ts +8 -0
  30. package/dist/dto/user-roles.d.ts.map +1 -0
  31. package/dist/dto/user-roles.js +1 -0
  32. package/dist/dto/users.d.ts +13 -0
  33. package/dist/dto/users.d.ts.map +1 -0
  34. package/dist/dto/users.js +1 -0
  35. package/dist/entities.d.ts +16 -8
  36. package/dist/entities.d.ts.map +1 -1
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/responses.d.ts +9 -0
  41. package/dist/responses.d.ts.map +1 -1
  42. package/package.json +1 -1
package/README.md CHANGED
@@ -53,29 +53,31 @@ export type CreateUserRequest = CreateUserDto;
53
53
  ```typescript
54
54
  import type {
55
55
  // Entities
56
- User, Tenant, Shop, Sku, SalesHistory,
56
+ User, Tenant, Shop, Sku, Brand, SalesHistory,
57
57
  Role, UserRole, ApiKey, Marketplace,
58
-
58
+
59
59
  // Request types (HTTP layer)
60
60
  CreateUserRequest, UpdateUserRequest,
61
61
  CreateSkuRequest, UpdateSkuRequest,
62
+ CreateBrandRequest, UpdateBrandRequest,
62
63
  CreateSalesHistoryRequest, UpdateSalesHistoryRequest,
63
-
64
+
64
65
  // DTO types (Service layer)
65
66
  CreateUserDto, UpdateUserDto,
66
67
  CreateSkuDto, UpdateSkuDto,
68
+ CreateBrandDto, UpdateBrandDto,
67
69
  CreateSalesHistoryDto, UpdateSalesHistoryDto,
68
-
70
+
69
71
  // Import types
70
- ImportSkuItem, ImportSalesHistoryItem, ImportMarketplaceItem,
71
-
72
+ ImportSkuItem, ImportBrandItem, ImportSalesHistoryItem, ImportMarketplaceItem,
73
+
72
74
  // Query types
73
75
  ShopContextParams, PeriodQuery,
74
-
76
+
75
77
  // Response types
76
78
  UserWithRolesAndTenants, TenantWithShopAndApiKey,
77
79
  ImportResult, DeleteDataResult,
78
- SkuExportItem, SalesHistoryExportItem
80
+ SkuExportItem, BrandExportItem, SalesHistoryExportItem
79
81
  } from '@sales-planner/shared';
80
82
  ```
81
83
 
@@ -88,7 +90,8 @@ import type {
88
90
  | `User` | User account |
89
91
  | `Tenant` | Organization/company |
90
92
  | `Shop` | Store within a tenant |
91
- | `Sku` | Stock keeping unit |
93
+ | `Sku` | Stock keeping unit (product variant) |
94
+ | `Brand` | Product brand (shop-scoped) |
92
95
  | `SalesHistory` | Sales record for a period |
93
96
  | `Role` | Access role |
94
97
  | `UserRole` | User-role assignment |
@@ -0,0 +1,12 @@
1
+ export interface CreateApiKeyDto {
2
+ user_id: number;
3
+ name?: string;
4
+ expires_at?: string;
5
+ }
6
+ export type CreateApiKeyRequest = CreateApiKeyDto;
7
+ export interface UpdateApiKeyDto {
8
+ name?: string | null;
9
+ expires_at?: string | null;
10
+ }
11
+ export type UpdateApiKeyRequest = UpdateApiKeyDto;
12
+ //# sourceMappingURL=api-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/dto/api-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AACD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ export interface CreateBrandRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateBrandDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateBrandDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateBrandRequest = UpdateBrandDto;
16
+ //# sourceMappingURL=brands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../src/dto/brands.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Data Transfer Objects for create/update operations
3
+ *
4
+ * Pattern:
5
+ * - CreateXDto: Full DTO with context fields (shop_id, tenant_id, etc.)
6
+ * - CreateXRequest: HTTP request type (may omit context fields if injected)
7
+ * - UpdateXDto: Update fields
8
+ * - UpdateXRequest: HTTP update request (typically same as DTO)
9
+ */
10
+ export * from './users.js';
11
+ export * from './tenants.js';
12
+ export * from './shops.js';
13
+ export * from './skus.js';
14
+ export * from './brands.js';
15
+ export * from './sales-history.js';
16
+ export * from './marketplaces.js';
17
+ export * from './api-keys.js';
18
+ export * from './roles.js';
19
+ export * from './user-roles.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Data Transfer Objects for create/update operations
3
+ *
4
+ * Pattern:
5
+ * - CreateXDto: Full DTO with context fields (shop_id, tenant_id, etc.)
6
+ * - CreateXRequest: HTTP request type (may omit context fields if injected)
7
+ * - UpdateXDto: Update fields
8
+ * - UpdateXRequest: HTTP update request (typically same as DTO)
9
+ */
10
+ export * from './users.js';
11
+ export * from './tenants.js';
12
+ export * from './shops.js';
13
+ export * from './skus.js';
14
+ export * from './brands.js';
15
+ export * from './sales-history.js';
16
+ export * from './marketplaces.js';
17
+ export * from './api-keys.js';
18
+ export * from './roles.js';
19
+ export * from './user-roles.js';
@@ -0,0 +1,19 @@
1
+ export interface CreateMarketplaceRequest {
2
+ id: string;
3
+ title: string;
4
+ }
5
+ export interface CreateMarketplaceDto {
6
+ id: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateMarketplaceDto {
12
+ title?: string;
13
+ }
14
+ export type UpdateMarketplaceRequest = UpdateMarketplaceDto;
15
+ export interface ImportMarketplaceItem {
16
+ id: string;
17
+ title: string;
18
+ }
19
+ //# sourceMappingURL=marketplaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketplaces.d.ts","sourceRoot":"","sources":["../../src/dto/marketplaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface CreateRoleDto {
2
+ name: string;
3
+ description?: string;
4
+ }
5
+ export type CreateRoleRequest = CreateRoleDto;
6
+ export interface UpdateRoleDto {
7
+ name?: string;
8
+ description?: string | null;
9
+ }
10
+ export type UpdateRoleRequest = UpdateRoleDto;
11
+ //# sourceMappingURL=roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/dto/roles.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ export interface CreateSalesHistoryRequest {
2
+ sku_id: number;
3
+ period: string;
4
+ quantity: number;
5
+ marketplace_id: string;
6
+ }
7
+ export interface CreateSalesHistoryDto {
8
+ sku_id: number;
9
+ shop_id: number;
10
+ tenant_id: number;
11
+ period: string;
12
+ quantity: number;
13
+ marketplace_id: string;
14
+ }
15
+ export interface UpdateSalesHistoryDto {
16
+ quantity?: number;
17
+ }
18
+ export type UpdateSalesHistoryRequest = UpdateSalesHistoryDto;
19
+ export interface ImportSalesHistoryItem {
20
+ sku_code: string;
21
+ period: string;
22
+ quantity: number;
23
+ marketplace: string;
24
+ }
25
+ //# sourceMappingURL=sales-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales-history.d.ts","sourceRoot":"","sources":["../../src/dto/sales-history.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface CreateShopDto {
2
+ title: string;
3
+ tenant_id: number;
4
+ }
5
+ export type CreateShopRequest = CreateShopDto;
6
+ export interface UpdateShopDto {
7
+ title?: string;
8
+ }
9
+ export type UpdateShopRequest = UpdateShopDto;
10
+ //# sourceMappingURL=shops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shops.d.ts","sourceRoot":"","sources":["../../src/dto/shops.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ export interface CreateSkuRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateSkuDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateSkuDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateSkuRequest = UpdateSkuDto;
16
+ export interface ImportSkuItem {
17
+ code: string;
18
+ title: string;
19
+ }
20
+ //# sourceMappingURL=skus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skus.d.ts","sourceRoot":"","sources":["../../src/dto/skus.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ export interface CreateTenantDto {
2
+ title: string;
3
+ owner_id?: number;
4
+ created_by?: number;
5
+ }
6
+ export interface CreateTenantRequest {
7
+ title: string;
8
+ owner_id?: number;
9
+ }
10
+ export interface UpdateTenantDto {
11
+ title?: string;
12
+ owner_id?: number | null;
13
+ }
14
+ export type UpdateTenantRequest = UpdateTenantDto;
15
+ export interface CreateTenantWithShopDto {
16
+ tenantTitle: string;
17
+ shopTitle?: string;
18
+ userEmail: string;
19
+ userName: string;
20
+ }
21
+ //# sourceMappingURL=tenants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../src/dto/tenants.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AACD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface CreateUserRoleDto {
2
+ user_id: number;
3
+ role_id: number;
4
+ tenant_id?: number;
5
+ shop_id?: number;
6
+ }
7
+ export type CreateUserRoleRequest = CreateUserRoleDto;
8
+ //# sourceMappingURL=user-roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-roles.d.ts","sourceRoot":"","sources":["../../src/dto/user-roles.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export interface CreateUserDto {
2
+ email: string;
3
+ name: string;
4
+ default_shop_id?: number;
5
+ }
6
+ export type CreateUserRequest = CreateUserDto;
7
+ export interface UpdateUserDto {
8
+ email?: string;
9
+ name?: string;
10
+ default_shop_id?: number | null;
11
+ }
12
+ export type UpdateUserRequest = UpdateUserDto;
13
+ //# sourceMappingURL=users.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/dto/users.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AACD,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,19 @@
1
1
  /**
2
2
  * Core database entities
3
3
  */
4
+ /**
5
+ * Base interface for entities scoped to both shop and tenant
6
+ * (e.g., SKUs, Brands, Marketplaces)
7
+ */
8
+ export interface ShopScopedEntity {
9
+ id: number;
10
+ code: string;
11
+ title: string;
12
+ shop_id: number;
13
+ tenant_id: number;
14
+ created_at: Date;
15
+ updated_at: Date;
16
+ }
4
17
  export interface User {
5
18
  id: number;
6
19
  email: string;
@@ -24,14 +37,9 @@ export interface Shop {
24
37
  created_at: Date;
25
38
  updated_at: Date;
26
39
  }
27
- export interface Sku {
28
- id: number;
29
- code: string;
30
- title: string;
31
- shop_id: number;
32
- tenant_id: number;
33
- created_at: Date;
34
- updated_at: Date;
40
+ export interface Sku extends ShopScopedEntity {
41
+ }
42
+ export interface Brand extends ShopScopedEntity {
35
43
  }
36
44
  export interface SalesHistory {
37
45
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../src/entities.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAA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AAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './entities.js';
2
- export * from './dto.js';
2
+ export * from './dto/index.js';
3
3
  export * from './responses.js';
4
4
  export * from './query.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAG9B,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAG/B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Entities
2
2
  export * from './entities.js';
3
3
  // DTOs
4
- export * from './dto.js';
4
+ export * from './dto/index.js';
5
5
  // Response types
6
6
  export * from './responses.js';
7
7
  // Query types
@@ -48,6 +48,7 @@ export interface ImportResult {
48
48
  export interface DeleteDataResult {
49
49
  skusDeleted: number;
50
50
  salesHistoryDeleted: number;
51
+ marketplacesDeleted: number;
51
52
  }
52
53
  export interface SalesHistoryExportItem {
53
54
  sku_code: string;
@@ -59,4 +60,12 @@ export interface SkuExportItem {
59
60
  code: string;
60
61
  title: string;
61
62
  }
63
+ export interface BrandExportItem {
64
+ code: string;
65
+ title: string;
66
+ }
67
+ export interface MarketplaceExportItem {
68
+ id: string;
69
+ title: string;
70
+ }
62
71
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.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AE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sales-planner/shared",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Shared types and DTOs for Sales Planner API",
5
5
  "author": "Damir Manapov",
6
6
  "license": "MIT",