···163163extern dec errors(target: unknown, ...errors: unknown[]);
164164165165/**
166166+ * Forces a model, scalar, or union to be inlined instead of creating a standalone def.
167167+ * By default, named types create separate definitions with references.
168168+ * Use @inline to expand the type inline at each usage site.
169169+ *
170170+ * @example Inline model
171171+ * ```typespec
172172+ * @inline
173173+ * model Caption {
174174+ * text?: string;
175175+ * }
176176+ *
177177+ * model Main {
178178+ * captions?: Caption[]; // Expands inline, no separate "caption" def
179179+ * }
180180+ * ```
181181+ *
182182+ * @example Inline scalar
183183+ * ```typespec
184184+ * @inline
185185+ * @maxLength(50)
186186+ * scalar Handle extends string;
187187+ *
188188+ * model Main {
189189+ * handle?: Handle; // Expands to { type: "string", maxLength: 50 }
190190+ * }
191191+ * ```
192192+ *
193193+ * @example Inline union
194194+ * ```typespec
195195+ * @inline
196196+ * union Status { "active", "inactive", string }
197197+ *
198198+ * model Main {
199199+ * status?: Status; // Expands inline with knownValues
200200+ * }
201201+ * ```
202202+ */
203203+extern dec inline(target: unknown);
204204+205205+/**
206206+ * Specifies a default value for a scalar or union definition.
207207+ * Only valid on standalone scalar or union defs (not @inline).
208208+ * The value must match the underlying type (string, integer, or boolean).
209209+ * For unions with token refs, you can pass a model reference directly.
210210+ *
211211+ * @param value - The default value (literal or model reference for tokens)
212212+ *
213213+ * @example Scalar with default
214214+ * ```typespec
215215+ * @default("standard")
216216+ * scalar Mode extends string;
217217+ * ```
218218+ *
219219+ * @example Union with token default
220220+ * ```typespec
221221+ * @default(Inperson)
222222+ * union EventMode { Hybrid, Inperson, Virtual, string }
223223+ *
224224+ * @token
225225+ * model Inperson {}
226226+ * ```
227227+ */
228228+extern dec `default`(target: unknown, value: unknown);
229229+230230+/**
166231 * Marks a namespace as external, preventing it from emitting JSON output.
167232 * This decorator can only be applied to namespaces.
+17
packages/emitter/src/decorators.ts
···2525const maxBytesKey = Symbol("maxBytes");
2626const minBytesKey = Symbol("minBytes");
2727const externalKey = Symbol("external");
2828+const defaultKey = Symbol("default");
28292930/**
3031 * @maxBytes decorator for maximum length of bytes type
···296297 return program.stateSet(readOnlyKey).has(target);
297298}
298299300300+/**
301301+ * @default decorator for setting default values on scalars and unions
302302+ * The value can be a literal (string, number, boolean) or a model reference for tokens
303303+ */
304304+export function $default(context: DecoratorContext, target: Type, value: any) {
305305+ // Just store the raw value - let the emitter handle unwrapping and validation
306306+ context.program.stateMap(defaultKey).set(target, value);
307307+}
308308+309309+export function getDefault(
310310+ program: Program,
311311+ target: Type,
312312+): any | undefined {
313313+ return program.stateMap(defaultKey).get(target);
314314+}
315315+299316/**
300317 * @external decorator for marking a namespace as external
301318 * External namespaces are skipped during emission and don't produce JSON files
+280-28
packages/emitter/src/emitter.ts
···6868 getMaxBytes,
6969 getMinBytes,
7070 isExternal,
7171+ getDefault,
7172} from "./decorators.js";
72737374export interface EmitterOptions {
···9899 private options: EmitterOptions,
99100 ) {}
100101102102+ /**
103103+ * Process the raw default value from the decorator, unwrapping TypeSpec value objects
104104+ * and returning either a primitive (string, number, boolean) or a Type (for model references)
105105+ */
106106+ private processDefaultValue(rawValue: any): string | number | boolean | Type | undefined {
107107+ if (rawValue === undefined) return undefined;
108108+109109+ // TypeSpec may wrap values - check if this is a value object first
110110+ if (rawValue && typeof rawValue === 'object' && rawValue.valueKind) {
111111+ if (rawValue.valueKind === "StringValue") {
112112+ return rawValue.value;
113113+ } else if (rawValue.valueKind === "NumericValue" || rawValue.valueKind === "NumberValue") {
114114+ return rawValue.value;
115115+ } else if (rawValue.valueKind === "BooleanValue") {
116116+ return rawValue.value;
117117+ }
118118+ return undefined; // Unsupported valueKind
119119+ }
120120+121121+ // Check if it's a Type object (Model, String, Number, Boolean literals)
122122+ if (rawValue && typeof rawValue === 'object' && rawValue.kind) {
123123+ if (rawValue.kind === "String") {
124124+ return (rawValue as StringLiteral).value;
125125+ } else if (rawValue.kind === "Number") {
126126+ return (rawValue as NumericLiteral).value;
127127+ } else if (rawValue.kind === "Boolean") {
128128+ return (rawValue as BooleanLiteral).value;
129129+ } else if (rawValue.kind === "Model") {
130130+ // Return the model itself for token references
131131+ return rawValue as Model;
132132+ }
133133+ return undefined; // Unsupported kind
134134+ }
135135+136136+ // Direct primitive value
137137+ if (typeof rawValue === 'string' || typeof rawValue === 'number' || typeof rawValue === 'boolean') {
138138+ return rawValue;
139139+ }
140140+141141+ return undefined;
142142+ }
143143+101144 async emit() {
102145 const globalNs = this.program.getGlobalNamespaceType();
103146···356399 }
357400358401 private addScalarToDefs(lexicon: LexiconDoc, scalar: Scalar) {
402402+ // Only skip if the scalar itself is in TypeSpec namespace (built-in scalars)
359403 if (scalar.namespace?.name === "TypeSpec") return;
360360- if (scalar.baseScalar?.namespace?.name === "TypeSpec") return;
361404362405 // Skip @inline scalars - they should be inlined, not defined separately
363406 if (isInline(this.program, scalar)) {
···368411 const scalarDef = this.scalarToLexiconPrimitive(scalar, undefined);
369412 if (scalarDef) {
370413 const description = getDoc(this.program, scalar);
371371- lexicon.defs[defName] = { ...scalarDef, description } as LexUserType;
414414+415415+ // Apply @default decorator if present
416416+ const rawDefault = getDefault(this.program, scalar);
417417+ const defaultValue = this.processDefaultValue(rawDefault);
418418+ let defWithDefault: any = { ...scalarDef };
419419+420420+ if (defaultValue !== undefined) {
421421+ // Check if it's a Type (model reference for tokens)
422422+ if (typeof defaultValue === 'object' && 'kind' in defaultValue) {
423423+ // For model references, we need to resolve to NSID
424424+ // This shouldn't happen for scalars, only unions support token refs
425425+ this.program.reportDiagnostic({
426426+ code: "invalid-default-on-scalar",
427427+ severity: "error",
428428+ message: "@default on scalars must be a literal value (string, number, or boolean), not a model reference",
429429+ target: scalar,
430430+ });
431431+ } else {
432432+ // Validate that the default value matches the type
433433+ this.assertValidValueForType(scalarDef.type, defaultValue, scalar);
434434+ defWithDefault = { ...defWithDefault, default: defaultValue };
435435+ }
436436+ }
437437+438438+ // Apply integer constraints for standalone scalar defs
439439+ if (scalarDef.type === "integer") {
440440+ const minValue = getMinValue(this.program, scalar);
441441+ if (minValue !== undefined) {
442442+ (defWithDefault as any).minimum = minValue;
443443+ }
444444+ const maxValue = getMaxValue(this.program, scalar);
445445+ if (maxValue !== undefined) {
446446+ (defWithDefault as any).maximum = maxValue;
447447+ }
448448+ }
449449+450450+ lexicon.defs[defName] = { ...defWithDefault, description } as LexUserType;
372451 }
373452 }
374453···391470 if (unionDef.type === "string" && (unionDef.knownValues || unionDef.enum)) {
392471 const defName = name.charAt(0).toLowerCase() + name.slice(1);
393472 const description = getDoc(this.program, union);
394394- lexicon.defs[defName] = { ...unionDef, description };
473473+474474+ // Apply @default decorator if present
475475+ const rawDefault = getDefault(this.program, union);
476476+ const defaultValue = this.processDefaultValue(rawDefault);
477477+ let defWithDefault: any = { ...unionDef };
478478+479479+ if (defaultValue !== undefined) {
480480+ // Check if it's a Type (model reference for tokens)
481481+ if (typeof defaultValue === 'object' && 'kind' in defaultValue) {
482482+ // Resolve the model reference to its NSID
483483+ const tokenModel = defaultValue as Model;
484484+ const tokenRef = this.getModelReference(tokenModel, true); // fullyQualified=true
485485+ if (tokenRef) {
486486+ defWithDefault = { ...defWithDefault, default: tokenRef };
487487+ } else {
488488+ this.program.reportDiagnostic({
489489+ code: "invalid-default-token",
490490+ severity: "error",
491491+ message: "@default value must be a valid token model reference",
492492+ target: union,
493493+ });
494494+ }
495495+ } else {
496496+ // Literal value - validate it matches the union type
497497+ if (typeof defaultValue !== "string") {
498498+ this.program.reportDiagnostic({
499499+ code: "invalid-default-value-type",
500500+ severity: "error",
501501+ message: `Default value type mismatch: expected string, got ${typeof defaultValue}`,
502502+ target: union,
503503+ });
504504+ } else {
505505+ defWithDefault = { ...defWithDefault, default: defaultValue };
506506+ }
507507+ }
508508+ }
509509+510510+ lexicon.defs[defName] = { ...defWithDefault, description };
395511 } else if (unionDef.type === "union") {
396512 this.program.reportDiagnostic({
397513 code: "union-refs-not-allowed-as-def",
···401517 `Use @inline to inline them at usage sites, use @token models for known values, or use string literals.`,
402518 target: union,
403519 });
404404- }
405405- }
520520+ } else if (unionDef.type === "integer" && (unionDef as any).enum) {
521521+ // Integer enums can also be defs
522522+ const defName = name.charAt(0).toLowerCase() + name.slice(1);
523523+ const description = getDoc(this.program, union);
406524525525+ // Apply @default decorator if present
526526+ const rawDefault = getDefault(this.program, union);
527527+ const defaultValue = this.processDefaultValue(rawDefault);
528528+ let defWithDefault = { ...unionDef };
407529530530+ if (defaultValue !== undefined) {
531531+ if (typeof defaultValue === "number") {
532532+ defWithDefault = { ...defWithDefault, default: defaultValue };
533533+ } else {
534534+ this.program.reportDiagnostic({
535535+ code: "invalid-default-value-type",
536536+ severity: "error",
537537+ message: `Default value type mismatch: expected integer, got ${typeof defaultValue}`,
538538+ target: union,
539539+ });
540540+ }
541541+ }
408542543543+ lexicon.defs[defName] = { ...defWithDefault, description };
544544+ }
545545+ }
409546410547411548···501638502639503640641641+ isClosed(this.program, unionType)
642642+ ) {
643643+ const propDesc = prop ? getDoc(this.program, prop) : undefined;
504644645645+ // Check for default value: property default takes precedence, then union's @default
646646+ let defaultValue: string | number | boolean | undefined;
647647+ if (prop?.defaultValue !== undefined) {
648648+ defaultValue = serializeValueAsJson(this.program, prop.defaultValue, prop) as any;
649649+ } else {
650650+ // If no property default, check union's @default decorator
651651+ const rawUnionDefault = getDefault(this.program, unionType);
652652+ const unionDefault = this.processDefaultValue(rawUnionDefault);
653653+ if (unionDefault !== undefined && typeof unionDefault === 'number') {
654654+ defaultValue = unionDefault;
655655+ }
656656+ }
505657658658+ return {
659659+ type: "integer",
660660+ enum: variants.numericLiterals,
506661507662508663···519674520675521676677677+ ) {
678678+ const isClosedUnion = isClosed(this.program, unionType);
679679+ const propDesc = prop ? getDoc(this.program, prop) : undefined;
522680681681+ // Check for default value: property default takes precedence, then union's @default
682682+ let defaultValue: string | number | boolean | undefined;
683683+ if (prop?.defaultValue !== undefined) {
684684+ defaultValue = serializeValueAsJson(this.program, prop.defaultValue, prop) as any;
685685+ } else {
686686+ // If no property default, check union's @default decorator
687687+ const rawUnionDefault = getDefault(this.program, unionType);
688688+ const unionDefault = this.processDefaultValue(rawUnionDefault);
523689690690+ if (unionDefault !== undefined) {
691691+ // Check if it's a Type (model reference for tokens)
692692+ if (typeof unionDefault === 'object' && 'kind' in unionDefault && unionDefault.kind === 'Model') {
693693+ // Resolve the model reference to its NSID
694694+ const tokenModel = unionDefault as Model;
695695+ const tokenRef = this.getModelReference(tokenModel, true); // fullyQualified=true
696696+ if (tokenRef) {
697697+ defaultValue = tokenRef;
698698+ }
699699+ } else if (typeof unionDefault === 'string') {
700700+ defaultValue = unionDefault;
701701+ }
702702+ }
703703+ }
524704705705+ const maxLength = getMaxLength(this.program, unionType);
706706+ const minLength = getMinLength(this.program, unionType);
707707+ const maxGraphemes = getMaxGraphemes(this.program, unionType);
525708526709527710···11451328114613291147133011481148-11491149-11501150-11511151-11521152-11531153-11541154-11551155-11561156-11571157-11581331 prop?: ModelProperty,
11591332 propDesc?: string,
11601333 ): LexObjectProperty | null {
13341334+ // Check if this scalar should be referenced instead of inlined
13351335+ const scalarRef = this.getScalarReference(scalar);
13361336+ if (scalarRef) {
13371337+ // Check if property has a default value that would conflict with the scalar's @default
13381338+ if (prop?.defaultValue !== undefined) {
13391339+ const scalarDefaultRaw = getDefault(this.program, scalar);
13401340+ const scalarDefault = this.processDefaultValue(scalarDefaultRaw);
13411341+ const propDefault = serializeValueAsJson(this.program, prop.defaultValue, prop);
13421342+13431343+ // If the scalar has a different default, or if the property has a default but the scalar doesn't, error
13441344+ if (scalarDefault !== propDefault) {
13451345+ this.program.reportDiagnostic({
13461346+ code: "conflicting-defaults",
13471347+ severity: "error",
13481348+ message: scalarDefault !== undefined
13491349+ ? `Property default value conflicts with scalar's @default decorator. The scalar "${scalar.name}" has @default(${JSON.stringify(scalarDefault)}) but property has default value ${JSON.stringify(propDefault)}. Either remove the property default, mark the scalar @inline, or make the defaults match.`
13501350+ : `Property has a default value but the referenced scalar "${scalar.name}" does not. Either add @default to the scalar, mark it @inline to allow property-level defaults, or remove the property default.`,
13511351+ target: prop,
13521352+ });
13531353+ }
13541354+ }
13551355+13561356+ return { type: "ref" as const, ref: scalarRef, description: propDesc };
13571357+ }
13581358+13591359+ // Inline the scalar
11611360 const primitive = this.scalarToLexiconPrimitive(scalar, prop);
11621361 if (!primitive) return null;
11631362···12461445 if (!isDefining) {
12471446 const unionRef = this.getUnionReference(unionType);
12481447 if (unionRef) {
14481448+ // Check if property has a default value that would conflict with the union's @default
14491449+ if (prop?.defaultValue !== undefined) {
14501450+ const unionDefaultRaw = getDefault(this.program, unionType);
14511451+ const unionDefault = this.processDefaultValue(unionDefaultRaw);
14521452+ const propDefault = serializeValueAsJson(this.program, prop.defaultValue, prop);
14531453+14541454+ // For union defaults that are model references, we need to resolve them for comparison
14551455+ let resolvedUnionDefault: string | number | boolean | undefined = unionDefault as any;
14561456+ if (unionDefault && typeof unionDefault === 'object' && 'kind' in unionDefault && unionDefault.kind === 'Model') {
14571457+ const ref = this.getModelReference(unionDefault as Model, true);
14581458+ resolvedUnionDefault = ref || undefined;
14591459+ }
14601460+14611461+ // If the union has a different default, or if the property has a default but the union doesn't, error
14621462+ if (resolvedUnionDefault !== propDefault) {
14631463+ this.program.reportDiagnostic({
14641464+ code: "conflicting-defaults",
14651465+ severity: "error",
14661466+ message: unionDefault !== undefined
14671467+ ? `Property default value conflicts with union's @default decorator. The union "${unionType.name}" has @default(${JSON.stringify(resolvedUnionDefault)}) but property has default value ${JSON.stringify(propDefault)}. Either remove the property default, mark the union @inline, or make the defaults match.`
14681468+ : `Property has a default value but the referenced union "${unionType.name}" does not. Either add @default to the union, mark it @inline to allow property-level defaults, or remove the property default.`,
14691469+ target: prop,
14701470+ });
14711471+ }
14721472+ }
14731473+12491474 return { type: "ref" as const, ref: unionRef, description: propDesc };
12501475 }
12511476 }
···12711496 // Check if this scalar (or its base) is bytes type
12721497 if (this.isScalarOfType(scalar, "bytes")) {
12731498 const byteDef: LexBytes = { type: "bytes" };
12741274- const target = prop || scalar;
1275149912761276- const minLength = getMinBytes(this.program, target);
15001500+ // Check scalar first for its own constraints, then property overrides
15011501+ const minLength = getMinBytes(this.program, scalar) ?? (prop ? getMinBytes(this.program, prop) : undefined);
12771502 if (minLength !== undefined) {
12781503 byteDef.minLength = minLength;
12791504 }
1280150512811281- const maxLength = getMaxBytes(this.program, target);
15061506+ const maxLength = getMaxBytes(this.program, scalar) ?? (prop ? getMaxBytes(this.program, prop) : undefined);
12821507 if (maxLength !== undefined) {
12831508 byteDef.maxLength = maxLength;
12841509 }
···1310153513111536 // Apply string constraints
13121537 if (primitive.type === "string") {
13131313- const target = prop || scalar;
13141314- const maxLength = getMaxLength(this.program, target);
15381538+ // Check scalar first for its own constraints, then property overrides
15391539+ const maxLength = getMaxLength(this.program, scalar) ?? (prop ? getMaxLength(this.program, prop) : undefined);
13151540 if (maxLength !== undefined) {
13161541 primitive.maxLength = maxLength;
13171542 }
13181318- const minLength = getMinLength(this.program, target);
15431543+ const minLength = getMinLength(this.program, scalar) ?? (prop ? getMinLength(this.program, prop) : undefined);
13191544 if (minLength !== undefined) {
13201545 primitive.minLength = minLength;
13211546 }
13221322- const maxGraphemes = getMaxGraphemes(this.program, target);
15471547+ const maxGraphemes = getMaxGraphemes(this.program, scalar) ?? (prop ? getMaxGraphemes(this.program, prop) : undefined);
13231548 if (maxGraphemes !== undefined) {
13241549 primitive.maxGraphemes = maxGraphemes;
13251550 }
13261326- const minGraphemes = getMinGraphemes(this.program, target);
15511551+ const minGraphemes = getMinGraphemes(this.program, scalar) ?? (prop ? getMinGraphemes(this.program, prop) : undefined);
13271552 if (minGraphemes !== undefined) {
13281553 primitive.minGraphemes = minGraphemes;
13291554 }
13301555 }
1331155613321557 // Apply numeric constraints
13331333- if (prop && primitive.type === "integer") {
13341334- const minValue = getMinValue(this.program, prop);
15581558+ if (primitive.type === "integer") {
15591559+ // Check scalar first for its own constraints, then property overrides
15601560+ const minValue = getMinValue(this.program, scalar) ?? (prop ? getMinValue(this.program, prop) : undefined);
13351561 if (minValue !== undefined) {
13361562 primitive.minimum = minValue;
13371563 }
13381338- const maxValue = getMaxValue(this.program, prop);
15641564+ const maxValue = getMaxValue(this.program, scalar) ?? (prop ? getMaxValue(this.program, prop) : undefined);
13391565 if (maxValue !== undefined) {
13401566 primitive.maximum = maxValue;
13411567 }
···14311657 private assertValidValueForType(
14321658 primitiveType: string,
14331659 value: unknown,
14341434- prop: ModelProperty,
16601660+ target: ModelProperty | Scalar | Union,
14351661 ): void {
14361662 const valid =
14371663 (primitiveType === "boolean" && typeof value === "boolean") ||
···14421668 code: "invalid-default-value-type",
14431669 severity: "error",
14441670 message: `Default value type mismatch: expected ${primitiveType}, got ${typeof value}`,
14451445- target: prop,
16711671+ target: target,
14461672 });
14471673 }
14481674 }
···150717331508173415091735 return this.getReference(union, union.name, union.namespace);
17361736+ }
17371737+17381738+ private getScalarReference(scalar: Scalar): string | null {
17391739+ // Built-in TypeSpec scalars (string, integer, boolean themselves) should not be referenced
17401740+ if (scalar.namespace?.name === "TypeSpec") return null;
17411741+17421742+ // @inline scalars should be inlined, not referenced
17431743+ if (isInline(this.program, scalar)) return null;
17441744+17451745+ // Scalars without names or namespace can't be referenced
17461746+ if (!scalar.name || !scalar.namespace) return null;
17471747+17481748+ const defName = scalar.name.charAt(0).toLowerCase() + scalar.name.slice(1);
17491749+ const namespaceName = getNamespaceFullName(scalar.namespace);
17501750+ if (!namespaceName) return null;
17511751+17521752+ // Local reference (same namespace) - use short ref
17531753+ if (
17541754+ this.currentLexiconId === namespaceName ||
17551755+ this.currentLexiconId === `${namespaceName}.defs`
17561756+ ) {
17571757+ return `#${defName}`;
17581758+ }
17591759+17601760+ // Cross-namespace reference
17611761+ return `${namespaceName}#${defName}`;
15101762 }
1511176315121764 private modelToLexiconArray(
···11+import "@typelex/emitter";
22+33+namespace com.example.scalarDefaults {
44+ /** Test default decorator on scalars */
55+ model Main {
66+ /** Uses string scalar with default */
77+ mode?: Mode;
88+99+ /** Uses integer scalar with default */
1010+ limit?: Limit;
1111+1212+ /** Uses boolean scalar with default */
1313+ enabled?: Enabled;
1414+ }
1515+1616+ /** A string type with a default value */
1717+ @default("standard")
1818+ @maxLength(50)
1919+ scalar Mode extends string;
2020+2121+ /** An integer type with a default value */
2222+ @default(50)
2323+ @minValue(1)
2424+ @maxValue(100)
2525+ scalar Limit extends integer;
2626+2727+ /** A boolean type with a default value */
2828+ @default(true)
2929+ scalar Enabled extends boolean;
3030+}
···11+import "@typelex/emitter";
22+33+namespace community.lexicon.calendar.event {
44+ /** A calendar event. */
55+ @rec("tid")
66+ model Main {
77+ /** The name of the event. */
88+ @required
99+ name: string;
1010+1111+ /** The description of the event. */
1212+ description?: string;
1313+1414+ /** Client-declared timestamp when the event was created. */
1515+ @required
1616+ createdAt: datetime;
1717+1818+ /** Client-declared timestamp when the event starts. */
1919+ startsAt?: datetime;
2020+2121+ /** Client-declared timestamp when the event ends. */
2222+ endsAt?: datetime;
2323+2424+ /** The attendance mode of the event. */
2525+ mode?: Mode;
2626+2727+ /** The status of the event. */
2828+ status?: Status;
2929+3030+ /** The locations where the event takes place. */
3131+ locations?: (
3232+ | Uri
3333+ | community.lexicon.location.address.Main
3434+ | community.lexicon.location.fsq.Main
3535+ | community.lexicon.location.geo.Main
3636+ | community.lexicon.location.hthree.Main
3737+ )[];
3838+3939+ /** URIs associated with the event. */
4040+ uris?: Uri[];
4141+ }
4242+4343+ /** The mode of the event. */
4444+ @default(Inperson)
4545+ union Mode {
4646+ Hybrid,
4747+ Inperson,
4848+ Virtual,
4949+ string,
5050+ }
5151+5252+ /** A virtual event that takes place online. */
5353+ @token
5454+ model Virtual {}
5555+5656+ /** An in-person event that takes place offline. */
5757+ @token
5858+ model Inperson {}
5959+6060+ /** A hybrid event that takes place both online and offline. */
6161+ @token
6262+ model Hybrid {}
6363+6464+ /** The status of the event. */
6565+ @default(Scheduled)
6666+ union Status {
6767+ Cancelled,
6868+ Planned,
6969+ Postponed,
7070+ Rescheduled,
7171+ Scheduled,
7272+ string,
7373+ }
7474+7575+ /** The event has been created, but not finalized. */
7676+ @token
7777+ model Planned {}
7878+7979+ /** The event has been created and scheduled. */
8080+ @token
8181+ model Scheduled {}
8282+8383+ /** The event has been rescheduled. */
8484+ @token
8585+ model Rescheduled {}
8686+8787+ /** The event has been cancelled. */
8888+ @token
8989+ model Cancelled {}
9090+9191+ /** The event has been postponed and a new start date has not been set. */
9292+ @token
9393+ model Postponed {}
9494+9595+ /** A URI associated with the event. */
9696+ model Uri {
9797+ @required
9898+ uri: uri;
9999+100100+ /** The display name of the URI. */
101101+ name?: string;
102102+ }
103103+}
104104+105105+// --- Externals ---
106106+107107+@external
108108+namespace community.lexicon.location.address {
109109+ model Main {}
110110+}
111111+112112+@external
113113+namespace community.lexicon.location.fsq {
114114+ model Main {}
115115+}
116116+117117+@external
118118+namespace community.lexicon.location.geo {
119119+ model Main {}
120120+}
121121+122122+@external
123123+namespace community.lexicon.location.hthree {
124124+ model Main {}
125125+}