@stefanaki/wfs-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -0
- package/dist/index.cjs +2357 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +337 -0
- package/dist/index.d.ts +337 -0
- package/dist/index.js +2314 -0
- package/dist/index.js.map +1 -0
- package/namespaces/wfs11/schemas.opengis.net/filter/1.1.0/expr.xsd +67 -0
- package/namespaces/wfs11/schemas.opengis.net/filter/1.1.0/filter.xsd +265 -0
- package/namespaces/wfs11/schemas.opengis.net/filter/1.1.0/filterAll.xsd +26 -0
- package/namespaces/wfs11/schemas.opengis.net/filter/1.1.0/filterCapabilities.xsd +171 -0
- package/namespaces/wfs11/schemas.opengis.net/filter/1.1.0/sort.xsd +47 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/basicTypes.xsd +279 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/coordinateOperations.xsd +790 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/coordinateReferenceSystems.xsd +430 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/coordinateSystems.xsd +409 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/coverage.xsd +452 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/dataQuality.xsd +130 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/datums.xsd +485 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/defaultStyle.xsd +455 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/dictionary.xsd +138 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/direction.xsd +73 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/dynamicFeature.xsd +116 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/feature.xsd +200 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd +431 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/geometryBasic0d1d.xsd +603 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/geometryBasic2d.xsd +214 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/geometryComplexes.xsd +142 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/geometryPrimitives.xsd +1610 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/gml.xsd +22 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/gmlBase.xsd +295 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/grids.xsd +77 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/measures.xsd +201 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/observation.xsd +97 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/referenceSystems.xsd +212 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/temporal.xsd +333 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/temporalReferenceSystems.xsd +252 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/temporalTopology.xsd +187 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/topology.xsd +460 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/units.xsd +171 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/base/valueObjects.xsd +362 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/smil/smil20-language.xsd +117 -0
- package/namespaces/wfs11/schemas.opengis.net/gml/3.1.1/smil/smil20.xsd +234 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/ows19115subset.xsd +223 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsAll.xsd +20 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsCommon.xsd +156 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsDataIdentification.xsd +113 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd +68 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsGetCapabilities.xsd +109 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsOperationsMetadata.xsd +162 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsServiceIdentification.xsd +56 -0
- package/namespaces/wfs11/schemas.opengis.net/ows/1.0.0/owsServiceProvider.xsd +47 -0
- package/namespaces/wfs11/schemas.opengis.net/wfs/1.1.0/wfs.xsd +1867 -0
- package/namespaces/wfs11/www.w3.org/1999/xlink.xsd +270 -0
- package/namespaces/wfs11/www.w3.org/2001/xml.xsd +287 -0
- package/namespaces/wfs11/www.w3.org/2009/01/xml.xsd +286 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/expr.xsd +44 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/filter.xsd +396 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/filterAll.xsd +23 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/filterCapabilities.xsd +286 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/query.xsd +70 -0
- package/namespaces/wfs20/schemas.opengis.net/filter/2.0/sort.xsd +49 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/basicTypes.xsd +268 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/coordinateOperations.xsd +525 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/coordinateReferenceSystems.xsd +373 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/coordinateSystems.xsd +297 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/coverage.xsd +292 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/datums.xsd +287 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/deprecatedTypes.xsd +1133 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/dictionary.xsd +90 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/direction.xsd +84 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/dynamicFeature.xsd +109 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/feature.xsd +94 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/geometryAggregates.xsd +197 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/geometryBasic0d1d.xsd +277 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/geometryBasic2d.xsd +128 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/geometryComplexes.xsd +95 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/geometryPrimitives.xsd +850 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/gml.xsd +20 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/gmlBase.xsd +185 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/grids.xsd +64 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/measures.xsd +68 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/observation.xsd +95 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/referenceSystems.xsd +70 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/temporal.xsd +269 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/temporalReferenceSystems.xsd +189 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/temporalTopology.xsd +119 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/topology.xsd +386 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/units.xsd +162 -0
- package/namespaces/wfs20/schemas.opengis.net/gml/3.2.1/valueObjects.xsd +205 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gco/basicTypes.xsd +431 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gco/gco.xsd +12 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd +63 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/applicationSchema.xsd +43 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/citation.xsd +276 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/constraints.xsd +107 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/content.xsd +190 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/dataQuality.xsd +556 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/distribution.xsd +203 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/extent.xsd +206 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd +123 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd +12 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/identification.xsd +349 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/maintenance.xsd +87 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/metadataApplication.xsd +176 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/metadataEntity.xsd +71 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/metadataExtension.xsd +100 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/portrayalCatalogue.xsd +37 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/referenceSystem.xsd +101 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gmd/spatialRepresentation.xsd +238 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gsr/gsr.xsd +12 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gsr/spatialReferencing.xsd +25 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gss/geometry.xsd +36 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gss/gss.xsd +12 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gts/gts.xsd +12 -0
- package/namespaces/wfs20/schemas.opengis.net/iso/19139/20070417/gts/temporalObjects.xsd +35 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/ows19115subset.xsd +236 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsAll.xsd +23 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsCommon.xsd +158 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsContents.xsd +87 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsDataIdentification.xsd +128 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsDomainType.xsd +280 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd +77 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsGetCapabilities.xsd +113 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsGetResourceByID.xsd +52 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsInputOutputData.xsd +60 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsManifest.xsd +125 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsOperationsMetadata.xsd +141 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsServiceIdentification.xsd +61 -0
- package/namespaces/wfs20/schemas.opengis.net/ows/1.1.0/owsServiceProvider.xsd +48 -0
- package/namespaces/wfs20/schemas.opengis.net/wfs/2.0/wfs.xsd +786 -0
- package/namespaces/wfs20/www.w3.org/1999/xlink.xsd +270 -0
- package/namespaces/wfs20/www.w3.org/2001/xml.xsd +287 -0
- package/namespaces/wfs20/www.w3.org/2009/01/xml.xsd +286 -0
- package/package.json +52 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { Geometry, GeoJsonProperties, FeatureCollection, Feature } from 'geojson';
|
|
2
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
|
|
4
|
+
type WfsFilter = LogicalFilter | ComparisonFilter | LikeFilter | BetweenFilter | NullFilter | IdFilter | SpatialFilter;
|
|
5
|
+
interface LogicalFilter {
|
|
6
|
+
op: "and" | "or" | "not";
|
|
7
|
+
filters: WfsFilter[];
|
|
8
|
+
}
|
|
9
|
+
interface ComparisonFilter {
|
|
10
|
+
op: "eq" | "neq" | "lt" | "lte" | "gt" | "gte";
|
|
11
|
+
property: string;
|
|
12
|
+
value: unknown;
|
|
13
|
+
matchCase?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface LikeFilter {
|
|
16
|
+
op: "like";
|
|
17
|
+
property: string;
|
|
18
|
+
value: string;
|
|
19
|
+
wildCard?: string;
|
|
20
|
+
singleChar?: string;
|
|
21
|
+
escapeChar?: string;
|
|
22
|
+
matchCase?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface BetweenFilter {
|
|
25
|
+
op: "between";
|
|
26
|
+
property: string;
|
|
27
|
+
lower: unknown;
|
|
28
|
+
upper: unknown;
|
|
29
|
+
}
|
|
30
|
+
interface NullFilter {
|
|
31
|
+
op: "isNull";
|
|
32
|
+
property: string;
|
|
33
|
+
}
|
|
34
|
+
interface IdFilter {
|
|
35
|
+
op: "id";
|
|
36
|
+
ids: string[];
|
|
37
|
+
}
|
|
38
|
+
interface SpatialFilter {
|
|
39
|
+
op: "bbox" | "intersects" | "within" | "contains" | "disjoint" | "touches" | "overlaps" | "crosses";
|
|
40
|
+
property: string;
|
|
41
|
+
geometry: Geometry;
|
|
42
|
+
srsName?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type WfsVersion = "2.0.2" | "2.0.0" | "1.1.0";
|
|
46
|
+
type AxisOrderStrategy = "preserve" | "forceLonLat" | "forceLatLon";
|
|
47
|
+
interface XmlOverride {
|
|
48
|
+
target: string;
|
|
49
|
+
position?: "before" | "after" | "replace";
|
|
50
|
+
xml: string;
|
|
51
|
+
}
|
|
52
|
+
interface RawRequestOptions {
|
|
53
|
+
kvp?: Record<string, string>;
|
|
54
|
+
xmlOverrides?: XmlOverride[];
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
interface GeoServerOptions {
|
|
58
|
+
cqlFilter?: string;
|
|
59
|
+
viewParams?: string;
|
|
60
|
+
formatOptions?: string;
|
|
61
|
+
vendorParams?: Record<string, string>;
|
|
62
|
+
xmlHints?: string[];
|
|
63
|
+
}
|
|
64
|
+
interface WfsClientConfig {
|
|
65
|
+
baseUrl: string;
|
|
66
|
+
axios?: AxiosInstance;
|
|
67
|
+
versionStrategy?: "auto" | WfsVersion;
|
|
68
|
+
axisOrderStrategy?: AxisOrderStrategy;
|
|
69
|
+
defaultHeaders?: Record<string, string>;
|
|
70
|
+
auth?: AxiosRequestConfig["auth"];
|
|
71
|
+
namespaces?: Partial<Record<string, string>>;
|
|
72
|
+
geoserver?: {
|
|
73
|
+
enabled?: boolean;
|
|
74
|
+
defaultVendorParams?: Record<string, string>;
|
|
75
|
+
};
|
|
76
|
+
timeouts?: {
|
|
77
|
+
requestMs?: number;
|
|
78
|
+
};
|
|
79
|
+
endpoints?: Partial<Record<WfsOperation, string>>;
|
|
80
|
+
}
|
|
81
|
+
type WfsOperation = "GetCapabilities" | "DescribeFeatureType" | "GetFeature" | "GetFeatureWithLock" | "GetPropertyValue" | "Transaction" | "LockFeature" | "ListStoredQueries" | "DescribeStoredQueries" | "CreateStoredQuery" | "DropStoredQuery";
|
|
82
|
+
interface BaseOperationOptions {
|
|
83
|
+
version?: WfsVersion;
|
|
84
|
+
requestStyle?: "GET" | "POST";
|
|
85
|
+
outputFormat?: string;
|
|
86
|
+
raw?: RawRequestOptions;
|
|
87
|
+
}
|
|
88
|
+
interface QueryPagingOptions {
|
|
89
|
+
startIndex?: number;
|
|
90
|
+
count?: number;
|
|
91
|
+
resultType?: "results" | "hits";
|
|
92
|
+
}
|
|
93
|
+
interface ResolveOptions {
|
|
94
|
+
resolve?: "local" | "remote" | "all" | "none";
|
|
95
|
+
resolveDepth?: number | "*";
|
|
96
|
+
resolveTimeout?: number;
|
|
97
|
+
}
|
|
98
|
+
interface GetCapabilitiesOptions extends BaseOperationOptions {
|
|
99
|
+
acceptVersions?: WfsVersion[];
|
|
100
|
+
}
|
|
101
|
+
interface DescribeFeatureTypeOptions extends BaseOperationOptions {
|
|
102
|
+
typeNames?: string[];
|
|
103
|
+
}
|
|
104
|
+
interface GetFeatureOptions extends BaseOperationOptions, QueryPagingOptions, ResolveOptions {
|
|
105
|
+
typeNames: string[];
|
|
106
|
+
srsName?: string;
|
|
107
|
+
propertyNames?: string[];
|
|
108
|
+
filter?: WfsFilter;
|
|
109
|
+
bbox?: [number, number, number, number];
|
|
110
|
+
geoserver?: GeoServerOptions;
|
|
111
|
+
}
|
|
112
|
+
interface GetFeatureWithLockOptions extends GetFeatureOptions {
|
|
113
|
+
expiry?: number;
|
|
114
|
+
lockAction?: "ALL" | "SOME";
|
|
115
|
+
}
|
|
116
|
+
interface GetPropertyValueOptions extends BaseOperationOptions, QueryPagingOptions, ResolveOptions {
|
|
117
|
+
typeNames: string[];
|
|
118
|
+
valueReference: string;
|
|
119
|
+
resolvePath?: string;
|
|
120
|
+
filter?: WfsFilter;
|
|
121
|
+
geoserver?: GeoServerOptions;
|
|
122
|
+
}
|
|
123
|
+
interface UpdateProperty {
|
|
124
|
+
name: string;
|
|
125
|
+
value?: unknown;
|
|
126
|
+
action?: "replace" | "insertBefore" | "insertAfter" | "remove";
|
|
127
|
+
}
|
|
128
|
+
interface InsertAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> {
|
|
129
|
+
kind: "insert";
|
|
130
|
+
typeName: string;
|
|
131
|
+
features: Feature<G, P>[];
|
|
132
|
+
geometryPropertyName?: string;
|
|
133
|
+
handle?: string;
|
|
134
|
+
inputFormat?: string;
|
|
135
|
+
srsName?: string;
|
|
136
|
+
}
|
|
137
|
+
interface UpdateAction {
|
|
138
|
+
kind: "update";
|
|
139
|
+
typeName: string;
|
|
140
|
+
properties: UpdateProperty[];
|
|
141
|
+
filter?: WfsFilter;
|
|
142
|
+
handle?: string;
|
|
143
|
+
inputFormat?: string;
|
|
144
|
+
srsName?: string;
|
|
145
|
+
}
|
|
146
|
+
interface ReplaceAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> {
|
|
147
|
+
kind: "replace";
|
|
148
|
+
typeName: string;
|
|
149
|
+
feature: Feature<G, P>;
|
|
150
|
+
geometryPropertyName?: string;
|
|
151
|
+
filter: WfsFilter;
|
|
152
|
+
handle?: string;
|
|
153
|
+
inputFormat?: string;
|
|
154
|
+
srsName?: string;
|
|
155
|
+
}
|
|
156
|
+
interface DeleteAction {
|
|
157
|
+
kind: "delete";
|
|
158
|
+
typeName: string;
|
|
159
|
+
filter: WfsFilter;
|
|
160
|
+
handle?: string;
|
|
161
|
+
}
|
|
162
|
+
interface NativeAction {
|
|
163
|
+
kind: "native";
|
|
164
|
+
vendorId: string;
|
|
165
|
+
safeToIgnore: boolean;
|
|
166
|
+
value?: string;
|
|
167
|
+
anyXml?: string;
|
|
168
|
+
handle?: string;
|
|
169
|
+
}
|
|
170
|
+
type TransactionAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> = InsertAction<G, P> | UpdateAction | ReplaceAction<G, P> | DeleteAction | NativeAction;
|
|
171
|
+
interface TransactionOptions<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> extends BaseOperationOptions {
|
|
172
|
+
actions: TransactionAction<G, P>[];
|
|
173
|
+
lockId?: string;
|
|
174
|
+
releaseAction?: "ALL" | "SOME";
|
|
175
|
+
srsName?: string;
|
|
176
|
+
}
|
|
177
|
+
interface LockFeatureOptions extends BaseOperationOptions {
|
|
178
|
+
typeNames?: string[];
|
|
179
|
+
filter?: WfsFilter;
|
|
180
|
+
lockId?: string;
|
|
181
|
+
expiry?: number;
|
|
182
|
+
lockAction?: "ALL" | "SOME";
|
|
183
|
+
}
|
|
184
|
+
interface ListStoredQueriesOptions extends BaseOperationOptions {
|
|
185
|
+
}
|
|
186
|
+
interface DescribeStoredQueriesOptions extends BaseOperationOptions {
|
|
187
|
+
storedQueryIds?: string[];
|
|
188
|
+
}
|
|
189
|
+
interface StoredQueryParameterDefinition {
|
|
190
|
+
name: string;
|
|
191
|
+
type: string;
|
|
192
|
+
title?: string;
|
|
193
|
+
abstract?: string;
|
|
194
|
+
}
|
|
195
|
+
interface StoredQueryDefinition {
|
|
196
|
+
id: string;
|
|
197
|
+
title?: string;
|
|
198
|
+
abstract?: string;
|
|
199
|
+
parameters?: StoredQueryParameterDefinition[];
|
|
200
|
+
queryExpressionTexts: Array<{
|
|
201
|
+
returnFeatureTypes: string[];
|
|
202
|
+
language: string;
|
|
203
|
+
isPrivate?: boolean;
|
|
204
|
+
xml: string;
|
|
205
|
+
}>;
|
|
206
|
+
}
|
|
207
|
+
interface CreateStoredQueryOptions extends BaseOperationOptions {
|
|
208
|
+
definitions: StoredQueryDefinition[];
|
|
209
|
+
}
|
|
210
|
+
interface DropStoredQueryOptions extends BaseOperationOptions {
|
|
211
|
+
id: string;
|
|
212
|
+
}
|
|
213
|
+
interface CapabilitiesOperationBinding {
|
|
214
|
+
get?: string;
|
|
215
|
+
post?: string;
|
|
216
|
+
}
|
|
217
|
+
type CapabilitiesOperationMap = Partial<Record<WfsOperation, CapabilitiesOperationBinding>>;
|
|
218
|
+
interface ParsedCapabilities {
|
|
219
|
+
serviceIdentification?: {
|
|
220
|
+
title?: string;
|
|
221
|
+
abstract?: string;
|
|
222
|
+
};
|
|
223
|
+
version?: string;
|
|
224
|
+
operations: CapabilitiesOperationMap;
|
|
225
|
+
raw: unknown;
|
|
226
|
+
}
|
|
227
|
+
interface LockResult {
|
|
228
|
+
lockId?: string;
|
|
229
|
+
lockedResourceIds: string[];
|
|
230
|
+
notLockedResourceIds: string[];
|
|
231
|
+
raw: unknown;
|
|
232
|
+
}
|
|
233
|
+
interface ActionResult {
|
|
234
|
+
handle?: string;
|
|
235
|
+
resourceIds: string[];
|
|
236
|
+
}
|
|
237
|
+
interface TransactionResult {
|
|
238
|
+
totalInserted?: number;
|
|
239
|
+
totalUpdated?: number;
|
|
240
|
+
totalReplaced?: number;
|
|
241
|
+
totalDeleted?: number;
|
|
242
|
+
insertResults: ActionResult[];
|
|
243
|
+
updateResults: ActionResult[];
|
|
244
|
+
replaceResults: ActionResult[];
|
|
245
|
+
raw: unknown;
|
|
246
|
+
}
|
|
247
|
+
interface StoredQueryListItem {
|
|
248
|
+
id: string;
|
|
249
|
+
titles: string[];
|
|
250
|
+
returnFeatureTypes: string[];
|
|
251
|
+
}
|
|
252
|
+
interface StoredQueryDescription {
|
|
253
|
+
id: string;
|
|
254
|
+
titles: string[];
|
|
255
|
+
abstracts: string[];
|
|
256
|
+
parameters: Array<{
|
|
257
|
+
name: string;
|
|
258
|
+
type: string;
|
|
259
|
+
}>;
|
|
260
|
+
}
|
|
261
|
+
interface CreateStoredQueryResult {
|
|
262
|
+
status: string;
|
|
263
|
+
raw: unknown;
|
|
264
|
+
}
|
|
265
|
+
interface DropStoredQueryResult {
|
|
266
|
+
status: string;
|
|
267
|
+
raw: unknown;
|
|
268
|
+
}
|
|
269
|
+
interface GetFeatureWithLockResult<G extends Geometry | null = Geometry, P extends GeoJsonProperties = GeoJsonProperties> extends FeatureCollection<G, P> {
|
|
270
|
+
lockId?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class WfsClient {
|
|
274
|
+
private readonly config;
|
|
275
|
+
private readonly transport;
|
|
276
|
+
private negotiatedVersion?;
|
|
277
|
+
private capabilities?;
|
|
278
|
+
constructor(config: WfsClientConfig);
|
|
279
|
+
getCapabilities(options?: GetCapabilitiesOptions): Promise<ParsedCapabilities>;
|
|
280
|
+
describeFeatureType(options: DescribeFeatureTypeOptions): Promise<unknown>;
|
|
281
|
+
getFeature<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: GetFeatureOptions): Promise<FeatureCollection<G, P>>;
|
|
282
|
+
getFeatureWithLock<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: GetFeatureWithLockOptions): Promise<GetFeatureWithLockResult<G, P>>;
|
|
283
|
+
getPropertyValue<T = unknown>(options: GetPropertyValueOptions): Promise<T[]>;
|
|
284
|
+
transaction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: TransactionOptions<G, P>): Promise<TransactionResult>;
|
|
285
|
+
lockFeature(options: LockFeatureOptions): Promise<LockResult>;
|
|
286
|
+
listStoredQueries(options?: ListStoredQueriesOptions): Promise<StoredQueryListItem[]>;
|
|
287
|
+
describeStoredQueries(options?: DescribeStoredQueriesOptions): Promise<StoredQueryDescription[]>;
|
|
288
|
+
createStoredQuery(options: CreateStoredQueryOptions): Promise<CreateStoredQueryResult>;
|
|
289
|
+
dropStoredQuery(options: DropStoredQueryOptions): Promise<DropStoredQueryResult>;
|
|
290
|
+
private resolveVersion;
|
|
291
|
+
private sendOperation;
|
|
292
|
+
private ensureNoError;
|
|
293
|
+
private defaultException;
|
|
294
|
+
private resolveEndpoint;
|
|
295
|
+
private pickBinding;
|
|
296
|
+
private parseFeatureResponse;
|
|
297
|
+
private isOutputFormatException;
|
|
298
|
+
private withGeoServerDefaults;
|
|
299
|
+
private createSerializerContext;
|
|
300
|
+
private resolveValueReference;
|
|
301
|
+
private valueReferencePaths;
|
|
302
|
+
private readPath;
|
|
303
|
+
private localName;
|
|
304
|
+
}
|
|
305
|
+
declare function createWfsClient(config: WfsClientConfig): WfsClient;
|
|
306
|
+
|
|
307
|
+
interface WfsErrorContext {
|
|
308
|
+
operation: WfsOperation;
|
|
309
|
+
version?: WfsVersion;
|
|
310
|
+
url?: string;
|
|
311
|
+
method?: "GET" | "POST";
|
|
312
|
+
status?: number;
|
|
313
|
+
requestId?: string;
|
|
314
|
+
}
|
|
315
|
+
declare class WfsError extends Error {
|
|
316
|
+
readonly context: WfsErrorContext;
|
|
317
|
+
constructor(message: string, context: WfsErrorContext);
|
|
318
|
+
}
|
|
319
|
+
interface OwsException {
|
|
320
|
+
exceptionCode?: string;
|
|
321
|
+
locator?: string;
|
|
322
|
+
text: string;
|
|
323
|
+
}
|
|
324
|
+
declare class OwsExceptionError extends WfsError {
|
|
325
|
+
readonly exceptions: OwsException[];
|
|
326
|
+
readonly rawPayload: unknown;
|
|
327
|
+
constructor(message: string, context: WfsErrorContext, exceptions: OwsException[], rawPayload: unknown);
|
|
328
|
+
}
|
|
329
|
+
declare function isOwsExceptionError(error: unknown): error is OwsExceptionError;
|
|
330
|
+
|
|
331
|
+
interface CompileFilterOptions {
|
|
332
|
+
version: WfsVersion;
|
|
333
|
+
srsName?: string;
|
|
334
|
+
}
|
|
335
|
+
declare function compileFilterXml(filter: WfsFilter, options: CompileFilterOptions): string;
|
|
336
|
+
|
|
337
|
+
export { type ActionResult, type AxisOrderStrategy, type BetweenFilter, type CapabilitiesOperationBinding, type CapabilitiesOperationMap, type ComparisonFilter, type CreateStoredQueryOptions, type CreateStoredQueryResult, type DescribeFeatureTypeOptions, type DescribeStoredQueriesOptions, type DropStoredQueryOptions, type DropStoredQueryResult, type GeoServerOptions, type GetCapabilitiesOptions, type GetFeatureOptions, type GetFeatureWithLockOptions, type GetFeatureWithLockResult, type GetPropertyValueOptions, type IdFilter, type LikeFilter, type ListStoredQueriesOptions, type LockFeatureOptions, type LockResult, type LogicalFilter, type NullFilter, type OwsException, OwsExceptionError, type ParsedCapabilities, type RawRequestOptions, type SpatialFilter, type StoredQueryDefinition, type StoredQueryDescription, type StoredQueryListItem, type TransactionAction, type TransactionOptions, type TransactionResult, type UpdateAction, type UpdateProperty, WfsClient, type WfsClientConfig, WfsClient as WfsClientDefault, WfsError, type WfsFilter, type WfsOperation, type WfsVersion, type XmlOverride, compileFilterXml, createWfsClient, isOwsExceptionError };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { Geometry, GeoJsonProperties, FeatureCollection, Feature } from 'geojson';
|
|
2
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
3
|
+
|
|
4
|
+
type WfsFilter = LogicalFilter | ComparisonFilter | LikeFilter | BetweenFilter | NullFilter | IdFilter | SpatialFilter;
|
|
5
|
+
interface LogicalFilter {
|
|
6
|
+
op: "and" | "or" | "not";
|
|
7
|
+
filters: WfsFilter[];
|
|
8
|
+
}
|
|
9
|
+
interface ComparisonFilter {
|
|
10
|
+
op: "eq" | "neq" | "lt" | "lte" | "gt" | "gte";
|
|
11
|
+
property: string;
|
|
12
|
+
value: unknown;
|
|
13
|
+
matchCase?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface LikeFilter {
|
|
16
|
+
op: "like";
|
|
17
|
+
property: string;
|
|
18
|
+
value: string;
|
|
19
|
+
wildCard?: string;
|
|
20
|
+
singleChar?: string;
|
|
21
|
+
escapeChar?: string;
|
|
22
|
+
matchCase?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface BetweenFilter {
|
|
25
|
+
op: "between";
|
|
26
|
+
property: string;
|
|
27
|
+
lower: unknown;
|
|
28
|
+
upper: unknown;
|
|
29
|
+
}
|
|
30
|
+
interface NullFilter {
|
|
31
|
+
op: "isNull";
|
|
32
|
+
property: string;
|
|
33
|
+
}
|
|
34
|
+
interface IdFilter {
|
|
35
|
+
op: "id";
|
|
36
|
+
ids: string[];
|
|
37
|
+
}
|
|
38
|
+
interface SpatialFilter {
|
|
39
|
+
op: "bbox" | "intersects" | "within" | "contains" | "disjoint" | "touches" | "overlaps" | "crosses";
|
|
40
|
+
property: string;
|
|
41
|
+
geometry: Geometry;
|
|
42
|
+
srsName?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type WfsVersion = "2.0.2" | "2.0.0" | "1.1.0";
|
|
46
|
+
type AxisOrderStrategy = "preserve" | "forceLonLat" | "forceLatLon";
|
|
47
|
+
interface XmlOverride {
|
|
48
|
+
target: string;
|
|
49
|
+
position?: "before" | "after" | "replace";
|
|
50
|
+
xml: string;
|
|
51
|
+
}
|
|
52
|
+
interface RawRequestOptions {
|
|
53
|
+
kvp?: Record<string, string>;
|
|
54
|
+
xmlOverrides?: XmlOverride[];
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
interface GeoServerOptions {
|
|
58
|
+
cqlFilter?: string;
|
|
59
|
+
viewParams?: string;
|
|
60
|
+
formatOptions?: string;
|
|
61
|
+
vendorParams?: Record<string, string>;
|
|
62
|
+
xmlHints?: string[];
|
|
63
|
+
}
|
|
64
|
+
interface WfsClientConfig {
|
|
65
|
+
baseUrl: string;
|
|
66
|
+
axios?: AxiosInstance;
|
|
67
|
+
versionStrategy?: "auto" | WfsVersion;
|
|
68
|
+
axisOrderStrategy?: AxisOrderStrategy;
|
|
69
|
+
defaultHeaders?: Record<string, string>;
|
|
70
|
+
auth?: AxiosRequestConfig["auth"];
|
|
71
|
+
namespaces?: Partial<Record<string, string>>;
|
|
72
|
+
geoserver?: {
|
|
73
|
+
enabled?: boolean;
|
|
74
|
+
defaultVendorParams?: Record<string, string>;
|
|
75
|
+
};
|
|
76
|
+
timeouts?: {
|
|
77
|
+
requestMs?: number;
|
|
78
|
+
};
|
|
79
|
+
endpoints?: Partial<Record<WfsOperation, string>>;
|
|
80
|
+
}
|
|
81
|
+
type WfsOperation = "GetCapabilities" | "DescribeFeatureType" | "GetFeature" | "GetFeatureWithLock" | "GetPropertyValue" | "Transaction" | "LockFeature" | "ListStoredQueries" | "DescribeStoredQueries" | "CreateStoredQuery" | "DropStoredQuery";
|
|
82
|
+
interface BaseOperationOptions {
|
|
83
|
+
version?: WfsVersion;
|
|
84
|
+
requestStyle?: "GET" | "POST";
|
|
85
|
+
outputFormat?: string;
|
|
86
|
+
raw?: RawRequestOptions;
|
|
87
|
+
}
|
|
88
|
+
interface QueryPagingOptions {
|
|
89
|
+
startIndex?: number;
|
|
90
|
+
count?: number;
|
|
91
|
+
resultType?: "results" | "hits";
|
|
92
|
+
}
|
|
93
|
+
interface ResolveOptions {
|
|
94
|
+
resolve?: "local" | "remote" | "all" | "none";
|
|
95
|
+
resolveDepth?: number | "*";
|
|
96
|
+
resolveTimeout?: number;
|
|
97
|
+
}
|
|
98
|
+
interface GetCapabilitiesOptions extends BaseOperationOptions {
|
|
99
|
+
acceptVersions?: WfsVersion[];
|
|
100
|
+
}
|
|
101
|
+
interface DescribeFeatureTypeOptions extends BaseOperationOptions {
|
|
102
|
+
typeNames?: string[];
|
|
103
|
+
}
|
|
104
|
+
interface GetFeatureOptions extends BaseOperationOptions, QueryPagingOptions, ResolveOptions {
|
|
105
|
+
typeNames: string[];
|
|
106
|
+
srsName?: string;
|
|
107
|
+
propertyNames?: string[];
|
|
108
|
+
filter?: WfsFilter;
|
|
109
|
+
bbox?: [number, number, number, number];
|
|
110
|
+
geoserver?: GeoServerOptions;
|
|
111
|
+
}
|
|
112
|
+
interface GetFeatureWithLockOptions extends GetFeatureOptions {
|
|
113
|
+
expiry?: number;
|
|
114
|
+
lockAction?: "ALL" | "SOME";
|
|
115
|
+
}
|
|
116
|
+
interface GetPropertyValueOptions extends BaseOperationOptions, QueryPagingOptions, ResolveOptions {
|
|
117
|
+
typeNames: string[];
|
|
118
|
+
valueReference: string;
|
|
119
|
+
resolvePath?: string;
|
|
120
|
+
filter?: WfsFilter;
|
|
121
|
+
geoserver?: GeoServerOptions;
|
|
122
|
+
}
|
|
123
|
+
interface UpdateProperty {
|
|
124
|
+
name: string;
|
|
125
|
+
value?: unknown;
|
|
126
|
+
action?: "replace" | "insertBefore" | "insertAfter" | "remove";
|
|
127
|
+
}
|
|
128
|
+
interface InsertAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> {
|
|
129
|
+
kind: "insert";
|
|
130
|
+
typeName: string;
|
|
131
|
+
features: Feature<G, P>[];
|
|
132
|
+
geometryPropertyName?: string;
|
|
133
|
+
handle?: string;
|
|
134
|
+
inputFormat?: string;
|
|
135
|
+
srsName?: string;
|
|
136
|
+
}
|
|
137
|
+
interface UpdateAction {
|
|
138
|
+
kind: "update";
|
|
139
|
+
typeName: string;
|
|
140
|
+
properties: UpdateProperty[];
|
|
141
|
+
filter?: WfsFilter;
|
|
142
|
+
handle?: string;
|
|
143
|
+
inputFormat?: string;
|
|
144
|
+
srsName?: string;
|
|
145
|
+
}
|
|
146
|
+
interface ReplaceAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> {
|
|
147
|
+
kind: "replace";
|
|
148
|
+
typeName: string;
|
|
149
|
+
feature: Feature<G, P>;
|
|
150
|
+
geometryPropertyName?: string;
|
|
151
|
+
filter: WfsFilter;
|
|
152
|
+
handle?: string;
|
|
153
|
+
inputFormat?: string;
|
|
154
|
+
srsName?: string;
|
|
155
|
+
}
|
|
156
|
+
interface DeleteAction {
|
|
157
|
+
kind: "delete";
|
|
158
|
+
typeName: string;
|
|
159
|
+
filter: WfsFilter;
|
|
160
|
+
handle?: string;
|
|
161
|
+
}
|
|
162
|
+
interface NativeAction {
|
|
163
|
+
kind: "native";
|
|
164
|
+
vendorId: string;
|
|
165
|
+
safeToIgnore: boolean;
|
|
166
|
+
value?: string;
|
|
167
|
+
anyXml?: string;
|
|
168
|
+
handle?: string;
|
|
169
|
+
}
|
|
170
|
+
type TransactionAction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> = InsertAction<G, P> | UpdateAction | ReplaceAction<G, P> | DeleteAction | NativeAction;
|
|
171
|
+
interface TransactionOptions<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties> extends BaseOperationOptions {
|
|
172
|
+
actions: TransactionAction<G, P>[];
|
|
173
|
+
lockId?: string;
|
|
174
|
+
releaseAction?: "ALL" | "SOME";
|
|
175
|
+
srsName?: string;
|
|
176
|
+
}
|
|
177
|
+
interface LockFeatureOptions extends BaseOperationOptions {
|
|
178
|
+
typeNames?: string[];
|
|
179
|
+
filter?: WfsFilter;
|
|
180
|
+
lockId?: string;
|
|
181
|
+
expiry?: number;
|
|
182
|
+
lockAction?: "ALL" | "SOME";
|
|
183
|
+
}
|
|
184
|
+
interface ListStoredQueriesOptions extends BaseOperationOptions {
|
|
185
|
+
}
|
|
186
|
+
interface DescribeStoredQueriesOptions extends BaseOperationOptions {
|
|
187
|
+
storedQueryIds?: string[];
|
|
188
|
+
}
|
|
189
|
+
interface StoredQueryParameterDefinition {
|
|
190
|
+
name: string;
|
|
191
|
+
type: string;
|
|
192
|
+
title?: string;
|
|
193
|
+
abstract?: string;
|
|
194
|
+
}
|
|
195
|
+
interface StoredQueryDefinition {
|
|
196
|
+
id: string;
|
|
197
|
+
title?: string;
|
|
198
|
+
abstract?: string;
|
|
199
|
+
parameters?: StoredQueryParameterDefinition[];
|
|
200
|
+
queryExpressionTexts: Array<{
|
|
201
|
+
returnFeatureTypes: string[];
|
|
202
|
+
language: string;
|
|
203
|
+
isPrivate?: boolean;
|
|
204
|
+
xml: string;
|
|
205
|
+
}>;
|
|
206
|
+
}
|
|
207
|
+
interface CreateStoredQueryOptions extends BaseOperationOptions {
|
|
208
|
+
definitions: StoredQueryDefinition[];
|
|
209
|
+
}
|
|
210
|
+
interface DropStoredQueryOptions extends BaseOperationOptions {
|
|
211
|
+
id: string;
|
|
212
|
+
}
|
|
213
|
+
interface CapabilitiesOperationBinding {
|
|
214
|
+
get?: string;
|
|
215
|
+
post?: string;
|
|
216
|
+
}
|
|
217
|
+
type CapabilitiesOperationMap = Partial<Record<WfsOperation, CapabilitiesOperationBinding>>;
|
|
218
|
+
interface ParsedCapabilities {
|
|
219
|
+
serviceIdentification?: {
|
|
220
|
+
title?: string;
|
|
221
|
+
abstract?: string;
|
|
222
|
+
};
|
|
223
|
+
version?: string;
|
|
224
|
+
operations: CapabilitiesOperationMap;
|
|
225
|
+
raw: unknown;
|
|
226
|
+
}
|
|
227
|
+
interface LockResult {
|
|
228
|
+
lockId?: string;
|
|
229
|
+
lockedResourceIds: string[];
|
|
230
|
+
notLockedResourceIds: string[];
|
|
231
|
+
raw: unknown;
|
|
232
|
+
}
|
|
233
|
+
interface ActionResult {
|
|
234
|
+
handle?: string;
|
|
235
|
+
resourceIds: string[];
|
|
236
|
+
}
|
|
237
|
+
interface TransactionResult {
|
|
238
|
+
totalInserted?: number;
|
|
239
|
+
totalUpdated?: number;
|
|
240
|
+
totalReplaced?: number;
|
|
241
|
+
totalDeleted?: number;
|
|
242
|
+
insertResults: ActionResult[];
|
|
243
|
+
updateResults: ActionResult[];
|
|
244
|
+
replaceResults: ActionResult[];
|
|
245
|
+
raw: unknown;
|
|
246
|
+
}
|
|
247
|
+
interface StoredQueryListItem {
|
|
248
|
+
id: string;
|
|
249
|
+
titles: string[];
|
|
250
|
+
returnFeatureTypes: string[];
|
|
251
|
+
}
|
|
252
|
+
interface StoredQueryDescription {
|
|
253
|
+
id: string;
|
|
254
|
+
titles: string[];
|
|
255
|
+
abstracts: string[];
|
|
256
|
+
parameters: Array<{
|
|
257
|
+
name: string;
|
|
258
|
+
type: string;
|
|
259
|
+
}>;
|
|
260
|
+
}
|
|
261
|
+
interface CreateStoredQueryResult {
|
|
262
|
+
status: string;
|
|
263
|
+
raw: unknown;
|
|
264
|
+
}
|
|
265
|
+
interface DropStoredQueryResult {
|
|
266
|
+
status: string;
|
|
267
|
+
raw: unknown;
|
|
268
|
+
}
|
|
269
|
+
interface GetFeatureWithLockResult<G extends Geometry | null = Geometry, P extends GeoJsonProperties = GeoJsonProperties> extends FeatureCollection<G, P> {
|
|
270
|
+
lockId?: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare class WfsClient {
|
|
274
|
+
private readonly config;
|
|
275
|
+
private readonly transport;
|
|
276
|
+
private negotiatedVersion?;
|
|
277
|
+
private capabilities?;
|
|
278
|
+
constructor(config: WfsClientConfig);
|
|
279
|
+
getCapabilities(options?: GetCapabilitiesOptions): Promise<ParsedCapabilities>;
|
|
280
|
+
describeFeatureType(options: DescribeFeatureTypeOptions): Promise<unknown>;
|
|
281
|
+
getFeature<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: GetFeatureOptions): Promise<FeatureCollection<G, P>>;
|
|
282
|
+
getFeatureWithLock<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: GetFeatureWithLockOptions): Promise<GetFeatureWithLockResult<G, P>>;
|
|
283
|
+
getPropertyValue<T = unknown>(options: GetPropertyValueOptions): Promise<T[]>;
|
|
284
|
+
transaction<G extends Geometry = Geometry, P extends GeoJsonProperties = GeoJsonProperties>(options: TransactionOptions<G, P>): Promise<TransactionResult>;
|
|
285
|
+
lockFeature(options: LockFeatureOptions): Promise<LockResult>;
|
|
286
|
+
listStoredQueries(options?: ListStoredQueriesOptions): Promise<StoredQueryListItem[]>;
|
|
287
|
+
describeStoredQueries(options?: DescribeStoredQueriesOptions): Promise<StoredQueryDescription[]>;
|
|
288
|
+
createStoredQuery(options: CreateStoredQueryOptions): Promise<CreateStoredQueryResult>;
|
|
289
|
+
dropStoredQuery(options: DropStoredQueryOptions): Promise<DropStoredQueryResult>;
|
|
290
|
+
private resolveVersion;
|
|
291
|
+
private sendOperation;
|
|
292
|
+
private ensureNoError;
|
|
293
|
+
private defaultException;
|
|
294
|
+
private resolveEndpoint;
|
|
295
|
+
private pickBinding;
|
|
296
|
+
private parseFeatureResponse;
|
|
297
|
+
private isOutputFormatException;
|
|
298
|
+
private withGeoServerDefaults;
|
|
299
|
+
private createSerializerContext;
|
|
300
|
+
private resolveValueReference;
|
|
301
|
+
private valueReferencePaths;
|
|
302
|
+
private readPath;
|
|
303
|
+
private localName;
|
|
304
|
+
}
|
|
305
|
+
declare function createWfsClient(config: WfsClientConfig): WfsClient;
|
|
306
|
+
|
|
307
|
+
interface WfsErrorContext {
|
|
308
|
+
operation: WfsOperation;
|
|
309
|
+
version?: WfsVersion;
|
|
310
|
+
url?: string;
|
|
311
|
+
method?: "GET" | "POST";
|
|
312
|
+
status?: number;
|
|
313
|
+
requestId?: string;
|
|
314
|
+
}
|
|
315
|
+
declare class WfsError extends Error {
|
|
316
|
+
readonly context: WfsErrorContext;
|
|
317
|
+
constructor(message: string, context: WfsErrorContext);
|
|
318
|
+
}
|
|
319
|
+
interface OwsException {
|
|
320
|
+
exceptionCode?: string;
|
|
321
|
+
locator?: string;
|
|
322
|
+
text: string;
|
|
323
|
+
}
|
|
324
|
+
declare class OwsExceptionError extends WfsError {
|
|
325
|
+
readonly exceptions: OwsException[];
|
|
326
|
+
readonly rawPayload: unknown;
|
|
327
|
+
constructor(message: string, context: WfsErrorContext, exceptions: OwsException[], rawPayload: unknown);
|
|
328
|
+
}
|
|
329
|
+
declare function isOwsExceptionError(error: unknown): error is OwsExceptionError;
|
|
330
|
+
|
|
331
|
+
interface CompileFilterOptions {
|
|
332
|
+
version: WfsVersion;
|
|
333
|
+
srsName?: string;
|
|
334
|
+
}
|
|
335
|
+
declare function compileFilterXml(filter: WfsFilter, options: CompileFilterOptions): string;
|
|
336
|
+
|
|
337
|
+
export { type ActionResult, type AxisOrderStrategy, type BetweenFilter, type CapabilitiesOperationBinding, type CapabilitiesOperationMap, type ComparisonFilter, type CreateStoredQueryOptions, type CreateStoredQueryResult, type DescribeFeatureTypeOptions, type DescribeStoredQueriesOptions, type DropStoredQueryOptions, type DropStoredQueryResult, type GeoServerOptions, type GetCapabilitiesOptions, type GetFeatureOptions, type GetFeatureWithLockOptions, type GetFeatureWithLockResult, type GetPropertyValueOptions, type IdFilter, type LikeFilter, type ListStoredQueriesOptions, type LockFeatureOptions, type LockResult, type LogicalFilter, type NullFilter, type OwsException, OwsExceptionError, type ParsedCapabilities, type RawRequestOptions, type SpatialFilter, type StoredQueryDefinition, type StoredQueryDescription, type StoredQueryListItem, type TransactionAction, type TransactionOptions, type TransactionResult, type UpdateAction, type UpdateProperty, WfsClient, type WfsClientConfig, WfsClient as WfsClientDefault, WfsError, type WfsFilter, type WfsOperation, type WfsVersion, type XmlOverride, compileFilterXml, createWfsClient, isOwsExceptionError };
|