blockprotocol
Advanced tools
Comparing version 0.0.3 to 0.0.4
// ---------------------------- UTILITIES ----------------------------- // | ||
type DistributedOmit<T, K extends PropertyKey> = T extends T | ||
@@ -7,2 +8,3 @@ ? Omit<T, K> | ||
// -------------------------- BLOCK METADATA -------------------------- // | ||
export type BlockVariant = { | ||
@@ -34,2 +36,3 @@ description?: string | null; | ||
// ----------------------------- ENTITIES ----------------------------- // | ||
export type BlockProtocolEntity = { | ||
@@ -49,3 +52,3 @@ accountId?: string | null; | ||
BlockProtocolCreateLinksAction, | ||
| "sourceEntityAccountId" | ||
| "sourceAccountId" | ||
| "sourceEntityId" | ||
@@ -90,3 +93,3 @@ | "sourceEntityTypeId" | ||
export type BlockProtocolDeleteEntitiesFunction = { | ||
(actions: BlockProtocolDeleteEntitiesAction[]): Promise<unknown[]>; | ||
(actions: BlockProtocolDeleteEntitiesAction[]): Promise<boolean[]>; | ||
}; | ||
@@ -136,6 +139,9 @@ | ||
results: T[]; | ||
operation: Required<BlockProtocolAggregateOperationInput> & { | ||
pageCount: number; | ||
totalCount: number; | ||
}; | ||
operation: BlockProtocolAggregateOperationInput & | ||
Required< | ||
Pick<BlockProtocolAggregateOperationInput, "pageNumber" | "itemsPerPage"> | ||
> & { | ||
pageCount: number; | ||
totalCount: number; | ||
}; | ||
}; | ||
@@ -150,2 +156,3 @@ | ||
// ------------------------ OTHER FUNCTIONS --------------------------- // | ||
export type BlockProtocolFileMediaType = "image" | "video"; | ||
@@ -155,2 +162,3 @@ | ||
(action: { | ||
accountId?: string; | ||
file?: File | null; | ||
@@ -160,2 +168,3 @@ url?: string | null; | ||
}): Promise<{ | ||
accountId?: string; | ||
entityId: string; | ||
@@ -168,2 +177,3 @@ url: string; | ||
// ----------------------------- LINKS -------------------------------- // | ||
type SingleTargetLinkFields = { | ||
@@ -182,3 +192,3 @@ destinationAccountId?: string | null; | ||
linkId: string; | ||
sourceEntityAccountId?: string | null; | ||
sourceAccountId?: string | null; | ||
sourceEntityId: string; | ||
@@ -192,3 +202,3 @@ sourceEntityTypeId?: string | null; | ||
export type BlockProtocolLinkGroup = { | ||
sourceEntityAccountId?: string | null; | ||
sourceAccountId?: string | null; | ||
sourceEntityId: string; | ||
@@ -201,2 +211,10 @@ sourceEntityVersionId?: string | null; | ||
export type BlockProtocolLinkedAggregation = { | ||
sourceAccountId?: string | null; | ||
sourceEntityId: string; | ||
sourceEntityVersionId?: string | null; | ||
sourceEntityTypeId?: string | null; | ||
path: string; | ||
} & BlockProtocolAggregateEntitiesResult; | ||
export type BlockProtocolGetLinkAction = { | ||
@@ -306,17 +324,18 @@ linkId: string; | ||
// ------------------------- GENERAL / SUMMARY ----------------------------- // | ||
export type BlockProtocolFunction = | ||
| BlockProtocolAggregateEntitiesFunction | ||
| BlockProtocolAggregateEntityTypesFunction | ||
| BlockProtocolCreateEntitiesFunction | ||
| BlockProtocolCreateEntityTypesFunction | ||
| BlockProtocolCreateLinksFunction | ||
| BlockProtocolGetEntitiesFunction | ||
| BlockProtocolUpdateEntitiesFunction | ||
| BlockProtocolGetEntityTypesFunction | ||
| BlockProtocolGetLinksFunction | ||
| BlockProtocolDeleteEntitiesFunction | ||
| BlockProtocolAggregateEntityTypesFunction | ||
| BlockProtocolCreateEntityTypesFunction | ||
| BlockProtocolGetEntityTypesFunction | ||
| BlockProtocolDeleteEntityTypesFunction | ||
| BlockProtocolDeleteLinksFunction | ||
| BlockProtocolUpdateEntitiesFunction | ||
| BlockProtocolUpdateEntityTypesFunction | ||
| BlockProtocolCreateLinksFunction | ||
| BlockProtocolGetLinksFunction | ||
| BlockProtocolUpdateLinksFunction | ||
| BlockProtocolDeleteLinksFunction | ||
| BlockProtocolUploadFileFunction; | ||
@@ -366,4 +385,5 @@ | ||
entityTypes?: BlockProtocolEntityType[]; | ||
linkedAggregations?: BlockProtocolLinkedAggregation[]; | ||
linkedEntities?: BlockProtocolEntity[]; | ||
linkGroups?: BlockProtocolLinkGroup[]; | ||
} & BlockProtocolFunctions; |
{ | ||
"name": "blockprotocol", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "TypeScript typings for https://blockprotocol.org developers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
11610
323