n_a_types 3.1.1 → 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.
- package/index.ts +30 -13
- 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({
|
|
@@ -167,7 +174,6 @@ export const climbLogSchema = z.object({
|
|
|
167
174
|
})
|
|
168
175
|
export type ClimbLog = z.infer<typeof climbLogSchema>
|
|
169
176
|
|
|
170
|
-
|
|
171
177
|
export const climbSchema = z.object({
|
|
172
178
|
primaryClimbImageGroup: climbLogPrimaryCIGSchema.nullable(),
|
|
173
179
|
primaryClimbImageGroupid: z.number().nullable(),
|
|
@@ -202,22 +208,12 @@ export type Climb = z.infer<typeof climbSchema>
|
|
|
202
208
|
|
|
203
209
|
|
|
204
210
|
export 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({
|
|
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
|
|
220
|
-
|
|
216
|
+
export type ClimbFeedback = z.infer<typeof climbFeedbackSchema>
|
|
221
217
|
|
|
222
218
|
export const climbFeedbackAggregateDataSchema = z.object({
|
|
223
219
|
climbId: z.number(),
|
|
@@ -308,4 +304,25 @@ export 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>
|