@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,9 @@
1
+ export * from './openapi.js';
2
+ export * from './rest.js';
3
+ export * from './schemas/content.js';
4
+ export * from './schemas/content-feed-queries.js';
5
+ export * from './schemas/content-feed-responses.js';
6
+ export * from './schemas/extra-openapi-paths.js';
7
+ export * from './schemas/member-essay-answers-has-liked.js';
8
+ export * from './schemas/qna.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ export * from './openapi.js';
2
+ export * from './rest.js';
3
+ export * from './schemas/content.js';
4
+ export * from './schemas/content-feed-queries.js';
5
+ export * from './schemas/content-feed-responses.js';
6
+ export * from './schemas/extra-openapi-paths.js';
7
+ export * from './schemas/member-essay-answers-has-liked.js';
8
+ export * from './schemas/qna.js';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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":[]}
@@ -0,0 +1,43 @@
1
+ import './schemas/extra-openapi-paths.js';
2
+ import './schemas/qna.js';
3
+ export declare function getOpenApiDocument(): {
4
+ tags: ({
5
+ readonly name: "Infra";
6
+ readonly description: "Health and service metadata.";
7
+ } | {
8
+ readonly name: "Auth";
9
+ readonly description: "Browser cookie exchange for Bearer JWT.";
10
+ } | {
11
+ readonly name: "Posts";
12
+ readonly description: "Articles and post-derived public feeds.";
13
+ } | {
14
+ readonly name: "Projects";
15
+ readonly description: "Topic / project listings and detail.";
16
+ } | {
17
+ readonly name: "Taxonomy";
18
+ readonly description: "Categories, tags, authors, and feed by slug.";
19
+ } | {
20
+ readonly name: "Sitemaps";
21
+ readonly description: "Sitemap entry lists.";
22
+ } | {
23
+ readonly name: "Editor";
24
+ readonly description: "Homepage editor picks and related settings.";
25
+ } | {
26
+ readonly name: "Members";
27
+ readonly description: "Authenticated member profile and avatar.";
28
+ } | {
29
+ readonly name: "Member Q&A";
30
+ readonly description: "Member-scoped choice/essay answers and likes.";
31
+ } | {
32
+ readonly name: "Public Q&A";
33
+ readonly description: "Public essay Q&A listings and question threads.";
34
+ })[];
35
+ openapi: string;
36
+ info: import("openapi3-ts/oas30").InfoObject;
37
+ servers?: import("openapi3-ts/oas30").ServerObject[];
38
+ paths: import("openapi3-ts/oas30").PathsObject;
39
+ components?: import("openapi3-ts/oas30").ComponentsObject;
40
+ security?: import("openapi3-ts/oas30").SecurityRequirementObject[];
41
+ externalDocs?: import("openapi3-ts/oas30").ExternalDocumentationObject;
42
+ };
43
+ //# sourceMappingURL=openapi.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,50 @@
1
+ import './schemas/extra-openapi-paths.js';
2
+ import './schemas/qna.js';
3
+ import { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi';
4
+ import { registry } from './schemas/content.js';
5
+ const openApiRootTags = [{
6
+ name: 'Infra',
7
+ description: 'Health and service metadata.'
8
+ }, {
9
+ name: 'Auth',
10
+ description: 'Browser cookie exchange for Bearer JWT.'
11
+ }, {
12
+ name: 'Posts',
13
+ description: 'Articles and post-derived public feeds.'
14
+ }, {
15
+ name: 'Projects',
16
+ description: 'Topic / project listings and detail.'
17
+ }, {
18
+ name: 'Taxonomy',
19
+ description: 'Categories, tags, authors, and feed by slug.'
20
+ }, {
21
+ name: 'Sitemaps',
22
+ description: 'Sitemap entry lists.'
23
+ }, {
24
+ name: 'Editor',
25
+ description: 'Homepage editor picks and related settings.'
26
+ }, {
27
+ name: 'Members',
28
+ description: 'Authenticated member profile and avatar.'
29
+ }, {
30
+ name: 'Member Q&A',
31
+ description: 'Member-scoped choice/essay answers and likes.'
32
+ }, {
33
+ name: 'Public Q&A',
34
+ description: 'Public essay Q&A listings and question threads.'
35
+ }];
36
+ export function getOpenApiDocument() {
37
+ const generator = new OpenApiGeneratorV3(registry.definitions);
38
+ return {
39
+ ...generator.generateDocument({
40
+ openapi: '3.0.3',
41
+ info: {
42
+ title: 'Kids Reporter Content API',
43
+ version: '0.0.1',
44
+ description: '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`).'
45
+ }
46
+ }),
47
+ tags: [...openApiRootTags]
48
+ };
49
+ }
50
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +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":[]}
package/dist/rest.d.ts ADDED
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ export declare const RestErrorCodeSchema: z.ZodEnum<{
3
+ invalid_request: "invalid_request";
4
+ unauthorized: "unauthorized";
5
+ forbidden: "forbidden";
6
+ not_found: "not_found";
7
+ conflict: "conflict";
8
+ upstream_error: "upstream_error";
9
+ service_unavailable: "service_unavailable";
10
+ internal_server_error: "internal_server_error";
11
+ }>;
12
+ export type RestErrorCode = z.infer<typeof RestErrorCodeSchema>;
13
+ export declare const RestErrorBodySchema: z.ZodObject<{
14
+ error: z.ZodObject<{
15
+ code: z.ZodEnum<{
16
+ invalid_request: "invalid_request";
17
+ unauthorized: "unauthorized";
18
+ forbidden: "forbidden";
19
+ not_found: "not_found";
20
+ conflict: "conflict";
21
+ upstream_error: "upstream_error";
22
+ service_unavailable: "service_unavailable";
23
+ internal_server_error: "internal_server_error";
24
+ }>;
25
+ message: z.ZodString;
26
+ details: z.ZodOptional<z.ZodUnknown>;
27
+ }, z.core.$strip>;
28
+ }, z.core.$strip>;
29
+ export type RestErrorBody = z.infer<typeof RestErrorBodySchema>;
30
+ export declare const RestOkSchema: z.ZodObject<{
31
+ status: z.ZodLiteral<"success">;
32
+ data: z.ZodUnknown;
33
+ }, z.core.$strip>;
34
+ export declare const RestFailSchema: z.ZodObject<{
35
+ status: z.ZodLiteral<"fail">;
36
+ data: z.ZodUnknown;
37
+ }, z.core.$strip>;
38
+ export declare const RestErrorSchema: z.ZodObject<{
39
+ status: z.ZodLiteral<"error">;
40
+ message: z.ZodOptional<z.ZodString>;
41
+ error: z.ZodOptional<z.ZodUnknown>;
42
+ errors: z.ZodOptional<z.ZodUnknown>;
43
+ }, z.core.$strip>;
44
+ export declare const RestEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
45
+ status: z.ZodLiteral<"success">;
46
+ data: z.ZodUnknown;
47
+ }, z.core.$strip>, z.ZodObject<{
48
+ status: z.ZodLiteral<"fail">;
49
+ data: z.ZodUnknown;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ status: z.ZodLiteral<"error">;
52
+ message: z.ZodOptional<z.ZodString>;
53
+ error: z.ZodOptional<z.ZodUnknown>;
54
+ errors: z.ZodOptional<z.ZodUnknown>;
55
+ }, z.core.$strip>]>;
56
+ export type RestEnvelope = z.infer<typeof RestEnvelopeSchema>;
57
+ //# sourceMappingURL=rest.d.ts.map
@@ -0,0 +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"}
package/dist/rest.js ADDED
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ export const RestErrorCodeSchema = z.enum(['invalid_request', 'unauthorized', 'forbidden', 'not_found', 'conflict', 'upstream_error', 'service_unavailable', 'internal_server_error']);
3
+ export const RestErrorBodySchema = z.object({
4
+ error: z.object({
5
+ code: RestErrorCodeSchema,
6
+ message: z.string(),
7
+ /** `z.json()` is recursive and breaks zod-to-openapi (stack overflow on /openapi.json). */
8
+ details: z.unknown().optional()
9
+ })
10
+ });
11
+ export const RestOkSchema = z.object({
12
+ status: z.literal('success'),
13
+ data: z.unknown()
14
+ });
15
+ export const RestFailSchema = z.object({
16
+ status: z.literal('fail'),
17
+ data: z.unknown()
18
+ });
19
+ export const RestErrorSchema = z.object({
20
+ status: z.literal('error'),
21
+ message: z.string().optional(),
22
+ error: z.unknown().optional(),
23
+ errors: z.unknown().optional()
24
+ });
25
+ export const RestEnvelopeSchema = z.union([RestOkSchema, RestFailSchema, RestErrorSchema]);
26
+ //# sourceMappingURL=rest.js.map
@@ -0,0 +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,g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category / sub-subcategory / tag / author feed routes. */
3
+ export declare const V1FeedSlugPathParamsSchema: z.ZodObject<{
4
+ slug: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const V1CategoryPostsQuerySchema: z.ZodObject<{
7
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
8
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
9
+ }, z.core.$strip>;
10
+ export declare const V1CategoryBySlugMetadataQuerySchema: z.ZodObject<{
11
+ subcategorySlug: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ export declare const V1SubSubcategoryBySlugPostsQuerySchema: z.ZodObject<{
14
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
15
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
16
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
17
+ "publishedDate:desc": "publishedDate:desc";
18
+ }>>>;
19
+ }, z.core.$strip>;
20
+ export declare const V1TagBySlugPostsQuerySchema: z.ZodObject<{
21
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
22
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
23
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
24
+ "publishedDate:desc": "publishedDate:desc";
25
+ }>>>;
26
+ }, z.core.$strip>;
27
+ export declare const V1AuthorBySlugPostsQuerySchema: z.ZodObject<{
28
+ take: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
29
+ skip: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
30
+ orderBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
31
+ "publishedDate:desc": "publishedDate:desc";
32
+ }>>>;
33
+ }, z.core.$strip>;
34
+ //# sourceMappingURL=content-feed-queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-feed-queries.d.ts","sourceRoot":"","sources":["../../src/schemas/content-feed-queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,6FAA6F;AAC7F,eAAO,MAAM,0BAA0B;;iBAErC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AAEF,eAAO,MAAM,mCAAmC;;iBAE9C,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;;iBAOjD,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;iBACA,CAAA;AAExC,eAAO,MAAM,8BAA8B;;;;;;iBACH,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+
3
+ /** Path `{slug}` for category / subcategory / sub-subcategory / tag / author feed routes. */
4
+ export const V1FeedSlugPathParamsSchema = z.object({
5
+ slug: z.string()
6
+ });
7
+ export const V1CategoryPostsQuerySchema = z.object({
8
+ take: z.coerce.number().int().min(1).max(50).optional(),
9
+ skip: z.coerce.number().int().min(0).max(5000).optional()
10
+ });
11
+ export const V1CategoryBySlugMetadataQuerySchema = z.object({
12
+ subcategorySlug: z.string().optional()
13
+ });
14
+ export const V1SubSubcategoryBySlugPostsQuerySchema = z.object({
15
+ take: z.coerce.number().int().min(1).max(50).optional(),
16
+ skip: z.coerce.number().int().min(0).max(5000).optional(),
17
+ orderBy: z.enum(['publishedDate:desc']).optional().default('publishedDate:desc')
18
+ });
19
+ export const V1TagBySlugPostsQuerySchema = V1SubSubcategoryBySlugPostsQuerySchema;
20
+ export const V1AuthorBySlugPostsQuerySchema = V1SubSubcategoryBySlugPostsQuerySchema;
21
+ //# sourceMappingURL=content-feed-queries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-feed-queries.js","names":["z","V1FeedSlugPathParamsSchema","object","slug","string","V1CategoryPostsQuerySchema","take","coerce","number","int","min","max","optional","skip","V1CategoryBySlugMetadataQuerySchema","subcategorySlug","V1SubSubcategoryBySlugPostsQuerySchema","orderBy","enum","default","V1TagBySlugPostsQuerySchema","V1AuthorBySlugPostsQuerySchema"],"sources":["../../src/schemas/content-feed-queries.ts"],"sourcesContent":["import { z } from 'zod'\n\n/** Path `{slug}` for category / subcategory / sub-subcategory / tag / author feed routes. */\nexport const V1FeedSlugPathParamsSchema = z.object({\n slug: z.string(),\n})\n\nexport const V1CategoryPostsQuerySchema = z.object({\n take: z.coerce.number().int().min(1).max(50).optional(),\n skip: z.coerce.number().int().min(0).max(5000).optional(),\n})\n\nexport const V1CategoryBySlugMetadataQuerySchema = z.object({\n subcategorySlug: z.string().optional(),\n})\n\nexport const V1SubSubcategoryBySlugPostsQuerySchema = z.object({\n take: z.coerce.number().int().min(1).max(50).optional(),\n skip: z.coerce.number().int().min(0).max(5000).optional(),\n orderBy: z\n .enum(['publishedDate:desc'])\n .optional()\n .default('publishedDate:desc'),\n})\n\nexport const V1TagBySlugPostsQuerySchema =\n V1SubSubcategoryBySlugPostsQuerySchema\n\nexport const V1AuthorBySlugPostsQuerySchema =\n V1SubSubcategoryBySlugPostsQuerySchema\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;;AAEvB;AACA,OAAO,MAAMC,0BAA0B,GAAGD,CAAC,CAACE,MAAM,CAAC;EACjDC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMC,0BAA0B,GAAGL,CAAC,CAACE,MAAM,CAAC;EACjDI,IAAI,EAAEN,CAAC,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC;EACvDC,IAAI,EAAEb,CAAC,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,IAAI,CAAC,CAACC,QAAQ,CAAC;AAC1D,CAAC,CAAC;AAEF,OAAO,MAAME,mCAAmC,GAAGd,CAAC,CAACE,MAAM,CAAC;EAC1Da,eAAe,EAAEf,CAAC,CAACI,MAAM,CAAC,CAAC,CAACQ,QAAQ,CAAC;AACvC,CAAC,CAAC;AAEF,OAAO,MAAMI,sCAAsC,GAAGhB,CAAC,CAACE,MAAM,CAAC;EAC7DI,IAAI,EAAEN,CAAC,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC;EACvDC,IAAI,EAAEb,CAAC,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,IAAI,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzDK,OAAO,EAAEjB,CAAC,CACPkB,IAAI,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAC5BN,QAAQ,CAAC,CAAC,CACVO,OAAO,CAAC,oBAAoB;AACjC,CAAC,CAAC;AAEF,OAAO,MAAMC,2BAA2B,GACtCJ,sCAAsC;AAExC,OAAO,MAAMK,8BAA8B,GACzCL,sCAAsC","ignoreList":[]}
@@ -0,0 +1,192 @@
1
+ import { z } from 'zod';
2
+ /** OG image with medium resized URL (category metadata). */
3
+ export declare const OgResizedMediumSchema: z.ZodOptional<z.ZodNullable<z.ZodObject<{
4
+ resized: z.ZodObject<{
5
+ medium: z.ZodString;
6
+ }, z.core.$strip>;
7
+ }, z.core.$strip>>>;
8
+ /** Response JSON; category slug is in the path. */
9
+ export declare const V1CategoryBySlugCategoryPostsResponseSchema: z.ZodObject<{
10
+ relatedPosts: z.ZodArray<z.ZodObject<{
11
+ title: z.ZodString;
12
+ slug: z.ZodString;
13
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
15
+ resized: z.ZodObject<{
16
+ small: z.ZodDefault<z.ZodString>;
17
+ }, z.core.$strip>;
18
+ }, z.core.$strip>>>;
19
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
20
+ name: z.ZodString;
21
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
+ name: z.ZodString;
23
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
24
+ slug: z.ZodString;
25
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ }, z.core.$strip>>>;
27
+ }, z.core.$strip>>>;
28
+ }, z.core.$strip>>>;
29
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
30
+ }, z.core.$strip>>;
31
+ relatedPostsCount: z.ZodNumber;
32
+ }, z.core.$strip>;
33
+ export declare const V1CategoryBySlugMetadataResponseSchema: z.ZodObject<{
34
+ ogTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ ogImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
37
+ resized: z.ZodObject<{
38
+ medium: z.ZodString;
39
+ }, z.core.$strip>;
40
+ }, z.core.$strip>>>;
41
+ subcategories: z.ZodDefault<z.ZodArray<z.ZodObject<{
42
+ ogTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ ogImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
45
+ resized: z.ZodObject<{
46
+ medium: z.ZodString;
47
+ }, z.core.$strip>;
48
+ }, z.core.$strip>>>;
49
+ }, z.core.$strip>>>;
50
+ }, z.core.$strip>;
51
+ export declare const V1CategoryBySlugSubcategoriesThemeResponseSchema: z.ZodObject<{
52
+ name: z.ZodString;
53
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ subcategories: z.ZodArray<z.ZodObject<{
55
+ name: z.ZodString;
56
+ slug: z.ZodString;
57
+ }, z.core.$strip>>;
58
+ }, z.core.$strip>;
59
+ export declare const V1SubcategoryBySlugPostsResponseSchema: z.ZodObject<{
60
+ relatedPosts: z.ZodArray<z.ZodObject<{
61
+ title: z.ZodString;
62
+ slug: z.ZodString;
63
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
65
+ resized: z.ZodObject<{
66
+ small: z.ZodDefault<z.ZodString>;
67
+ }, z.core.$strip>;
68
+ }, z.core.$strip>>>;
69
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
70
+ name: z.ZodString;
71
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
72
+ name: z.ZodString;
73
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
74
+ slug: z.ZodString;
75
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ }, z.core.$strip>>>;
77
+ }, z.core.$strip>>>;
78
+ }, z.core.$strip>>>;
79
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
80
+ }, z.core.$strip>>;
81
+ relatedPostsCount: z.ZodNumber;
82
+ category: z.ZodObject<{
83
+ slug: z.ZodString;
84
+ }, z.core.$strip>;
85
+ }, z.core.$strip>;
86
+ export declare const V1SubSubcategoryBySlugPostsResponseSchema: z.ZodObject<{
87
+ relatedPosts: z.ZodArray<z.ZodObject<{
88
+ title: z.ZodString;
89
+ slug: z.ZodString;
90
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
92
+ resized: z.ZodObject<{
93
+ small: z.ZodDefault<z.ZodString>;
94
+ }, z.core.$strip>;
95
+ }, z.core.$strip>>>;
96
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
+ name: z.ZodString;
98
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
99
+ name: z.ZodString;
100
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
101
+ slug: z.ZodString;
102
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ }, z.core.$strip>>>;
104
+ }, z.core.$strip>>>;
105
+ }, z.core.$strip>>>;
106
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
107
+ }, z.core.$strip>>;
108
+ relatedPostsCount: z.ZodNumber;
109
+ subcategory: z.ZodObject<{
110
+ slug: z.ZodString;
111
+ category: z.ZodObject<{
112
+ slug: z.ZodString;
113
+ }, z.core.$strip>;
114
+ }, z.core.$strip>;
115
+ }, z.core.$strip>;
116
+ export declare const V1TagBySlugMetaResponseSchema: z.ZodObject<{
117
+ ogTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ ogImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
120
+ resized: z.ZodObject<{
121
+ small: z.ZodString;
122
+ }, z.core.$strip>;
123
+ }, z.core.$strip>>>;
124
+ }, z.core.$strip>;
125
+ export declare const V1TagBySlugPostsResponseSchema: z.ZodObject<{
126
+ posts: z.ZodArray<z.ZodObject<{
127
+ title: z.ZodString;
128
+ slug: z.ZodString;
129
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
131
+ resized: z.ZodObject<{
132
+ small: z.ZodDefault<z.ZodString>;
133
+ }, z.core.$strip>;
134
+ }, z.core.$strip>>>;
135
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
136
+ name: z.ZodString;
137
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
138
+ name: z.ZodString;
139
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
140
+ slug: z.ZodString;
141
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
+ }, z.core.$strip>>>;
143
+ }, z.core.$strip>>>;
144
+ }, z.core.$strip>>>;
145
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
146
+ }, z.core.$strip>>;
147
+ postsCount: z.ZodNumber;
148
+ name: z.ZodString;
149
+ }, z.core.$strip>;
150
+ export declare const V1AuthorBySlugMetaResponseSchema: z.ZodObject<{
151
+ slug: z.ZodString;
152
+ name: z.ZodString;
153
+ bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
154
+ image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
155
+ resized: z.ZodObject<{
156
+ small: z.ZodString;
157
+ }, z.core.$strip>;
158
+ }, z.core.$strip>>>;
159
+ }, z.core.$strip>;
160
+ export declare const V1AuthorBySlugPostsResponseSchema: z.ZodObject<{
161
+ bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ name: z.ZodString;
163
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
+ avatar: z.ZodOptional<z.ZodNullable<z.ZodObject<{
165
+ resized: z.ZodObject<{
166
+ tiny: z.ZodString;
167
+ }, z.core.$strip>;
168
+ }, z.core.$strip>>>;
169
+ posts: z.ZodArray<z.ZodObject<{
170
+ title: z.ZodString;
171
+ slug: z.ZodString;
172
+ ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ heroImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
174
+ resized: z.ZodObject<{
175
+ small: z.ZodDefault<z.ZodString>;
176
+ }, z.core.$strip>;
177
+ }, z.core.$strip>>>;
178
+ subSubcategoriesOrdered: z.ZodDefault<z.ZodArray<z.ZodObject<{
179
+ name: z.ZodString;
180
+ subcategory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
181
+ name: z.ZodString;
182
+ category: z.ZodOptional<z.ZodNullable<z.ZodObject<{
183
+ slug: z.ZodString;
184
+ themeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
+ }, z.core.$strip>>>;
186
+ }, z.core.$strip>>>;
187
+ }, z.core.$strip>>>;
188
+ publishedDate: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
189
+ }, z.core.$strip>>;
190
+ postsCount: z.ZodNumber;
191
+ }, z.core.$strip>;
192
+ //# sourceMappingURL=content-feed-responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-feed-responses.d.ts","sourceRoot":"","sources":["../../src/schemas/content-feed-responses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB;;;;mBAGrB,CAAA;AAEb,mDAAmD;AACnD,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;iBAGtD,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;iBAajD,CAAA;AAEF,eAAO,MAAM,gDAAgD;;;;;;;iBAI3D,CAAA;AAEF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjD,CAAA;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOpD,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;iBAWxC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;iBAIzC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;iBAY3C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc5C,CAAA"}
@@ -0,0 +1,87 @@
1
+ import { z } from 'zod';
2
+ import { PostContentSchema } from './content.js';
3
+
4
+ /** OG image with medium resized URL (category metadata). */
5
+ export const OgResizedMediumSchema = z.object({
6
+ resized: z.object({
7
+ medium: z.string()
8
+ })
9
+ }).nullable().optional();
10
+
11
+ /** Response JSON; category slug is in the path. */
12
+ export const V1CategoryBySlugCategoryPostsResponseSchema = z.object({
13
+ relatedPosts: z.array(PostContentSchema),
14
+ relatedPostsCount: z.number().int().min(0)
15
+ });
16
+ export const V1CategoryBySlugMetadataResponseSchema = z.object({
17
+ ogTitle: z.string().nullable().optional(),
18
+ ogDescription: z.string().nullable().optional(),
19
+ ogImage: OgResizedMediumSchema,
20
+ subcategories: z.array(z.object({
21
+ ogTitle: z.string().nullable().optional(),
22
+ ogDescription: z.string().nullable().optional(),
23
+ ogImage: OgResizedMediumSchema
24
+ })).default([])
25
+ });
26
+ export const V1CategoryBySlugSubcategoriesThemeResponseSchema = z.object({
27
+ name: z.string(),
28
+ themeColor: z.string().nullable().optional(),
29
+ subcategories: z.array(z.object({
30
+ name: z.string(),
31
+ slug: z.string()
32
+ }))
33
+ });
34
+ export const V1SubcategoryBySlugPostsResponseSchema = z.object({
35
+ relatedPosts: z.array(PostContentSchema),
36
+ relatedPostsCount: z.number().int().min(0),
37
+ category: z.object({
38
+ slug: z.string()
39
+ })
40
+ });
41
+ export const V1SubSubcategoryBySlugPostsResponseSchema = z.object({
42
+ relatedPosts: z.array(PostContentSchema),
43
+ relatedPostsCount: z.number().int().min(0),
44
+ subcategory: z.object({
45
+ slug: z.string(),
46
+ category: z.object({
47
+ slug: z.string()
48
+ })
49
+ })
50
+ });
51
+ export const V1TagBySlugMetaResponseSchema = z.object({
52
+ ogTitle: z.string().nullable().optional(),
53
+ ogDescription: z.string().nullable().optional(),
54
+ ogImage: z.object({
55
+ resized: z.object({
56
+ small: z.string()
57
+ })
58
+ }).nullable().optional()
59
+ });
60
+ export const V1TagBySlugPostsResponseSchema = z.object({
61
+ posts: z.array(PostContentSchema),
62
+ postsCount: z.number().int().min(0),
63
+ name: z.string()
64
+ });
65
+ export const V1AuthorBySlugMetaResponseSchema = z.object({
66
+ slug: z.string(),
67
+ name: z.string(),
68
+ bio: z.string().nullable().optional(),
69
+ image: z.object({
70
+ resized: z.object({
71
+ small: z.string()
72
+ })
73
+ }).nullable().optional()
74
+ });
75
+ export const V1AuthorBySlugPostsResponseSchema = z.object({
76
+ bio: z.string().nullable().optional(),
77
+ name: z.string(),
78
+ email: z.string().nullable().optional(),
79
+ avatar: z.object({
80
+ resized: z.object({
81
+ tiny: z.string()
82
+ })
83
+ }).nullable().optional(),
84
+ posts: z.array(PostContentSchema),
85
+ postsCount: z.number().int().min(0)
86
+ });
87
+ //# sourceMappingURL=content-feed-responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-feed-responses.js","names":["z","PostContentSchema","OgResizedMediumSchema","object","resized","medium","string","nullable","optional","V1CategoryBySlugCategoryPostsResponseSchema","relatedPosts","array","relatedPostsCount","number","int","min","V1CategoryBySlugMetadataResponseSchema","ogTitle","ogDescription","ogImage","subcategories","default","V1CategoryBySlugSubcategoriesThemeResponseSchema","name","themeColor","slug","V1SubcategoryBySlugPostsResponseSchema","category","V1SubSubcategoryBySlugPostsResponseSchema","subcategory","V1TagBySlugMetaResponseSchema","small","V1TagBySlugPostsResponseSchema","posts","postsCount","V1AuthorBySlugMetaResponseSchema","bio","image","V1AuthorBySlugPostsResponseSchema","email","avatar","tiny"],"sources":["../../src/schemas/content-feed-responses.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { PostContentSchema } from './content.js'\n\n/** OG image with medium resized URL (category metadata). */\nexport const OgResizedMediumSchema = z\n .object({ resized: z.object({ medium: z.string() }) })\n .nullable()\n .optional()\n\n/** Response JSON; category slug is in the path. */\nexport const V1CategoryBySlugCategoryPostsResponseSchema = z.object({\n relatedPosts: z.array(PostContentSchema),\n relatedPostsCount: z.number().int().min(0),\n})\n\nexport const V1CategoryBySlugMetadataResponseSchema = z.object({\n ogTitle: z.string().nullable().optional(),\n ogDescription: z.string().nullable().optional(),\n ogImage: OgResizedMediumSchema,\n subcategories: z\n .array(\n z.object({\n ogTitle: z.string().nullable().optional(),\n ogDescription: z.string().nullable().optional(),\n ogImage: OgResizedMediumSchema,\n })\n )\n .default([]),\n})\n\nexport const V1CategoryBySlugSubcategoriesThemeResponseSchema = z.object({\n name: z.string(),\n themeColor: z.string().nullable().optional(),\n subcategories: z.array(z.object({ name: z.string(), slug: z.string() })),\n})\n\nexport const V1SubcategoryBySlugPostsResponseSchema = z.object({\n relatedPosts: z.array(PostContentSchema),\n relatedPostsCount: z.number().int().min(0),\n category: z.object({ slug: z.string() }),\n})\n\nexport const V1SubSubcategoryBySlugPostsResponseSchema = z.object({\n relatedPosts: z.array(PostContentSchema),\n relatedPostsCount: z.number().int().min(0),\n subcategory: z.object({\n slug: z.string(),\n category: z.object({ slug: z.string() }),\n }),\n})\n\nexport const V1TagBySlugMetaResponseSchema = z.object({\n ogTitle: z.string().nullable().optional(),\n ogDescription: z.string().nullable().optional(),\n ogImage: z\n .object({\n resized: z.object({\n small: z.string(),\n }),\n })\n .nullable()\n .optional(),\n})\n\nexport const V1TagBySlugPostsResponseSchema = z.object({\n posts: z.array(PostContentSchema),\n postsCount: z.number().int().min(0),\n name: z.string(),\n})\n\nexport const V1AuthorBySlugMetaResponseSchema = z.object({\n slug: z.string(),\n name: z.string(),\n bio: z.string().nullable().optional(),\n image: z\n .object({\n resized: z.object({\n small: z.string(),\n }),\n })\n .nullable()\n .optional(),\n})\n\nexport const V1AuthorBySlugPostsResponseSchema = z.object({\n bio: z.string().nullable().optional(),\n name: z.string(),\n email: z.string().nullable().optional(),\n avatar: z\n .object({\n resized: z.object({\n tiny: z.string(),\n }),\n })\n .nullable()\n .optional(),\n posts: z.array(PostContentSchema),\n postsCount: z.number().int().min(0),\n})\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,SAASC,iBAAiB,QAAQ,cAAc;;AAEhD;AACA,OAAO,MAAMC,qBAAqB,GAAGF,CAAC,CACnCG,MAAM,CAAC;EAAEC,OAAO,EAAEJ,CAAC,CAACG,MAAM,CAAC;IAAEE,MAAM,EAAEL,CAAC,CAACM,MAAM,CAAC;EAAE,CAAC;AAAE,CAAC,CAAC,CACrDC,QAAQ,CAAC,CAAC,CACVC,QAAQ,CAAC,CAAC;;AAEb;AACA,OAAO,MAAMC,2CAA2C,GAAGT,CAAC,CA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