Zum Hauptinhalt springen

Add Asset

Add a new asset to your ZeyOS application.

Bash
zeysdk add <ASSET_CLASS>/<FILENAME> [options]

Parameters

ParameterDescriptionFormatExample
ASSET_CLASSAsset typeresources, services, or webletsservices/myservice.ixml
FILENAMEAsset filenameValid filename charactersmyresource.png

Options

OptionDescriptionDefault
--verboseShow detailed progress outputfalse

Asset Types Configuration

Resources

JSON
{
"name": "string",
"public": 0|1,
"mimetype": "auto-detected"
}

Services

JSON
{
"name": "string",
"type": "string",
"schedule": 0,
"interval": 1,
"entity": "string",
"url": "string",
"accesskey": "string?",
"mimetype": "auto-detected"
}

Weblets

JSON
{
"name": "string",
"langaliases": "null|object",
"width": 0,
"height": 0,
"color": "string",
"svgpath": "string",
"type": "string",
"url": "string",
"view": "string",
"mimetype": "auto-detected"
}

Validation Rules

  • Asset class must be valid (resources, services, weblets)
  • zeyos.app.json must exist
  • Asset key must not already exist
  • Filename must contain valid characters
  • Required fields must be provided during prompts

Error Handling

ErrorDescriptionResolution
Invalid asset classUnsupported asset typeUse correct asset class
Missing app.jsonConfiguration file not foundInitialize app first
Duplicate assetAsset already existsUse different name
Invalid filenameContains invalid charactersUse valid filename
Missing fieldsRequired details not providedComplete all prompts

Examples

Adding a Resource

Bash
zeysdk add resources/logo.png
JSON
{
"resources": {
"logo": {
"name": "Company Logo",
"public": 1,
"mimetype": "image/png"
}
}
}

Adding a Service

Bash
zeysdk add services/daily-backup.ixml
JSON
{
"services": {
"daily-backup": {
"name": "Daily Backup Service",
"type": "TIMING",
"schedule": 120, // 02:00 AM
"interval": 1440, // Daily
"entity": "documents",
"url": "",
"mimetype": "application/ixml+xml"
}
}
}

Adding a Remote Service

Bash
zeysdk add services/external-api.ixml
JSON
{
"services": {
"external-api": {
"name": "External API Service",
"type": "REMOTECALL",
"url": "https://api.example.com/endpoint",
"accesskey": "secret-key",
"mimetype": "application/ixml+xml"
}
}
}

Adding a Weblet

Bash
zeysdk add weblets/customer-dashboard.ixml
JSON
{
"weblets": {
"customer-dashboard": {
"name": "Customer Dashboard",
"type": "POPUP",
"width": 800,
"height": 600,
"color": "#4287f5",
"svgpath": "M10 10h100v100h-100z",
"view": "customers/dashboard",
"langaliases": {
"en": "Customer Dashboard",
"de_DE": "Kunden-Dashboard",
"es_ES": "Panel de Cliente"
},
"mimetype": "application/ixml+xml"
}
}
}

Adding a Standard Weblet

Bash
zeysdk add weblets/quick-note.ixml
JSON
{
"weblets": {
"quick-note": {
"name": "Quick Note",
"type": "STANDARD",
"color": "#f54242",
"svgpath": "M5 5h90v90h-90z",
"view": "notes/quick",
"langaliases": {
"en": "Quick Note",
"de_DE": "Schnellnotiz"
},
"mimetype": "application/ixml+xml"
}
}
}