Zum Hauptinhalt springen

Update Asset (zeysdk update)

Update an existing asset's configuration in your ZeyOS application.

zeysdk update <ASSET_CLASS>/<FILENAME> [options]

Parameters

ParameterDescriptionRequiredExample
ASSET_CLASSAsset type (resources, services, weblets)services
FILENAMEName of existing asset filedaily-backup.ixml

Options

OptionDescriptionDefault
--verboseShow detailed progress outputfalse

Service Types

TypeDescriptionScheduleInterval
TIMINGScheduled taskTime (0-2359)Minutes
REMOTECALLExternal API callN/AN/A
AFTER_CREATIONPost-create hookN/AN/A
BEFORE_MODIFICATIONPre-update hookN/AN/A
AFTER_MODIFICATIONPost-update hookN/AN/A
AFTER_CREATION_MODIFICATIONCombined hookN/AN/A
BEFORE_DELETIONPre-delete hookN/AN/A
AFTER_DELETIONPost-delete hookN/AN/A

Weblet Types

TypeDescriptionWidth/Height
INTEGRATEDIn-app webletRequired
STANDALONEIndependent windowRequired
DETACHEDFloating windowRequired
POPUP_FRAMEDModal with frameRequired
POPUP_PLAINModal without frameRequired
EMBEDDED_FRAMEDInline with frameOptional
EMBEDDED_COLLAPSEDCollapsible panelOptional
EMBEDDED_PLAINInline without frameOptional

Update Examples

Updating a Service

zeysdk update services/daily-backup.ixml

Before:

{
"services": {
"daily-backup": {
"name": "Daily Backup",
"type": "TIMING",
"schedule": 100,
"interval": 1440,
"entity": "documents",
"mimetype": "application/ixml+xml"
}
}
}

After update prompts:

{
"services": {
"daily-backup": {
"name": "Daily Backup Service",
"type": "TIMING",
"schedule": 200, // Changed to 02:00 AM
"interval": 720, // Changed to twice daily
"entity": "documents,contacts",
"mimetype": "application/ixml+xml"
}
}
}

Updating a Weblet

zeysdk update weblets/customer-view.ixml

Before:

{
"weblets": {
"customer-view": {
"name": "Customer View",
"type": "POPUP_FRAMED",
"width": 800,
"height": 600,
"langaliases": {
"en": "Customer View"
},
"mimetype": "application/ixml+xml"
}
}
}

After update prompts:

{
"weblets": {
"customer-view": {
"name": "Customer Details",
"type": "INTEGRATED", // Changed type
"width": 1024, // Updated width
"height": 768, // Updated height
"color": "#4287f5", // Added color
"svgpath": "M10 10h100v100h-100z", // Added icon
"langaliases": {
"en": "Customer Details",
"de": "Kundendetails", // Added translation
"es": "Detalles del Cliente"
},
"mimetype": "application/ixml+xml"
}
}
}

Updating a Resource

zeysdk update resources/company-logo.png

Before:

{
"resources": {
"company-logo": {
"name": "Logo",
"public": 0,
"mimetype": "image/png"
}
}
}

After update prompts:

{
"resources": {
"company-logo": {
"name": "Company Brand Logo", // Updated name
"public": 1, // Made public
"mimetype": "image/png"
}
}
}

Error Handling

ErrorDescriptionResolutionExample
Invalid asset classUnsupported typeUse correct classservices/backup.ixml not service/backup.ixml
Missing app.jsonConfig file not foundInitialize appRun zeysdk create first
Asset not foundAsset doesn't existCreate assetRun zeysdk add first
Invalid filenameBad charactersUse valid charsUse backup-daily.ixml not backup/daily.ixml
Invalid typeWrong service/weblet typeUse valid typeUse TIMING not SCHEDULED
Invalid scheduleBad time formatUse 0-2359Use 2330 for 11:30 PM
Invalid intervalNon-positive numberUse > 0Use 1440 for daily
Invalid dimensionsNon-numeric width/heightUse pixelsUse 800 not 800px