import { BaseResourceAPI, CursorAndAsyncIterator, ExternalId } from '@cognite/sdk-core'; import { FeatureType, GeospatialCreateFeatureType, GeospatialRecursiveDelete, GeospatialUpdateFeatureType } from './types'; export declare class FeatureTypeAPI extends BaseResourceAPI { /** * [Create feature types](https://docs.cognite.com/api/v1/#operation/createFeatureTypes) * * ```js * const featureTypes = [ * { * externalId: 'ocean_temperature', * properties: { temperature: { type: 'DOUBLE' as const }, location: { type: 'POINT' as const, srid: 4326 } } , * searchSpec: { location_idx: { properties : ['location'] } } * } * ]; * const createdFeatureTypes = await client.geospatial.featureType.create(featureTypes); * ``` */ create: (featureTypes: GeospatialCreateFeatureType[]) => Promise; /** * [Retrieve feature types](https://docs.cognite.com/api/v1/#operation/getFeatureTypesByIds) * * ```js * const retrievedFeatureTypes = await client.geospatial.featureType.retrieve([ { externalId: 'ocean_temperature' } ]); * ``` */ retrieve: (externalIds: ExternalId[]) => Promise; /** * [List feature types](https://docs.cognite.com/api/v1/#operation/listFeatureTypes) * * ```js * const allFeatureTypes = await client.geospatial.featureType.list(); * ``` */ list: () => CursorAndAsyncIterator; /** * [Delete feature types](https://docs.cognite.com/api/v1/#operation/GeospatialDeleteFeatureTypes) * * ```js * await client.geospatial.featureType.delete([{ externalId: 'ocean_temperature'}], { recursive : true }); * ``` */ delete: (externalIds: ExternalId[], params?: GeospatialRecursiveDelete) => Promise<{}>; /** * [Update feature types](https://docs.cognite.com/api/v1/#operation/updateFeatureTypes) * * ```js * const featureTypesToUpdate = [ * { * externalId: 'ocean_temperature', * update: { * properties: { add: { depth: { type: 'DOUBLE'} }, remove: ['temperature'] }, * searchSpec: { add: { depth_idx: { properties: ['depth'] } } } * } * } * ]; * const updatedFeatureTypes = await client.geospatial.featureType.update(featureTypesToUpdate); * ``` */ update: (changes: GeospatialUpdateFeatureType[]) => Promise; }