@kids-reporter/api-types 0.0.1

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 (41) hide show
  1. package/dist/index.d.ts +9 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +9 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/openapi.d.ts +43 -0
  6. package/dist/openapi.d.ts.map +1 -0
  7. package/dist/openapi.js +50 -0
  8. package/dist/openapi.js.map +1 -0
  9. package/dist/rest.d.ts +57 -0
  10. package/dist/rest.d.ts.map +1 -0
  11. package/dist/rest.js +26 -0
  12. package/dist/rest.js.map +1 -0
  13. package/dist/schemas/content-feed-queries.d.ts +34 -0
  14. package/dist/schemas/content-feed-queries.d.ts.map +1 -0
  15. package/dist/schemas/content-feed-queries.js +21 -0
  16. package/dist/schemas/content-feed-queries.js.map +1 -0
  17. package/dist/schemas/content-feed-responses.d.ts +192 -0
  18. package/dist/schemas/content-feed-responses.d.ts.map +1 -0
  19. package/dist/schemas/content-feed-responses.js +87 -0
  20. package/dist/schemas/content-feed-responses.js.map +1 -0
  21. package/dist/schemas/content-post-detail.d.ts +313 -0
  22. package/dist/schemas/content-post-detail.d.ts.map +1 -0
  23. package/dist/schemas/content-post-detail.js +196 -0
  24. package/dist/schemas/content-post-detail.js.map +1 -0
  25. package/dist/schemas/content.d.ts +438 -0
  26. package/dist/schemas/content.d.ts.map +1 -0
  27. package/dist/schemas/content.js +722 -0
  28. package/dist/schemas/content.js.map +1 -0
  29. package/dist/schemas/extra-openapi-paths.d.ts +53 -0
  30. package/dist/schemas/extra-openapi-paths.d.ts.map +1 -0
  31. package/dist/schemas/extra-openapi-paths.js +674 -0
  32. package/dist/schemas/extra-openapi-paths.js.map +1 -0
  33. package/dist/schemas/member-essay-answers-has-liked.d.ts +16 -0
  34. package/dist/schemas/member-essay-answers-has-liked.d.ts.map +1 -0
  35. package/dist/schemas/member-essay-answers-has-liked.js +30 -0
  36. package/dist/schemas/member-essay-answers-has-liked.js.map +1 -0
  37. package/dist/schemas/qna.d.ts +145 -0
  38. package/dist/schemas/qna.d.ts.map +1 -0
  39. package/dist/schemas/qna.js +632 -0
  40. package/dist/schemas/qna.js.map +1 -0
  41. package/package.json +36 -0
@@ -0,0 +1,632 @@
1
+ import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
2
+ import { z } from 'zod';
3
+ import { RestErrorBodySchema } from '../rest.js';
4
+ import { registry } from './content.js';
5
+ extendZodWithOpenApi(z);
6
+ const QnaMemberAvatarSchema = z.object({
7
+ id: z.string(),
8
+ fileUrl: z.string()
9
+ }).openapi('QnaMemberAvatar');
10
+ const QnaMemberPublicSchema = z.object({
11
+ id: z.string(),
12
+ avatar: QnaMemberAvatarSchema.nullable().optional(),
13
+ nickname: z.string(),
14
+ name: z.string(),
15
+ email: z.string()
16
+ }).openapi('QnaMemberPublic');
17
+ const EssayAnswerPublicItemSchema = z.object({
18
+ id: z.string(),
19
+ createdAt: z.string().optional(),
20
+ question: z.object({
21
+ id: z.string(),
22
+ post: z.object({
23
+ slug: z.string()
24
+ }).optional(),
25
+ title: z.string()
26
+ }).optional(),
27
+ member: QnaMemberPublicSchema.optional(),
28
+ content: z.string(),
29
+ likesCount: z.number().int()
30
+ }).openapi('EssayAnswerPublicItem');
31
+ export const V1AllPostEssayAnswersQuerySchema = z.object({
32
+ take: z.coerce.number().int().min(1).max(100).optional(),
33
+ orderBy: z.enum(['createdAt:desc']).optional().default('createdAt:desc')
34
+ });
35
+ export const V1AllPostEssayAnswersResponseSchema = z.array(EssayAnswerPublicItemSchema);
36
+ registry.registerPath({
37
+ method: 'get',
38
+ path: '/v1/post-essay-answers',
39
+ tags: ['Public Q&A'],
40
+ description: 'Flat `orderBy`: `createdAt:desc` only.',
41
+ request: {
42
+ query: V1AllPostEssayAnswersQuerySchema
43
+ },
44
+ responses: {
45
+ 200: {
46
+ description: 'Success',
47
+ content: {
48
+ 'application/json': {
49
+ schema: V1AllPostEssayAnswersResponseSchema
50
+ }
51
+ }
52
+ },
53
+ 400: {
54
+ description: 'Bad request',
55
+ content: {
56
+ 'application/json': {
57
+ schema: RestErrorBodySchema
58
+ }
59
+ }
60
+ }
61
+ }
62
+ });
63
+ export const V1PostEssayQuestionAnswersParamsSchema = z.object({
64
+ questionId: z.coerce.number().int().positive()
65
+ });
66
+ export const V1PostEssayQuestionAnswersQuerySchema = z.object({
67
+ answerTake: z.coerce.number().int().min(1).max(100),
68
+ answerSkip: z.coerce.number().int().min(0).max(5000).optional(),
69
+ answerOrderBy: z.enum(['createdAt:desc', 'likesCount:desc']).optional().default('createdAt:desc')
70
+ });
71
+ const EssayAnswerThreadItemSchema = z.object({
72
+ id: z.string(),
73
+ content: z.string(),
74
+ member: QnaMemberPublicSchema.optional(),
75
+ likesCount: z.number().int(),
76
+ createdAt: z.string().optional()
77
+ }).openapi('EssayAnswerThreadItem');
78
+ export const V1PostEssayQuestionWithAnswersResponseSchema = z.object({
79
+ id: z.string(),
80
+ title: z.string(),
81
+ hint: z.string(),
82
+ answers: z.array(EssayAnswerThreadItemSchema)
83
+ });
84
+ registry.registerPath({
85
+ method: 'get',
86
+ path: '/v1/post-essay-questions/{questionId}',
87
+ tags: ['Public Q&A'],
88
+ description: 'Question detail with answers thread. Flat `answerOrderBy`: `createdAt:desc` or `likesCount:desc`.',
89
+ request: {
90
+ params: V1PostEssayQuestionAnswersParamsSchema,
91
+ query: V1PostEssayQuestionAnswersQuerySchema
92
+ },
93
+ responses: {
94
+ 200: {
95
+ description: 'Success',
96
+ content: {
97
+ 'application/json': {
98
+ schema: V1PostEssayQuestionWithAnswersResponseSchema
99
+ }
100
+ }
101
+ },
102
+ 400: {
103
+ description: 'Bad request',
104
+ content: {
105
+ 'application/json': {
106
+ schema: RestErrorBodySchema
107
+ }
108
+ }
109
+ },
110
+ 404: {
111
+ description: 'Question not found',
112
+ content: {
113
+ 'application/json': {
114
+ schema: RestErrorBodySchema
115
+ }
116
+ }
117
+ }
118
+ }
119
+ });
120
+ const ChoiceAnswerItemSchema = z.object({
121
+ id: z.string(),
122
+ question: z.object({
123
+ id: z.string()
124
+ }).optional(),
125
+ choiceIndex: z.number().int(),
126
+ correct: z.boolean()
127
+ }).openapi('ChoiceAnswerItem');
128
+ export const V1MemberPostChoiceAnswersQuerySchema = z.object({
129
+ postSlug: z.string().optional()
130
+ });
131
+ export const V1MemberPostChoiceAnswersResponseSchema = z.array(ChoiceAnswerItemSchema);
132
+ registry.registerPath({
133
+ method: 'get',
134
+ path: '/v1/members/me/post-choice-answers',
135
+ tags: ['Member Q&A'],
136
+ description: 'Choice answers for the authenticated member.',
137
+ request: {
138
+ query: V1MemberPostChoiceAnswersQuerySchema
139
+ },
140
+ responses: {
141
+ 200: {
142
+ description: 'Success',
143
+ content: {
144
+ 'application/json': {
145
+ schema: V1MemberPostChoiceAnswersResponseSchema
146
+ }
147
+ }
148
+ },
149
+ 401: {
150
+ description: 'Unauthorized',
151
+ content: {
152
+ 'application/json': {
153
+ schema: RestErrorBodySchema
154
+ }
155
+ }
156
+ },
157
+ 403: {
158
+ description: 'Role not allowed',
159
+ content: {
160
+ 'application/json': {
161
+ schema: RestErrorBodySchema
162
+ }
163
+ }
164
+ },
165
+ 404: {
166
+ description: 'Member not found',
167
+ content: {
168
+ 'application/json': {
169
+ schema: RestErrorBodySchema
170
+ }
171
+ }
172
+ }
173
+ }
174
+ });
175
+ const EssayAnswerMemberItemSchema = z.object({
176
+ id: z.string(),
177
+ question: z.object({
178
+ id: z.string()
179
+ }).optional(),
180
+ content: z.string()
181
+ }).openapi('EssayAnswerMemberItem');
182
+ export const V1MemberPostEssayAnswersQuerySchema = z.object({
183
+ postSlug: z.string().optional()
184
+ });
185
+ export const V1MemberPostEssayAnswersResponseSchema = z.array(EssayAnswerMemberItemSchema);
186
+ registry.registerPath({
187
+ method: 'get',
188
+ path: '/v1/members/me/post-essay-answers',
189
+ tags: ['Member Q&A'],
190
+ description: 'Essay answers for the authenticated member.',
191
+ request: {
192
+ query: V1MemberPostEssayAnswersQuerySchema
193
+ },
194
+ responses: {
195
+ 200: {
196
+ description: 'Success',
197
+ content: {
198
+ 'application/json': {
199
+ schema: V1MemberPostEssayAnswersResponseSchema
200
+ }
201
+ }
202
+ },
203
+ 401: {
204
+ description: 'Unauthorized',
205
+ content: {
206
+ 'application/json': {
207
+ schema: RestErrorBodySchema
208
+ }
209
+ }
210
+ },
211
+ 403: {
212
+ description: 'Role not allowed',
213
+ content: {
214
+ 'application/json': {
215
+ schema: RestErrorBodySchema
216
+ }
217
+ }
218
+ },
219
+ 404: {
220
+ description: 'Member not found',
221
+ content: {
222
+ 'application/json': {
223
+ schema: RestErrorBodySchema
224
+ }
225
+ }
226
+ }
227
+ }
228
+ });
229
+ const connectIdSchema = z.union([z.string(), z.number()]);
230
+
231
+ /** Native REST: `questionId` coerces to numeric id server-side. */
232
+ export const V1CreatePostChoiceAnswerBodySchema = z.object({
233
+ questionId: connectIdSchema,
234
+ choiceIndex: z.number().int()
235
+ });
236
+
237
+ /** PATCH body: `id` is in the URL path. */
238
+ export const V1PatchPostChoiceAnswerBodySchema = z.object({
239
+ choiceIndex: z.number().int().optional()
240
+ });
241
+ export const V1CreatePostEssayAnswerBodySchema = z.object({
242
+ questionId: connectIdSchema,
243
+ content: z.string()
244
+ });
245
+
246
+ /** PATCH body: `id` is in the URL path. */
247
+ export const V1PatchPostEssayAnswerBodySchema = z.object({
248
+ content: z.string()
249
+ });
250
+
251
+ /** Native REST: essay answer id to like (`PostEssayAnswer.id`). */
252
+ export const V1CreatePostEssayAnswerLikeBodySchema = z.object({
253
+ answerId: connectIdSchema
254
+ });
255
+ export const V1CreatePostChoiceAnswerResponseSchema = z.object({
256
+ id: z.string(),
257
+ choiceIndex: z.number().int(),
258
+ correct: z.boolean(),
259
+ question: z.object({
260
+ id: z.string()
261
+ }).optional()
262
+ });
263
+ export const V1UpdatePostChoiceAnswerResponseSchema = z.object({
264
+ id: z.string(),
265
+ choiceIndex: z.number().int(),
266
+ correct: z.boolean()
267
+ });
268
+ export const V1CreatePostEssayAnswerResponseSchema = z.object({
269
+ id: z.string(),
270
+ content: z.string(),
271
+ question: z.object({
272
+ id: z.string()
273
+ }).optional()
274
+ });
275
+ export const V1UpdatePostEssayAnswerResponseSchema = z.object({
276
+ id: z.string(),
277
+ content: z.string()
278
+ });
279
+ export const V1CreatePostEssayAnswerLikeResponseSchema = z.object({
280
+ id: z.string(),
281
+ answer: z.object({
282
+ id: z.string()
283
+ }),
284
+ member: z.object({
285
+ id: z.string()
286
+ })
287
+ });
288
+ export const V1DeletePostEssayAnswerLikeResponseSchema = z.object({
289
+ id: z.string()
290
+ });
291
+ const V1PostChoiceAnswerPathIdSchema = z.object({
292
+ id: z.coerce.number().int().positive()
293
+ });
294
+ const V1PostEssayAnswerPathIdSchema = z.object({
295
+ id: z.coerce.number().int().positive()
296
+ });
297
+
298
+ /** Path `id` for DELETE like (numeric `PostEssayAnswerLike.id`). */
299
+ export const V1PostEssayAnswerLikePathIdSchema = z.object({
300
+ id: z.coerce.number().int().positive()
301
+ });
302
+ registry.registerPath({
303
+ method: 'post',
304
+ path: '/v1/members/me/post-choice-answers',
305
+ tags: ['Member Q&A'],
306
+ description: 'Create a choice answer for the authenticated member.',
307
+ request: {
308
+ body: {
309
+ content: {
310
+ 'application/json': {
311
+ schema: V1CreatePostChoiceAnswerBodySchema
312
+ }
313
+ }
314
+ }
315
+ },
316
+ responses: {
317
+ 200: {
318
+ description: 'Created',
319
+ content: {
320
+ 'application/json': {
321
+ schema: V1CreatePostChoiceAnswerResponseSchema
322
+ }
323
+ }
324
+ },
325
+ 400: {
326
+ description: 'Invalid body',
327
+ content: {
328
+ 'application/json': {
329
+ schema: RestErrorBodySchema
330
+ }
331
+ }
332
+ },
333
+ 401: {
334
+ description: 'Unauthorized',
335
+ content: {
336
+ 'application/json': {
337
+ schema: RestErrorBodySchema
338
+ }
339
+ }
340
+ },
341
+ 403: {
342
+ description: 'Forbidden',
343
+ content: {
344
+ 'application/json': {
345
+ schema: RestErrorBodySchema
346
+ }
347
+ }
348
+ },
349
+ 404: {
350
+ description: 'Member not found',
351
+ content: {
352
+ 'application/json': {
353
+ schema: RestErrorBodySchema
354
+ }
355
+ }
356
+ }
357
+ }
358
+ });
359
+ registry.registerPath({
360
+ method: 'patch',
361
+ path: '/v1/members/me/post-choice-answers/{id}',
362
+ tags: ['Member Q&A'],
363
+ description: 'Update a choice answer for the authenticated member.',
364
+ request: {
365
+ params: V1PostChoiceAnswerPathIdSchema,
366
+ body: {
367
+ content: {
368
+ 'application/json': {
369
+ schema: V1PatchPostChoiceAnswerBodySchema
370
+ }
371
+ }
372
+ }
373
+ },
374
+ responses: {
375
+ 200: {
376
+ description: 'Updated',
377
+ content: {
378
+ 'application/json': {
379
+ schema: V1UpdatePostChoiceAnswerResponseSchema
380
+ }
381
+ }
382
+ },
383
+ 400: {
384
+ description: 'Invalid id or body',
385
+ content: {
386
+ 'application/json': {
387
+ schema: RestErrorBodySchema
388
+ }
389
+ }
390
+ },
391
+ 401: {
392
+ description: 'Unauthorized',
393
+ content: {
394
+ 'application/json': {
395
+ schema: RestErrorBodySchema
396
+ }
397
+ }
398
+ },
399
+ 403: {
400
+ description: 'Not owner or forbidden',
401
+ content: {
402
+ 'application/json': {
403
+ schema: RestErrorBodySchema
404
+ }
405
+ }
406
+ }
407
+ }
408
+ });
409
+ registry.registerPath({
410
+ method: 'post',
411
+ path: '/v1/members/me/post-essay-answers',
412
+ tags: ['Member Q&A'],
413
+ description: 'Create an essay answer for the authenticated member.',
414
+ request: {
415
+ body: {
416
+ content: {
417
+ 'application/json': {
418
+ schema: V1CreatePostEssayAnswerBodySchema
419
+ }
420
+ }
421
+ }
422
+ },
423
+ responses: {
424
+ 200: {
425
+ description: 'Created',
426
+ content: {
427
+ 'application/json': {
428
+ schema: V1CreatePostEssayAnswerResponseSchema
429
+ }
430
+ }
431
+ },
432
+ 400: {
433
+ description: 'Invalid body',
434
+ content: {
435
+ 'application/json': {
436
+ schema: RestErrorBodySchema
437
+ }
438
+ }
439
+ },
440
+ 401: {
441
+ description: 'Unauthorized',
442
+ content: {
443
+ 'application/json': {
444
+ schema: RestErrorBodySchema
445
+ }
446
+ }
447
+ },
448
+ 403: {
449
+ description: 'Forbidden',
450
+ content: {
451
+ 'application/json': {
452
+ schema: RestErrorBodySchema
453
+ }
454
+ }
455
+ },
456
+ 404: {
457
+ description: 'Member not found',
458
+ content: {
459
+ 'application/json': {
460
+ schema: RestErrorBodySchema
461
+ }
462
+ }
463
+ }
464
+ }
465
+ });
466
+ registry.registerPath({
467
+ method: 'patch',
468
+ path: '/v1/members/me/post-essay-answers/{id}',
469
+ tags: ['Member Q&A'],
470
+ description: 'Update an essay answer for the authenticated member.',
471
+ request: {
472
+ params: V1PostEssayAnswerPathIdSchema,
473
+ body: {
474
+ content: {
475
+ 'application/json': {
476
+ schema: V1PatchPostEssayAnswerBodySchema
477
+ }
478
+ }
479
+ }
480
+ },
481
+ responses: {
482
+ 200: {
483
+ description: 'Updated',
484
+ content: {
485
+ 'application/json': {
486
+ schema: V1UpdatePostEssayAnswerResponseSchema
487
+ }
488
+ }
489
+ },
490
+ 400: {
491
+ description: 'Invalid id or content',
492
+ content: {
493
+ 'application/json': {
494
+ schema: RestErrorBodySchema
495
+ }
496
+ }
497
+ },
498
+ 401: {
499
+ description: 'Unauthorized',
500
+ content: {
501
+ 'application/json': {
502
+ schema: RestErrorBodySchema
503
+ }
504
+ }
505
+ },
506
+ 403: {
507
+ description: 'Not owner or forbidden',
508
+ content: {
509
+ 'application/json': {
510
+ schema: RestErrorBodySchema
511
+ }
512
+ }
513
+ }
514
+ }
515
+ });
516
+ registry.registerPath({
517
+ method: 'post',
518
+ path: '/v1/members/me/post-essay-answer-likes',
519
+ tags: ['Member Q&A'],
520
+ description: 'Like an essay answer (increments `likesCount`). Duplicate like returns 409.',
521
+ request: {
522
+ body: {
523
+ content: {
524
+ 'application/json': {
525
+ schema: V1CreatePostEssayAnswerLikeBodySchema
526
+ }
527
+ }
528
+ }
529
+ },
530
+ responses: {
531
+ 200: {
532
+ description: 'Created',
533
+ content: {
534
+ 'application/json': {
535
+ schema: V1CreatePostEssayAnswerLikeResponseSchema
536
+ }
537
+ }
538
+ },
539
+ 400: {
540
+ description: 'Invalid body',
541
+ content: {
542
+ 'application/json': {
543
+ schema: RestErrorBodySchema
544
+ }
545
+ }
546
+ },
547
+ 401: {
548
+ description: 'Unauthorized',
549
+ content: {
550
+ 'application/json': {
551
+ schema: RestErrorBodySchema
552
+ }
553
+ }
554
+ },
555
+ 403: {
556
+ description: 'Forbidden',
557
+ content: {
558
+ 'application/json': {
559
+ schema: RestErrorBodySchema
560
+ }
561
+ }
562
+ },
563
+ 404: {
564
+ description: 'Member not found',
565
+ content: {
566
+ 'application/json': {
567
+ schema: RestErrorBodySchema
568
+ }
569
+ }
570
+ },
571
+ 409: {
572
+ description: 'Already liked (unique key)',
573
+ content: {
574
+ 'application/json': {
575
+ schema: RestErrorBodySchema
576
+ }
577
+ }
578
+ }
579
+ }
580
+ });
581
+ registry.registerPath({
582
+ method: 'delete',
583
+ path: '/v1/members/me/post-essay-answer-likes/{id}',
584
+ tags: ['Member Q&A'],
585
+ description: 'Unlike an essay answer by like row `id`. Decrements `likesCount` on the answer.',
586
+ request: {
587
+ params: V1PostEssayAnswerLikePathIdSchema
588
+ },
589
+ responses: {
590
+ 200: {
591
+ description: 'Deleted',
592
+ content: {
593
+ 'application/json': {
594
+ schema: V1DeletePostEssayAnswerLikeResponseSchema
595
+ }
596
+ }
597
+ },
598
+ 400: {
599
+ description: 'Invalid path id',
600
+ content: {
601
+ 'application/json': {
602
+ schema: RestErrorBodySchema
603
+ }
604
+ }
605
+ },
606
+ 401: {
607
+ description: 'Unauthorized',
608
+ content: {
609
+ 'application/json': {
610
+ schema: RestErrorBodySchema
611
+ }
612
+ }
613
+ },
614
+ 403: {
615
+ description: 'Not owner of this like',
616
+ content: {
617
+ 'application/json': {
618
+ schema: RestErrorBodySchema
619
+ }
620
+ }
621
+ },
622
+ 404: {
623
+ description: 'Like not found',
624
+ content: {
625
+ 'application/json': {
626
+ schema: RestErrorBodySchema
627
+ }
628
+ }
629
+ }
630
+ }
631
+ });
632
+ //# sourceMappingURL=qna.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qna.js","names":["extendZodWithOpenApi","z","RestErrorBodySchema","registry","QnaMemberAvatarSchema","object","id","string","fileUrl","openapi","QnaMemberPublicSchema","avatar","nullable","optional","nickname","name","email","EssayAnswerPublicItemSchema","createdAt","question","post","slug","title","member","content","likesCount","number","int","V1AllPostEssayAnswersQuerySchema","take","coerce","min","max","orderBy","enum","default","V1AllPostEssayAnswersResponseSchema","array","registerPath","method","path","tags","description","request","query","responses","schema","V1PostEssayQuestionAnswersParamsSchema","questionId","positive","V1PostEssayQuestionAnswersQuerySchema","answerTake","answerSkip","answerOrderBy","EssayAnswerThreadItemSchema","V1PostEssayQuestionWithAnswersResponseSchema","hint","answers","params","ChoiceAnswerItemSchema","choiceIndex","correct","boolean","V1MemberPostChoiceAnswersQuerySchema","postSlug","V1MemberPostChoiceAnswersResponseSchema","EssayAnswerMemberItemSchema","V1MemberPostEssayAnswersQuerySchema","V1MemberPostEssayAnswersResponseSchema","connectIdSchema","union","V1CreatePostChoiceAnswerBodySchema","V1PatchPostChoiceAnswerBodySchema","V1CreatePostEssayAnswerBodySchema","V1PatchPostEssayAnswerBodySchema","V1CreatePostEssayAnswerLikeBodySchema","answerId","V1CreatePostChoiceAnswerResponseSchema","V1UpdatePostChoiceAnswerResponseSchema","V1CreatePostEssayAnswerResponseSchema","V1UpdatePostEssayAnswerResponseSchema","V1CreatePostEssayAnswerLikeResponseSchema","answer","V1DeletePostEssayAnswerLikeResponseSchema","V1PostChoiceAnswerPathIdSchema","V1PostEssayAnswerPathIdSchema","V1PostEssayAnswerLikePathIdSchema","body"],"sources":["../../src/schemas/qna.ts"],"sourcesContent":["import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi'\nimport { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\nimport { registry } from './content.js'\n\nextendZodWithOpenApi(z)\n\nconst QnaMemberAvatarSchema = z\n .object({\n id: z.string(),\n fileUrl: z.string(),\n })\n .openapi('QnaMemberAvatar')\n\nconst QnaMemberPublicSchema = z\n .object({\n id: z.string(),\n avatar: QnaMemberAvatarSchema.nullable().optional(),\n nickname: z.string(),\n name: z.string(),\n email: z.string(),\n })\n .openapi('QnaMemberPublic')\n\nconst EssayAnswerPublicItemSchema = z\n .object({\n id: z.string(),\n createdAt: z.string().optional(),\n question: z\n .object({\n id: z.string(),\n post: z.object({ slug: z.string() }).optional(),\n title: z.string(),\n })\n .optional(),\n member: QnaMemberPublicSchema.optional(),\n content: z.string(),\n likesCount: z.number().int(),\n })\n .openapi('EssayAnswerPublicItem')\n\nexport const V1AllPostEssayAnswersQuerySchema = z.object({\n take: z.coerce.number().int().min(1).max(100).optional(),\n orderBy: z.enum(['createdAt:desc']).optional().default('createdAt:desc'),\n})\n\nexport const V1AllPostEssayAnswersResponseSchema = z.array(\n EssayAnswerPublicItemSchema\n)\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/post-essay-answers',\n tags: ['Public Q&A'],\n description: 'Flat `orderBy`: `createdAt:desc` only.',\n request: {\n query: V1AllPostEssayAnswersQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1AllPostEssayAnswersResponseSchema },\n },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nexport const V1PostEssayQuestionAnswersParamsSchema = z.object({\n questionId: z.coerce.number().int().positive(),\n})\n\nexport const V1PostEssayQuestionAnswersQuerySchema = z.object({\n answerTake: z.coerce.number().int().min(1).max(100),\n answerSkip: z.coerce.number().int().min(0).max(5000).optional(),\n answerOrderBy: z\n .enum(['createdAt:desc', 'likesCount:desc'])\n .optional()\n .default('createdAt:desc'),\n})\n\nconst EssayAnswerThreadItemSchema = z\n .object({\n id: z.string(),\n content: z.string(),\n member: QnaMemberPublicSchema.optional(),\n likesCount: z.number().int(),\n createdAt: z.string().optional(),\n })\n .openapi('EssayAnswerThreadItem')\n\nexport const V1PostEssayQuestionWithAnswersResponseSchema = z.object({\n id: z.string(),\n title: z.string(),\n hint: z.string(),\n answers: z.array(EssayAnswerThreadItemSchema),\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/post-essay-questions/{questionId}',\n tags: ['Public Q&A'],\n description:\n 'Question detail with answers thread. Flat `answerOrderBy`: `createdAt:desc` or `likesCount:desc`.',\n request: {\n params: V1PostEssayQuestionAnswersParamsSchema,\n query: V1PostEssayQuestionAnswersQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': {\n schema: V1PostEssayQuestionWithAnswersResponseSchema,\n },\n },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Question not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nconst ChoiceAnswerItemSchema = z\n .object({\n id: z.string(),\n question: z.object({ id: z.string() }).optional(),\n choiceIndex: z.number().int(),\n correct: z.boolean(),\n })\n .openapi('ChoiceAnswerItem')\n\nexport const V1MemberPostChoiceAnswersQuerySchema = z.object({\n postSlug: z.string().optional(),\n})\n\nexport const V1MemberPostChoiceAnswersResponseSchema = z.array(\n ChoiceAnswerItemSchema\n)\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/members/me/post-choice-answers',\n tags: ['Member Q&A'],\n description: 'Choice answers for the authenticated member.',\n request: {\n query: V1MemberPostChoiceAnswersQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1MemberPostChoiceAnswersResponseSchema },\n },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Role not allowed',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nconst EssayAnswerMemberItemSchema = z\n .object({\n id: z.string(),\n question: z.object({ id: z.string() }).optional(),\n content: z.string(),\n })\n .openapi('EssayAnswerMemberItem')\n\nexport const V1MemberPostEssayAnswersQuerySchema = z.object({\n postSlug: z.string().optional(),\n})\n\nexport const V1MemberPostEssayAnswersResponseSchema = z.array(\n EssayAnswerMemberItemSchema\n)\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/members/me/post-essay-answers',\n tags: ['Member Q&A'],\n description: 'Essay answers for the authenticated member.',\n request: {\n query: V1MemberPostEssayAnswersQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1MemberPostEssayAnswersResponseSchema },\n },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Role not allowed',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nconst connectIdSchema = z.union([z.string(), z.number()])\n\n/** Native REST: `questionId` coerces to numeric id server-side. */\nexport const V1CreatePostChoiceAnswerBodySchema = z.object({\n questionId: connectIdSchema,\n choiceIndex: z.number().int(),\n})\n\n/** PATCH body: `id` is in the URL path. */\nexport const V1PatchPostChoiceAnswerBodySchema = z.object({\n choiceIndex: z.number().int().optional(),\n})\n\nexport const V1CreatePostEssayAnswerBodySchema = z.object({\n questionId: connectIdSchema,\n content: z.string(),\n})\n\n/** PATCH body: `id` is in the URL path. */\nexport const V1PatchPostEssayAnswerBodySchema = z.object({\n content: z.string(),\n})\n\n/** Native REST: essay answer id to like (`PostEssayAnswer.id`). */\nexport const V1CreatePostEssayAnswerLikeBodySchema = z.object({\n answerId: connectIdSchema,\n})\n\nexport const V1CreatePostChoiceAnswerResponseSchema = z.object({\n id: z.string(),\n choiceIndex: z.number().int(),\n correct: z.boolean(),\n question: z.object({ id: z.string() }).optional(),\n})\n\nexport const V1UpdatePostChoiceAnswerResponseSchema = z.object({\n id: z.string(),\n choiceIndex: z.number().int(),\n correct: z.boolean(),\n})\n\nexport const V1CreatePostEssayAnswerResponseSchema = z.object({\n id: z.string(),\n content: z.string(),\n question: z.object({ id: z.string() }).optional(),\n})\n\nexport const V1UpdatePostEssayAnswerResponseSchema = z.object({\n id: z.string(),\n content: z.string(),\n})\n\nexport const V1CreatePostEssayAnswerLikeResponseSchema = z.object({\n id: z.string(),\n answer: z.object({ id: z.string() }),\n member: z.object({ id: z.string() }),\n})\n\nexport const V1DeletePostEssayAnswerLikeResponseSchema = z.object({\n id: z.string(),\n})\n\nconst V1PostChoiceAnswerPathIdSchema = z.object({\n id: z.coerce.number().int().positive(),\n})\n\nconst V1PostEssayAnswerPathIdSchema = z.object({\n id: z.coerce.number().int().positive(),\n})\n\n/** Path `id` for DELETE like (numeric `PostEssayAnswerLike.id`). */\nexport const V1PostEssayAnswerLikePathIdSchema = z.object({\n id: z.coerce.number().int().positive(),\n})\n\nregistry.registerPath({\n method: 'post',\n path: '/v1/members/me/post-choice-answers',\n tags: ['Member Q&A'],\n description: 'Create a choice answer for the authenticated member.',\n request: {\n body: {\n content: {\n 'application/json': { schema: V1CreatePostChoiceAnswerBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Created',\n content: {\n 'application/json': { schema: V1CreatePostChoiceAnswerResponseSchema },\n },\n },\n 400: {\n description: 'Invalid body',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Forbidden',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'patch',\n path: '/v1/members/me/post-choice-answers/{id}',\n tags: ['Member Q&A'],\n description: 'Update a choice answer for the authenticated member.',\n request: {\n params: V1PostChoiceAnswerPathIdSchema,\n body: {\n content: {\n 'application/json': { schema: V1PatchPostChoiceAnswerBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Updated',\n content: {\n 'application/json': { schema: V1UpdatePostChoiceAnswerResponseSchema },\n },\n },\n 400: {\n description: 'Invalid id or body',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Not owner or forbidden',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'post',\n path: '/v1/members/me/post-essay-answers',\n tags: ['Member Q&A'],\n description: 'Create an essay answer for the authenticated member.',\n request: {\n body: {\n content: {\n 'application/json': { schema: V1CreatePostEssayAnswerBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Created',\n content: {\n 'application/json': { schema: V1CreatePostEssayAnswerResponseSchema },\n },\n },\n 400: {\n description: 'Invalid body',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Forbidden',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'patch',\n path: '/v1/members/me/post-essay-answers/{id}',\n tags: ['Member Q&A'],\n description: 'Update an essay answer for the authenticated member.',\n request: {\n params: V1PostEssayAnswerPathIdSchema,\n body: {\n content: {\n 'application/json': { schema: V1PatchPostEssayAnswerBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Updated',\n content: {\n 'application/json': { schema: V1UpdatePostEssayAnswerResponseSchema },\n },\n },\n 400: {\n description: 'Invalid id or content',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Not owner or forbidden',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'post',\n path: '/v1/members/me/post-essay-answer-likes',\n tags: ['Member Q&A'],\n description:\n 'Like an essay answer (increments `likesCount`). Duplicate like returns 409.',\n request: {\n body: {\n content: {\n 'application/json': { schema: V1CreatePostEssayAnswerLikeBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Created',\n content: {\n 'application/json': {\n schema: V1CreatePostEssayAnswerLikeResponseSchema,\n },\n },\n },\n 400: {\n description: 'Invalid body',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Forbidden',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 409: {\n description: 'Already liked (unique key)',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'delete',\n path: '/v1/members/me/post-essay-answer-likes/{id}',\n tags: ['Member Q&A'],\n description:\n 'Unlike an essay answer by like row `id`. Decrements `likesCount` on the answer.',\n request: {\n params: V1PostEssayAnswerLikePathIdSchema,\n },\n responses: {\n 200: {\n description: 'Deleted',\n content: {\n 'application/json': {\n schema: V1DeletePostEssayAnswerLikeResponseSchema,\n },\n },\n },\n 400: {\n description: 'Invalid path id',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 401: {\n description: 'Unauthorized',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Not owner of this like',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Like not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,gCAAg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