@mapcreator/api 0.0.0-wms.0 → 0.0.0-wms.1
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/cjs/api/insetMap.js +1 -1
- package/cjs/api/insetMap.js.map +1 -1
- package/cjs/api/job.d.ts +1 -0
- package/cjs/api/job.d.ts.map +1 -1
- package/cjs/api/job.js.map +1 -1
- package/cjs/api/jobResult.d.ts +1 -1
- package/cjs/api/jobResult.d.ts.map +1 -1
- package/cjs/api/jobResult.js +1 -1
- package/cjs/api/jobResult.js.map +1 -1
- package/cjs/api/jobRevision.d.ts +2 -2
- package/cjs/api/jobRevision.d.ts.map +1 -1
- package/cjs/api/jobRevision.js +1 -1
- package/cjs/api/jobRevision.js.map +1 -1
- package/cjs/api/organisation.d.ts +2 -1
- package/cjs/api/organisation.d.ts.map +1 -1
- package/cjs/api/organisation.js +1 -2
- package/cjs/api/organisation.js.map +1 -1
- package/cjs/api/resources.d.ts +1 -1
- package/cjs/api/resources.d.ts.map +1 -1
- package/cjs/api/resources.js.map +1 -1
- package/esm/api/insetMap.js +1 -1
- package/esm/api/insetMap.js.map +1 -1
- package/esm/api/job.d.ts +1 -0
- package/esm/api/job.d.ts.map +1 -1
- package/esm/api/job.js.map +1 -1
- package/esm/api/jobResult.d.ts +1 -1
- package/esm/api/jobResult.d.ts.map +1 -1
- package/esm/api/jobResult.js +1 -1
- package/esm/api/jobResult.js.map +1 -1
- package/esm/api/jobRevision.d.ts +2 -2
- package/esm/api/jobRevision.d.ts.map +1 -1
- package/esm/api/jobRevision.js +1 -1
- package/esm/api/jobRevision.js.map +1 -1
- package/esm/api/organisation.d.ts +2 -1
- package/esm/api/organisation.d.ts.map +1 -1
- package/esm/api/organisation.js +1 -2
- package/esm/api/organisation.js.map +1 -1
- package/esm/api/resources.d.ts +1 -1
- package/esm/api/resources.d.ts.map +1 -1
- package/esm/api/resources.js.map +1 -1
- package/package.json +1 -1
- package/src/api/apiCommon.ts +70 -70
- package/src/api/choropleth.ts +359 -359
- package/src/api/color.ts +22 -22
- package/src/api/dimension.ts +44 -44
- package/src/api/dimensionSet.ts +20 -20
- package/src/api/feature.ts +22 -22
- package/src/api/font.ts +49 -49
- package/src/api/fontFamily.ts +43 -43
- package/src/api/highlight.ts +87 -87
- package/src/api/insetMap.ts +96 -96
- package/src/api/job.ts +130 -129
- package/src/api/jobResult.ts +95 -95
- package/src/api/jobRevision.ts +279 -278
- package/src/api/jobShare.ts +35 -35
- package/src/api/jobType.ts +26 -26
- package/src/api/language.ts +19 -19
- package/src/api/layer.ts +38 -38
- package/src/api/layerFaq.ts +53 -53
- package/src/api/layerGroup.ts +69 -69
- package/src/api/mapstyleSet.ts +48 -48
- package/src/api/message.ts +80 -80
- package/src/api/organisation.ts +95 -95
- package/src/api/resources.ts +146 -144
- package/src/api/svg.ts +33 -33
- package/src/api/svgSet.ts +56 -56
- package/src/api/user.ts +327 -327
- package/src/index.ts +43 -43
- package/src/oauth.ts +314 -314
- package/src/utils.ts +342 -342
package/src/api/svg.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { type ApiCommonData, type ApiError, type ApiSuccess, type Flatten, type Revivers, request } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export type Svg = {
|
|
4
|
-
id: number;
|
|
5
|
-
svgSetId: number;
|
|
6
|
-
name: string;
|
|
7
|
-
string: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type ApiSvg = {
|
|
11
|
-
data: {
|
|
12
|
-
id: number; // The id of the svg (sortable)
|
|
13
|
-
svg_set_id: number; // The id of the svg_set related to this svg
|
|
14
|
-
name: string; // The name of the svg (searchable, sortable)
|
|
15
|
-
string: string; // The XML of the svg
|
|
16
|
-
resize_factor: number; // The number of the resize for svg (searchable, sortable)
|
|
17
|
-
order: number; // The order in which this svg appears in the set (sortable)
|
|
18
|
-
} & ApiCommonData;
|
|
19
|
-
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
20
|
-
|
|
21
|
-
export type ApiSvgData = Flatten<Exclude<ApiSvg, ApiError>['data']>;
|
|
22
|
-
|
|
23
|
-
export const svgRevivers: Revivers<ApiSvg, Svg> = {
|
|
24
|
-
resize_factor: undefined,
|
|
25
|
-
order: undefined,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export async function getSvg(svgId: number): Promise<Svg> {
|
|
29
|
-
const path = `/v1/svgs/${svgId}`;
|
|
30
|
-
const options = { revivers: svgRevivers };
|
|
31
|
-
|
|
32
|
-
return request<ApiSvg, Svg>(path, null, null, options);
|
|
33
|
-
}
|
|
1
|
+
import { type ApiCommonData, type ApiError, type ApiSuccess, type Flatten, type Revivers, request } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export type Svg = {
|
|
4
|
+
id: number;
|
|
5
|
+
svgSetId: number;
|
|
6
|
+
name: string;
|
|
7
|
+
string: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type ApiSvg = {
|
|
11
|
+
data: {
|
|
12
|
+
id: number; // The id of the svg (sortable)
|
|
13
|
+
svg_set_id: number; // The id of the svg_set related to this svg
|
|
14
|
+
name: string; // The name of the svg (searchable, sortable)
|
|
15
|
+
string: string; // The XML of the svg
|
|
16
|
+
resize_factor: number; // The number of the resize for svg (searchable, sortable)
|
|
17
|
+
order: number; // The order in which this svg appears in the set (sortable)
|
|
18
|
+
} & ApiCommonData;
|
|
19
|
+
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
20
|
+
|
|
21
|
+
export type ApiSvgData = Flatten<Exclude<ApiSvg, ApiError>['data']>;
|
|
22
|
+
|
|
23
|
+
export const svgRevivers: Revivers<ApiSvg, Svg> = {
|
|
24
|
+
resize_factor: undefined,
|
|
25
|
+
order: undefined,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export async function getSvg(svgId: number): Promise<Svg> {
|
|
29
|
+
const path = `/v1/svgs/${svgId}`;
|
|
30
|
+
const options = { revivers: svgRevivers };
|
|
31
|
+
|
|
32
|
+
return request<ApiSvg, Svg>(path, null, null, options);
|
|
33
|
+
}
|
package/src/api/svgSet.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { type ApiSvgData, type Svg, svgRevivers } from './svg.js';
|
|
2
|
-
import {
|
|
3
|
-
type ApiCommonData,
|
|
4
|
-
type ApiError,
|
|
5
|
-
type ApiSuccess,
|
|
6
|
-
type Flatten,
|
|
7
|
-
type Revivers,
|
|
8
|
-
defaultListHeader,
|
|
9
|
-
getSearchParams,
|
|
10
|
-
request,
|
|
11
|
-
} from '../utils.js';
|
|
12
|
-
|
|
13
|
-
export type SvgSet = {
|
|
14
|
-
id: number;
|
|
15
|
-
name: string;
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type ApiSvgSet = {
|
|
20
|
-
data: {
|
|
21
|
-
id: number; // The id of the set (searchable, sortable)
|
|
22
|
-
name: string; // The name of the set (searchable, sortable)
|
|
23
|
-
type: string; // The type of the svg set (searchable, sortable)
|
|
24
|
-
supports_interactive: boolean; // If the set is interactive (searchable, sortable)
|
|
25
|
-
supports_mapcreator: boolean; // If this set can be used on Mapcreator (searchable, sortable)
|
|
26
|
-
supports_v3: boolean; // If this set can be used on v3 (searchable, sortable)
|
|
27
|
-
order?: number; // TODO: not present in API specification!
|
|
28
|
-
} & ApiCommonData;
|
|
29
|
-
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
30
|
-
|
|
31
|
-
export type ApiSvgSetData = Flatten<Exclude<ApiSvgSet, ApiError>['data']>;
|
|
32
|
-
|
|
33
|
-
export const svgSetRevivers: Revivers<ApiSvgSet, SvgSet> = {
|
|
34
|
-
supports_interactive: undefined,
|
|
35
|
-
supports_mapcreator: undefined,
|
|
36
|
-
supports_v3: undefined,
|
|
37
|
-
order: undefined,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export async function listSvgSetSvgs(svgSetId: number): Promise<Svg[]> {
|
|
41
|
-
const pathname = `/v1/svgs/sets/${svgSetId}/items`;
|
|
42
|
-
const query = getSearchParams({
|
|
43
|
-
search: {
|
|
44
|
-
supports_mapcreator: '1',
|
|
45
|
-
},
|
|
46
|
-
sort: 'order,id',
|
|
47
|
-
});
|
|
48
|
-
const path = `${pathname}?${query}`;
|
|
49
|
-
const options = { revivers: svgRevivers };
|
|
50
|
-
|
|
51
|
-
type ApiSvgArray = {
|
|
52
|
-
data: ApiSvgData[];
|
|
53
|
-
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
54
|
-
|
|
55
|
-
return request<ApiSvgArray, Svg>(path, null, defaultListHeader, options);
|
|
56
|
-
}
|
|
1
|
+
import { type ApiSvgData, type Svg, svgRevivers } from './svg.js';
|
|
2
|
+
import {
|
|
3
|
+
type ApiCommonData,
|
|
4
|
+
type ApiError,
|
|
5
|
+
type ApiSuccess,
|
|
6
|
+
type Flatten,
|
|
7
|
+
type Revivers,
|
|
8
|
+
defaultListHeader,
|
|
9
|
+
getSearchParams,
|
|
10
|
+
request,
|
|
11
|
+
} from '../utils.js';
|
|
12
|
+
|
|
13
|
+
export type SvgSet = {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ApiSvgSet = {
|
|
20
|
+
data: {
|
|
21
|
+
id: number; // The id of the set (searchable, sortable)
|
|
22
|
+
name: string; // The name of the set (searchable, sortable)
|
|
23
|
+
type: string; // The type of the svg set (searchable, sortable)
|
|
24
|
+
supports_interactive: boolean; // If the set is interactive (searchable, sortable)
|
|
25
|
+
supports_mapcreator: boolean; // If this set can be used on Mapcreator (searchable, sortable)
|
|
26
|
+
supports_v3: boolean; // If this set can be used on v3 (searchable, sortable)
|
|
27
|
+
order?: number; // TODO: not present in API specification!
|
|
28
|
+
} & ApiCommonData;
|
|
29
|
+
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
30
|
+
|
|
31
|
+
export type ApiSvgSetData = Flatten<Exclude<ApiSvgSet, ApiError>['data']>;
|
|
32
|
+
|
|
33
|
+
export const svgSetRevivers: Revivers<ApiSvgSet, SvgSet> = {
|
|
34
|
+
supports_interactive: undefined,
|
|
35
|
+
supports_mapcreator: undefined,
|
|
36
|
+
supports_v3: undefined,
|
|
37
|
+
order: undefined,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export async function listSvgSetSvgs(svgSetId: number): Promise<Svg[]> {
|
|
41
|
+
const pathname = `/v1/svgs/sets/${svgSetId}/items`;
|
|
42
|
+
const query = getSearchParams({
|
|
43
|
+
search: {
|
|
44
|
+
supports_mapcreator: '1',
|
|
45
|
+
},
|
|
46
|
+
sort: 'order,id',
|
|
47
|
+
});
|
|
48
|
+
const path = `${pathname}?${query}`;
|
|
49
|
+
const options = { revivers: svgRevivers };
|
|
50
|
+
|
|
51
|
+
type ApiSvgArray = {
|
|
52
|
+
data: ApiSvgData[];
|
|
53
|
+
} & Omit<ApiSuccess, 'data'> | ApiError;
|
|
54
|
+
|
|
55
|
+
return request<ApiSvgArray, Svg>(path, null, defaultListHeader, options);
|
|
56
|
+
}
|