@twreporter-academy/api-types 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +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/course.js';
5
+ export * from './schemas/member.js';
4
6
  export * from './schemas/tag.js';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -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,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,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +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/course.js';
5
+ export * from './schemas/member.js';
4
6
  export * from './schemas/tag.js';
5
7
  //# 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 './api-variables.js'\nexport * from './openapi.js'\nexport * from './rest.js'\nexport * from './schemas/tag.js'\n"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,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/course.js'\nexport * from './schemas/member.js'\nexport * from './schemas/tag.js'\n"],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB","ignoreList":[]}
package/dist/openapi.d.ts CHANGED
@@ -1,8 +1,19 @@
1
+ import './schemas/course.js';
2
+ import './schemas/member.js';
1
3
  export declare function getOpenApiDocument(): {
2
- tags: {
4
+ tags: ({
5
+ readonly name: "Auth";
6
+ readonly description: "Token exchange and session management.";
7
+ } | {
8
+ readonly name: "Members";
9
+ readonly description: "Authenticated member profile.";
10
+ } | {
3
11
  readonly name: "Tags";
4
12
  readonly description: "Tag metadata and course feeds by slug.";
5
- }[];
13
+ } | {
14
+ readonly name: "Courses";
15
+ readonly description: "Course metadata and classroom detail.";
16
+ })[];
6
17
  openapi: string;
7
18
  info: import("openapi3-ts/oas30").InfoObject;
8
19
  servers?: import("openapi3-ts/oas30").ServerObject[];
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB;;;;;;;;;;;;EAcjC"}
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,qBAAqB,CAAA;AAa5B,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAcjC"}
package/dist/openapi.js CHANGED
@@ -1,8 +1,20 @@
1
+ // Side-effect imports: ensure OpenAPI paths are registered before generation.
2
+ import './schemas/course.js';
3
+ import './schemas/member.js';
1
4
  import { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi';
2
5
  import { registry } from './schemas/tag.js';
3
6
  const openApiRootTags = [{
7
+ name: 'Auth',
8
+ description: 'Token exchange and session management.'
9
+ }, {
10
+ name: 'Members',
11
+ description: 'Authenticated member profile.'
12
+ }, {
4
13
  name: 'Tags',
5
14
  description: 'Tag metadata and course feeds by slug.'
15
+ }, {
16
+ name: 'Courses',
17
+ description: 'Course metadata and classroom detail.'
6
18
  }];
7
19
  export function getOpenApiDocument() {
8
20
  const generator = new OpenApiGeneratorV3(registry.definitions);
@@ -12,7 +24,7 @@ export function getOpenApiDocument() {
12
24
  info: {
13
25
  title: 'TWReporter Academy API',
14
26
  version: '0.0.1',
15
- description: 'Academy content API. Serves tag metadata and course feeds.'
27
+ description: 'Academy content API. Serves tag metadata, course feeds, and classroom detail.'
16
28
  }
17
29
  }),
18
30
  tags: [...openApiRootTags]
@@ -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 { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi'\n\nimport { registry } from './schemas/tag.js'\n\nconst openApiRootTags = [\n { name: 'Tags', description: 'Tag metadata and course feeds by slug.' },\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: 'TWReporter Academy API',\n version: '0.0.1',\n description:\n 'Academy content API. Serves tag metadata and course feeds.',\n },\n }),\n tags: [...openApiRootTags],\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,SAASC,QAAQ,QAAQ,kBAAkB;AAE3C,MAAMC,eAAe,GAAG,CACtB;EAAEC,IAAI,EAAE,MAAM;EAAEC,WAAW,EAAE;AAAyC,CAAC,CAC/D;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,wBAAwB;QAC/BC,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":["// Side-effect imports: ensure OpenAPI paths are registered before generation.\nimport './schemas/course.js'\nimport './schemas/member.js'\n\nimport { OpenApiGeneratorV3 } from '@asteasolutions/zod-to-openapi'\n\nimport { registry } from './schemas/tag.js'\n\nconst openApiRootTags = [\n { name: 'Auth', description: 'Token exchange and session management.' },\n { name: 'Members', description: 'Authenticated member profile.' },\n { name: 'Tags', description: 'Tag metadata and course feeds by slug.' },\n { name: 'Courses', description: 'Course metadata and classroom detail.' },\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: 'TWReporter Academy API',\n version: '0.0.1',\n description:\n 'Academy content API. Serves tag metadata, course feeds, and classroom detail.',\n },\n }),\n tags: [...openApiRootTags],\n }\n}\n"],"mappings":"AAAA;AACA,OAAO,qBAAqB;AAC5B,OAAO,qBAAqB;AAE5B,SAASA,kBAAkB,QAAQ,gCAAgC;AAEnE,SAASC,QAAQ,QAAQ,kBAAkB;AAE3C,MAAMC,eAAe,GAAG,CACtB;EAAEC,IAAI,EAAE,MAAM;EAAEC,WAAW,EAAE;AAAyC,CAAC,EACvE;EAAED,IAAI,EAAE,SAAS;EAAEC,WAAW,EAAE;AAAgC,CAAC,EACjE;EAAED,IAAI,EAAE,MAAM;EAAEC,WAAW,EAAE;AAAyC,CAAC,EACvE;EAAED,IAAI,EAAE,SAAS;EAAEC,WAAW,EAAE;AAAwC,CAAC,CACjE;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,wBAAwB;QAC/BC,OAAO,EAAE,OAAO;QAChBR,WAAW,EACT;MACJ;IACF,CAAC,CAAC;IACFS,IAAI,EAAE,CAAC,GAAGX,eAAe;EAC3B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,89 @@
1
+ import { z } from 'zod';
2
+ export declare const V1CourseSlugPathParamsSchema: z.ZodObject<{
3
+ slug: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export declare const V1CourseBySlugMetaResponseSchema: z.ZodObject<{
6
+ ogTitle: z.ZodString;
7
+ ogDescription: z.ZodString;
8
+ ogImage: z.ZodNullable<z.ZodObject<{
9
+ resized: z.ZodObject<{
10
+ small: z.ZodString;
11
+ }, z.core.$strip>;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ export declare const V1CourseLessonSchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ order: z.ZodNumber;
17
+ title: z.ZodString;
18
+ videoId: z.ZodNullable<z.ZodString>;
19
+ durationSeconds: z.ZodNullable<z.ZodNumber>;
20
+ isFree: z.ZodBoolean;
21
+ }, z.core.$strip>;
22
+ export declare const V1CourseInstructorSchema: z.ZodObject<{
23
+ id: z.ZodString;
24
+ slug: z.ZodString;
25
+ name: z.ZodString;
26
+ title: z.ZodString;
27
+ bio: z.ZodString;
28
+ avatarUrl: z.ZodNullable<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ export declare const V1CourseResourceSchema: z.ZodObject<{
31
+ id: z.ZodString;
32
+ title: z.ZodString;
33
+ description: z.ZodString;
34
+ downloadUrl: z.ZodString;
35
+ }, z.core.$strip>;
36
+ export declare const V1CourseFurtherReadingSchema: z.ZodObject<{
37
+ id: z.ZodString;
38
+ title: z.ZodString;
39
+ excerpt: z.ZodString;
40
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
41
+ url: z.ZodString;
42
+ }, z.core.$strip>;
43
+ export declare const V1CourseStatusSchema: z.ZodEnum<{
44
+ published: "published";
45
+ coming_soon: "coming_soon";
46
+ }>;
47
+ export declare const V1CourseBySlugResponseSchema: z.ZodObject<{
48
+ slug: z.ZodString;
49
+ title: z.ZodString;
50
+ subtitle: z.ZodString;
51
+ summary: z.ZodString;
52
+ description: z.ZodString;
53
+ status: z.ZodEnum<{
54
+ published: "published";
55
+ coming_soon: "coming_soon";
56
+ }>;
57
+ tags: z.ZodArray<z.ZodString>;
58
+ previewVideoId: z.ZodNullable<z.ZodString>;
59
+ lessons: z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ order: z.ZodNumber;
62
+ title: z.ZodString;
63
+ videoId: z.ZodNullable<z.ZodString>;
64
+ durationSeconds: z.ZodNullable<z.ZodNumber>;
65
+ isFree: z.ZodBoolean;
66
+ }, z.core.$strip>>;
67
+ instructors: z.ZodArray<z.ZodObject<{
68
+ id: z.ZodString;
69
+ slug: z.ZodString;
70
+ name: z.ZodString;
71
+ title: z.ZodString;
72
+ bio: z.ZodString;
73
+ avatarUrl: z.ZodNullable<z.ZodString>;
74
+ }, z.core.$strip>>;
75
+ resources: z.ZodArray<z.ZodObject<{
76
+ id: z.ZodString;
77
+ title: z.ZodString;
78
+ description: z.ZodString;
79
+ downloadUrl: z.ZodString;
80
+ }, z.core.$strip>>;
81
+ furtherReading: z.ZodArray<z.ZodObject<{
82
+ id: z.ZodString;
83
+ title: z.ZodString;
84
+ excerpt: z.ZodString;
85
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
86
+ url: z.ZodString;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>;
89
+ //# sourceMappingURL=course.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"course.d.ts","sourceRoot":"","sources":["../../src/schemas/course.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;iBAI3C,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;iBAYP,CAAA;AAE1B,eAAO,MAAM,wBAAwB;;;;;;;iBASP,CAAA;AAE9B,eAAO,MAAM,sBAAsB;;;;;iBAQP,CAAA;AAE5B,eAAO,MAAM,4BAA4B;;;;;;iBAQP,CAAA;AAElC,eAAO,MAAM,oBAAoB;;;EAAuC,CAAA;AAExE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBf,CAAA"}
@@ -0,0 +1,147 @@
1
+ import { z } from 'zod';
2
+ import { RestErrorBodySchema } from '../rest.js';
3
+ import { CourseThumbnailSchema, registry } from './tag.js';
4
+ export const V1CourseSlugPathParamsSchema = z.object({
5
+ slug: z.string().min(1).max(200)
6
+ });
7
+ export const V1CourseBySlugMetaResponseSchema = z.object({
8
+ ogTitle: z.string(),
9
+ ogDescription: z.string(),
10
+ ogImage: CourseThumbnailSchema.nullable()
11
+ });
12
+ export const V1CourseLessonSchema = z.object({
13
+ id: z.string(),
14
+ order: z.number().int(),
15
+ title: z.string(),
16
+ /** Cloudflare stream id for this lesson; null when not yet set */
17
+ videoId: z.string().nullable(),
18
+ /** Video length in seconds (from CMS); null when not yet set */
19
+ durationSeconds: z.number().int().nullable(),
20
+ /** CMS 免費試看 flag; playback access is decided by user role (out of scope here) */
21
+ isFree: z.boolean()
22
+ }).openapi('CourseLesson');
23
+ export const V1CourseInstructorSchema = z.object({
24
+ id: z.string(),
25
+ slug: z.string(),
26
+ name: z.string(),
27
+ title: z.string(),
28
+ bio: z.string(),
29
+ avatarUrl: z.string().nullable()
30
+ }).openapi('CourseInstructor');
31
+ export const V1CourseResourceSchema = z.object({
32
+ id: z.string(),
33
+ title: z.string(),
34
+ description: z.string(),
35
+ /** GCS file URL with ?download=true; empty when no PDF uploaded */
36
+ downloadUrl: z.string()
37
+ }).openapi('CourseResource');
38
+ export const V1CourseFurtherReadingSchema = z.object({
39
+ id: z.string(),
40
+ title: z.string(),
41
+ excerpt: z.string(),
42
+ thumbnailUrl: z.string().nullable(),
43
+ url: z.string()
44
+ }).openapi('CourseFurtherReading');
45
+ export const V1CourseStatusSchema = z.enum(['published', 'coming_soon']);
46
+ export const V1CourseBySlugResponseSchema = z.object({
47
+ slug: z.string(),
48
+ title: z.string(),
49
+ subtitle: z.string(),
50
+ summary: z.string(),
51
+ description: z.string(),
52
+ /** published: full payload; coming_soon: lessons/resources/furtherReading/previewVideoId stripped */
53
+ status: V1CourseStatusSchema,
54
+ tags: z.array(z.string()),
55
+ /** Trial/preview stream only; null when unconfigured or course is coming_soon */
56
+ previewVideoId: z.string().nullable(),
57
+ lessons: z.array(V1CourseLessonSchema),
58
+ instructors: z.array(V1CourseInstructorSchema),
59
+ resources: z.array(V1CourseResourceSchema),
60
+ furtherReading: z.array(V1CourseFurtherReadingSchema)
61
+ }).openapi('CourseDetail');
62
+
63
+ // --- OpenAPI path registration ---
64
+
65
+ const internalServerErrorResponse = {
66
+ 500: {
67
+ description: 'Internal server error',
68
+ content: {
69
+ 'application/json': {
70
+ schema: RestErrorBodySchema
71
+ }
72
+ }
73
+ }
74
+ };
75
+ registry.registerPath({
76
+ method: 'get',
77
+ path: '/v1/courses/{slug}/meta',
78
+ tags: ['Courses'],
79
+ description: 'OG metadata for a course page.',
80
+ request: {
81
+ params: V1CourseSlugPathParamsSchema
82
+ },
83
+ responses: {
84
+ 200: {
85
+ description: 'Success',
86
+ content: {
87
+ 'application/json': {
88
+ schema: V1CourseBySlugMetaResponseSchema
89
+ }
90
+ }
91
+ },
92
+ 400: {
93
+ description: 'Bad request',
94
+ content: {
95
+ 'application/json': {
96
+ schema: RestErrorBodySchema
97
+ }
98
+ }
99
+ },
100
+ 404: {
101
+ description: 'Course not found',
102
+ content: {
103
+ 'application/json': {
104
+ schema: RestErrorBodySchema
105
+ }
106
+ }
107
+ },
108
+ ...internalServerErrorResponse
109
+ }
110
+ });
111
+ registry.registerPath({
112
+ method: 'get',
113
+ path: '/v1/courses/{slug}',
114
+ tags: ['Courses'],
115
+ description: 'Full course detail for the classroom page. When status is coming_soon, lessons, resources, furtherReading, and previewVideoId are empty/null while title, description, tags, and instructors remain visible.',
116
+ request: {
117
+ params: V1CourseSlugPathParamsSchema
118
+ },
119
+ responses: {
120
+ 200: {
121
+ description: 'Success',
122
+ content: {
123
+ 'application/json': {
124
+ schema: V1CourseBySlugResponseSchema
125
+ }
126
+ }
127
+ },
128
+ 400: {
129
+ description: 'Bad request',
130
+ content: {
131
+ 'application/json': {
132
+ schema: RestErrorBodySchema
133
+ }
134
+ }
135
+ },
136
+ 404: {
137
+ description: 'Course not found',
138
+ content: {
139
+ 'application/json': {
140
+ schema: RestErrorBodySchema
141
+ }
142
+ }
143
+ },
144
+ ...internalServerErrorResponse
145
+ }
146
+ });
147
+ //# sourceMappingURL=course.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"course.js","names":["z","RestErrorBodySchema","CourseThumbnailSchema","registry","V1CourseSlugPathParamsSchema","object","slug","string","min","max","V1CourseBySlugMetaResponseSchema","ogTitle","ogDescription","ogImage","nullable","V1CourseLessonSchema","id","order","number","int","title","videoId","durationSeconds","isFree","boolean","openapi","V1CourseInstructorSchema","name","bio","avatarUrl","V1CourseResourceSchema","description","downloadUrl","V1CourseFurtherReadingSchema","excerpt","thumbnailUrl","url","V1CourseStatusSchema","enum","V1CourseBySlugResponseSchema","subtitle","summary","status","tags","array","previewVideoId","lessons","instructors","resources","furtherReading","internalServerErrorResponse","content","schema","registerPath","method","path","request","params","responses"],"sources":["../../src/schemas/course.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\nimport { CourseThumbnailSchema, registry } from './tag.js'\n\nexport const V1CourseSlugPathParamsSchema = z.object({\n slug: z.string().min(1).max(200),\n})\n\nexport const V1CourseBySlugMetaResponseSchema = z.object({\n ogTitle: z.string(),\n ogDescription: z.string(),\n ogImage: CourseThumbnailSchema.nullable(),\n})\n\nexport const V1CourseLessonSchema = z\n .object({\n id: z.string(),\n order: z.number().int(),\n title: z.string(),\n /** Cloudflare stream id for this lesson; null when not yet set */\n videoId: z.string().nullable(),\n /** Video length in seconds (from CMS); null when not yet set */\n durationSeconds: z.number().int().nullable(),\n /** CMS 免費試看 flag; playback access is decided by user role (out of scope here) */\n isFree: z.boolean(),\n })\n .openapi('CourseLesson')\n\nexport const V1CourseInstructorSchema = z\n .object({\n id: z.string(),\n slug: z.string(),\n name: z.string(),\n title: z.string(),\n bio: z.string(),\n avatarUrl: z.string().nullable(),\n })\n .openapi('CourseInstructor')\n\nexport const V1CourseResourceSchema = z\n .object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n /** GCS file URL with ?download=true; empty when no PDF uploaded */\n downloadUrl: z.string(),\n })\n .openapi('CourseResource')\n\nexport const V1CourseFurtherReadingSchema = z\n .object({\n id: z.string(),\n title: z.string(),\n excerpt: z.string(),\n thumbnailUrl: z.string().nullable(),\n url: z.string(),\n })\n .openapi('CourseFurtherReading')\n\nexport const V1CourseStatusSchema = z.enum(['published', 'coming_soon'])\n\nexport const V1CourseBySlugResponseSchema = z\n .object({\n slug: z.string(),\n title: z.string(),\n subtitle: z.string(),\n summary: z.string(),\n description: z.string(),\n /** published: full payload; coming_soon: lessons/resources/furtherReading/previewVideoId stripped */\n status: V1CourseStatusSchema,\n tags: z.array(z.string()),\n /** Trial/preview stream only; null when unconfigured or course is coming_soon */\n previewVideoId: z.string().nullable(),\n lessons: z.array(V1CourseLessonSchema),\n instructors: z.array(V1CourseInstructorSchema),\n resources: z.array(V1CourseResourceSchema),\n furtherReading: z.array(V1CourseFurtherReadingSchema),\n })\n .openapi('CourseDetail')\n\n// --- OpenAPI path registration ---\n\nconst internalServerErrorResponse = {\n 500: {\n description: 'Internal server error',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n} as const\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/courses/{slug}/meta',\n tags: ['Courses'],\n description: 'OG metadata for a course page.',\n request: { params: V1CourseSlugPathParamsSchema },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1CourseBySlugMetaResponseSchema },\n },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Course not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/courses/{slug}',\n tags: ['Courses'],\n description:\n 'Full course detail for the classroom page. When status is coming_soon, lessons, resources, furtherReading, and previewVideoId are empty/null while title, description, tags, and instructors remain visible.',\n request: { params: V1CourseSlugPathParamsSchema },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1CourseBySlugResponseSchema },\n },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 404: {\n description: 'Course not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,SAASC,mBAAmB,QAAQ,YAAY;AAChD,SAASC,qBAAqB,EAAEC,QAAQ,QAAQ,UAAU;AAE1D,OAAO,MAAMC,4BAA4B,GAAGJ,CAAC,CAACK,MAAM,CAAC;EACnDC,IAAI,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG;AACjC,CAAC,CAAC;AAEF,OAAO,MAAMC,gCAAgC,GAAGV,CAAC,CAACK,MAAM,CAAC;EACvDM,OAAO,EAA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AAI,EAAE,CAAC,SAAS,CAAC;EACjBZ,WAAW,EACT,8MAA8M;EAChNyB,OAAO,EAAE;IAAEC,MAAM,EAAErD;EAA6B,CAAC;EACjDsD,SAAS,EAAE;IACT,GAAG,EAAE;MACH3B,WAAW,EAAE,SAAS;MACtBoB,OAAO,EAAE;QACP,kBAAkB,EAAE;UAAEC,MAAM,EAAEb;QAA6B;MAC7D;IACF,CAAC;IACD,GAAG,EAAE;MACHR,WAAW,EAAE,aAAa;MAC1BoB,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEnD;QAAoB;MAAE;IACjE,CAAC;IACD,GAAG,EAAE;MACH8B,WAAW,EAAE,kBAAkB;MAC/BoB,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEnD;QAAoB;MAAE;IACjE,CAAC;IACD,GAAGiD;EACL;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const V1MemberProfileSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ email: z.ZodString;
5
+ name: z.ZodString;
6
+ twreporterUserId: z.ZodString;
7
+ hasAccess: z.ZodBoolean;
8
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
9
+ }, z.core.$strip>;
10
+ export declare const V1MemberProfileResponseSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ email: z.ZodString;
13
+ name: z.ZodString;
14
+ twreporterUserId: z.ZodString;
15
+ hasAccess: z.ZodBoolean;
16
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
17
+ }, z.core.$strip>;
18
+ export declare const V1AccessTokenResponseSchema: z.ZodObject<{
19
+ accessToken: z.ZodString;
20
+ twreporterUserId: z.ZodString;
21
+ expiresAt: z.ZodNumber;
22
+ }, z.core.$strip>;
23
+ //# sourceMappingURL=member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member.d.ts","sourceRoot":"","sources":["../../src/schemas/member.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,eAAO,MAAM,qBAAqB;;;;;;;iBASP,CAAA;AAE3B,eAAO,MAAM,6BAA6B;;;;;;;iBAAwB,CAAA;AAElE,eAAO,MAAM,2BAA2B;;;;iBAMP,CAAA"}
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ import { RestErrorBodySchema } from '../rest.js';
3
+ import { registry } from './tag.js';
4
+ export const V1MemberProfileSchema = z.object({
5
+ id: z.string(),
6
+ email: z.string(),
7
+ name: z.string(),
8
+ twreporterUserId: z.string(),
9
+ hasAccess: z.boolean(),
10
+ createdAt: z.iso.datetime().nullable().optional()
11
+ }).openapi('MemberProfile');
12
+ export const V1MemberProfileResponseSchema = V1MemberProfileSchema;
13
+ export const V1AccessTokenResponseSchema = z.object({
14
+ accessToken: z.string(),
15
+ twreporterUserId: z.string(),
16
+ expiresAt: z.number()
17
+ }).openapi('AccessTokenResponse');
18
+
19
+ // --- OpenAPI path registration ---
20
+
21
+ const unauthorizedResponse = {
22
+ 401: {
23
+ description: 'Unauthorized — missing or invalid JWT',
24
+ content: {
25
+ 'application/json': {
26
+ schema: RestErrorBodySchema
27
+ }
28
+ }
29
+ }
30
+ };
31
+ const internalServerErrorResponse = {
32
+ 500: {
33
+ description: 'Internal server error',
34
+ content: {
35
+ 'application/json': {
36
+ schema: RestErrorBodySchema
37
+ }
38
+ }
39
+ }
40
+ };
41
+ registry.registerPath({
42
+ method: 'post',
43
+ path: '/auth/access-token',
44
+ tags: ['Auth'],
45
+ description: 'Exchange id_token cookie for a JWT access token. Creates the member on first login.',
46
+ responses: {
47
+ 200: {
48
+ description: 'Success',
49
+ content: {
50
+ 'application/json': {
51
+ schema: V1AccessTokenResponseSchema
52
+ }
53
+ }
54
+ },
55
+ 400: {
56
+ description: 'Bad request — missing id_token cookie',
57
+ content: {
58
+ 'application/json': {
59
+ schema: RestErrorBodySchema
60
+ }
61
+ }
62
+ },
63
+ 403: {
64
+ description: 'Forbidden — missing, invalid, or disallowed Origin',
65
+ content: {
66
+ 'application/json': {
67
+ schema: RestErrorBodySchema
68
+ }
69
+ }
70
+ },
71
+ ...unauthorizedResponse,
72
+ ...internalServerErrorResponse
73
+ }
74
+ });
75
+ registry.registerPath({
76
+ method: 'get',
77
+ path: '/v1/members/me',
78
+ tags: ['Members'],
79
+ description: 'Get the authenticated member profile.',
80
+ responses: {
81
+ 200: {
82
+ description: 'Success',
83
+ content: {
84
+ 'application/json': {
85
+ schema: V1MemberProfileResponseSchema
86
+ }
87
+ }
88
+ },
89
+ 404: {
90
+ description: 'Member not found',
91
+ content: {
92
+ 'application/json': {
93
+ schema: RestErrorBodySchema
94
+ }
95
+ }
96
+ },
97
+ ...unauthorizedResponse,
98
+ ...internalServerErrorResponse
99
+ }
100
+ });
101
+ //# sourceMappingURL=member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"member.js","names":["z","RestErrorBodySchema","registry","V1MemberProfileSchema","object","id","string","email","name","twreporterUserId","hasAccess","boolean","createdAt","iso","datetime","nullable","optional","openapi","V1MemberProfileResponseSchema","V1AccessTokenResponseSchema","accessToken","expiresAt","number","unauthorizedResponse","description","content","schema","internalServerErrorResponse","registerPath","method","path","tags","responses"],"sources":["../../src/schemas/member.ts"],"sourcesContent":["import { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\nimport { registry } from './tag.js'\n\nexport const V1MemberProfileSchema = z\n .object({\n id: z.string(),\n email: z.string(),\n name: z.string(),\n twreporterUserId: z.string(),\n hasAccess: z.boolean(),\n createdAt: z.iso.datetime().nullable().optional(),\n })\n .openapi('MemberProfile')\n\nexport const V1MemberProfileResponseSchema = V1MemberProfileSchema\n\nexport const V1AccessTokenResponseSchema = z\n .object({\n accessToken: z.string(),\n twreporterUserId: z.string(),\n expiresAt: z.number(),\n })\n .openapi('AccessTokenResponse')\n\n// --- OpenAPI path registration ---\n\nconst unauthorizedResponse = {\n 401: {\n description: 'Unauthorized — missing or invalid JWT',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n} as const\n\nconst internalServerErrorResponse = {\n 500: {\n description: 'Internal server error',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n} as const\n\nregistry.registerPath({\n method: 'post',\n path: '/auth/access-token',\n tags: ['Auth'],\n description:\n 'Exchange id_token cookie for a JWT access token. Creates the member on first login.',\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1AccessTokenResponseSchema },\n },\n },\n 400: {\n description: 'Bad request — missing id_token cookie',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 403: {\n description: 'Forbidden — missing, invalid, or disallowed Origin',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...unauthorizedResponse,\n ...internalServerErrorResponse,\n },\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/members/me',\n tags: ['Members'],\n description: 'Get the authenticated member profile.',\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1MemberProfileResponseSchema },\n },\n },\n 404: {\n description: 'Member not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...unauthorizedResponse,\n ...internalServerErrorResponse,\n },\n})\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AAEvB,SAASC,mBAAmB,QAAQ,YAAY;AAChD,SAASC,QAAQ,QAAQ,UAAU;AAEnC,OAAO,MAAMC,qBAAqB,GAAGH,CAAC,CACnCI,MAAM,CAAC;EACNC,EAAE,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC;EACdC,KAAK,EAAEP,CAAC,CAACM,MAAM,CAAC,CAAC;EACjBE,IAAI,EAAER,CAAC,CAACM,MAAM,CAAC,CAAC;EAChBG,gBAAgB,EAAET,CAAC,CAACM,MAAM,CAAC,CAAC;EAC5BI,SAAS,EAAEV,CAAC,CAACW,OAAO,CAAC,CAAC;EACtBC,SAAS,EAAEZ,CAAC,CAACa,GAAG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AoD;MACjEC,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEzB;QAAoB;MAAE;IACjE,CAAC;IACD,GAAGsB,oBAAoB;IACvB,GAAGI;EACL;AACF,CAAC,CAAC;AAEFzB,QAAQ,CAAC0B,YAAY,CAAC;EACpBC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE,gBAAgB;EACtBC,IAAI,EAAE,CAAC,SAAS,CAAC;EACjBP,WAAW,EAAE,uCAAuC;EACpDQ,SAAS,EAAE;IACT,GAAG,EAAE;MACHR,WAAW,EAAE,SAAS;MACtBC,OAAO,EAAE;QACP,kBAAkB,EAAE;UAAEC,MAAM,EAAER;QAA8B;MAC9D;IACF,CAAC;IACD,GAAG,EAAE;MACHM,WAAW,EAAE,kBAAkB;MAC/BC,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEzB;QAAoB;MAAE;IACjE,CAAC;IACD,GAAGsB,oBAAoB;IACvB,GAAGI;EACL;AACF,CAAC,CAAC","ignoreList":[]}
@@ -5,21 +5,21 @@ export declare const V1TagSlugPathParamsSchema: z.ZodObject<{
5
5
  slug: z.ZodString;
6
6
  }, z.core.$strip>;
7
7
  export declare const PhotoResizedSchema: z.ZodObject<{
8
- small: z.ZodDefault<z.ZodString>;
8
+ small: z.ZodString;
9
9
  }, z.core.$strip>;
10
10
  export declare const CourseThumbnailSchema: z.ZodObject<{
11
11
  resized: z.ZodObject<{
12
- small: z.ZodDefault<z.ZodString>;
12
+ small: z.ZodString;
13
13
  }, z.core.$strip>;
14
14
  }, z.core.$strip>;
15
15
  export declare const V1TagBySlugMetaResponseSchema: z.ZodObject<{
16
- ogTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- ogDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
- ogImage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
16
+ ogTitle: z.ZodString;
17
+ ogDescription: z.ZodString;
18
+ ogImage: z.ZodNullable<z.ZodObject<{
19
19
  resized: z.ZodObject<{
20
- small: z.ZodDefault<z.ZodString>;
20
+ small: z.ZodString;
21
21
  }, z.core.$strip>;
22
- }, z.core.$strip>>>;
22
+ }, z.core.$strip>>;
23
23
  }, z.core.$strip>;
24
24
  export declare const V1TagBySlugCoursesQuerySchema: z.ZodObject<{
25
25
  take: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -30,11 +30,11 @@ export declare const CourseCardSchema: z.ZodObject<{
30
30
  title: z.ZodString;
31
31
  subtitle: z.ZodString;
32
32
  summary: z.ZodString;
33
- thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
33
+ thumbnail: z.ZodNullable<z.ZodObject<{
34
34
  resized: z.ZodObject<{
35
- small: z.ZodDefault<z.ZodString>;
35
+ small: z.ZodString;
36
36
  }, z.core.$strip>;
37
- }, z.core.$strip>>>;
37
+ }, z.core.$strip>>;
38
38
  }, z.core.$strip>;
39
39
  export declare const V1TagBySlugCoursesResponseSchema: z.ZodObject<{
40
40
  name: z.ZodString;
@@ -44,11 +44,11 @@ export declare const V1TagBySlugCoursesResponseSchema: z.ZodObject<{
44
44
  title: z.ZodString;
45
45
  subtitle: z.ZodString;
46
46
  summary: z.ZodString;
47
- thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
47
+ thumbnail: z.ZodNullable<z.ZodObject<{
48
48
  resized: z.ZodObject<{
49
- small: z.ZodDefault<z.ZodString>;
49
+ small: z.ZodString;
50
50
  }, z.core.$strip>;
51
- }, z.core.$strip>>>;
51
+ }, z.core.$strip>>;
52
52
  }, z.core.$strip>>;
53
53
  }, z.core.$strip>;
54
54
  //# sourceMappingURL=tag.d.ts.map
@@ -10,7 +10,7 @@ export const V1TagSlugPathParamsSchema = z.object({
10
10
  slug: z.string().min(1).max(200)
11
11
  });
12
12
  export const PhotoResizedSchema = z.object({
13
- small: z.string().default('')
13
+ small: z.string().min(1)
14
14
  }).openapi('ResizedPhoto');
15
15
  export const CourseThumbnailSchema = z.object({
16
16
  resized: PhotoResizedSchema
@@ -19,9 +19,9 @@ export const CourseThumbnailSchema = z.object({
19
19
  // --- Tag meta response ---
20
20
 
21
21
  export const V1TagBySlugMetaResponseSchema = z.object({
22
- ogTitle: z.string().nullable().optional(),
23
- ogDescription: z.string().nullable().optional(),
24
- ogImage: CourseThumbnailSchema.nullable().optional()
22
+ ogTitle: z.string(),
23
+ ogDescription: z.string(),
24
+ ogImage: CourseThumbnailSchema.nullable()
25
25
  });
26
26
 
27
27
  // --- Tag courses query & response ---
@@ -35,7 +35,7 @@ export const CourseCardSchema = z.object({
35
35
  title: z.string(),
36
36
  subtitle: z.string(),
37
37
  summary: z.string(),
38
- thumbnail: CourseThumbnailSchema.nullable().optional()
38
+ thumbnail: CourseThumbnailSchema.nullable()
39
39
  }).openapi('CourseCard');
40
40
  export const V1TagBySlugCoursesResponseSchema = z.object({
41
41
  name: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","names":["extendZodWithOpenApi","OpenAPIRegistry","z","RestErrorBodySchema","registry","V1TagSlugPathParamsSchema","object","slug","string","min","max","PhotoResizedSchema","small","default","openapi","CourseThumbnailSchema","resized","V1TagBySlugMetaResponseSchema","ogTitle","nullable","optional","ogDescription","ogImage","V1TagBySlugCoursesQuerySchema","take","coerce","number","int","skip","CourseCardSchema","title","subtitle","summary","thumbnail","V1TagBySlugCoursesResponseSchema","name","coursesCount","courses","array","internalServerErrorResponse","description","content","schema","registerPath","method","path","tags","request","params","responses","query"],"sources":["../../src/schemas/tag.ts"],"sourcesContent":["import {\n extendZodWithOpenApi,\n OpenAPIRegistry,\n} from '@asteasolutions/zod-to-openapi'\nimport { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\n\nextendZodWithOpenApi(z)\n\nexport const registry = new OpenAPIRegistry()\n\n// --- Shared path params ---\n\nexport const V1TagSlugPathParamsSchema = z.object({\n slug: z.string().min(1).max(200),\n})\n\nexport const PhotoResizedSchema = z\n .object({\n small: z.string().default(''),\n })\n .openapi('ResizedPhoto')\n\nexport const CourseThumbnailSchema = z\n .object({\n resized: PhotoResizedSchema,\n })\n .openapi('CourseThumbnail')\n\n// --- Tag meta response ---\n\nexport const V1TagBySlugMetaResponseSchema = z.object({\n ogTitle: z.string().nullable().optional(),\n ogDescription: z.string().nullable().optional(),\n ogImage: CourseThumbnailSchema.nullable().optional(),\n})\n\n// --- Tag courses query & response ---\n\nexport const V1TagBySlugCoursesQuerySchema = z.object({\n take: z.coerce.number().int().min(1).max(50).optional().default(12),\n skip: z.coerce.number().int().min(0).max(5000).optional().default(0),\n})\n\nexport const CourseCardSchema = z\n .object({\n slug: z.string(),\n title: z.string(),\n subtitle: z.string(),\n summary: z.string(),\n thumbnail: CourseThumbnailSchema.nullable().optional(),\n })\n .openapi('CourseCard')\n\nexport const V1TagBySlugCoursesResponseSchema = z.object({\n name: z.string(),\n coursesCount: z.number().int().min(0),\n courses: z.array(CourseCardSchema),\n})\n\n// --- OpenAPI path registration ---\n\nconst internalServerErrorResponse = {\n 500: {\n description: 'Internal server error',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n} as const\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/tags/{slug}/meta',\n tags: ['Tags'],\n description: 'OG metadata for a tag page.',\n request: { params: V1TagSlugPathParamsSchema },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1TagBySlugMetaResponseSchema },\n },\n },\n 404: {\n description: 'Tag not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/tags/{slug}/courses',\n tags: ['Tags'],\n description: 'Courses for a tag (with count).',\n request: {\n params: V1TagSlugPathParamsSchema,\n query: V1TagBySlugCoursesQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1TagBySlugCoursesResponseSchema },\n },\n },\n 404: {\n description: 'Tag not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n"],"mappings":"AAAA,SACEA,oBAAoB,EACpBC,eAAe,QACV,gCAAgC;AACvC,SAASC,CAAC,QAAQ,KAAK;AAEvB,SAASC,mBAAmB,QAAQ,YAAY;AAEhDH,oBAAoB,CAACE,CAAC,CAAC;AAEvB,OAAO,MAAME,QAAQ,GAAG,IAAIH,eAAe,CAAC,CAAC;;AAE7C;;AAEA,OAAO,MAAMI,yBAAyB,GAAGH,CAAC,CAACI,MAAM,CAAC;EAChDC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG;AACjC,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,GAAGT,CAAC,CAChCI,MAAM,CAAC;EACNM,KAAK,EAAEV,CAAC,CAACM,MAAM,CAAC,CAAC,CAACK,OAAO,CAAC,EAAE;AAC9B,CAAC,CAAC,CACDC,OAAO,CAAC,cAAc,CAAC;AAE1B,OAAO,MAAMC,qBAAqB,GAAGb,CAAC,CACnCI,MAAM,CAAC;EACNU,OAAO,EAAEL;AACX,CAAC,CAAC,CACDG,OAAO,CAAC,iBAAiB,CAAC;;AAE7B;;AAEA,OAAO,MAAMG,6BAA6B,GAAGf,CAAC,CAACI,MAAM,CAAC;EACpDY,OAAO,EAAEhB,CAAC,CAACM,MAAM,CAAC,CAAC,CAACW,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzCC,aAAa,EAAEnB,CAAC,CAACM,MAAM,CAAC,CAAC,CAACW,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/CE,OAAO,EAAEP,qBAAqB,CAACI,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC;AACrD,CAAC,CAAC;;AAEF;;AAEA,OAAO,MAAMG,6BAA6B,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ACjE,CAAC;IACD,GAAGoC;EACL;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"tag.js","names":["extendZodWithOpenApi","OpenAPIRegistry","z","RestErrorBodySchema","registry","V1TagSlugPathParamsSchema","object","slug","string","min","max","PhotoResizedSchema","small","openapi","CourseThumbnailSchema","resized","V1TagBySlugMetaResponseSchema","ogTitle","ogDescription","ogImage","nullable","V1TagBySlugCoursesQuerySchema","take","coerce","number","int","optional","default","skip","CourseCardSchema","title","subtitle","summary","thumbnail","V1TagBySlugCoursesResponseSchema","name","coursesCount","courses","array","internalServerErrorResponse","description","content","schema","registerPath","method","path","tags","request","params","responses","query"],"sources":["../../src/schemas/tag.ts"],"sourcesContent":["import {\n extendZodWithOpenApi,\n OpenAPIRegistry,\n} from '@asteasolutions/zod-to-openapi'\nimport { z } from 'zod'\n\nimport { RestErrorBodySchema } from '../rest.js'\n\nextendZodWithOpenApi(z)\n\nexport const registry = new OpenAPIRegistry()\n\n// --- Shared path params ---\n\nexport const V1TagSlugPathParamsSchema = z.object({\n slug: z.string().min(1).max(200),\n})\n\nexport const PhotoResizedSchema = z\n .object({\n small: z.string().min(1),\n })\n .openapi('ResizedPhoto')\n\nexport const CourseThumbnailSchema = z\n .object({\n resized: PhotoResizedSchema,\n })\n .openapi('CourseThumbnail')\n\n// --- Tag meta response ---\n\nexport const V1TagBySlugMetaResponseSchema = z.object({\n ogTitle: z.string(),\n ogDescription: z.string(),\n ogImage: CourseThumbnailSchema.nullable(),\n})\n\n// --- Tag courses query & response ---\n\nexport const V1TagBySlugCoursesQuerySchema = z.object({\n take: z.coerce.number().int().min(1).max(50).optional().default(12),\n skip: z.coerce.number().int().min(0).max(5000).optional().default(0),\n})\n\nexport const CourseCardSchema = z\n .object({\n slug: z.string(),\n title: z.string(),\n subtitle: z.string(),\n summary: z.string(),\n thumbnail: CourseThumbnailSchema.nullable(),\n })\n .openapi('CourseCard')\n\nexport const V1TagBySlugCoursesResponseSchema = z.object({\n name: z.string(),\n coursesCount: z.number().int().min(0),\n courses: z.array(CourseCardSchema),\n})\n\n// --- OpenAPI path registration ---\n\nconst internalServerErrorResponse = {\n 500: {\n description: 'Internal server error',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n} as const\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/tags/{slug}/meta',\n tags: ['Tags'],\n description: 'OG metadata for a tag page.',\n request: { params: V1TagSlugPathParamsSchema },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1TagBySlugMetaResponseSchema },\n },\n },\n 404: {\n description: 'Tag not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n\nregistry.registerPath({\n method: 'get',\n path: '/v1/tags/{slug}/courses',\n tags: ['Tags'],\n description: 'Courses for a tag (with count).',\n request: {\n params: V1TagSlugPathParamsSchema,\n query: V1TagBySlugCoursesQuerySchema,\n },\n responses: {\n 200: {\n description: 'Success',\n content: {\n 'application/json': { schema: V1TagBySlugCoursesResponseSchema },\n },\n },\n 404: {\n description: 'Tag not found',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n 400: {\n description: 'Bad request',\n content: { 'application/json': { schema: RestErrorBodySchema } },\n },\n ...internalServerErrorResponse,\n },\n})\n"],"mappings":"AAAA,SACEA,oBAAoB,EACpBC,eAAe,QACV,gCAAgC;AACvC,SAASC,CAAC,QAAQ,KAAK;AAEvB,SAASC,mBAAmB,QAAQ,YAAY;AAEhDH,oBAAoB,CAACE,CAAC,CAAC;AAEvB,OAAO,MAAME,QAAQ,GAAG,IAAIH,eAAe,CAAC,CAAC;;AAE7C;;AAEA,OAAO,MAAMI,yBAAyB,GAAGH,CAAC,CAACI,MAAM,CAAC;EAChDC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG;AACjC,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,GAAGT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C,IAAI,EAAE,CAAC,MAAM,CAAC;EACdN,WAAW,EAAE,iCAAiC;EAC9CO,OAAO,EAAE;IACPC,MAAM,EAAE3C,yBAAyB;IACjC6C,KAAK,EAAE7B;EACT,CAAC;EACD4B,SAAS,EAAE;IACT,GAAG,EAAE;MACHT,WAAW,EAAE,SAAS;MACtBC,OAAO,EAAE;QACP,kBAAkB,EAAE;UAAEC,MAAM,EAAER;QAAiC;MACjE;IACF,CAAC;IACD,GAAG,EAAE;MACHM,WAAW,EAAE,eAAe;MAC5BC,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEvC;QAAoB;MAAE;IACjE,CAAC;IACD,GAAG,EAAE;MACHqC,WAAW,EAAE,aAAa;MAC1BC,OAAO,EAAE;QAAE,kBAAkB,EAAE;UAAEC,MAAM,EAAEvC;QAAoB;MAAE;IACjE,CAAC;IACD,GAAGoC;EACL;AACF,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twreporter-academy/api-types",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -18,8 +18,8 @@
18
18
  "scripts": {
19
19
  "build": "./scripts/build.sh",
20
20
  "type-check": "tsc --noEmit -p tsconfig.json",
21
- "lint:check": "eslint src --ext .ts",
22
- "lint:fix": "eslint src --ext .ts --fix",
21
+ "lint:check": "yarn run -T eslint src",
22
+ "lint:fix": "yarn run -T eslint src --fix",
23
23
  "prepack": "yarn build"
24
24
  },
25
25
  "dependencies": {