Skip to main content

getFertilizersFromCatalogues

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-core/src / getFertilizersFromCatalogues

Function: getFertilizersFromCatalogues()

getFertilizersFromCatalogues(fdm, principal_id, catalogueIds): Promise<FertilizerCatalogue[]>

Defined in: fdm-core/src/fertilizer.ts:74

Alpha

Retrieves all fertilizers from the catalogues whose source IDs are given.

Only catalogue sources that are enabled for farms accessible by the given principal are returned.

Parameters

fdm

PgDatabase

The FDM instance providing the connection to the database. The instance can be created with createFdmServer.

principal_id

any

The ID of the principal making the request.

catalogueIds

any[]

Catalogue source IDs to retrieve fertilizers from, such as "baat" or "srm".

Returns

Promise<FertilizerCatalogue[]>

A Promise that resolves with a flat array of fertilizer catalogue entries across all given catalogues.