zwift-data 1.9.0 → 1.10.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.
@@ -1,2 +1,2 @@
1
- import { Achievements } from "./types";
2
- export declare const achievements: ReadonlyArray<Achievements>;
1
+ import { Achievement } from "./types";
2
+ export declare const achievements: ReadonlyArray<Achievement>;
@@ -84,9 +84,17 @@ export interface Route {
84
84
  */
85
85
  experience?: number;
86
86
  /**
87
- * Official segments on the route sorted by appearance. Segments are listed multiple times if they are ridden multiple times.
87
+ * Segments on the route. Segments are listed only listed once if they appear multiple times.
88
88
  */
89
89
  segments: ReadonlyArray<string>;
90
+ /**
91
+ * Segments on the route sorted by appearance including exact position. Segments may occur multiple times if they are ridden multiple times.
92
+ */
93
+ segmentsOnRoute: ReadonlyArray<{
94
+ from: number;
95
+ to: number;
96
+ segment: string;
97
+ }>;
90
98
  /**
91
99
  * Id of the corresponding strava segment
92
100
  */
@@ -241,7 +249,7 @@ export interface Headgear {
241
249
  name: string;
242
250
  imageName: string;
243
251
  }
244
- export interface Achievements {
252
+ export interface Achievement {
245
253
  id: number;
246
254
  name: string;
247
255
  imageName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zwift-data",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "Data about Zwift worlds, routes and segments",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -31,6 +31,7 @@
31
31
  "@semantic-release/changelog": "5.0.1",
32
32
  "@semantic-release/git": "9.0.0",
33
33
  "@tsconfig/recommended": "1.0.1",
34
+ "@turf/turf": "6.5.0",
34
35
  "@types/jest": "26.0.23",
35
36
  "@types/node": "15.6.1",
36
37
  "jest": "27.0.3",