@sqlrooms/app-runtime / CreateHtmlAppRevisionCommandsOptions
Type Alias: CreateHtmlAppRevisionCommandsOptions<TRoomState>
CreateHtmlAppRevisionCommandsOptions<
TRoomState> =object
Type Parameters
| Type Parameter |
|---|
TRoomState extends BaseRoomStoreState |
Properties
resolveCurrentAppId?
optionalresolveCurrentAppId?: (state) =>string|undefined
Resolve the current host-selected HTML app id, when any.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
Returns
string | undefined
getHtmlAppIds
getHtmlAppIds: (
state) =>string[]
Return all HTML app ids known to the host.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
Returns
string[]
getHtmlAppState
getHtmlAppState: (
state,appId) =>HtmlAppState|undefined
Return an HTML app by id.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
Returns
HtmlAppState | undefined
renameHtmlApp
renameHtmlApp: (
state,appId,title) =>void
Rename an HTML app without committing source files.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
title | string |
Returns
void
commitHtmlAppRevision
commitHtmlAppRevision: (
state,appId,patch,metadata?) =>HtmlAppRevision|undefined
Commit a durable HTML app revision.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
patch | HtmlAppRevisionPatch |
metadata? | CommitHtmlAppRevisionMetadata |
Returns
HtmlAppRevision | undefined
restoreHtmlAppRevision
restoreHtmlAppRevision: (
state,appId,revisionId,metadata?) =>HtmlAppRevision|undefined
Restore a durable HTML app revision by id.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
revisionId | string |
metadata? | RestoreHtmlAppRevisionMetadata |
Returns
HtmlAppRevision | undefined
undoHtmlAppRevision
undoHtmlAppRevision: (
state,appId) =>HtmlAppRevision|undefined
Move backward through HTML app revisions.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
Returns
HtmlAppRevision | undefined
redoHtmlAppRevision
redoHtmlAppRevision: (
state,appId) =>HtmlAppRevision|undefined
Move forward through undone HTML app revisions.
Parameters
| Parameter | Type |
|---|---|
state | TRoomState |
appId | string |
Returns
HtmlAppRevision | undefined
ambiguousTargetMessage?
optionalambiguousTargetMessage?:string
Error message used when no app id can be chosen unambiguously.