Skip to main content

Interface: IModuleCatalogService

Defined in: Services/IModuleCatalogService.ts:8

Module catalog service interface Handles fetching and managing module catalog sources

Methods

fetchCatalog()

fetchCatalog(url, expectedPublicKey?, requireSignature?): Promise<FetchedCatalog>

Defined in: Services/IModuleCatalogService.ts:22

Fetch a catalog and verify its detached signature.

Rejects when the transport policy is violated (bad protocol, redirect loop, oversized response) or when the signature is present but invalid.

Parameters

url

string

Repository catalog URL

expectedPublicKey?

string

Key the catalog must be signed by, when known (pinned official key, or the key recorded on a previous fetch). Omit to accept any key.

requireSignature?

boolean

Reject an unsigned catalog outright.

Returns

Promise<FetchedCatalog>

The parsed catalog plus its signature verification result


getAllAvailableModules()

getAllAvailableModules(): CatalogModule[]

Defined in: Services/IModuleCatalogService.ts:59

Get all available modules from all enabled repositories

Returns

CatalogModule[]

Array of all catalog modules


getCachedCatalog()

getCachedCatalog(repositoryId): RepositoryCatalog | undefined

Defined in: Services/IModuleCatalogService.ts:46

Get cached catalog for a repository

Parameters

repositoryId

number

Repository ID

Returns

RepositoryCatalog | undefined

Parsed catalog or undefined


getModuleInfo()

getModuleInfo(moduleId): CatalogModule | undefined

Defined in: Services/IModuleCatalogService.ts:66

Get module by ID from catalogs

Parameters

moduleId

string

Module identifier

Returns

CatalogModule | undefined

Module info or undefined


refreshAllCatalogs()

refreshAllCatalogs(): Promise<ModuleCatalog[]>

Defined in: Services/IModuleCatalogService.ts:39

Refresh all enabled repository catalogs

Returns

Promise<ModuleCatalog[]>

Array of updated repositories


refreshCatalog()

refreshCatalog(repositoryId): Promise<ModuleCatalog>

Defined in: Services/IModuleCatalogService.ts:33

Refresh catalog for a repository

Parameters

repositoryId

number

Repository ID

Returns

Promise<ModuleCatalog>

Updated repository entity


searchModules()

searchModules(filter): CatalogModule[]

Defined in: Services/IModuleCatalogService.ts:53

Search modules across all enabled repositories

Parameters

filter

ModuleFilter

Module filter criteria

Returns

CatalogModule[]

Array of matching modules


validateCatalog()

validateCatalog(catalogJson): boolean

Defined in: Services/IModuleCatalogService.ts:73

Validate catalog JSON structure

Parameters

catalogJson

string

JSON string to validate

Returns

boolean

True if valid