n_a_types 3.1.3 → 3.1.5

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 +15 -5
  2. 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(),
@@ -337,19 +334,32 @@ export const commentSchema = z.object({
337
334
  id: z.string(),
338
335
  publicDisplayName: z.string().nullable(),
339
336
  profileImage: z.object({ s3URL: z.string() }).nullable()
340
- }).nullable()
337
+ }).nullable(),
338
+ isDeleted: z.boolean()
341
339
  })
342
340
  export type CommentType = z.infer<typeof commentSchema>
343
341
 
342
+
343
+ export const commentWithChildrenSchema = commentSchema.extend({ children: z.array(commentSchema) });
344
+ export type CommentWithChildren = z.infer<typeof commentWithChildrenSchema>
345
+
346
+
344
347
  const commentCursorSchema = z.object({
345
348
  id: z.string(),
346
349
  createdAt: z.string(), // parse as string
347
350
  })
348
351
  export type CommentCursor = z.infer<typeof commentCursorSchema>
349
352
 
353
+
350
354
  export const commentFetchSchema = z.object({
351
355
  data: z.array(commentSchema),
352
356
  nextCursor: commentCursorSchema.nullable()
353
357
  });
358
+ export type CommentFetchResponse = z.infer<typeof commentFetchSchema>
359
+
354
360
 
355
- export type commentFetchResponse = z.infer<typeof commentFetchSchema>
361
+ export const commentWithChildrenFetchSchema = z.object({
362
+ data: z.array(commentWithChildrenSchema),
363
+ nextCursor: commentCursorSchema.nullable()
364
+ });
365
+ export type CommentWithChildrenFetchResponse = z.infer<typeof commentWithChildrenFetchSchema>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n_a_types",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "description": "types",
5
5
  "main": "index.ts",
6
6
  "author": "",