Skip to content

commonknowledge/ts-mapped-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ts-mapped SDK

TypeScript types for consuming the ts-mapped REST API.

Note: This package is automatically generated from the ts-mapped repository. Do not edit directly.

Installation

npm install github:commonknowledge/ts-mapped-sdk
# or if published to npm:
npm install @commonknowledge/ts-mapped-sdk

Usage

import type {
  GeoJSONAPIResponse,
  GeoJSONAPIFeature,
  GeoJSONFeatureProperties,
  APIRecordFilter,
  APIRecordSort,
  APIFilterOperator,
  APIFilterType,
} from '@commonknowledge/ts-mapped-sdk';

// Fetch data with proper typing
async function fetchGeoJSON(dataSourceId: string): Promise<GeoJSONAPIResponse> {
  const response = await fetch(
    `https://your-instance.com/api/rest/data-sources/${dataSourceId}/geojson`,
    {
      headers: {
        'Authorization': `Basic ${btoa('email:password')}`,
      },
    }
  );
  return response.json();
}

Available Types

  • GeoJSONAPIResponse - Main response type from the GeoJSON endpoint
  • GeoJSONAPIFeature - Individual feature in the response
  • GeoJSONFeatureProperties - Properties object for each feature
  • APIRecordFilter - Filter configuration for querying
  • APIRecordSort - Sort configuration
  • APIFilterOperator - AND / OR operators
  • APIFilterType - GEO / MULTI / TEXT filter types
  • APIPoint - Geographic coordinates (lat/lng)
  • APIGeocodeResult - Geocoding metadata
  • GeoJSONAPIErrorResponse - Error response structure

Documentation

For detailed usage examples, see the API documentation.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •