@sales-planner/shared 0.8.0 → 0.8.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 +9 -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
|
|