From 3fd14e2f7b47c471536e0e3abaf654b581b783aa Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Wed, 18 Dec 2024 19:44:25 +0000 Subject: [PATCH 1/7] wip setting new dataTypeIds, titles, icons for system types --- .config/husky/pre-commit | 57 ++++ .config/husky/prepare-commit-msg | 57 ++++ .../labels-icons-data-types.ts | 291 ++++++++++++++++++ ...eate-first-custom-data-types.migration.ts} | 0 .../001-create-hash-system-types.migration.ts | 25 +- ...03-create-linear-system-types.migration.ts | 88 ++++-- .../public/icons/docs/00-README.md | 5 + .../icons/icon/{README.md => 00-README.md} | 2 + .../public/icons/integrations/00-README.md | 5 + 9 files changed, 500 insertions(+), 30 deletions(-) create mode 100755 .config/husky/pre-commit create mode 100755 .config/husky/prepare-commit-msg create mode 100644 apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts rename apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/{006-create-first-custom-data-types.migration.ts => 000-create-first-custom-data-types.migration.ts} (100%) create mode 100644 apps/hash-frontend/public/icons/docs/00-README.md rename apps/hash-frontend/public/icons/icon/{README.md => 00-README.md} (70%) create mode 100644 apps/hash-frontend/public/icons/integrations/00-README.md diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit new file mode 100755 index 00000000000..4855f612468 --- /dev/null +++ b/.config/husky/pre-commit @@ -0,0 +1,57 @@ +#!/bin/sh + +if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then + set -x +fi + +if [ "$LEFTHOOK" = "0" ]; then + exit 0 +fi + +call_lefthook() +{ + if test -n "$LEFTHOOK_BIN" + then + "$LEFTHOOK_BIN" "$@" + elif lefthook -h >/dev/null 2>&1 + then + lefthook "$@" + else + dir="$(git rev-parse --show-toplevel)" + osArch=$(uname | tr '[:upper:]' '[:lower:]') + cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/') + if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" + then + "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@" + elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" + then + "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@" + elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" + then + "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@" + elif test -f "$dir/node_modules/lefthook/bin/index.js" + then + "$dir/node_modules/lefthook/bin/index.js" "$@" + + elif bundle exec lefthook -h >/dev/null 2>&1 + then + bundle exec lefthook "$@" + elif yarn lefthook -h >/dev/null 2>&1 + then + yarn lefthook "$@" + elif pnpm lefthook -h >/dev/null 2>&1 + then + pnpm lefthook "$@" + elif swift package plugin lefthook >/dev/null 2>&1 + then + swift package --disable-sandbox plugin lefthook "$@" + elif command -v mint >/dev/null 2>&1 + then + mint run csjones/lefthook-plugin "$@" + else + echo "Can't find lefthook in PATH" + fi + fi +} + +call_lefthook run "pre-commit" "$@" diff --git a/.config/husky/prepare-commit-msg b/.config/husky/prepare-commit-msg new file mode 100755 index 00000000000..2655902bceb --- /dev/null +++ b/.config/husky/prepare-commit-msg @@ -0,0 +1,57 @@ +#!/bin/sh + +if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then + set -x +fi + +if [ "$LEFTHOOK" = "0" ]; then + exit 0 +fi + +call_lefthook() +{ + if test -n "$LEFTHOOK_BIN" + then + "$LEFTHOOK_BIN" "$@" + elif lefthook -h >/dev/null 2>&1 + then + lefthook "$@" + else + dir="$(git rev-parse --show-toplevel)" + osArch=$(uname | tr '[:upper:]' '[:lower:]') + cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/') + if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" + then + "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@" + elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" + then + "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@" + elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" + then + "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@" + elif test -f "$dir/node_modules/lefthook/bin/index.js" + then + "$dir/node_modules/lefthook/bin/index.js" "$@" + + elif bundle exec lefthook -h >/dev/null 2>&1 + then + bundle exec lefthook "$@" + elif yarn lefthook -h >/dev/null 2>&1 + then + yarn lefthook "$@" + elif pnpm lefthook -h >/dev/null 2>&1 + then + pnpm lefthook "$@" + elif swift package plugin lefthook >/dev/null 2>&1 + then + swift package --disable-sandbox plugin lefthook "$@" + elif command -v mint >/dev/null 2>&1 + then + mint run csjones/lefthook-plugin "$@" + else + echo "Can't find lefthook in PATH" + fi + fi +} + +call_lefthook run "prepare-commit-msg" "$@" diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts new file mode 100644 index 00000000000..8d7e6394e56 --- /dev/null +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts @@ -0,0 +1,291 @@ +/** + * @file this is a temporary file to store changes to types that will need amending directly in the production database + * it will be turned into a migration script and then deleted. + */ +import { + linearPropertyTypes, + systemDataTypes, + systemEntityTypes, + systemLinkEntityTypes, + systemPropertyTypes, +} from "@local/hash-isomorphic-utils/ontology-type-ids"; +import { EntityType } from "@blockprotocol/type-system-rs/pkg/type-system"; + +type SystemPropertyTypeId = + (typeof systemPropertyTypes)[keyof typeof systemPropertyTypes]["propertyTypeId"]; + +type SystemLinearPropertyTypeId = + (typeof linearPropertyTypes)[keyof typeof linearPropertyTypes]["propertyTypeId"]; + +type SystemDataTypeId = + (typeof systemDataTypes)[keyof typeof systemDataTypes]["dataTypeId"]; + +/** + * A map of propertyTypeIds to the oneOf value that should be set on them + */ +const propertyTypeOneOfChanges: Record< + SystemPropertyTypeId | SystemLinearPropertyTypeId, + [{ $ref: SystemDataTypeId }] +> = { + "https://hash.ai/@hash/types/property-type/website-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/pinned-entity-type-base-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/profile-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/email/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/email/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/expired-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/resolved-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/deleted-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@hash/types/property-type/read-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/archived-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/created-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/deletion-requested-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/logo-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/period-upload-volume/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/megabytes/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/trial-ends-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/updated-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/avatar-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/last-seen/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/status-until-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/profile-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/auto-archived-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/auto-closed-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/canceled-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/completed-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/due-date/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/date/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/started-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/triaged-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/started-triage-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/issue-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/attachment-url/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], + "https://hash.ai/@linear/types/property-type/snoozed-until-at/v/1": [ + { $ref: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], +}; + +type SystemEntityTypeId = + (typeof systemEntityTypes)[keyof typeof systemEntityTypes]["entityTypeId"]; + +const entityTypeChanges: Record< + SystemEntityTypeId, + { + icon?: `/icons/types/${string}.svg`; + labelProperty?: `${string}/`; + } & Required> +> = { + "https://hash.ai/@hash/types/entity-type/file/v/2": { + icon: "/icons/types/file.svg", + labelProperty: + "https://blockprotocol.org/@blockprotocol/types/property-type/file-name/", + titlePlural: "Files", + }, + "https://hash.ai/@hash/types/entity-type/image/v/2": { + icon: "/icons/types/file-image.svg", + titlePlural: "Image Files", + }, + "https://hash.ai/@hash/types/entity-type/block/v/1": { + icon: "/icons/types/cube.svg", + titlePlural: "Blocks", + }, + "https://hash.ai/@hash/types/entity-type/block-collection/v/1": { + icon: "/icons/types/cubes.svg", + titlePlural: "Blocks", + }, + "https://hash.ai/@hash/types/entity-type/profile-bio/v/1": { + icon: "/icons/types/memo-circle-info.svg", + titlePlural: "Profile Bios", + }, + "https://hash.ai/@hash/types/entity-type/organization/v/2": { + icon: "/icons/types/people-group.svg", + titlePlural: "Organizations", + labelProperty: + "https://hash.ai/@hash/types/property-type/organization-name/", + }, + "https://hash.ai/@hash/types/entity-type/service-account/v/1": { + icon: "/icons/types/person-to-portal.svg", + titlePlural: "Service Accounts", + }, + "https://hash.ai/@hash/types/entity-type/linkedin-account/v/1": { + icon: "/icons/types/linkedin.svg", + titlePlural: "LinkedIn Accounts", + }, + "https://hash.ai/@hash/types/entity-type/twitter-account/v/1": { + icon: "/icons/types/x-twitter.svg", + titlePlural: "Twitter Accounts", + }, + "https://hash.ai/@hash/types/entity-type/tiktok-account/v/1": { + icon: "/icons/types/tiktok.svg", + titlePlural: "TikTok Accounts", + }, + "https://hash.ai/@hash/types/entity-type/facebook-account/v/1": { + icon: "/icons/types/facebook.svg", + titlePlural: "Facebook Accounts", + }, + "https://hash.ai/@hash/types/entity-type/instagram-account/v/1": { + icon: "/icons/types/instagram.svg", + titlePlural: "Instagram Accounts", + }, + "https://hash.ai/@hash/types/entity-type/github-account/v/1": { + icon: "/icons/types/github.svg", + titlePlural: "GitHub Accounts", + }, + "https://hash.ai/@hash/types/entity-type/user/v/6": { + icon: "/icons/types/user.svg", + titlePlural: "Users", + labelProperty: "https://hash.ai/@hash/types/property-type/shortname/", + }, + "https://hash.ai/@hash/types/entity-type/text/v/1": { + icon: "/icons/types/text.svg", + titlePlural: "Texts", + }, + "https://hash.ai/@hash/types/entity-type/page/v/1": { + icon: "/icons/types/page.svg", + titlePlural: "Pages", + labelProperty: "https://hash.ai/@hash/types/property-type/title/", + }, + "https://hash.ai/@hash/types/entity-type/canvas/v/1": { + icon: "/icons/types/canvas.svg", + titlePlural: "Canvases", + }, + "https://hash.ai/@hash/types/entity-type/quick-note/v/1": { + icon: "/icons/types/note-sticky.svg", + titlePlural: "Notes", + }, +}; + +type SystemLinkEntityTypeId = + (typeof systemLinkEntityTypes)[keyof typeof systemLinkEntityTypes]["linkEntityTypeId"]; + +const linkEntityTypeChanges: Record< + SystemLinkEntityTypeId, + { + icon?: `/icons/types/${string}.svg`; + labelProperty?: `${string}/`; + } & Required> +> = { + "https://hash.ai/@hash/types/entity-type/has-data/v/1": { + titlePlural: "Has Datas", + inverse: { + title: "Data For", + titlePlural: "Data Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-indexed-content/v/1": { + titlePlural: "Has Indexed Contents", + inverse: { + title: "Indexed Content For", + titlePlural: "Indexed Content Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-spatially-positioned-content/v/1": + { + titlePlural: "Has Spatially Positioned Contents", + inverse: { + title: "Spatially Positioned Content For", + titlePlural: "Spatially Positioned Content Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-avatar/v/1": { + titlePlural: "Has Avatars", + inverse: { + title: "Avatar For", + titlePlural: "Avatar Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-cover-image/v/1": { + titlePlural: "Has Cover Images", + inverse: { + title: "Cover Image For", + titlePlural: "Cover Image Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-bio/v/1": { + titlePlural: "Has Bios", + inverse: { + title: "Bio For", + titlePlural: "Bio Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/is-member-of/v/1": { + titlePlural: "Is Member Ofs", + inverse: { + title: "Has Member", + titlePlural: "Has Members", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-service-account/v/1": { + titlePlural: "Has Service Accounts", + inverse: { + title: "Service Account For", + titlePlural: "Service Account Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-parent/v/1": { + titlePlural: "Has Parents", + inverse: { + title: "Parent Of", + titlePlural: "Parent Ofs", + }, + }, +}; + +const typeRenames: Record = { + "https://hash.ai/@hash/types/entity-type/image/v/2": "Image File", + "https://hash.ai/@hash/types/entity-type/quick-note/v/1": "Note", +}; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts similarity index 100% rename from apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/006-create-first-custom-data-types.migration.ts rename to apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/000-create-first-custom-data-types.migration.ts diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts index 1ee3d0fff09..0af3d5c77bd 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts @@ -1,3 +1,4 @@ +import { systemDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { descriptionPropertyTypeUrl, fileUrlPropertyTypeUrl, @@ -449,7 +450,7 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Website URL", description: "A URL for a website", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [{ dataTypeId: systemDataTypes.uri.dataTypeId }], }, webShortname: "hash", migrationState, @@ -461,7 +462,7 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Pinned Entity Type Base URL", description: "The base URL of a pinned entity type.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [{ dataTypeId: systemDataTypes.uri.dataTypeId }], }, webShortname: "hash", migrationState, @@ -582,7 +583,7 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Profile URL", description: "A URL to a profile", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [{ dataTypeId: systemDataTypes.uri.dataTypeId }], }, webShortname: "hash", migrationState, @@ -700,7 +701,7 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Email", description: "An email address", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [{ dataTypeId: systemDataTypes.email.dataTypeId }], }, webShortname: "hash", migrationState, @@ -1160,7 +1161,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Expired At", description: "Stringified timestamp of when something expired.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "hash", migrationState, @@ -1322,7 +1325,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Resolved At", description: "Stringified timestamp of when something was resolved.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "hash", migrationState, @@ -1336,7 +1341,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Deleted At", description: "Stringified timestamp of when something was deleted.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "hash", migrationState, @@ -1424,7 +1431,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Read At", description: "The timestamp of when something was read.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "hash", migrationState, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts index 4b4d73c21e2..aba1bb10d84 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/003-create-linear-system-types.migration.ts @@ -51,7 +51,9 @@ const migrate: MigrationFunction = async ({ title: "Archived At", description: "The time at which the entity was archived. Null if the entity has not been archived.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -65,7 +67,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Created At", description: "The time at which the entity was created.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -89,7 +93,9 @@ const migrate: MigrationFunction = async ({ title: "Deletion Requested At", description: "The time at which deletion of the organization was requested.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -155,7 +161,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Logo URL", description: "The organization's logo URL.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -182,7 +190,9 @@ const migrate: MigrationFunction = async ({ title: "Period Upload Volume", description: "Rolling 30-day total upload volume for the organization, in megabytes.", - possibleValues: [{ primitiveDataType: "number" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/megabytes/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -263,7 +273,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Trial Ends At", description: "The time at which the trial of the plus plan will end.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -282,7 +294,9 @@ const migrate: MigrationFunction = async ({ "for which updates should not produce an update to updatedAt (see skipUpdatedAtKeys).", "This is the same as the creation time if the entity hasn't been updated after creation.", ].join(" "), - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -467,7 +481,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Avatar URL", description: "An URL to the user's avatar image.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -559,7 +575,9 @@ const migrate: MigrationFunction = async ({ title: "Last Seen", description: "The last time the user was seen online. If null, the user is currently online.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -629,7 +647,9 @@ const migrate: MigrationFunction = async ({ title: "Status Until At", description: "A date at which the user current status should be cleared.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -657,7 +677,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Profile URL", description: "User's profile URL.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -828,7 +850,9 @@ const migrate: MigrationFunction = async ({ title: "Auto Archived At", description: "The time at which the issue was automatically archived by the auto pruning process.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -843,7 +867,9 @@ const migrate: MigrationFunction = async ({ title: "Auto Closed At", description: "The time at which the issue was automatically closed by the auto pruning process.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -872,7 +898,9 @@ const migrate: MigrationFunction = async ({ title: "Canceled At", description: "The time at which the issue was moved into canceled state.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -887,7 +915,9 @@ const migrate: MigrationFunction = async ({ title: "Completed At", description: "The time at which the issue was moved into completed state.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -937,7 +967,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Due Date", description: "The date at which the issue is due.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/date/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1079,7 +1111,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Snoozed Until At", description: "The time until an issue will be snoozed in Triage view.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1109,7 +1143,9 @@ const migrate: MigrationFunction = async ({ title: "Started At", description: "The time at which the issue was moved into started state.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1123,7 +1159,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Started Triage At", description: "The time at which the issue entered triage.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1210,7 +1248,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Triaged At", description: "The time at which the issue left triage.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1224,7 +1264,9 @@ const migrate: MigrationFunction = async ({ propertyTypeDefinition: { title: "Issue URL", description: "The URL of the issue.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], }, webShortname: "linear", migrationState, @@ -1492,7 +1534,9 @@ const migrate: MigrationFunction = async ({ title: "Attachment URL", description: "Location of the attachment which is also used as an identifier.", - possibleValues: [{ primitiveDataType: "text" }], + possibleValues: [ + { dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1" }, + ], }, webShortname: "linear", migrationState, diff --git a/apps/hash-frontend/public/icons/docs/00-README.md b/apps/hash-frontend/public/icons/docs/00-README.md new file mode 100644 index 00000000000..788191cb4f0 --- /dev/null +++ b/apps/hash-frontend/public/icons/docs/00-README.md @@ -0,0 +1,5 @@ +# Why is this folder here? + +These icons are referenced from MDX files in `hashdotai/guide`. + +Don't change them or move them without updating the references in those files. diff --git a/apps/hash-frontend/public/icons/icon/README.md b/apps/hash-frontend/public/icons/icon/00-README.md similarity index 70% rename from apps/hash-frontend/public/icons/icon/README.md rename to apps/hash-frontend/public/icons/icon/00-README.md index 2cf4c794107..204fdab8333 100644 --- a/apps/hash-frontend/public/icons/icon/README.md +++ b/apps/hash-frontend/public/icons/icon/00-README.md @@ -1,3 +1,5 @@ # Why is this folder here? These files being present in a public folder are a [dependency of TLDraw](https://docs.tldraw.dev/docs/ucg/usage#assets) as of May 2023. + +Don't change them or move them unless TLDraw no longer needs them. diff --git a/apps/hash-frontend/public/icons/integrations/00-README.md b/apps/hash-frontend/public/icons/integrations/00-README.md new file mode 100644 index 00000000000..396cbf69d85 --- /dev/null +++ b/apps/hash-frontend/public/icons/integrations/00-README.md @@ -0,0 +1,5 @@ +# Why is this folder here? + +These icons are referenced from MDX files in `hashdotai/integrations`. + +Don't change them or move them without updating the references in those files. From d24060239636ba1a8c70478973ff713907940917 Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Thu, 19 Dec 2024 13:16:08 +0000 Subject: [PATCH 2/7] add more type icons, titles --- .../shared/create-file-entity-from-url.ts | 2 +- .../labels-icons-data-types.ts | 142 +++++++++++++++- .../001-create-hash-system-types.migration.ts | 156 +++++++++++++++++- ...-create-machines-update-users.migration.ts | 3 + ...007-create-api-usage-tracking.migration.ts | 17 ++ ...-plugin-settings-update-users.migration.ts | 2 + .../src/graph/knowledge/system-types/file.ts | 53 +++--- 7 files changed, 341 insertions(+), 34 deletions(-) diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts index d7cdb172454..bc954f91575 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/shared/create-file-entity-from-url.ts @@ -197,7 +197,7 @@ export const createFileEntityFromUrl = async (params: { "https://blockprotocol.org/@blockprotocol/types/property-type/file-name/": filename, "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": - displayName ?? undefined, + displayName ?? filename, "https://blockprotocol.org/@blockprotocol/types/property-type/file-url/": originalUrl, "https://blockprotocol.org/@blockprotocol/types/property-type/mime-type/": diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts index 8d7e6394e56..3acc81458ca 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts @@ -2,14 +2,14 @@ * @file this is a temporary file to store changes to types that will need amending directly in the production database * it will be turned into a migration script and then deleted. */ -import { +import type { EntityType } from "@blockprotocol/type-system"; +import type { linearPropertyTypes, systemDataTypes, systemEntityTypes, systemLinkEntityTypes, systemPropertyTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import { EntityType } from "@blockprotocol/type-system-rs/pkg/type-system"; type SystemPropertyTypeId = (typeof systemPropertyTypes)[keyof typeof systemPropertyTypes]["propertyTypeId"]; @@ -132,7 +132,7 @@ const entityTypeChanges: Record< "https://hash.ai/@hash/types/entity-type/file/v/2": { icon: "/icons/types/file.svg", labelProperty: - "https://blockprotocol.org/@blockprotocol/types/property-type/file-name/", + "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/", titlePlural: "Files", }, "https://hash.ai/@hash/types/entity-type/image/v/2": { @@ -207,6 +207,43 @@ const entityTypeChanges: Record< icon: "/icons/types/note-sticky.svg", titlePlural: "Notes", }, + "https://hash.ai/@hash/types/entity-type/user-secret/v/1": { + titlePlural: "User Secrets", + icon: "/icons/types/user-lock.svg", + }, + "https://hash.ai/@hash/types/entity-type/comment/v/6": { + icon: "/icons/types/comment.svg", + titlePlural: "Comments", + }, + "https://hash.ai/@hash/types/entity-type/notification/v/1": { + icon: "/icons/types/megaphone.svg", + titlePlural: "Notifications", + }, + "https://hash.ai/@hash/types/entity-type/mention-notification/v/6": { + titlePlural: "Mention Notifications", + }, + "https://hash.ai/@hash/types/entity-type/comment-notification/v/6": { + titlePlural: "Comment Notifications", + }, + "https://hash.ai/@hash/types/entity-type/graph-change-notification/v/1": { + titlePlural: "Graph Change Notifications", + }, + "https://hash.ai/@hash/types/entity-type/machine/v/2": { + icon: "/icons/types/user-robot.svg", + titlePlural: "Machines", + }, + "https://hash.ai/@hash/types/entity-type/service-feature/v/1": { + icon: "/icons/types/plug-circle-check.svg", + titlePlural: "Service Features", + }, + "https://hash.ai/@hash/types/entity-type/usage-record/v/2": { + icon: "/icons/types/gauge-max.svg", + titlePlural: "Usage Records", + }, + "https://hash.ai/@hash/types/entity-type/browser-plugin-settings/v/1": { + icon: "/icons/types/gear.svg", + titlePlural: "Browser Plugin Settings", + }, }; type SystemLinkEntityTypeId = @@ -283,6 +320,105 @@ const linkEntityTypeChanges: Record< titlePlural: "Parent Ofs", }, }, + "https://hash.ai/@hash/types/entity-type/uses-user-secret/v/1": { + titlePlural: "Uses User Secrets", + inverse: { + title: "Used By", + titlePlural: "Used Bys", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-text/v/1": { + titlePlural: "Has Texts", + inverse: { + title: "Text For", + titlePlural: "Text Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/authored-by/v/1": { + titlePlural: "Authored By", + icon: "/icons/types/pencil.svg", + inverse: { + title: "Author Of", + titlePlural: "Author Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/occurred-in-entity/v/2": { + titlePlural: "Occurred In Entitys", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/occurred-in-block/v/1": { + titlePlural: "Occurred In Blocks", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/occurred-in-comment/v/1": { + titlePlural: "Occurred In Comments", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/occurred-in-text/v/1": { + titlePlural: "Occurred In Texts", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/triggered-by-user/v/1": { + titlePlural: "Triggered By Users", + inverse: { + title: "Triggered", + titlePlural: "Triggereds", + }, + }, + "https://hash.ai/@hash/types/entity-type/triggered-by-comment/v/1": { + titlePlural: "Triggered By Comments", + inverse: { + title: "Triggered", + titlePlural: "Triggereds", + }, + }, + "https://hash.ai/@hash/types/entity-type/replied-to-comment/v/1": { + titlePlural: "Replied To Comments", + inverse: { + title: "Replied To By", + titlePlural: "Replied To Bys", + }, + }, + "https://hash.ai/@hash/types/entity-type/records-usage-of/v/1": { + titlePlural: "Records Usage Ofs", + inverse: { + title: "Usage Recorded By", + titlePlural: "Usage Recorded Bys", + }, + }, + "https://hash.ai/@hash/types/entity-type/created/v/1": { + titlePlural: "Createds", + inverse: { + title: "Created By", + titlePlural: "Created Bys", + }, + }, + "https://hash.ai/@hash/types/entity-type/updated/v/1": { + titlePlural: "Updateds", + inverse: { + title: "Updated By", + titlePlural: "Updated Bys", + }, + }, + "https://hash.ai/@hash/types/entity-type/has/v/1": { + titlePlural: "Hases", + inverse: { + title: "Belongs To", + titlePlural: "Belongs Tos", + }, + }, }; const typeRenames: Record = { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts index 0af3d5c77bd..5b0bfdd3ad3 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts @@ -1,6 +1,11 @@ -import { systemDataTypes } from "@local/hash-isomorphic-utils/ontology-type-ids"; +import { + blockProtocolPropertyTypes, + systemDataTypes, + systemPropertyTypes, +} from "@local/hash-isomorphic-utils/ontology-type-ids"; import { descriptionPropertyTypeUrl, + fileNamePropertyTypeUrl, fileUrlPropertyTypeUrl, linkEntityTypeUrl, mimeTypePropertyTypeUrl, @@ -183,7 +188,11 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "File", + titlePlural: "Files", description: "A file hosted at a URL", + icon: "/icons/types/file.svg", + labelProperty: + blockProtocolPropertyTypes.displayName.propertyTypeBaseUrl, properties: [ { propertyType: fileUrlPropertyTypeUrl, @@ -257,7 +266,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { allOf: [fileEntityType.schema.$id], - title: "Image", + title: "Image File", + titlePlural: "Image Files", + icon: "/icons/types/file-image.svg", description: "An image file hosted at a URL", }, webShortname: "hash", @@ -289,6 +300,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Data", + titlePlural: "Has Datas", + inverse: { + title: "Data For", + titlePlural: "Data Fors", + }, description: "The data that something has.", }, webShortname: "hash", @@ -303,6 +319,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Block", + titlePlural: "Blocks", + icon: "/icons/types/cube.svg", description: "A block that displays or otherwise uses data, part of a wider page or collection.", properties: [ @@ -333,6 +351,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Block Collection", + titlePlural: "Block Collections", + icon: "/icons/types/cubes.svg", description: "A collection of blocks.", }, webShortname: "hash", @@ -363,6 +383,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Indexed Content", + titlePlural: "Has Indexed Contents", + inverse: { + title: "Indexed Content For", + titlePlural: "Indexed Content Fors", + }, description: "Something contained at an index by something", properties: [ { @@ -383,6 +408,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [blockCollectionEntityType.schema.$id], title: "Profile Bio", + titlePlural: "Profile Bios", + icon: "/icons/types/memo-circle-info.svg", description: "A biography for display on someone or something's profile.", outgoingLinks: [ @@ -475,6 +502,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Avatar", + titlePlural: "Has Avatars", + inverse: { + title: "Avatar For", + titlePlural: "Avatar Fors", + }, description: "The avatar something has.", }, webShortname: "hash", @@ -490,6 +522,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Cover Image", + titlePlural: "Has Cover Images", + inverse: { + title: "Cover Image For", + titlePlural: "Cover Image Fors", + }, description: "The cover image something has.", }, webShortname: "hash", @@ -505,6 +542,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Bio", + titlePlural: "Has Bios", + inverse: { + title: "Bio For", + titlePlural: "Bio Fors", + }, description: "The biography something has.", }, webShortname: "hash", @@ -519,6 +561,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Organization", + titlePlural: "Organizations", + icon: "/icons/types/people-group.svg", + labelProperty: systemPropertyTypes.shortname.propertyTypeBaseUrl, description: "An organization. Organizations are root-level objects that contain user accounts and teams.", properties: [ @@ -596,6 +641,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Service Account", + titlePlural: "Service Accounts", + icon: "/icons/types/person-to-portal.svg", description: "A service account.", properties: [ { @@ -620,6 +667,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "LinkedIn Account", + titlePlural: "LinkedIn Accounts", + icon: "/icons/types/linkedin.svg", description: "A LinkedIn account.", }, webShortname: "hash", @@ -633,6 +682,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "Twitter Account", + titlePlural: "Twitter Accounts", + icon: "/icons/types/x-twitter.svg", description: "A Twitter account.", }, webShortname: "hash", @@ -646,6 +697,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "TikTok Account", + titlePlural: "TikTok Accounts", + icon: "/icons/types/tiktok.svg", description: "A TikTok account.", }, webShortname: "hash", @@ -659,6 +712,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "Facebook Account", + titlePlural: "Facebook Accounts", + icon: "/icons/types/facebook.svg", description: "A Facebook account.", }, webShortname: "hash", @@ -672,6 +727,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "Instagram Account", + titlePlural: "Instagram Accounts", + icon: "/icons/types/instagram.svg", description: "An Instagram account.", }, webShortname: "hash", @@ -685,6 +742,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [serviceAccountEntityType.schema.$id], title: "GitHub Account", + titlePlural: "GitHub Accounts", + icon: "/icons/types/github.svg", description: "A GitHub account.", }, webShortname: "hash", @@ -751,6 +810,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Is Member Of", + titlePlural: "Is Member Ofs", + inverse: { + title: "Has Member", + titlePlural: "Has Members", + }, description: "Something that someone or something is a member of.", }, webShortname: "hash", @@ -764,6 +828,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Service Account", + titlePlural: "Has Service Accounts", + inverse: { + title: "Service Account For", + titlePlural: "Service Account Fors", + }, description: "The service account something has.", }, webShortname: "hash", @@ -777,7 +846,10 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "User", + titlePlural: "Users", + icon: "/icons/types/user.svg", description: "A user of the HASH application.", + labelProperty: systemPropertyTypes.shortname.propertyTypeBaseUrl, properties: [ { propertyType: shortnamePropertyType, @@ -845,6 +917,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Text", + titlePlural: "Texts", + icon: "/icons/types/text.svg", description: "An ordered sequence of characters.", properties: [ { @@ -925,6 +999,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Parent", + titlePlural: "Has Parents", + inverse: { + title: "Parent Of", + titlePlural: "Parent Ofs", + }, description: "The parent something has.", }, webShortname: "hash", @@ -940,6 +1019,9 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [blockCollectionEntityType.schema.$id], title: "Page", + titlePlural: "Pages", + icon: "/icons/types/page.svg", + labelProperty: systemPropertyTypes.title.propertyTypeBaseUrl, description: "A page for displaying and potentially interacting with data.", properties: [ @@ -983,6 +1065,7 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Document", + titlePlural: "Documents", description: "A page in document format, with content arranged in columns.", allOf: [pageEntityType.schema.$id], @@ -1077,6 +1160,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Spatially Positioned Content", + titlePlural: "Has Spatially Positioned Contents", + inverse: { + title: "Spatially Positioned Content For", + titlePlural: "Spatially Positioned Content Fors", + }, description: "Something contained at a spatial position by something", properties: [ { @@ -1112,6 +1200,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Canvas", + titlePlural: "Canvases", + icon: "/icons/types/rectangle.svg", description: "A page in canvas format, with content in a free-form arrangement.", allOf: [pageEntityType.schema.$id], @@ -1137,7 +1227,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { allOf: [blockCollectionEntityType.schema.$id], - title: "Quick Note", + title: "Note", + titlePlural: "Notes", + icon: "/icons/types/note-sticky.svg", description: "A (usually) quick or short note.", properties: [{ propertyType: archivedPropertyType }], outgoingLinks: [ @@ -1234,6 +1326,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Uses User Secret", + titlePlural: "Uses User Secrets", + inverse: { + title: "Used By", + titlePlural: "Used Bys", + }, description: "The user secret something uses.", }, webShortname: "hash", @@ -1357,6 +1454,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Text", + titlePlural: "Has Texts", + inverse: { + title: "Text For", + titlePlural: "Text Fors", + }, description: "The text something has.", }, webShortname: "hash", @@ -1372,6 +1474,12 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Authored By", + titlePlural: "Authored By", + icon: "/icons/types/pencil.svg", + inverse: { + title: "Author Of", + titlePlural: "Author Ofs", + }, description: "What or whom something was authored by.", }, webShortname: "hash", @@ -1386,6 +1494,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Comment", + titlePlural: "Comments", + icon: "/icons/types/comment.svg", description: "Comment associated with the issue.", properties: [ { @@ -1446,6 +1556,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Notification", + titlePlural: "Notifications", + icon: "/icons/types/megaphone.svg", description: "A notification to a user.", properties: [ { @@ -1469,6 +1581,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Occurred In Entity", + titlePlural: "Occurred In Entitys", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, description: "An entity that something occurred in.", }, webShortname: "hash", @@ -1483,6 +1600,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Occurred In Block", + titlePlural: "Occurred In Blocks", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, description: "A block that something occurred in.", }, webShortname: "hash", @@ -1496,6 +1618,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Occurred In Comment", + titlePlural: "Occurred In Comments", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, description: "A comment that something occurred in.", }, webShortname: "hash", @@ -1510,6 +1637,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Occurred In Text", + titlePlural: "Occurred In Texts", + inverse: { + title: "Location Of", + titlePlural: "Location Ofs", + }, description: "Text that something occurred in.", }, webShortname: "hash", @@ -1525,6 +1657,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Triggered By User", + titlePlural: "Triggered By Users", + inverse: { + title: "Triggered", + titlePlural: "Triggereds", + }, description: "A user that triggered something.", }, webShortname: "hash", @@ -1538,8 +1675,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [notificationEntityType.schema.$id], title: "Mention Notification", + titlePlural: "Mention Notifications", description: "A notification that a user was mentioned somewhere.", - outgoingLinks: [ { linkEntityType: occurredInEntityLinkEntityType, @@ -1585,6 +1722,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Triggered By Comment", + titlePlural: "Triggered By Comment", + inverse: { + title: "Triggered", + titlePlural: "Triggereds", + }, description: "A comment that triggered something.", }, webShortname: "hash", @@ -1597,6 +1739,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Replied To Comment", + titlePlural: "Replied To Comments", + inverse: { + title: "Replied To By", + titlePlural: "Replied To Bys", + }, description: "The comment that something replied to.", }, webShortname: "hash", @@ -1608,6 +1755,7 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Comment Notification", + titlePlural: "Comment Notifications", description: "A notification related to a comment.", allOf: [notificationEntityType.schema.$id], outgoingLinks: [ diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts index 2992d1c4f3e..4bb07b8c8e5 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts @@ -55,6 +55,8 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Machine", + titlePlural: "Machines", + icon: "/icons/types/user-robot.svg", description: "A machine that can perform actions in the system", properties: [ { @@ -173,6 +175,7 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Graph Change Notification", + titlePlural: "Graph Change Notifications", description: "A notification of a change to a graph", allOf: [notificationEntityType], properties: [ diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts index 8fceab0c3d4..872f89cffcf 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts @@ -182,6 +182,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Records Usage Of", + titlePlural: "Records Usage Ofs", + inverse: { + title: "Usage Recorded By", + titlePlural: "Usage Recorded Bys", + }, description: "The thing that something records usage of.", }, webShortname: "hash", @@ -197,6 +202,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Created", + titlePlural: "Createds", + inverse: { + title: "Created By", + titlePlural: "Created Bys", + }, description: "The thing that something created.", }, webShortname: "hash", @@ -212,6 +222,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Updated", + titlePlural: "Updateds", + inverse: { + title: "Updated By", + titlePlural: "Updated Bys", + }, description: "The thing that something created.", }, webShortname: "hash", @@ -251,6 +266,8 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Usage Record", + titlePlural: "Usage Records", + icon: "/icons/types/gauge-max.svg", description: "A record of usage of a service", properties: [ { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts index b1d0b7a6e76..36646b6efe6 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/008-create-plugin-settings-update-users.migration.ts @@ -78,6 +78,8 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Browser Plugin Settings", + titlePlural: "Browser Plugin Settings", + icon: "/icons/types/gear.svg", description: "Settings for the HASH browser plugin", properties: [ { diff --git a/apps/hash-api/src/graph/knowledge/system-types/file.ts b/apps/hash-api/src/graph/knowledge/system-types/file.ts index c86d80d1a3a..8683462ba7f 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/file.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/file.ts @@ -139,13 +139,20 @@ export const createFileFromUploadRequest: ImpureGraphFunction< true > = async (ctx, authentication, params) => { const { uploadProvider } = ctx; - const { description, displayName, name: unnormalizedFilename, size } = params; + const { + description, + displayName: providedDisplayName, + name: unnormalizedFilename, + size, + } = params; const name = normalizeWhitespace(unnormalizedFilename); const { entityTypeIds, existingEntity, mimeType, ownedById } = await generateCommonParameters(ctx, authentication, params, name); + const displayName = providedDisplayName ?? name; + const initialProperties: File["propertiesWithMetadata"] = { value: { ...(description !== undefined && description !== null @@ -176,18 +183,14 @@ export const createFileFromUploadRequest: ImpureGraphFunction< "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", }, }, - ...(displayName !== undefined && displayName !== null - ? { - "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": - { - value: displayName, - metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", - }, - }, - } - : {}), + "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": + { + value: displayName, + metadata: { + dataTypeId: + "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + }, + }, "https://blockprotocol.org/@blockprotocol/types/property-type/mime-type/": { value: mimeType, @@ -294,13 +297,15 @@ export const createFileFromExternalUrl: ImpureGraphFunction< false, true > = async (ctx, authentication, params) => { - const { description, displayName, url } = params; + const { description, displayName: providedDisplayName, url } = params; const filename = normalizeWhitespace(url.split("/").pop()!); const { entityTypeIds, existingEntity, mimeType, ownedById } = await generateCommonParameters(ctx, authentication, params, filename); + const displayName = providedDisplayName ?? filename; + try { const properties: File["propertiesWithMetadata"] = { value: { @@ -324,18 +329,14 @@ export const createFileFromExternalUrl: ImpureGraphFunction< "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", }, }, - ...(displayName !== undefined && displayName !== null - ? { - "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": - { - value: displayName, - metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", - }, - }, - } - : {}), + "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": + { + value: displayName, + metadata: { + dataTypeId: + "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + }, + }, "https://blockprotocol.org/@blockprotocol/types/property-type/file-url/": { value: url, From 4758ee18ea647cdf3e006ea164e84b446ee87e79 Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Thu, 19 Dec 2024 16:49:37 +0000 Subject: [PATCH 3/7] finish adding icons, plurals --- .../labels-icons-data-types.ts | 92 ++++++++++++++++++- .../001-create-hash-system-types.migration.ts | 8 +- ...-create-machines-update-users.migration.ts | 1 + ...007-create-api-usage-tracking.migration.ts | 3 + .../010-create-office-file-types.migration.ts | 10 ++ ...te-google-sheets-system-types.migration.ts | 10 ++ .../015-add-flow-types.dev.migration.ts | 25 +++++ ...use-case-form-and-example-org.migration.ts | 2 + ...-doc-company-and-person-types.migration.ts | 44 ++++----- .../provenance-defaults.ts | 4 + .../hash-frontend/public/icons/types/book.svg | 1 + .../public/icons/types/building-columns.svg | 1 + .../public/icons/types/comment.svg | 1 + .../hash-frontend/public/icons/types/cube.svg | 1 + .../public/icons/types/cubes.svg | 1 + .../public/icons/types/facebook.svg | 1 + .../public/icons/types/file-excel.svg | 1 + .../public/icons/types/file-lines.svg | 1 + .../public/icons/types/file-pdf.svg | 1 + .../public/icons/types/file-powerpoint.svg | 1 + .../public/icons/types/file-spreadsheet.svg | 1 + .../public/icons/types/file-word.svg | 1 + .../hash-frontend/public/icons/types/file.svg | 1 + .../public/icons/types/gauge-max.svg | 1 + .../hash-frontend/public/icons/types/gear.svg | 1 + .../public/icons/types/github.svg | 1 + .../public/icons/types/google.svg | 1 + .../public/icons/types/instagram.svg | 1 + .../public/icons/types/linkedin.svg | 1 + .../public/icons/types/megaphone.svg | 1 + .../public/icons/types/memo-circle-info.svg | 1 + .../hash-frontend/public/icons/types/memo.svg | 1 + .../public/icons/types/note-sticky.svg | 1 + .../hash-frontend/public/icons/types/page.svg | 1 + apps/hash-frontend/public/icons/types/pen.svg | 1 + .../public/icons/types/people-group.svg | 1 + .../public/icons/types/person-to-portal.svg | 1 + .../public/icons/types/plug-circle-check.svg | 1 + .../icons/types/presentation-screen.svg | 1 + .../public/icons/types/rectangle.svg | 1 + .../hash-frontend/public/icons/types/text.svg | 1 + .../public/icons/types/tiktok.svg | 1 + .../public/icons/types/user-lock.svg | 1 + .../public/icons/types/user-plus.svg | 1 + .../public/icons/types/user-robot.svg | 1 + .../hash-frontend/public/icons/types/user.svg | 1 + .../public/icons/types/x-twitter.svg | 1 + 47 files changed, 204 insertions(+), 32 deletions(-) create mode 100644 apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts create mode 100644 apps/hash-frontend/public/icons/types/book.svg create mode 100644 apps/hash-frontend/public/icons/types/building-columns.svg create mode 100644 apps/hash-frontend/public/icons/types/comment.svg create mode 100644 apps/hash-frontend/public/icons/types/cube.svg create mode 100644 apps/hash-frontend/public/icons/types/cubes.svg create mode 100644 apps/hash-frontend/public/icons/types/facebook.svg create mode 100644 apps/hash-frontend/public/icons/types/file-excel.svg create mode 100644 apps/hash-frontend/public/icons/types/file-lines.svg create mode 100644 apps/hash-frontend/public/icons/types/file-pdf.svg create mode 100644 apps/hash-frontend/public/icons/types/file-powerpoint.svg create mode 100644 apps/hash-frontend/public/icons/types/file-spreadsheet.svg create mode 100644 apps/hash-frontend/public/icons/types/file-word.svg create mode 100644 apps/hash-frontend/public/icons/types/file.svg create mode 100644 apps/hash-frontend/public/icons/types/gauge-max.svg create mode 100644 apps/hash-frontend/public/icons/types/gear.svg create mode 100644 apps/hash-frontend/public/icons/types/github.svg create mode 100644 apps/hash-frontend/public/icons/types/google.svg create mode 100644 apps/hash-frontend/public/icons/types/instagram.svg create mode 100644 apps/hash-frontend/public/icons/types/linkedin.svg create mode 100644 apps/hash-frontend/public/icons/types/megaphone.svg create mode 100644 apps/hash-frontend/public/icons/types/memo-circle-info.svg create mode 100644 apps/hash-frontend/public/icons/types/memo.svg create mode 100644 apps/hash-frontend/public/icons/types/note-sticky.svg create mode 100644 apps/hash-frontend/public/icons/types/page.svg create mode 100644 apps/hash-frontend/public/icons/types/pen.svg create mode 100644 apps/hash-frontend/public/icons/types/people-group.svg create mode 100644 apps/hash-frontend/public/icons/types/person-to-portal.svg create mode 100644 apps/hash-frontend/public/icons/types/plug-circle-check.svg create mode 100644 apps/hash-frontend/public/icons/types/presentation-screen.svg create mode 100644 apps/hash-frontend/public/icons/types/rectangle.svg create mode 100644 apps/hash-frontend/public/icons/types/text.svg create mode 100644 apps/hash-frontend/public/icons/types/tiktok.svg create mode 100644 apps/hash-frontend/public/icons/types/user-lock.svg create mode 100644 apps/hash-frontend/public/icons/types/user-plus.svg create mode 100644 apps/hash-frontend/public/icons/types/user-robot.svg create mode 100644 apps/hash-frontend/public/icons/types/user.svg create mode 100644 apps/hash-frontend/public/icons/types/x-twitter.svg diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts index 3acc81458ca..81ad3414016 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts @@ -4,6 +4,7 @@ */ import type { EntityType } from "@blockprotocol/type-system"; import type { + googleEntityTypes, linearPropertyTypes, systemDataTypes, systemEntityTypes, @@ -145,7 +146,7 @@ const entityTypeChanges: Record< }, "https://hash.ai/@hash/types/entity-type/block-collection/v/1": { icon: "/icons/types/cubes.svg", - titlePlural: "Blocks", + titlePlural: "Block Collections", }, "https://hash.ai/@hash/types/entity-type/profile-bio/v/1": { icon: "/icons/types/memo-circle-info.svg", @@ -188,7 +189,7 @@ const entityTypeChanges: Record< "https://hash.ai/@hash/types/entity-type/user/v/6": { icon: "/icons/types/user.svg", titlePlural: "Users", - labelProperty: "https://hash.ai/@hash/types/property-type/shortname/", + labelProperty: "https://hash.ai/@hash/types/property-type/preferred-name/", }, "https://hash.ai/@hash/types/entity-type/text/v/1": { icon: "/icons/types/text.svg", @@ -200,7 +201,7 @@ const entityTypeChanges: Record< labelProperty: "https://hash.ai/@hash/types/property-type/title/", }, "https://hash.ai/@hash/types/entity-type/canvas/v/1": { - icon: "/icons/types/canvas.svg", + icon: "/icons/types/rectangle.svg", titlePlural: "Canvases", }, "https://hash.ai/@hash/types/entity-type/quick-note/v/1": { @@ -231,10 +232,13 @@ const entityTypeChanges: Record< "https://hash.ai/@hash/types/entity-type/machine/v/2": { icon: "/icons/types/user-robot.svg", titlePlural: "Machines", + labelProperty: + "https://blockprotocol.org/types/property-type/display-name/", }, "https://hash.ai/@hash/types/entity-type/service-feature/v/1": { icon: "/icons/types/plug-circle-check.svg", titlePlural: "Service Features", + labelProperty: "https://hash.ai/@hash/types/property-type/feature-name/", }, "https://hash.ai/@hash/types/entity-type/usage-record/v/2": { icon: "/icons/types/gauge-max.svg", @@ -244,6 +248,72 @@ const entityTypeChanges: Record< icon: "/icons/types/gear.svg", titlePlural: "Browser Plugin Settings", }, + "https://hash.ai/@hash/types/entity-type/document-file/v/1": { + icon: "/icons/types/file-lines.svg", + titlePlural: "Document Files", + }, + "https://hash.ai/@hash/types/entity-type/pdf-document/v/1": { + icon: "/icons/types/file-pdf.svg", + titlePlural: "PDF Documents", + }, + "https://hash.ai/@hash/types/entity-type/docx-document/v/1": { + icon: "/icons/types/file-word.svg", + titlePlural: "DOCX Documents", + }, + "https://hash.ai/@hash/types/entity-type/presentation-file/v/1": { + icon: "/icons/types/presentation-screen.svg", + titlePlural: "Presentation Files", + }, + "https://hash.ai/@hash/types/entity-type/pptx-presentation/v/1": { + icon: "/icons/types/file-powerpoint.svg", + titlePlural: "PPTX Presentations", + }, + "https://hash.ai/@hash/types/entity-type/spreadsheet-file/v/1": { + icon: "/icons/types/file-spreadsheet.svg", + titlePlural: "Spreadsheet Files", + }, + "https://hash.ai/@hash/types/entity-type/prospective-user/v/1": { + icon: "/icons/types/user-plus.svg", + titlePlural: "Prospective Users", + labelProperty: "https://hash.ai/@hash/types/property-type/email/", + }, + "https://hash.ai/@hash/types/entity-type/institution/v/1": { + icon: "/icons/types/building-columns.svg", + titlePlural: "Institutions", + labelProperty: + "https://blockprotocol.org/@blockprotocol/types/property-type/name/", + }, + "https://hash.ai/@hash/types/entity-type/doc/v/1": { + icon: "/icons/types/page-lines.svg", + titlePlural: "Docs", + labelProperty: "https://hash.ai/@hash/types/property-type/title/", + }, + "https://hash.ai/@hash/types/entity-type/book/v/1": { + icon: "/icons/types/book.svg", + titlePlural: "Books", + }, + "https://hash.ai/@hash/types/entity-type/academic-paper/v/1": { + icon: "/icons/types/memo.svg", + titlePlural: "Academic Papers", + }, +}; + +type GoogleEntityTypeId = + (typeof googleEntityTypes)[keyof typeof googleEntityTypes]["entityTypeId"]; + +const googleEntityTypeChanges: Record< + GoogleEntityTypeId, + { + icon?: `/icons/types/${string}.svg`; + } & Required> +> = { + "https://hash.ai/@google/types/entity-type/account/v/1": { + icon: "/icons/types/google.svg", + titlePlural: "Accounts", + }, + "https://hash.ai/@google/types/entity-type/google-sheets-file/v/1": { + titlePlural: "Google Sheets Files", + }, }; type SystemLinkEntityTypeId = @@ -336,7 +406,7 @@ const linkEntityTypeChanges: Record< }, "https://hash.ai/@hash/types/entity-type/authored-by/v/1": { titlePlural: "Authored By", - icon: "/icons/types/pencil.svg", + icon: "/icons/types/pen.svg", inverse: { title: "Author Of", titlePlural: "Author Ofs", @@ -419,6 +489,20 @@ const linkEntityTypeChanges: Record< titlePlural: "Belongs Tos", }, }, + "https://hash.ai/@hash/types/entity-type/associated-with-account/v/1": { + titlePlural: "Associated With Accounts", + inverse: { + title: "Account For", + titlePlural: "Account Fors", + }, + }, + "https://hash.ai/@hash/types/entity-type/affiliated-with/v/1": { + titlePlural: "Affiliated Withs", + inverse: { + title: "Affiliate With", + titlePlural: "Affiliate Withs", + }, + }, }; const typeRenames: Record = { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts index 5b0bfdd3ad3..08d31e97257 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/001-create-hash-system-types.migration.ts @@ -563,7 +563,7 @@ const migrate: MigrationFunction = async ({ title: "Organization", titlePlural: "Organizations", icon: "/icons/types/people-group.svg", - labelProperty: systemPropertyTypes.shortname.propertyTypeBaseUrl, + labelProperty: systemPropertyTypes.organizationName.propertyTypeBaseUrl, description: "An organization. Organizations are root-level objects that contain user accounts and teams.", properties: [ @@ -849,7 +849,7 @@ const migrate: MigrationFunction = async ({ titlePlural: "Users", icon: "/icons/types/user.svg", description: "A user of the HASH application.", - labelProperty: systemPropertyTypes.shortname.propertyTypeBaseUrl, + labelProperty: systemPropertyTypes.preferredName.propertyTypeBaseUrl, properties: [ { propertyType: shortnamePropertyType, @@ -1345,6 +1345,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "User Secret", + titlePlural: "User Secrets", + icon: "/icons/types/user-lock.svg", description: "A secret or credential belonging to a user.", properties: [ { @@ -1475,7 +1477,7 @@ const migrate: MigrationFunction = async ({ allOf: [linkEntityTypeUrl], title: "Authored By", titlePlural: "Authored By", - icon: "/icons/types/pencil.svg", + icon: "/icons/types/pen.svg", inverse: { title: "Author Of", titlePlural: "Author Ofs", diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts index 4bb07b8c8e5..0eba98fe14f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/004-create-machines-update-users.migration.ts @@ -57,6 +57,7 @@ const migrate: MigrationFunction = async ({ title: "Machine", titlePlural: "Machines", icon: "/icons/types/user-robot.svg", + labelProperty: blockProtocolPropertyTypes.displayName.propertyTypeBaseUrl, description: "A machine that can perform actions in the system", properties: [ { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts index 872f89cffcf..74d08e95e8c 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/007-create-api-usage-tracking.migration.ts @@ -151,6 +151,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Service Feature", + titlePlural: "Service Features", + icon: "/icons/types/plug-circle-check.svg", + labelProperty: serviceNamePropertyType.metadata.recordId.baseUrl, description: "A feature of a service", properties: [ { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts index eb6ec442c92..c4a8eceae4c 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/010-create-office-file-types.migration.ts @@ -26,6 +26,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [currentFileEntityTypeId], title: "Document File", + titlePlural: "Document Files", + icon: "/icons/types/file-lines.svg", description: "A document file.", properties: [ { @@ -48,6 +50,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [documentFileEntityType.schema.$id], title: "PDF Document", + titlePlural: "PDF Documents", + icon: "/icons/types/file-pdf.svg", description: "A PDF document.", }, webShortname: "hash", @@ -63,6 +67,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [documentFileEntityType.schema.$id], title: "DOCX Document", + titlePlural: "DOCX Documents", + icon: "/icons/types/file-word.svg", description: "A Microsoft Word document.", }, webShortname: "hash", @@ -82,6 +88,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [currentFileEntityTypeId], title: "Presentation File", + titlePlural: "Presentation Files", + icon: "/icons/types/presentation-screen.svg", description: "A presentation file.", properties: [ { @@ -104,6 +112,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [slideshowFileEntityType.schema.$id], title: "PPTX Presentation", + titlePlural: "PPTX Presentations", + icon: "/icons/types/file-powerpoint.svg", description: "A Microsoft PowerPoint presentation.", }, webShortname: "hash", diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts index 05dfc728286..2b49585bdc4 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/012-create-google-sheets-system-types.migration.ts @@ -62,6 +62,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Account", + titlePlural: "Accounts", + icon: "/icons/types/google.svg", description: "A Google user account.", properties: [ { @@ -100,6 +102,11 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Associated With Account", + titlePlural: "Associated With Accounts", + inverse: { + title: "Account For", + titlePlural: "Account Fors", + }, description: "The account that something is associated with.", properties: [], }, @@ -166,6 +173,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [currentFileEntityTypeId], title: "Spreadsheet File", + titlePlural: "Spreadsheet Files", + icon: "/icons/types/file-spreadsheet.svg", description: "A spreadsheet file.", }, webShortname: "hash", @@ -181,6 +190,7 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [spreadsheetFileEntityType.schema.$id], title: "Google Sheets File", + titlePlural: "Google Sheets Files", description: "A Google Sheets file.", properties: [ { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts index 12a61edfc2c..790f71cd90f 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/015-add-flow-types.dev.migration.ts @@ -102,6 +102,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Flow Definition", + titlePlural: "Flow Definitions", + /** @todo icon */ + description: "The definition of a HASH flow.", labelProperty: blockProtocolPropertyTypes.name.propertyTypeBaseUrl, properties: [ @@ -224,6 +227,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Flow Run", + titlePlural: "Flow Runs", + /** @todo icon */ description: "An execution run of a flow.", labelProperty: blockProtocolPropertyTypes.name.propertyTypeBaseUrl, properties: [ @@ -295,6 +300,12 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Subject", + titlePlural: "Has Subjects", + /** @todo icon */ + inverse: { + title: "Subject Of", + titlePlural: "Subject Ofs", + }, description: "The subject something has", properties: [], }, @@ -311,6 +322,12 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Has Object", + titlePlural: "Has Objects", + /** @todo icon */ + inverse: { + title: "Object Of", + titlePlural: "Object Ofs", + }, description: "The object something has", properties: [], }, @@ -326,6 +343,8 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Claim", + titlePlural: "Claims", + /** @todo icon */ description: "A claim made about something.", properties: [ { @@ -367,6 +386,12 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [linkEntityTypeUrl], title: "Incurred In", + titlePlural: "Incurred Ins", + /** @todo icon */ + inverse: { + title: "Incurred", + titlePlural: "Incurred", + }, description: "Something that was incurred in something else.", properties: [], }, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts index dd934d85591..951908bd2c5 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/017-add-use-case-form-and-example-org.migration.ts @@ -93,6 +93,8 @@ const migrate: MigrationFunction = async ({ await createSystemEntityTypeIfNotExists(context, authentication, { entityTypeDefinition: { title: "Prospective User", + titlePlural: "Prospective Users", + icon: "/icons/types/user-plus.svg", description: "Information about a prospective user of an application or system", labelProperty: systemPropertyTypes.email.propertyTypeBaseUrl, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts index 183d6340aef..d46936bcdad 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/019-add-doc-company-and-person-types.migration.ts @@ -12,6 +12,8 @@ import { createSystemDataTypeIfNotExists, createSystemEntityTypeIfNotExists, createSystemPropertyTypeIfNotExists, + getCurrentHashLinkEntityTypeId, + getCurrentHashSystemEntityTypeId, } from "../util"; const migrate: MigrationFunction = async ({ @@ -202,26 +204,6 @@ const migrate: MigrationFunction = async ({ }, ); - const authoredByLinkEntityType = await createSystemEntityTypeIfNotExists( - context, - authentication, - { - entityTypeDefinition: { - allOf: [linkEntityTypeUrl], - icon: "🖊", - title: "Authored By", - titlePlural: "Authored Bys", - inverse: { - title: "Author Of", - }, - description: "Who or what something was authored by", - }, - migrationState, - instantiator: anyUserInstantiator, - webShortname: "hash", - }, - ); - /** @todo H-3619: Infer info on publisher and link to docs */ // const _publishedByLinkEntityType = await createSystemEntityTypeIfNotExists( // context, @@ -271,7 +253,7 @@ const migrate: MigrationFunction = async ({ title: "Affiliated With", titlePlural: "Affiliated Withs", inverse: { - title: "Affiliated Width", + title: "Affiliated With", }, description: "Something that something is affiliated with.", }, @@ -287,7 +269,9 @@ const migrate: MigrationFunction = async ({ { entityTypeDefinition: { title: "Institution", - icon: "🏛", + titlePlural: "Institutions", + icon: "/icons/types/building-columns.svg", + labelProperty: blockProtocolPropertyTypes.name.propertyTypeBaseUrl, description: "An organization dedicated to a specific purpose, such as education, research, or public service, and structured with formal systems of governance and operation.", properties: [ @@ -379,7 +363,7 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { title: "Person", /** - * @todo when updating this, add plural title + * @todo when updating this, add plural title and set SVG icon */ icon: "👤", /** @todo improve this desc */ @@ -425,6 +409,11 @@ const migrate: MigrationFunction = async ({ }, ); + const authoredByLinkEntityTypeId = getCurrentHashLinkEntityTypeId({ + linkEntityTypeKey: "authoredBy", + migrationState, + }); + const docEntityType = await createSystemEntityTypeIfNotExists( context, authentication, @@ -432,7 +421,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { title: "Doc", description: "A written work, such as a book or article.", - icon: "📝", + icon: "/types/icons/page-lines.svg", + titlePlural: "Docs", labelProperty: systemPropertyTypes.title.propertyTypeBaseUrl, properties: [ { @@ -452,7 +442,7 @@ const migrate: MigrationFunction = async ({ outgoingLinks: [ { destinationEntityTypes: [personEntityType.schema.$id], - linkEntityType: authoredByLinkEntityType.schema.$id, + linkEntityType: authoredByLinkEntityTypeId, }, ], }, @@ -469,6 +459,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [docEntityType.schema.$id], title: "Book", + titlePlural: "Books", + icon: "/icons/types/book.svg", description: "A written work, typically longer than an article, often published in print form.", properties: [ @@ -490,6 +482,8 @@ const migrate: MigrationFunction = async ({ entityTypeDefinition: { allOf: [docEntityType.schema.$id], title: "Academic Paper", + titlePlural: "Academic Papers", + icon: "/icons/types/memo.svg", description: "A paper describing academic research", properties: [ { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts new file mode 100644 index 00000000000..cf9ca003d33 --- /dev/null +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts @@ -0,0 +1,4 @@ +/** + * @file this is a temporary file to store default provenance for entities of specific types. + * Provenance will be made required, this is for use in writing a script to apply defaults to existing entities. + */ diff --git a/apps/hash-frontend/public/icons/types/book.svg b/apps/hash-frontend/public/icons/types/book.svg new file mode 100644 index 00000000000..9461e814245 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/building-columns.svg b/apps/hash-frontend/public/icons/types/building-columns.svg new file mode 100644 index 00000000000..2b3115fb00f --- /dev/null +++ b/apps/hash-frontend/public/icons/types/building-columns.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/comment.svg b/apps/hash-frontend/public/icons/types/comment.svg new file mode 100644 index 00000000000..aa4373fde74 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/comment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/cube.svg b/apps/hash-frontend/public/icons/types/cube.svg new file mode 100644 index 00000000000..3035f03080b --- /dev/null +++ b/apps/hash-frontend/public/icons/types/cube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/cubes.svg b/apps/hash-frontend/public/icons/types/cubes.svg new file mode 100644 index 00000000000..f87dd438e33 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/cubes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/facebook.svg b/apps/hash-frontend/public/icons/types/facebook.svg new file mode 100644 index 00000000000..14beccb3689 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/facebook.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/file-excel.svg b/apps/hash-frontend/public/icons/types/file-excel.svg new file mode 100644 index 00000000000..dfa5866802d --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file-lines.svg b/apps/hash-frontend/public/icons/types/file-lines.svg new file mode 100644 index 00000000000..09e9348bc68 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-lines.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file-pdf.svg b/apps/hash-frontend/public/icons/types/file-pdf.svg new file mode 100644 index 00000000000..800ccc65623 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-pdf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file-powerpoint.svg b/apps/hash-frontend/public/icons/types/file-powerpoint.svg new file mode 100644 index 00000000000..17057359a5c --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-powerpoint.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file-spreadsheet.svg b/apps/hash-frontend/public/icons/types/file-spreadsheet.svg new file mode 100644 index 00000000000..5687c1518da --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-spreadsheet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file-word.svg b/apps/hash-frontend/public/icons/types/file-word.svg new file mode 100644 index 00000000000..98e3d21e1c9 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file-word.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/file.svg b/apps/hash-frontend/public/icons/types/file.svg new file mode 100644 index 00000000000..3068fe3ed51 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/gauge-max.svg b/apps/hash-frontend/public/icons/types/gauge-max.svg new file mode 100644 index 00000000000..a9ba6ff6eec --- /dev/null +++ b/apps/hash-frontend/public/icons/types/gauge-max.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/gear.svg b/apps/hash-frontend/public/icons/types/gear.svg new file mode 100644 index 00000000000..6e503ea8dcb --- /dev/null +++ b/apps/hash-frontend/public/icons/types/gear.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/github.svg b/apps/hash-frontend/public/icons/types/github.svg new file mode 100644 index 00000000000..6b375adc827 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/github.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/google.svg b/apps/hash-frontend/public/icons/types/google.svg new file mode 100644 index 00000000000..6d3f1103bd5 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/google.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/instagram.svg b/apps/hash-frontend/public/icons/types/instagram.svg new file mode 100644 index 00000000000..7a54c260f67 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/instagram.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/linkedin.svg b/apps/hash-frontend/public/icons/types/linkedin.svg new file mode 100644 index 00000000000..054e956752e --- /dev/null +++ b/apps/hash-frontend/public/icons/types/linkedin.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/megaphone.svg b/apps/hash-frontend/public/icons/types/megaphone.svg new file mode 100644 index 00000000000..a83be678491 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/memo-circle-info.svg b/apps/hash-frontend/public/icons/types/memo-circle-info.svg new file mode 100644 index 00000000000..814d8461634 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/memo-circle-info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/memo.svg b/apps/hash-frontend/public/icons/types/memo.svg new file mode 100644 index 00000000000..1ecae4dc70c --- /dev/null +++ b/apps/hash-frontend/public/icons/types/memo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/note-sticky.svg b/apps/hash-frontend/public/icons/types/note-sticky.svg new file mode 100644 index 00000000000..a902c241bbb --- /dev/null +++ b/apps/hash-frontend/public/icons/types/note-sticky.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/page.svg b/apps/hash-frontend/public/icons/types/page.svg new file mode 100644 index 00000000000..45972a133d5 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/page.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/pen.svg b/apps/hash-frontend/public/icons/types/pen.svg new file mode 100644 index 00000000000..30ca0ef017b --- /dev/null +++ b/apps/hash-frontend/public/icons/types/pen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/people-group.svg b/apps/hash-frontend/public/icons/types/people-group.svg new file mode 100644 index 00000000000..b740a42fe5c --- /dev/null +++ b/apps/hash-frontend/public/icons/types/people-group.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/person-to-portal.svg b/apps/hash-frontend/public/icons/types/person-to-portal.svg new file mode 100644 index 00000000000..d49eecac67f --- /dev/null +++ b/apps/hash-frontend/public/icons/types/person-to-portal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/plug-circle-check.svg b/apps/hash-frontend/public/icons/types/plug-circle-check.svg new file mode 100644 index 00000000000..fd6cfd4bcba --- /dev/null +++ b/apps/hash-frontend/public/icons/types/plug-circle-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/presentation-screen.svg b/apps/hash-frontend/public/icons/types/presentation-screen.svg new file mode 100644 index 00000000000..d868a454fef --- /dev/null +++ b/apps/hash-frontend/public/icons/types/presentation-screen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/rectangle.svg b/apps/hash-frontend/public/icons/types/rectangle.svg new file mode 100644 index 00000000000..860abf22faa --- /dev/null +++ b/apps/hash-frontend/public/icons/types/rectangle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/text.svg b/apps/hash-frontend/public/icons/types/text.svg new file mode 100644 index 00000000000..de3c92430c8 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/tiktok.svg b/apps/hash-frontend/public/icons/types/tiktok.svg new file mode 100644 index 00000000000..deab254c28a --- /dev/null +++ b/apps/hash-frontend/public/icons/types/tiktok.svg @@ -0,0 +1 @@ + diff --git a/apps/hash-frontend/public/icons/types/user-lock.svg b/apps/hash-frontend/public/icons/types/user-lock.svg new file mode 100644 index 00000000000..e69c75bc302 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/user-lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/user-plus.svg b/apps/hash-frontend/public/icons/types/user-plus.svg new file mode 100644 index 00000000000..d2bcb12dfb2 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/user-plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/user-robot.svg b/apps/hash-frontend/public/icons/types/user-robot.svg new file mode 100644 index 00000000000..142b772c64b --- /dev/null +++ b/apps/hash-frontend/public/icons/types/user-robot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/user.svg b/apps/hash-frontend/public/icons/types/user.svg new file mode 100644 index 00000000000..a1f683401e8 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/hash-frontend/public/icons/types/x-twitter.svg b/apps/hash-frontend/public/icons/types/x-twitter.svg new file mode 100644 index 00000000000..0c12ac2fd25 --- /dev/null +++ b/apps/hash-frontend/public/icons/types/x-twitter.svg @@ -0,0 +1 @@ + From 96936967fcc62ed6e3767093e6fa42818477d470 Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Thu, 19 Dec 2024 20:15:47 +0000 Subject: [PATCH 4/7] add default provenance list for entities. fix some migration / type renaming issues --- .../flow-activities/persist-entity-action.ts | 2 +- .../labels-icons-data-types.ts | 41 ++++- ...ad-completed-at-property-type.migration.ts | 4 +- .../011-deprecate-preferred-name.migration.ts | 2 +- .../provenance-defaults.ts | 167 ++++++++++++++++++ .../src/graph/knowledge/system-types/org.ts | 3 +- .../src/graph/knowledge/system-types/user.ts | 3 +- .../user/submit-early-access-form.ts | 6 +- .../src/integrations/google/oauth-callback.ts | 3 +- apps/hash-frontend/next-env.d.ts | 2 +- .../user-profile-info-modal-header.tsx | 2 +- .../shared/use-update-profile-avatar.tsx | 2 +- .../organizations/shared/org-form.tsx | 2 +- .../grid-view/grid-view-item.tsx | 2 +- .../src/pages/shared/entities-visualizer.tsx | 2 +- .../shared/is-special-entity-type.ts | 4 +- .../hash-backend-utils/src/file-storage.ts | 2 +- .../src/ontology-type-ids.ts | 6 +- .../graph/knowledge/primitive/entity.test.ts | 2 +- 19 files changed, 225 insertions(+), 32 deletions(-) diff --git a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts index 389f2d2b609..6118ade01d3 100644 --- a/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts +++ b/apps/hash-ai-worker-ts/src/activities/flow-activities/persist-entity-action.ts @@ -43,7 +43,7 @@ import type { FlowActionActivity } from "./types.js"; export const fileEntityTypeIds: VersionedUrl[] = [ systemEntityTypes.file.entityTypeId, - systemEntityTypes.image.entityTypeId, + systemEntityTypes.imageFile.entityTypeId, systemEntityTypes.documentFile.entityTypeId, systemEntityTypes.pdfDocument.entityTypeId, systemEntityTypes.docxDocument.entityTypeId, diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts index 81ad3414016..0275199053e 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/labels-icons-data-types.ts @@ -24,7 +24,7 @@ type SystemDataTypeId = /** * A map of propertyTypeIds to the oneOf value that should be set on them */ -const propertyTypeOneOfChanges: Record< +const _propertyTypeOneOfChanges: Record< SystemPropertyTypeId | SystemLinearPropertyTypeId, [{ $ref: SystemDataTypeId }] > = { @@ -123,7 +123,7 @@ const propertyTypeOneOfChanges: Record< type SystemEntityTypeId = (typeof systemEntityTypes)[keyof typeof systemEntityTypes]["entityTypeId"]; -const entityTypeChanges: Record< +const _entityTypeChanges: Record< SystemEntityTypeId, { icon?: `/icons/types/${string}.svg`; @@ -200,6 +200,9 @@ const entityTypeChanges: Record< titlePlural: "Pages", labelProperty: "https://hash.ai/@hash/types/property-type/title/", }, + "https://hash.ai/@hash/types/entity-type/document/v/1": { + titlePlural: "Documents", + }, "https://hash.ai/@hash/types/entity-type/canvas/v/1": { icon: "/icons/types/rectangle.svg", titlePlural: "Canvases", @@ -301,7 +304,7 @@ const entityTypeChanges: Record< type GoogleEntityTypeId = (typeof googleEntityTypes)[keyof typeof googleEntityTypes]["entityTypeId"]; -const googleEntityTypeChanges: Record< +const _googleEntityTypeChanges: Record< GoogleEntityTypeId, { icon?: `/icons/types/${string}.svg`; @@ -319,13 +322,41 @@ const googleEntityTypeChanges: Record< type SystemLinkEntityTypeId = (typeof systemLinkEntityTypes)[keyof typeof systemLinkEntityTypes]["linkEntityTypeId"]; -const linkEntityTypeChanges: Record< +const _linkEntityTypeChanges: Record< SystemLinkEntityTypeId, { icon?: `/icons/types/${string}.svg`; labelProperty?: `${string}/`; } & Required> > = { + "https://hash.ai/@hash/types/entity-type/has-object/v/1": { + titlePlural: "Has Objects", + inverse: { + title: "Object Of", + titlePlural: "Object Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/has-subject/v/1": { + titlePlural: "Has Subjects", + inverse: { + title: "Subject Of", + titlePlural: "Subject Ofs", + }, + }, + "https://hash.ai/@hash/types/entity-type/sync-linear-data-with/v/1": { + titlePlural: "Sync Linear Data Withs", + inverse: { + title: "Linear Data Synced From", + titlePlural: "Linear Data Synced Froms", + }, + }, + "https://hash.ai/@hash/types/entity-type/incurred-in/v/1": { + titlePlural: "Incurred Ins", + inverse: { + title: "Incurred", + titlePlural: "Incurred", + }, + }, "https://hash.ai/@hash/types/entity-type/has-data/v/1": { titlePlural: "Has Datas", inverse: { @@ -505,7 +536,7 @@ const linkEntityTypeChanges: Record< }, }; -const typeRenames: Record = { +const _typeRenames: Record = { "https://hash.ai/@hash/types/entity-type/image/v/2": "Image File", "https://hash.ai/@hash/types/entity-type/quick-note/v/1": "Note", }; diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts index 5001f89d19f..a6bc7cd6668 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/009-add-upload-completed-at-property-type.migration.ts @@ -74,7 +74,7 @@ const migrate: MigrationFunction = async ({ upgradedEntityTypeIds: [updatedFileEntityTypeId], dependentEntityTypeKeys: [ // `Image` inherits from the `File` entity type - "image", + "imageFile", ], migrationState, }); @@ -82,7 +82,7 @@ const migrate: MigrationFunction = async ({ /** Step 4: Assign entities of updated types to the latest version */ const baseUrls = [ systemEntityTypes.file.entityTypeBaseUrl, - systemEntityTypes.image.entityTypeBaseUrl, + systemEntityTypes.imageFile.entityTypeBaseUrl, ] as BaseUrl[]; await upgradeEntitiesToNewTypeVersion(context, authentication, { diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts index d4f7041445d..a2f30a6fc6e 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/migrate-ontology-types/migrations/011-deprecate-preferred-name.migration.ts @@ -76,7 +76,7 @@ const migrate: MigrationFunction = async ({ */ const latestImageEntityTypeId = getCurrentHashSystemEntityTypeId({ - entityTypeKey: "image", + entityTypeKey: "imageFile", migrationState, }); diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts index cf9ca003d33..253bab22651 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts @@ -2,3 +2,170 @@ * @file this is a temporary file to store default provenance for entities of specific types. * Provenance will be made required, this is for use in writing a script to apply defaults to existing entities. */ +import type { EnforcedEntityEditionProvenance } from "@local/hash-graph-sdk/entity"; +import { + systemEntityTypes, + systemLinkEntityTypes, +} from "@local/hash-isomorphic-utils/ontology-type-ids"; + +const userModified: EnforcedEntityEditionProvenance = { + actorType: "human", + origin: { + type: "web-app", + }, +}; + +const browserPluginModified: EnforcedEntityEditionProvenance = { + actorType: "human", + origin: { + type: "browser-extension", + }, +}; + +const aiModified: EnforcedEntityEditionProvenance = { + actorType: "ai", + origin: { + type: "flow", + }, +}; + +const flowMachineModified: EnforcedEntityEditionProvenance = { + actorType: "machine", + origin: { + type: "flow", + }, +}; + +const machineModified: EnforcedEntityEditionProvenance = { + actorType: "machine", + origin: { + type: "api", + }, +}; + +const migrationModified: EnforcedEntityEditionProvenance = { + actorType: "machine", + origin: { + type: "migration", + }, +}; + +type SystemEntityTypeId = + (typeof systemEntityTypes)[keyof typeof systemEntityTypes]["entityTypeId"]; + +const _defaultEntityProvenance: Record< + SystemEntityTypeId, + EnforcedEntityEditionProvenance +> = { + "https://hash.ai/@hash/types/entity-type/academic-paper/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/actor/v/2": migrationModified, + "https://hash.ai/@hash/types/entity-type/block/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/block-collection/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/book/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/browser-plugin-settings/v/1": + browserPluginModified, + "https://hash.ai/@hash/types/entity-type/canvas/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/claim/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/comment/v/6": userModified, + "https://hash.ai/@hash/types/entity-type/comment-notification/v/6": + machineModified, + "https://hash.ai/@hash/types/entity-type/doc/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/document/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/document-file/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/docx-document/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/facebook-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/file/v/2": userModified, + "https://hash.ai/@hash/types/entity-type/flow-definition/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/flow-run/v/1": machineModified, + "https://hash.ai/@hash/types/entity-type/github-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/graph-change-notification/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/hash-instance/v/1": + migrationModified, + "https://hash.ai/@hash/types/entity-type/image/v/2": userModified, + "https://hash.ai/@hash/types/entity-type/instagram-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/institution/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/linear-integration/v/7": + machineModified, + "https://hash.ai/@hash/types/entity-type/linkedin-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/machine/v/2": machineModified, + "https://hash.ai/@hash/types/entity-type/mention-notification/v/6": + machineModified, + "https://hash.ai/@hash/types/entity-type/notification/v/1": machineModified, + "https://hash.ai/@hash/types/entity-type/organization/v/2": userModified, + "https://hash.ai/@hash/types/entity-type/page/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/pdf-document/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/person/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/pptx-presentation/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/presentation-file/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/profile-bio/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/prospective-user/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/quick-note/v/1": + browserPluginModified, + "https://hash.ai/@hash/types/entity-type/service-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/service-feature/v/1": + migrationModified, + "https://hash.ai/@hash/types/entity-type/spreadsheet-file/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/text/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/tiktok-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/twitter-account/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/usage-record/v/2": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/user/v/6": userModified, + "https://hash.ai/@hash/types/entity-type/user-secret/v/1": machineModified, +}; + +type SystemLinkEntityTypeId = + (typeof systemLinkEntityTypes)[keyof typeof systemLinkEntityTypes]["linkEntityTypeId"]; + +const _defaultLinkEntityProvenance: Record< + SystemLinkEntityTypeId, + EnforcedEntityEditionProvenance +> = { + "https://hash.ai/@hash/types/entity-type/affiliated-with/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/associated-with-account/v/1": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/authored-by/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/created/v/1": flowMachineModified, + "https://hash.ai/@hash/types/entity-type/has/v/1": machineModified, + "https://hash.ai/@hash/types/entity-type/has-avatar/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/has-bio/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/has-cover-image/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/has-data/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/has-indexed-content/v/1": + userModified, + "https://hash.ai/@hash/types/entity-type/has-object/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/has-parent/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/has-service-account/v/1": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/has-spatially-positioned-content/v/1": + userModified, + "https://hash.ai/@hash/types/entity-type/has-subject/v/1": aiModified, + "https://hash.ai/@hash/types/entity-type/has-text/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/incurred-in/v/1": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/is-member-of/v/1": userModified, + "https://hash.ai/@hash/types/entity-type/occurred-in-block/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/occurred-in-entity/v/2": + machineModified, + "https://hash.ai/@hash/types/entity-type/occurred-in-comment/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/occurred-in-text/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/records-usage-of/v/1": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/replied-to-comment/v/1": + userModified, + "https://hash.ai/@hash/types/entity-type/sync-linear-data-with/v/1": + flowMachineModified, + "https://hash.ai/@hash/types/entity-type/triggered-by-comment/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/triggered-by-user/v/1": + machineModified, + "https://hash.ai/@hash/types/entity-type/updated/v/1": flowMachineModified, + "https://hash.ai/@hash/types/entity-type/uses-user-secret/v/1": + machineModified, +}; diff --git a/apps/hash-api/src/graph/knowledge/system-types/org.ts b/apps/hash-api/src/graph/knowledge/system-types/org.ts index 662ecc54a0b..59863fd1883 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/org.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/org.ts @@ -160,8 +160,7 @@ export const createOrg: ImpureGraphFunction< "https://hash.ai/@hash/types/property-type/website-url/": { value: websiteUrl, metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1", }, }, } diff --git a/apps/hash-api/src/graph/knowledge/system-types/user.ts b/apps/hash-api/src/graph/knowledge/system-types/user.ts index 72fc2885847..6431f66cc70 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user.ts @@ -330,8 +330,7 @@ export const createUser: ImpureGraphFunction< value: emails.map((email) => ({ value: email, metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/email/v/1", }, })), }, diff --git a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts index d7d80e4e1e5..e3b8d4eec68 100644 --- a/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts +++ b/apps/hash-api/src/graphql/resolvers/knowledge/user/submit-early-access-form.ts @@ -50,8 +50,7 @@ export const submitEarlyAccessFormResolver: ResolverFn< value: properties["https://hash.ai/@hash/types/property-type/email/"], metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/email/v/1", }, }, "https://hash.ai/@hash/types/property-type/intended-use/": { @@ -78,8 +77,7 @@ export const submitEarlyAccessFormResolver: ResolverFn< "https://hash.ai/@hash/types/property-type/website-url/" ], metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1", }, }, "https://hash.ai/@hash/types/property-type/willing-to-pay/": { diff --git a/apps/hash-api/src/integrations/google/oauth-callback.ts b/apps/hash-api/src/integrations/google/oauth-callback.ts index 3cda33557ed..cfbc0240fa6 100644 --- a/apps/hash-api/src/integrations/google/oauth-callback.ts +++ b/apps/hash-api/src/integrations/google/oauth-callback.ts @@ -97,8 +97,7 @@ export const googleOAuthCallback: RequestHandler< "https://hash.ai/@hash/types/property-type/email/": { value: googleUser.data.email, metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/email/v/1", }, }, "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": diff --git a/apps/hash-frontend/next-env.d.ts b/apps/hash-frontend/next-env.d.ts index 4f11a03dc6c..52e831b4342 100644 --- a/apps/hash-frontend/next-env.d.ts +++ b/apps/hash-frontend/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx b/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx index 3f669bc6934..7419572f166 100644 --- a/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx +++ b/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-modal-header.tsx @@ -161,7 +161,7 @@ export const UserProfileInfoModalHeader: FunctionComponent<{ } : { fileEntityCreationInput: { - entityTypeId: systemEntityTypes.image.entityTypeId, + entityTypeId: systemEntityTypes.imageFile.entityTypeId, }, }), }, diff --git a/apps/hash-frontend/src/pages/[shortname]/shared/use-update-profile-avatar.tsx b/apps/hash-frontend/src/pages/[shortname]/shared/use-update-profile-avatar.tsx index a6da10a07cd..63d3a1ec68a 100644 --- a/apps/hash-frontend/src/pages/[shortname]/shared/use-update-profile-avatar.tsx +++ b/apps/hash-frontend/src/pages/[shortname]/shared/use-update-profile-avatar.tsx @@ -52,7 +52,7 @@ export const useUpdateProfileAvatar = (props: { } : { fileEntityCreationInput: { - entityTypeId: systemEntityTypes.image.entityTypeId, + entityTypeId: systemEntityTypes.imageFile.entityTypeId, }, }), }, diff --git a/apps/hash-frontend/src/pages/settings/organizations/shared/org-form.tsx b/apps/hash-frontend/src/pages/settings/organizations/shared/org-form.tsx index 17c5d454efa..c41cf8f98f8 100644 --- a/apps/hash-frontend/src/pages/settings/organizations/shared/org-form.tsx +++ b/apps/hash-frontend/src/pages/settings/organizations/shared/org-form.tsx @@ -159,7 +159,7 @@ export const OrgForm = ({ } : { fileEntityCreationInput: { - entityTypeId: systemEntityTypes.image.entityTypeId, + entityTypeId: systemEntityTypes.imageFile.entityTypeId, }, }), }, diff --git a/apps/hash-frontend/src/pages/shared/entities-table/grid-view/grid-view-item.tsx b/apps/hash-frontend/src/pages/shared/entities-table/grid-view/grid-view-item.tsx index 53cc15740ee..2e596ae31aa 100644 --- a/apps/hash-frontend/src/pages/shared/entities-table/grid-view/grid-view-item.tsx +++ b/apps/hash-frontend/src/pages/shared/entities-table/grid-view/grid-view-item.tsx @@ -52,7 +52,7 @@ const entityTypeIdToIcon: Record = { ), [systemEntityTypes.pdfDocument.entityTypeBaseUrl]: , [systemEntityTypes.docxDocument.entityTypeBaseUrl]: , - [systemEntityTypes.image.entityTypeBaseUrl]: , + [systemEntityTypes.imageFile.entityTypeBaseUrl]: , }; const defaultFileIcon = ; diff --git a/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx b/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx index 93744b5983c..8218cb47fa1 100644 --- a/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx +++ b/apps/hash-frontend/src/pages/shared/entities-visualizer.tsx @@ -50,7 +50,7 @@ import { visualizerViewIcons } from "./visualizer-views"; */ const allFileEntityTypeOntologyIds = [ systemEntityTypes.file, - systemEntityTypes.image, + systemEntityTypes.imageFile, systemEntityTypes.documentFile, systemEntityTypes.docxDocument, systemEntityTypes.pdfDocument, diff --git a/apps/hash-frontend/src/shared/entity-types-context/shared/is-special-entity-type.ts b/apps/hash-frontend/src/shared/entity-types-context/shared/is-special-entity-type.ts index a60b3276a6f..a552ee554f4 100644 --- a/apps/hash-frontend/src/shared/entity-types-context/shared/is-special-entity-type.ts +++ b/apps/hash-frontend/src/shared/entity-types-context/shared/is-special-entity-type.ts @@ -42,7 +42,7 @@ export const isSpecialEntityType = ( let isImage = entityType.$id ? extractBaseUrl(entityType.$id) === - systemEntityTypes.image.entityTypeBaseUrl + systemEntityTypes.imageFile.entityTypeBaseUrl : false; let isLink = false; @@ -51,7 +51,7 @@ export const isSpecialEntityType = ( if (extractBaseUrl(id) === systemEntityTypes.file.entityTypeBaseUrl) { isFile = true; } - if (extractBaseUrl(id) === systemEntityTypes.image.entityTypeBaseUrl) { + if (extractBaseUrl(id) === systemEntityTypes.imageFile.entityTypeBaseUrl) { isImage = true; } if (extractBaseUrl(id) === extractBaseUrl(linkEntityTypeUrl)) { diff --git a/libs/@local/hash-backend-utils/src/file-storage.ts b/libs/@local/hash-backend-utils/src/file-storage.ts index 2ee83ab544f..a6dae834ec4 100644 --- a/libs/@local/hash-backend-utils/src/file-storage.ts +++ b/libs/@local/hash-backend-utils/src/file-storage.ts @@ -121,7 +121,7 @@ export interface PresignedPutUpload { } const fileMimeTypeStartsWithToEntityTypeId: Record = { - "image/": systemEntityTypes.image.entityTypeId, + "image/": systemEntityTypes.imageFile.entityTypeId, "application/pdf": systemEntityTypes.pdfDocument.entityTypeId, "application/vnd.openxmlformats-officedocument.wordprocessingml.document": systemEntityTypes.docxDocument.entityTypeId, diff --git a/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts b/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts index c1a90db3282..9bbbfcd805a 100644 --- a/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts +++ b/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts @@ -112,10 +112,10 @@ export const systemEntityTypes = { entityTypeBaseUrl: "https://hash.ai/@hash/types/entity-type/hash-instance/" as BaseUrl, }, - image: { - entityTypeId: "https://hash.ai/@hash/types/entity-type/image/v/2", + imageFile: { + entityTypeId: "https://hash.ai/@hash/types/entity-type/image-file/v/2", entityTypeBaseUrl: - "https://hash.ai/@hash/types/entity-type/image/" as BaseUrl, + "https://hash.ai/@hash/types/entity-type/image-file/" as BaseUrl, }, instagramAccount: { entityTypeId: diff --git a/tests/hash-backend-integration/src/tests/graph/knowledge/primitive/entity.test.ts b/tests/hash-backend-integration/src/tests/graph/knowledge/primitive/entity.test.ts index 87ef891424f..2967047ae5e 100644 --- a/tests/hash-backend-integration/src/tests/graph/knowledge/primitive/entity.test.ts +++ b/tests/hash-backend-integration/src/tests/graph/knowledge/primitive/entity.test.ts @@ -265,7 +265,7 @@ describe("Entity CRU", () => { }, }, entityTypeIds: [ - systemEntityTypes.image.entityTypeId, + systemEntityTypes.imageFile.entityTypeId, systemEntityTypes.text.entityTypeId, ], relationships: createDefaultAuthorizationRelationships(authentication), From 794be7e92f1d2fabb5c68dc17954919a3ddb022b Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Thu, 19 Dec 2024 20:18:50 +0000 Subject: [PATCH 5/7] delete husky files --- .config/husky/pre-commit | 57 -------------------------------- .config/husky/prepare-commit-msg | 57 -------------------------------- 2 files changed, 114 deletions(-) delete mode 100755 .config/husky/pre-commit delete mode 100755 .config/husky/prepare-commit-msg diff --git a/.config/husky/pre-commit b/.config/husky/pre-commit deleted file mode 100755 index 4855f612468..00000000000 --- a/.config/husky/pre-commit +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then - set -x -fi - -if [ "$LEFTHOOK" = "0" ]; then - exit 0 -fi - -call_lefthook() -{ - if test -n "$LEFTHOOK_BIN" - then - "$LEFTHOOK_BIN" "$@" - elif lefthook -h >/dev/null 2>&1 - then - lefthook "$@" - else - dir="$(git rev-parse --show-toplevel)" - osArch=$(uname | tr '[:upper:]' '[:lower:]') - cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/') - if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" - then - "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@" - elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" - then - "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@" - elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" - then - "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@" - elif test -f "$dir/node_modules/lefthook/bin/index.js" - then - "$dir/node_modules/lefthook/bin/index.js" "$@" - - elif bundle exec lefthook -h >/dev/null 2>&1 - then - bundle exec lefthook "$@" - elif yarn lefthook -h >/dev/null 2>&1 - then - yarn lefthook "$@" - elif pnpm lefthook -h >/dev/null 2>&1 - then - pnpm lefthook "$@" - elif swift package plugin lefthook >/dev/null 2>&1 - then - swift package --disable-sandbox plugin lefthook "$@" - elif command -v mint >/dev/null 2>&1 - then - mint run csjones/lefthook-plugin "$@" - else - echo "Can't find lefthook in PATH" - fi - fi -} - -call_lefthook run "pre-commit" "$@" diff --git a/.config/husky/prepare-commit-msg b/.config/husky/prepare-commit-msg deleted file mode 100755 index 2655902bceb..00000000000 --- a/.config/husky/prepare-commit-msg +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then - set -x -fi - -if [ "$LEFTHOOK" = "0" ]; then - exit 0 -fi - -call_lefthook() -{ - if test -n "$LEFTHOOK_BIN" - then - "$LEFTHOOK_BIN" "$@" - elif lefthook -h >/dev/null 2>&1 - then - lefthook "$@" - else - dir="$(git rev-parse --show-toplevel)" - osArch=$(uname | tr '[:upper:]' '[:lower:]') - cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/') - if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" - then - "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@" - elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" - then - "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@" - elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" - then - "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@" - elif test -f "$dir/node_modules/lefthook/bin/index.js" - then - "$dir/node_modules/lefthook/bin/index.js" "$@" - - elif bundle exec lefthook -h >/dev/null 2>&1 - then - bundle exec lefthook "$@" - elif yarn lefthook -h >/dev/null 2>&1 - then - yarn lefthook "$@" - elif pnpm lefthook -h >/dev/null 2>&1 - then - pnpm lefthook "$@" - elif swift package plugin lefthook >/dev/null 2>&1 - then - swift package --disable-sandbox plugin lefthook "$@" - elif command -v mint >/dev/null 2>&1 - then - mint run csjones/lefthook-plugin "$@" - else - echo "Can't find lefthook in PATH" - fi - fi -} - -call_lefthook run "prepare-commit-msg" "$@" From 3dcc318713953bf8995ee54fe46645644a8af0dd Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Fri, 20 Dec 2024 08:43:35 +0000 Subject: [PATCH 6/7] regenerate system type types, update dataTypeId for new data types where passed --- .../provenance-defaults.ts | 2 +- .../graph/knowledge/system-types/comment.ts | 6 +- .../knowledge/system-types/user-secret.ts | 3 +- apps/hash-frontend/src/lib/user-and-org.ts | 16 +- .../user-profile-info-form.tsx | 3 +- apps/hash-frontend/src/pages/notes.page.tsx | 2 +- .../pages/notes.page/create-quick-note.tsx | 2 +- .../pages/notes.page/editable-quick-note.tsx | 10 +- .../src/pages/shared/hidden-types.ts | 2 +- .../shared/use-create-block-collection.ts | 2 +- .../src/shared/notification-count-context.tsx | 4 +- .../one-off/quick-note-action.tsx | 6 +- .../popup/popup-contents/shared/avatar.tsx | 4 +- apps/plugin-browser/src/shared/get-user.ts | 8 +- apps/plugin-browser/src/shared/storage.ts | 6 +- .../src/ontology-type-ids.ts | 10 +- .../src/system-types/academicpaper.ts | 43 +- .../src/system-types/book.ts | 20 +- .../src/system-types/canvas.ts | 41 +- .../src/system-types/claim.ts | 23 +- .../src/system-types/comment.ts | 28 +- .../src/system-types/commentnotification.ts | 85 ++-- .../src/system-types/doc.ts | 4 + .../src/system-types/document.ts | 11 +- .../src/system-types/docxdocument.ts | 18 +- .../src/system-types/facebookaccount.ts | 23 +- .../src/system-types/githubaccount.ts | 22 +- .../system-types/graphchangenotification.ts | 25 +- .../system-types/{image.ts => imagefile.ts} | 20 +- .../src/system-types/instagramaccount.ts | 23 +- .../src/system-types/linearintegration.ts | 70 ++- .../src/system-types/linkedinaccount.ts | 23 +- .../src/system-types/machine.ts | 11 +- .../src/system-types/mentionnotification.ts | 83 ++-- .../system-types/{quicknote.ts => note.ts} | 37 +- .../src/system-types/notification.ts | 4 + .../src/system-types/organization.ts | 24 +- .../src/system-types/pdfdocument.ts | 18 +- .../src/system-types/person.ts | 4 + .../src/system-types/pptxpresentation.ts | 19 +- .../src/system-types/prospectiveuser.ts | 8 + .../src/system-types/serviceaccount.ts | 4 + .../src/system-types/shared.ts | 411 ++++++------------ .../src/system-types/spreadsheetfile.ts | 18 +- .../src/system-types/tiktokaccount.ts | 22 +- .../src/system-types/twitteraccount.ts | 22 +- .../src/system-types/usagerecord.ts | 51 +-- .../src/system-types/user.ts | 28 +- .../src/system-types/usersecret.ts | 4 + 49 files changed, 513 insertions(+), 820 deletions(-) rename libs/@local/hash-isomorphic-utils/src/system-types/{image.ts => imagefile.ts} (91%) rename libs/@local/hash-isomorphic-utils/src/system-types/{quicknote.ts => note.ts} (72%) diff --git a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts index 253bab22651..6b729a310f4 100644 --- a/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts +++ b/apps/hash-api/src/graph/ensure-system-graph-is-initialized/provenance-defaults.ts @@ -3,7 +3,7 @@ * Provenance will be made required, this is for use in writing a script to apply defaults to existing entities. */ import type { EnforcedEntityEditionProvenance } from "@local/hash-graph-sdk/entity"; -import { +import type { systemEntityTypes, systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; diff --git a/apps/hash-api/src/graph/knowledge/system-types/comment.ts b/apps/hash-api/src/graph/knowledge/system-types/comment.ts index c0aa6eb214c..f7608bae01f 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/comment.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/comment.ts @@ -313,8 +313,7 @@ export const deleteComment: ImpureGraphFunction< property: { value: new Date().toISOString(), metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1", }, } satisfies CommentPropertiesWithMetadata["value"]["https://hash.ai/@hash/types/property-type/deleted-at/"], }, @@ -444,8 +443,7 @@ export const resolveComment: ImpureGraphFunction< property: { value: new Date().toISOString(), metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1", }, } satisfies CommentPropertiesWithMetadata["value"]["https://hash.ai/@hash/types/property-type/resolved-at/"], }, diff --git a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts index 07b349faa82..fdfe7f41efc 100644 --- a/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts +++ b/apps/hash-api/src/graph/knowledge/system-types/user-secret.ts @@ -98,8 +98,7 @@ export const createUserSecret = async < "https://hash.ai/@hash/types/property-type/expired-at/": { value: expiresAt, metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1", }, }, "https://hash.ai/@hash/types/property-type/vault-path/": { diff --git a/apps/hash-frontend/src/lib/user-and-org.ts b/apps/hash-frontend/src/lib/user-and-org.ts index 7a228fc5627..c6e8523ff86 100644 --- a/apps/hash-frontend/src/lib/user-and-org.ts +++ b/apps/hash-frontend/src/lib/user-and-org.ts @@ -13,7 +13,7 @@ import { systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { Image } from "@local/hash-isomorphic-utils/system-types/image"; +import type { ImageFile } from "@local/hash-isomorphic-utils/system-types/imagefile"; import type { HasBio, IsMemberOf, @@ -120,7 +120,7 @@ export type Org = MinimalOrg & { createdAt: Date; hasAvatar?: { linkEntity: LinkEntity; - imageEntity: Entity; + imageEntity: Entity; }; hasBio?: { linkEntity: LinkEntity; @@ -174,7 +174,8 @@ export const constructOrg = (params: { ? { // these are each arrays because each entity can have multiple revisions linkEntity: avatarLinkAndEntities[0].linkEntity[0]!, - imageEntity: avatarLinkAndEntities[0].rightEntity[0]! as Entity, + imageEntity: avatarLinkAndEntities[0] + .rightEntity[0]! as Entity, } : undefined; @@ -272,11 +273,11 @@ export type User = MinimalUser & { emails: { address: string; primary: boolean; verified: boolean }[]; hasAvatar?: { linkEntity: LinkEntity; - imageEntity: Entity; + imageEntity: Entity; }; hasCoverImage?: { linkEntity: LinkEntity; - imageEntity: Entity; + imageEntity: Entity; }; hasBio?: { linkEntity: LinkEntity; @@ -401,7 +402,8 @@ export const constructUser = (params: { ? { // these are each arrays because each entity can have multiple revisions linkEntity: avatarLinkAndEntities[0].linkEntity[0]!, - imageEntity: avatarLinkAndEntities[0].rightEntity[0]! as Entity, + imageEntity: avatarLinkAndEntities[0] + .rightEntity[0]! as Entity, } : undefined; @@ -420,7 +422,7 @@ export const constructUser = (params: { // these are each arrays because each entity can have multiple revisions linkEntity: coverImageLinkAndEntities[0].linkEntity[0]!, imageEntity: coverImageLinkAndEntities[0] - .rightEntity[0]! as Entity, + .rightEntity[0]! as Entity, } : undefined; diff --git a/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx b/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx index c16916da780..fae70f3356f 100644 --- a/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx +++ b/apps/hash-frontend/src/pages/[shortname].page/edit-user-profile-info-modal/user-profile-info-form.tsx @@ -153,8 +153,7 @@ export const UserProfileInfoForm: FunctionComponent<{ property: { value: profileUrl, metadata: { - dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1", }, } satisfies ProfileURLPropertyValueWithMetadata, }, diff --git a/apps/hash-frontend/src/pages/notes.page.tsx b/apps/hash-frontend/src/pages/notes.page.tsx index db3e7b7d31d..be5066c20e8 100644 --- a/apps/hash-frontend/src/pages/notes.page.tsx +++ b/apps/hash-frontend/src/pages/notes.page.tsx @@ -52,7 +52,7 @@ const NotesPage: NextPageWithLayout = () => { filter: { all: [ generateVersionedUrlMatchingFilter( - systemEntityTypes.quickNote.entityTypeId, + systemEntityTypes.note.entityTypeId, { ignoreParents: true }, ), { diff --git a/apps/hash-frontend/src/pages/notes.page/create-quick-note.tsx b/apps/hash-frontend/src/pages/notes.page/create-quick-note.tsx index 3c6832e2e04..dc1f7226b94 100644 --- a/apps/hash-frontend/src/pages/notes.page/create-quick-note.tsx +++ b/apps/hash-frontend/src/pages/notes.page/create-quick-note.tsx @@ -71,7 +71,7 @@ export const CreateQuickNote: FunctionComponent<{ const createQuickNote = useCallback(async () => { const createdQuickNoteEntity = await createBlockCollectionEntity({ - kind: "quickNote", + kind: "note", }); const { data } = await getEntity({ diff --git a/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx b/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx index 51b5ec152bf..72e2ebb444f 100644 --- a/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx +++ b/apps/hash-frontend/src/pages/notes.page/editable-quick-note.tsx @@ -15,8 +15,8 @@ import { import { deserializeSubgraph } from "@local/hash-isomorphic-utils/subgraph-mapping"; import type { ArchivedPropertyValueWithMetadata, - QuickNoteProperties, -} from "@local/hash-isomorphic-utils/system-types/quicknote"; + NoteProperties, +} from "@local/hash-isomorphic-utils/system-types/note"; import type { TextToken } from "@local/hash-isomorphic-utils/types"; import type { EntityRootType, Subgraph } from "@local/hash-subgraph"; import { extractEntityUuidFromEntityId } from "@local/hash-subgraph"; @@ -207,12 +207,12 @@ export const EditableQuickNote: FunctionComponent<{ variables: { entityUpdate: { entityId: quickNoteEntity.metadata.recordId.entityId, - entityTypeIds: [systemEntityTypes.quickNote.entityTypeId], + entityTypeIds: [systemEntityTypes.note.entityTypeId], propertyPatches: [ { op: "add", path: [ - "https://hash.ai/@hash/types/property-type/archived/" satisfies keyof QuickNoteProperties as BaseUrl, + "https://hash.ai/@hash/types/property-type/archived/" satisfies keyof NoteProperties as BaseUrl, ], property: { value: true, @@ -247,7 +247,7 @@ export const EditableQuickNote: FunctionComponent<{ variables: { entityUpdate: { entityId: blockCollectionEntityId, - entityTypeIds: [systemEntityTypes.quickNote.entityTypeId], + entityTypeIds: [systemEntityTypes.note.entityTypeId], propertyPatches: [], }, }, diff --git a/apps/hash-frontend/src/pages/shared/hidden-types.ts b/apps/hash-frontend/src/pages/shared/hidden-types.ts index 02f7135dbd7..8dbd48c3048 100644 --- a/apps/hash-frontend/src/pages/shared/hidden-types.ts +++ b/apps/hash-frontend/src/pages/shared/hidden-types.ts @@ -25,7 +25,7 @@ export const hiddenEntityTypeIds: VersionedUrl[] = [ systemEntityTypes.mentionNotification.entityTypeId, systemEntityTypes.profileBio.entityTypeId, systemEntityTypes.prospectiveUser.entityTypeId, - systemEntityTypes.quickNote.entityTypeId, + systemEntityTypes.note.entityTypeId, systemEntityTypes.text.entityTypeId, systemEntityTypes.tiktokAccount.entityTypeId, systemEntityTypes.twitterAccount.entityTypeId, diff --git a/apps/hash-frontend/src/pages/shared/use-create-block-collection.ts b/apps/hash-frontend/src/pages/shared/use-create-block-collection.ts index 505d3e127e7..decba85e0b1 100644 --- a/apps/hash-frontend/src/pages/shared/use-create-block-collection.ts +++ b/apps/hash-frontend/src/pages/shared/use-create-block-collection.ts @@ -17,7 +17,7 @@ export const useCreateBlockCollection = (props: { ownedById: OwnedById }) => { const { createEntity } = useBlockProtocolCreateEntity(ownedById); const createBlockCollectionEntity = useCallback( - async (params: { kind: "page" | "quickNote" | "profileBio" }) => { + async (params: { kind: "page" | "note" | "profileBio" }) => { const { kind } = params; const [blockCollectionEntity, blockEntity, textEntity] = diff --git a/apps/hash-frontend/src/shared/notification-count-context.tsx b/apps/hash-frontend/src/shared/notification-count-context.tsx index abf17021242..d009fa03369 100644 --- a/apps/hash-frontend/src/shared/notification-count-context.tsx +++ b/apps/hash-frontend/src/shared/notification-count-context.tsx @@ -214,7 +214,7 @@ export const NotificationCountContextProvider: FunctionComponent< value: now.toISOString(), metadata: { dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + "https://hash.ai/@hash/types/data-type/datetime/v/1", }, } satisfies ReadAtPropertyValueWithMetadata, }, @@ -253,7 +253,7 @@ export const NotificationCountContextProvider: FunctionComponent< value: now.toISOString(), metadata: { dataTypeId: - "https://blockprotocol.org/@blockprotocol/types/data-type/text/v/1", + "https://hash.ai/@hash/types/data-type/datetime/v/1", }, } satisfies ReadAtPropertyValueWithMetadata, }, diff --git a/apps/plugin-browser/src/pages/popup/popup-contents/action-center/one-off/quick-note-action.tsx b/apps/plugin-browser/src/pages/popup/popup-contents/action-center/one-off/quick-note-action.tsx index 4828624b6b5..d4885dd2935 100644 --- a/apps/plugin-browser/src/pages/popup/popup-contents/action-center/one-off/quick-note-action.tsx +++ b/apps/plugin-browser/src/pages/popup/popup-contents/action-center/one-off/quick-note-action.tsx @@ -4,7 +4,7 @@ import { systemEntityTypes, systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; -import type { QuickNote } from "@local/hash-isomorphic-utils/system-types/quicknote"; +import type { Note } from "@local/hash-isomorphic-utils/system-types/note"; import type { Block, HasData, @@ -33,8 +33,8 @@ const createQuickNote = async (text: string) => { .filter((paragraph) => paragraph.length > 0); const [quickNoteEntity, ...blockEntities] = await Promise.all([ - createEntity({ - entityTypeIds: [systemEntityTypes.quickNote.entityTypeId], + createEntity({ + entityTypeIds: [systemEntityTypes.note.entityTypeId], properties: { value: {} }, }), ...paragraphs.map(async (paragraph) => { diff --git a/apps/plugin-browser/src/pages/popup/popup-contents/shared/avatar.tsx b/apps/plugin-browser/src/pages/popup/popup-contents/shared/avatar.tsx index e277dd712df..a94d39c89f4 100644 --- a/apps/plugin-browser/src/pages/popup/popup-contents/shared/avatar.tsx +++ b/apps/plugin-browser/src/pages/popup/popup-contents/shared/avatar.tsx @@ -1,4 +1,4 @@ -import type { Image } from "@local/hash-isomorphic-utils/system-types/image"; +import type { ImageFile } from "@local/hash-isomorphic-utils/system-types/imagefile"; import type { SxProps, Theme } from "@mui/material"; import { Box, Stack } from "@mui/material"; @@ -16,7 +16,7 @@ export const Avatar = ({ name, size = 32, }: { - avatar?: Image | null; + avatar?: ImageFile | null; href?: string; name: string; size?: number; diff --git a/apps/plugin-browser/src/shared/get-user.ts b/apps/plugin-browser/src/shared/get-user.ts index ee868ac9c07..4ffead3d2a5 100644 --- a/apps/plugin-browser/src/shared/get-user.ts +++ b/apps/plugin-browser/src/shared/get-user.ts @@ -9,7 +9,7 @@ import { systemLinkEntityTypes, } from "@local/hash-isomorphic-utils/ontology-type-ids"; import { simplifyProperties } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { Image } from "@local/hash-isomorphic-utils/system-types/image"; +import type { ImageFile } from "@local/hash-isomorphic-utils/system-types/imagefile"; import type { BrowserPluginSettingsProperties, BrowserPluginSettingsPropertiesWithMetadata, @@ -34,7 +34,7 @@ import { getFromLocalStorage, setInLocalStorage } from "./storage"; const getAvatarForEntity = ( subgraph: Subgraph, entityId: EntityId, -): Entity | undefined => { +): Entity | undefined => { const avatarLinkAndEntities = getOutgoingLinkAndTargetEntities( subgraph, entityId, @@ -44,7 +44,9 @@ const getAvatarForEntity = ( systemLinkEntityTypes.hasAvatar.linkEntityTypeId, ), ); - return avatarLinkAndEntities[0]?.rightEntity[0] as Entity | undefined; + return avatarLinkAndEntities[0]?.rightEntity[0] as + | Entity + | undefined; }; /** diff --git a/apps/plugin-browser/src/shared/storage.ts b/apps/plugin-browser/src/shared/storage.ts index ef7159aab7d..94e97741846 100644 --- a/apps/plugin-browser/src/shared/storage.ts +++ b/apps/plugin-browser/src/shared/storage.ts @@ -19,7 +19,7 @@ import type { SimpleProperties, Simplified, } from "@local/hash-isomorphic-utils/simplify-properties"; -import type { Image } from "@local/hash-isomorphic-utils/system-types/image"; +import type { ImageFile } from "@local/hash-isomorphic-utils/system-types/imagefile"; import type { BrowserPluginSettings, Organization, @@ -45,9 +45,9 @@ type SimplifiedUser = { }; type UserAndLinkedData = SimplifiedUser & { - avatar?: Image; + avatar?: ImageFile; orgs: (Simplified> & { - avatar?: Image; + avatar?: ImageFile; webOwnedById: OwnedById; })[]; settingsEntityId: EntityId; diff --git a/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts b/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts index 9bbbfcd805a..0ffc5ce6f60 100644 --- a/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts +++ b/libs/@local/hash-isomorphic-utils/src/ontology-type-ids.ts @@ -151,6 +151,11 @@ export const systemEntityTypes = { entityTypeBaseUrl: "https://hash.ai/@hash/types/entity-type/mention-notification/" as BaseUrl, }, + note: { + entityTypeId: "https://hash.ai/@hash/types/entity-type/note/v/1", + entityTypeBaseUrl: + "https://hash.ai/@hash/types/entity-type/note/" as BaseUrl, + }, notification: { entityTypeId: "https://hash.ai/@hash/types/entity-type/notification/v/1", entityTypeBaseUrl: @@ -199,11 +204,6 @@ export const systemEntityTypes = { entityTypeBaseUrl: "https://hash.ai/@hash/types/entity-type/prospective-user/" as BaseUrl, }, - quickNote: { - entityTypeId: "https://hash.ai/@hash/types/entity-type/quick-note/v/1", - entityTypeBaseUrl: - "https://hash.ai/@hash/types/entity-type/quick-note/" as BaseUrl, - }, serviceAccount: { entityTypeId: "https://hash.ai/@hash/types/entity-type/service-account/v/1", entityTypeBaseUrl: diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/academicpaper.ts b/libs/@local/hash-isomorphic-utils/src/system-types/academicpaper.ts index b022ea86330..611b4841951 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/academicpaper.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/academicpaper.ts @@ -27,6 +27,8 @@ import type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -61,6 +63,8 @@ import type { TextDataTypeWithMetadata, TitlePropertyValue, TitlePropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, YearDataType, YearDataTypeWithMetadata, } from "./shared.js"; @@ -84,6 +88,8 @@ export type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -118,6 +124,8 @@ export type { TextDataTypeWithMetadata, TitlePropertyValue, TitlePropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, YearDataType, YearDataTypeWithMetadata, }; @@ -138,11 +146,7 @@ export type AcademicPaperOutgoingLinksByLinkEntityTypeId = {}; /** * A paper describing academic research */ -export type AcademicPaperProperties = AcademicPaperProperties1 & - AcademicPaperProperties2; -export type AcademicPaperProperties1 = DocProperties; - -export type AcademicPaperProperties2 = { +export type AcademicPaperProperties = DocProperties & { "https://hash.ai/@hash/types/property-type/doi-link/"?: DOILinkPropertyValue; "https://hash.ai/@hash/types/property-type/doi/"?: DOIPropertyValue; "https://hash.ai/@hash/types/property-type/experimental-subject/"?: ExperimentalSubjectPropertyValue; @@ -152,11 +156,7 @@ export type AcademicPaperProperties2 = { "https://hash.ai/@hash/types/property-type/title/": TitlePropertyValue; }; -export type AcademicPaperPropertiesWithMetadata = - AcademicPaperPropertiesWithMetadata1 & AcademicPaperPropertiesWithMetadata2; -export type AcademicPaperPropertiesWithMetadata1 = DocPropertiesWithMetadata; - -export type AcademicPaperPropertiesWithMetadata2 = { +export type AcademicPaperPropertiesWithMetadata = DocPropertiesWithMetadata & { metadata?: ObjectMetadata; value: { "https://hash.ai/@hash/types/property-type/doi-link/"?: DOILinkPropertyValueWithMetadata; @@ -172,10 +172,7 @@ export type AcademicPaperPropertiesWithMetadata2 = { /** * A DOI (Digital Object Identifier), used to identify digital objects such as journal articles or datasets. */ -export type DOIDataType = DOIDataType1; -export type DOIDataType1 = TextDataType; - -export type DOIDataType2 = string; +export type DOIDataType = TextDataType; export type DOIDataTypeWithMetadata = { value: DOIDataType; @@ -222,21 +219,3 @@ export type FindingPropertyValueWithMetadata = TextDataTypeWithMetadata; export type MethodologyPropertyValue = TextDataType; export type MethodologyPropertyValueWithMetadata = TextDataTypeWithMetadata; - -/** - * A unique identifier for a resource (e.g. a URL, or URN). - */ -export type URIDataType = URIDataType1; -export type URIDataType1 = TextDataType; - -export type URIDataType2 = string; - -export type URIDataTypeWithMetadata = { - value: URIDataType; - metadata: URIDataTypeMetadata; -}; -export type URIDataTypeMetadata = { - provenance?: PropertyProvenance; - confidence?: Confidence; - dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1"; -}; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/book.ts b/libs/@local/hash-isomorphic-utils/src/system-types/book.ts index f71f56e1cfa..96fdaa98236 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/book.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/book.ts @@ -27,6 +27,8 @@ import type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -84,6 +86,8 @@ export type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -138,18 +142,11 @@ export type BookOutgoingLinksByLinkEntityTypeId = {}; /** * A written work, typically longer than an article, often published in print form. */ -export type BookProperties = BookProperties1 & BookProperties2; -export type BookProperties1 = DocProperties; - -export type BookProperties2 = { +export type BookProperties = DocProperties & { "https://hash.ai/@hash/types/property-type/isbn/"?: ISBNPropertyValue; }; -export type BookPropertiesWithMetadata = BookPropertiesWithMetadata1 & - BookPropertiesWithMetadata2; -export type BookPropertiesWithMetadata1 = DocPropertiesWithMetadata; - -export type BookPropertiesWithMetadata2 = { +export type BookPropertiesWithMetadata = DocPropertiesWithMetadata & { metadata?: ObjectMetadata; value: { "https://hash.ai/@hash/types/property-type/isbn/"?: ISBNPropertyValueWithMetadata; @@ -159,10 +156,7 @@ export type BookPropertiesWithMetadata2 = { /** * International Standard Book Number: a numeric commercial book identifier that is intended to be unique, issued by an affiliate of the International ISBN Agency. */ -export type ISBNDataType = ISBNDataType1; -export type ISBNDataType1 = TextDataType; - -export type ISBNDataType2 = string; +export type ISBNDataType = TextDataType; export type ISBNDataTypeWithMetadata = { value: ISBNDataType; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/canvas.ts b/libs/@local/hash-isomorphic-utils/src/system-types/canvas.ts index 2c0fa1a0d87..c88619dd05e 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/canvas.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/canvas.ts @@ -134,16 +134,9 @@ export type CanvasOutgoingLinksByLinkEntityTypeId = { /** * A page in canvas format, with content in a free-form arrangement. */ -export type CanvasProperties = CanvasProperties1 & CanvasProperties2; -export type CanvasProperties1 = PageProperties; +export type CanvasProperties = PageProperties & {}; -export type CanvasProperties2 = {}; - -export type CanvasPropertiesWithMetadata = CanvasPropertiesWithMetadata1 & - CanvasPropertiesWithMetadata2; -export type CanvasPropertiesWithMetadata1 = PagePropertiesWithMetadata; - -export type CanvasPropertiesWithMetadata2 = { +export type CanvasPropertiesWithMetadata = PagePropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -166,12 +159,7 @@ export type HasSpatiallyPositionedContentOutgoingLinksByLinkEntityTypeId = {}; /** * Something contained at a spatial position by something */ -export type HasSpatiallyPositionedContentProperties = - HasSpatiallyPositionedContentProperties1 & - HasSpatiallyPositionedContentProperties2; -export type HasSpatiallyPositionedContentProperties1 = LinkProperties; - -export type HasSpatiallyPositionedContentProperties2 = { +export type HasSpatiallyPositionedContentProperties = LinkProperties & { "https://hash.ai/@hash/types/property-type/height-in-pixels/": HeightInPixelsPropertyValue; "https://hash.ai/@hash/types/property-type/rotation-in-rads/": RotationInRadsPropertyValue; "https://hash.ai/@hash/types/property-type/width-in-pixels/": WidthInPixelsPropertyValue; @@ -180,21 +168,16 @@ export type HasSpatiallyPositionedContentProperties2 = { }; export type HasSpatiallyPositionedContentPropertiesWithMetadata = - HasSpatiallyPositionedContentPropertiesWithMetadata1 & - HasSpatiallyPositionedContentPropertiesWithMetadata2; -export type HasSpatiallyPositionedContentPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type HasSpatiallyPositionedContentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/height-in-pixels/": HeightInPixelsPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/rotation-in-rads/": RotationInRadsPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/width-in-pixels/": WidthInPixelsPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/x-position/": XPositionPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/y-position/": YPositionPropertyValueWithMetadata; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/height-in-pixels/": HeightInPixelsPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/rotation-in-rads/": RotationInRadsPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/width-in-pixels/": WidthInPixelsPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/x-position/": XPositionPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/y-position/": YPositionPropertyValueWithMetadata; + }; }; -}; /** * The height of something in pixels. diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/claim.ts b/libs/@local/hash-isomorphic-utils/src/system-types/claim.ts index 9f6a9665539..8b15b41ecf3 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/claim.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/claim.ts @@ -92,16 +92,9 @@ export type HasObjectOutgoingLinksByLinkEntityTypeId = {}; /** * The object something has */ -export type HasObjectProperties = HasObjectProperties1 & HasObjectProperties2; -export type HasObjectProperties1 = LinkProperties; +export type HasObjectProperties = LinkProperties & {}; -export type HasObjectProperties2 = {}; - -export type HasObjectPropertiesWithMetadata = HasObjectPropertiesWithMetadata1 & - HasObjectPropertiesWithMetadata2; -export type HasObjectPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasObjectPropertiesWithMetadata2 = { +export type HasObjectPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -122,17 +115,9 @@ export type HasSubjectOutgoingLinksByLinkEntityTypeId = {}; /** * The subject something has */ -export type HasSubjectProperties = HasSubjectProperties1 & - HasSubjectProperties2; -export type HasSubjectProperties1 = LinkProperties; - -export type HasSubjectProperties2 = {}; - -export type HasSubjectPropertiesWithMetadata = - HasSubjectPropertiesWithMetadata1 & HasSubjectPropertiesWithMetadata2; -export type HasSubjectPropertiesWithMetadata1 = LinkPropertiesWithMetadata; +export type HasSubjectProperties = LinkProperties & {}; -export type HasSubjectPropertiesWithMetadata2 = { +export type HasSubjectPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/comment.ts b/libs/@local/hash-isomorphic-utils/src/system-types/comment.ts index 190c17f8df9..edf736b0ed9 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/comment.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/comment.ts @@ -57,6 +57,8 @@ import type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -133,11 +135,11 @@ import type { HasTextOutgoingLinksByLinkEntityTypeId, HasTextProperties, HasTextPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -208,6 +210,8 @@ import type { TextualContentPropertyValueWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -277,6 +281,8 @@ export type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -353,11 +359,11 @@ export type { HasTextOutgoingLinksByLinkEntityTypeId, HasTextProperties, HasTextPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -428,6 +434,8 @@ export type { TextualContentPropertyValueWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/commentnotification.ts b/libs/@local/hash-isomorphic-utils/src/system-types/commentnotification.ts index 1da0978fd45..d3eadeebbd7 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/commentnotification.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/commentnotification.ts @@ -61,6 +61,8 @@ import type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -141,11 +143,11 @@ import type { HasTextPropertiesWithMetadata, IconPropertyValue, IconPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -248,6 +250,8 @@ import type { TriggeredByUserPropertiesWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -319,6 +323,8 @@ export type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -399,11 +405,11 @@ export type { HasTextPropertiesWithMetadata, IconPropertyValue, IconPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -506,6 +512,8 @@ export type { TriggeredByUserPropertiesWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -559,22 +567,13 @@ export type CommentNotificationOutgoingLinksByLinkEntityTypeId = { /** * A notification related to a comment. */ -export type CommentNotificationProperties = CommentNotificationProperties1 & - CommentNotificationProperties2; -export type CommentNotificationProperties1 = NotificationProperties; - -export type CommentNotificationProperties2 = {}; +export type CommentNotificationProperties = NotificationProperties & {}; export type CommentNotificationPropertiesWithMetadata = - CommentNotificationPropertiesWithMetadata1 & - CommentNotificationPropertiesWithMetadata2; -export type CommentNotificationPropertiesWithMetadata1 = - NotificationPropertiesWithMetadata; - -export type CommentNotificationPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + NotificationPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; export type CommentNotificationRepliedToCommentLink = { linkEntity: RepliedToComment; @@ -609,22 +608,13 @@ export type RepliedToCommentOutgoingLinksByLinkEntityTypeId = {}; /** * The comment that something replied to. */ -export type RepliedToCommentProperties = RepliedToCommentProperties1 & - RepliedToCommentProperties2; -export type RepliedToCommentProperties1 = LinkProperties; - -export type RepliedToCommentProperties2 = {}; +export type RepliedToCommentProperties = LinkProperties & {}; export type RepliedToCommentPropertiesWithMetadata = - RepliedToCommentPropertiesWithMetadata1 & - RepliedToCommentPropertiesWithMetadata2; -export type RepliedToCommentPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type RepliedToCommentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * A comment that triggered something. @@ -644,19 +634,10 @@ export type TriggeredByCommentOutgoingLinksByLinkEntityTypeId = {}; /** * A comment that triggered something. */ -export type TriggeredByCommentProperties = TriggeredByCommentProperties1 & - TriggeredByCommentProperties2; -export type TriggeredByCommentProperties1 = LinkProperties; - -export type TriggeredByCommentProperties2 = {}; +export type TriggeredByCommentProperties = LinkProperties & {}; export type TriggeredByCommentPropertiesWithMetadata = - TriggeredByCommentPropertiesWithMetadata1 & - TriggeredByCommentPropertiesWithMetadata2; -export type TriggeredByCommentPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type TriggeredByCommentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/doc.ts b/libs/@local/hash-isomorphic-utils/src/system-types/doc.ts index b534b926d2a..61072b37942 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/doc.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/doc.ts @@ -21,6 +21,8 @@ import type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -78,6 +80,8 @@ export type { DocOutgoingLinksByLinkEntityTypeId, DocProperties, DocPropertiesWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/document.ts b/libs/@local/hash-isomorphic-utils/src/system-types/document.ts index 442d11f281d..ec59bc1985a 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/document.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/document.ts @@ -139,16 +139,9 @@ export type DocumentOutgoingLinksByLinkEntityTypeId = { /** * A page in document format, with content arranged in columns. */ -export type DocumentProperties = DocumentProperties1 & DocumentProperties2; -export type DocumentProperties1 = PageProperties; +export type DocumentProperties = PageProperties & {}; -export type DocumentProperties2 = {}; - -export type DocumentPropertiesWithMetadata = DocumentPropertiesWithMetadata1 & - DocumentPropertiesWithMetadata2; -export type DocumentPropertiesWithMetadata1 = PagePropertiesWithMetadata; - -export type DocumentPropertiesWithMetadata2 = { +export type DocumentPropertiesWithMetadata = PagePropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/docxdocument.ts b/libs/@local/hash-isomorphic-utils/src/system-types/docxdocument.ts index 0aa1b7624fc..f3f702c2afa 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/docxdocument.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/docxdocument.ts @@ -138,18 +138,10 @@ export type DOCXDocumentOutgoingLinksByLinkEntityTypeId = {}; /** * A Microsoft Word document. */ -export type DOCXDocumentProperties = DOCXDocumentProperties1 & - DOCXDocumentProperties2; -export type DOCXDocumentProperties1 = DocumentFileProperties; - -export type DOCXDocumentProperties2 = {}; +export type DOCXDocumentProperties = DocumentFileProperties & {}; export type DOCXDocumentPropertiesWithMetadata = - DOCXDocumentPropertiesWithMetadata1 & DOCXDocumentPropertiesWithMetadata2; -export type DOCXDocumentPropertiesWithMetadata1 = - DocumentFilePropertiesWithMetadata; - -export type DOCXDocumentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + DocumentFilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/facebookaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/facebookaccount.ts index 23f2b807af4..c21a7bc7ead 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/facebookaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/facebookaccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -46,19 +50,10 @@ export type FacebookAccountOutgoingLinksByLinkEntityTypeId = {}; /** * A Facebook account. */ -export type FacebookAccountProperties = FacebookAccountProperties1 & - FacebookAccountProperties2; -export type FacebookAccountProperties1 = ServiceAccountProperties; - -export type FacebookAccountProperties2 = {}; +export type FacebookAccountProperties = ServiceAccountProperties & {}; export type FacebookAccountPropertiesWithMetadata = - FacebookAccountPropertiesWithMetadata1 & - FacebookAccountPropertiesWithMetadata2; -export type FacebookAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type FacebookAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/githubaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/githubaccount.ts index 2c342ea3074..29d2f29901c 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/githubaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/githubaccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -44,18 +48,10 @@ export type GitHubAccountOutgoingLinksByLinkEntityTypeId = {}; /** * A GitHub account. */ -export type GitHubAccountProperties = GitHubAccountProperties1 & - GitHubAccountProperties2; -export type GitHubAccountProperties1 = ServiceAccountProperties; - -export type GitHubAccountProperties2 = {}; +export type GitHubAccountProperties = ServiceAccountProperties & {}; export type GitHubAccountPropertiesWithMetadata = - GitHubAccountPropertiesWithMetadata1 & GitHubAccountPropertiesWithMetadata2; -export type GitHubAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type GitHubAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/graphchangenotification.ts b/libs/@local/hash-isomorphic-utils/src/system-types/graphchangenotification.ts index 8cd61da237d..c290fa6a62c 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/graphchangenotification.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/graphchangenotification.ts @@ -10,6 +10,8 @@ import type { ArchivedPropertyValueWithMetadata, BooleanDataType, BooleanDataTypeWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, EntityEditionIdPropertyValue, EntityEditionIdPropertyValueWithMetadata, Link, @@ -38,6 +40,8 @@ export type { ArchivedPropertyValueWithMetadata, BooleanDataType, BooleanDataTypeWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, EntityEditionIdPropertyValue, EntityEditionIdPropertyValueWithMetadata, Link, @@ -87,26 +91,17 @@ export type GraphChangeNotificationOutgoingLinksByLinkEntityTypeId = { /** * A notification of a change to a graph */ -export type GraphChangeNotificationProperties = - GraphChangeNotificationProperties1 & GraphChangeNotificationProperties2; -export type GraphChangeNotificationProperties1 = NotificationProperties; - -export type GraphChangeNotificationProperties2 = { +export type GraphChangeNotificationProperties = NotificationProperties & { "https://hash.ai/@hash/types/property-type/graph-change-type/": GraphChangeTypePropertyValue; }; export type GraphChangeNotificationPropertiesWithMetadata = - GraphChangeNotificationPropertiesWithMetadata1 & - GraphChangeNotificationPropertiesWithMetadata2; -export type GraphChangeNotificationPropertiesWithMetadata1 = - NotificationPropertiesWithMetadata; - -export type GraphChangeNotificationPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/graph-change-type/": GraphChangeTypePropertyValueWithMetadata; + NotificationPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/graph-change-type/": GraphChangeTypePropertyValueWithMetadata; + }; }; -}; /** * The type of change that occurred (e.g. create, update, archive) diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/image.ts b/libs/@local/hash-isomorphic-utils/src/system-types/imagefile.ts similarity index 91% rename from libs/@local/hash-isomorphic-utils/src/system-types/image.ts rename to libs/@local/hash-isomorphic-utils/src/system-types/imagefile.ts index 34e602e1ce0..14e38425b7b 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/image.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/imagefile.ts @@ -36,11 +36,11 @@ import type { FileStorageRegionPropertyValueWithMetadata, FileURLPropertyValue, FileURLPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, MIMETypePropertyValue, MIMETypePropertyValueWithMetadata, NumberDataType, @@ -91,11 +91,11 @@ export type { FileStorageRegionPropertyValueWithMetadata, FileURLPropertyValue, FileURLPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, MIMETypePropertyValue, MIMETypePropertyValueWithMetadata, NumberDataType, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/instagramaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/instagramaccount.ts index adecb800a4d..e465c13c9de 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/instagramaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/instagramaccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -46,19 +50,10 @@ export type InstagramAccountOutgoingLinksByLinkEntityTypeId = {}; /** * An Instagram account. */ -export type InstagramAccountProperties = InstagramAccountProperties1 & - InstagramAccountProperties2; -export type InstagramAccountProperties1 = ServiceAccountProperties; - -export type InstagramAccountProperties2 = {}; +export type InstagramAccountProperties = ServiceAccountProperties & {}; export type InstagramAccountPropertiesWithMetadata = - InstagramAccountPropertiesWithMetadata1 & - InstagramAccountPropertiesWithMetadata2; -export type InstagramAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type InstagramAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/linearintegration.ts b/libs/@local/hash-isomorphic-utils/src/system-types/linearintegration.ts index cc8f2bfc793..02c16598f59 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/linearintegration.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/linearintegration.ts @@ -46,6 +46,8 @@ import type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -114,11 +116,11 @@ import type { HasServiceAccountOutgoingLinksByLinkEntityTypeId, HasServiceAccountProperties, HasServiceAccountPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -180,6 +182,8 @@ import type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -243,6 +247,8 @@ export type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -311,11 +317,11 @@ export type { HasServiceAccountOutgoingLinksByLinkEntityTypeId, HasServiceAccountProperties, HasServiceAccountPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -377,6 +383,8 @@ export type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -474,29 +482,20 @@ export type SyncLinearDataWithOutgoingLinksByLinkEntityTypeId = {}; /** * Something that syncs linear data with something. */ -export type SyncLinearDataWithProperties = SyncLinearDataWithProperties1 & - SyncLinearDataWithProperties2; -export type SyncLinearDataWithProperties1 = LinkProperties; - -export type SyncLinearDataWithProperties2 = { +export type SyncLinearDataWithProperties = LinkProperties & { "https://hash.ai/@hash/types/property-type/linear-team-id/"?: LinearTeamIdPropertyValue[]; }; export type SyncLinearDataWithPropertiesWithMetadata = - SyncLinearDataWithPropertiesWithMetadata1 & - SyncLinearDataWithPropertiesWithMetadata2; -export type SyncLinearDataWithPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type SyncLinearDataWithPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/linear-team-id/"?: { - value: LinearTeamIdPropertyValueWithMetadata[]; - metadata?: ArrayMetadata; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/linear-team-id/"?: { + value: LinearTeamIdPropertyValueWithMetadata[]; + metadata?: ArrayMetadata; + }; }; }; -}; /** * The user secret something uses. @@ -516,17 +515,10 @@ export type UsesUserSecretOutgoingLinksByLinkEntityTypeId = {}; /** * The user secret something uses. */ -export type UsesUserSecretProperties = UsesUserSecretProperties1 & - UsesUserSecretProperties2; -export type UsesUserSecretProperties1 = LinkProperties; - -export type UsesUserSecretProperties2 = {}; +export type UsesUserSecretProperties = LinkProperties & {}; export type UsesUserSecretPropertiesWithMetadata = - UsesUserSecretPropertiesWithMetadata1 & UsesUserSecretPropertiesWithMetadata2; -export type UsesUserSecretPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type UsesUserSecretPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/linkedinaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/linkedinaccount.ts index ed0a730aaba..367c0fe4467 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/linkedinaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/linkedinaccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -46,19 +50,10 @@ export type LinkedInAccountOutgoingLinksByLinkEntityTypeId = {}; /** * A LinkedIn account. */ -export type LinkedInAccountProperties = LinkedInAccountProperties1 & - LinkedInAccountProperties2; -export type LinkedInAccountProperties1 = ServiceAccountProperties; - -export type LinkedInAccountProperties2 = {}; +export type LinkedInAccountProperties = ServiceAccountProperties & {}; export type LinkedInAccountPropertiesWithMetadata = - LinkedInAccountPropertiesWithMetadata1 & - LinkedInAccountPropertiesWithMetadata2; -export type LinkedInAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type LinkedInAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/machine.ts b/libs/@local/hash-isomorphic-utils/src/system-types/machine.ts index f45d0d37619..5806e94e4e0 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/machine.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/machine.ts @@ -52,19 +52,12 @@ export type MachineOutgoingLinksByLinkEntityTypeId = {}; /** * A machine that can perform actions in the system */ -export type MachineProperties = MachineProperties1 & MachineProperties2; -export type MachineProperties1 = ActorProperties; - -export type MachineProperties2 = { +export type MachineProperties = ActorProperties & { "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": DisplayNamePropertyValue; "https://hash.ai/@hash/types/property-type/machine-identifier/": MachineIdentifierPropertyValue; }; -export type MachinePropertiesWithMetadata = MachinePropertiesWithMetadata1 & - MachinePropertiesWithMetadata2; -export type MachinePropertiesWithMetadata1 = ActorPropertiesWithMetadata; - -export type MachinePropertiesWithMetadata2 = { +export type MachinePropertiesWithMetadata = ActorPropertiesWithMetadata & { metadata?: ObjectMetadata; value: { "https://blockprotocol.org/@blockprotocol/types/property-type/display-name/": DisplayNamePropertyValueWithMetadata; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/mentionnotification.ts b/libs/@local/hash-isomorphic-utils/src/system-types/mentionnotification.ts index de3359be758..006917fc2db 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/mentionnotification.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/mentionnotification.ts @@ -61,6 +61,8 @@ import type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -141,11 +143,11 @@ import type { HasTextPropertiesWithMetadata, IconPropertyValue, IconPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -248,6 +250,8 @@ import type { TriggeredByUserPropertiesWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -319,6 +323,8 @@ export type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -399,11 +405,11 @@ export type { HasTextPropertiesWithMetadata, IconPropertyValue, IconPropertyValueWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -506,6 +512,8 @@ export type { TriggeredByUserPropertiesWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -569,22 +577,13 @@ export type MentionNotificationOutgoingLinksByLinkEntityTypeId = { /** * A notification that a user was mentioned somewhere. */ -export type MentionNotificationProperties = MentionNotificationProperties1 & - MentionNotificationProperties2; -export type MentionNotificationProperties1 = NotificationProperties; - -export type MentionNotificationProperties2 = {}; +export type MentionNotificationProperties = NotificationProperties & {}; export type MentionNotificationPropertiesWithMetadata = - MentionNotificationPropertiesWithMetadata1 & - MentionNotificationPropertiesWithMetadata2; -export type MentionNotificationPropertiesWithMetadata1 = - NotificationPropertiesWithMetadata; - -export type MentionNotificationPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + NotificationPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; export type MentionNotificationTriggeredByUserLink = { linkEntity: TriggeredByUser; @@ -609,22 +608,13 @@ export type OccurredInCommentOutgoingLinksByLinkEntityTypeId = {}; /** * A comment that something occurred in. */ -export type OccurredInCommentProperties = OccurredInCommentProperties1 & - OccurredInCommentProperties2; -export type OccurredInCommentProperties1 = LinkProperties; - -export type OccurredInCommentProperties2 = {}; +export type OccurredInCommentProperties = LinkProperties & {}; export type OccurredInCommentPropertiesWithMetadata = - OccurredInCommentPropertiesWithMetadata1 & - OccurredInCommentPropertiesWithMetadata2; -export type OccurredInCommentPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type OccurredInCommentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * Text that something occurred in. @@ -644,17 +634,10 @@ export type OccurredInTextOutgoingLinksByLinkEntityTypeId = {}; /** * Text that something occurred in. */ -export type OccurredInTextProperties = OccurredInTextProperties1 & - OccurredInTextProperties2; -export type OccurredInTextProperties1 = LinkProperties; - -export type OccurredInTextProperties2 = {}; +export type OccurredInTextProperties = LinkProperties & {}; export type OccurredInTextPropertiesWithMetadata = - OccurredInTextPropertiesWithMetadata1 & OccurredInTextPropertiesWithMetadata2; -export type OccurredInTextPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type OccurredInTextPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/quicknote.ts b/libs/@local/hash-isomorphic-utils/src/system-types/note.ts similarity index 72% rename from libs/@local/hash-isomorphic-utils/src/system-types/quicknote.ts rename to libs/@local/hash-isomorphic-utils/src/system-types/note.ts index 870ec7ee9a3..5b4d7c0428c 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/quicknote.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/note.ts @@ -85,41 +85,34 @@ export type { /** * A (usually) quick or short note. */ -export type QuickNote = { - entityTypeIds: ["https://hash.ai/@hash/types/entity-type/quick-note/v/1"]; - properties: QuickNoteProperties; - propertiesWithMetadata: QuickNotePropertiesWithMetadata; +export type Note = { + entityTypeIds: ["https://hash.ai/@hash/types/entity-type/note/v/1"]; + properties: NoteProperties; + propertiesWithMetadata: NotePropertiesWithMetadata; }; -export type QuickNoteHasIndexedContentLink = { +export type NoteHasIndexedContentLink = { linkEntity: HasIndexedContent; rightEntity: Block; }; -export type QuickNoteOutgoingLinkAndTarget = QuickNoteHasIndexedContentLink; +export type NoteOutgoingLinkAndTarget = NoteHasIndexedContentLink; -export type QuickNoteOutgoingLinksByLinkEntityTypeId = { - "https://hash.ai/@hash/types/entity-type/has-indexed-content/v/1": QuickNoteHasIndexedContentLink; +export type NoteOutgoingLinksByLinkEntityTypeId = { + "https://hash.ai/@hash/types/entity-type/has-indexed-content/v/1": NoteHasIndexedContentLink; }; /** * A (usually) quick or short note. */ -export type QuickNoteProperties = QuickNoteProperties1 & QuickNoteProperties2; -export type QuickNoteProperties1 = BlockCollectionProperties; - -export type QuickNoteProperties2 = { +export type NoteProperties = BlockCollectionProperties & { "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValue; }; -export type QuickNotePropertiesWithMetadata = QuickNotePropertiesWithMetadata1 & - QuickNotePropertiesWithMetadata2; -export type QuickNotePropertiesWithMetadata1 = - BlockCollectionPropertiesWithMetadata; - -export type QuickNotePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValueWithMetadata; +export type NotePropertiesWithMetadata = + BlockCollectionPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValueWithMetadata; + }; }; -}; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/notification.ts b/libs/@local/hash-isomorphic-utils/src/system-types/notification.ts index 6813aa8df84..8660ad2e325 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/notification.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/notification.ts @@ -7,6 +7,8 @@ import type { ArchivedPropertyValueWithMetadata, BooleanDataType, BooleanDataTypeWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, Notification, NotificationOutgoingLinkAndTarget, NotificationOutgoingLinksByLinkEntityTypeId, @@ -23,6 +25,8 @@ export type { ArchivedPropertyValueWithMetadata, BooleanDataType, BooleanDataTypeWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, Notification, NotificationOutgoingLinkAndTarget, NotificationOutgoingLinksByLinkEntityTypeId, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/organization.ts b/libs/@local/hash-isomorphic-utils/src/system-types/organization.ts index 55866a4672c..1be6e39547a 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/organization.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/organization.ts @@ -76,11 +76,11 @@ import type { HasIndexedContentOutgoingLinksByLinkEntityTypeId, HasIndexedContentProperties, HasIndexedContentPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, Link, LinkOutgoingLinkAndTarget, LinkOutgoingLinksByLinkEntityTypeId, @@ -122,6 +122,8 @@ import type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, WebsiteURLPropertyValue, WebsiteURLPropertyValueWithMetadata, } from "./shared.js"; @@ -200,11 +202,11 @@ export type { HasIndexedContentOutgoingLinksByLinkEntityTypeId, HasIndexedContentProperties, HasIndexedContentPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, Link, LinkOutgoingLinkAndTarget, LinkOutgoingLinksByLinkEntityTypeId, @@ -246,6 +248,8 @@ export type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, WebsiteURLPropertyValue, WebsiteURLPropertyValueWithMetadata, }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/pdfdocument.ts b/libs/@local/hash-isomorphic-utils/src/system-types/pdfdocument.ts index 441dd8028f5..38e58ccb89d 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/pdfdocument.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/pdfdocument.ts @@ -138,18 +138,10 @@ export type PDFDocumentOutgoingLinksByLinkEntityTypeId = {}; /** * A PDF document. */ -export type PDFDocumentProperties = PDFDocumentProperties1 & - PDFDocumentProperties2; -export type PDFDocumentProperties1 = DocumentFileProperties; - -export type PDFDocumentProperties2 = {}; +export type PDFDocumentProperties = DocumentFileProperties & {}; export type PDFDocumentPropertiesWithMetadata = - PDFDocumentPropertiesWithMetadata1 & PDFDocumentPropertiesWithMetadata2; -export type PDFDocumentPropertiesWithMetadata1 = - DocumentFilePropertiesWithMetadata; - -export type PDFDocumentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + DocumentFilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/person.ts b/libs/@local/hash-isomorphic-utils/src/system-types/person.ts index 5d5f2e66cd3..9e3b9f061a3 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/person.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/person.ts @@ -10,6 +10,8 @@ import type { AffiliatedWithPropertiesWithMetadata, DescriptionPropertyValue, DescriptionPropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, @@ -42,6 +44,8 @@ export type { AffiliatedWithPropertiesWithMetadata, DescriptionPropertyValue, DescriptionPropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, Institution, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/pptxpresentation.ts b/libs/@local/hash-isomorphic-utils/src/system-types/pptxpresentation.ts index e37bff73b24..14cbed64563 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/pptxpresentation.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/pptxpresentation.ts @@ -140,19 +140,10 @@ export type PPTXPresentationOutgoingLinksByLinkEntityTypeId = {}; /** * A Microsoft PowerPoint presentation. */ -export type PPTXPresentationProperties = PPTXPresentationProperties1 & - PPTXPresentationProperties2; -export type PPTXPresentationProperties1 = PresentationFileProperties; - -export type PPTXPresentationProperties2 = {}; +export type PPTXPresentationProperties = PresentationFileProperties & {}; export type PPTXPresentationPropertiesWithMetadata = - PPTXPresentationPropertiesWithMetadata1 & - PPTXPresentationPropertiesWithMetadata2; -export type PPTXPresentationPropertiesWithMetadata1 = - PresentationFilePropertiesWithMetadata; - -export type PPTXPresentationPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + PresentationFilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/prospectiveuser.ts b/libs/@local/hash-isomorphic-utils/src/system-types/prospectiveuser.ts index 5232c457167..2fb2a7a33c8 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/prospectiveuser.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/prospectiveuser.ts @@ -5,19 +5,27 @@ import type { ObjectMetadata } from "@local/hash-graph-client"; import type { + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, WebsiteURLPropertyValue, WebsiteURLPropertyValueWithMetadata, } from "./shared.js"; export type { + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, WebsiteURLPropertyValue, WebsiteURLPropertyValueWithMetadata, }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/serviceaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/serviceaccount.ts index 97ef8ae9522..c6931e1d454 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/serviceaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/serviceaccount.ts @@ -12,6 +12,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -24,4 +26,6 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/shared.ts b/libs/@local/hash-isomorphic-utils/src/system-types/shared.ts index 3afc16fad4e..ebb01fa76d3 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/shared.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/shared.ts @@ -55,20 +55,13 @@ export type AffiliatedWithOutgoingLinksByLinkEntityTypeId = {}; /** * Something that something is affiliated with. */ -export type AffiliatedWithProperties = AffiliatedWithProperties1 & - AffiliatedWithProperties2; -export type AffiliatedWithProperties1 = LinkProperties; - -export type AffiliatedWithProperties2 = {}; +export type AffiliatedWithProperties = LinkProperties & {}; export type AffiliatedWithPropertiesWithMetadata = - AffiliatedWithPropertiesWithMetadata1 & AffiliatedWithPropertiesWithMetadata2; -export type AffiliatedWithPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type AffiliatedWithPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * A user or other entity's preferences for how an application should behave or appear @@ -116,17 +109,9 @@ export type AuthoredByOutgoingLinksByLinkEntityTypeId = {}; /** * What or whom something was authored by. */ -export type AuthoredByProperties = AuthoredByProperties1 & - AuthoredByProperties2; -export type AuthoredByProperties1 = LinkProperties; - -export type AuthoredByProperties2 = {}; +export type AuthoredByProperties = LinkProperties & {}; -export type AuthoredByPropertiesWithMetadata = - AuthoredByPropertiesWithMetadata1 & AuthoredByPropertiesWithMetadata2; -export type AuthoredByPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type AuthoredByPropertiesWithMetadata2 = { +export type AuthoredByPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -319,10 +304,7 @@ export type ConnectionSourceNamePropertyValueWithMetadata = /** * A reference to a particular date and time, formatted according to RFC 3339. */ -export type DateTimeDataType = DateTimeDataType1; -export type DateTimeDataType1 = TextDataType; - -export type DateTimeDataType2 = string; +export type DateTimeDataType = TextDataType; export type DateTimeDataTypeWithMetadata = { value: DateTimeDataType; @@ -337,9 +319,9 @@ export type DateTimeDataTypeMetadata = { /** * Stringified timestamp of when something was deleted. */ -export type DeletedAtPropertyValue = TextDataType; +export type DeletedAtPropertyValue = DateTimeDataType; -export type DeletedAtPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type DeletedAtPropertyValueWithMetadata = DateTimeDataTypeWithMetadata; /** * A piece of text that tells you about something or someone. This can include explaining what they look like, what its purpose is for, what they’re like, etc. @@ -408,19 +390,11 @@ export type DocumentFileOutgoingLinksByLinkEntityTypeId = {}; /** * A document file. */ -export type DocumentFileProperties = DocumentFileProperties1 & - DocumentFileProperties2; -export type DocumentFileProperties1 = FileProperties; - -export type DocumentFileProperties2 = { +export type DocumentFileProperties = FileProperties & { "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/"?: TextualContentPropertyValue; }; -export type DocumentFilePropertiesWithMetadata = - DocumentFilePropertiesWithMetadata1 & DocumentFilePropertiesWithMetadata2; -export type DocumentFilePropertiesWithMetadata1 = FilePropertiesWithMetadata; - -export type DocumentFilePropertiesWithMetadata2 = { +export type DocumentFilePropertiesWithMetadata = FilePropertiesWithMetadata & { metadata?: ObjectMetadata; value: { "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/"?: TextualContentPropertyValueWithMetadata; @@ -434,12 +408,27 @@ export type DraftNotePropertyValue = TextDataType; export type DraftNotePropertyValueWithMetadata = TextDataTypeWithMetadata; +/** + * An identifier for an email box to which messages are delivered. + */ +export type EmailDataType = TextDataType; + +export type EmailDataTypeWithMetadata = { + value: EmailDataType; + metadata: EmailDataTypeMetadata; +}; +export type EmailDataTypeMetadata = { + provenance?: PropertyProvenance; + confidence?: Confidence; + dataTypeId: "https://hash.ai/@hash/types/data-type/email/v/1"; +}; + /** * An email address */ -export type EmailPropertyValue = TextDataType; +export type EmailPropertyValue = EmailDataType; -export type EmailPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type EmailPropertyValueWithMetadata = EmailDataTypeWithMetadata; /** * A list of identifiers for a feature flags that are enabled. @@ -461,9 +450,9 @@ export type EntityEditionIdPropertyValueWithMetadata = TextDataTypeWithMetadata; /** * Stringified timestamp of when something expired. */ -export type ExpiredAtPropertyValue = TextDataType; +export type ExpiredAtPropertyValue = DateTimeDataType; -export type ExpiredAtPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type ExpiredAtPropertyValueWithMetadata = DateTimeDataTypeWithMetadata; /** * The name of a feature @@ -681,16 +670,9 @@ export type HasAvatarOutgoingLinksByLinkEntityTypeId = {}; /** * The avatar something has. */ -export type HasAvatarProperties = HasAvatarProperties1 & HasAvatarProperties2; -export type HasAvatarProperties1 = LinkProperties; +export type HasAvatarProperties = LinkProperties & {}; -export type HasAvatarProperties2 = {}; - -export type HasAvatarPropertiesWithMetadata = HasAvatarPropertiesWithMetadata1 & - HasAvatarPropertiesWithMetadata2; -export type HasAvatarPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasAvatarPropertiesWithMetadata2 = { +export type HasAvatarPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -711,16 +693,9 @@ export type HasBioOutgoingLinksByLinkEntityTypeId = {}; /** * The biography something has. */ -export type HasBioProperties = HasBioProperties1 & HasBioProperties2; -export type HasBioProperties1 = LinkProperties; - -export type HasBioProperties2 = {}; +export type HasBioProperties = LinkProperties & {}; -export type HasBioPropertiesWithMetadata = HasBioPropertiesWithMetadata1 & - HasBioPropertiesWithMetadata2; -export type HasBioPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasBioPropertiesWithMetadata2 = { +export type HasBioPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -743,17 +718,9 @@ export type HasCoverImageOutgoingLinksByLinkEntityTypeId = {}; /** * The cover image something has. */ -export type HasCoverImageProperties = HasCoverImageProperties1 & - HasCoverImageProperties2; -export type HasCoverImageProperties1 = LinkProperties; - -export type HasCoverImageProperties2 = {}; - -export type HasCoverImagePropertiesWithMetadata = - HasCoverImagePropertiesWithMetadata1 & HasCoverImagePropertiesWithMetadata2; -export type HasCoverImagePropertiesWithMetadata1 = LinkPropertiesWithMetadata; +export type HasCoverImageProperties = LinkProperties & {}; -export type HasCoverImagePropertiesWithMetadata2 = { +export type HasCoverImagePropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -774,16 +741,9 @@ export type HasDataOutgoingLinksByLinkEntityTypeId = {}; /** * The data that something has. */ -export type HasDataProperties = HasDataProperties1 & HasDataProperties2; -export type HasDataProperties1 = LinkProperties; +export type HasDataProperties = LinkProperties & {}; -export type HasDataProperties2 = {}; - -export type HasDataPropertiesWithMetadata = HasDataPropertiesWithMetadata1 & - HasDataPropertiesWithMetadata2; -export type HasDataPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasDataPropertiesWithMetadata2 = { +export type HasDataPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -806,26 +766,17 @@ export type HasIndexedContentOutgoingLinksByLinkEntityTypeId = {}; /** * Something contained at an index by something */ -export type HasIndexedContentProperties = HasIndexedContentProperties1 & - HasIndexedContentProperties2; -export type HasIndexedContentProperties1 = LinkProperties; - -export type HasIndexedContentProperties2 = { +export type HasIndexedContentProperties = LinkProperties & { "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValue; }; export type HasIndexedContentPropertiesWithMetadata = - HasIndexedContentPropertiesWithMetadata1 & - HasIndexedContentPropertiesWithMetadata2; -export type HasIndexedContentPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type HasIndexedContentPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValueWithMetadata; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValueWithMetadata; + }; }; -}; export type HasOutgoingLinkAndTarget = never; @@ -847,16 +798,9 @@ export type HasParentOutgoingLinksByLinkEntityTypeId = {}; /** * The parent something has. */ -export type HasParentProperties = HasParentProperties1 & HasParentProperties2; -export type HasParentProperties1 = LinkProperties; - -export type HasParentProperties2 = {}; - -export type HasParentPropertiesWithMetadata = HasParentPropertiesWithMetadata1 & - HasParentPropertiesWithMetadata2; -export type HasParentPropertiesWithMetadata1 = LinkPropertiesWithMetadata; +export type HasParentProperties = LinkProperties & {}; -export type HasParentPropertiesWithMetadata2 = { +export type HasParentPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -864,16 +808,9 @@ export type HasParentPropertiesWithMetadata2 = { /** * Something that something has */ -export type HasProperties = HasProperties1 & HasProperties2; -export type HasProperties1 = LinkProperties; +export type HasProperties = LinkProperties & {}; -export type HasProperties2 = {}; - -export type HasPropertiesWithMetadata = HasPropertiesWithMetadata1 & - HasPropertiesWithMetadata2; -export type HasPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasPropertiesWithMetadata2 = { +export type HasPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -896,22 +833,13 @@ export type HasServiceAccountOutgoingLinksByLinkEntityTypeId = {}; /** * The service account something has. */ -export type HasServiceAccountProperties = HasServiceAccountProperties1 & - HasServiceAccountProperties2; -export type HasServiceAccountProperties1 = LinkProperties; - -export type HasServiceAccountProperties2 = {}; +export type HasServiceAccountProperties = LinkProperties & {}; export type HasServiceAccountPropertiesWithMetadata = - HasServiceAccountPropertiesWithMetadata1 & - HasServiceAccountPropertiesWithMetadata2; -export type HasServiceAccountPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type HasServiceAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * The text something has. @@ -929,16 +857,9 @@ export type HasTextOutgoingLinksByLinkEntityTypeId = {}; /** * The text something has. */ -export type HasTextProperties = HasTextProperties1 & HasTextProperties2; -export type HasTextProperties1 = LinkProperties; - -export type HasTextProperties2 = {}; +export type HasTextProperties = LinkProperties & {}; -export type HasTextPropertiesWithMetadata = HasTextPropertiesWithMetadata1 & - HasTextPropertiesWithMetadata2; -export type HasTextPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type HasTextPropertiesWithMetadata2 = { +export type HasTextPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -953,29 +874,22 @@ export type IconPropertyValueWithMetadata = TextDataTypeWithMetadata; /** * An image file hosted at a URL */ -export type Image = { - entityTypeIds: ["https://hash.ai/@hash/types/entity-type/image/v/2"]; - properties: ImageProperties; - propertiesWithMetadata: ImagePropertiesWithMetadata; +export type ImageFile = { + entityTypeIds: ["https://hash.ai/@hash/types/entity-type/image-file/v/2"]; + properties: ImageFileProperties; + propertiesWithMetadata: ImageFilePropertiesWithMetadata; }; -export type ImageOutgoingLinkAndTarget = never; +export type ImageFileOutgoingLinkAndTarget = never; -export type ImageOutgoingLinksByLinkEntityTypeId = {}; +export type ImageFileOutgoingLinksByLinkEntityTypeId = {}; /** * An image file hosted at a URL */ -export type ImageProperties = ImageProperties1 & ImageProperties2; -export type ImageProperties1 = FileProperties; - -export type ImageProperties2 = {}; - -export type ImagePropertiesWithMetadata = ImagePropertiesWithMetadata1 & - ImagePropertiesWithMetadata2; -export type ImagePropertiesWithMetadata1 = FilePropertiesWithMetadata; +export type ImageFileProperties = FileProperties & {}; -export type ImagePropertiesWithMetadata2 = { +export type ImageFilePropertiesWithMetadata = FilePropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -1019,10 +933,7 @@ export type InstitutionPropertiesWithMetadata = { /** * The number zero (0), a positive natural number (e.g. 1, 2, 3), or the negation of a positive natural number (e.g. -1, -2, -3). */ -export type IntegerDataType = IntegerDataType1; -export type IntegerDataType1 = NumberDataType; - -export type IntegerDataType2 = number; +export type IntegerDataType = NumberDataType; export type IntegerDataTypeWithMetadata = { value: IntegerDataType; @@ -1050,17 +961,9 @@ export type IsMemberOfOutgoingLinksByLinkEntityTypeId = {}; /** * Something that someone or something is a member of. */ -export type IsMemberOfProperties = IsMemberOfProperties1 & - IsMemberOfProperties2; -export type IsMemberOfProperties1 = LinkProperties; - -export type IsMemberOfProperties2 = {}; - -export type IsMemberOfPropertiesWithMetadata = - IsMemberOfPropertiesWithMetadata1 & IsMemberOfPropertiesWithMetadata2; -export type IsMemberOfPropertiesWithMetadata1 = LinkPropertiesWithMetadata; +export type IsMemberOfProperties = LinkProperties & {}; -export type IsMemberOfPropertiesWithMetadata2 = { +export type IsMemberOfPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -1210,21 +1113,13 @@ export type OccurredInBlockOutgoingLinksByLinkEntityTypeId = {}; /** * A block that something occurred in. */ -export type OccurredInBlockProperties = OccurredInBlockProperties1 & - OccurredInBlockProperties2; -export type OccurredInBlockProperties1 = LinkProperties; - -export type OccurredInBlockProperties2 = {}; +export type OccurredInBlockProperties = LinkProperties & {}; export type OccurredInBlockPropertiesWithMetadata = - OccurredInBlockPropertiesWithMetadata1 & - OccurredInBlockPropertiesWithMetadata2; -export type OccurredInBlockPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type OccurredInBlockPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * An entity that something occurred in. @@ -1244,26 +1139,17 @@ export type OccurredInEntityOutgoingLinksByLinkEntityTypeId = {}; /** * An entity that something occurred in. */ -export type OccurredInEntityProperties = OccurredInEntityProperties1 & - OccurredInEntityProperties2; -export type OccurredInEntityProperties1 = LinkProperties; - -export type OccurredInEntityProperties2 = { +export type OccurredInEntityProperties = LinkProperties & { "https://hash.ai/@hash/types/property-type/entity-edition-id/"?: EntityEditionIdPropertyValue; }; export type OccurredInEntityPropertiesWithMetadata = - OccurredInEntityPropertiesWithMetadata1 & - OccurredInEntityPropertiesWithMetadata2; -export type OccurredInEntityPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type OccurredInEntityPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/entity-edition-id/"?: EntityEditionIdPropertyValueWithMetadata; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/entity-edition-id/"?: EntityEditionIdPropertyValueWithMetadata; + }; }; -}; /** * An organization. Organizations are root-level objects that contain user accounts and teams. @@ -1276,7 +1162,7 @@ export type Organization = { export type OrganizationHasAvatarLink = { linkEntity: HasAvatar; - rightEntity: Image; + rightEntity: ImageFile; }; export type OrganizationHasBioLink = { @@ -1286,7 +1172,7 @@ export type OrganizationHasBioLink = { export type OrganizationHasCoverImageLink = { linkEntity: HasCoverImage; - rightEntity: Image; + rightEntity: ImageFile; }; /** @@ -1422,10 +1308,7 @@ export type PageOutgoingLinksByLinkEntityTypeId = { /** * A page for displaying and potentially interacting with data. */ -export type PageProperties = PageProperties1 & PageProperties2; -export type PageProperties1 = BlockCollectionProperties; - -export type PageProperties2 = { +export type PageProperties = BlockCollectionProperties & { "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValue; "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValue; "https://hash.ai/@hash/types/property-type/icon/"?: IconPropertyValue; @@ -1433,20 +1316,17 @@ export type PageProperties2 = { "https://hash.ai/@hash/types/property-type/title/": TitlePropertyValue; }; -export type PagePropertiesWithMetadata = PagePropertiesWithMetadata1 & - PagePropertiesWithMetadata2; -export type PagePropertiesWithMetadata1 = BlockCollectionPropertiesWithMetadata; - -export type PagePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/icon/"?: IconPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/summary/"?: SummaryPropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/title/": TitlePropertyValueWithMetadata; +export type PagePropertiesWithMetadata = + BlockCollectionPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/archived/"?: ArchivedPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/fractional-index/": FractionalIndexPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/icon/"?: IconPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/summary/"?: SummaryPropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/title/": TitlePropertyValueWithMetadata; + }; }; -}; /** * A human being @@ -1492,10 +1372,10 @@ export type PersonPropertiesWithMetadata = { /** * The base URL of a pinned entity type. */ -export type PinnedEntityTypeBaseURLPropertyValue = TextDataType; +export type PinnedEntityTypeBaseURLPropertyValue = URIDataType; export type PinnedEntityTypeBaseURLPropertyValueWithMetadata = - TextDataTypeWithMetadata; + URIDataTypeWithMetadata; /** * Someone's preferred pronouns. @@ -1523,26 +1403,17 @@ export type PresentationFileOutgoingLinksByLinkEntityTypeId = {}; /** * A presentation file. */ -export type PresentationFileProperties = PresentationFileProperties1 & - PresentationFileProperties2; -export type PresentationFileProperties1 = FileProperties; - -export type PresentationFileProperties2 = { +export type PresentationFileProperties = FileProperties & { "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/"?: TextualContentPropertyValue; }; export type PresentationFilePropertiesWithMetadata = - PresentationFilePropertiesWithMetadata1 & - PresentationFilePropertiesWithMetadata2; -export type PresentationFilePropertiesWithMetadata1 = - FilePropertiesWithMetadata; - -export type PresentationFilePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/"?: TextualContentPropertyValueWithMetadata; + FilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://blockprotocol.org/@blockprotocol/types/property-type/textual-content/"?: TextualContentPropertyValueWithMetadata; + }; }; -}; /** * A biography for display on someone or something's profile. @@ -1567,28 +1438,20 @@ export type ProfileBioOutgoingLinksByLinkEntityTypeId = { /** * A biography for display on someone or something's profile. */ -export type ProfileBioProperties = ProfileBioProperties1 & - ProfileBioProperties2; -export type ProfileBioProperties1 = BlockCollectionProperties; - -export type ProfileBioProperties2 = {}; +export type ProfileBioProperties = BlockCollectionProperties & {}; export type ProfileBioPropertiesWithMetadata = - ProfileBioPropertiesWithMetadata1 & ProfileBioPropertiesWithMetadata2; -export type ProfileBioPropertiesWithMetadata1 = - BlockCollectionPropertiesWithMetadata; - -export type ProfileBioPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + BlockCollectionPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * A URL to a profile */ -export type ProfileURLPropertyValue = TextDataType; +export type ProfileURLPropertyValue = URIDataType; -export type ProfileURLPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type ProfileURLPropertyValueWithMetadata = URIDataTypeWithMetadata; /** * The year in which something was first published. @@ -1600,16 +1463,16 @@ export type PublicationYearPropertyValueWithMetadata = YearDataTypeWithMetadata; /** * The timestamp of when something was read. */ -export type ReadAtPropertyValue = TextDataType; +export type ReadAtPropertyValue = DateTimeDataType; -export type ReadAtPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type ReadAtPropertyValueWithMetadata = DateTimeDataTypeWithMetadata; /** * Stringified timestamp of when something was resolved. */ -export type ResolvedAtPropertyValue = TextDataType; +export type ResolvedAtPropertyValue = DateTimeDataType; -export type ResolvedAtPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type ResolvedAtPropertyValueWithMetadata = DateTimeDataTypeWithMetadata; /** * A service account. @@ -1830,20 +1693,27 @@ export type TriggeredByUserOutgoingLinksByLinkEntityTypeId = {}; /** * A user that triggered something. */ -export type TriggeredByUserProperties = TriggeredByUserProperties1 & - TriggeredByUserProperties2; -export type TriggeredByUserProperties1 = LinkProperties; - -export type TriggeredByUserProperties2 = {}; +export type TriggeredByUserProperties = LinkProperties & {}; export type TriggeredByUserPropertiesWithMetadata = - TriggeredByUserPropertiesWithMetadata1 & - TriggeredByUserPropertiesWithMetadata2; -export type TriggeredByUserPropertiesWithMetadata1 = LinkPropertiesWithMetadata; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; -export type TriggeredByUserPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; +/** + * A unique identifier for a resource (e.g. a URL, or URN). + */ +export type URIDataType = TextDataType; + +export type URIDataTypeWithMetadata = { + value: URIDataType; + metadata: URIDataTypeMetadata; +}; +export type URIDataTypeMetadata = { + provenance?: PropertyProvenance; + confidence?: Confidence; + dataTypeId: "https://hash.ai/@hash/types/data-type/uri/v/1"; }; /** @@ -1863,7 +1733,10 @@ export type User = { propertiesWithMetadata: UserPropertiesWithMetadata; }; -export type UserHasAvatarLink = { linkEntity: HasAvatar; rightEntity: Image }; +export type UserHasAvatarLink = { + linkEntity: HasAvatar; + rightEntity: ImageFile; +}; export type UserHasBioLink = { linkEntity: HasBio; rightEntity: ProfileBio }; @@ -1900,10 +1773,7 @@ export type UserOutgoingLinksByLinkEntityTypeId = { /** * A user of the HASH application. */ -export type UserProperties = UserProperties1 & UserProperties2; -export type UserProperties1 = ActorProperties; - -export type UserProperties2 = { +export type UserProperties = ActorProperties & { "https://hash.ai/@hash/types/property-type/application-preferences/"?: ApplicationPreferencesPropertyValue; /** * @minItems 1 @@ -1948,11 +1818,7 @@ export type UserProperties2 = { "https://hash.ai/@hash/types/property-type/website-url/"?: WebsiteURLPropertyValue; }; -export type UserPropertiesWithMetadata = UserPropertiesWithMetadata1 & - UserPropertiesWithMetadata2; -export type UserPropertiesWithMetadata1 = ActorPropertiesWithMetadata; - -export type UserPropertiesWithMetadata2 = { +export type UserPropertiesWithMetadata = ActorPropertiesWithMetadata & { metadata?: ObjectMetadata; value: { "https://hash.ai/@hash/types/property-type/application-preferences/"?: ApplicationPreferencesPropertyValueWithMetadata; @@ -2014,17 +1880,14 @@ export type VaultPathPropertyValueWithMetadata = TextDataTypeWithMetadata; /** * A URL for a website */ -export type WebsiteURLPropertyValue = TextDataType; +export type WebsiteURLPropertyValue = URIDataType; -export type WebsiteURLPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type WebsiteURLPropertyValueWithMetadata = URIDataTypeWithMetadata; /** * A year in the Gregorian calendar. */ -export type YearDataType = YearDataType1; -export type YearDataType1 = IntegerDataType; - -export type YearDataType2 = number; +export type YearDataType = IntegerDataType; export type YearDataTypeWithMetadata = { value: YearDataType; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/spreadsheetfile.ts b/libs/@local/hash-isomorphic-utils/src/system-types/spreadsheetfile.ts index 19786cb1e19..47ca808cbc0 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/spreadsheetfile.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/spreadsheetfile.ts @@ -122,18 +122,10 @@ export type SpreadsheetFileOutgoingLinksByLinkEntityTypeId = {}; /** * A spreadsheet file. */ -export type SpreadsheetFileProperties = SpreadsheetFileProperties1 & - SpreadsheetFileProperties2; -export type SpreadsheetFileProperties1 = FileProperties; - -export type SpreadsheetFileProperties2 = {}; +export type SpreadsheetFileProperties = FileProperties & {}; export type SpreadsheetFilePropertiesWithMetadata = - SpreadsheetFilePropertiesWithMetadata1 & - SpreadsheetFilePropertiesWithMetadata2; -export type SpreadsheetFilePropertiesWithMetadata1 = FilePropertiesWithMetadata; - -export type SpreadsheetFilePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + FilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/tiktokaccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/tiktokaccount.ts index 600e4a6a094..2bb26b065b9 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/tiktokaccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/tiktokaccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -44,18 +48,10 @@ export type TikTokAccountOutgoingLinksByLinkEntityTypeId = {}; /** * A TikTok account. */ -export type TikTokAccountProperties = TikTokAccountProperties1 & - TikTokAccountProperties2; -export type TikTokAccountProperties1 = ServiceAccountProperties; - -export type TikTokAccountProperties2 = {}; +export type TikTokAccountProperties = ServiceAccountProperties & {}; export type TikTokAccountPropertiesWithMetadata = - TikTokAccountPropertiesWithMetadata1 & TikTokAccountPropertiesWithMetadata2; -export type TikTokAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type TikTokAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/twitteraccount.ts b/libs/@local/hash-isomorphic-utils/src/system-types/twitteraccount.ts index 22156843fc1..e052a6708f5 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/twitteraccount.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/twitteraccount.ts @@ -14,6 +14,8 @@ import type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, } from "./shared.js"; export type { @@ -26,6 +28,8 @@ export type { ServiceAccountPropertiesWithMetadata, TextDataType, TextDataTypeWithMetadata, + URIDataType, + URIDataTypeWithMetadata, }; /** @@ -46,18 +50,10 @@ export type TwitterAccountOutgoingLinksByLinkEntityTypeId = {}; /** * A Twitter account. */ -export type TwitterAccountProperties = TwitterAccountProperties1 & - TwitterAccountProperties2; -export type TwitterAccountProperties1 = ServiceAccountProperties; - -export type TwitterAccountProperties2 = {}; +export type TwitterAccountProperties = ServiceAccountProperties & {}; export type TwitterAccountPropertiesWithMetadata = - TwitterAccountPropertiesWithMetadata1 & TwitterAccountPropertiesWithMetadata2; -export type TwitterAccountPropertiesWithMetadata1 = - ServiceAccountPropertiesWithMetadata; - -export type TwitterAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + ServiceAccountPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/usagerecord.ts b/libs/@local/hash-isomorphic-utils/src/system-types/usagerecord.ts index 7b48484be30..cda9bcc8130 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/usagerecord.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/usagerecord.ts @@ -125,16 +125,9 @@ export type CreatedOutgoingLinksByLinkEntityTypeId = {}; /** * The thing that something created. */ -export type CreatedProperties = CreatedProperties1 & CreatedProperties2; -export type CreatedProperties1 = LinkProperties; +export type CreatedProperties = LinkProperties & {}; -export type CreatedProperties2 = {}; - -export type CreatedPropertiesWithMetadata = CreatedPropertiesWithMetadata1 & - CreatedPropertiesWithMetadata2; -export type CreatedPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type CreatedPropertiesWithMetadata2 = { +export type CreatedPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -163,17 +156,9 @@ export type IncurredInOutgoingLinksByLinkEntityTypeId = {}; /** * Something that was incurred in something else. */ -export type IncurredInProperties = IncurredInProperties1 & - IncurredInProperties2; -export type IncurredInProperties1 = LinkProperties; - -export type IncurredInProperties2 = {}; +export type IncurredInProperties = LinkProperties & {}; -export type IncurredInPropertiesWithMetadata = - IncurredInPropertiesWithMetadata1 & IncurredInPropertiesWithMetadata2; -export type IncurredInPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type IncurredInPropertiesWithMetadata2 = { +export type IncurredInPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; @@ -212,20 +197,13 @@ export type RecordsUsageOfOutgoingLinksByLinkEntityTypeId = {}; /** * The thing that something records usage of. */ -export type RecordsUsageOfProperties = RecordsUsageOfProperties1 & - RecordsUsageOfProperties2; -export type RecordsUsageOfProperties1 = LinkProperties; - -export type RecordsUsageOfProperties2 = {}; +export type RecordsUsageOfProperties = LinkProperties & {}; export type RecordsUsageOfPropertiesWithMetadata = - RecordsUsageOfPropertiesWithMetadata1 & RecordsUsageOfPropertiesWithMetadata2; -export type RecordsUsageOfPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type RecordsUsageOfPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * The thing that something created. @@ -243,16 +221,9 @@ export type UpdatedOutgoingLinksByLinkEntityTypeId = {}; /** * The thing that something created. */ -export type UpdatedProperties = UpdatedProperties1 & UpdatedProperties2; -export type UpdatedProperties1 = LinkProperties; - -export type UpdatedProperties2 = {}; - -export type UpdatedPropertiesWithMetadata = UpdatedPropertiesWithMetadata1 & - UpdatedPropertiesWithMetadata2; -export type UpdatedPropertiesWithMetadata1 = LinkPropertiesWithMetadata; +export type UpdatedProperties = LinkProperties & {}; -export type UpdatedPropertiesWithMetadata2 = { +export type UpdatedPropertiesWithMetadata = LinkPropertiesWithMetadata & { metadata?: ObjectMetadata; value: {}; }; diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/user.ts b/libs/@local/hash-isomorphic-utils/src/system-types/user.ts index 96d6611f824..9becebdd288 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/user.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/user.ts @@ -42,6 +42,8 @@ import type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -108,11 +110,11 @@ import type { HasServiceAccountOutgoingLinksByLinkEntityTypeId, HasServiceAccountProperties, HasServiceAccountPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -174,6 +176,8 @@ import type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, @@ -228,6 +232,8 @@ export type { DisplayNamePropertyValueWithMetadata, DraftNotePropertyValue, DraftNotePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, EnabledFeatureFlagsPropertyValue, @@ -294,11 +300,11 @@ export type { HasServiceAccountOutgoingLinksByLinkEntityTypeId, HasServiceAccountProperties, HasServiceAccountPropertiesWithMetadata, - Image, - ImageOutgoingLinkAndTarget, - ImageOutgoingLinksByLinkEntityTypeId, - ImageProperties, - ImagePropertiesWithMetadata, + ImageFile, + ImageFileOutgoingLinkAndTarget, + ImageFileOutgoingLinksByLinkEntityTypeId, + ImageFileProperties, + ImageFilePropertiesWithMetadata, IsMemberOf, IsMemberOfOutgoingLinkAndTarget, IsMemberOfOutgoingLinksByLinkEntityTypeId, @@ -360,6 +366,8 @@ export type { TextDataTypeWithMetadata, UploadCompletedAtPropertyValue, UploadCompletedAtPropertyValueWithMetadata, + URIDataType, + URIDataTypeWithMetadata, User, UserHasAvatarLink, UserHasBioLink, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/usersecret.ts b/libs/@local/hash-isomorphic-utils/src/system-types/usersecret.ts index 7d67eaf23ea..09a84a4a659 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/usersecret.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/usersecret.ts @@ -5,6 +5,8 @@ import type { ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, ExpiredAtPropertyValue, ExpiredAtPropertyValueWithMetadata, TextDataType, @@ -21,6 +23,8 @@ import type { export type { ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, ExpiredAtPropertyValue, ExpiredAtPropertyValueWithMetadata, TextDataType, From 65dcfc1101a6ecb7af5a3aa2a5e995a55ed03969 Mon Sep 17 00:00:00 2001 From: Ciaran Morinan Date: Fri, 20 Dec 2024 08:50:13 +0000 Subject: [PATCH 7/7] regenerate google system types --- .../src/system-types/google/account.ts | 8 ++ .../system-types/google/googlesheetsfile.ts | 85 ++++++------------- .../src/system-types/google/shared.ts | 55 ++++++++---- 3 files changed, 73 insertions(+), 75 deletions(-) diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/google/account.ts b/libs/@local/hash-isomorphic-utils/src/system-types/google/account.ts index 683a56609d9..3e1ad991730 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/google/account.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/google/account.ts @@ -13,8 +13,12 @@ import type { AccountUsesUserSecretLink, ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, DisplayNamePropertyValue, DisplayNamePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, ExpiredAtPropertyValue, @@ -51,8 +55,12 @@ export type { AccountUsesUserSecretLink, ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, DisplayNamePropertyValue, DisplayNamePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, ExpiredAtPropertyValue, diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/google/googlesheetsfile.ts b/libs/@local/hash-isomorphic-utils/src/system-types/google/googlesheetsfile.ts index 15c9b230bbf..843dc9e6b8f 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/google/googlesheetsfile.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/google/googlesheetsfile.ts @@ -19,8 +19,12 @@ import type { AccountUsesUserSecretLink, ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, DisplayNamePropertyValue, DisplayNamePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, ExpiredAtPropertyValue, @@ -57,8 +61,12 @@ export type { AccountUsesUserSecretLink, ConnectionSourceNamePropertyValue, ConnectionSourceNamePropertyValueWithMetadata, + DateTimeDataType, + DateTimeDataTypeWithMetadata, DisplayNamePropertyValue, DisplayNamePropertyValueWithMetadata, + EmailDataType, + EmailDataTypeWithMetadata, EmailPropertyValue, EmailPropertyValueWithMetadata, ExpiredAtPropertyValue, @@ -87,7 +95,7 @@ export type { /** * The type of thing that can, should or will act on something. */ -export type ActorTypeDataType = "human" | "machine"; +export type ActorTypeDataType = TextDataType & ("machine" | "human"); export type ActorTypeDataTypeWithMetadata = { value: ActorTypeDataType; @@ -117,22 +125,13 @@ export type AssociatedWithAccountOutgoingLinksByLinkEntityTypeId = {}; /** * The account that something is associated with. */ -export type AssociatedWithAccountProperties = AssociatedWithAccountProperties1 & - AssociatedWithAccountProperties2; -export type AssociatedWithAccountProperties1 = LinkProperties; - -export type AssociatedWithAccountProperties2 = {}; +export type AssociatedWithAccountProperties = LinkProperties & {}; export type AssociatedWithAccountPropertiesWithMetadata = - AssociatedWithAccountPropertiesWithMetadata1 & - AssociatedWithAccountPropertiesWithMetadata2; -export type AssociatedWithAccountPropertiesWithMetadata1 = - LinkPropertiesWithMetadata; - -export type AssociatedWithAccountPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * A True or False value @@ -157,21 +156,6 @@ export type DataAudiencePropertyValue = ActorTypeDataType; export type DataAudiencePropertyValueWithMetadata = ActorTypeDataTypeWithMetadata; -/** - * A reference to a particular date and time, formatted according to RFC 3339. - */ -export type DateTimeDataType = string; - -export type DateTimeDataTypeWithMetadata = { - value: DateTimeDataType; - metadata: DateTimeDataTypeMetadata; -}; -export type DateTimeDataTypeMetadata = { - provenance?: PropertyProvenance; - confidence?: Confidence; - dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1"; -}; - /** * A piece of text that tells you about something or someone. This can include explaining what they look like, what its purpose is for, what they’re like, etc. */ @@ -346,28 +330,19 @@ export type GoogleSheetsFileOutgoingLinksByLinkEntityTypeId = { /** * A Google Sheets file. */ -export type GoogleSheetsFileProperties = GoogleSheetsFileProperties1 & - GoogleSheetsFileProperties2; -export type GoogleSheetsFileProperties1 = SpreadsheetFileProperties; - -export type GoogleSheetsFileProperties2 = { +export type GoogleSheetsFileProperties = SpreadsheetFileProperties & { "https://hash.ai/@hash/types/property-type/data-audience/": DataAudiencePropertyValue; "https://hash.ai/@hash/types/property-type/file-id/": FileIdPropertyValue; }; export type GoogleSheetsFilePropertiesWithMetadata = - GoogleSheetsFilePropertiesWithMetadata1 & - GoogleSheetsFilePropertiesWithMetadata2; -export type GoogleSheetsFilePropertiesWithMetadata1 = - SpreadsheetFilePropertiesWithMetadata; - -export type GoogleSheetsFilePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: { - "https://hash.ai/@hash/types/property-type/data-audience/": DataAudiencePropertyValueWithMetadata; - "https://hash.ai/@hash/types/property-type/file-id/": FileIdPropertyValueWithMetadata; + SpreadsheetFilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: { + "https://hash.ai/@hash/types/property-type/data-audience/": DataAudiencePropertyValueWithMetadata; + "https://hash.ai/@hash/types/property-type/file-id/": FileIdPropertyValueWithMetadata; + }; }; -}; /** * A MIME (Multipurpose Internet Mail Extensions) type. @@ -433,21 +408,13 @@ export type SpreadsheetFileOutgoingLinksByLinkEntityTypeId = {}; /** * A spreadsheet file. */ -export type SpreadsheetFileProperties = SpreadsheetFileProperties1 & - SpreadsheetFileProperties2; -export type SpreadsheetFileProperties1 = FileProperties; - -export type SpreadsheetFileProperties2 = {}; +export type SpreadsheetFileProperties = FileProperties & {}; export type SpreadsheetFilePropertiesWithMetadata = - SpreadsheetFilePropertiesWithMetadata1 & - SpreadsheetFilePropertiesWithMetadata2; -export type SpreadsheetFilePropertiesWithMetadata1 = FilePropertiesWithMetadata; - -export type SpreadsheetFilePropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + FilePropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * The timestamp when the upload of something has completed diff --git a/libs/@local/hash-isomorphic-utils/src/system-types/google/shared.ts b/libs/@local/hash-isomorphic-utils/src/system-types/google/shared.ts index 3f5dbf36cf3..396ee46e2f1 100644 --- a/libs/@local/hash-isomorphic-utils/src/system-types/google/shared.ts +++ b/libs/@local/hash-isomorphic-utils/src/system-types/google/shared.ts @@ -61,6 +61,21 @@ export type ConnectionSourceNamePropertyValue = TextDataType; export type ConnectionSourceNamePropertyValueWithMetadata = TextDataTypeWithMetadata; +/** + * A reference to a particular date and time, formatted according to RFC 3339. + */ +export type DateTimeDataType = TextDataType; + +export type DateTimeDataTypeWithMetadata = { + value: DateTimeDataType; + metadata: DateTimeDataTypeMetadata; +}; +export type DateTimeDataTypeMetadata = { + provenance?: PropertyProvenance; + confidence?: Confidence; + dataTypeId: "https://hash.ai/@hash/types/data-type/datetime/v/1"; +}; + /** * A human-friendly display name for something */ @@ -68,19 +83,34 @@ export type DisplayNamePropertyValue = TextDataType; export type DisplayNamePropertyValueWithMetadata = TextDataTypeWithMetadata; +/** + * An identifier for an email box to which messages are delivered. + */ +export type EmailDataType = TextDataType; + +export type EmailDataTypeWithMetadata = { + value: EmailDataType; + metadata: EmailDataTypeMetadata; +}; +export type EmailDataTypeMetadata = { + provenance?: PropertyProvenance; + confidence?: Confidence; + dataTypeId: "https://hash.ai/@hash/types/data-type/email/v/1"; +}; + /** * An email address */ -export type EmailPropertyValue = TextDataType; +export type EmailPropertyValue = EmailDataType; -export type EmailPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type EmailPropertyValueWithMetadata = EmailDataTypeWithMetadata; /** * Stringified timestamp of when something expired. */ -export type ExpiredAtPropertyValue = TextDataType; +export type ExpiredAtPropertyValue = DateTimeDataType; -export type ExpiredAtPropertyValueWithMetadata = TextDataTypeWithMetadata; +export type ExpiredAtPropertyValueWithMetadata = DateTimeDataTypeWithMetadata; /** * undefined @@ -168,20 +198,13 @@ export type UsesUserSecretOutgoingLinksByLinkEntityTypeId = {}; /** * The user secret something uses. */ -export type UsesUserSecretProperties = UsesUserSecretProperties1 & - UsesUserSecretProperties2; -export type UsesUserSecretProperties1 = LinkProperties; - -export type UsesUserSecretProperties2 = {}; +export type UsesUserSecretProperties = LinkProperties & {}; export type UsesUserSecretPropertiesWithMetadata = - UsesUserSecretPropertiesWithMetadata1 & UsesUserSecretPropertiesWithMetadata2; -export type UsesUserSecretPropertiesWithMetadata1 = LinkPropertiesWithMetadata; - -export type UsesUserSecretPropertiesWithMetadata2 = { - metadata?: ObjectMetadata; - value: {}; -}; + LinkPropertiesWithMetadata & { + metadata?: ObjectMetadata; + value: {}; + }; /** * The path to a secret in Hashicorp Vault.