n_a_types 3.1.3 → 3.1.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.
- package/index.ts +13 -4
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -306,8 +306,6 @@ export const guidebookSchema = z.object({
|
|
|
306
306
|
})
|
|
307
307
|
export type Guidebook = z.infer<typeof guidebookSchema>
|
|
308
308
|
|
|
309
|
-
|
|
310
|
-
|
|
311
309
|
export const userProfileDataSchema = z.object({
|
|
312
310
|
homeGym: z.string().nullable(),
|
|
313
311
|
homeCrag: z.string().nullable(),
|
|
@@ -318,7 +316,6 @@ export const userProfileDataSchema = z.object({
|
|
|
318
316
|
|
|
319
317
|
export type UserProfileData = z.infer<typeof userProfileDataSchema>;
|
|
320
318
|
|
|
321
|
-
|
|
322
319
|
export const logInOrSignUpResultSchema = z.object({
|
|
323
320
|
auth_token: z.string(),
|
|
324
321
|
userId: z.string(),
|
|
@@ -341,15 +338,27 @@ export const commentSchema = z.object({
|
|
|
341
338
|
})
|
|
342
339
|
export type CommentType = z.infer<typeof commentSchema>
|
|
343
340
|
|
|
341
|
+
|
|
342
|
+
export const commentWithChildrenSchema = commentSchema.extend({ children: z.array(commentSchema) });
|
|
343
|
+
export type CommentWithChildren = z.infer<typeof commentWithChildrenSchema>
|
|
344
|
+
|
|
345
|
+
|
|
344
346
|
const commentCursorSchema = z.object({
|
|
345
347
|
id: z.string(),
|
|
346
348
|
createdAt: z.string(), // parse as string
|
|
347
349
|
})
|
|
348
350
|
export type CommentCursor = z.infer<typeof commentCursorSchema>
|
|
349
351
|
|
|
352
|
+
|
|
350
353
|
export const commentFetchSchema = z.object({
|
|
351
354
|
data: z.array(commentSchema),
|
|
352
355
|
nextCursor: commentCursorSchema.nullable()
|
|
353
356
|
});
|
|
357
|
+
export type CommentFetchResponse = z.infer<typeof commentFetchSchema>
|
|
358
|
+
|
|
354
359
|
|
|
355
|
-
export
|
|
360
|
+
export const commentWithChildrenFetchSchema = z.object({
|
|
361
|
+
data: z.array(commentWithChildrenSchema),
|
|
362
|
+
nextCursor: commentCursorSchema.nullable()
|
|
363
|
+
});
|
|
364
|
+
export type CommentWithChildrenFetchResponse = z.infer<typeof commentWithChildrenFetchSchema>
|