Skip to main content

getCultivationsFromCatalogues

@nmi-agro/fdm-source


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

Function: getCultivationsFromCatalogues()

getCultivationsFromCatalogues(fdm, catalogueIds): Promise<any[]>

Defined in: fdm-core/src/cultivation.ts:76

Alpha

Retrieves cultivations available in the given list of catalogues.

No permission checks are performed. If a catalogue permission system is implemented in the future this may change.

Parameters

fdm

PgDatabase

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

catalogueIds

any[]

The source IDs of the catalogues to retrieve cultivations from, such as "brp".

Returns

Promise<any[]>

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