@globalfishingwatch/api-types
v9.0.0-beta.2
Published
Typescript definitions for API responses
Downloads
619
Keywords
Readme
@globalfishingwatch/api-types
TypeScript type definitions for Global Fishing Watch API responses and data structures.
Usage
Import types as needed:
import { Dataset, Dataview, ApiEvent, Vessel } from '@globalfishingwatch/api-types'Main Exports
Datasets
Dataset,ApiDataset,DownloadDataset- Dataset types and variantsDatasetTypes,DatasetStatus,DatasetCategory,DatasetSubCategory- EnumsDatasetFilters,DatasetConfiguration- Filter and configuration types
Dataviews
Dataview,DataviewInstance,DataviewCreation- Dataview typesDataviewType,DataviewCategory- EnumsDataviewConfig,DataviewDatasetConfig- Configuration types
Events
ApiEvent,ApiEvents- Event types with paginationEventTypes- Enum (encounter, fishing, gaps, port_visit, loitering)EncounterEvent,FishingEvent,GapEvent,PortEvent,LoiteringEvent- Specific event types
Vessels
Vessel,VesselSearch- Vessel data typesVesselTypeV2- Vessel type unionAuthorization- Vessel authorization data
Users & Permissions
UserData,UserGroup- User and group typesUserPermission,UserPermissionType,UserPermissionValue- Permission types
Endpoints
Endpoint,EndpointId- API endpoint definitionsEndpointParam- Endpoint parameter types
Other
Pagination- Pagination response typesWorkspace,VesselGroup- Workspace and vessel group typesStats,Thumbnail,Tracks- Utility typesGeometries,Thinning- Geometry and thinning types
Enum Constants:
DATASET_TYPES- Array of all dataset typesDATASET_STATUS- Array of all dataset statusesDATASET_CATEGORIES- Array of all dataset categoriesDATASET_SUB_CATEGORIES- Array of all dataset subcategoriesDATASET_CONFIGURATION_FILTERS- Array of filter keys (fourwings, events, tracks, vessels)DATASET_CONFIGURATION_FILTER_TYPES- Array of filter types (boolean, coordinate, number, range, sql, string, timestamp)DATASET_CONFIGURATION_FILTER_FORMATS- Array of filter formats (date-time, latitude, longitude)DATASET_CONFIGURATION_FILTER_OPERATIONS- Array of filter operations (gt, lt, gte, lte)DATASET_CONFIGURATION_CONTEXT_FORMATS- Array of context formats (GEOJSON, PMTILE, CSV)DATASET_CONFIGURATION_FUNCTIONS- Array of aggregation functions (AVG, SUM)DATASET_CONFIGURATION_INTERVALS- Array of intervals (YEAR, MONTH, DAY, HOUR)DATASET_CONFIGURATION_BULK_DOWNLOAD_FORMATS- Array of download formats (CSV, JSON)
