@sales-planner/shared 0.8.0 → 0.8.2

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 (2) hide show
  1. package/README.md +9 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -81,6 +81,13 @@ import type {
81
81
  } from '@sales-planner/shared';
82
82
  ```
83
83
 
84
+ ## Marketplace IDs vs Codes
85
+
86
+ The API uses **numeric IDs** internally for referential integrity:
87
+ - `CreateSalesHistoryRequest.marketplace_id: number` - API uses numeric foreign keys
88
+ - Import/Export use **marketplace codes** (strings) for user convenience
89
+ - This pattern matches SKUs: IDs internally, codes for import/export
90
+
84
91
  ## Types Reference
85
92
 
86
93
  ### Entities
@@ -92,11 +99,11 @@ import type {
92
99
  | `Shop` | Store within a tenant |
93
100
  | `Sku` | Stock keeping unit (product variant) |
94
101
  | `Brand` | Product brand (shop-scoped) |
95
- | `SalesHistory` | Sales record for a period |
102
+ | `SalesHistory` | Sales record for a period (uses numeric marketplace_id) |
96
103
  | `Role` | Access role |
97
104
  | `UserRole` | User-role assignment |
98
105
  | `ApiKey` | API authentication key |
99
- | `Marketplace` | E-commerce platform |
106
+ | `Marketplace` | E-commerce platform (numeric ID, shop-scoped) |
100
107
 
101
108
  ### Query Types
102
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sales-planner/shared",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Shared types and DTOs for Sales Planner API",
5
5
  "author": "Damir Manapov",
6
6
  "license": "MIT",