forked from camptocamp/ogc-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.ts
More file actions
95 lines (83 loc) · 2.07 KB
/
models.ts
File metadata and controls
95 lines (83 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* Expressed as minx, miny, maxx, maxy
*/
export type BoundingBox = [number, number, number, number];
export type CrsCode = string;
export interface Address {
deliveryPoint?: string;
city?: string;
administrativeArea?: string;
postalCode?: string;
country?: string;
}
export interface Contact {
name?: string;
organization?: string;
position?: string;
phone?: string;
fax?: string;
address?: Address;
email?: string;
}
export interface Provider {
name?: string;
site?: string;
contact?: Contact;
}
export type GenericEndpointInfo = {
name: string;
title: string;
abstract: string;
fees: string;
constraints: string;
keywords: string[];
provider?: Provider;
/**
* Can contain the list of outputFormats from a WFS GetCapabilities,
* or the list of 'Formats' from a WMS GetCapabilities
*/
outputFormats?: MimeType[];
/**
* Contains a list of formats that can be used for WMS GetFeatureInfo,
* or undefined for other services such as WFS
*/
infoFormats?: MimeType[];
/**
* Contains a list of formats that can be used for Exceptions for WMS GetMap,
* or undefined for other services such as WFS
*/
exceptionFormats?: MimeType[] | string[];
};
export type MimeType = string;
export interface FetchOptions {
headers?: Record<string, string>;
mode?: 'same-origin' | 'cors' | 'no-cors';
credentials?: 'same-origin' | 'include' | 'omit';
redirect?: 'follow' | 'error';
referrer?: string;
integrity?: string;
}
export type OperationName = string;
export type HttpMethod = 'Get' | 'Post';
export type OperationUrl = Partial<Record<HttpMethod, string>>;
export interface LayerStyle {
name: string;
title: string;
abstract?: string;
/**
* May not be defined; a GetLegendGraphic operation should work in any case
*/
legendUrl?: string;
}
export type MetadataURL = {
format?: string;
type?: string;
url: string;
};
export type FieldName = string;
export type FieldSort = ['D' | 'A', FieldName];
export type DateTimeParameter =
| Date
| { start: Date }
| { end: Date }
| { start: Date; end: Date };