AppBuilder
Defined in: builder/app.ts:130
This is the AppBuilder you will see when importing an app as a Dependency. It is the base of the broader “AppBuilder” below and this is a subset of the AppBuilder. It has all the interesting entities, but not operations like addDependency ans so forth.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”TTypes
Section titled “TTypes”TTypes extends AppBuilderTypes = AppBuilderTypes
Properties
Section titled “Properties”dependencies
Section titled “dependencies”
readonlydependencies:Record<string,DependencyAppBuilder<any>>
Defined in: builder/app.ts:131
events
Section titled “events”
readonlyevents:Record<string,EventBuilder>
Defined in: builder/app.ts:117
Inherited from
Section titled “Inherited from”
readonlyhooks:AppHookDefinition
Defined in: builder/app.ts:132
readonlykey:string
Defined in: builder/app.ts:118
Inherited from
Section titled “Inherited from”mutations
Section titled “mutations”
readonlymutations:Record<string,MutationBuilder>
Defined in: builder/app.ts:133
readonlyprn:string
Defined in: builder/index.ts:32
Inherited from
Section titled “Inherited from”queries
Section titled “queries”
readonlyqueries:Record<string,QueryBuilder>
Defined in: builder/app.ts:134
readonlyroles:Record<string,AppRoleBuilder>
Defined in: builder/app.ts:135
Overrides
Section titled “Overrides”searches
Section titled “searches”
readonlysearches:Record<string,SearchIndexBuilder>
Defined in: builder/app.ts:136
Overrides
Section titled “Overrides”templates
Section titled “templates”
readonlytemplates:Record<string,TemplateBuilder>
Defined in: builder/app.ts:122
Inherited from
Section titled “Inherited from”DependencyAppBuilder.templates
unions
Section titled “unions”
readonlyunions:Record<string,UnionBuilder>
Defined in: builder/app.ts:123
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”addDependency()
Section titled “addDependency()”addDependency<
TKey>(key,spec):DependencyAppBuilder<any>
Defined in: builder/app.ts:148
Adds the app as a dependency of this app. When in runtime, the dependency will appear under the context (ctx) with the given key. If the same dependency is added in multiple places (apps), it is the same dependency. That is, there only ever one “employeeProfile” in a runtime definition and instance.
The key is “local” to this app. The dependent app sets it’s own canonical id/key.
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
AppSpec | ((builder) => void)
Returns
Section titled “Returns”DependencyAppBuilder<any>
addEvent()
Section titled “addEvent()”addEvent(
key):EventBuilder
Defined in: builder/app.ts:154
Adds an event that can be published against items of this template type. Events on the app level are always published against the workspace item.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”addMetric()
Section titled “addMetric()”addMetric(
key):MetricBuilder
Defined in: builder/app.ts:171
Adds a new metric to this app. A metric is a time-series based aggregation of the supplied events. In the runtime, metrics can be queried by an interval using the configured dimensions.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”MetricBuilder
addMetricDimension()
Section titled “addMetricDimension()”addMetricDimension(
key,subject):MetricDimensionBuilder
Defined in: builder/app.ts:162
Adds a new dimension to this app. A dimension is an aspect by which metrics can be broken down, filtered, and further categorized. Concrete dimensions are an item (instance) in the app of the template type specified here.
Parameters
Section titled “Parameters”string
subject
Section titled “subject”(TemplateBuilder | UnionBuilder)[]
Returns
Section titled “Returns”addMutation()
Section titled “addMutation()”Call Signature
Section titled “Call Signature”addMutation<
TKey>(key,handler):MutationBuilder
Defined in: builder/app.ts:173
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
handler
Section titled “handler”MutationHandler<ExtractMutationInput<TKey, TTypes>, ExtractMutationOutput<TKey, TTypes>, TTypes["WriteAppInstance"], TTypes["WriteRuntimeInstance"]>
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”addMutation<
TKey>(key,options,handler):MutationBuilder
Defined in: builder/app.ts:182
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
options
Section titled “options”handler
Section titled “handler”MutationHandler<ExtractMutationInput<TKey, TTypes>, ExtractMutationOutput<TKey, TTypes>, TTypes["WriteAppInstance"], TTypes["WriteRuntimeInstance"]>
Returns
Section titled “Returns”addQuery()
Section titled “addQuery()”Call Signature
Section titled “Call Signature”addQuery<
TKey>(key,handler):QueryBuilder
Defined in: builder/app.ts:193
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
handler
Section titled “handler”QueryHandler<ExtractQueryInput<TKey, TTypes>, ExtractQueryOutput<TKey, TTypes>, TTypes["ReadAppInstance"], TTypes["ReadRuntimeInstance"]>
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”addQuery<
TKey>(key,options,handler):QueryBuilder
Defined in: builder/app.ts:202
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
options
Section titled “options”handler
Section titled “handler”QueryHandler<ExtractQueryInput<TKey, TTypes>, ExtractQueryOutput<TKey, TTypes>, TTypes["ReadAppInstance"], TTypes["ReadRuntimeInstance"]>
Returns
Section titled “Returns”addRole()
Section titled “addRole()”addRole(
key,options):AppRoleBuilder
Defined in: builder/app.ts:221
Adds an application-level role that can be owned by a principal. App Roles are broad-based roles such as “Owner” for the whole application. For fine-grained permissions see:
Parameters
Section titled “Parameters”string
options
Section titled “options”Returns
Section titled “Returns”- MutationHandler
- QueryBuilder
- TemplateBuilder
addSearch()
Section titled “addSearch()”addSearch(
key):SearchIndexBuilder
Defined in: builder/app.ts:226
Adds a search index to this Application.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”addTemplate()
Section titled “addTemplate()”addTemplate<
TKey>(key):ExtractTemplate<TKey,TTypes>
Defined in: builder/app.ts:228
Type Parameters
Section titled “Type Parameters”TKey extends string
Parameters
Section titled “Parameters”TKey
Returns
Section titled “Returns”ExtractTemplate<TKey, TTypes>
addUnion()
Section titled “addUnion()”addUnion(
key,templates):UnionBuilder
Defined in: builder/app.ts:230
Parameters
Section titled “Parameters”string
templates
Section titled “templates”Returns
Section titled “Returns”configure()
Section titled “configure()”configure(
key):this
Defined in: builder/app.ts:232
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
getWorkspaceTemplate()
Section titled “getWorkspaceTemplate()”getWorkspaceTemplate():
TemplateBuilder
Defined in: builder/app.ts:233
Returns
Section titled “Returns”onCreate()
Section titled “onCreate()”onCreate(
fn):this
Defined in: builder/app.ts:234
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
onSeed()
Section titled “onSeed()”onSeed(
fn):this
Defined in: builder/app.ts:235
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
setDescription()
Section titled “setDescription()”setDescription(
description):this
Defined in: builder/index.ts:33
Parameters
Section titled “Parameters”description
Section titled “description”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”toDefinition()
Section titled “toDefinition()”toDefinition():
AppDefinition
Defined in: builder/app.ts:236