@kids-reporter/api-types 0.0.2 → 0.0.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.
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Request variable types (path params, query strings, bodies, client composites).
3
+ * Inferred from Zod schemas — single source of truth for api/ and content-api layers.
4
+ */
5
+ import type { z } from 'zod';
6
+ import { V1AuthorAvatarPathParamsSchema, V1CallBaodaozaiIntroPathParamsSchema, V1EditorPicksSettingsQuerySchema, V1MemberPostsWithAnswersQuerySchema, V1PostBySlugPathParamsSchema, V1PostBySlugQuerySchema, V1PostsEssayAnswersWithLikesQuerySchema, V1PostsQuerySchema, V1ProjectsQuerySchema, V1SitemapsQuerySchema } from './schemas/content.js';
7
+ import { V1AuthorBySlugPostsQuerySchema, V1CategoryBySlugMetadataQuerySchema, V1CategoryPostsQuerySchema, V1FeedSlugPathParamsSchema, V1SubSubcategoryBySlugPostsQuerySchema, V1TagBySlugPostsQuerySchema } from './schemas/content-feed-queries.js';
8
+ import { V1EssayAnswersHasLikedQuerySchema } from './schemas/member-essay-answers-has-liked.js';
9
+ import { V1AllPostEssayAnswersQuerySchema, V1CreatePostChoiceAnswerBodySchema, V1CreatePostEssayAnswerBodySchema, V1CreatePostEssayAnswerLikeBodySchema, V1MemberPostChoiceAnswersQuerySchema, V1MemberPostEssayAnswersQuerySchema, V1PatchPostChoiceAnswerBodySchema, V1PatchPostEssayAnswerBodySchema, V1PostChoiceAnswerPathIdSchema, V1PostEssayAnswerLikePathIdSchema, V1PostEssayAnswerPathIdSchema, V1PostEssayQuestionAnswersParamsSchema, V1PostEssayQuestionAnswersQuerySchema } from './schemas/qna.js';
10
+ import type { V1MemberProfilePatchBody } from './shared-types.js';
11
+ export type V1PostsQuery = z.infer<typeof V1PostsQuerySchema>;
12
+ export type V1PostBySlugPathParams = z.infer<typeof V1PostBySlugPathParamsSchema>;
13
+ export type V1PostBySlugQuery = z.infer<typeof V1PostBySlugQuerySchema>;
14
+ export type V1PostsEssayAnswersWithLikesQuery = z.infer<typeof V1PostsEssayAnswersWithLikesQuerySchema>;
15
+ export type V1SitemapsQuery = z.infer<typeof V1SitemapsQuerySchema>;
16
+ export type V1ProjectsQuery = z.infer<typeof V1ProjectsQuerySchema>;
17
+ export type V1EditorPicksSettingsQuery = z.infer<typeof V1EditorPicksSettingsQuerySchema>;
18
+ export type V1MemberPostsWithAnswersQuery = z.infer<typeof V1MemberPostsWithAnswersQuerySchema>;
19
+ export type { V1MemberProfilePatchBody };
20
+ export type V1AuthorAvatarPathParams = z.infer<typeof V1AuthorAvatarPathParamsSchema>;
21
+ export type V1CallBaodaozaiIntroPathParams = z.infer<typeof V1CallBaodaozaiIntroPathParamsSchema>;
22
+ export declare const V1PostBySlugRequestSchema: z.ZodObject<{
23
+ slug: z.ZodString;
24
+ take: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
25
+ postEssayQuestionsTake: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
26
+ postChoiceQuestionsTake: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
27
+ }, z.core.$strip>;
28
+ export type V1PostBySlugRequest = z.infer<typeof V1PostBySlugRequestSchema>;
29
+ export type V1PostMetaBySlugRequest = Pick<V1PostBySlugRequest, 'slug'>;
30
+ export type V1FeedSlugPathParams = z.infer<typeof V1FeedSlugPathParamsSchema>;
31
+ export type V1CategoryPostsQuery = z.infer<typeof V1CategoryPostsQuerySchema>;
32
+ export type V1CategoryBySlugMetadataQuery = z.infer<typeof V1CategoryBySlugMetadataQuerySchema>;
33
+ export type V1SubSubcategoryBySlugPostsQuery = z.infer<typeof V1SubSubcategoryBySlugPostsQuerySchema>;
34
+ export type V1TagBySlugPostsQuery = z.infer<typeof V1TagBySlugPostsQuerySchema>;
35
+ export type V1AuthorBySlugPostsQuery = z.infer<typeof V1AuthorBySlugPostsQuerySchema>;
36
+ export declare const V1CategoryPostsRequestSchema: z.ZodObject<{
37
+ slug: z.ZodString;
38
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
39
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
40
+ }, z.core.$strip>;
41
+ export type V1CategoryPostsRequest = z.infer<typeof V1CategoryPostsRequestSchema>;
42
+ export declare const V1CategoryMetadataRequestSchema: z.ZodObject<{
43
+ slug: z.ZodString;
44
+ subcategorySlug: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strip>;
46
+ export type V1CategoryMetadataRequest = z.infer<typeof V1CategoryMetadataRequestSchema>;
47
+ export declare const V1CategorySubcategoriesThemeRequestSchema: z.ZodObject<{
48
+ slug: z.ZodString;
49
+ }, z.core.$strip>;
50
+ export type V1CategorySubcategoriesThemeRequest = z.infer<typeof V1CategorySubcategoriesThemeRequestSchema>;
51
+ export declare const V1SubcategoryPostsRequestSchema: z.ZodObject<{
52
+ slug: z.ZodString;
53
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
54
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
55
+ }, z.core.$strip>;
56
+ export type V1SubcategoryPostsRequest = z.infer<typeof V1SubcategoryPostsRequestSchema>;
57
+ export declare const V1SubSubcategoryPostsRequestSchema: z.ZodObject<{
58
+ slug: z.ZodString;
59
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
60
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
61
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
62
+ "publishedDate:desc": "publishedDate:desc";
63
+ }>>>;
64
+ }, z.core.$strip>;
65
+ export type V1SubSubcategoryPostsRequest = z.infer<typeof V1SubSubcategoryPostsRequestSchema>;
66
+ export declare const V1TagPostsRequestSchema: z.ZodObject<{
67
+ slug: z.ZodString;
68
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
69
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
70
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
71
+ "publishedDate:desc": "publishedDate:desc";
72
+ }>>>;
73
+ }, z.core.$strip>;
74
+ export type V1TagPostsRequest = z.infer<typeof V1TagPostsRequestSchema>;
75
+ export declare const V1AuthorPostsRequestSchema: z.ZodObject<{
76
+ slug: z.ZodString;
77
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
78
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
79
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
80
+ "publishedDate:desc": "publishedDate:desc";
81
+ }>>>;
82
+ }, z.core.$strip>;
83
+ export type V1AuthorPostsRequest = z.infer<typeof V1AuthorPostsRequestSchema>;
84
+ export declare const V1AuthorMetaRequestSchema: z.ZodObject<{
85
+ slug: z.ZodString;
86
+ }, z.core.$strip>;
87
+ export type V1AuthorMetaRequest = z.infer<typeof V1AuthorMetaRequestSchema>;
88
+ export declare const V1TagMetaRequestSchema: z.ZodObject<{
89
+ slug: z.ZodString;
90
+ }, z.core.$strip>;
91
+ export type V1TagMetaRequest = z.infer<typeof V1TagMetaRequestSchema>;
92
+ export declare const V1ProjectBySlugRequestSchema: z.ZodObject<{
93
+ slug: z.ZodString;
94
+ }, z.core.$strip>;
95
+ export type V1ProjectBySlugRequest = z.infer<typeof V1ProjectBySlugRequestSchema>;
96
+ export type V1AllPostEssayAnswersQuery = z.infer<typeof V1AllPostEssayAnswersQuerySchema>;
97
+ export type V1PostEssayQuestionAnswersParams = z.infer<typeof V1PostEssayQuestionAnswersParamsSchema>;
98
+ export type V1PostEssayQuestionAnswersQuery = z.infer<typeof V1PostEssayQuestionAnswersQuerySchema>;
99
+ export declare const V1PostEssayQuestionAnswersRequestSchema: z.ZodObject<{
100
+ questionId: z.ZodCoercedNumber<unknown>;
101
+ answerTake: z.ZodCoercedNumber<unknown>;
102
+ answerSkip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
103
+ answerOrderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
104
+ "likesCount:desc": "likesCount:desc";
105
+ "createdAt:desc": "createdAt:desc";
106
+ }>>>;
107
+ }, z.core.$strip>;
108
+ export type V1PostEssayQuestionAnswersRequest = z.infer<typeof V1PostEssayQuestionAnswersRequestSchema>;
109
+ export type V1MemberPostChoiceAnswersQuery = z.infer<typeof V1MemberPostChoiceAnswersQuerySchema>;
110
+ export type V1MemberPostEssayAnswersQuery = z.infer<typeof V1MemberPostEssayAnswersQuerySchema>;
111
+ export type V1CreatePostChoiceAnswerBody = z.infer<typeof V1CreatePostChoiceAnswerBodySchema>;
112
+ export type V1PatchPostChoiceAnswerBody = z.infer<typeof V1PatchPostChoiceAnswerBodySchema>;
113
+ export type V1CreatePostEssayAnswerBody = z.infer<typeof V1CreatePostEssayAnswerBodySchema>;
114
+ export type V1PatchPostEssayAnswerBody = z.infer<typeof V1PatchPostEssayAnswerBodySchema>;
115
+ export type V1CreatePostEssayAnswerLikeBody = z.infer<typeof V1CreatePostEssayAnswerLikeBodySchema>;
116
+ export type V1PostChoiceAnswerPathId = z.infer<typeof V1PostChoiceAnswerPathIdSchema>;
117
+ export type V1PostEssayAnswerPathId = z.infer<typeof V1PostEssayAnswerPathIdSchema>;
118
+ export type V1PostEssayAnswerLikePathId = z.infer<typeof V1PostEssayAnswerLikePathIdSchema>;
119
+ export type V1EssayAnswersHasLikedQuery = z.infer<typeof V1EssayAnswersHasLikedQuerySchema>;
120
+ //# sourceMappingURL=api-variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-variables.d.ts","sourceRoot":"","sources":["../src/api-variables.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,OAAO,EACL,8BAA8B,EAC9B,oCAAoC,EACpC,gCAAgC,EAChC,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,EACvB,uCAAuC,EACvC,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EAC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AO,uCAAuC,CAC/C,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAA;AACD,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAA;AACD,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,qCAAqC,CAC7C,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA;AAID,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Request variable types (path params, query strings, bodies, client composites).
3
+ * Inferred from Zod schemas — single source of truth for api/ and content-api layers.
4
+ */
5
+
6
+ import { V1PostBySlugPathParamsSchema, V1PostBySlugQuerySchema } from './schemas/content.js';
7
+ import { V1AuthorBySlugPostsQuerySchema, V1CategoryBySlugMetadataQuerySchema, V1CategoryPostsQuerySchema, V1FeedSlugPathParamsSchema, V1SubSubcategoryBySlugPostsQuerySchema, V1TagBySlugPostsQuerySchema } from './schemas/content-feed-queries.js';
8
+ import { V1PostEssayQuestionAnswersParamsSchema, V1PostEssayQuestionAnswersQuerySchema } from './schemas/qna.js';
9
+
10
+ // --- Posts / content ---
11
+
12
+ export const V1PostBySlugRequestSchema = V1PostBySlugPathParamsSchema.merge(V1PostBySlugQuerySchema);
13
+
14
+ // --- Feeds ---
15
+
16
+ export const V1CategoryPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(V1CategoryPostsQuerySchema);
17
+ export const V1CategoryMetadataRequestSchema = V1FeedSlugPathParamsSchema.merge(V1CategoryBySlugMetadataQuerySchema);
18
+ export const V1CategorySubcategoriesThemeRequestSchema = V1FeedSlugPathParamsSchema;
19
+ export const V1SubcategoryPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(V1CategoryPostsQuerySchema);
20
+ export const V1SubSubcategoryPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(V1SubSubcategoryBySlugPostsQuerySchema);
21
+ export const V1TagPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(V1TagBySlugPostsQuerySchema);
22
+ export const V1AuthorPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(V1AuthorBySlugPostsQuerySchema);
23
+ export const V1AuthorMetaRequestSchema = V1FeedSlugPathParamsSchema;
24
+ export const V1TagMetaRequestSchema = V1FeedSlugPathParamsSchema;
25
+ export const V1ProjectBySlugRequestSchema = V1FeedSlugPathParamsSchema;
26
+
27
+ // --- QnA ---
28
+
29
+ export const V1PostEssayQuestionAnswersRequestSchema = V1PostEssayQuestionAnswersParamsSchema.merge(V1PostEssayQuestionAnswersQuerySchema);
30
+
31
+ // --- Member activity ---
32
+ //# sourceMappingURL=api-variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-variables.js","names":["V1PostBySlugPathParamsSchema","V1PostBySlugQuerySchema","V1AuthorBySlugPostsQuerySchema","V1CategoryBySlugMetadataQuerySchema","V1CategoryPostsQuerySchema","V1FeedSlugPathParamsSchema","V1SubSubcategoryBySlugPostsQuerySchema","V1TagBySlugPostsQuerySchema","V1PostEssayQuestionAnswersParamsSchema","V1PostEssayQuestionAnswersQuerySchema","V1PostBySlugRequestSchema","merge","V1CategoryPostsRequestSchema","V1CategoryMetadataRequestSchema","V1CategorySubcategoriesThemeRequestSchema","V1SubcategoryPostsRequestSchema","V1SubSubcategoryPostsRequestSchema","V1TagPostsRequestSchema","V1AuthorPostsRequestSchema","V1AuthorMetaRequestSchema","V1TagMetaRequestSchema","V1ProjectBySlugRequestSchema","V1PostEssayQuestionAnswersRequestSchema"],"sources":["../src/api-variables.ts"],"sourcesContent":["/**\n * Request variable types (path params, query strings, bodies, client composites).\n * Inferred from Zod schemas — single source of truth for api/ and content-api layers.\n */\nimport type { z } from 'zod'\n\nimport {\n V1AuthorAvatarPathParamsSchema,\n V1CallBaodaozaiIntroPathParamsSchema,\n V1EditorPicksSettingsQuerySchema,\n V1MemberPostsWithAnswersQuerySchema,\n V1PostBySlugPathParamsSchema,\n V1PostBySlugQuerySchema,\n V1PostsEssayAnswersWithLikesQuerySchema,\n V1PostsQuerySchema,\n V1ProjectsQuerySchema,\n V1SitemapsQuerySchema,\n} from './schemas/content.js'\nimport {\n V1AuthorBySlugPostsQuerySchema,\n V1CategoryBySlugMetadataQuerySchema,\n V1CategoryPostsQuerySchema,\n V1FeedSlugPathParamsSchema,\n V1SubSubcategoryBySlugPostsQuerySchema,\n V1TagBySlugPostsQuerySchema,\n} from './schemas/content-feed-queries.js'\nimport { V1EssayAnswersHasLikedQuerySchema } from './schemas/member-essay-answers-has-liked.js'\nimport {\n V1AllPostEssayAnswersQuerySchema,\n V1CreatePostChoiceAnswerBodySchema,\n V1CreatePostEssayAnswerBodySchema,\n V1CreatePostEssayAnswerLikeBodySchema,\n V1MemberPostChoiceAnswersQuerySchema,\n V1MemberPostEssayAnswersQuerySchema,\n V1PatchPostChoiceAnswerBodySchema,\n V1PatchPostEssayAnswerBodySchema,\n V1PostChoiceAnswerPathIdSchema,\n V1PostEssayAnswerLikePathIdSchema,\n V1PostEssayAnswerPathIdSchema,\n V1PostEssayQuestionAnswersParamsSchema,\n V1PostEssayQuestionAnswersQuerySchema,\n} from './schemas/qna.js'\nimport type { V1MemberProfilePatchBody } from './shared-types.js'\n\n// --- Posts / content ---\n\nexport type V1PostsQuery = z.infer<typeof V1PostsQuerySchema>\nexport type V1PostBySlugPathParams = z.infer<\n typeof V1PostBySlugPathParamsSchema\n>\nexport type V1PostBySlugQuery = z.infer<typeof V1PostBySlugQuerySchema>\nexport type V1PostsEssayAnswersWithLikesQuery = z.infer<\n typeof V1PostsEssayAnswersWithLikesQuerySchema\n>\nexport type V1SitemapsQuery = z.infer<typeof V1SitemapsQuerySchema>\nexport type V1ProjectsQuery = z.infer<typeof V1ProjectsQuerySchema>\nexport type V1EditorPicksSettingsQuery = z.infer<\n typeof V1EditorPicksSettingsQuerySchema\n>\nexport type V1MemberPostsWithAnswersQuery = z.infer<\n typeof V1MemberPostsWithAnswersQuerySchema\n>\nexport type { V1MemberProfilePatchBody }\nexport type V1AuthorAvatarPathParams = z.infer<\n typeof V1AuthorAvatarPathParamsSchema\n>\nexport type V1CallBaodaozaiIntroPathParams = z.infer<\n typeof V1CallBaodaozaiIntroPathParamsSchema\n>\n\nexport const V1PostBySlugRequestSchema = V1PostBySlugPathParamsSchema.merge(\n V1PostBySlugQuerySchema\n)\nexport type V1PostBySlugRequest = z.infer<typeof V1PostBySlugRequestSchema>\n\nexport type V1PostMetaBySlugRequest = Pick<V1PostBySlugRequest, 'slug'>\n\n// --- Feeds ---\n\nexport type V1FeedSlugPathParams = z.infer<typeof V1FeedSlugPathParamsSchema>\nexport type V1CategoryPostsQuery = z.infer<typeof V1CategoryPostsQuerySchema>\nexport type V1CategoryBySlugMetadataQuery = z.infer<\n typeof V1CategoryBySlugMetadataQuerySchema\n>\nexport type V1SubSubcategoryBySlugPostsQuery = z.infer<\n typeof V1SubSubcategoryBySlugPostsQuerySchema\n>\nexport type V1TagBySlugPostsQuery = z.infer<typeof V1TagBySlugPostsQuerySchema>\nexport type V1AuthorBySlugPostsQuery = z.infer<\n typeof V1AuthorBySlugPostsQuerySchema\n>\n\nexport const V1CategoryPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(\n V1CategoryPostsQuerySchema\n)\nexport type V1CategoryPostsRequest = z.infer<\n typeof V1CategoryPostsRequestSchema\n>\n\nexport const V1CategoryMetadataRequestSchema = V1FeedSlugPathParamsSchema.merge(\n V1CategoryBySlugMetadataQuerySchema\n)\nexport type V1CategoryMetadataRequest = z.infer<\n typeof V1CategoryMetadataRequestSchema\n>\n\nexport const V1CategorySubcategoriesThemeRequestSchema =\n V1FeedSlugPathParamsSchema\nexport type V1CategorySubcategoriesThemeRequest = z.infer<\n typeof V1CategorySubcategoriesThemeRequestSchema\n>\n\nexport const V1SubcategoryPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(\n V1CategoryPostsQuerySchema\n)\nexport type V1SubcategoryPostsRequest = z.infer<\n typeof V1SubcategoryPostsRequestSchema\n>\n\nexport const V1SubSubcategoryPostsRequestSchema =\n V1FeedSlugPathParamsSchema.merge(V1SubSubcategoryBySlugPostsQuerySchema)\nexport type V1SubSubcategoryPostsRequest = z.infer<\n typeof V1SubSubcategoryPostsRequestSchema\n>\n\nexport const V1TagPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(\n V1TagBySlugPostsQuerySchema\n)\nexport type V1TagPostsRequest = z.infer<typeof V1TagPostsRequestSchema>\n\nexport const V1AuthorPostsRequestSchema = V1FeedSlugPathParamsSchema.merge(\n V1AuthorBySlugPostsQuerySchema\n)\nexport type V1AuthorPostsRequest = z.infer<typeof V1AuthorPostsRequestSchema>\n\nexport const V1AuthorMetaRequestSchema = V1FeedSlugPathParamsSchema\nexport type V1AuthorMetaRequest = z.infer<typeof V1AuthorMetaRequestSchema>\n\nexport const V1TagMetaRequestSchema = V1FeedSlugPathParamsSchema\nexport type V1TagMetaRequest = z.infer<typeof V1TagMetaRequestSchema>\n\nexport const V1ProjectBySlugRequestSchema = V1FeedSlugPathParamsSchema\nexport type V1ProjectBySlugRequest = z.infer<\n typeof V1ProjectBySlugRequestSchema\n>\n\n// --- QnA ---\n\nexport type V1AllPostEssayAnswersQuery = z.infer<\n typeof V1AllPostEssayAnswersQuerySchema\n>\nexport type V1PostEssayQuestionAnswersParams = z.infer<\n typeof V1PostEssayQuestionAnswersParamsSchema\n>\nexport type V1PostEssayQuestionAnswersQuery = z.infer<\n typeof V1PostEssayQuestionAnswersQuerySchema\n>\n\nexport const V1PostEssayQuestionAnswersRequestSchema =\n V1PostEssayQuestionAnswersParamsSchema.merge(\n V1PostEssayQuestionAnswersQuerySchema\n )\nexport type V1PostEssayQuestionAnswersRequest = z.infer<\n typeof V1PostEssayQuestionAnswersRequestSchema\n>\n\nexport type V1MemberPostChoiceAnswersQuery = z.infer<\n typeof V1MemberPostChoiceAnswersQuerySchema\n>\nexport type V1MemberPostEssayAnswersQuery = z.infer<\n typeof V1MemberPostEssayAnswersQuerySchema\n>\n\nexport type V1CreatePostChoiceAnswerBody = z.infer<\n typeof V1CreatePostChoiceAnswerBodySchema\n>\nexport type V1PatchPostChoiceAnswerBody = z.infer<\n typeof V1PatchPostChoiceAnswerBodySchema\n>\nexport type V1CreatePostEssayAnswerBody = z.infer<\n typeof V1CreatePostEssayAnswerBodySchema\n>\nexport type V1PatchPostEssayAnswerBody = z.infer<\n typeof V1PatchPostEssayAnswerBodySchema\n>\nexport type V1CreatePostEssayAnswerLikeBody = z.infer<\n typeof V1CreatePostEssayAnswerLikeBodySchema\n>\n\nexport type V1PostChoiceAnswerPathId = z.infer<\n typeof V1PostChoiceAnswerPathIdSchema\n>\nexport type V1PostEssayAnswerPathId = z.infer<\n typeof V1PostEssayAnswerPathIdSchema\n>\nexport type V1PostEssayAnswerLikePathId = z.infer<\n typeof V1PostEssayAnswerLikePathIdSchema\n>\n\n// --- Member activity ---\n\nexport type V1EssayAnswersHasLikedQuery = z.infer<\n typeof V1EssayAnswersHasLikedQuerySchema\n>\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAGA,SAKEA,4BAA4B,EAC5BC,uBAAuB,QAKlB,sBAAsB;AAC7B,SACEC,8BAA8B,EAC9BC,mCAAmC,EACnCC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,sCAAsC,EACtCC,2BAA2B,QACtB,mCAAmC;AAE1C,SAYEC,sCAAsC,EACtCC,qCAAqC,QAChC,kBAAkB;;AAGzB;;AA0BA,OAAO,MAAMC,yBAAyB,GAAGV,4BAA4B,CAACW,KAAK,CACzEV,uBACF,CAAC;;AAKD;;AAeA,OAAO,MAAMW,4BAA4B,GAAGP,0BAA0B,CAACM,KAAK,CAC1EP,0BACF,CAAC;AAKD,OAAO,MAAMS,+BAA+B,GAAGR,0BAA0B,CAACM,KAAK,CAC7ER,mCACF,CAAC;AAKD,OAAO,MAAMW,yCAAyC,GACpDT,0BAA0B;AAK5B,OAAO,MAAMU,+BAA+B,GAAGV,0BAA0B,CAACM,KAAK,CAC7EP,0BACF,CAAC;AAKD,OAAO,MAAMY,kCAAkC,GAC7CX,0BAA0B,CAACM,KAAK,CAACL,sCAAsC,CAAC;AAK1E,OAAO,MAAMW,uBAAuB,GAAGZ,0BAA0B,CAACM,KAAK,CACrEJ,2BACF,CAAC;AAGD,OAAO,MAAMW,0BAA0B,GAAGb,0BAA0B,CAACM,KAAK,CACxET,8BACF,CAAC;AAGD,OAAO,MAAMiB,yBAAyB,GAAGd,0BAA0B;AAGnE,OAAO,MAAMe,sBAAsB,GAAGf,0BAA0B;AAGhE,OAAO,MAAMgB,4BAA4B,GAAGhB,0BAA0B;;AAKtE;;AAYA,OAAO,MAAMiB,uCAAuC,GAClDd,sCAAsC,CAACG,KAAK,CAC1CF,qCACF,CAAC;;AAsCH","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './api-variables.js';
1
2
  export * from './openapi.js';
2
3
  export * from './rest.js';
3
4
  export * from './schemas/content.js';
@@ -6,4 +7,5 @@ export * from './schemas/content-feed-responses.js';
6
7
  export * from './schemas/extra-openapi-paths.js';
7
8
  export * from './schemas/member-essay-answers-has-liked.js';
8
9
  export * from './schemas/qna.js';
10
+ export * from './shared-types.js';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,sBAAsB,CAAA;AACpC,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,sBAAsB,CAAA;AACpC,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './api-variables.js';
1
2
  export * from './openapi.js';
2
3
  export * from './rest.js';
3
4
  export * from './schemas/content.js';
@@ -6,4 +7,5 @@ export * from './schemas/content-feed-responses.js';
6
7
  export * from './schemas/extra-openapi-paths.js';
7
8
  export * from './schemas/member-essay-answers-has-liked.js';
8
9
  export * from './schemas/qna.js';
10
+ export * from './shared-types.js';
9
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './openapi.js'\nexport * from './rest.js'\nexport * from './schemas/content.js'\nexport * from './schemas/content-feed-queries.js'\nexport * from './schemas/content-feed-responses.js'\nexport * from './schemas/extra-openapi-paths.js'\nexport * from './schemas/member-essay-answers-has-liked.js'\nexport * from './schemas/qna.js'\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,6CAA6C;AAC3D,cAAc,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './api-variables.js'\nexport * from './openapi.js'\nexport * from './rest.js'\nexport * from './schemas/content.js'\nexport * from './schemas/content-feed-queries.js'\nexport * from './schemas/content-feed-responses.js'\nexport * from './schemas/extra-openapi-paths.js'\nexport * from './schemas/member-essay-answers-has-liked.js'\nexport * from './schemas/qna.js'\nexport * from './shared-types.js'\n"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,sBAAsB;AACpC,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,6CAA6C;AAC3D,cAAc,kBAAkB;AAChC,cAAc,mBAAmB","ignoreList":[]}
package/dist/rest.d.ts CHANGED
@@ -9,7 +9,6 @@ export declare const RestErrorCodeSchema: z.ZodEnum<{
9
9
  service_unavailable: "service_unavailable";
10
10
  internal_server_error: "internal_server_error";
11
11
  }>;
12
- export type RestErrorCode = z.infer<typeof RestErrorCodeSchema>;
13
12
  export declare const RestErrorBodySchema: z.ZodObject<{
14
13
  error: z.ZodObject<{
15
14
  code: z.ZodEnum<{
@@ -26,7 +25,6 @@ export declare const RestErrorBodySchema: z.ZodObject<{
26
25
  details: z.ZodOptional<z.ZodUnknown>;
27
26
  }, z.core.$strip>;
28
27
  }, z.core.$strip>;
29
- export type RestErrorBody = z.infer<typeof RestErrorBodySchema>;
30
28
  export declare const RestOkSchema: z.ZodObject<{
31
29
  status: z.ZodLiteral<"success">;
32
30
  data: z.ZodUnknown;
@@ -53,5 +51,4 @@ export declare const RestEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
53
51
  error: z.ZodOptional<z.ZodUnknown>;
54
52
  errors: z.ZodOptional<z.ZodUnknown>;
55
53
  }, z.core.$strip>]>;
56
- export type RestEnvelope = z.infer<typeof RestEnvelopeSchema>;
57
54
  //# sourceMappingURL=rest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../src/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAO9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,YAAY;;;iBAGvB,CAAA;AAEF,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;mBAI7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
1
+ {"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../src/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAO9B,CAAA;AAEF,eAAO,MAAM,YAAY;;;iBAGvB,CAAA;AAEF,eAAO,MAAM,cAAc;;;iBAGzB,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;mBAI7B,CAAA"}
package/dist/rest.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"rest.js","names":["z","RestErrorCodeSchema","enum","RestErrorBodySchema","object","error","code","message","string","details","unknown","optional","RestOkSchema","status","literal","data","RestFailSchema","RestErrorSchema","errors","RestEnvelopeSchema","union"],"sources":["../src/rest.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const RestErrorCodeSchema = z.enum([\n 'invalid_request',\n 'unauthorized',\n 'forbidden',\n 'not_found',\n 'conflict',\n 'upstream_error',\n 'service_unavailable',\n 'internal_server_error',\n])\n\nexport type RestErrorCode = z.infer<typeof RestErrorCodeSchema>\n\nexport const RestErrorBodySchema = z.object({\n error: z.object({\n code: RestErrorCodeSchema,\n message: z.string(),\n /** `z.json()` is recursive and breaks zod-to-openapi (stack overflow on /openapi.json). */\n details: z.unknown().optional(),\n }),\n})\n\nexport type RestErrorBody = z.infer<typeof RestErrorBodySchema>\n\nexport const RestOkSchema = z.object({\n status: z.literal('success'),\n data: z.unknown(),\n})\n\nexport const RestFailSchema = z.object({\n status: z.literal('fail'),\n data: z.unknown(),\n})\n\nexport const RestErrorSchema = z.object({\n status: z.literal('error'),\n message: z.string().optional(),\n error: z.unknown().optional(),\n errors: z.unknown().optional(),\n})\n\nexport const RestEnvelopeSchema = z.union([\n RestOkSchema,\n RestFailSchema,\n RestErrorSchema,\n])\n\nexport type RestEnvelope = z.infer<typeof RestEnvelopeSchema>\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,mBAAmB,GAAGD,CAAC,CAACE,IAAI,CAAC,CACxC,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,CACxB,CAAC;AAIF,OAAO,MAAMC,mBAAmB,GAAGH,CAAC,CAACI,MAAM,CAAC;EAC1CC,KAAK,EAAEL,CAAC,CAACI,MAAM,CAAC;IACdE,IAAI,EAAEL,mBAAmB;IACzBM,OAAO,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC;IACnB;IACAC,OAAO,EAAET,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC;EAChC,CAAC;AACH,CAAC,CAAC;AAIF,OAAO,MAAMC,YAAY,GAAGZ,CAAC,CAACI,MAAM,CAAC;EACnCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,SAAS,CAAC;EAC5BC,IAAI,EAAEf,CAAC,CAACU,OAAO,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMM,cAAc,GAAGhB,CAAC,CAACI,MAAM,CAAC;EACrCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,MAAM,CAAC;EACzBC,IAAI,EAAEf,CAAC,CAACU,OAAO,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMO,eAAe,GAAGjB,CAAC,CAACI,MAAM,CAAC;EACtCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,OAAO,CAAC;EAC1BP,OAAO,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAC9BN,KAAK,EAAEL,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BO,MAAM,EAAElB,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,MAAMQ,kBAAkB,GAAGnB,CAAC,CAACoB,KAAK,CAAC,CACxCR,YAAY,EACZI,cAAc,EACdC,eAAe,CAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"rest.js","names":["z","RestErrorCodeSchema","enum","RestErrorBodySchema","object","error","code","message","string","details","unknown","optional","RestOkSchema","status","literal","data","RestFailSchema","RestErrorSchema","errors","RestEnvelopeSchema","union"],"sources":["../src/rest.ts"],"sourcesContent":["import { z } from 'zod'\n\nexport const RestErrorCodeSchema = z.enum([\n 'invalid_request',\n 'unauthorized',\n 'forbidden',\n 'not_found',\n 'conflict',\n 'upstream_error',\n 'service_unavailable',\n 'internal_server_error',\n])\n\nexport const RestErrorBodySchema = z.object({\n error: z.object({\n code: RestErrorCodeSchema,\n message: z.string(),\n /** `z.json()` is recursive and breaks zod-to-openapi (stack overflow on /openapi.json). */\n details: z.unknown().optional(),\n }),\n})\n\nexport const RestOkSchema = z.object({\n status: z.literal('success'),\n data: z.unknown(),\n})\n\nexport const RestFailSchema = z.object({\n status: z.literal('fail'),\n data: z.unknown(),\n})\n\nexport const RestErrorSchema = z.object({\n status: z.literal('error'),\n message: z.string().optional(),\n error: z.unknown().optional(),\n errors: z.unknown().optional(),\n})\n\nexport const RestEnvelopeSchema = z.union([\n RestOkSchema,\n RestFailSchema,\n RestErrorSchema,\n])\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,mBAAmB,GAAGD,CAAC,CAACE,IAAI,CAAC,CACxC,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,CACxB,CAAC;AAEF,OAAO,MAAMC,mBAAmB,GAAGH,CAAC,CAACI,MAAM,CAAC;EAC1CC,KAAK,EAAEL,CAAC,CAACI,MAAM,CAAC;IACdE,IAAI,EAAEL,mBAAmB;IACzBM,OAAO,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC;IACnB;IACAC,OAAO,EAAET,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC;EAChC,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,MAAMC,YAAY,GAAGZ,CAAC,CAACI,MAAM,CAAC;EACnCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,SAAS,CAAC;EAC5BC,IAAI,EAAEf,CAAC,CAACU,OAAO,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMM,cAAc,GAAGhB,CAAC,CAACI,MAAM,CAAC;EACrCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,MAAM,CAAC;EACzBC,IAAI,EAAEf,CAAC,CAACU,OAAO,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMO,eAAe,GAAGjB,CAAC,CAACI,MAAM,CAAC;EACtCS,MAAM,EAAEb,CAAC,CAACc,OAAO,CAAC,OAAO,CAAC;EAC1BP,OAAO,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAC9BN,KAAK,EAAEL,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BO,MAAM,EAAElB,CAAC,CAACU,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC/B,CAAC,CAAC;AAEF,OAAO,MAAMQ,kBAAkB,GAAGnB,CAAC,CAACoB,KAAK,CAAC,CACxCR,YAAY,EACZI,cAAc,EACdC,eAAe,CAChB,CAAC","ignoreList":[]}
@@ -47,7 +47,6 @@ export declare const PostContentSchema: z.ZodObject<{
47
47
  }, z.core.$strip>>>;
48
48
  publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
49
49
  }, z.core.$strip>;
50
- export type PostContent = z.infer<typeof PostContentSchema>;
51
50
  export declare const SubcategoryItemSchema: z.ZodObject<{
52
51
  id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
53
52
  name: z.ZodString;
@@ -278,12 +277,35 @@ export declare const V1MemberAvatarSchema: z.ZodObject<{
278
277
  id: z.ZodString;
279
278
  fileUrl: z.ZodString;
280
279
  }, z.core.$strip>;
280
+ export declare const V1MemberIdentitySchema: z.ZodEnum<{
281
+ student: "student";
282
+ parent: "parent";
283
+ teacher: "teacher";
284
+ public: "public";
285
+ }>;
286
+ export declare const V1MemberLocationCountrySchema: z.ZodEnum<{
287
+ taiwan: "taiwan";
288
+ other: "other";
289
+ }>;
290
+ export declare const V1MemberBirthdaySchema: z.ZodISODate;
281
291
  export declare const V1MemberProfileSchema: z.ZodObject<{
282
292
  id: z.ZodString;
283
293
  name: z.ZodString;
284
294
  email: z.ZodString;
285
295
  nickname: z.ZodString;
286
296
  contactEmail: z.ZodString;
297
+ birthday: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
298
+ locationCountry: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
299
+ taiwan: "taiwan";
300
+ other: "other";
301
+ }>>>;
302
+ locationRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
+ identity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
304
+ student: "student";
305
+ parent: "parent";
306
+ teacher: "teacher";
307
+ public: "public";
308
+ }>>>;
287
309
  twreporter_user_id: z.ZodString;
288
310
  showBaodaozai: z.ZodBoolean;
289
311
  essayQuestionCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -299,6 +321,18 @@ export declare const V1MemberProfileResponseSchema: z.ZodObject<{
299
321
  email: z.ZodString;
300
322
  nickname: z.ZodString;
301
323
  contactEmail: z.ZodString;
324
+ birthday: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
325
+ locationCountry: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
326
+ taiwan: "taiwan";
327
+ other: "other";
328
+ }>>>;
329
+ locationRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ identity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
331
+ student: "student";
332
+ parent: "parent";
333
+ teacher: "teacher";
334
+ public: "public";
335
+ }>>>;
302
336
  twreporter_user_id: z.ZodString;
303
337
  showBaodaozai: z.ZodBoolean;
304
338
  essayQuestionCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -312,6 +346,18 @@ export declare const V1MemberProfilePatchBodySchema: z.ZodObject<{
312
346
  name: z.ZodOptional<z.ZodString>;
313
347
  nickname: z.ZodOptional<z.ZodString>;
314
348
  contactEmail: z.ZodOptional<z.ZodString>;
349
+ birthday: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
350
+ locationCountry: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
351
+ taiwan: "taiwan";
352
+ other: "other";
353
+ }>>>;
354
+ locationRegion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
355
+ identity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
356
+ student: "student";
357
+ parent: "parent";
358
+ teacher: "teacher";
359
+ public: "public";
360
+ }>>>;
315
361
  showBaodaozai: z.ZodOptional<z.ZodBoolean>;
316
362
  essayQuestionCount: z.ZodOptional<z.ZodNumber>;
317
363
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/schemas/content.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAChB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAavB,eAAO,MAAM,QAAQ,iBAAwB,CAAA;AAE7C,eAAO,MAAM,kBAAkB;;iBAOL,CAAA;AAE1B,eAAO,MAAM,mBAAmB;;;;iBAIL,CAAA;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;iBAiBL,CAAA;AAEhC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;iBASL,CAAA;AAEzB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,qBAAqB;;;;;;;iBAOT,CAAA;AAEzB,eAAO,MAAM,4BAA4B;;;;iBAMT,CAAA;AAEhC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAST,CAAA;AAEhC,eAAO,MAAM,kBAAkB;;;;;;iBAI7B,CAAA;AAEF,eAAO,MAAM,qBA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4B;;;kBAAgC,CAAA;AACzE,eAAO,MAAM,+BAA+B;;;kBAAgC,CAAA;AAE5E,eAAO,MAAM,iCAAiC;;;;;;;;;iBAS5C,CAAA;AAEF,yFAAyF;AACzF,eAAO,MAAM,iCAAiC;;;;;;iBAM5C,CAAA;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW9C,CAAA;AAEF,eAAO,MAAM,wCAAwC;;iBAEnD,CAAA;AAEF,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AAiIF,eAAO,MAAM,uCAAuC;;;;;;;;;;;iBAYlD,CAAA;AA6HF,cAAc,0BAA0B,CAAA"}
@@ -289,12 +289,19 @@ export const V1MemberAvatarSchema = z.object({
289
289
  id: z.string(),
290
290
  fileUrl: z.string()
291
291
  }).openapi('MemberAvatar');
292
+ export const V1MemberIdentitySchema = z.enum(['student', 'parent', 'teacher', 'public']);
293
+ export const V1MemberLocationCountrySchema = z.enum(['taiwan', 'other']);
294
+ export const V1MemberBirthdaySchema = z.iso.date();
292
295
  export const V1MemberProfileSchema = z.object({
293
296
  id: z.string(),
294
297
  name: z.string(),
295
298
  email: z.string(),
296
299
  nickname: z.string(),
297
300
  contactEmail: z.string(),
301
+ birthday: V1MemberBirthdaySchema.nullable().optional(),
302
+ locationCountry: V1MemberLocationCountrySchema.nullable().optional(),
303
+ locationRegion: z.string().nullable().optional(),
304
+ identity: V1MemberIdentitySchema.nullable().optional(),
298
305
  twreporter_user_id: z.string(),
299
306
  showBaodaozai: z.boolean(),
300
307
  essayQuestionCount: z.number().int().nullable().optional(),
@@ -306,6 +313,10 @@ export const V1MemberProfilePatchBodySchema = z.strictObject({
306
313
  name: z.string().optional(),
307
314
  nickname: z.string().optional(),
308
315
  contactEmail: z.string().optional(),
316
+ birthday: V1MemberBirthdaySchema.nullable().optional(),
317
+ locationCountry: V1MemberLocationCountrySchema.nullable().optional(),
318
+ locationRegion: z.string().nullable().optional(),
319
+ identity: V1MemberIdentitySchema.nullable().optional(),
309
320
  showBaodaozai: z.boolean().optional(),
310
321
  essayQuestionCount: z.number().int().min(0).max(3).optional()
311
322
  }).openapi('MemberProfilePatch');