n_a_types 3.0.2 → 3.0.4

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