await client.geospatial.featureType.delete([{ externalId: 'ocean_temperature'}], { recursive : true });
const allFeatureTypes = await client.geospatial.featureType.list();
const retrievedFeatureTypes = await client.geospatial.featureType.retrieve([ { externalId: 'ocean_temperature' } ]);
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);
Create feature types
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);