@purpleschool/gptbot 0.12.1 → 0.12.2-stage-2
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/api/controllers/http/blog.ts +2 -0
- package/api/controllers/http/category.ts +2 -0
- package/api/controllers/http/course.ts +8 -0
- package/api/controllers/http/page.ts +2 -0
- package/api/controllers/http/prompt-category.ts +2 -0
- package/api/controllers/http/prompt-topic.ts +2 -0
- package/api/controllers/http/prompt.ts +2 -0
- package/api/controllers/http/question.ts +2 -0
- package/api/routes.ts +44 -0
- package/build/api/controllers/http/blog.js +2 -0
- package/build/api/controllers/http/category.js +2 -0
- package/build/api/controllers/http/course.js +6 -0
- package/build/api/controllers/http/page.js +2 -0
- package/build/api/controllers/http/prompt-category.js +2 -0
- package/build/api/controllers/http/prompt-topic.js +2 -0
- package/build/api/controllers/http/prompt.js +2 -0
- package/build/api/controllers/http/question.js +2 -0
- package/build/api/routes.js +22 -0
- package/build/commands/blog/create-post-translation.command.js +25 -0
- package/build/commands/blog/create-post.command.js +6 -0
- package/build/commands/blog/index.js +2 -0
- package/build/commands/blog/update-post-translation.command.js +24 -0
- package/build/commands/blog/update-post.command.js +6 -0
- package/build/commands/category/create-category-translation.command.js +23 -0
- package/build/commands/category/create-category.command.js +4 -0
- package/build/commands/category/index.js +2 -0
- package/build/commands/category/update-category-translation.command.js +22 -0
- package/build/commands/category/update-category.command.js +4 -0
- package/build/commands/course/create-course-translation.command.js +24 -0
- package/build/commands/course/create-course.command.js +5 -0
- package/build/commands/course/create-lesson-translation.command.js +20 -0
- package/build/commands/course/create-section-translation.command.js +20 -0
- package/build/commands/course/index.js +6 -0
- package/build/commands/course/update-course-translation.command.js +23 -0
- package/build/commands/course/update-lesson-translation.command.js +19 -0
- package/build/commands/course/update-section-translation.command.js +19 -0
- package/build/commands/page/create-page-translation.command.js +24 -0
- package/build/commands/page/create-page.command.js +5 -0
- package/build/commands/page/index.js +2 -0
- package/build/commands/page/update-page-translation.command.js +23 -0
- package/build/commands/page/update-page.command.js +5 -0
- package/build/commands/prompt/create-prompt-translation.command.js +21 -0
- package/build/commands/prompt/create-prompt.command.js +2 -0
- package/build/commands/prompt/index.js +2 -0
- package/build/commands/prompt/update-prompt-translation.command.js +20 -0
- package/build/commands/prompt/update-prompt.command.js +2 -0
- package/build/commands/prompt-category/create-prompt-category-translation.command.js +22 -0
- package/build/commands/prompt-category/create-prompt-category.command.js +3 -0
- package/build/commands/prompt-category/index.js +2 -0
- package/build/commands/prompt-category/update-prompt-category-translation.command.js +21 -0
- package/build/commands/prompt-category/update-prompt-category.command.js +3 -0
- package/build/commands/prompt-topic/create-prompt-topic-translation.command.js +24 -0
- package/build/commands/prompt-topic/create-prompt-topic.command.js +5 -0
- package/build/commands/prompt-topic/index.js +2 -0
- package/build/commands/prompt-topic/update-prompt-topic-translation.command.js +23 -0
- package/build/commands/prompt-topic/update-prompt-topic.command.js +5 -0
- package/build/commands/question/create-question-translation.command.js +21 -0
- package/build/commands/question/create-question.command.js +2 -0
- package/build/commands/question/index.js +2 -0
- package/build/commands/question/update-question-translation.command.js +20 -0
- package/build/commands/question/update-question.command.js +2 -0
- package/build/commands/unregistered-user/patch-locale.command.js +3 -3
- package/build/commands/user/get-me.command.js +2 -1
- package/build/commands/user/patch-locale.command.js +3 -3
- package/build/constants/user/enums/index.js +0 -1
- package/build/models/user.schema.js +2 -2
- package/commands/blog/create-post-translation.command.ts +30 -0
- package/commands/blog/create-post.command.ts +6 -0
- package/commands/blog/index.ts +2 -0
- package/commands/blog/update-post-translation.command.ts +29 -0
- package/commands/blog/update-post.command.ts +6 -0
- package/commands/category/create-category-translation.command.ts +28 -0
- package/commands/category/create-category.command.ts +4 -0
- package/commands/category/index.ts +2 -0
- package/commands/category/update-category-translation.command.ts +27 -0
- package/commands/category/update-category.command.ts +4 -0
- package/commands/course/create-course-translation.command.ts +29 -0
- package/commands/course/create-course.command.ts +5 -0
- package/commands/course/create-lesson-translation.command.ts +25 -0
- package/commands/course/create-section-translation.command.ts +25 -0
- package/commands/course/index.ts +6 -0
- package/commands/course/update-course-translation.command.ts +28 -0
- package/commands/course/update-lesson-translation.command.ts +24 -0
- package/commands/course/update-section-translation.command.ts +24 -0
- package/commands/page/create-page-translation.command.ts +29 -0
- package/commands/page/create-page.command.ts +5 -0
- package/commands/page/index.ts +2 -0
- package/commands/page/update-page-translation.command.ts +28 -0
- package/commands/page/update-page.command.ts +5 -0
- package/commands/prompt/create-prompt-translation.command.ts +26 -0
- package/commands/prompt/create-prompt.command.ts +2 -0
- package/commands/prompt/index.ts +2 -0
- package/commands/prompt/update-prompt-translation.command.ts +25 -0
- package/commands/prompt/update-prompt.command.ts +2 -0
- package/commands/prompt-category/create-prompt-category-translation.command.ts +27 -0
- package/commands/prompt-category/create-prompt-category.command.ts +3 -0
- package/commands/prompt-category/index.ts +2 -0
- package/commands/prompt-category/update-prompt-category-translation.command.ts +26 -0
- package/commands/prompt-category/update-prompt-category.command.ts +3 -0
- package/commands/prompt-topic/create-prompt-topic-translation.command.ts +29 -0
- package/commands/prompt-topic/create-prompt-topic.command.ts +5 -0
- package/commands/prompt-topic/index.ts +2 -0
- package/commands/prompt-topic/update-prompt-topic-translation.command.ts +28 -0
- package/commands/prompt-topic/update-prompt-topic.command.ts +5 -0
- package/commands/question/create-question-translation.command.ts +26 -0
- package/commands/question/create-question.command.ts +2 -0
- package/commands/question/index.ts +2 -0
- package/commands/question/update-question-translation.command.ts +25 -0
- package/commands/question/update-question.command.ts +2 -0
- package/commands/unregistered-user/patch-locale.command.ts +1 -1
- package/commands/user/get-me.command.ts +2 -1
- package/commands/user/patch-locale.command.ts +1 -1
- package/constants/user/enums/index.ts +0 -1
- package/models/user.schema.ts +1 -1
- package/package.json +2 -1
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/constants/user/enums/locale.enum.ts +0 -4
|
@@ -4,8 +4,10 @@ export const BLOG_CONTROLLER = (type: POST_TYPE) => `blog/type/${type}` as const
|
|
|
4
4
|
|
|
5
5
|
export const BLOG_ROUTES = {
|
|
6
6
|
CREATE: 'create',
|
|
7
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
7
8
|
DELETE: (uuid: string) => `${uuid}`,
|
|
8
9
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
10
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
9
11
|
FIND: 'find',
|
|
10
12
|
FIND_ALL: 'find/all',
|
|
11
13
|
FIND_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
|
|
@@ -5,4 +5,6 @@ export const CATEGORY_ROUTES = {
|
|
|
5
5
|
GET_ALL: 'all',
|
|
6
6
|
GET_FORMATTED: 'formatted',
|
|
7
7
|
GET_FILTER: 'filter',
|
|
8
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
9
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
8
10
|
} as const;
|
|
@@ -3,4 +3,12 @@ export const COURSE_CONTROLLER = 'course' as const;
|
|
|
3
3
|
export const COURSE_ROUTES = {
|
|
4
4
|
FIND_BY_UUID: 'by/uuid',
|
|
5
5
|
FIND_BY_ALIAS: 'by/alias',
|
|
6
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
7
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
8
|
+
CREATE_SECTION_TRANSLATION: (uuid: string) => `section/${uuid}/translations`,
|
|
9
|
+
UPDATE_SECTION_TRANSLATION: (uuid: string, locale: string) =>
|
|
10
|
+
`section/${uuid}/translations/${locale}`,
|
|
11
|
+
CREATE_LESSON_TRANSLATION: (uuid: string) => `lesson/${uuid}/translations`,
|
|
12
|
+
UPDATE_LESSON_TRANSLATION: (uuid: string, locale: string) =>
|
|
13
|
+
`lesson/${uuid}/translations/${locale}`,
|
|
6
14
|
} as const;
|
|
@@ -8,4 +8,6 @@ export const PAGE_ROUTES = {
|
|
|
8
8
|
FIND_BY_CRITERIA: 'criteria',
|
|
9
9
|
FIND_BY_CRITERIA_WITH_RELATIONS: 'criteria/with-relations',
|
|
10
10
|
MODEL_PAGES: 'by/type/model',
|
|
11
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
12
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
11
13
|
} as const;
|
|
@@ -3,7 +3,9 @@ export const PROMPT_CATEGORY_PUBLIC_CONTROLLER = 'public/prompt-category';
|
|
|
3
3
|
|
|
4
4
|
export const PROMPT_CATEGORY_ROUTES = {
|
|
5
5
|
CREATE: '',
|
|
6
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
6
7
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
8
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
7
9
|
DELETE: (uuid: string) => `${uuid}`,
|
|
8
10
|
FIND_ALL: '',
|
|
9
11
|
FIND_BY_ALIAS: (alias: string) => `alias/${alias}`,
|
|
@@ -3,7 +3,9 @@ export const PROMPT_TOPIC_PUBLIC_CONTROLLER = 'public/prompt-topic';
|
|
|
3
3
|
|
|
4
4
|
export const PROMPT_TOPIC_ROUTES = {
|
|
5
5
|
CREATE: '',
|
|
6
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
6
7
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
8
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
7
9
|
DELETE: (uuid: string) => `${uuid}`,
|
|
8
10
|
FIND_BY_CATEGORY_ALIAS: (categoryAlias: string) => `find/alias/${categoryAlias}`,
|
|
9
11
|
FIND_BY_CATEGORY_UUID: (categoryUuid: string) => `find/uuid/${categoryUuid}`,
|
|
@@ -3,7 +3,9 @@ export const PROMPT_PUBLIC_CONTROLLER = 'public/prompt';
|
|
|
3
3
|
|
|
4
4
|
export const PROMPT_ROUTES = {
|
|
5
5
|
CREATE: '',
|
|
6
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
6
7
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
8
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
7
9
|
DELETE: (uuid: string) => `${uuid}`,
|
|
8
10
|
FIND_ALL: '',
|
|
9
11
|
FIND_BY_UUID: (uuid: string) => `${uuid}`,
|
|
@@ -2,4 +2,6 @@ export const QUESTION_CONTROLLER = 'question' as const;
|
|
|
2
2
|
export const QUESTION_ROUTES = {
|
|
3
3
|
FIND_BY_UUID: (uuid: string) => `by/uuid/${uuid}`,
|
|
4
4
|
GET_ALL: 'all',
|
|
5
|
+
CREATE_TRANSLATION: (uuid: string) => `${uuid}/translations`,
|
|
6
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) => `${uuid}/translations/${locale}`,
|
|
5
7
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -49,6 +49,10 @@ export const REST_API = {
|
|
|
49
49
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
50
50
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
51
51
|
CREATE: `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}`,
|
|
52
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
53
|
+
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
54
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
55
|
+
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
52
56
|
GET_BY_UUID: (uuid: string): string =>
|
|
53
57
|
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
54
58
|
GET_BY_ALIAS: (alias: string): string =>
|
|
@@ -63,6 +67,10 @@ export const REST_API = {
|
|
|
63
67
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
64
68
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
65
69
|
CREATE: `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}`,
|
|
70
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
71
|
+
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
72
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
73
|
+
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
66
74
|
GET_BY_UUID: (uuid: string): string =>
|
|
67
75
|
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
68
76
|
GET_FORMATTED: `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FORMATTED}`,
|
|
@@ -73,6 +81,10 @@ export const REST_API = {
|
|
|
73
81
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
74
82
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
75
83
|
CREATE: `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}`,
|
|
84
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
85
|
+
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
86
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
87
|
+
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
76
88
|
GET_BY_UUID: (uuid: string): string =>
|
|
77
89
|
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
78
90
|
},
|
|
@@ -229,8 +241,12 @@ export const REST_API = {
|
|
|
229
241
|
},
|
|
230
242
|
BLOG_ARTICLES: {
|
|
231
243
|
CREATE: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
244
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
245
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
232
246
|
PATCH: (uuid: string) =>
|
|
233
247
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
248
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
249
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
234
250
|
DELETE: (uuid: string) =>
|
|
235
251
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
236
252
|
GET_BY_UUID: (uuid: string) =>
|
|
@@ -244,8 +260,12 @@ export const REST_API = {
|
|
|
244
260
|
},
|
|
245
261
|
BLOG_UPDATES: {
|
|
246
262
|
CREATE: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
263
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
264
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
247
265
|
PATCH: (uuid: string) =>
|
|
248
266
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
267
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
268
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
249
269
|
DELETE: (uuid: string) =>
|
|
250
270
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
251
271
|
GET_BY_UUID: (uuid: string) =>
|
|
@@ -289,8 +309,12 @@ export const REST_API = {
|
|
|
289
309
|
},
|
|
290
310
|
PROMPT_CATEGORY_PRIVATE: {
|
|
291
311
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE}`,
|
|
312
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
313
|
+
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
292
314
|
PATCH: (uuid: string) =>
|
|
293
315
|
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE(uuid)}`,
|
|
316
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
317
|
+
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
294
318
|
DELETE: (uuid: string) =>
|
|
295
319
|
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.DELETE(uuid)}`,
|
|
296
320
|
},
|
|
@@ -303,8 +327,12 @@ export const REST_API = {
|
|
|
303
327
|
},
|
|
304
328
|
PROMPT_TOPIC_PRIVATE: {
|
|
305
329
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE}`,
|
|
330
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
331
|
+
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
306
332
|
PATCH: (uuid: string) =>
|
|
307
333
|
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE(uuid)}`,
|
|
334
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
335
|
+
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
308
336
|
DELETE: (uuid: string) =>
|
|
309
337
|
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.DELETE(uuid)}`,
|
|
310
338
|
},
|
|
@@ -321,8 +349,12 @@ export const REST_API = {
|
|
|
321
349
|
},
|
|
322
350
|
PROMPT_PRIVATE: {
|
|
323
351
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE}`,
|
|
352
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
353
|
+
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
324
354
|
PATCH: (uuid: string) =>
|
|
325
355
|
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE(uuid)}`,
|
|
356
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
357
|
+
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
326
358
|
DELETE: (uuid: string) =>
|
|
327
359
|
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.DELETE(uuid)}`,
|
|
328
360
|
},
|
|
@@ -931,6 +963,18 @@ export const REST_API = {
|
|
|
931
963
|
COURSE: {
|
|
932
964
|
FIND_BY_UUID: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
933
965
|
FIND_BY_ALIAS: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
|
966
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
967
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
968
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
969
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
970
|
+
CREATE_SECTION_TRANSLATION: (uuid: string) =>
|
|
971
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_SECTION_TRANSLATION(uuid)}`,
|
|
972
|
+
UPDATE_SECTION_TRANSLATION: (uuid: string, locale: string) =>
|
|
973
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_SECTION_TRANSLATION(uuid, locale)}`,
|
|
974
|
+
CREATE_LESSON_TRANSLATION: (uuid: string) =>
|
|
975
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_LESSON_TRANSLATION(uuid)}`,
|
|
976
|
+
UPDATE_LESSON_TRANSLATION: (uuid: string, locale: string) =>
|
|
977
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_LESSON_TRANSLATION(uuid, locale)}`,
|
|
934
978
|
},
|
|
935
979
|
AI_VENDOR: {
|
|
936
980
|
CREATE: `${ROOT}/${CONTROLLERS.AI_VENDOR_CONTROLLER}/${CONTROLLERS.AI_VENDOR_ROUTES.CREATE}`,
|
|
@@ -5,8 +5,10 @@ const BLOG_CONTROLLER = (type) => `blog/type/${type}`;
|
|
|
5
5
|
exports.BLOG_CONTROLLER = BLOG_CONTROLLER;
|
|
6
6
|
exports.BLOG_ROUTES = {
|
|
7
7
|
CREATE: 'create',
|
|
8
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
8
9
|
DELETE: (uuid) => `${uuid}`,
|
|
9
10
|
UPDATE: (uuid) => `${uuid}`,
|
|
11
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
10
12
|
FIND: 'find',
|
|
11
13
|
FIND_ALL: 'find/all',
|
|
12
14
|
FIND_BY_UUID: (uuid) => `by/uuid/${uuid}`,
|
|
@@ -5,4 +5,10 @@ exports.COURSE_CONTROLLER = 'course';
|
|
|
5
5
|
exports.COURSE_ROUTES = {
|
|
6
6
|
FIND_BY_UUID: 'by/uuid',
|
|
7
7
|
FIND_BY_ALIAS: 'by/alias',
|
|
8
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
9
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
10
|
+
CREATE_SECTION_TRANSLATION: (uuid) => `section/${uuid}/translations`,
|
|
11
|
+
UPDATE_SECTION_TRANSLATION: (uuid, locale) => `section/${uuid}/translations/${locale}`,
|
|
12
|
+
CREATE_LESSON_TRANSLATION: (uuid) => `lesson/${uuid}/translations`,
|
|
13
|
+
UPDATE_LESSON_TRANSLATION: (uuid, locale) => `lesson/${uuid}/translations/${locale}`,
|
|
8
14
|
};
|
|
@@ -10,4 +10,6 @@ exports.PAGE_ROUTES = {
|
|
|
10
10
|
FIND_BY_CRITERIA: 'criteria',
|
|
11
11
|
FIND_BY_CRITERIA_WITH_RELATIONS: 'criteria/with-relations',
|
|
12
12
|
MODEL_PAGES: 'by/type/model',
|
|
13
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
14
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
13
15
|
};
|
|
@@ -5,7 +5,9 @@ exports.PROMPT_CATEGORY_PRIVATE_CONTROLLER = 'private/prompt-category';
|
|
|
5
5
|
exports.PROMPT_CATEGORY_PUBLIC_CONTROLLER = 'public/prompt-category';
|
|
6
6
|
exports.PROMPT_CATEGORY_ROUTES = {
|
|
7
7
|
CREATE: '',
|
|
8
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
8
9
|
UPDATE: (uuid) => `${uuid}`,
|
|
10
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
9
11
|
DELETE: (uuid) => `${uuid}`,
|
|
10
12
|
FIND_ALL: '',
|
|
11
13
|
FIND_BY_ALIAS: (alias) => `alias/${alias}`,
|
|
@@ -5,7 +5,9 @@ exports.PROMPT_TOPIC_PRIVATE_CONTROLLER = 'private/prompt-topic';
|
|
|
5
5
|
exports.PROMPT_TOPIC_PUBLIC_CONTROLLER = 'public/prompt-topic';
|
|
6
6
|
exports.PROMPT_TOPIC_ROUTES = {
|
|
7
7
|
CREATE: '',
|
|
8
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
8
9
|
UPDATE: (uuid) => `${uuid}`,
|
|
10
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
9
11
|
DELETE: (uuid) => `${uuid}`,
|
|
10
12
|
FIND_BY_CATEGORY_ALIAS: (categoryAlias) => `find/alias/${categoryAlias}`,
|
|
11
13
|
FIND_BY_CATEGORY_UUID: (categoryUuid) => `find/uuid/${categoryUuid}`,
|
|
@@ -5,7 +5,9 @@ exports.PROMPT_PRIVATE_CONTROLLER = 'private/prompt';
|
|
|
5
5
|
exports.PROMPT_PUBLIC_CONTROLLER = 'public/prompt';
|
|
6
6
|
exports.PROMPT_ROUTES = {
|
|
7
7
|
CREATE: '',
|
|
8
|
+
CREATE_TRANSLATION: (uuid) => `${uuid}/translations`,
|
|
8
9
|
UPDATE: (uuid) => `${uuid}`,
|
|
10
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${uuid}/translations/${locale}`,
|
|
9
11
|
DELETE: (uuid) => `${uuid}`,
|
|
10
12
|
FIND_ALL: '',
|
|
11
13
|
FIND_BY_UUID: (uuid) => `${uuid}`,
|
package/build/api/routes.js
CHANGED
|
@@ -76,6 +76,8 @@ exports.REST_API = {
|
|
|
76
76
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
77
77
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
78
78
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}`,
|
|
79
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
80
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
79
81
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
80
82
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
81
83
|
GET_BY_ALL_WITH_RELATIONS: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL_WITH_RELATIONS}`,
|
|
@@ -88,6 +90,8 @@ exports.REST_API = {
|
|
|
88
90
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
89
91
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
90
92
|
CREATE: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}`,
|
|
93
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
94
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
91
95
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
92
96
|
GET_FORMATTED: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FORMATTED}`,
|
|
93
97
|
GET_FILTER: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FILTER}`,
|
|
@@ -97,6 +101,8 @@ exports.REST_API = {
|
|
|
97
101
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
98
102
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
99
103
|
CREATE: `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}`,
|
|
104
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
105
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
100
106
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
101
107
|
},
|
|
102
108
|
UNREGISTERED_USER: {
|
|
@@ -222,7 +228,9 @@ exports.REST_API = {
|
|
|
222
228
|
},
|
|
223
229
|
BLOG_ARTICLES: {
|
|
224
230
|
CREATE: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
231
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
225
232
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
233
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
226
234
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
227
235
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
228
236
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
@@ -233,7 +241,9 @@ exports.REST_API = {
|
|
|
233
241
|
},
|
|
234
242
|
BLOG_UPDATES: {
|
|
235
243
|
CREATE: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
244
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
236
245
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
246
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
237
247
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
238
248
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
239
249
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
@@ -270,7 +280,9 @@ exports.REST_API = {
|
|
|
270
280
|
},
|
|
271
281
|
PROMPT_CATEGORY_PRIVATE: {
|
|
272
282
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE}`,
|
|
283
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
273
284
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE(uuid)}`,
|
|
285
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
274
286
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.DELETE(uuid)}`,
|
|
275
287
|
},
|
|
276
288
|
PROMPT_CATEGORY_PUBLIC: {
|
|
@@ -280,7 +292,9 @@ exports.REST_API = {
|
|
|
280
292
|
},
|
|
281
293
|
PROMPT_TOPIC_PRIVATE: {
|
|
282
294
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE}`,
|
|
295
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
283
296
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE(uuid)}`,
|
|
297
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
284
298
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.DELETE(uuid)}`,
|
|
285
299
|
},
|
|
286
300
|
PROMPT_TOPIC_PUBLIC: {
|
|
@@ -292,7 +306,9 @@ exports.REST_API = {
|
|
|
292
306
|
},
|
|
293
307
|
PROMPT_PRIVATE: {
|
|
294
308
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE}`,
|
|
309
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
295
310
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE(uuid)}`,
|
|
311
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
296
312
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.DELETE(uuid)}`,
|
|
297
313
|
},
|
|
298
314
|
PROMPT_PUBLIC: {
|
|
@@ -715,6 +731,12 @@ exports.REST_API = {
|
|
|
715
731
|
COURSE: {
|
|
716
732
|
FIND_BY_UUID: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
717
733
|
FIND_BY_ALIAS: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
|
734
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
735
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
736
|
+
CREATE_SECTION_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_SECTION_TRANSLATION(uuid)}`,
|
|
737
|
+
UPDATE_SECTION_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_SECTION_TRANSLATION(uuid, locale)}`,
|
|
738
|
+
CREATE_LESSON_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_LESSON_TRANSLATION(uuid)}`,
|
|
739
|
+
UPDATE_LESSON_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_LESSON_TRANSLATION(uuid, locale)}`,
|
|
718
740
|
},
|
|
719
741
|
AI_VENDOR: {
|
|
720
742
|
CREATE: `${exports.ROOT}/${CONTROLLERS.AI_VENDOR_CONTROLLER}/${CONTROLLERS.AI_VENDOR_ROUTES.CREATE}`,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatePostTranslationCommand = void 0;
|
|
4
|
+
const models_1 = require("../../models");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var CreatePostTranslationCommand;
|
|
8
|
+
(function (CreatePostTranslationCommand) {
|
|
9
|
+
CreatePostTranslationCommand.RequestSchema = models_1.PostSchema.pick({
|
|
10
|
+
title: true,
|
|
11
|
+
content: true,
|
|
12
|
+
author: true,
|
|
13
|
+
contentPreview: true,
|
|
14
|
+
metaTitle: true,
|
|
15
|
+
metaDescription: true,
|
|
16
|
+
}).extend({
|
|
17
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
18
|
+
});
|
|
19
|
+
CreatePostTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
20
|
+
uuid: zod_1.z.string().uuid(),
|
|
21
|
+
});
|
|
22
|
+
CreatePostTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
23
|
+
data: models_1.PostSchema,
|
|
24
|
+
});
|
|
25
|
+
})(CreatePostTranslationCommand || (exports.CreatePostTranslationCommand = CreatePostTranslationCommand = {}));
|
|
@@ -7,7 +7,13 @@ var CreatePostCommand;
|
|
|
7
7
|
(function (CreatePostCommand) {
|
|
8
8
|
CreatePostCommand.RequestSchema = models_1.PostSchema.omit({
|
|
9
9
|
uuid: true,
|
|
10
|
+
title: true,
|
|
11
|
+
author: true,
|
|
10
12
|
views: true,
|
|
13
|
+
content: true,
|
|
14
|
+
contentPreview: true,
|
|
15
|
+
metaTitle: true,
|
|
16
|
+
metaDescription: true,
|
|
11
17
|
createdAt: true,
|
|
12
18
|
updatedAt: true,
|
|
13
19
|
});
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-post.command"), exports);
|
|
18
|
+
__exportStar(require("./create-post-translation.command"), exports);
|
|
18
19
|
__exportStar(require("./delete-post.command"), exports);
|
|
19
20
|
__exportStar(require("./find-all-posts.command"), exports);
|
|
20
21
|
__exportStar(require("./find-post-by-alias.command"), exports);
|
|
@@ -23,3 +24,4 @@ __exportStar(require("./find-posts.command"), exports);
|
|
|
23
24
|
__exportStar(require("./get-latest-updates.command"), exports);
|
|
24
25
|
__exportStar(require("./get-posts-count.command"), exports);
|
|
25
26
|
__exportStar(require("./update-post.command"), exports);
|
|
27
|
+
__exportStar(require("./update-post-translation.command"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdatePostTranslationCommand = void 0;
|
|
4
|
+
const models_1 = require("../../models");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var UpdatePostTranslationCommand;
|
|
8
|
+
(function (UpdatePostTranslationCommand) {
|
|
9
|
+
UpdatePostTranslationCommand.RequestSchema = models_1.PostSchema.pick({
|
|
10
|
+
title: true,
|
|
11
|
+
content: true,
|
|
12
|
+
author: true,
|
|
13
|
+
contentPreview: true,
|
|
14
|
+
metaTitle: true,
|
|
15
|
+
metaDescription: true,
|
|
16
|
+
}).partial();
|
|
17
|
+
UpdatePostTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
18
|
+
uuid: zod_1.z.string().uuid(),
|
|
19
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
20
|
+
});
|
|
21
|
+
UpdatePostTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
+
data: models_1.PostSchema,
|
|
23
|
+
});
|
|
24
|
+
})(UpdatePostTranslationCommand || (exports.UpdatePostTranslationCommand = UpdatePostTranslationCommand = {}));
|
|
@@ -10,6 +10,12 @@ var UpdatePostCommand;
|
|
|
10
10
|
updatedAt: true,
|
|
11
11
|
views: true,
|
|
12
12
|
uuid: true,
|
|
13
|
+
title: true,
|
|
14
|
+
content: true,
|
|
15
|
+
author: true,
|
|
16
|
+
contentPreview: true,
|
|
17
|
+
metaTitle: true,
|
|
18
|
+
metaDescription: true,
|
|
13
19
|
}).partial();
|
|
14
20
|
UpdatePostCommand.RequestParamSchema = zod_1.z.object({
|
|
15
21
|
uuid: zod_1.z.string().uuid(),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateCategoryTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var CreateCategoryTranslationCommand;
|
|
8
|
+
(function (CreateCategoryTranslationCommand) {
|
|
9
|
+
CreateCategoryTranslationCommand.RequestSchema = models_1.CategorySchema.pick({
|
|
10
|
+
name: true,
|
|
11
|
+
prompt: true,
|
|
12
|
+
placeholder: true,
|
|
13
|
+
seoName: true,
|
|
14
|
+
}).extend({
|
|
15
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
16
|
+
});
|
|
17
|
+
CreateCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
18
|
+
uuid: zod_1.z.string().uuid(),
|
|
19
|
+
});
|
|
20
|
+
CreateCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
21
|
+
data: models_1.CategorySchema,
|
|
22
|
+
});
|
|
23
|
+
})(CreateCategoryTranslationCommand || (exports.CreateCategoryTranslationCommand = CreateCategoryTranslationCommand = {}));
|
|
@@ -7,6 +7,10 @@ var CreateCategoryCommand;
|
|
|
7
7
|
(function (CreateCategoryCommand) {
|
|
8
8
|
CreateCategoryCommand.RequestSchema = models_1.CategorySchema.omit({
|
|
9
9
|
uuid: true,
|
|
10
|
+
name: true,
|
|
11
|
+
prompt: true,
|
|
12
|
+
placeholder: true,
|
|
13
|
+
seoName: true,
|
|
10
14
|
createdAt: true,
|
|
11
15
|
updatedAt: true,
|
|
12
16
|
});
|
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-category.command"), exports);
|
|
18
|
+
__exportStar(require("./create-category-translation.command"), exports);
|
|
18
19
|
__exportStar(require("./delete-category.command"), exports);
|
|
19
20
|
__exportStar(require("./find-category.command"), exports);
|
|
20
21
|
__exportStar(require("./update-category.command"), exports);
|
|
22
|
+
__exportStar(require("./update-category-translation.command"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateCategoryTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var UpdateCategoryTranslationCommand;
|
|
8
|
+
(function (UpdateCategoryTranslationCommand) {
|
|
9
|
+
UpdateCategoryTranslationCommand.RequestSchema = models_1.CategorySchema.pick({
|
|
10
|
+
name: true,
|
|
11
|
+
prompt: true,
|
|
12
|
+
placeholder: true,
|
|
13
|
+
seoName: true,
|
|
14
|
+
}).partial();
|
|
15
|
+
UpdateCategoryTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
|
17
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
18
|
+
});
|
|
19
|
+
UpdateCategoryTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
20
|
+
data: models_1.CategorySchema,
|
|
21
|
+
});
|
|
22
|
+
})(UpdateCategoryTranslationCommand || (exports.UpdateCategoryTranslationCommand = UpdateCategoryTranslationCommand = {}));
|
|
@@ -9,6 +9,10 @@ var UpdateCategoryCommand;
|
|
|
9
9
|
createdAt: true,
|
|
10
10
|
updatedAt: true,
|
|
11
11
|
uuid: true,
|
|
12
|
+
name: true,
|
|
13
|
+
prompt: true,
|
|
14
|
+
placeholder: true,
|
|
15
|
+
seoName: true,
|
|
12
16
|
}).partial();
|
|
13
17
|
UpdateCategoryCommand.RequestParamSchema = zod_1.z.object({
|
|
14
18
|
uuid: zod_1.z.string().uuid(),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateCourseTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var CreateCourseTranslationCommand;
|
|
8
|
+
(function (CreateCourseTranslationCommand) {
|
|
9
|
+
CreateCourseTranslationCommand.RequestSchema = models_1.CourseSchema.pick({
|
|
10
|
+
title: true,
|
|
11
|
+
subtitle: true,
|
|
12
|
+
prerequisites: true,
|
|
13
|
+
description: true,
|
|
14
|
+
skills: true,
|
|
15
|
+
}).extend({
|
|
16
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
17
|
+
});
|
|
18
|
+
CreateCourseTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
19
|
+
uuid: zod_1.z.string().uuid(),
|
|
20
|
+
});
|
|
21
|
+
CreateCourseTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
+
data: models_1.CourseSchema,
|
|
23
|
+
});
|
|
24
|
+
})(CreateCourseTranslationCommand || (exports.CreateCourseTranslationCommand = CreateCourseTranslationCommand = {}));
|
|
@@ -7,6 +7,11 @@ var CreateCourseCommand;
|
|
|
7
7
|
(function (CreateCourseCommand) {
|
|
8
8
|
CreateCourseCommand.RequestSchema = models_1.CourseSchema.omit({
|
|
9
9
|
uuid: true,
|
|
10
|
+
title: true,
|
|
11
|
+
subtitle: true,
|
|
12
|
+
prerequisites: true,
|
|
13
|
+
description: true,
|
|
14
|
+
skills: true,
|
|
10
15
|
createdAt: true,
|
|
11
16
|
updatedAt: true,
|
|
12
17
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateLessonTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var CreateLessonTranslationCommand;
|
|
8
|
+
(function (CreateLessonTranslationCommand) {
|
|
9
|
+
CreateLessonTranslationCommand.RequestSchema = models_1.LessonSchema.pick({
|
|
10
|
+
title: true,
|
|
11
|
+
}).extend({
|
|
12
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
13
|
+
});
|
|
14
|
+
CreateLessonTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
15
|
+
uuid: zod_1.z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
CreateLessonTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: models_1.LessonSchema,
|
|
19
|
+
});
|
|
20
|
+
})(CreateLessonTranslationCommand || (exports.CreateLessonTranslationCommand = CreateLessonTranslationCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSectionTranslationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
7
|
+
var CreateSectionTranslationCommand;
|
|
8
|
+
(function (CreateSectionTranslationCommand) {
|
|
9
|
+
CreateSectionTranslationCommand.RequestSchema = models_1.SectionSchema.pick({
|
|
10
|
+
title: true,
|
|
11
|
+
}).extend({
|
|
12
|
+
locale: zod_1.z.nativeEnum(rugpt_lib_common_1.LOCALE),
|
|
13
|
+
});
|
|
14
|
+
CreateSectionTranslationCommand.RequestParamSchema = zod_1.z.object({
|
|
15
|
+
uuid: zod_1.z.string().uuid(),
|
|
16
|
+
});
|
|
17
|
+
CreateSectionTranslationCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: models_1.SectionSchema,
|
|
19
|
+
});
|
|
20
|
+
})(CreateSectionTranslationCommand || (exports.CreateSectionTranslationCommand = CreateSectionTranslationCommand = {}));
|