Implement typed module contracts and conformance bindings
This commit is contained in:
@@ -163,10 +163,21 @@ export interface OperationInterfaceMember<Type = ValueType> extends InterfaceMem
|
||||
outputType: Type;
|
||||
}
|
||||
|
||||
/** A typed code artifact. Module bindings are neither calls nor storage fields. */
|
||||
export interface ModuleInterfaceMember<
|
||||
Type = ValueType,
|
||||
Target = EdgeEndpointConstraint,
|
||||
> extends InterfaceMemberBase<Type> {
|
||||
kind: "module";
|
||||
contract: string;
|
||||
subject?: Target;
|
||||
}
|
||||
|
||||
export type InterfaceMember<Type = ValueType, Target = EdgeEndpointConstraint> =
|
||||
| ValueInterfaceMember<Type>
|
||||
| RelationshipInterfaceMember<Type, Target>
|
||||
| OperationInterfaceMember<Type>;
|
||||
| OperationInterfaceMember<Type>
|
||||
| ModuleInterfaceMember<Type, Target>;
|
||||
|
||||
export interface InterfaceRevision {
|
||||
interfaceId: InterfaceId;
|
||||
@@ -288,12 +299,17 @@ export interface PackageConstructorExport extends PackageExportBase {
|
||||
|
||||
export type PackageExport = PackageOperationExport | PackageFunctionExport | PackageConstructorExport;
|
||||
|
||||
/** A window presentation entry, never a graph operation or service export. */
|
||||
export interface PackageComponent {
|
||||
export interface PackageModule {
|
||||
id: string;
|
||||
displayName: string;
|
||||
subject: InterfaceRevisionId;
|
||||
runtime: "react";
|
||||
interfaceRevisionId: InterfaceRevisionId;
|
||||
memberId: MemberId;
|
||||
}
|
||||
|
||||
export interface ModuleBinding {
|
||||
memberId: MemberId;
|
||||
packageRevisionId: PackageRevisionId;
|
||||
moduleId: string;
|
||||
}
|
||||
|
||||
export interface WorkspacePresentation {
|
||||
@@ -305,10 +321,10 @@ export interface WorkspacePresentation {
|
||||
}
|
||||
|
||||
export interface PackageRevision {
|
||||
modules?: PackageModule[];
|
||||
/** Closed interface imports exposed to this package's checked component bindings. */
|
||||
clientInterfaces?: Record<string, InterfaceRevisionId>;
|
||||
controllers?: PackageController[];
|
||||
components?: PackageComponent[];
|
||||
queries?: import("../query/types.js").QueryDeclaration[];
|
||||
checkedQueries?: import("../query/types.js").CheckedQuery[];
|
||||
queryTemplates?: import("../query/types.js").QueryTemplate[];
|
||||
@@ -427,6 +443,7 @@ export interface InitializationField {
|
||||
}
|
||||
|
||||
export interface Conformance {
|
||||
moduleBindings?: ModuleBinding[];
|
||||
initialization?: InitializationField[];
|
||||
/** Absent only for legacy assemblies awaiting explicit ownership enrollment. */
|
||||
id?: ConformanceId;
|
||||
|
||||
Reference in New Issue
Block a user