n_a_types 3.0.5 → 3.0.7

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.
Files changed (2) hide show
  1. package/V3.ts +120 -112
  2. package/package.json +1 -4
package/V3.ts CHANGED
@@ -1,119 +1,17 @@
1
1
  export const API_VERSION = 3;
2
- export type Section = Guidebook['sections'][number];
3
- export type Area = Section['areas'][number];
4
- export type ClimbImageGroup = Area['climbImageGroups'][number];
5
- export type Climb = Area['climbs'][number];
6
2
  export type Coord = { x: number, y: number };
7
- export type POI = Guidebook['parkingInfo'][number];
8
3
  export type LatLong = { latitude: number, longitude: number }
9
4
  export type TrailPolyline = LatLong[]
10
5
  export type ClimbType = 'TRAD' | 'SPORT' | 'BOULDER' | 'ICE' | 'TOPROPE'
11
6
  export type StarRating = "ONE" | "TWO" | "THREE" | "FOUR";
7
+ export type AreaSwipeDirection = 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT'
12
8
 
13
9
  ///GUIDEBOOK FETCH
14
10
  export type Guidebook = {
15
11
  digitalVersionPublished: boolean,
16
12
  apiVersion: number,
17
13
  images: string[],
18
- sections: ({
19
- areas: ({
20
- climbImageGroups: ({
21
- climbPaths: ({
22
- climb: {
23
- id: number;
24
- areaClimbNumber: number;
25
- climbType: ClimbType | null;
26
- grade: string | null;
27
- } | null;
28
- id: number;
29
- climbId: number | null;
30
- climbImageGroupId: number | null;
31
- climbVariation: number;
32
- climbTopoImageSVGPathCoords: Coord[];
33
- })[];
34
- climbs: {
35
- id: number;
36
- areaClimbNumber: number;
37
- }[];
38
- id: number;
39
- image: string;
40
- areaId: number | null;
41
- areaName: string;
42
- sortOrder: number | null;
43
- anchors: Coord[];
44
- })[];
45
- climbs: ({
46
- primaryClimbImageGroup?: ({
47
- climbPaths: {
48
- id: number;
49
- climbId: number | null;
50
- climbImageGroupId: number | null;
51
- climbVariation: number;
52
- climbTopoImageSVGPathCoords: Coord[];
53
- }[];
54
- id: number;
55
- image: string;
56
- areaId: number | null;
57
- areaName: string;
58
- sortOrder: number | null;
59
- anchors: Coord[];
60
- }),
61
- climbImageGroups: ({
62
- climbPaths: {
63
- id: number;
64
- climbId: number | null;
65
- climbImageGroupId: number | null;
66
- climbVariation: number;
67
- climbTopoImageSVGPathCoords: Coord[];
68
- }[];
69
- id: number;
70
- image: string;
71
- areaId: number | null;
72
- areaName: string;
73
- sortOrder: number | null;
74
- anchors: Coord[];
75
- })[];
76
- id: number;
77
- climbName: string;
78
- areaClimbNumber: number;
79
- description: string | null;
80
- firstAscent: string | null;
81
- height: string | null;
82
- areaId: number | null;
83
- starRating: StarRating | null;
84
- areaName: string;
85
- climbType: ClimbType | null;
86
- grade: string | null;
87
- beta: string | null;
88
- extras: string | null;
89
- descent: string | null;
90
- approach: string | null;
91
- pitches: string | null;
92
- variations: string | null;
93
- protection: string | null;
94
- guidebookId: number | null;
95
- topo3DUrl: string | null;
96
- overviewImageURL: string | null;
97
- })[];
98
- areaName: string;
99
- sectionAreaNumber: number;
100
- sectionName: string;
101
- id: number;
102
- sectionId: number | null;
103
- guidebookId: number;
104
- pano: string;
105
- latitude: number | null;
106
- longitude: number | null;
107
- overview: string | null;
108
- directions: string | null;
109
- approach: string | null;
110
- aspect: string | null;
111
- })[];
112
- sectionName: string;
113
- guidebookId: number | null;
114
- bookSectionNumber: number;
115
- id: number;
116
- })[];
14
+ sections: Section[];
117
15
  id: number;
118
16
  title: string;
119
17
  author: string;
@@ -124,14 +22,124 @@ export type Guidebook = {
124
22
  heroImage: string;
125
23
  state: string;
126
24
  accessTrailPolylines: TrailPolyline[];
127
- parkingInfo: {
128
- id: string;
129
- image: string | null;
130
- description: string;
131
- latitude: number;
132
- longitude: number;
133
- guidebookId: number | null;
134
- }[]
25
+ parkingInfo: POI[]
26
+ }
27
+
28
+ export type Section = {
29
+ areas: Area[];
30
+ sectionName: string;
31
+ guidebookId: number | null;
32
+ bookSectionNumber: number;
33
+ id: number;
34
+ }
35
+
36
+ export type Area = {
37
+ climbImageGroups: ClimbImageGroup[];
38
+ climbs: Climb[];
39
+ areaName: string;
40
+ sectionAreaNumber: number;
41
+ sectionName: string;
42
+ id: number;
43
+ sectionId: number | null;
44
+ guidebookId: number;
45
+ pano: string;
46
+ latitude: number | null;
47
+ longitude: number | null;
48
+ overview: string | null;
49
+ directions: string | null;
50
+ approach: string | null;
51
+ aspect: string | null;
52
+ swipeDirection: AreaSwipeDirection;
53
+ accessClosureDescription: string | null;
54
+ }
55
+
56
+ export type ClimbImageGroup = {
57
+ climbPaths: ({
58
+ climb: {
59
+ id: number;
60
+ areaClimbNumber: number;
61
+ climbType: ClimbType | null;
62
+ grade: string | null;
63
+ } | null;
64
+ id: number;
65
+ climbId: number | null;
66
+ climbImageGroupId: number | null;
67
+ climbVariation: number;
68
+ climbTopoImageSVGPathCoords: Coord[];
69
+ })[];
70
+ climbs: {
71
+ id: number;
72
+ areaClimbNumber: number;
73
+ }[];
74
+ id: number;
75
+ image: string;
76
+ areaId: number | null;
77
+ areaName: string;
78
+ sortOrder: number | null;
79
+ anchors: Coord[];
80
+ }
81
+
82
+ export type Climb = {
83
+ primaryClimbImageGroup?: ({
84
+ climbPaths: {
85
+ id: number;
86
+ climbId: number | null;
87
+ climbImageGroupId: number | null;
88
+ climbVariation: number;
89
+ climbTopoImageSVGPathCoords: Coord[];
90
+ }[];
91
+ id: number;
92
+ image: string;
93
+ areaId: number | null;
94
+ areaName: string;
95
+ sortOrder: number | null;
96
+ anchors: Coord[];
97
+ }),
98
+ climbImageGroups: ({
99
+ climbPaths: {
100
+ id: number;
101
+ climbId: number | null;
102
+ climbImageGroupId: number | null;
103
+ climbVariation: number;
104
+ climbTopoImageSVGPathCoords: Coord[];
105
+ }[];
106
+ id: number;
107
+ image: string;
108
+ areaId: number | null;
109
+ areaName: string;
110
+ sortOrder: number | null;
111
+ anchors: Coord[];
112
+ })[];
113
+ id: number;
114
+ climbName: string;
115
+ areaClimbNumber: number;
116
+ description: string | null;
117
+ firstAscent: string | null;
118
+ height: string | null;
119
+ areaId: number | null;
120
+ starRating: StarRating | null;
121
+ areaName: string;
122
+ climbType: ClimbType | null;
123
+ grade: string | null;
124
+ beta: string | null;
125
+ extras: string | null;
126
+ descent: string | null;
127
+ approach: string | null;
128
+ pitches: string | null;
129
+ variations: string | null;
130
+ protection: string | null;
131
+ guidebookId: number | null;
132
+ topo3DUrl: string | null;
133
+ overviewImageURL: string | null;
134
+ }
135
+
136
+ export type POI = {
137
+ id: string;
138
+ image: string | null;
139
+ description: string;
140
+ latitude: number;
141
+ longitude: number;
142
+ guidebookId: number | null;
135
143
  }
136
144
 
137
145
  ///PRODUCT DATA FETCH
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "n_a_types",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "types",
5
5
  "main": "index.ts",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
6
  "author": "",
10
7
  "license": "ISC"
11
8
  }