@kids-reporter/api-types 0.0.5 → 0.0.6

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.
@@ -3,6 +3,7 @@
3
3
  * Inferred from Zod schemas — single source of truth for api/ and content-api layers.
4
4
  */
5
5
  import type { z } from 'zod';
6
+ import { V1BookmarkPathIdSchema, V1BookmarksQuerySchema, V1CreateBookmarkBodySchema } from './schemas/bookmarks.js';
6
7
  import { V1AuthorAvatarPathParamsSchema, V1CallBaodaozaiIntroPathParamsSchema, V1EditorPicksSettingsQuerySchema, V1MemberPostsWithAnswersQuerySchema, V1PostBySlugPathParamsSchema, V1PostBySlugQuerySchema, V1PostsEssayAnswersWithLikesQuerySchema, V1PostsQuerySchema, V1ProjectsQuerySchema, V1SitemapsQuerySchema } from './schemas/content.js';
7
8
  import { V1AuthorBySlugPostsQuerySchema, V1CategoryBySlugMetadataQuerySchema, V1CategoryPostsQuerySchema, V1FeedSlugPathParamsSchema, V1SubSubcategoryBySlugPostsQuerySchema, V1TagBySlugPostsQuerySchema } from './schemas/content-feed-queries.js';
8
9
  import { V1EssayAnswersHasLikedQuerySchema } from './schemas/member-essay-answers-has-liked.js';
@@ -116,5 +117,8 @@ export type V1CreatePostEssayAnswerLikeBody = z.infer<typeof V1CreatePostEssayAn
116
117
  export type V1PostChoiceAnswerPathId = z.infer<typeof V1PostChoiceAnswerPathIdSchema>;
117
118
  export type V1PostEssayAnswerPathId = z.infer<typeof V1PostEssayAnswerPathIdSchema>;
118
119
  export type V1PostEssayAnswerLikePathId = z.infer<typeof V1PostEssayAnswerLikePathIdSchema>;
120
+ export type V1CreateBookmarkBody = z.infer<typeof V1CreateBookmarkBodySchema>;
121
+ export type V1BookmarksQuery = z.infer<typeof V1BookmarksQuerySchema>;
122
+ export type V1BookmarkPathId = z.infer<typeof V1BookmarkPathIdSchema>;
119
123
  export type V1EssayAnswersHasLikedQuery = z.infer<typeof V1EssayAnswersHasLikedQuerySchema>;
120
124
  //# sourceMappingURL=api-variables.d.ts.map
@@ -1 +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,EACtB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,8BAA8B,EAC9B,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,sCAAsC,EACtC,2BAA2B,EAC5B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,iCAAiC,EACjC,qCAAqC,EACrC,oCAAoC,EACpC,mCAAmC,EACnC,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAC7B,sCAAsC,EACtC,qCAAqC,EACtC,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAIjE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAC7D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OA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AA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA;AAID,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC7E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAIrE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAA"}
@@ -28,5 +28,7 @@ export const V1ProjectBySlugRequestSchema = V1FeedSlugPathParamsSchema;
28
28
 
29
29
  export const V1PostEssayQuestionAnswersRequestSchema = V1PostEssayQuestionAnswersParamsSchema.merge(V1PostEssayQuestionAnswersQuerySchema);
30
30
 
31
+ // --- Bookmarks ---
32
+
31
33
  // --- Member activity ---
32
34
  //# sourceMappingURL=api-variables.js.map
@@ -1 +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":[]}
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 V1BookmarkPathIdSchema,\n V1BookmarksQuerySchema,\n V1CreateBookmarkBodySchema,\n} from './schemas/bookmarks.js'\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// --- Bookmarks ---\n\nexport type V1CreateBookmarkBody = z.infer<typeof V1CreateBookmarkBodySchema>\nexport type V1BookmarksQuery = z.infer<typeof V1BookmarksQuerySchema>\nexport type V1BookmarkPathId = z.infer<typeof V1BookmarkPathIdSchema>\n\n// --- Member activity ---\n\nexport type V1EssayAnswersHasLikedQuery = z.infer<\n typeof V1EssayAnswersHasLikedQuerySchema\n>\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAQA,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;;AAMA","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './api-variables.js';
2
2
  export * from './openapi.js';
3
3
  export * from './rest.js';
4
+ export * from './schemas/bookmarks.js';
4
5
  export * from './schemas/content.js';
5
6
  export * from './schemas/content-feed-queries.js';
6
7
  export * from './schemas/content-feed-responses.js';
@@ -1 +1 @@
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"}
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,wBAAwB,CAAA;AACtC,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,6 +1,7 @@
1
1
  export * from './api-variables.js';
2
2
  export * from './openapi.js';
3
3
  export * from './rest.js';
4
+ export * from './schemas/bookmarks.js';
4
5
  export * from './schemas/content.js';
5
6
  export * from './schemas/content-feed-queries.js';
6
7
  export * from './schemas/content-feed-responses.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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":[]}
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/bookmarks.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,wBAAwB;AACtC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,6CAA6C;AAC3D,cAAc,kBAAkB;AAChC,cAAc,mBAAmB","ignoreList":[]}
package/dist/openapi.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './schemas/bookmarks.js';
1
2
  import './schemas/extra-openapi-paths.js';
2
3
  import './schemas/qna.js';
3
4
  export declare function getOpenApiDocument(): {
@@ -28,6 +29,9 @@ export declare function getOpenApiDocument(): {
28
29
  } | {
29
30
  readonly name: "Member Q&A";
30
31
  readonly description: "Member-scoped choice/essay answers and likes.";
32
+ } | {
33
+ readonly name: "Member Bookmarks";
34
+ readonly description: "Member-scoped bookmarks for posts and projects.";
31
35
  } | {
32
36
  readonly name: "Public Q&A";
33
37
  readonly description: "Public essay Q&A listings and question threads.";
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA;AACzC,OAAO,kBAAkB,CAAA;AA+BzB,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcjC"}
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,kCAAkC,CAAA;AACzC,OAAO,kBAAkB,CAAA;AAmCzB,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcjC"}
package/dist/openapi.js CHANGED
@@ -1,3 +1,4 @@
1
+ import './schemas/bookmarks.js';
1
2
  import './schemas/extra-openapi-paths.js';
2
3
  import './schemas/qna.js';
3
4
  import { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi';
@@ -29,6 +30,9 @@ const openApiRootTags = [{
29
30
  }, {
30
31
  name: 'Member Q&A',
31
32
  description: 'Member-scoped choice/essay answers and likes.'
33
+ }, {
34
+ name: 'Member Bookmarks',
35
+ description: 'Member-scoped bookmarks for posts and projects.'
32
36
  }, {
33
37
  name: 'Public Q&A',
34
38
  description: 'Public essay Q&A listings and question threads.'
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.js","names":["OpenApiGeneratorV3","registry","openApiRootTags","name","description","getOpenApiDocument","generator","definitions","generateDocument","openapi","info","title","version","tags"],"sources":["../src/openapi.ts"],"sourcesContent":["import './schemas/extra-openapi-paths.js'\nimport './schemas/qna.js'\n\nimport { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi'\n\nimport { registry } from './schemas/content.js'\n\nconst openApiRootTags = [\n { name: 'Infra', description: 'Health and service metadata.' },\n { name: 'Auth', description: 'Browser cookie exchange for Bearer JWT.' },\n { name: 'Posts', description: 'Articles and post-derived public feeds.' },\n { name: 'Projects', description: 'Topic / project listings and detail.' },\n {\n name: 'Taxonomy',\n description: 'Categories, tags, authors, and feed by slug.',\n },\n { name: 'Sitemaps', description: 'Sitemap entry lists.' },\n {\n name: 'Editor',\n description: 'Homepage editor picks and related settings.',\n },\n { name: 'Members', description: 'Authenticated member profile and avatar.' },\n {\n name: 'Member Q&A',\n description: 'Member-scoped choice/essay answers and likes.',\n },\n {\n name: 'Public Q&A',\n description: 'Public essay Q&A listings and question threads.',\n },\n] as const\n\nexport function getOpenApiDocument() {\n const generator = new OpenApiGeneratorV3(registry.definitions)\n return {\n ...generator.generateDocument({\n openapi: '3.0.3',\n info: {\n title: 'Kids Reporter Content API',\n version: '0.0.1',\n description:\n 'Content API: `GET /health`, `GET /docs` (Swagger UI; loads `GET /openapi.json`), `POST /auth/access-token` (cookie to JWT), and REST under `/v1/*`. The OpenAPI JSON is served at `GET /openapi.json` but is intentionally **not** listed as a path operation here. Authenticated member routes require `Authorization: Bearer <JWT>` (Go API–issued HS256; verify with `GO_API_JWT_SECRET`, `GO_API_JWT_ISSUER`, `GO_API_JWT_AUDIENCE`).',\n },\n }),\n tags: [...openApiRootTags],\n }\n}\n"],"mappings":"AAAA,OAAO,kCAAkC;AACzC,OAAO,kBAAkB;AAEzB,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,MAAMC,eAAe,GAAG,CACtB;EAAEC,IAAI,EAAE,OAAO;EAAEC,WAAW,EAAE;AAA+B,CAAC,EAC9D;EAAED,IAAI,EAAE,MAAM;EAAEC,WAAW,EAAE;AAA0C,CAAC,EACxE;EAAED,IAAI,EAAE,OAAO;EAAEC,WAAW,EAAE;AAA0C,CAAC,EACzE;EAAED,IAAI,EAAE,UAAU;EAAEC,WAAW,EAAE;AAAuC,CAAC,EACzE;EACED,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE;AACf,CAAC,EACD;EAAED,IAAI,EAAE,UAAU;EAAEC,WAAW,EAAE;AAAuB,CAAC,EACzD;EACED,IAAI,EAAE,QAAQ;EACdC,WAAW,EAAE;AACf,CAAC,EACD;EAAED,IAAI,EAAE,SAAS;EAAEC,WAAW,EAAE;AAA2C,CAAC,EAC5E;EACED,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE;AACf,CAAC,EACD;EACED,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE;AACf,CAAC,CACO;AAEV,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACnC,MAAMC,SAAS,GAAG,IAAIN,kBAAkB,CAACC,QAAQ,CAACM,WAAW,CAAC;EAC9D,OAAO;IACL,GAAGD,SAAS,CAACE,gBAAgB,CAAC;MAC5BC,OAAO,EAAE,OAAO;MAChBC,IAAI,EAAE;QACJC,KAAK,EAAE,2BAA2B;QAClCC,OAAO,EAAE,OAAO;QAChBR,WAAW,EACT;MACJ;IACF,CAAC,CAAC;IACFS,IAAI,EAAE,CAAC,GAAGX,eAAe;EAC3B,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"openapi.js","names":["OpenApiGeneratorV3","registry","openApiRootTags","name","description","getOpenApiDocument","generator","definitions","generateDocument","openapi","info","title","version","tags"],"sources":["../src/openapi.ts"],"sourcesContent":["import './schemas/bookmarks.js'\nimport './schemas/extra-openapi-paths.js'\nimport './schemas/qna.js'\n\nimport { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi'\n\nimport { registry } from './schemas/content.js'\n\nconst openApiRootTags = [\n { name: 'Infra', description: 'Health and service metadata.' },\n { name: 'Auth', description: 'Browser cookie exchange for Bearer JWT.' },\n { name: 'Posts', description: 'Articles and post-derived public feeds.' },\n { name: 'Projects', description: 'Topic / project listings and detail.' },\n {\n name: 'Taxonomy',\n description: 'Categories, tags, authors, and feed by slug.',\n },\n { name: 'Sitemaps', description: 'Sitemap entry lists.' },\n {\n name: 'Editor',\n description: 'Homepage editor picks and related settings.',\n },\n { name: 'Members', description: 'Authenticated member profile and avatar.' },\n {\n name: 'Member Q&A',\n description: 'Member-scoped choice/essay answers and likes.',\n },\n {\n name: 'Member Bookmarks',\n description: 'Member-scoped bookmarks for posts and projects.',\n },\n {\n name: 'Public Q&A',\n description: 'Public essay Q&A listings and question threads.',\n },\n] as const\n\nexport function getOpenApiDocument() {\n const generator = new OpenApiGeneratorV3(registry.definitions)\n return {\n ...generator.generateDocument({\n openapi: '3.0.3',\n info: {\n title: 'Kids Reporter Content API',\n version: '0.0.1',\n description:\n 'Content API: `GET /health`, `GET /docs` (Swagger UI; loads `GET /openapi.json`), `POST /auth/access-token` (cookie to JWT), and REST under `/v1/*`. The OpenAPI JSON is served at `GET /openapi.json` but is intentionally **not** listed as a path operation here. Authenticated member routes require `Authorization: Bearer <JWT>` (Go API–issued HS256; verify with `GO_API_JWT_SECRET`, `GO_API_JWT_ISSUER`, `GO_API_JWT_AUDIENCE`).',\n },\n }),\n tags: [...openApiRootTags],\n }\n}\n"],"mappings":"AAAA,OAAO,wBAAwB;AAC/B,OAAO,kCAAkC;AACzC,OAAO,kBAAkB;AAEzB,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,MAAMC,eAAe,GAAG,CACtB;EAAEC,IAAI,EAAE,OAAO;EAAEC,WAAW,EAAE;AAA+B,CAAC,EAC9D;EAAED,IAAI,EAAE,MAAM;EAAEC,WAAW,EAAE;AAA0C,CAAC,EACxE;EAAED,IAAI,EAAE,OAAO;EAAEC,WAAW,EAAE;AAA0C,CAAC,EACzE;EAAED,IAAI,EAAE,UAAU;EAAEC,WAAW,EAAE;AAAuC,CAAC,EACzE;EACED,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE;AACf,CAAC,EACD;EAAED,IAAI,EAAE,UAAU;EAAEC,WAAW,EAAE;AAAuB,CAAC,EACzD;EACED,IAAI,EAAE,QAAQ;EACdC,WAAW,EAAE;AACf,CAAC,EACD;EAAED,IAAI,EAAE,SAAS;EAAEC,WAAW,EAAE;AAA2C,CAAC,EAC5E;EACED,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE;AACf,CAAC,EACD;EACED,IAAI,EAAE,kBAAkB;EACxBC,WAAW,EAAE;AACf,CAAC,EACD;EACED,IAAI,EAAE,YAAY;EAClBC,WAAW,EAAE;AACf,CAAC,CACO;AAEV,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACnC,MAAMC,SAAS,GAAG,IAAIN,kBAAkB,CAACC,QAAQ,CAACM,WAAW,CAAC;EAC9D,OAAO;IACL,GAAGD,SAAS,CAACE,gBAAgB,CAAC;MAC5BC,OAAO,EAAE,OAAO;MAChBC,IAAI,EAAE;QACJC,KAAK,EAAE,2BAA2B;QAClCC,OAAO,EAAE,OAAO;QAChBR,WAAW,EACT;MACJ;IACF,CAAC,CAAC;IACFS,IAAI,EAAE,CAAC,GAAGX,eAAe;EAC3B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,122 @@
1
+ import { z } from 'zod';
2
+ export declare const V1BookmarkTypeSchema: z.ZodEnum<{
3
+ post: "post";
4
+ project: "project";
5
+ }>;
6
+ export declare const V1CreateBookmarkBodySchema: z.ZodObject<{
7
+ type: z.ZodEnum<{
8
+ post: "post";
9
+ project: "project";
10
+ }>;
11
+ slug: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export declare const V1CreateBookmarkResponseSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ type: z.ZodEnum<{
16
+ post: "post";
17
+ project: "project";
18
+ }>;
19
+ slug: z.ZodString;
20
+ }, z.core.$strip>;
21
+ export declare const V1DeleteBookmarkResponseSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ }, z.core.$strip>;
24
+ export declare const V1BookmarkPathIdSchema: z.ZodObject<{
25
+ id: z.ZodCoercedNumber<unknown>;
26
+ }, z.core.$strip>;
27
+ export declare const V1BookmarksQuerySchema: z.ZodObject<{
28
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
29
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
30
+ type: z.ZodOptional<z.ZodEnum<{
31
+ post: "post";
32
+ project: "project";
33
+ }>>;
34
+ slug: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>;
36
+ export declare const V1BookmarkItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ id: z.ZodString;
38
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
39
+ type: z.ZodLiteral<"post">;
40
+ post: z.ZodObject<{
41
+ title: z.ZodString;
42
+ slug: z.ZodString;
43
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
45
+ resized: z.ZodObject<{
46
+ small: z.ZodDefault<z.ZodString>;
47
+ }, z.core.$strip>;
48
+ }, z.core.$strip>>>;
49
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ name: z.ZodString;
51
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
52
+ name: z.ZodString;
53
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
54
+ slug: z.ZodString;
55
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ }, z.core.$strip>>>;
57
+ }, z.core.$strip>>>;
58
+ }, z.core.$strip>>>;
59
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ id: z.ZodString;
63
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
64
+ type: z.ZodLiteral<"project">;
65
+ project: z.ZodObject<{
66
+ slug: z.ZodString;
67
+ title: z.ZodString;
68
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
69
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ resized: z.ZodObject<{
72
+ small: z.ZodString;
73
+ medium: z.ZodString;
74
+ }, z.core.$strip>;
75
+ }, z.core.$strip>>>;
76
+ subtitle: z.ZodString;
77
+ }, z.core.$strip>;
78
+ }, z.core.$strip>], "type">;
79
+ export declare const V1BookmarksResponseSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
80
+ id: z.ZodString;
81
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
82
+ type: z.ZodLiteral<"post">;
83
+ post: z.ZodObject<{
84
+ title: z.ZodString;
85
+ slug: z.ZodString;
86
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
88
+ resized: z.ZodObject<{
89
+ small: z.ZodDefault<z.ZodString>;
90
+ }, z.core.$strip>;
91
+ }, z.core.$strip>>>;
92
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
93
+ name: z.ZodString;
94
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
95
+ name: z.ZodString;
96
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
97
+ slug: z.ZodString;
98
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ }, z.core.$strip>>>;
100
+ }, z.core.$strip>>>;
101
+ }, z.core.$strip>>>;
102
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
103
+ }, z.core.$strip>;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ id: z.ZodString;
106
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
107
+ type: z.ZodLiteral<"project">;
108
+ project: z.ZodObject<{
109
+ slug: z.ZodString;
110
+ title: z.ZodString;
111
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
112
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
114
+ resized: z.ZodObject<{
115
+ small: z.ZodString;
116
+ medium: z.ZodString;
117
+ }, z.core.$strip>;
118
+ }, z.core.$strip>>>;
119
+ subtitle: z.ZodString;
120
+ }, z.core.$strip>;
121
+ }, z.core.$strip>], "type">>;
122
+ //# sourceMappingURL=bookmarks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookmarks.d.ts","sourceRoot":"","sources":["../../src/schemas/bookmarks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,eAAO,MAAM,oBAAoB;;;EAA8B,CAAA;AAE/D,eAAO,MAAM,0BAA0B;;;;;;iBAGrC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;iBAIzC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;iBAEjC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;iBAe/B,CAAA;AAMJ,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAeP,CAAA;AAE1B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAgC,CAAA"}
@@ -0,0 +1,218 @@
1
+ import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi';
2
+ import { z } from 'zod';
3
+ import { RestErrorBodySchema } from '../rest.js';
4
+ import { PostContentSchema, registry, V1ProjectsItemSchema } from './content.js';
5
+ extendZodWithOpenApi(z);
6
+ export const V1BookmarkTypeSchema = z.enum(['post', 'project']);
7
+ export const V1CreateBookmarkBodySchema = z.object({
8
+ type: V1BookmarkTypeSchema,
9
+ slug: z.string().min(1)
10
+ });
11
+ export const V1CreateBookmarkResponseSchema = z.object({
12
+ id: z.string(),
13
+ type: V1BookmarkTypeSchema,
14
+ slug: z.string()
15
+ });
16
+ export const V1DeleteBookmarkResponseSchema = z.object({
17
+ id: z.string()
18
+ });
19
+ export const V1BookmarkPathIdSchema = z.object({
20
+ id: z.coerce.number().int().positive()
21
+ });
22
+ export const V1BookmarksQuerySchema = z.object({
23
+ take: z.coerce.number().int().min(1).max(50).optional(),
24
+ skip: z.coerce.number().int().min(0).max(5000).optional(),
25
+ type: V1BookmarkTypeSchema.optional(),
26
+ slug: z.string().min(1).optional()
27
+ }).superRefine((q, ctx) => {
28
+ if (q.slug != null && q.type == null) {
29
+ ctx.addIssue({
30
+ code: 'custom',
31
+ path: ['type'],
32
+ message: 'type is required when slug is provided'
33
+ });
34
+ }
35
+ });
36
+ const BookmarkProjectCardSchema = V1ProjectsItemSchema.omit({
37
+ relatedPostsOrdered: true
38
+ });
39
+ export const V1BookmarkItemSchema = z.discriminatedUnion('type', [z.object({
40
+ id: z.string(),
41
+ createdAt: z.iso.datetime().nullable(),
42
+ type: z.literal('post'),
43
+ post: PostContentSchema
44
+ }), z.object({
45
+ id: z.string(),
46
+ createdAt: z.iso.datetime().nullable(),
47
+ type: z.literal('project'),
48
+ project: BookmarkProjectCardSchema
49
+ })]).openapi('BookmarkItem');
50
+ export const V1BookmarksResponseSchema = z.array(V1BookmarkItemSchema);
51
+ registry.registerPath({
52
+ method: 'post',
53
+ path: '/v1/members/me/bookmarks',
54
+ tags: ['Member Bookmarks'],
55
+ description: 'Bookmark a published post or project for the authenticated member. Duplicate returns 409.',
56
+ request: {
57
+ body: {
58
+ content: {
59
+ 'application/json': {
60
+ schema: V1CreateBookmarkBodySchema
61
+ }
62
+ }
63
+ }
64
+ },
65
+ responses: {
66
+ 200: {
67
+ description: 'Created',
68
+ content: {
69
+ 'application/json': {
70
+ schema: V1CreateBookmarkResponseSchema
71
+ }
72
+ }
73
+ },
74
+ 400: {
75
+ description: 'Invalid body',
76
+ content: {
77
+ 'application/json': {
78
+ schema: RestErrorBodySchema
79
+ }
80
+ }
81
+ },
82
+ 401: {
83
+ description: 'Unauthorized',
84
+ content: {
85
+ 'application/json': {
86
+ schema: RestErrorBodySchema
87
+ }
88
+ }
89
+ },
90
+ 403: {
91
+ description: 'Forbidden',
92
+ content: {
93
+ 'application/json': {
94
+ schema: RestErrorBodySchema
95
+ }
96
+ }
97
+ },
98
+ 404: {
99
+ description: 'Member or target not found / not public',
100
+ content: {
101
+ 'application/json': {
102
+ schema: RestErrorBodySchema
103
+ }
104
+ }
105
+ },
106
+ 409: {
107
+ description: 'Already bookmarked',
108
+ content: {
109
+ 'application/json': {
110
+ schema: RestErrorBodySchema
111
+ }
112
+ }
113
+ }
114
+ }
115
+ });
116
+ registry.registerPath({
117
+ method: 'delete',
118
+ path: '/v1/members/me/bookmarks/{id}',
119
+ tags: ['Member Bookmarks'],
120
+ description: 'Remove a bookmark by row id. Only the owner can delete.',
121
+ request: {
122
+ params: V1BookmarkPathIdSchema
123
+ },
124
+ responses: {
125
+ 200: {
126
+ description: 'Deleted',
127
+ content: {
128
+ 'application/json': {
129
+ schema: V1DeleteBookmarkResponseSchema
130
+ }
131
+ }
132
+ },
133
+ 400: {
134
+ description: 'Invalid path id',
135
+ content: {
136
+ 'application/json': {
137
+ schema: RestErrorBodySchema
138
+ }
139
+ }
140
+ },
141
+ 401: {
142
+ description: 'Unauthorized',
143
+ content: {
144
+ 'application/json': {
145
+ schema: RestErrorBodySchema
146
+ }
147
+ }
148
+ },
149
+ 403: {
150
+ description: 'Not owner of this bookmark',
151
+ content: {
152
+ 'application/json': {
153
+ schema: RestErrorBodySchema
154
+ }
155
+ }
156
+ },
157
+ 404: {
158
+ description: 'Bookmark not found',
159
+ content: {
160
+ 'application/json': {
161
+ schema: RestErrorBodySchema
162
+ }
163
+ }
164
+ }
165
+ }
166
+ });
167
+ registry.registerPath({
168
+ method: 'get',
169
+ path: '/v1/members/me/bookmarks',
170
+ tags: ['Member Bookmarks'],
171
+ description: 'List the authenticated member bookmarks, newest first. Optional `type` filters; optional `slug` (requires `type`) returns the matching row if saved.',
172
+ request: {
173
+ query: V1BookmarksQuerySchema
174
+ },
175
+ responses: {
176
+ 200: {
177
+ description: 'Success',
178
+ content: {
179
+ 'application/json': {
180
+ schema: V1BookmarksResponseSchema
181
+ }
182
+ }
183
+ },
184
+ 400: {
185
+ description: 'Invalid query',
186
+ content: {
187
+ 'application/json': {
188
+ schema: RestErrorBodySchema
189
+ }
190
+ }
191
+ },
192
+ 401: {
193
+ description: 'Unauthorized',
194
+ content: {
195
+ 'application/json': {
196
+ schema: RestErrorBodySchema
197
+ }
198
+ }
199
+ },
200
+ 403: {
201
+ description: 'Forbidden',
202
+ content: {
203
+ 'application/json': {
204
+ schema: RestErrorBodySchema
205
+ }
206
+ }
207
+ },
208
+ 404: {
209
+ description: 'Member not found',
210
+ content: {
211
+ 'application/json': {
212
+ schema: RestErrorBodySchema
213
+ }
214
+ }
215
+ }
216
+ }
217
+ });
218
+ //# sourceMappingURL=bookmarks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookmarks.js","names":["extendZodWithOpenApi","z","RestErrorBodySchema","PostContentSchema","registry","V1ProjectsItemSchema","V1BookmarkTypeSchema","enum","V1CreateBookmarkBodySchema","object","type","slug","string","min","V1CreateBookmarkResponseSchema","id","V1DeleteBookmarkResponseSchema","V1BookmarkPathIdSchema","coerce","number","int","positive","V1BookmarksQuerySchema","take","max","optional","skip","superRefine","q","ctx","addIssue","code","path","message","BookmarkProjectCardSchema","omit","relatedPostsOrdered","V1BookmarkItemSchema","discriminatedUnion","createdAt","iso","datetime","nullable","literal","post","project","openapi","V1BookmarksResponseSchema","array","registerPath","method","tags","description","request","body","content","schema","responses","params","query"],"sources":["../../src/schemas/bookmarks.ts"],"sourcesContent":["import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi'\nimport { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\nimport { PostContentSchema, registry, V1ProjectsItemSchema } from './content.js'\n\nextendZodWithOpenApi(z)\n\nexport const V1BookmarkTypeSchema = z.enum(['post', 'project'])\n\nexport const V1CreateBookmarkBodySchema = z.object({\n type: V1BookmarkTypeSchema,\n slug: z.string().min(1),\n})\n\nexport const V1CreateBookmarkResponseSchema = z.object({\n id: z.string(),\n type: V1BookmarkTypeSchema,\n slug: z.string(),\n})\n\nexport const V1DeleteBookmarkResponseSchema = z.object({\n id: z.string(),\n})\n\nexport const V1BookmarkPathIdSchema = z.object({\n id: z.coerce.number().int().positive(),\n})\n\nexport const V1BookmarksQuerySchema = z\n .object({\n take: z.coerce.number().int().min(1).max(50).optional(),\n skip: z.coerce.number().int().min(0).max(5000).optional(),\n type: V1BookmarkTypeSchema.optional(),\n slug: z.string().min(1).optional(),\n })\n .superRefine((q, ctx) => {\n if (q.slug != null && q.type == null) {\n ctx.addIssue({\n code: 'custom',\n path: ['type'],\n message: 'type is required when slug is provided',\n })\n }\n })\n\nconst BookmarkProjectCardSchema = V1ProjectsItemSchema.omit({\n relatedPostsOrdered: true,\n})\n\nexport const V1BookmarkItemSchema = z\n .discriminatedUnion('type', [\n z.object({\n id: z.string(),\n createdAt: z.iso.datetime().nullable(),\n type: z.literal('post'),\n post: PostContentSchema,\n }),\n z.object({\n id: z.string(),\n createdAt: z.iso.datetime().nullable(),\n type: z.literal('project'),\n project: BookmarkProjectCardSchema,\n }),\n ])\n .openapi('BookmarkItem')\n\nexport const V1BookmarksResponseSchema = z.array(V1BookmarkItemSchema)\n\nregistry.registerPath({\n method: 'post',\n path: '/v1/members/me/bookmarks',\n tags: ['Member Bookmarks'],\n description:\n 'Bookmark a published post or project for the authenticated member. Duplicate returns 409.',\n request: {\n body: {\n content: {\n 'application/json': { schema: V1CreateBookmarkBodySchema },\n },\n },\n },\n responses: {\n 200: {\n description: 'Created',\n content: {\n 'application/json': { schema: V1CreateBookmarkResponseSchema },\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 or target not found / not public',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 409: {\n description: 'Already bookmarked',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'delete',\n path: '/v1/members/me/bookmarks/{id}',\n tags: ['Member Bookmarks'],\n description: 'Remove a bookmark by row id. Only the owner can delete.',\n request: {\n params: V1BookmarkPathIdSchema,\n },\n responses: {\n 200: {\n description: 'Deleted',\n content: {\n 'application/json': { schema: V1DeleteBookmarkResponseSchema },\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 bookmark',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Bookmark not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n },\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/members/me/bookmarks',\n tags: ['Member Bookmarks'],\n description:\n 'List the authenticated member bookmarks, newest first. Optional `type` filters; optional `slug` (requires `type`) returns the matching row if saved.',\n request: {\n query: V1BookmarksQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1BookmarksResponseSchema },\n },\n },\n 400: {\n description: 'Invalid query',\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"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,gCAAgC;AACrE,SAASC,CAAC,QAAQ,KAAK;AAEvB,SAASC,mBAAmB,QAAQ,YAAY;AAChD,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,oBAAoB,QAAQ,cAAc;AAEhFL,oBAAoB,CAACC,CAAC,CAAC;AAEvB,OAAO,MAAMK,oBAAoB,GAAGL,CAAC,CAACM,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAE/D,OAAO,MAAMC,0BAA0B,GAAGP,CAAC,CAACQ,MAAM,CAAC;EACjDC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AAE;IACjE,CAAC;IACD,GAAG,EAAE;MACHkD,WAAW,EAAE,WAAW;MACxBG,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEtD;QAAoB;MAAE;IACjE,CAAC;IACD,GAAG,EAAE;MACHkD,WAAW,EAAE,kBAAkB;MAC/BG,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEtD;QAAoB;MAAE;IACjE;EACF;AACF,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kids-reporter/api-types",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [