n_a_types 3.1.0 → 3.1.2

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/index.ts +38 -21
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -65,6 +65,13 @@ export const climbImageGroupClimbPathSchema = climbPathSchema.extend({
65
65
  }).nullable(),
66
66
  });
67
67
 
68
+ export const primaryCIGByIdResponseSchema = z.object({
69
+ imageUrl: z.string(),
70
+ blurhash: z.string().nullable(),
71
+ paths: z.array(climbPathSchema)
72
+ })
73
+ export type PrimaryCIGByIdResponse = z.infer<typeof primaryCIGByIdResponseSchema>
74
+
68
75
  export const climbImageGroupSchema = z.object({
69
76
  climbPaths: z.array(climbImageGroupClimbPathSchema),
70
77
  climbs: z.array(z.object({
@@ -83,7 +90,7 @@ export const climbImageGroupSchema = z.object({
83
90
  export type ClimbImageGroup = z.infer<typeof climbImageGroupSchema>
84
91
 
85
92
 
86
- const poiSchema = z.object({
93
+ export const poiSchema = z.object({
87
94
  id: z.string(),
88
95
  image: z.string().nullable(),
89
96
  description: z.string(),
@@ -94,7 +101,7 @@ const poiSchema = z.object({
94
101
  export type POI = z.infer<typeof poiSchema>
95
102
 
96
103
 
97
- const guidebookProductDataSchema = z.object({
104
+ export const guidebookProductDataSchema = z.object({
98
105
  guidebooks: z.array(z.object({
99
106
  additionalImages: z.array(imageSchema),
100
107
  digitalVersionPublished: z.boolean(),
@@ -167,8 +174,7 @@ export const climbLogSchema = z.object({
167
174
  })
168
175
  export type ClimbLog = z.infer<typeof climbLogSchema>
169
176
 
170
-
171
- const climbSchema = z.object({
177
+ export const climbSchema = z.object({
172
178
  primaryClimbImageGroup: climbLogPrimaryCIGSchema.nullable(),
173
179
  primaryClimbImageGroupid: z.number().nullable(),
174
180
  climbImageGroups: z.array(climbLogPrimaryCIGSchema),
@@ -201,23 +207,13 @@ const climbSchema = z.object({
201
207
  export type Climb = z.infer<typeof climbSchema>
202
208
 
203
209
 
204
- const climbFeedbackSchema = z.object({
205
- climbId: z.number(),
206
- userId: z.string(),
207
- userStarRating: z.number().or(z.null()),
208
- gradeFeedbackTag: gradeFeedbackTagEnum.nullable()
209
- })
210
- export type ClimbFeedback = z.infer<typeof climbFeedbackSchema>
211
-
212
-
213
- export const ClimbFeedbackInputSchema = z.object({
210
+ export const climbFeedbackSchema = z.object({
214
211
  climbId: z.number(),
215
212
  userId: z.string(),
216
213
  userStarRating: z.number().min(0).max(4).nullable(),
217
214
  gradeFeedbackTag: gradeFeedbackTagEnum.nullable()
218
215
  })
219
- export type ClimbFeedbackInput = z.infer<typeof ClimbFeedbackInputSchema>
220
-
216
+ export type ClimbFeedback = z.infer<typeof climbFeedbackSchema>
221
217
 
222
218
  export const climbFeedbackAggregateDataSchema = z.object({
223
219
  climbId: z.number(),
@@ -230,7 +226,7 @@ export const climbFeedbackAggregateDataSchema = z.object({
230
226
  export type ClimbFeedbackAggregateData = z.infer<typeof climbFeedbackAggregateDataSchema>;
231
227
 
232
228
 
233
- const areaSchema = z.object({
229
+ export const areaSchema = z.object({
234
230
  climbImageGroups: z.array(climbImageGroupSchema),
235
231
  climbMapGroups: z.array(climbMapGroupSchema),
236
232
  climbs: z.array(climbSchema),
@@ -256,7 +252,7 @@ const areaSchema = z.object({
256
252
  export type Area = z.infer<typeof areaSchema>
257
253
 
258
254
 
259
- const sectionSchema = z.object({
255
+ export const sectionSchema = z.object({
260
256
  areas: z.array(areaSchema),
261
257
  sectionName: z.string(),
262
258
  guidebookId: z.number().nullable(),
@@ -267,7 +263,7 @@ const sectionSchema = z.object({
267
263
  export type Section = z.infer<typeof sectionSchema>
268
264
 
269
265
 
270
- const mapInfoAreaSchema = z.object({
266
+ export const mapInfoAreaSchema = z.object({
271
267
  id: z.string(),
272
268
  mapLabel: z.string(),
273
269
  infoSheetTitle: z.string(),
@@ -280,7 +276,7 @@ const mapInfoAreaSchema = z.object({
280
276
  export type MapInfoArea = z.infer<typeof mapInfoAreaSchema>
281
277
 
282
278
 
283
- const guidebookSchema = z.object({
279
+ export const guidebookSchema = z.object({
284
280
  digitalVersionPublished: z.boolean(),
285
281
  apiVersion: z.number(),
286
282
  images: z.array(z.string()),
@@ -308,4 +304,25 @@ const guidebookSchema = z.object({
308
304
  longDescription: z.string().nullable(),
309
305
  mapInfoAreas: z.array(mapInfoAreaSchema),
310
306
  })
311
- export type Guidebook = z.infer<typeof guidebookSchema>
307
+ export type Guidebook = z.infer<typeof guidebookSchema>
308
+
309
+
310
+
311
+ export const userProfileDataSchema = z.object({
312
+ homeGym: z.string().nullable(),
313
+ homeCrag: z.string().nullable(),
314
+ publicDisplayName: z.string().nullable(),
315
+ profileImage: z.object({ s3URL: z.string() }).nullable().optional(),
316
+ climbsLoggedCount: z.number(),
317
+ });
318
+
319
+ export type UserProfileData = z.infer<typeof userProfileDataSchema>;
320
+
321
+
322
+ export const logInOrSignUpResultSchema = z.object({
323
+ auth_token: z.string(),
324
+ userId: z.string(),
325
+ publicDisplayName: z.string().nullable()
326
+ });
327
+
328
+ export type LogInOrSignUpResult = z.infer<typeof logInOrSignUpResultSchema>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n_a_types",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "types",
5
5
  "main": "index.ts",
6
6
  "author": "",