openskidata-format 13.0.0 → 14.0.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/dist/SkiPass.d.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  import { Source } from './Source';
2
- /**
3
- * Stable identifier for a ski pass, e.g. "ikon".
4
- */
2
+ /** Stable identifier for a purchasable ski pass, e.g. "ikon-base". */
5
3
  export type SkiPassID = string;
4
+ /** Stable identifier for a family of related ski passes, e.g. "ikon". */
5
+ export type SkiPassBrandID = string;
6
6
  /**
7
- * A ski area's membership of one tier of one ski pass.
7
+ * A ski area's membership of one purchasable ski pass.
8
8
  *
9
9
  * @property {SkiPassID} passID - Identifier of the ski pass.
10
10
  * @property {string} passName - Display name of the ski pass.
11
- * @property {string | null} tier - Tier within the pass, e.g. "base" or "session". Null for the pass's standard tier.
11
+ * @property {SkiPassBrandID | null} brandID - Identifier of the pass's brand, or null for a standalone pass.
12
+ * @property {string | null} brandName - Display name of the pass's brand, or null for a standalone pass.
12
13
  * @property {string | null} access - Access code, copied verbatim from the source, e.g. "5, 26, 27" or "U". The source documents these per pass in free text, so they are not parsed.
13
14
  * @property {number | null} yearJoined - Year the ski area joined this pass, when the source records it.
14
15
  * @property {Source[]} sources - Data sources.
@@ -16,11 +17,25 @@ export type SkiPassID = string;
16
17
  export type SkiPassMembership = {
17
18
  passID: SkiPassID;
18
19
  passName: string;
19
- tier: string | null;
20
+ brandID: SkiPassBrandID | null;
21
+ brandName: string | null;
20
22
  access: string | null;
21
23
  yearJoined: number | null;
22
24
  sources: Source[];
23
25
  };
26
+ /**
27
+ * A family of related ski passes, used to group the purchasable passes in a catalogue.
28
+ *
29
+ * @property {SkiPassBrandID} id - Stable identifier for the brand.
30
+ * @property {string} name - Display name of the brand.
31
+ * @property {Source[]} sources - Data sources shared by the brand's passes.
32
+ */
33
+ export type SkiPassBrand = {
34
+ type: 'skiPassBrand';
35
+ id: SkiPassBrandID;
36
+ name: string;
37
+ sources: Source[];
38
+ };
24
39
  /**
25
40
  * A multi-resort season pass.
26
41
  *
@@ -30,6 +45,8 @@ export type SkiPassMembership = {
30
45
  *
31
46
  * @property {SkiPassID} id - Unique identifier for the ski pass. Unlike a ski area ID, this is stable across runs.
32
47
  * @property {string} name - Name of the ski pass.
48
+ * @property {SkiPassBrandID | null} brandID - Identifier of the pass's brand, or null for a standalone pass.
49
+ * @property {string | null} brandName - Display name of the pass's brand, or null for a standalone pass.
33
50
  * @property {Source[]} sources - Data sources.
34
51
  * @property {number} skiAreaCount - Number of ski areas this pass covers. Equal to the length of skiAreaIDs.
35
52
  * @property {string[]} skiAreaIDs - IDs of the ski areas this pass covers, sorted, so that the order does not depend on anything outside this array.
@@ -39,11 +56,18 @@ export type SkiPass = {
39
56
  type: 'skiPass';
40
57
  id: SkiPassID;
41
58
  name: string;
59
+ brandID: SkiPassBrandID | null;
60
+ brandName: string | null;
42
61
  sources: Source[];
43
62
  skiAreaCount: number;
44
63
  skiAreaIDs: string[];
45
64
  unresolvedRosterEntries: SkiPassUnresolvedRosterEntry[];
46
65
  };
66
+ /** The complete non-geographic ski-pass dataset published alongside the ski-area data. */
67
+ export type SkiPassCatalog = {
68
+ brands: SkiPassBrand[];
69
+ passes: SkiPass[];
70
+ };
47
71
  /**
48
72
  * A ski area listed on a pass by the source, which has no corresponding ski area feature.
49
73
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openskidata-format",
3
- "version": "13.0.0",
3
+ "version": "14.0.0",
4
4
  "description": "Data format for OpenSkiMap.org",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/SkiPass.ts CHANGED
@@ -1,16 +1,18 @@
1
1
  import { Source } from './Source'
2
2
 
3
- /**
4
- * Stable identifier for a ski pass, e.g. "ikon".
5
- */
3
+ /** Stable identifier for a purchasable ski pass, e.g. "ikon-base". */
6
4
  export type SkiPassID = string
7
5
 
6
+ /** Stable identifier for a family of related ski passes, e.g. "ikon". */
7
+ export type SkiPassBrandID = string
8
+
8
9
  /**
9
- * A ski area's membership of one tier of one ski pass.
10
+ * A ski area's membership of one purchasable ski pass.
10
11
  *
11
12
  * @property {SkiPassID} passID - Identifier of the ski pass.
12
13
  * @property {string} passName - Display name of the ski pass.
13
- * @property {string | null} tier - Tier within the pass, e.g. "base" or "session". Null for the pass's standard tier.
14
+ * @property {SkiPassBrandID | null} brandID - Identifier of the pass's brand, or null for a standalone pass.
15
+ * @property {string | null} brandName - Display name of the pass's brand, or null for a standalone pass.
14
16
  * @property {string | null} access - Access code, copied verbatim from the source, e.g. "5, 26, 27" or "U". The source documents these per pass in free text, so they are not parsed.
15
17
  * @property {number | null} yearJoined - Year the ski area joined this pass, when the source records it.
16
18
  * @property {Source[]} sources - Data sources.
@@ -18,12 +20,27 @@ export type SkiPassID = string
18
20
  export type SkiPassMembership = {
19
21
  passID: SkiPassID
20
22
  passName: string
21
- tier: string | null
23
+ brandID: SkiPassBrandID | null
24
+ brandName: string | null
22
25
  access: string | null
23
26
  yearJoined: number | null
24
27
  sources: Source[]
25
28
  }
26
29
 
30
+ /**
31
+ * A family of related ski passes, used to group the purchasable passes in a catalogue.
32
+ *
33
+ * @property {SkiPassBrandID} id - Stable identifier for the brand.
34
+ * @property {string} name - Display name of the brand.
35
+ * @property {Source[]} sources - Data sources shared by the brand's passes.
36
+ */
37
+ export type SkiPassBrand = {
38
+ type: 'skiPassBrand'
39
+ id: SkiPassBrandID
40
+ name: string
41
+ sources: Source[]
42
+ }
43
+
27
44
  /**
28
45
  * A multi-resort season pass.
29
46
  *
@@ -33,6 +50,8 @@ export type SkiPassMembership = {
33
50
  *
34
51
  * @property {SkiPassID} id - Unique identifier for the ski pass. Unlike a ski area ID, this is stable across runs.
35
52
  * @property {string} name - Name of the ski pass.
53
+ * @property {SkiPassBrandID | null} brandID - Identifier of the pass's brand, or null for a standalone pass.
54
+ * @property {string | null} brandName - Display name of the pass's brand, or null for a standalone pass.
36
55
  * @property {Source[]} sources - Data sources.
37
56
  * @property {number} skiAreaCount - Number of ski areas this pass covers. Equal to the length of skiAreaIDs.
38
57
  * @property {string[]} skiAreaIDs - IDs of the ski areas this pass covers, sorted, so that the order does not depend on anything outside this array.
@@ -42,12 +61,20 @@ export type SkiPass = {
42
61
  type: 'skiPass'
43
62
  id: SkiPassID
44
63
  name: string
64
+ brandID: SkiPassBrandID | null
65
+ brandName: string | null
45
66
  sources: Source[]
46
67
  skiAreaCount: number
47
68
  skiAreaIDs: string[]
48
69
  unresolvedRosterEntries: SkiPassUnresolvedRosterEntry[]
49
70
  }
50
71
 
72
+ /** The complete non-geographic ski-pass dataset published alongside the ski-area data. */
73
+ export type SkiPassCatalog = {
74
+ brands: SkiPassBrand[]
75
+ passes: SkiPass[]
76
+ }
77
+
51
78
  /**
52
79
  * A ski area listed on a pass by the source, which has no corresponding ski area feature.
53
80
  *