From 9e8cb08523c893553e93752a94b8d8d85e92871e Mon Sep 17 00:00:00 2001 From: Reza Soltani Date: Tue, 19 Dec 2023 00:42:52 +0330 Subject: [PATCH] add docs to class TypeIndexHelper --- etc/solid-typeindex-support.api.md | 16 +--------------- package.json | 2 +- src/TypeIndexHelper.ts | 5 +++++ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/etc/solid-typeindex-support.api.md b/etc/solid-typeindex-support.api.md index dd6e2da..dbe740d 100644 --- a/etc/solid-typeindex-support.api.md +++ b/etc/solid-typeindex-support.api.md @@ -4,25 +4,11 @@ ```ts -import { NamedNode } from '@rdfjs/types'; import { SolidDataset } from '@inrupt/solid-client'; -import { ThingPersisted } from '@inrupt/solid-client'; -// @public (undocumented) +// @public export class TypeIndexHelper { - // @internal - static createTypeIndex(fetch: any, typeIndexUrl: string): Promise; static getFromTypeIndex(webId: string, rdfClass: string, fetch: any, isPrivate: true): Promise; - // @internal - static getMeProfile(webId: string, fetch: any): Promise; - // @internal - static getTypeIndex(webId: string, fetch: any, isPrivate: boolean): Promise>; - // @internal - static getTypeIndexFileName(isPrivate: boolean): "privateTypeIndex" | "publicTypeIndex"; - // @internal - static getTypeIndexPredicate(isPrivate: boolean): string; - // @internal - static getTypeIndexURL(webId: string, typeIndexFileName: string): string; static registerInTypeIndex(webId: string, typeRegistrationTitle: string, rdfClass: string, fetch: any, indexUrl: string, isPrivate: boolean): Promise; } diff --git a/package.json b/package.json index 12d7cd1..9f68363 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "tsc -w", "clean": "rimraf dist/", "build": "npm run clean && tsc", - "api-report": "api-extractor run --local", + "api-report": "api-extractor run", "api-docs": "api-documenter markdown -i./dist/api -o./docs", "build-with-docs": "npm run build && npm run api-report && npm run api-docs", "test": "jest" diff --git a/src/TypeIndexHelper.ts b/src/TypeIndexHelper.ts index b004260..69710c2 100644 --- a/src/TypeIndexHelper.ts +++ b/src/TypeIndexHelper.ts @@ -18,6 +18,11 @@ import { namedNode } from '@rdfjs/data-model'; import { __foafPerson, __forClass, __privateTypeIndex, __publicTypeIndex, __schemaPerson, __solidTypeRegistration, __solid_instance, __solid_instance_container } from "./constants"; import { NamedNode } from '@rdfjs/types' +/** + * TypeIndexHelper provides helper methods for working with type indexes in Solid. + * This includes methods for getting and updating a user's public and private + * type indexes. + */ export class TypeIndexHelper { /**