Generate or browse TypeScript types from UCP schemas
/plugin marketplace add ibraschwan/ucp-plugin/plugin install ibraschwan-ucp-toolkit@ibraschwan/ucp-pluginGenerate and explore TypeScript types from UCP schemas.
generate: Creates TypeScript type definitionslist: Shows available types in types/ directoryshow: Displays specific type definitionGenerate TypeScript definitions from all schemas:
cd /Users/ibraschwan/bisirepo/ucp && node scripts/generate_ts_schema_types.js
Output location: Determined by script configuration
List all available reusable types:
ls /Users/ibraschwan/bisirepo/ucp/source/schemas/shopping/types/
Display as formatted table:
| Type | Description |
|---|---|
| money.json | Currency and amount |
| address.json | Postal address |
| ... | ... |
Display a specific type definition. Read the requested type file:
cat /Users/ibraschwan/bisirepo/ucp/source/schemas/shopping/types/{name}.json
Format and explain:
Core Types:
money.json - Currency amountsaddress.json - Postal addressespagination.json - List paginationProduct Types:
product-variant.json - Product variantsproduct-option.json - Product optionsinventory.json - Stock levelsOrder Types:
line-item.json - Order line itemsdiscount.json - Discounts appliedshipping-rate.json - Shipping costsCustomer Types:
customer.json - Customer datapayment-method.json - Payment methodsGenerated types can be imported:
import { Money, Address, LineItem } from './generated/types';