n_a_types 3.1.2 → 3.1.3
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 +27 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -326,3 +326,30 @@ export const logInOrSignUpResultSchema = z.object({
|
|
|
326
326
|
});
|
|
327
327
|
|
|
328
328
|
export type LogInOrSignUpResult = z.infer<typeof logInOrSignUpResultSchema>
|
|
329
|
+
|
|
330
|
+
export const commentSchema = z.object({
|
|
331
|
+
id: z.string(),
|
|
332
|
+
body: z.string(),
|
|
333
|
+
userId: z.string().nullable(),
|
|
334
|
+
createdAt: z.string(),
|
|
335
|
+
climbId: z.number(),
|
|
336
|
+
user: z.object({
|
|
337
|
+
id: z.string(),
|
|
338
|
+
publicDisplayName: z.string().nullable(),
|
|
339
|
+
profileImage: z.object({ s3URL: z.string() }).nullable()
|
|
340
|
+
}).nullable()
|
|
341
|
+
})
|
|
342
|
+
export type CommentType = z.infer<typeof commentSchema>
|
|
343
|
+
|
|
344
|
+
const commentCursorSchema = z.object({
|
|
345
|
+
id: z.string(),
|
|
346
|
+
createdAt: z.string(), // parse as string
|
|
347
|
+
})
|
|
348
|
+
export type CommentCursor = z.infer<typeof commentCursorSchema>
|
|
349
|
+
|
|
350
|
+
export const commentFetchSchema = z.object({
|
|
351
|
+
data: z.array(commentSchema),
|
|
352
|
+
nextCursor: commentCursorSchema.nullable()
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
export type commentFetchResponse = z.infer<typeof commentFetchSchema>
|