@enerlence/suntropy-cli 0.1.2 → 0.1.3
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 +7 -4
- package/dist/bin/suntropy.js +2 -29
- package/dist/bin/suntropy.js.map +1 -1
- package/package.json +1 -1
- package/skills/inventory-create-kit.md +3 -21
package/README.md
CHANGED
|
@@ -140,14 +140,17 @@ suntropy inventory panels delete <id>
|
|
|
140
140
|
# kits, charger-kits, heatpump-kits, manufacturers
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
**Kit assembly:**
|
|
143
|
+
**Kit assembly (create kit components first, then assemble):**
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
|
-
|
|
147
|
-
suntropy inventory kits
|
|
146
|
+
# 1. Create kit-specific panel and inverter
|
|
147
|
+
suntropy inventory kits panels create --data '{"name":"Panel Kit 450W","peakPower":450}'
|
|
148
|
+
suntropy inventory kits inverters create --data '{"name":"Inversor Kit 5kW","nominalPower":5000}'
|
|
149
|
+
|
|
150
|
+
# 2. Assemble kit referencing component IDs
|
|
148
151
|
suntropy inventory kits assemble \
|
|
149
152
|
--name "Kit Solar 5kW" \
|
|
150
|
-
--panel <
|
|
153
|
+
--panel <kitPanelId> --inverter <kitInverterId> \
|
|
151
154
|
--panels-count 12 --peak-power 5.4 --price 3500
|
|
152
155
|
```
|
|
153
156
|
|
package/dist/bin/suntropy.js
CHANGED
|
@@ -632,35 +632,8 @@ function registerKitsCommands(inventory) {
|
|
|
632
632
|
batchDeletePath: "delete-batch-solar-kits",
|
|
633
633
|
getViaFilter: true
|
|
634
634
|
});
|
|
635
|
-
const
|
|
636
|
-
if (
|
|
637
|
-
kitsCreate.description(
|
|
638
|
-
`Create a solar kit via raw JSON. Prefer "assemble" for guided creation.
|
|
639
|
-
|
|
640
|
-
Required fields:
|
|
641
|
-
identifier (string) \u2014 Kit name (NOT "name")
|
|
642
|
-
price (number) \u2014 Kit price in EUR
|
|
643
|
-
panelNumber (number) \u2014 Number of panels
|
|
644
|
-
inverterNumber (number) \u2014 Number of inverters
|
|
645
|
-
phaseNumber (string) \u2014 "single_phase" or "three_phase"
|
|
646
|
-
|
|
647
|
-
Component relations (use kit-specific IDs, NOT inventory IDs):
|
|
648
|
-
kitSolarPanel: {"idKitSolarPanel": <id>} \u2014 from "kits panels list/create"
|
|
649
|
-
kitInverter: {"idKitInverter": <id>} \u2014 from "kits inverters list/create"
|
|
650
|
-
battery: {"batteryId": <id>} \u2014 from "inventory batteries list"
|
|
651
|
-
|
|
652
|
-
Optional fields:
|
|
653
|
-
peakPower, coplanar, defaultTaxesPercentage, active, batteriesNumber,
|
|
654
|
-
useTotalKitCostAsPrice, manufacturingWarranty, materialsWarranty,
|
|
655
|
-
imageUrl, referenceId, buyUrl
|
|
656
|
-
|
|
657
|
-
Custom assets array:
|
|
658
|
-
solarKitCustomAssets: [{"customAsset": {"idCustomAsset": <id>}, "units": <n>}]
|
|
659
|
-
|
|
660
|
-
Example:
|
|
661
|
-
suntropy inventory kits create --data '{"identifier":"Kit 5kW","kitSolarPanel":{"idKitSolarPanel":123},"kitInverter":{"idKitInverter":456},"panelNumber":12,"inverterNumber":1,"peakPower":5.4,"price":6500,"phaseNumber":"single_phase"}'`
|
|
662
|
-
);
|
|
663
|
-
}
|
|
635
|
+
const kitsCreateIdx = kits.commands.findIndex((c) => c.name() === "create");
|
|
636
|
+
if (kitsCreateIdx !== -1) kits.commands.splice(kitsCreateIdx, 1);
|
|
664
637
|
kits.command("archive <kitId>").description("Archive a solar kit (soft-disable)").action(async (kitId) => {
|
|
665
638
|
try {
|
|
666
639
|
const global = getGlobalOpts3(kits);
|