n_a_types 3.0.5 → 3.0.6

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 +119 -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,123 @@ 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
+ }
54
+
55
+ export type ClimbImageGroup = {
56
+ climbPaths: ({
57
+ climb: {
58
+ id: number;
59
+ areaClimbNumber: number;
60
+ climbType: ClimbType | null;
61
+ grade: string | null;
62
+ } | null;
63
+ id: number;
64
+ climbId: number | null;
65
+ climbImageGroupId: number | null;
66
+ climbVariation: number;
67
+ climbTopoImageSVGPathCoords: Coord[];
68
+ })[];
69
+ climbs: {
70
+ id: number;
71
+ areaClimbNumber: number;
72
+ }[];
73
+ id: number;
74
+ image: string;
75
+ areaId: number | null;
76
+ areaName: string;
77
+ sortOrder: number | null;
78
+ anchors: Coord[];
79
+ }
80
+
81
+ export type Climb = {
82
+ primaryClimbImageGroup?: ({
83
+ climbPaths: {
84
+ id: number;
85
+ climbId: number | null;
86
+ climbImageGroupId: number | null;
87
+ climbVariation: number;
88
+ climbTopoImageSVGPathCoords: Coord[];
89
+ }[];
90
+ id: number;
91
+ image: string;
92
+ areaId: number | null;
93
+ areaName: string;
94
+ sortOrder: number | null;
95
+ anchors: Coord[];
96
+ }),
97
+ climbImageGroups: ({
98
+ climbPaths: {
99
+ id: number;
100
+ climbId: number | null;
101
+ climbImageGroupId: number | null;
102
+ climbVariation: number;
103
+ climbTopoImageSVGPathCoords: Coord[];
104
+ }[];
105
+ id: number;
106
+ image: string;
107
+ areaId: number | null;
108
+ areaName: string;
109
+ sortOrder: number | null;
110
+ anchors: Coord[];
111
+ })[];
112
+ id: number;
113
+ climbName: string;
114
+ areaClimbNumber: number;
115
+ description: string | null;
116
+ firstAscent: string | null;
117
+ height: string | null;
118
+ areaId: number | null;
119
+ starRating: StarRating | null;
120
+ areaName: string;
121
+ climbType: ClimbType | null;
122
+ grade: string | null;
123
+ beta: string | null;
124
+ extras: string | null;
125
+ descent: string | null;
126
+ approach: string | null;
127
+ pitches: string | null;
128
+ variations: string | null;
129
+ protection: string | null;
130
+ guidebookId: number | null;
131
+ topo3DUrl: string | null;
132
+ overviewImageURL: string | null;
133
+ }
134
+
135
+ export type POI = {
136
+ id: string;
137
+ image: string | null;
138
+ description: string;
139
+ latitude: number;
140
+ longitude: number;
141
+ guidebookId: number | null;
135
142
  }
136
143
 
137
144
  ///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.6",
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
  }