Alpha Retrieves a specific problem by provider and problem id.
A promise resolving to the problem if found, undefined otherwise.
Error if no provider with the given id is registered.
The id of the provider that owns the problem.
The id of the problem within that provider.
Returns the count of problems from a provider.
More efficient than fetching all problems when only the count is needed.
A promise resolving to the count.
Error if no provider with the given id is registered.
The provider id to query.
Optional options: ProblemQueryOptionsOptional filtering options.
Fetches problems from a provider matching the query options.
A promise resolving to an array of problems.
Error if no provider with the given id is registered.
const emailProblems = await repository.getProblems('email-integration');
const criticalProblems = await repository.getProblems(
'email-integration',
{ severity: ProblemSeverity.Critical }
);
The provider id to query.
Optional options: ProblemQueryOptionsOptional filtering and pagination options.
Returns a specific provider by its id.
The provider if found, undefined otherwise.
The unique identifier of the provider.
Returns all registered providers.
Useful for displaying provider information in the UI, such as provider titles and icons for filtering.
An array of all registered providers.
Registers a problem provider with the repository.
The provider's id must be unique. Registering a provider with an id that already exists will throw an error.
Error if a provider with the same id is already registered.
The provider to register. Must have a unique id.
Repository for accessing problems from registered providers.
The repository is the primary interface for consumers to interact with problems. It provides a unified API for querying, counting, and retrieving problems from registered ProblemProviders.
Packages register their providers with the repository during initialization. Consumers then use the repository's query methods rather than interacting with providers directly.
Example
Registering a provider
Example
Fetching problems from a provider
Example
Getting actions for a problem
See
ProblemProvider for the provider interface