@sales-planner/shared 0.10.0 → 0.11.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.
Files changed (53) hide show
  1. package/README.md +30 -6
  2. package/dist/dto/categories.d.ts +20 -0
  3. package/dist/dto/categories.d.ts.map +1 -0
  4. package/dist/dto/categories.js +2 -0
  5. package/dist/dto/groups.d.ts +20 -0
  6. package/dist/dto/groups.d.ts.map +1 -0
  7. package/dist/dto/groups.js +2 -0
  8. package/dist/dto/index.d.ts +4 -0
  9. package/dist/dto/index.d.ts.map +1 -1
  10. package/dist/dto/index.js +4 -0
  11. package/dist/dto/skus.d.ts +20 -0
  12. package/dist/dto/skus.d.ts.map +1 -1
  13. package/dist/dto/statuses.d.ts +20 -0
  14. package/dist/dto/statuses.d.ts.map +1 -0
  15. package/dist/dto/statuses.js +2 -0
  16. package/dist/dto/suppliers.d.ts +20 -0
  17. package/dist/dto/suppliers.d.ts.map +1 -0
  18. package/dist/dto/suppliers.js +2 -0
  19. package/dist/dto/tenants.d.ts +1 -0
  20. package/dist/dto/tenants.d.ts.map +1 -1
  21. package/dist/entities/categories.d.ts +4 -0
  22. package/dist/entities/categories.d.ts.map +1 -0
  23. package/dist/entities/categories.js +2 -0
  24. package/dist/entities/groups.d.ts +4 -0
  25. package/dist/entities/groups.d.ts.map +1 -0
  26. package/dist/entities/groups.js +2 -0
  27. package/dist/entities/index.d.ts +4 -0
  28. package/dist/entities/index.d.ts.map +1 -1
  29. package/dist/entities/index.js +4 -0
  30. package/dist/entities/skus.d.ts +5 -0
  31. package/dist/entities/skus.d.ts.map +1 -1
  32. package/dist/entities/statuses.d.ts +4 -0
  33. package/dist/entities/statuses.d.ts.map +1 -0
  34. package/dist/entities/statuses.js +2 -0
  35. package/dist/entities/suppliers.d.ts +4 -0
  36. package/dist/entities/suppliers.d.ts.map +1 -0
  37. package/dist/entities/suppliers.js +2 -0
  38. package/dist/metadata.d.ts +4 -0
  39. package/dist/metadata.d.ts.map +1 -1
  40. package/dist/metadata.js +118 -10
  41. package/dist/query.d.ts +5 -0
  42. package/dist/query.d.ts.map +1 -1
  43. package/dist/responses/export.d.ts +21 -0
  44. package/dist/responses/export.d.ts.map +1 -1
  45. package/dist/responses/import.d.ts +10 -2
  46. package/dist/responses/import.d.ts.map +1 -1
  47. package/dist/responses/index.d.ts +1 -0
  48. package/dist/responses/index.d.ts.map +1 -1
  49. package/dist/responses/index.js +1 -0
  50. package/dist/responses/user-roles.d.ts +12 -0
  51. package/dist/responses/user-roles.d.ts.map +1 -0
  52. package/dist/responses/user-roles.js +2 -0
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @sales-planner/shared
2
2
 
3
- Shared types and DTOs for the Sales Planner API.
3
+ Shared types, DTOs, and entities for the Sales Planner API. This package provides the single source of truth for all TypeScript types used across the API and HTTP client.
4
4
 
5
5
  > **For the HTTP client**: Use `@sales-planner/http-client` - it includes this package as a dependency.
6
6
 
@@ -25,6 +25,7 @@ The package provides two type variants for each operation:
25
25
  export interface CreateSkuRequest {
26
26
  code: string;
27
27
  title: string;
28
+ title2?: string; // optional extended title
28
29
  // shop_id, tenant_id omitted - injected by API
29
30
  }
30
31
  ```
@@ -34,6 +35,7 @@ export interface CreateSkuRequest {
34
35
  export interface CreateSkuDto {
35
36
  code: string;
36
37
  title: string;
38
+ title2?: string;
37
39
  shop_id: number;
38
40
  tenant_id: number;
39
41
  }
@@ -53,23 +55,32 @@ export type CreateUserRequest = CreateUserDto;
53
55
  ```typescript
54
56
  import type {
55
57
  // Entities
56
- User, Tenant, Shop, Sku, Brand, SalesHistory,
57
- Role, UserRole, ApiKey, Marketplace,
58
+ User, Tenant, Shop, Sku, Brand, Category, Group, Status, Supplier,
59
+ SalesHistory, Role, UserRole, ApiKey, Marketplace,
58
60
 
59
61
  // Request types (HTTP layer)
60
62
  CreateUserRequest, UpdateUserRequest,
61
63
  CreateSkuRequest, UpdateSkuRequest,
62
64
  CreateBrandRequest, UpdateBrandRequest,
65
+ CreateCategoryRequest, UpdateCategoryRequest,
66
+ CreateGroupRequest, UpdateGroupRequest,
67
+ CreateStatusRequest, UpdateStatusRequest,
68
+ CreateSupplierRequest, UpdateSupplierRequest,
63
69
  CreateSalesHistoryRequest, UpdateSalesHistoryRequest,
64
70
 
65
71
  // DTO types (Service layer)
66
72
  CreateUserDto, UpdateUserDto,
67
73
  CreateSkuDto, UpdateSkuDto,
68
74
  CreateBrandDto, UpdateBrandDto,
75
+ CreateCategoryDto, UpdateCategoryDto,
76
+ CreateGroupDto, UpdateGroupDto,
77
+ CreateStatusDto, UpdateStatusDto,
78
+ CreateSupplierDto, UpdateSupplierDto,
69
79
  CreateSalesHistoryDto, UpdateSalesHistoryDto,
70
80
 
71
81
  // Import types
72
- ImportSkuItem, ImportBrandItem, ImportSalesHistoryItem, ImportMarketplaceItem,
82
+ ImportSkuItem, ImportBrandItem, ImportCategoryItem, ImportGroupItem, ImportStatusItem,
83
+ ImportSupplierItem, ImportSalesHistoryItem, ImportMarketplaceItem,
73
84
 
74
85
  // Query types
75
86
  ShopContextParams, PeriodQuery,
@@ -77,7 +88,8 @@ import type {
77
88
  // Response types
78
89
  UserWithRolesAndTenants, TenantWithShopAndApiKey,
79
90
  ImportResult, DeleteDataResult,
80
- SkuExportItem, BrandExportItem, SalesHistoryExportItem
91
+ SkuExportItem, BrandExportItem, CategoryExportItem, GroupExportItem, StatusExportItem,
92
+ SupplierExportItem, MarketplaceExportItem, SalesHistoryExportItem
81
93
  } from '@sales-planner/shared';
82
94
  ```
83
95
 
@@ -99,6 +111,10 @@ The API uses **numeric IDs** internally for referential integrity:
99
111
  | `Shop` | Store within a tenant |
100
112
  | `Sku` | Stock keeping unit (product variant) |
101
113
  | `Brand` | Product brand (shop-scoped) |
114
+ | `Category` | Product category for classification (shop-scoped) |
115
+ | `Group` | Product group for classification (shop-scoped) |
116
+ | `Status` | Product status for classification (shop-scoped) |
117
+ | `Supplier` | Product supplier (shop-scoped) |
102
118
  | `SalesHistory` | Sales record for a period (uses numeric marketplace_id) |
103
119
  | `Role` | Access role |
104
120
  | `UserRole` | User-role assignment |
@@ -119,7 +135,15 @@ The API uses **numeric IDs** internally for referential integrity:
119
135
  | `UserWithRolesAndTenants` | User with their roles and tenants |
120
136
  | `TenantWithShopAndApiKey` | Created tenant with shop and API key |
121
137
  | `ImportResult` | `{ created: number; updated: number; errors: string[] }` |
122
- | `DeleteDataResult` | `{ deletedSkus: number; deletedSalesHistory: number }` |
138
+ | `DeleteDataResult` | `{ skusDeleted: number; salesHistoryDeleted: number; marketplacesDeleted: number }` |
139
+ | `SkuExportItem` | SKU data for export |
140
+ | `BrandExportItem` | Brand data for export |
141
+ | `CategoryExportItem` | Category data for export |
142
+ | `GroupExportItem` | Group data for export |
143
+ | `StatusExportItem` | Status data for export |
144
+ | `SupplierExportItem` | Supplier data for export |
145
+ | `MarketplaceExportItem` | Marketplace data for export |
146
+ | `SalesHistoryExportItem` | Sales history data for export |
123
147
 
124
148
  ## Related Packages
125
149
 
@@ -0,0 +1,20 @@
1
+ export interface CreateCategoryRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateCategoryDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateCategoryDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateCategoryRequest = UpdateCategoryDto;
16
+ export interface ImportCategoryItem {
17
+ code: string;
18
+ title: string;
19
+ }
20
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/dto/categories.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ export interface CreateGroupRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateGroupDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateGroupDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateGroupRequest = UpdateGroupDto;
16
+ export interface ImportGroupItem {
17
+ code: string;
18
+ title: string;
19
+ }
20
+ //# sourceMappingURL=groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/dto/groups.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;AAEhD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,6 +12,10 @@ export * from './tenants';
12
12
  export * from './shops';
13
13
  export * from './skus';
14
14
  export * from './brands';
15
+ export * from './categories';
16
+ export * from './groups';
17
+ export * from './statuses';
18
+ export * from './suppliers';
15
19
  export * from './sales-history';
16
20
  export * from './marketplaces';
17
21
  export * from './api-keys';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,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,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"}
package/dist/dto/index.js CHANGED
@@ -28,6 +28,10 @@ __exportStar(require("./tenants"), exports);
28
28
  __exportStar(require("./shops"), exports);
29
29
  __exportStar(require("./skus"), exports);
30
30
  __exportStar(require("./brands"), exports);
31
+ __exportStar(require("./categories"), exports);
32
+ __exportStar(require("./groups"), exports);
33
+ __exportStar(require("./statuses"), exports);
34
+ __exportStar(require("./suppliers"), exports);
31
35
  __exportStar(require("./sales-history"), exports);
32
36
  __exportStar(require("./marketplaces"), exports);
33
37
  __exportStar(require("./api-keys"), exports);
@@ -1,20 +1,40 @@
1
1
  export interface CreateSkuRequest {
2
2
  code: string;
3
3
  title: string;
4
+ title2?: string;
5
+ category_id?: number;
6
+ group_id?: number;
7
+ status_id?: number;
8
+ supplier_id?: number;
4
9
  }
5
10
  export interface CreateSkuDto {
6
11
  code: string;
7
12
  title: string;
13
+ title2?: string | null;
8
14
  shop_id: number;
9
15
  tenant_id: number;
16
+ category_id?: number | null;
17
+ group_id?: number | null;
18
+ status_id?: number | null;
19
+ supplier_id?: number | null;
10
20
  }
11
21
  export interface UpdateSkuDto {
12
22
  code?: string;
13
23
  title?: string;
24
+ title2?: string | null;
25
+ category_id?: number | null;
26
+ group_id?: number | null;
27
+ status_id?: number | null;
28
+ supplier_id?: number | null;
14
29
  }
15
30
  export type UpdateSkuRequest = UpdateSkuDto;
16
31
  export interface ImportSkuItem {
17
32
  code: string;
18
33
  title: string;
34
+ title2?: string;
35
+ category?: string;
36
+ group?: string;
37
+ status?: string;
38
+ supplier?: string;
19
39
  }
20
40
  //# sourceMappingURL=skus.d.ts.map
@@ -1 +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"}
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;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AACD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE5C,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"}
@@ -0,0 +1,20 @@
1
+ export interface CreateStatusRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateStatusDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateStatusDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateStatusRequest = UpdateStatusDto;
16
+ export interface ImportStatusItem {
17
+ code: string;
18
+ title: string;
19
+ }
20
+ //# sourceMappingURL=statuses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statuses.d.ts","sourceRoot":"","sources":["../../src/dto/statuses.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ export interface CreateSupplierRequest {
2
+ code: string;
3
+ title: string;
4
+ }
5
+ export interface CreateSupplierDto {
6
+ code: string;
7
+ title: string;
8
+ shop_id: number;
9
+ tenant_id: number;
10
+ }
11
+ export interface UpdateSupplierDto {
12
+ code?: string;
13
+ title?: string;
14
+ }
15
+ export type UpdateSupplierRequest = UpdateSupplierDto;
16
+ export interface ImportSupplierItem {
17
+ code: string;
18
+ title: string;
19
+ }
20
+ //# sourceMappingURL=suppliers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppliers.d.ts","sourceRoot":"","sources":["../../src/dto/suppliers.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,4 +18,5 @@ export interface CreateTenantWithShopDto {
18
18
  userEmail: string;
19
19
  userName: string;
20
20
  }
21
+ export type CreateTenantWithShopRequest = CreateTenantWithShopDto;
21
22
  //# sourceMappingURL=tenants.d.ts.map
@@ -1 +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"}
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;AACD,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ShopScopedEntity } from './base';
2
+ export interface Category extends ShopScopedEntity {
3
+ }
4
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/entities/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,QAAS,SAAQ,gBAAgB;CAAG"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { ShopScopedEntity } from './base';
2
+ export interface Group extends ShopScopedEntity {
3
+ }
4
+ //# sourceMappingURL=groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/entities/groups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,KAAM,SAAQ,gBAAgB;CAAG"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,10 @@ export * from './tenants';
7
7
  export * from './shops';
8
8
  export * from './skus';
9
9
  export * from './brands';
10
+ export * from './categories';
11
+ export * from './groups';
12
+ export * from './statuses';
13
+ export * from './suppliers';
10
14
  export * from './marketplaces';
11
15
  export * from './sales-history';
12
16
  export * from './roles';
@@ -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,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,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -23,6 +23,10 @@ __exportStar(require("./tenants"), exports);
23
23
  __exportStar(require("./shops"), exports);
24
24
  __exportStar(require("./skus"), exports);
25
25
  __exportStar(require("./brands"), exports);
26
+ __exportStar(require("./categories"), exports);
27
+ __exportStar(require("./groups"), exports);
28
+ __exportStar(require("./statuses"), exports);
29
+ __exportStar(require("./suppliers"), exports);
26
30
  __exportStar(require("./marketplaces"), exports);
27
31
  __exportStar(require("./sales-history"), exports);
28
32
  __exportStar(require("./roles"), exports);
@@ -1,4 +1,9 @@
1
1
  import type { ShopScopedEntity } from './base';
2
2
  export interface Sku extends ShopScopedEntity {
3
+ title2?: string | null;
4
+ category_id?: number | null;
5
+ group_id?: number | null;
6
+ status_id?: number | null;
7
+ supplier_id?: number | null;
3
8
  }
4
9
  //# sourceMappingURL=skus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skus.d.ts","sourceRoot":"","sources":["../../src/entities/skus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,GAAI,SAAQ,gBAAgB;CAAG"}
1
+ {"version":3,"file":"skus.d.ts","sourceRoot":"","sources":["../../src/entities/skus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,GAAI,SAAQ,gBAAgB;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,4 @@
1
+ import type { ShopScopedEntity } from './base';
2
+ export interface Status extends ShopScopedEntity {
3
+ }
4
+ //# sourceMappingURL=statuses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statuses.d.ts","sourceRoot":"","sources":["../../src/entities/statuses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,WAAW,MAAO,SAAQ,gBAAgB;CAAG"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { ShopScopedEntity } from './base.js';
2
+ export interface Supplier extends ShopScopedEntity {
3
+ }
4
+ //# sourceMappingURL=suppliers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppliers.d.ts","sourceRoot":"","sources":["../../src/entities/suppliers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,WAAW,QAAS,SAAQ,gBAAgB;CAAG"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,6 +13,10 @@ export interface EntityMetadata {
13
13
  }
14
14
  export interface EntitiesMetadata {
15
15
  brands: EntityMetadata;
16
+ categories: EntityMetadata;
17
+ groups: EntityMetadata;
18
+ statuses: EntityMetadata;
19
+ suppliers: EntityMetadata;
16
20
  marketplaces: EntityMetadata;
17
21
  skus: EntityMetadata;
18
22
  salesHistory: EntityMetadata;
@@ -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,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,gBA+F/B,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,YAAY,EAAE,cAAc,CAAC;IAC7B,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC;CAC9B;AAED,eAAO,MAAM,iBAAiB,EAAE,gBA2M/B,CAAC"}
package/dist/metadata.js CHANGED
@@ -22,6 +22,86 @@ exports.ENTITIES_METADATA = {
22
22
  },
23
23
  ],
24
24
  },
25
+ categories: {
26
+ name: 'Categories',
27
+ description: 'Product categories for classification',
28
+ fields: [
29
+ {
30
+ name: 'code',
31
+ type: 'string',
32
+ description: 'Unique category identifier',
33
+ required: true,
34
+ example: 'electronics',
35
+ },
36
+ {
37
+ name: 'title',
38
+ type: 'string',
39
+ description: 'Category display name',
40
+ required: true,
41
+ example: 'Electronics',
42
+ },
43
+ ],
44
+ },
45
+ groups: {
46
+ name: 'Groups',
47
+ description: 'Product groups for classification',
48
+ fields: [
49
+ {
50
+ name: 'code',
51
+ type: 'string',
52
+ description: 'Unique group identifier',
53
+ required: true,
54
+ example: 'smartphones',
55
+ },
56
+ {
57
+ name: 'title',
58
+ type: 'string',
59
+ description: 'Group display name',
60
+ required: true,
61
+ example: 'Smartphones',
62
+ },
63
+ ],
64
+ },
65
+ statuses: {
66
+ name: 'Statuses',
67
+ description: 'Product statuses for classification',
68
+ fields: [
69
+ {
70
+ name: 'code',
71
+ type: 'string',
72
+ description: 'Unique status identifier',
73
+ required: true,
74
+ example: 'active',
75
+ },
76
+ {
77
+ name: 'title',
78
+ type: 'string',
79
+ description: 'Status display name',
80
+ required: true,
81
+ example: 'Active',
82
+ },
83
+ ],
84
+ },
85
+ suppliers: {
86
+ name: 'Suppliers',
87
+ description: 'Product suppliers and vendors',
88
+ fields: [
89
+ {
90
+ name: 'code',
91
+ type: 'string',
92
+ description: 'Unique supplier identifier',
93
+ required: true,
94
+ example: 'acme-corp',
95
+ },
96
+ {
97
+ name: 'title',
98
+ type: 'string',
99
+ description: 'Supplier display name',
100
+ required: true,
101
+ example: 'ACME Corporation',
102
+ },
103
+ ],
104
+ },
25
105
  marketplaces: {
26
106
  name: 'Marketplaces',
27
107
  description: 'Sales channels where products are sold',
@@ -60,6 +140,34 @@ exports.ENTITIES_METADATA = {
60
140
  required: true,
61
141
  example: 'iPhone 15 Pro',
62
142
  },
143
+ {
144
+ name: 'category',
145
+ type: 'string',
146
+ description: 'Product category code (auto-creates if missing)',
147
+ required: false,
148
+ example: 'electronics',
149
+ },
150
+ {
151
+ name: 'group',
152
+ type: 'string',
153
+ description: 'Product group code (auto-creates if missing)',
154
+ required: false,
155
+ example: 'smartphones',
156
+ },
157
+ {
158
+ name: 'status',
159
+ type: 'string',
160
+ description: 'Product status code (auto-creates if missing)',
161
+ required: false,
162
+ example: 'active',
163
+ },
164
+ {
165
+ name: 'supplier',
166
+ type: 'string',
167
+ description: 'Product supplier code (auto-creates if missing)',
168
+ required: false,
169
+ example: 'apple-inc',
170
+ },
63
171
  ],
64
172
  },
65
173
  salesHistory: {
@@ -67,11 +175,11 @@ exports.ENTITIES_METADATA = {
67
175
  description: 'Historical sales data by SKU, period, and marketplace',
68
176
  fields: [
69
177
  {
70
- name: 'sku_code',
178
+ name: 'marketplace',
71
179
  type: 'string',
72
- description: 'Product SKU code',
180
+ description: 'Marketplace code where sales occurred',
73
181
  required: true,
74
- example: 'IPHONE-15-PRO',
182
+ example: 'amazon',
75
183
  },
76
184
  {
77
185
  name: 'period',
@@ -80,6 +188,13 @@ exports.ENTITIES_METADATA = {
80
188
  required: true,
81
189
  example: '2024-01',
82
190
  },
191
+ {
192
+ name: 'sku',
193
+ type: 'string',
194
+ description: 'Product SKU code',
195
+ required: true,
196
+ example: 'IPHONE-15-PRO',
197
+ },
83
198
  {
84
199
  name: 'quantity',
85
200
  type: 'number',
@@ -87,13 +202,6 @@ exports.ENTITIES_METADATA = {
87
202
  required: true,
88
203
  example: '150',
89
204
  },
90
- {
91
- name: 'marketplace',
92
- type: 'string',
93
- description: 'Marketplace code where sales occurred',
94
- required: true,
95
- example: 'amazon',
96
- },
97
205
  ],
98
206
  },
99
207
  };
package/dist/query.d.ts CHANGED
@@ -10,4 +10,9 @@ export interface PeriodQuery {
10
10
  period_from?: string;
11
11
  period_to?: string;
12
12
  }
13
+ export interface GetUserRolesQuery {
14
+ userId?: number;
15
+ roleId?: number;
16
+ tenantId?: number;
17
+ }
13
18
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,11 +1,32 @@
1
1
  export interface SkuExportItem {
2
2
  code: string;
3
3
  title: string;
4
+ title2?: string;
5
+ category?: string;
6
+ group?: string;
7
+ status?: string;
8
+ supplier?: string;
4
9
  }
5
10
  export interface BrandExportItem {
6
11
  code: string;
7
12
  title: string;
8
13
  }
14
+ export interface CategoryExportItem {
15
+ code: string;
16
+ title: string;
17
+ }
18
+ export interface GroupExportItem {
19
+ code: string;
20
+ title: string;
21
+ }
22
+ export interface StatusExportItem {
23
+ code: string;
24
+ title: string;
25
+ }
26
+ export interface SupplierExportItem {
27
+ code: string;
28
+ title: string;
29
+ }
9
30
  export interface MarketplaceExportItem {
10
31
  code: string;
11
32
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/responses/export.ts"],"names":[],"mappings":"AAAA,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,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,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,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,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,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,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,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,10 +1,18 @@
1
1
  export interface ImportResult {
2
2
  created: number;
3
3
  updated: number;
4
- skus_created?: number;
5
- marketplaces_created?: number;
6
4
  errors: string[];
7
5
  }
6
+ export interface SkuImportResult extends ImportResult {
7
+ categories_created: number;
8
+ groups_created: number;
9
+ statuses_created: number;
10
+ suppliers_created: number;
11
+ }
12
+ export interface SalesHistoryImportResult extends ImportResult {
13
+ skus_created: number;
14
+ marketplaces_created: number;
15
+ }
8
16
  export interface DeleteDataResult {
9
17
  skusDeleted: number;
10
18
  salesHistoryDeleted: number;
@@ -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,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"}
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;CAC7B"}
@@ -2,6 +2,7 @@
2
2
  * API response types
3
3
  */
4
4
  export * from './users';
5
+ export * from './user-roles';
5
6
  export * from './tenants';
6
7
  export * from './import';
7
8
  export * from './export';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -18,6 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  __exportStar(require("./users"), exports);
21
+ __exportStar(require("./user-roles"), exports);
21
22
  __exportStar(require("./tenants"), exports);
22
23
  __exportStar(require("./import"), exports);
23
24
  __exportStar(require("./export"), exports);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Response type for user-roles API endpoints
3
+ * Note: This is different from UserRole in users.ts which is used for /me endpoint
4
+ */
5
+ export interface UserRoleResponse {
6
+ id: number;
7
+ user_id: number;
8
+ role_id: number;
9
+ tenant_id: number | null;
10
+ shop_id: number | null;
11
+ }
12
+ //# sourceMappingURL=user-roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-roles.d.ts","sourceRoot":"","sources":["../../src/responses/user-roles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sales-planner/shared",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Shared types and DTOs for Sales Planner API",
5
5
  "author": "Damir Manapov",
6
6
  "license": "MIT",