WriteAppInstance
Presents one App inside a read-write execution, adding Event publishers and Mutations and handing out writable Templates, Roles, searches and Unions.
Extends
Section titled “Extends”BaseAppInstance
Properties
Section titled “Properties”events
Section titled “events”
readonlyevents:Record<string,WriteEventPublishInstance>
Publishers for the App-level Events declared by this App, keyed by Event key.
metrics
Section titled “metrics”
readonlymetrics:Record<string,MetricInstance>
Metrics declared by this App, keyed by Metric key.
Inherited from
Section titled “Inherited from”BaseAppInstance.metrics
mutations
Section titled “mutations”
readonlymutations:Record<string,MutationHandlerInstance>
Mutation handlers declared by this App, keyed by Mutation key.
readonlyprn:string
The PRN identifying this App, for example prn::identity.
Inherited from
Section titled “Inherited from”BaseAppInstance.prn
queries
Section titled “queries”
readonlyqueries:Record<string,QueryHandlerInstance>
Query handlers declared by this App, keyed by Query key.
Inherited from
Section titled “Inherited from”BaseAppInstance.queries
readonlyroles:Record<string,WriteAppRoleInstance>
App Roles declared by this App, keyed by Role key, with assignment and revocation.
searches
Section titled “searches”
readonlysearches:Record<string,WriteSearchIndexInstance>
Search indexes declared by this App, keyed by search index key, returning writable Items.
templates
Section titled “templates”
readonlytemplates:Record<string,WriteTemplate>
Templates declared by this App, keyed by Template key, with Item creation.
unions
Section titled “unions”
readonlyunions:Record<string,WriteUnionInstance>
Unions declared by this App, keyed by Union key, returning writable Items.
workspaceId
Section titled “workspaceId”
readonlyworkspaceId:string
The identifier of the Workspace.
Inherited from
Section titled “Inherited from”BaseAppInstance.workspaceId
Methods
Section titled “Methods”assertRole()
Section titled “assertRole()”assertRole(
role):true
Confirms that the active principal holds an App Role.
Parameters
Section titled “Parameters”The Role to check, normally taken from roles.
Returns
Section titled “Returns”true
true when the Role is held.
Throws
Section titled “Throws”AssertRoleFailedError when the active principal does not hold the Role.
Inherited from
Section titled “Inherited from”BaseAppInstance.assertRole
checkRole()
Section titled “checkRole()”checkRole(
role):boolean
Reports whether the active principal holds an App Role.
Parameters
Section titled “Parameters”The Role to check, normally taken from roles.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”BaseAppInstance.checkRole
report()
Section titled “report()”report(
request):Promise<Readonly<{report:MetricReportEntry; }>>
Runs a report over this App’s Metrics.
Parameters
Section titled “Parameters”request
Section titled “request”The Metrics, Dimensions, period and date range to report on.
Returns
Section titled “Returns”Promise<Readonly<{ report: MetricReportEntry; }>>
Inherited from
Section titled “Inherited from”BaseAppInstance.report

