@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Function createTypeSectionPaths

    • Creates strongly-typed path helpers for a plugin's custom type section.

      Pass an ECHO schema; the typename is derived once and captured in the returned helpers. Plugins destructure and re-export under their own names:

      const { getSectionPath: getChatsPath, getObjectPath: getChatPath } =
      createTypeSectionPaths(Chat.Chat, { groupId: GraphPath.GroupSegments.ai });
      export { getChatsPath, getChatPath };

      Always use alongside TypeSection.createTypeSectionExtension, passing the same groupId and sectionUrlKey to both.

      Parameters

      • type: AnyEntity
      • Optionaloptions: { groupId?: string; sectionUrlKey?: string }

      Returns {
          getObjectPath: (spaceId: string, objectId: string) => string;
          getSectionPath: (spaceId: string) => string;
      }

      • getObjectPath: (spaceId: string, objectId: string) => string

        Canonical qualified path to a specific object within the type's section.

      • getSectionPath: (spaceId: string) => string

        Canonical qualified path to the type's section node within a space.