New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blockprotocol/graph

Package Overview
Dependencies
Maintainers
8
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockprotocol/graph - npm Package Compare versions

Comparing version 0.1.0-canary-20230223145025 to 0.1.0-canary-20230225164454

20

dist/cjs/non-temporal/graph-block-handler.d.ts
import { ModuleHandler } from "@blockprotocol/core";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, GetEntityData as GetEntityDataGeneral } from "../shared/types/entity.js";
import { GetEntityData as GetEntityDataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral } from "../shared/types/entity.js";
/**

@@ -10,3 +10,3 @@ * There's an issue when importing useGraphEmbedderModule from @blockprotocol/graph/react in hashintel/hash:

*/
import { AggregateEntitiesResult, AggregateEntityTypesData, AggregateEntityTypesResult, BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
import { BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, QueryEntitiesResult, QueryEntityTypesData, QueryEntityTypesResult, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
/**

@@ -17,3 +17,3 @@ * Creates a handler for the graph module for the block.

*/
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "aggregatePropertyTypes"> {
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "queryPropertyTypes"> {
constructor({ callbacks, element, }: {

@@ -57,5 +57,5 @@ callbacks?: Partial<BlockGraphMessageCallbacks>;

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<EntityRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntities({ data, }: {
data?: AggregateEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
queryEntities({ data }: {
data?: QueryEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Add Type System mutation methods */

@@ -65,6 +65,6 @@ getEntityType({ data }: {

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<import("../shared/types.js").EntityTypeRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntityTypes({ data }: {
data?: AggregateEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked aggregations */
queryEntityTypes({ data }: {
data?: QueryEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked queries */
uploadFile({ data }: {

@@ -71,0 +71,0 @@ data?: UploadFileData;

@@ -9,6 +9,6 @@ import { ModuleHandler } from "@blockprotocol/core";

export declare class GraphEmbedderHandler extends ModuleHandler implements GraphEmbedderMessages {
private _blockEntitySubgraph?;
private _blockEntitySubgraph;
private _readonly?;
constructor({ blockEntitySubgraph, callbacks, element, readonly, }: {
blockEntitySubgraph?: Subgraph<EntityRootType>;
blockEntitySubgraph: Subgraph<EntityRootType>;
callbacks?: Partial<GraphEmbedderMessageCallbacks>;

@@ -15,0 +15,0 @@ element?: HTMLElement | null;

@@ -9,3 +9,3 @@ /**

import { BaseUrl } from "@blockprotocol/type-system/slim";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, AggregateEntitiesResult as AggregateEntitiesResultGeneral, AggregateEntityTypesData as AggregateEntityTypesDataGeneral, AggregateEntityTypesResult as AggregateEntityTypesResultGeneral, AggregateOperationInput as AggregateOperationInputGeneral, AggregatePropertyTypesData as AggregatePropertyTypesDataGeneral, AggregatePropertyTypesResult as AggregatePropertyTypesResultGeneral, BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreateLinkedAggregationData as CreateLinkedAggregationDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, DeleteLinkedAggregationData as DeleteLinkedAggregationDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetLinkedAggregationData as GetLinkedAggregationDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkedAggregation as LinkedAggregationGeneral, LinkedAggregationDefinition as LinkedAggregationDefinitionGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, SubgraphRootType as SubgraphRootTypeGeneral, Timestamp as TimestampGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdateLinkedAggregationData as UpdateLinkedAggregationDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
import { BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral, QueryEntitiesResult as QueryEntitiesResultGeneral, QueryEntityTypesData as QueryEntityTypesDataGeneral, QueryEntityTypesResult as QueryEntityTypesResultGeneral, QueryOperationInput as QueryOperationInputGeneral, QueryPropertyTypesData as QueryPropertyTypesDataGeneral, QueryPropertyTypesResult as QueryPropertyTypesResultGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, SubgraphRootType as SubgraphRootTypeGeneral, Timestamp as TimestampGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
export { GraphBlockHandler } from "./graph-block-handler.js";

@@ -22,3 +22,3 @@ export { GraphEmbedderHandler } from "./graph-embedder-handler.js";

graph: {
blockEntitySubgraph?: Subgraph<{
blockEntitySubgraph: Subgraph<{
vertexId: EntityVertexId;

@@ -59,5 +59,5 @@ element: RootEntity;

export type MultiSort = MultiSortGeneral;
export type AggregateOperationInput = AggregateOperationInputGeneral;
export type AggregateEntitiesData = AggregateEntitiesDataGeneral<false>;
export type AggregateEntitiesResult<T extends Subgraph<EntityRootType>> = AggregateEntitiesResultGeneral<false, T>;
export type QueryOperationInput = QueryOperationInputGeneral;
export type QueryEntitiesData = QueryEntitiesDataGeneral<false>;
export type QueryEntitiesResult<T extends Subgraph<EntityRootType>> = QueryEntitiesResultGeneral<false, T>;
export type SimpleProperties<Properties extends EntityPropertiesObject> = SimplePropertiesGeneral<Properties>;

@@ -72,12 +72,6 @@ export type FileAtUrlData = FileAtUrlDataGeneral;

export type UploadFileReturn = UploadFileReturnGeneral;
export type LinkedAggregationDefinition = LinkedAggregationDefinitionGeneral;
export type LinkedAggregation = LinkedAggregationGeneral<false>;
export type GetLinkedAggregationData = GetLinkedAggregationDataGeneral;
export type CreateLinkedAggregationData = CreateLinkedAggregationDataGeneral;
export type UpdateLinkedAggregationData = UpdateLinkedAggregationDataGeneral;
export type DeleteLinkedAggregationData = DeleteLinkedAggregationDataGeneral;
export type DataTypeWithMetadata = DataTypeWithMetadataGeneral;
export type EntityTypeWithMetadata = EntityTypeWithMetadataGeneral;
export type AggregateEntityTypesData = AggregateEntityTypesDataGeneral;
export type AggregateEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = AggregateEntityTypesResultGeneral<T>;
export type QueryEntityTypesData = QueryEntityTypesDataGeneral;
export type QueryEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = QueryEntityTypesResultGeneral<T>;
export type GetEntityTypeData = GetEntityTypeDataGeneral;

@@ -88,4 +82,4 @@ export type CreateEntityTypeData = CreateEntityTypeDataGeneral;

export type PropertyTypeWithMetadata = PropertyTypeWithMetadataGeneral;
export type AggregatePropertyTypesData = AggregatePropertyTypesDataGeneral;
export type AggregatePropertyTypesResult = AggregatePropertyTypesResultGeneral;
export type QueryPropertyTypesData = QueryPropertyTypesDataGeneral;
export type QueryPropertyTypesResult = QueryPropertyTypesResultGeneral;
export type GetPropertyTypeData = GetPropertyTypeDataGeneral;

@@ -92,0 +86,0 @@ export type CreatePropertyTypeData = CreatePropertyTypeDataGeneral;

@@ -21,3 +21,3 @@ import { FunctionComponent, RefObject } from "react";

*/
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs?: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
graphModule: GraphEmbedderHandler;

@@ -24,0 +24,0 @@ };

@@ -15,3 +15,2 @@ export declare const hardcodedBpTypes: {

};
readonly additionalProperties: false;
};

@@ -18,0 +17,0 @@ readonly "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1": {

export * from "./types/block-graph.js";
export * from "./types/entity.js";
export * from "./types/file.js";
export * from "./types/linked-aggregation.js";
export * from "./types/ontology.js";
export * from "./types/subgraph.js";
export * from "./types/temporal-versioning.js";
import { MessageCallback, MessageReturn } from "@blockprotocol/core";
import { AggregateEntitiesData, AggregateEntitiesResult, CreateEntityData, DeleteEntityData, Entity, GetEntityData, UpdateEntityData } from "./entity.js";
import { CreateEntityData, DeleteEntityData, Entity, GetEntityData, QueryEntitiesData, QueryEntitiesResult, UpdateEntityData } from "./entity.js";
import { UploadFileData, UploadFileReturn } from "./file.js";
import { AggregatePropertyTypesData, AggregatePropertyTypesResult, CreateEntityTypeData, CreatePropertyTypeData, EntityTypeWithMetadata, GetPropertyTypeData, PropertyTypeWithMetadata, UpdateEntityTypeData, UpdatePropertyTypeData } from "./ontology.js";
import { AggregateEntityTypesData, AggregateEntityTypesResult, GetEntityTypeData } from "./ontology/entity-type.js";
import { CreateEntityTypeData, CreatePropertyTypeData, EntityTypeWithMetadata, GetPropertyTypeData, PropertyTypeWithMetadata, QueryPropertyTypesData, QueryPropertyTypesResult, UpdateEntityTypeData, UpdatePropertyTypeData } from "./ontology.js";
import { GetEntityTypeData, QueryEntityTypesData, QueryEntityTypesResult } from "./ontology/entity-type.js";
import { EntityRootType, EntityTypeRootType, EntityVertexId, PropertyTypeRootType, Subgraph } from "./subgraph.js";

@@ -39,12 +39,12 @@ export type BlockGraphProperties<Temporal extends boolean, RootEntity extends Entity<Temporal> = Entity<Temporal>> = {

getEntity: MessageCallback<GetEntityData<boolean>, null, MessageReturn<Subgraph<Temporal, EntityRootType<Temporal>>>, ReadOrModifyResourceError>;
aggregateEntities: MessageCallback<AggregateEntitiesData<boolean>, null, MessageReturn<AggregateEntitiesResult<Temporal, Subgraph<Temporal, EntityRootType<Temporal>>>>, ReadOrModifyResourceError>;
queryEntities: MessageCallback<QueryEntitiesData<boolean>, null, MessageReturn<QueryEntitiesResult<Temporal, Subgraph<Temporal, EntityRootType<Temporal>>>>, ReadOrModifyResourceError>;
createEntityType: MessageCallback<CreateEntityTypeData, null, MessageReturn<EntityTypeWithMetadata>, CreateResourceError>;
updateEntityType: MessageCallback<UpdateEntityTypeData, null, MessageReturn<EntityTypeWithMetadata>, ReadOrModifyResourceError>;
getEntityType: MessageCallback<GetEntityTypeData, null, MessageReturn<Subgraph<Temporal, EntityTypeRootType>>, ReadOrModifyResourceError>;
aggregateEntityTypes: MessageCallback<AggregateEntityTypesData, null, MessageReturn<AggregateEntityTypesResult<Subgraph<Temporal, EntityTypeRootType>>>, ReadOrModifyResourceError>;
queryEntityTypes: MessageCallback<QueryEntityTypesData, null, MessageReturn<QueryEntityTypesResult<Subgraph<Temporal, EntityTypeRootType>>>, ReadOrModifyResourceError>;
createPropertyType: MessageCallback<CreatePropertyTypeData, null, MessageReturn<PropertyTypeWithMetadata>, CreateResourceError>;
updatePropertyType: MessageCallback<UpdatePropertyTypeData, null, MessageReturn<PropertyTypeWithMetadata>, ReadOrModifyResourceError>;
getPropertyType: MessageCallback<GetPropertyTypeData, null, MessageReturn<Subgraph<Temporal, PropertyTypeRootType>>, ReadOrModifyResourceError>;
aggregatePropertyTypes: MessageCallback<AggregatePropertyTypesData, null, MessageReturn<AggregatePropertyTypesResult>, ReadOrModifyResourceError>;
/** @todo - Reimplement linked aggregations */
queryPropertyTypes: MessageCallback<QueryPropertyTypesData, null, MessageReturn<QueryPropertyTypesResult>, ReadOrModifyResourceError>;
/** @todo - Reimplement linked queries */
uploadFile: MessageCallback<UploadFileData, null, MessageReturn<UploadFileReturn>, CreateResourceError>;

@@ -51,0 +51,0 @@ };

@@ -87,8 +87,8 @@ import type { JsonObject as CoreJsonObject, JsonValue as CoreJsonValue } from "@blockprotocol/core";

export type MultiSort = Sort[];
export type AggregateOperationInput = {
export type QueryOperationInput = {
multiSort?: MultiSort | null;
multiFilter?: MultiFilter | null;
};
export type AggregateEntitiesData<Temporal extends boolean> = {
operation: AggregateOperationInput;
export type QueryEntitiesData<Temporal extends boolean> = {
operation: QueryOperationInput;
graphResolveDepths?: Partial<GraphResolveDepths>;

@@ -98,5 +98,5 @@ } & (Temporal extends true ? {

} : {});
export type AggregateEntitiesResult<Temporal extends boolean, T extends Subgraph<Temporal, EntityRootType<Temporal>>> = {
export type QueryEntitiesResult<Temporal extends boolean, T extends Subgraph<Temporal, EntityRootType<Temporal>>> = {
results: T;
operation: AggregateOperationInput;
operation: QueryOperationInput;
};

@@ -103,0 +103,0 @@ /**

import { EntityType, VersionedUrl } from "@blockprotocol/type-system/slim";
import { AggregateOperationInput } from "../entity.js";
import { QueryOperationInput } from "../entity.js";
import { EntityTypeRootType, Subgraph } from "../subgraph.js";

@@ -9,9 +9,9 @@ import { OntologyElementMetadata } from "./metadata.js";

};
export type AggregateEntityTypesData = {
export type QueryEntityTypesData = {
includeOtherTypesInUse?: boolean | null;
operation?: Omit<AggregateOperationInput, "entityTypeId"> | null;
operation?: Omit<QueryOperationInput, "entityTypeId"> | null;
};
export type AggregateEntityTypesResult<T extends Subgraph<boolean, EntityTypeRootType>> = {
export type QueryEntityTypesResult<T extends Subgraph<boolean, EntityTypeRootType>> = {
results: T[];
operation: AggregateOperationInput;
operation: QueryOperationInput;
};

@@ -21,3 +21,3 @@ export type GetEntityTypeData = {

};
type SystemDefinedEntityTypeProperties = "$id" | "additionalProperties" | "kind" | "type";
type SystemDefinedEntityTypeProperties = "$id" | "kind" | "type";
export type CreateEntityTypeData = {

@@ -24,0 +24,0 @@ entityType: Omit<EntityType, SystemDefinedEntityTypeProperties>;

@@ -8,6 +8,6 @@ import { PropertyType, VersionedUrl } from "@blockprotocol/type-system/slim";

};
export type AggregatePropertyTypesData = {
export type QueryPropertyTypesData = {
graphResolveDepths?: Partial<Pick<Subgraph<true>["depths"], "constrainsValuesOn" | "constrainsPropertiesOn">>;
};
export type AggregatePropertyTypesResult = {
export type QueryPropertyTypesResult = {
results: Subgraph<true, PropertyTypeRootType>;

@@ -14,0 +14,0 @@ };

import { ModuleHandler } from "@blockprotocol/core";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, GetEntityData as GetEntityDataGeneral } from "../shared/types/entity.js";
import { GetEntityData as GetEntityDataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral } from "../shared/types/entity.js";
/**

@@ -10,3 +10,3 @@ * There's an issue when importing useGraphEmbedderModule from @blockprotocol/graph/react in hashintel/hash:

*/
import { AggregateEntitiesResult, AggregateEntityTypesData, AggregateEntityTypesResult, BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
import { BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, QueryEntitiesResult, QueryEntityTypesData, QueryEntityTypesResult, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
/**

@@ -17,3 +17,3 @@ * Creates a handler for the graph module for the block.

*/
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "aggregatePropertyTypes"> {
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "queryPropertyTypes"> {
constructor({ callbacks, element, }: {

@@ -57,5 +57,5 @@ callbacks?: Partial<BlockGraphMessageCallbacks>;

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<EntityRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntities({ data, }: {
data?: AggregateEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
queryEntities({ data }: {
data?: QueryEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Add Type System mutation methods */

@@ -65,6 +65,6 @@ getEntityType({ data }: {

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<import("../shared/types.js").EntityTypeRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntityTypes({ data }: {
data?: AggregateEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked aggregations */
queryEntityTypes({ data }: {
data?: QueryEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked queries */
uploadFile({ data }: {

@@ -71,0 +71,0 @@ data?: UploadFileData;

@@ -9,6 +9,6 @@ import { ModuleHandler } from "@blockprotocol/core";

export declare class GraphEmbedderHandler extends ModuleHandler implements GraphEmbedderMessages {
private _blockEntitySubgraph?;
private _blockEntitySubgraph;
private _readonly?;
constructor({ blockEntitySubgraph, callbacks, element, readonly, }: {
blockEntitySubgraph?: Subgraph<EntityRootType>;
blockEntitySubgraph: Subgraph<EntityRootType>;
callbacks?: Partial<GraphEmbedderMessageCallbacks>;

@@ -15,0 +15,0 @@ element?: HTMLElement | null;

@@ -6,3 +6,3 @@ /**

import { BaseUrl } from "@blockprotocol/type-system/slim";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, AggregateEntitiesResult as AggregateEntitiesResultGeneral, AggregateEntityTypesData as AggregateEntityTypesDataGeneral, AggregateEntityTypesResult as AggregateEntityTypesResultGeneral, AggregateOperationInput as AggregateOperationInputGeneral, AggregatePropertyTypesData as AggregatePropertyTypesDataGeneral, AggregatePropertyTypesResult as AggregatePropertyTypesResultGeneral, BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, BoundedTimeInterval as BoundedTimeIntervalGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreateLinkedAggregationData as CreateLinkedAggregationDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, DeleteLinkedAggregationData as DeleteLinkedAggregationDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityIdWithInterval as EntityIdWithIntervalGeneral, EntityIdWithTimestamp as EntityIdWithTimestampGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTemporalVersioningMetadata as EntityTemporalVersioningMetadataGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, EntityVertexId as EntityVertexIdGeneral, ExclusiveLimitedTemporalBound as ExclusiveLimitedTemporalBoundGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetLinkedAggregationData as GetLinkedAggregationDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, InclusiveLimitedTemporalBound as InclusiveLimitedTemporalBoundGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LimitedTemporalBound as LimitedTemporalBoundGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkedAggregation as LinkedAggregationGeneral, LinkedAggregationDefinition as LinkedAggregationDefinitionGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PinnedTemporalAxis as PinnedTemporalAxisGeneral, PinnedTemporalAxisUnresolved as PinnedTemporalAxisUnresolvedGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryTemporalAxes as QueryTemporalAxesGeneral, QueryTemporalAxesUnresolved as QueryTemporalAxesUnresolvedGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, Subgraph as SubgraphGeneral, SubgraphRootType as SubgraphRootTypeGeneral, SubgraphTemporalAxes as SubgraphTemporalAxesGeneral, TemporalAxis as TemporalAxisGeneral, TemporalBound as TemporalBoundGeneral, TimeInterval as TimeIntervalGeneral, TimeIntervalUnresolved as TimeIntervalUnresolvedGeneral, Timestamp as TimestampGeneral, Unbounded as UnboundedGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdateLinkedAggregationData as UpdateLinkedAggregationDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, VariableTemporalAxis as VariableTemporalAxisGeneral, VariableTemporalAxisUnresolved as VariableTemporalAxisUnresolvedGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
import { BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, BoundedTimeInterval as BoundedTimeIntervalGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityIdWithInterval as EntityIdWithIntervalGeneral, EntityIdWithTimestamp as EntityIdWithTimestampGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTemporalVersioningMetadata as EntityTemporalVersioningMetadataGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, EntityVertexId as EntityVertexIdGeneral, ExclusiveLimitedTemporalBound as ExclusiveLimitedTemporalBoundGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, InclusiveLimitedTemporalBound as InclusiveLimitedTemporalBoundGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LimitedTemporalBound as LimitedTemporalBoundGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PinnedTemporalAxis as PinnedTemporalAxisGeneral, PinnedTemporalAxisUnresolved as PinnedTemporalAxisUnresolvedGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral, QueryEntitiesResult as QueryEntitiesResultGeneral, QueryEntityTypesData as QueryEntityTypesDataGeneral, QueryEntityTypesResult as QueryEntityTypesResultGeneral, QueryOperationInput as QueryOperationInputGeneral, QueryPropertyTypesData as QueryPropertyTypesDataGeneral, QueryPropertyTypesResult as QueryPropertyTypesResultGeneral, QueryTemporalAxes as QueryTemporalAxesGeneral, QueryTemporalAxesUnresolved as QueryTemporalAxesUnresolvedGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, Subgraph as SubgraphGeneral, SubgraphRootType as SubgraphRootTypeGeneral, SubgraphTemporalAxes as SubgraphTemporalAxesGeneral, TemporalAxis as TemporalAxisGeneral, TemporalBound as TemporalBoundGeneral, TimeInterval as TimeIntervalGeneral, TimeIntervalUnresolved as TimeIntervalUnresolvedGeneral, Timestamp as TimestampGeneral, Unbounded as UnboundedGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, VariableTemporalAxis as VariableTemporalAxisGeneral, VariableTemporalAxisUnresolved as VariableTemporalAxisUnresolvedGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
export { type AllOf, type Array, type BaseUrl, type DataType, type DataTypeReference, type EntityType, type EntityTypeReference, type Links, type MaybeOneOfEntityTypeReference, type MaybeOrderedArray, type Object, type OneOf, type ParseBaseUrlError, type ParseVersionedUrlError, type PropertyType, type PropertyTypeReference, type PropertyValues, type Result, type ValueOrArray, type VersionedUrl, extractBaseUrl, extractVersion, getReferencedIdsFromEntityType, getReferencedIdsFromPropertyType, isPropertyValuesArray, validateBaseUrl, validateVersionedUrl, } from "@blockprotocol/type-system/slim";

@@ -19,3 +19,3 @@ export { GraphBlockHandler } from "./graph-block-handler.js";

graph: {
blockEntitySubgraph?: Subgraph<{
blockEntitySubgraph: Subgraph<{
vertexId: EntityVertexId;

@@ -57,5 +57,5 @@ element: RootEntity;

export type MultiSort = MultiSortGeneral;
export type AggregateOperationInput = AggregateOperationInputGeneral;
export type AggregateEntitiesData = AggregateEntitiesDataGeneral<true>;
export type AggregateEntitiesResult<T extends Subgraph<EntityRootType>> = AggregateEntitiesResultGeneral<true, T>;
export type QueryOperationInput = QueryOperationInputGeneral;
export type QueryEntitiesData = QueryEntitiesDataGeneral<true>;
export type QueryEntitiesResult<T extends Subgraph<EntityRootType>> = QueryEntitiesResultGeneral<true, T>;
export type SimpleProperties<Properties extends EntityPropertiesObject> = SimplePropertiesGeneral<Properties>;

@@ -70,12 +70,6 @@ export type FileAtUrlData = FileAtUrlDataGeneral;

export type UploadFileReturn = UploadFileReturnGeneral;
export type LinkedAggregationDefinition = LinkedAggregationDefinitionGeneral;
export type LinkedAggregation = LinkedAggregationGeneral<true>;
export type GetLinkedAggregationData = GetLinkedAggregationDataGeneral;
export type CreateLinkedAggregationData = CreateLinkedAggregationDataGeneral;
export type UpdateLinkedAggregationData = UpdateLinkedAggregationDataGeneral;
export type DeleteLinkedAggregationData = DeleteLinkedAggregationDataGeneral;
export type DataTypeWithMetadata = DataTypeWithMetadataGeneral;
export type EntityTypeWithMetadata = EntityTypeWithMetadataGeneral;
export type AggregateEntityTypesData = AggregateEntityTypesDataGeneral;
export type AggregateEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = AggregateEntityTypesResultGeneral<T>;
export type QueryEntityTypesData = QueryEntityTypesDataGeneral;
export type QueryEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = QueryEntityTypesResultGeneral<T>;
export type GetEntityTypeData = GetEntityTypeDataGeneral;

@@ -86,4 +80,4 @@ export type CreateEntityTypeData = CreateEntityTypeDataGeneral;

export type PropertyTypeWithMetadata = PropertyTypeWithMetadataGeneral;
export type AggregatePropertyTypesData = AggregatePropertyTypesDataGeneral;
export type AggregatePropertyTypesResult = AggregatePropertyTypesResultGeneral;
export type QueryPropertyTypesData = QueryPropertyTypesDataGeneral;
export type QueryPropertyTypesResult = QueryPropertyTypesResultGeneral;
export type GetPropertyTypeData = GetPropertyTypeDataGeneral;

@@ -90,0 +84,0 @@ export type CreatePropertyTypeData = CreatePropertyTypeDataGeneral;

@@ -21,3 +21,3 @@ import { FunctionComponent, RefObject } from "react";

*/
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs?: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
graphModule: GraphEmbedderHandler;

@@ -24,0 +24,0 @@ };

@@ -7,3 +7,2 @@ import Ajv2020 from 'ajv/dist/2020.js';

var $id = "https://blockprotocol.org/type-system/0.3/schema/meta/entity-type";
var title = "Entity Type";

@@ -33,3 +32,4 @@ var description = "Specifies the structure of an Entity Type";

items: {
$ref: "#/$defs/propertyTypeReference"
type: "string",
format: "uri"
}

@@ -59,14 +59,6 @@ },

},
requiredLinks: {
$comment: "@deprecated requiredLinks HAS BEEN REMOVED - REMOVE FROM TYPES AND META-SCHEMA",
type: "array",
items: {
type: "string",
format: "uri"
}
},
links: {
type: "object",
propertyNames: {
$comment: "Property names must be a valid URL to a link-type",
$comment: "Property names must be a valid base URL of a link entity type",
type: "string",

@@ -95,3 +87,3 @@ format: "uri"

items: {
$ref: "#/$defs/multiPropertyType"
$ref: "#/$defs/entityTypeConstrainedArray"
}

@@ -107,6 +99,2 @@ },

}
},
additionalProperties: {
type: "boolean",
"const": false
}

@@ -173,19 +161,21 @@ };

},
multiPropertyType: {
propertyTypeReference: {
type: "object",
properties: {
oneOf: {
type: "array",
items: {
$ref: "#/$defs/propertyTypeReference"
}
$ref: {
$comment: "Property Object values must be defined through references to the same valid URL to a Property Type",
type: "string",
format: "uri"
}
},
required: [
"$ref"
],
additionalProperties: false
},
propertyTypeReference: {
entityTypeReference: {
type: "object",
properties: {
$ref: {
$comment: "Property Object values must be defined through references to the same valid URL to a Property Type",
$comment: "Entity type references must point to a valid versioned URL of an entity type",
type: "string",

@@ -199,6 +189,17 @@ format: "uri"

additionalProperties: false
},
entityTypeConstrainedArray: {
type: "object",
properties: {
oneOf: {
type: "array",
items: {
$ref: "#/$defs/entityTypeReference"
}
}
},
additionalProperties: false
}
};
var entityTypeMetaSchema = {
$id: $id,
title: title,

@@ -318,3 +319,2 @@ description: description,

},
additionalProperties: false,
},

@@ -321,0 +321,0 @@ "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1": {

@@ -7,3 +7,2 @@ import Ajv2020 from 'ajv/dist/2020.js';

var $id = "https://blockprotocol.org/type-system/0.3/schema/meta/entity-type";
var title = "Entity Type";

@@ -33,3 +32,4 @@ var description = "Specifies the structure of an Entity Type";

items: {
$ref: "#/$defs/propertyTypeReference"
type: "string",
format: "uri"
}

@@ -59,14 +59,6 @@ },

},
requiredLinks: {
$comment: "@deprecated requiredLinks HAS BEEN REMOVED - REMOVE FROM TYPES AND META-SCHEMA",
type: "array",
items: {
type: "string",
format: "uri"
}
},
links: {
type: "object",
propertyNames: {
$comment: "Property names must be a valid URL to a link-type",
$comment: "Property names must be a valid base URL of a link entity type",
type: "string",

@@ -95,3 +87,3 @@ format: "uri"

items: {
$ref: "#/$defs/multiPropertyType"
$ref: "#/$defs/entityTypeConstrainedArray"
}

@@ -107,6 +99,2 @@ },

}
},
additionalProperties: {
type: "boolean",
"const": false
}

@@ -173,19 +161,21 @@ };

},
multiPropertyType: {
propertyTypeReference: {
type: "object",
properties: {
oneOf: {
type: "array",
items: {
$ref: "#/$defs/propertyTypeReference"
}
$ref: {
$comment: "Property Object values must be defined through references to the same valid URL to a Property Type",
type: "string",
format: "uri"
}
},
required: [
"$ref"
],
additionalProperties: false
},
propertyTypeReference: {
entityTypeReference: {
type: "object",
properties: {
$ref: {
$comment: "Property Object values must be defined through references to the same valid URL to a Property Type",
$comment: "Entity type references must point to a valid versioned URL of an entity type",
type: "string",

@@ -199,6 +189,17 @@ format: "uri"

additionalProperties: false
},
entityTypeConstrainedArray: {
type: "object",
properties: {
oneOf: {
type: "array",
items: {
$ref: "#/$defs/entityTypeReference"
}
}
},
additionalProperties: false
}
};
var entityTypeMetaSchema = {
$id: $id,
title: title,

@@ -343,3 +344,2 @@ description: description,

},
additionalProperties: false,
},

@@ -346,0 +346,0 @@ "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1": {

@@ -123,9 +123,9 @@ import { LitElement } from 'lit';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -173,50 +173,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -745,5 +745,2 @@ // }

getBlockEntity() {
if (!this.graph || !this.graph.blockEntitySubgraph) {
throw new Error("graph.blockEntitySubgraph was not passed to block.");
}
const blockEntity = getRoots(this.graph.blockEntitySubgraph)[0];

@@ -750,0 +747,0 @@ if (!blockEntity) {

@@ -123,9 +123,9 @@ import { LitElement } from 'lit';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -173,50 +173,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -740,5 +740,2 @@ // }

getBlockEntity() {
if (!this.graph || !this.graph.blockEntitySubgraph) {
throw new Error("graph.blockEntitySubgraph was not passed to block.");
}
const blockEntity = getRoots(this.graph.blockEntitySubgraph)[0];

@@ -745,0 +742,0 @@ if (!blockEntity) {

@@ -16,14 +16,11 @@ var name = "graph";

description: "The entityTypeId of the type of the entity to create",
type: "string"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/versioned-url"
},
properties: {
description: "The properties of the entity to create",
type: "object"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/property-type-object"
},
links: {
description: "Links to create along with the entity",
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/link"
}
linkData: {
description: "Link data if the entity is a link entity",
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/link-data"
}

@@ -37,2 +34,4 @@ },

errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -47,16 +46,9 @@ },

data: {
type: "object",
properties: {
entity: {
description: "The newly created entity",
$ref: "https://blockprotocol.org/types/modules/graph/entity"
}
},
required: [
"entity"
]
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/entity"
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
"INVALID_INPUT",
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -72,14 +64,26 @@ },

type: "object",
properties: {
entityId: {
description: "The entityId of the entity to update",
type: "string"
allOf: [
{
properties: {
entityId: {
description: "The entityId of the entity to update",
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/entity-id"
},
entityTypeId: {
description: "The entityTypeId of the updated entity",
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/versioned-url"
},
properties: {
description: "The new properties object to assign to the entity",
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/property-type-object"
}
}
},
properties: {
description: "The new properties object to assign to the entity",
type: "object"
{
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/link-orders"
}
},
],
required: [
"entityId",
"entityTypeId",
"properties"

@@ -89,2 +93,4 @@ ]

errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -99,12 +105,3 @@ },

data: {
type: "object",
properties: {
entity: {
description: "The updated entity",
$ref: "https://blockprotocol.org/types/modules/graph/entity"
}
},
required: [
"entity"
]
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/entity"
},

@@ -114,3 +111,5 @@ errorCodes: [

"INVALID_INPUT",
"NOT_FOUND"
"NOT_FOUND",
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -125,14 +124,8 @@ },

data: {
type: "object",
properties: {
entityId: {
description: "The entityId of the entity to delete",
type: "string"
}
},
required: [
"entityId"
]
description: "The entityId of the entity to delete",
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/entity-id"
},
errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -148,3 +141,4 @@ },

description: "'true' if the operation succeeded. Otherwise, errors should be returned.",
type: "boolean"
type: "boolean",
"const": true
},

@@ -154,3 +148,5 @@ errorCodes: [

"INVALID_INPUT",
"NOT_FOUND"
"NOT_FOUND",
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -160,3 +156,3 @@ },

messageName: "getEntity",
description: "Request to retrieve an entity, expecting the entity in response.",
description: "Request to retrieve a subgraph rooted at a specific entity",
source: "block",

@@ -170,3 +166,6 @@ respondedToBy: "getEntityResponse",

description: "The entityId of the entity to retrieve",
type: "string"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/entity-id"
},
graphResolveDepths: {
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/partial-graph-resolve-depths"
}

@@ -179,2 +178,4 @@ },

errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -189,12 +190,3 @@ },

data: {
type: "object",
properties: {
entity: {
description: "The retrieved entity",
$ref: "https://blockprotocol.org/types/modules/graph/entity"
}
},
required: [
"entity"
]
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/subgraph"
},

@@ -204,248 +196,25 @@ errorCodes: [

"INVALID_INPUT",
"NOT_FOUND"
"NOT_FOUND",
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]
},
{
messageName: "aggregateEntities",
description: "Request to retrieve an aggregation of entities.",
messageName: "queryEntities",
description: "Request to query entities.",
source: "block",
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
sentOnInitialization: false,
data: {
description: "The results of a query over entities, and the operation that was used to produce it.",
type: "object",
properties: {
operation: {
description: "The aggregation operation to apply",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
}
},
required: [
"operation"
]
},
errorCodes: [
]
},
{
messageName: "aggregateEntitiesResponse",
description: "The response to a request to retrieve an aggregation of entities",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
operation: {
description: "The aggregation operation that was applied to generate the results, including any defaults set by the application.",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/query-operation"
},
results: {
description: "The entities returned by the aggregation operation",
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/entity"
}
graphResolveDepths: {
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/partial-graph-resolve-depths"
}
},
required: [
"operation",
"results"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
]
},
{
messageName: "createEntityType",
description: "Request to create an entity type, expecting the created entity type in response.",
source: "block",
respondedToBy: "createEntityTypeResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
schema: {
description: "The schema of the entity type to create",
type: "object"
}
},
required: [
"schema"
]
},
errorCodes: [
]
},
{
messageName: "createEntityTypeResponse",
description: "The response to a request to create an entityType",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityType: {
description: "The created entity type",
$ref: "https://blockprotocol.org/types/modules/graph/entity-type"
}
},
required: [
"entityType"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
]
},
{
messageName: "updateEntityType",
description: "Request to update an entityType, expecting the updated entityType in response.",
source: "block",
respondedToBy: "updateEntityTypeResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityTypeId: {
description: "The entityTypeId of the entity to update",
type: "string"
},
schema: {
description: "The new schema to assign to the entity type",
type: "object"
}
},
required: [
"entityTypeId",
"schema"
]
},
errorCodes: [
]
},
{
messageName: "updateEntityTypeResponse",
description: "The response to a request to update an entity type",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityType: {
description: "The updated entity type",
$ref: "https://blockprotocol.org/types/modules/graph/entity-type"
}
},
required: [
"entityType"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "deleteEntityType",
description: "Request to delete an entityType, expecting a boolean in response.",
source: "block",
respondedToBy: "deleteEntityTypeResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityTypeId: {
description: "The entityTypeId of the entityType to delete",
type: "string"
}
},
required: [
"entityTypeId"
]
},
errorCodes: [
]
},
{
messageName: "deleteEntityTypeResponse",
description: "The response to a request to delete an entity type",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
description: "'true' if the operation succeeded. Otherwise, 'errors' will be returned.",
type: "boolean"
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "getEntityType",
description: "Request to retrieve an entity type, expecting the entity type in response.",
source: "block",
respondedToBy: "getEntityTypeResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityTypeId: {
description: "The entityTypeId of the entity type to retrieve",
type: "string"
}
},
required: [
"entityTypeId"
]
},
errorCodes: [
]
},
{
messageName: "getEntityTypeResponse",
description: "The response to a request to get an entity type",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
entityType: {
description: "The retrieved entity type",
$ref: "https://blockprotocol.org/types/modules/graph/entity-type"
}
},
required: [
"entityType"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "aggregateEntityTypes",
description: "Request to retrieve an aggregation of entity types.",
source: "block",
respondedToBy: "aggregateEntityTypesResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
operation: {
description: "The aggregation operation to apply",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
}
},
required: [
"operation"

@@ -455,7 +224,9 @@ ]

errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]
},
{
messageName: "aggregateEntityTypesResponse",
description: "The response to a request to retrieve an aggregation of entity types",
messageName: "queryEntitiesResponse",
description: "The response to a request to query over entities",
source: "embedder",

@@ -465,290 +236,14 @@ respondedToBy: null,

data: {
description: "The query operation to apply",
type: "object",
properties: {
operation: {
description: "The aggregation operation that was applied to generate the results, including any defaults set by the application.",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
},
results: {
description: "The entity types returned by the aggregation operation",
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/entity-type"
}
}
},
required: [
"operation",
"results"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
]
},
{
messageName: "createLink",
description: "Request to create a link, expecting the created link in response.",
source: "block",
respondedToBy: "createLinkResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
sourceEntityId: {
description: "The entityId of the source entity for the link",
type: "string"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/subgraph"
},
destinationEntityId: {
description: "The entityId of the destination entity for the link",
type: "string"
},
index: {
description: "The position of this link in an ordered list of links, where ordering is important. An index of 0 represents the first position in the list.",
type: "number"
},
path: {
description: "The path or field on the entity where this link is made (e.g. 'friend', 'employer')",
type: "string"
}
},
required: [
"sourceEntityId",
"destinationEntityId",
"path"
]
},
errorCodes: [
]
},
{
messageName: "createLinkResponse",
description: "The response to a request to create a link",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
link: {
description: "The created link",
$ref: "https://blockprotocol.org/types/modules/graph/link"
}
},
required: [
"link"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
]
},
{
messageName: "updateLink",
description: "Request to update a link, expecting the updated link in response.",
source: "block",
respondedToBy: "updateLinkResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkId: {
description: "The linkId of the entity to update",
type: "string"
},
index: {
description: "The new index the link should occupy in an ordered list of links",
type: "number"
}
},
required: [
"linkId",
"index"
]
},
errorCodes: [
]
},
{
messageName: "updateLinkResponse",
description: "The response to a request to update a link",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
link: {
description: "The updated link",
$ref: "https://blockprotocol.org/types/modules/graph/link"
}
},
required: [
"link"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "deleteLink",
description: "Request to delete a link, expecting a boolean in response.",
source: "block",
respondedToBy: "deleteLinkResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkId: {
description: "The linkId of the link to delete",
type: "string"
}
},
required: [
"linkId"
]
},
errorCodes: [
]
},
{
messageName: "deleteLinkResponse",
description: "The response to a request to delete a link",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
description: "'true' if the operation succeeded. Otherwise, 'errors' should be returned.",
type: "boolean"
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "getLink",
description: "Request to retrieve a link, expecting the link in response.",
source: "block",
respondedToBy: "getLinkResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkId: {
description: "The linkId of the link to retrieve",
type: "string"
}
},
required: [
"linkId"
]
},
errorCodes: [
]
},
{
messageName: "getLinkResponse",
description: "The response to a request to get a link",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
link: {
description: "The retrieved link",
$ref: "https://blockprotocol.org/types/modules/graph/link"
}
},
required: [
"link"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "createLinkedAggregation",
description: "Request to create a linked aggregation, expecting the created linked aggregation in response.",
source: "block",
respondedToBy: "createLinkedAggregationResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
sourceEntityId: {
description: "The entityId of the source entity of this linked aggregation",
type: "string"
},
operation: {
description: "The aggregation operation to apply",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
},
path: {
description: "The path or field on the entity where this linked aggregation is made (e.g. 'rows')",
type: "string"
$ref: "https://blockprotocol.org/types/modules/graph/0.3/schema/query-operation"
}
},
required: [
"sourceEntityId",
"operation",
"path"
]
},
errorCodes: [
]
},
{
messageName: "createLinkedAggregationResponse",
description: "The response to a request to create a linkedAggregation",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkedAggregation: {
description: "The created linked aggregation",
$ref: "https://blockprotocol.org/types/modules/graph/linked-aggregation-definition"
}
},
required: [
"linkedAggregation"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT"
]
},
{
messageName: "updateLinkedAggregation",
description: "Request to update a linked aggregation, expecting the updated linked aggregation in response.",
source: "block",
respondedToBy: "updateLinkedAggregationResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
aggregationId: {
description: "The aggregationId of the linked aggregation to update",
type: "string"
},
operation: {
description: "The new aggregation operation",
$ref: "https://blockprotocol.org/types/modules/graph/aggregation-operation"
}
},
required: [
"aggregationId",
"results",
"operation"

@@ -758,110 +253,9 @@ ]

errorCodes: [
]
},
{
messageName: "updateLinkedAggregationResponse",
description: "The response to a request to update a linked aggregation",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkedAggregation: {
description: "The updated linked aggregation definition",
$ref: "https://blockprotocol.org/types/modules/graph/linked-aggregation-definition"
}
},
required: [
"linkedAggregation"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]
},
{
messageName: "deleteLinkedAggregation",
description: "Request to delete a linked aggregation, expecting a boolean in response.",
source: "block",
respondedToBy: "deleteLinkedAggregationResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
aggregationId: {
description: "The aggregationId of the linked aggregation to delete",
type: "string"
}
},
required: [
"aggregationId"
]
},
errorCodes: [
]
},
{
messageName: "deleteLinkedAggregationResponse",
description: "The response to a request to delete a linked aggregation",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "boolean"
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "getLinkedAggregation",
description: "Request to retrieve a linked aggregation, expecting the linked aggregation in response.",
source: "block",
respondedToBy: "getLinkedAggregationResponse",
sentOnInitialization: false,
data: {
type: "object",
properties: {
aggregationId: {
description: "The aggregationId of the linkedAggregation to retrieve",
type: "string"
}
},
required: [
"aggregationId"
]
},
errorCodes: [
]
},
{
messageName: "getLinkedAggregationResponse",
description: "The response to a request to get a linkedAggregation",
source: "embedder",
respondedToBy: null,
sentOnInitialization: false,
data: {
type: "object",
properties: {
linkedAggregation: {
description: "The retrieved linked aggregation",
$ref: "https://blockprotocol.org/types/modules/graph/linked-aggregation"
}
},
required: [
"linkedAggregation"
]
},
errorCodes: [
"FORBIDDEN",
"INVALID_INPUT",
"NOT_FOUND"
]
},
{
messageName: "uploadFile",

@@ -873,25 +267,44 @@ description: "Request to upload a file and create an entity to store metadata about it.",

data: {
type: "object",
properties: {
file: {
description: "The file blob, if being uploaded directly. Either 'url' or 'file' is required."
oneOf: [
{
type: "object",
properties: {
description: {
type: "string"
},
name: {
type: "string"
},
url: {
type: "string",
format: "uri",
$comment: "The URL to take the file from, if not being uploaded directly."
}
},
required: [
"url"
]
},
url: {
description: "The URL to take the file from, if not being uploaded directly. Either 'url' or 'file' is required.",
type: "string"
},
mediaType: {
description: "The type of media file this is",
type: "string",
"enum": [
"image",
"video"
{
type: "object",
properties: {
description: {
type: "string"
},
name: {
type: "string"
},
file: {
$comment: "the file blob, if being uploaded directly."
}
},
required: [
"file"
]
}
},
required: [
"mediaType"
]
},
errorCodes: [
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]

@@ -906,25 +319,3 @@ },

data: {
type: "object",
properties: {
entityId: {
description: "The entityId of the entity storing metadata about the file."
},
url: {
description: "The URL the file is now being served from.",
type: "string"
},
mediaType: {
description: "The type of media file this is",
type: "string",
"enum": [
"image",
"video"
]
}
},
required: [
"entityId",
"mediaType",
"url"
]
$ref: "https://blockprotocol.org/@blockprotocol/types/entity-type/file/v/1"
},

@@ -934,96 +325,6 @@ errorCodes: [

"INVALID_INPUT",
"NOT_FOUND"
"NOT_FOUND",
"NOT_IMPLEMENTED",
"INTERNAL_ERROR"
]
},
{
messageName: "blockEntity",
description: "The entity associated with the block",
source: "embedder",
respondedToBy: null,
sentOnInitialization: true,
data: {
$ref: "https://blockprotocol.org/types/modules/graph/entity"
},
errorCodes: [
]
},
{
messageName: "blockGraph",
description: "A graph of entities with the block entity at the root, resolved to the specified depth.",
source: "embedder",
respondedToBy: null,
sentOnInitialization: true,
data: {
type: "object",
properties: {
linkedEntities: {
description: "The entities linked from the block entity, and potentially entities linked from them, and so on, depending on depth.",
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/entity"
}
},
linkGroups: {
description: "The links attached to the block or the entities provided in linkedEntities, grouped by entity and path.",
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/link-group"
}
},
depth: {
description: "The number of links that will be followed from the block when resolving the graph.",
type: "integer",
inclusiveMinimum: 0
}
},
required: [
"linkedEntities",
"linkGroups",
"depth"
]
},
errorCodes: [
]
},
{
messageName: "entityTypes",
description: "The entity types for any entities provided to the block as part of other messages.",
source: "embedder",
respondedToBy: null,
sentOnInitialization: true,
data: {
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/entity-type"
}
},
errorCodes: [
]
},
{
messageName: "linkedAggregations",
description: "Aggregations which are linked to from the block entity.",
source: "embedder",
respondedToBy: null,
sentOnInitialization: true,
data: {
type: "array",
items: {
$ref: "https://blockprotocol.org/types/modules/graph/linked-aggregation-definition"
}
},
errorCodes: [
]
},
{
messageName: "readonly",
description: "Indicates if the block should display in 'readonly' mode, i.e. without editing controls.",
source: "embedder",
respondedToBy: null,
sentOnInitialization: true,
data: {
type: "boolean"
},
errorCodes: [
]
}

@@ -1030,0 +331,0 @@ ];

@@ -257,9 +257,9 @@ import { validateBaseUrl } from '@blockprotocol/type-system/slim';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -307,50 +307,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -376,7 +376,7 @@ // }

constructor({ blockEntitySubgraph, callbacks, element,
// linkedAggregations,
// linkedQueries,
readonly, }) {
super({ element, callbacks, moduleName: "graph", sourceType: "embedder" });
this._blockEntitySubgraph = blockEntitySubgraph;
// this._linkedAggregations = linkedAggregations;
// this._linkedQueries = linkedQueries;
this._readonly = readonly;

@@ -426,3 +426,3 @@ }

blockEntitySubgraph: this._blockEntitySubgraph,
// linkedAggregations: this._linkedAggregations,
// linkedQueries: this._linkedQueries,
readonly: this._readonly,

@@ -432,2 +432,5 @@ };

blockEntitySubgraph({ data }) {
if (!data) {
throw new Error("'data' must be provided with blockEntitySubgraph");
}
this._blockEntitySubgraph = data;

@@ -441,8 +444,8 @@ this.sendMessage({

}
// linkedAggregations({ data }: { data?: LinkedAggregations }) {
// this._linkedAggregations = data;
// linkedQueries({ data }: { data?: LinkedQueries }) {
// this._linkedQueries = data;
// this.sendMessage({
// message: {
// messageName: "linkedAggregations",
// data: this._linkedAggregations,
// messageName: "linkedQueries",
// data: this._linkedQueries,
// },

@@ -449,0 +452,0 @@ // });

@@ -257,9 +257,9 @@ import { validateBaseUrl } from '@blockprotocol/type-system/slim';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -307,50 +307,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -376,7 +376,7 @@ // }

constructor({ blockEntitySubgraph, callbacks, element,
// linkedAggregations,
// linkedQueries,
readonly, }) {
super({ element, callbacks, moduleName: "graph", sourceType: "embedder" });
this._blockEntitySubgraph = blockEntitySubgraph;
// this._linkedAggregations = linkedAggregations;
// this._linkedQueries = linkedQueries;
this._readonly = readonly;

@@ -426,3 +426,3 @@ }

blockEntitySubgraph: this._blockEntitySubgraph,
// linkedAggregations: this._linkedAggregations,
// linkedQueries: this._linkedQueries,
readonly: this._readonly,

@@ -432,2 +432,5 @@ };

blockEntitySubgraph({ data }) {
if (!data) {
throw new Error("'data' must be provided with blockEntitySubgraph");
}
this._blockEntitySubgraph = data;

@@ -441,8 +444,8 @@ this.sendMessage({

}
// linkedAggregations({ data }: { data?: LinkedAggregations }) {
// this._linkedAggregations = data;
// linkedQueries({ data }: { data?: LinkedQueries }) {
// this._linkedQueries = data;
// this.sendMessage({
// message: {
// messageName: "linkedAggregations",
// data: this._linkedAggregations,
// messageName: "linkedQueries",
// data: this._linkedQueries,
// },

@@ -449,0 +452,0 @@ // });

import { ModuleHandler } from "@blockprotocol/core";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, GetEntityData as GetEntityDataGeneral } from "../shared/types/entity.js";
import { GetEntityData as GetEntityDataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral } from "../shared/types/entity.js";
/**

@@ -10,3 +10,3 @@ * There's an issue when importing useGraphEmbedderModule from @blockprotocol/graph/react in hashintel/hash:

*/
import { AggregateEntitiesResult, AggregateEntityTypesData, AggregateEntityTypesResult, BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
import { BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, QueryEntitiesResult, QueryEntityTypesData, QueryEntityTypesResult, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
/**

@@ -17,3 +17,3 @@ * Creates a handler for the graph module for the block.

*/
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "aggregatePropertyTypes"> {
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "queryPropertyTypes"> {
constructor({ callbacks, element, }: {

@@ -57,5 +57,5 @@ callbacks?: Partial<BlockGraphMessageCallbacks>;

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<EntityRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntities({ data, }: {
data?: AggregateEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
queryEntities({ data }: {
data?: QueryEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Add Type System mutation methods */

@@ -65,6 +65,6 @@ getEntityType({ data }: {

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<import("../shared/types.js").EntityTypeRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntityTypes({ data }: {
data?: AggregateEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked aggregations */
queryEntityTypes({ data }: {
data?: QueryEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked queries */
uploadFile({ data }: {

@@ -71,0 +71,0 @@ data?: UploadFileData;

@@ -9,6 +9,6 @@ import { ModuleHandler } from "@blockprotocol/core";

export declare class GraphEmbedderHandler extends ModuleHandler implements GraphEmbedderMessages {
private _blockEntitySubgraph?;
private _blockEntitySubgraph;
private _readonly?;
constructor({ blockEntitySubgraph, callbacks, element, readonly, }: {
blockEntitySubgraph?: Subgraph<EntityRootType>;
blockEntitySubgraph: Subgraph<EntityRootType>;
callbacks?: Partial<GraphEmbedderMessageCallbacks>;

@@ -15,0 +15,0 @@ element?: HTMLElement | null;

@@ -9,3 +9,3 @@ /**

import { BaseUrl } from "@blockprotocol/type-system/slim";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, AggregateEntitiesResult as AggregateEntitiesResultGeneral, AggregateEntityTypesData as AggregateEntityTypesDataGeneral, AggregateEntityTypesResult as AggregateEntityTypesResultGeneral, AggregateOperationInput as AggregateOperationInputGeneral, AggregatePropertyTypesData as AggregatePropertyTypesDataGeneral, AggregatePropertyTypesResult as AggregatePropertyTypesResultGeneral, BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreateLinkedAggregationData as CreateLinkedAggregationDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, DeleteLinkedAggregationData as DeleteLinkedAggregationDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetLinkedAggregationData as GetLinkedAggregationDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkedAggregation as LinkedAggregationGeneral, LinkedAggregationDefinition as LinkedAggregationDefinitionGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, SubgraphRootType as SubgraphRootTypeGeneral, Timestamp as TimestampGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdateLinkedAggregationData as UpdateLinkedAggregationDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
import { BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral, QueryEntitiesResult as QueryEntitiesResultGeneral, QueryEntityTypesData as QueryEntityTypesDataGeneral, QueryEntityTypesResult as QueryEntityTypesResultGeneral, QueryOperationInput as QueryOperationInputGeneral, QueryPropertyTypesData as QueryPropertyTypesDataGeneral, QueryPropertyTypesResult as QueryPropertyTypesResultGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, SubgraphRootType as SubgraphRootTypeGeneral, Timestamp as TimestampGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
export { GraphBlockHandler } from "./graph-block-handler.js";

@@ -22,3 +22,3 @@ export { GraphEmbedderHandler } from "./graph-embedder-handler.js";

graph: {
blockEntitySubgraph?: Subgraph<{
blockEntitySubgraph: Subgraph<{
vertexId: EntityVertexId;

@@ -59,5 +59,5 @@ element: RootEntity;

export type MultiSort = MultiSortGeneral;
export type AggregateOperationInput = AggregateOperationInputGeneral;
export type AggregateEntitiesData = AggregateEntitiesDataGeneral<false>;
export type AggregateEntitiesResult<T extends Subgraph<EntityRootType>> = AggregateEntitiesResultGeneral<false, T>;
export type QueryOperationInput = QueryOperationInputGeneral;
export type QueryEntitiesData = QueryEntitiesDataGeneral<false>;
export type QueryEntitiesResult<T extends Subgraph<EntityRootType>> = QueryEntitiesResultGeneral<false, T>;
export type SimpleProperties<Properties extends EntityPropertiesObject> = SimplePropertiesGeneral<Properties>;

@@ -72,12 +72,6 @@ export type FileAtUrlData = FileAtUrlDataGeneral;

export type UploadFileReturn = UploadFileReturnGeneral;
export type LinkedAggregationDefinition = LinkedAggregationDefinitionGeneral;
export type LinkedAggregation = LinkedAggregationGeneral<false>;
export type GetLinkedAggregationData = GetLinkedAggregationDataGeneral;
export type CreateLinkedAggregationData = CreateLinkedAggregationDataGeneral;
export type UpdateLinkedAggregationData = UpdateLinkedAggregationDataGeneral;
export type DeleteLinkedAggregationData = DeleteLinkedAggregationDataGeneral;
export type DataTypeWithMetadata = DataTypeWithMetadataGeneral;
export type EntityTypeWithMetadata = EntityTypeWithMetadataGeneral;
export type AggregateEntityTypesData = AggregateEntityTypesDataGeneral;
export type AggregateEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = AggregateEntityTypesResultGeneral<T>;
export type QueryEntityTypesData = QueryEntityTypesDataGeneral;
export type QueryEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = QueryEntityTypesResultGeneral<T>;
export type GetEntityTypeData = GetEntityTypeDataGeneral;

@@ -88,4 +82,4 @@ export type CreateEntityTypeData = CreateEntityTypeDataGeneral;

export type PropertyTypeWithMetadata = PropertyTypeWithMetadataGeneral;
export type AggregatePropertyTypesData = AggregatePropertyTypesDataGeneral;
export type AggregatePropertyTypesResult = AggregatePropertyTypesResultGeneral;
export type QueryPropertyTypesData = QueryPropertyTypesDataGeneral;
export type QueryPropertyTypesResult = QueryPropertyTypesResultGeneral;
export type GetPropertyTypeData = GetPropertyTypeDataGeneral;

@@ -92,0 +86,0 @@ export type CreatePropertyTypeData = CreatePropertyTypeDataGeneral;

@@ -21,3 +21,3 @@ import { FunctionComponent, RefObject } from "react";

*/
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs?: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
graphModule: GraphEmbedderHandler;

@@ -24,0 +24,0 @@ };

@@ -124,9 +124,9 @@ import { useModuleConstructor } from '@blockprotocol/core/react';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -174,50 +174,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -243,7 +243,7 @@ // }

constructor({ blockEntitySubgraph, callbacks, element,
// linkedAggregations,
// linkedQueries,
readonly, }) {
super({ element, callbacks, moduleName: "graph", sourceType: "embedder" });
this._blockEntitySubgraph = blockEntitySubgraph;
// this._linkedAggregations = linkedAggregations;
// this._linkedQueries = linkedQueries;
this._readonly = readonly;

@@ -293,3 +293,3 @@ }

blockEntitySubgraph: this._blockEntitySubgraph,
// linkedAggregations: this._linkedAggregations,
// linkedQueries: this._linkedQueries,
readonly: this._readonly,

@@ -299,2 +299,5 @@ };

blockEntitySubgraph({ data }) {
if (!data) {
throw new Error("'data' must be provided with blockEntitySubgraph");
}
this._blockEntitySubgraph = data;

@@ -308,8 +311,8 @@ this.sendMessage({

}
// linkedAggregations({ data }: { data?: LinkedAggregations }) {
// this._linkedAggregations = data;
// linkedQueries({ data }: { data?: LinkedQueries }) {
// this._linkedQueries = data;
// this.sendMessage({
// message: {
// messageName: "linkedAggregations",
// data: this._linkedAggregations,
// messageName: "linkedQueries",
// data: this._linkedQueries,
// },

@@ -316,0 +319,0 @@ // });

@@ -124,9 +124,9 @@ import { useModuleConstructor } from '@blockprotocol/core/react';

}
aggregateEntities({ data, }) {
queryEntities({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntities",
messageName: "queryEntities",
data,
},
respondedToBy: "aggregateEntitiesResponse",
respondedToBy: "queryEntitiesResponse",
});

@@ -174,50 +174,50 @@ }

}
aggregateEntityTypes({ data }) {
queryEntityTypes({ data }) {
return this.sendMessage({
message: {
messageName: "aggregateEntityTypes",
messageName: "queryEntityTypes",
data,
},
respondedToBy: "aggregateEntityTypesResponse",
respondedToBy: "queryEntityTypesResponse",
});
}
/** @todo - Reimplement linked aggregations */
// createLinkedAggregation({ data }: { data?: CreateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, CreateResourceError>({
/** @todo - Reimplement linked queries */
// createLinkedQuery({ data }: { data?: CreateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, CreateResourceError>({
// message: {
// messageName: "createLinkedAggregation",
// messageName: "createLinkedQuery",
// data,
// },
// respondedToBy: "createLinkedAggregationResponse",
// respondedToBy: "createLinkedQueryResponse",
// });
// }
//
// updateLinkedAggregation({ data }: { data?: UpdateLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// updateLinkedQuery({ data }: { data?: UpdateLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "updateLinkedAggregation",
// messageName: "updateLinkedQuery",
// data,
// },
// respondedToBy: "updateLinkedAggregationResponse",
// respondedToBy: "updateLinkedQueryResponse",
// });
// }
//
// deleteLinkedAggregation({ data }: { data?: DeleteLinkedAggregationData }) {
// deleteLinkedQuery({ data }: { data?: DeleteLinkedQueryData }) {
// // @todo fix this 'any'
// return this.sendMessage<any, ReadOrModifyResourceError>({
// message: {
// messageName: "deleteLinkedAggregation",
// messageName: "deleteLinkedQuery",
// data,
// },
// respondedToBy: "deleteLinkedAggregationResponse",
// respondedToBy: "deleteLinkedQueryResponse",
// });
// }
//
// getLinkedAggregation({ data }: { data?: GetLinkedAggregationData }) {
// return this.sendMessage<LinkedAggregation, ReadOrModifyResourceError>({
// getLinkedQuery({ data }: { data?: GetLinkedQueryData }) {
// return this.sendMessage<LinkedQuery, ReadOrModifyResourceError>({
// message: {
// messageName: "getLinkedAggregation",
// messageName: "getLinkedQuery",
// data,
// },
// respondedToBy: "getLinkedAggregationResponse",
// respondedToBy: "getLinkedQueryResponse",
// });

@@ -243,7 +243,7 @@ // }

constructor({ blockEntitySubgraph, callbacks, element,
// linkedAggregations,
// linkedQueries,
readonly, }) {
super({ element, callbacks, moduleName: "graph", sourceType: "embedder" });
this._blockEntitySubgraph = blockEntitySubgraph;
// this._linkedAggregations = linkedAggregations;
// this._linkedQueries = linkedQueries;
this._readonly = readonly;

@@ -293,3 +293,3 @@ }

blockEntitySubgraph: this._blockEntitySubgraph,
// linkedAggregations: this._linkedAggregations,
// linkedQueries: this._linkedQueries,
readonly: this._readonly,

@@ -299,2 +299,5 @@ };

blockEntitySubgraph({ data }) {
if (!data) {
throw new Error("'data' must be provided with blockEntitySubgraph");
}
this._blockEntitySubgraph = data;

@@ -308,8 +311,8 @@ this.sendMessage({

}
// linkedAggregations({ data }: { data?: LinkedAggregations }) {
// this._linkedAggregations = data;
// linkedQueries({ data }: { data?: LinkedQueries }) {
// this._linkedQueries = data;
// this.sendMessage({
// message: {
// messageName: "linkedAggregations",
// data: this._linkedAggregations,
// messageName: "linkedQueries",
// data: this._linkedQueries,
// },

@@ -316,0 +319,0 @@ // });

@@ -15,3 +15,2 @@ export declare const hardcodedBpTypes: {

};
readonly additionalProperties: false;
};

@@ -18,0 +17,0 @@ readonly "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1": {

export * from "./types/block-graph.js";
export * from "./types/entity.js";
export * from "./types/file.js";
export * from "./types/linked-aggregation.js";
export * from "./types/ontology.js";
export * from "./types/subgraph.js";
export * from "./types/temporal-versioning.js";
import { MessageCallback, MessageReturn } from "@blockprotocol/core";
import { AggregateEntitiesData, AggregateEntitiesResult, CreateEntityData, DeleteEntityData, Entity, GetEntityData, UpdateEntityData } from "./entity.js";
import { CreateEntityData, DeleteEntityData, Entity, GetEntityData, QueryEntitiesData, QueryEntitiesResult, UpdateEntityData } from "./entity.js";
import { UploadFileData, UploadFileReturn } from "./file.js";
import { AggregatePropertyTypesData, AggregatePropertyTypesResult, CreateEntityTypeData, CreatePropertyTypeData, EntityTypeWithMetadata, GetPropertyTypeData, PropertyTypeWithMetadata, UpdateEntityTypeData, UpdatePropertyTypeData } from "./ontology.js";
import { AggregateEntityTypesData, AggregateEntityTypesResult, GetEntityTypeData } from "./ontology/entity-type.js";
import { CreateEntityTypeData, CreatePropertyTypeData, EntityTypeWithMetadata, GetPropertyTypeData, PropertyTypeWithMetadata, QueryPropertyTypesData, QueryPropertyTypesResult, UpdateEntityTypeData, UpdatePropertyTypeData } from "./ontology.js";
import { GetEntityTypeData, QueryEntityTypesData, QueryEntityTypesResult } from "./ontology/entity-type.js";
import { EntityRootType, EntityTypeRootType, EntityVertexId, PropertyTypeRootType, Subgraph } from "./subgraph.js";

@@ -39,12 +39,12 @@ export type BlockGraphProperties<Temporal extends boolean, RootEntity extends Entity<Temporal> = Entity<Temporal>> = {

getEntity: MessageCallback<GetEntityData<boolean>, null, MessageReturn<Subgraph<Temporal, EntityRootType<Temporal>>>, ReadOrModifyResourceError>;
aggregateEntities: MessageCallback<AggregateEntitiesData<boolean>, null, MessageReturn<AggregateEntitiesResult<Temporal, Subgraph<Temporal, EntityRootType<Temporal>>>>, ReadOrModifyResourceError>;
queryEntities: MessageCallback<QueryEntitiesData<boolean>, null, MessageReturn<QueryEntitiesResult<Temporal, Subgraph<Temporal, EntityRootType<Temporal>>>>, ReadOrModifyResourceError>;
createEntityType: MessageCallback<CreateEntityTypeData, null, MessageReturn<EntityTypeWithMetadata>, CreateResourceError>;
updateEntityType: MessageCallback<UpdateEntityTypeData, null, MessageReturn<EntityTypeWithMetadata>, ReadOrModifyResourceError>;
getEntityType: MessageCallback<GetEntityTypeData, null, MessageReturn<Subgraph<Temporal, EntityTypeRootType>>, ReadOrModifyResourceError>;
aggregateEntityTypes: MessageCallback<AggregateEntityTypesData, null, MessageReturn<AggregateEntityTypesResult<Subgraph<Temporal, EntityTypeRootType>>>, ReadOrModifyResourceError>;
queryEntityTypes: MessageCallback<QueryEntityTypesData, null, MessageReturn<QueryEntityTypesResult<Subgraph<Temporal, EntityTypeRootType>>>, ReadOrModifyResourceError>;
createPropertyType: MessageCallback<CreatePropertyTypeData, null, MessageReturn<PropertyTypeWithMetadata>, CreateResourceError>;
updatePropertyType: MessageCallback<UpdatePropertyTypeData, null, MessageReturn<PropertyTypeWithMetadata>, ReadOrModifyResourceError>;
getPropertyType: MessageCallback<GetPropertyTypeData, null, MessageReturn<Subgraph<Temporal, PropertyTypeRootType>>, ReadOrModifyResourceError>;
aggregatePropertyTypes: MessageCallback<AggregatePropertyTypesData, null, MessageReturn<AggregatePropertyTypesResult>, ReadOrModifyResourceError>;
/** @todo - Reimplement linked aggregations */
queryPropertyTypes: MessageCallback<QueryPropertyTypesData, null, MessageReturn<QueryPropertyTypesResult>, ReadOrModifyResourceError>;
/** @todo - Reimplement linked queries */
uploadFile: MessageCallback<UploadFileData, null, MessageReturn<UploadFileReturn>, CreateResourceError>;

@@ -51,0 +51,0 @@ };

@@ -87,8 +87,8 @@ import type { JsonObject as CoreJsonObject, JsonValue as CoreJsonValue } from "@blockprotocol/core";

export type MultiSort = Sort[];
export type AggregateOperationInput = {
export type QueryOperationInput = {
multiSort?: MultiSort | null;
multiFilter?: MultiFilter | null;
};
export type AggregateEntitiesData<Temporal extends boolean> = {
operation: AggregateOperationInput;
export type QueryEntitiesData<Temporal extends boolean> = {
operation: QueryOperationInput;
graphResolveDepths?: Partial<GraphResolveDepths>;

@@ -98,5 +98,5 @@ } & (Temporal extends true ? {

} : {});
export type AggregateEntitiesResult<Temporal extends boolean, T extends Subgraph<Temporal, EntityRootType<Temporal>>> = {
export type QueryEntitiesResult<Temporal extends boolean, T extends Subgraph<Temporal, EntityRootType<Temporal>>> = {
results: T;
operation: AggregateOperationInput;
operation: QueryOperationInput;
};

@@ -103,0 +103,0 @@ /**

import { EntityType, VersionedUrl } from "@blockprotocol/type-system/slim";
import { AggregateOperationInput } from "../entity.js";
import { QueryOperationInput } from "../entity.js";
import { EntityTypeRootType, Subgraph } from "../subgraph.js";

@@ -9,9 +9,9 @@ import { OntologyElementMetadata } from "./metadata.js";

};
export type AggregateEntityTypesData = {
export type QueryEntityTypesData = {
includeOtherTypesInUse?: boolean | null;
operation?: Omit<AggregateOperationInput, "entityTypeId"> | null;
operation?: Omit<QueryOperationInput, "entityTypeId"> | null;
};
export type AggregateEntityTypesResult<T extends Subgraph<boolean, EntityTypeRootType>> = {
export type QueryEntityTypesResult<T extends Subgraph<boolean, EntityTypeRootType>> = {
results: T[];
operation: AggregateOperationInput;
operation: QueryOperationInput;
};

@@ -21,3 +21,3 @@ export type GetEntityTypeData = {

};
type SystemDefinedEntityTypeProperties = "$id" | "additionalProperties" | "kind" | "type";
type SystemDefinedEntityTypeProperties = "$id" | "kind" | "type";
export type CreateEntityTypeData = {

@@ -24,0 +24,0 @@ entityType: Omit<EntityType, SystemDefinedEntityTypeProperties>;

@@ -8,6 +8,6 @@ import { PropertyType, VersionedUrl } from "@blockprotocol/type-system/slim";

};
export type AggregatePropertyTypesData = {
export type QueryPropertyTypesData = {
graphResolveDepths?: Partial<Pick<Subgraph<true>["depths"], "constrainsValuesOn" | "constrainsPropertiesOn">>;
};
export type AggregatePropertyTypesResult = {
export type QueryPropertyTypesResult = {
results: Subgraph<true, PropertyTypeRootType>;

@@ -14,0 +14,0 @@ };

import { ModuleHandler } from "@blockprotocol/core";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, GetEntityData as GetEntityDataGeneral } from "../shared/types/entity.js";
import { GetEntityData as GetEntityDataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral } from "../shared/types/entity.js";
/**

@@ -10,3 +10,3 @@ * There's an issue when importing useGraphEmbedderModule from @blockprotocol/graph/react in hashintel/hash:

*/
import { AggregateEntitiesResult, AggregateEntityTypesData, AggregateEntityTypesResult, BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
import { BlockGraphMessageCallbacks, CreateEntityData, DeleteEntityData, Entity, EntityPropertiesObject, EntityRootType, GetEntityTypeData, GraphBlockMessages, QueryEntitiesResult, QueryEntityTypesData, QueryEntityTypesResult, Subgraph, UpdateEntityData, UploadFileData } from "./main.js";
/**

@@ -17,3 +17,3 @@ * Creates a handler for the graph module for the block.

*/
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "aggregatePropertyTypes"> {
export declare class GraphBlockHandler extends ModuleHandler implements Omit<GraphBlockMessages, "createEntityType" | "updateEntityType" | "createPropertyType" | "updatePropertyType" | "getPropertyType" | "queryPropertyTypes"> {
constructor({ callbacks, element, }: {

@@ -57,5 +57,5 @@ callbacks?: Partial<BlockGraphMessageCallbacks>;

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<EntityRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntities({ data, }: {
data?: AggregateEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
queryEntities({ data }: {
data?: QueryEntitiesDataGeneral<boolean>;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntitiesResult<Subgraph<EntityRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Add Type System mutation methods */

@@ -65,6 +65,6 @@ getEntityType({ data }: {

}): Promise<import("@blockprotocol/core").MessageData<Subgraph<import("../shared/types.js").EntityTypeRootType>, import("../shared/types.js").ReadOrModifyResourceError>>;
aggregateEntityTypes({ data }: {
data?: AggregateEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<AggregateEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked aggregations */
queryEntityTypes({ data }: {
data?: QueryEntityTypesData;
}): Promise<import("@blockprotocol/core").MessageData<QueryEntityTypesResult<Subgraph<import("../shared/types.js").EntityTypeRootType>>, import("../shared/types.js").ReadOrModifyResourceError>>;
/** @todo - Reimplement linked queries */
uploadFile({ data }: {

@@ -71,0 +71,0 @@ data?: UploadFileData;

@@ -9,6 +9,6 @@ import { ModuleHandler } from "@blockprotocol/core";

export declare class GraphEmbedderHandler extends ModuleHandler implements GraphEmbedderMessages {
private _blockEntitySubgraph?;
private _blockEntitySubgraph;
private _readonly?;
constructor({ blockEntitySubgraph, callbacks, element, readonly, }: {
blockEntitySubgraph?: Subgraph<EntityRootType>;
blockEntitySubgraph: Subgraph<EntityRootType>;
callbacks?: Partial<GraphEmbedderMessageCallbacks>;

@@ -15,0 +15,0 @@ element?: HTMLElement | null;

@@ -6,3 +6,3 @@ /**

import { BaseUrl } from "@blockprotocol/type-system/slim";
import { AggregateEntitiesData as AggregateEntitiesDataGeneral, AggregateEntitiesResult as AggregateEntitiesResultGeneral, AggregateEntityTypesData as AggregateEntityTypesDataGeneral, AggregateEntityTypesResult as AggregateEntityTypesResultGeneral, AggregateOperationInput as AggregateOperationInputGeneral, AggregatePropertyTypesData as AggregatePropertyTypesDataGeneral, AggregatePropertyTypesResult as AggregatePropertyTypesResultGeneral, BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, BoundedTimeInterval as BoundedTimeIntervalGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreateLinkedAggregationData as CreateLinkedAggregationDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, DeleteLinkedAggregationData as DeleteLinkedAggregationDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityIdWithInterval as EntityIdWithIntervalGeneral, EntityIdWithTimestamp as EntityIdWithTimestampGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTemporalVersioningMetadata as EntityTemporalVersioningMetadataGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, EntityVertexId as EntityVertexIdGeneral, ExclusiveLimitedTemporalBound as ExclusiveLimitedTemporalBoundGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetLinkedAggregationData as GetLinkedAggregationDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, InclusiveLimitedTemporalBound as InclusiveLimitedTemporalBoundGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LimitedTemporalBound as LimitedTemporalBoundGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkedAggregation as LinkedAggregationGeneral, LinkedAggregationDefinition as LinkedAggregationDefinitionGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PinnedTemporalAxis as PinnedTemporalAxisGeneral, PinnedTemporalAxisUnresolved as PinnedTemporalAxisUnresolvedGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryTemporalAxes as QueryTemporalAxesGeneral, QueryTemporalAxesUnresolved as QueryTemporalAxesUnresolvedGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, Subgraph as SubgraphGeneral, SubgraphRootType as SubgraphRootTypeGeneral, SubgraphTemporalAxes as SubgraphTemporalAxesGeneral, TemporalAxis as TemporalAxisGeneral, TemporalBound as TemporalBoundGeneral, TimeInterval as TimeIntervalGeneral, TimeIntervalUnresolved as TimeIntervalUnresolvedGeneral, Timestamp as TimestampGeneral, Unbounded as UnboundedGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdateLinkedAggregationData as UpdateLinkedAggregationDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, VariableTemporalAxis as VariableTemporalAxisGeneral, VariableTemporalAxisUnresolved as VariableTemporalAxisUnresolvedGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
import { BlockGraphMessageCallbacks as BlockGraphMessageCallbacksGeneral, BoundedTimeInterval as BoundedTimeIntervalGeneral, ConstrainsLinkDestinationsOnEdge as ConstrainsLinkDestinationsOnEdgeGeneral, ConstrainsLinksOnEdge as ConstrainsLinksOnEdgeGeneral, ConstrainsPropertiesOnEdge as ConstrainsPropertiesOnEdgeGeneral, ConstrainsValuesOnEdge as ConstrainsValuesOnEdgeGeneral, CreateEntityData as CreateEntityDataGeneral, CreateEntityTypeData as CreateEntityTypeDataGeneral, CreatePropertyTypeData as CreatePropertyTypeDataGeneral, CreateResourceError as CreateResourceErrorGeneral, DataTypeRootType as DataTypeRootTypeGeneral, DataTypeVertex as DataTypeVertexGeneral, DataTypeWithMetadata as DataTypeWithMetadataGeneral, DeleteEntityData as DeleteEntityDataGeneral, EdgeResolveDepths as EdgeResolveDepthsGeneral, Edges as EdgesGeneral, Entity as EntityGeneral, EntityId as EntityIdGeneral, EntityIdWithInterval as EntityIdWithIntervalGeneral, EntityIdWithTimestamp as EntityIdWithTimestampGeneral, EntityMetadata as EntityMetadataGeneral, EntityPropertiesObject as EntityPropertiesObjectGeneral, EntityPropertyValue as EntityPropertyValueGeneral, EntityRecordId as EntityRecordIdGeneral, EntityRevisionId as EntityRevisionIdGeneral, EntityRootType as EntityRootTypeGeneral, EntityTemporalVersioningMetadata as EntityTemporalVersioningMetadataGeneral, EntityTypeRootType as EntityTypeRootTypeGeneral, EntityTypeVertex as EntityTypeVertexGeneral, EntityTypeWithMetadata as EntityTypeWithMetadataGeneral, EntityVertex as EntityVertexGeneral, EntityVertexId as EntityVertexIdGeneral, ExclusiveLimitedTemporalBound as ExclusiveLimitedTemporalBoundGeneral, FileAtUrlData as FileAtUrlDataGeneral, FileData as FileDataGeneral, FileEntity as FileEntityGeneral, FileEntityProperties as FileEntityPropertiesGeneral, FilterOperatorRequiringValue as FilterOperatorRequiringValueGeneral, FilterOperatorType as FilterOperatorTypeGeneral, FilterOperatorWithoutValue as FilterOperatorWithoutValueGeneral, GetEntityData as GetEntityDataGeneral, GetEntityTypeData as GetEntityTypeDataGeneral, GetPropertyTypeData as GetPropertyTypeDataGeneral, GraphBlockMessages as GraphBlockMessagesGeneral, GraphElementForIdentifier as GraphElementForIdentifierGeneral, GraphElementIdentifiers as GraphElementIdentifiersGeneral, GraphElementVertexId as GraphElementVertexIdGeneral, GraphEmbedderMessageCallbacks as GraphEmbedderMessageCallbacksGeneral, GraphEmbedderMessages as GraphEmbedderMessagesGeneral, GraphResolveDepths as GraphResolveDepthsGeneral, HasLeftEntityEdge as HasLeftEntityEdgeGeneral, HasRightEntityEdge as HasRightEntityEdgeGeneral, IdentifierForGraphElement as IdentifierForGraphElementGeneral, InclusiveLimitedTemporalBound as InclusiveLimitedTemporalBoundGeneral, IncomingLinkEdge as IncomingLinkEdgeGeneral, InheritsFromEdge as InheritsFromEdgeGeneral, IsInheritedByEdge as IsInheritedByEdgeGeneral, IsOfTypeEdge as IsOfTypeEdgeGeneral, IsTypeOfEdge as IsTypeOfEdgeGeneral, JsonObject as JsonObjectGeneral, JsonValue as JsonValueGeneral, KnowledgeGraphEdgeKind as KnowledgeGraphEdgeKindGeneral, KnowledgeGraphOutwardEdge as KnowledgeGraphOutwardEdgeGeneral, KnowledgeGraphRootedEdges as KnowledgeGraphRootedEdgesGeneral, KnowledgeGraphVertex as KnowledgeGraphVertexGeneral, KnowledgeGraphVertices as KnowledgeGraphVerticesGeneral, LimitedTemporalBound as LimitedTemporalBoundGeneral, LinkData as LinkDataGeneral, LinkDestinationsConstrainedByEdge as LinkDestinationsConstrainedByEdgeGeneral, LinkEntityAndRightEntity as LinkEntityAndRightEntityGeneral, LinksConstrainedByEdge as LinksConstrainedByEdgeGeneral, MultiFilter as MultiFilterGeneral, MultiFilterOperatorType as MultiFilterOperatorTypeGeneral, MultiSort as MultiSortGeneral, OntologyEdgeKind as OntologyEdgeKindGeneral, OntologyElementMetadata as OntologyElementMetadataGeneral, OntologyOutwardEdge as OntologyOutwardEdgeGeneral, OntologyRootedEdges as OntologyRootedEdgesGeneral, OntologyTypeRecordId as OntologyTypeRecordIdGeneral, OntologyTypeRevisionId as OntologyTypeRevisionIdGeneral, OntologyTypeVertexId as OntologyTypeVertexIdGeneral, OntologyVertex as OntologyVertexGeneral, OntologyVertices as OntologyVerticesGeneral, OutgoingEdgeResolveDepth as OutgoingEdgeResolveDepthGeneral, OutgoingLinkEdge as OutgoingLinkEdgeGeneral, OutwardEdge as OutwardEdgeGeneral, PinnedTemporalAxis as PinnedTemporalAxisGeneral, PinnedTemporalAxisUnresolved as PinnedTemporalAxisUnresolvedGeneral, PropertiesConstrainedByEdge as PropertiesConstrainedByEdgeGeneral, PropertyTypeRootType as PropertyTypeRootTypeGeneral, PropertyTypeVertex as PropertyTypeVertexGeneral, PropertyTypeWithMetadata as PropertyTypeWithMetadataGeneral, QueryEntitiesData as QueryEntitiesDataGeneral, QueryEntitiesResult as QueryEntitiesResultGeneral, QueryEntityTypesData as QueryEntityTypesDataGeneral, QueryEntityTypesResult as QueryEntityTypesResultGeneral, QueryOperationInput as QueryOperationInputGeneral, QueryPropertyTypesData as QueryPropertyTypesDataGeneral, QueryPropertyTypesResult as QueryPropertyTypesResultGeneral, QueryTemporalAxes as QueryTemporalAxesGeneral, QueryTemporalAxesUnresolved as QueryTemporalAxesUnresolvedGeneral, ReadOrModifyResourceError as ReadOrModifyResourceErrorGeneral, SharedEdgeKind as SharedEdgeKindGeneral, SimpleProperties as SimplePropertiesGeneral, Sort as SortGeneral, Subgraph as SubgraphGeneral, SubgraphRootType as SubgraphRootTypeGeneral, SubgraphTemporalAxes as SubgraphTemporalAxesGeneral, TemporalAxis as TemporalAxisGeneral, TemporalBound as TemporalBoundGeneral, TimeInterval as TimeIntervalGeneral, TimeIntervalUnresolved as TimeIntervalUnresolvedGeneral, Timestamp as TimestampGeneral, Unbounded as UnboundedGeneral, UpdateEntityData as UpdateEntityDataGeneral, UpdateEntityTypeData as UpdateEntityTypeDataGeneral, UpdatePropertyTypeData as UpdatePropertyTypeDataGeneral, UploadFileData as UploadFileDataGeneral, UploadFileReturn as UploadFileReturnGeneral, ValuesConstrainedByEdge as ValuesConstrainedByEdgeGeneral, VariableTemporalAxis as VariableTemporalAxisGeneral, VariableTemporalAxisUnresolved as VariableTemporalAxisUnresolvedGeneral, Vertex as VertexGeneral, VertexId as VertexIdGeneral, Vertices as VerticesGeneral } from "../shared/types.js";
export { type AllOf, type Array, type BaseUrl, type DataType, type DataTypeReference, type EntityType, type EntityTypeReference, type Links, type MaybeOneOfEntityTypeReference, type MaybeOrderedArray, type Object, type OneOf, type ParseBaseUrlError, type ParseVersionedUrlError, type PropertyType, type PropertyTypeReference, type PropertyValues, type Result, type ValueOrArray, type VersionedUrl, extractBaseUrl, extractVersion, getReferencedIdsFromEntityType, getReferencedIdsFromPropertyType, isPropertyValuesArray, validateBaseUrl, validateVersionedUrl, } from "@blockprotocol/type-system/slim";

@@ -19,3 +19,3 @@ export { GraphBlockHandler } from "./graph-block-handler.js";

graph: {
blockEntitySubgraph?: Subgraph<{
blockEntitySubgraph: Subgraph<{
vertexId: EntityVertexId;

@@ -57,5 +57,5 @@ element: RootEntity;

export type MultiSort = MultiSortGeneral;
export type AggregateOperationInput = AggregateOperationInputGeneral;
export type AggregateEntitiesData = AggregateEntitiesDataGeneral<true>;
export type AggregateEntitiesResult<T extends Subgraph<EntityRootType>> = AggregateEntitiesResultGeneral<true, T>;
export type QueryOperationInput = QueryOperationInputGeneral;
export type QueryEntitiesData = QueryEntitiesDataGeneral<true>;
export type QueryEntitiesResult<T extends Subgraph<EntityRootType>> = QueryEntitiesResultGeneral<true, T>;
export type SimpleProperties<Properties extends EntityPropertiesObject> = SimplePropertiesGeneral<Properties>;

@@ -70,12 +70,6 @@ export type FileAtUrlData = FileAtUrlDataGeneral;

export type UploadFileReturn = UploadFileReturnGeneral;
export type LinkedAggregationDefinition = LinkedAggregationDefinitionGeneral;
export type LinkedAggregation = LinkedAggregationGeneral<true>;
export type GetLinkedAggregationData = GetLinkedAggregationDataGeneral;
export type CreateLinkedAggregationData = CreateLinkedAggregationDataGeneral;
export type UpdateLinkedAggregationData = UpdateLinkedAggregationDataGeneral;
export type DeleteLinkedAggregationData = DeleteLinkedAggregationDataGeneral;
export type DataTypeWithMetadata = DataTypeWithMetadataGeneral;
export type EntityTypeWithMetadata = EntityTypeWithMetadataGeneral;
export type AggregateEntityTypesData = AggregateEntityTypesDataGeneral;
export type AggregateEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = AggregateEntityTypesResultGeneral<T>;
export type QueryEntityTypesData = QueryEntityTypesDataGeneral;
export type QueryEntityTypesResult<T extends Subgraph<EntityTypeRootType>> = QueryEntityTypesResultGeneral<T>;
export type GetEntityTypeData = GetEntityTypeDataGeneral;

@@ -86,4 +80,4 @@ export type CreateEntityTypeData = CreateEntityTypeDataGeneral;

export type PropertyTypeWithMetadata = PropertyTypeWithMetadataGeneral;
export type AggregatePropertyTypesData = AggregatePropertyTypesDataGeneral;
export type AggregatePropertyTypesResult = AggregatePropertyTypesResultGeneral;
export type QueryPropertyTypesData = QueryPropertyTypesDataGeneral;
export type QueryPropertyTypesResult = QueryPropertyTypesResultGeneral;
export type GetPropertyTypeData = GetPropertyTypeDataGeneral;

@@ -90,0 +84,0 @@ export type CreatePropertyTypeData = CreatePropertyTypeDataGeneral;

@@ -21,3 +21,3 @@ import { FunctionComponent, RefObject } from "react";

*/
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs?: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
export declare const useGraphEmbedderModule: (ref: RefObject<HTMLElement>, constructorArgs: Omit<ConstructorParameters<typeof GraphEmbedderHandler>[0], "element">) => {
graphModule: GraphEmbedderHandler;

@@ -24,0 +24,0 @@ };

{
"name": "@blockprotocol/graph",
"version": "0.1.0-canary-20230223145025",
"version": "0.1.0-canary-20230225164454",
"description": "Implementation of the Block Protocol Graph service specification for blocks and embedding applications",

@@ -141,4 +141,4 @@ "keywords": [

"dependencies": {
"@blockprotocol/core": "0.1.0-canary-20230223145025",
"@blockprotocol/type-system": "0.1.0-canary-20230223145025",
"@blockprotocol/core": "0.1.0-canary-20230225164454",
"@blockprotocol/type-system": "0.1.0-canary-20230225164454",
"ajv": "^8.11.2",

@@ -145,0 +145,0 @@ "ajv-formats": "^2.1.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc