@purpleschool/gptbot 0.12.35 → 0.12.37-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/controllers/http/team-account.ts +2 -0
- package/api/routes.ts +50 -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/controllers/http/team-account.js +2 -0
- package/build/api/routes.js +25 -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/cabinet/get-user-statistics-by-month.command.js +6 -13
- package/build/commands/cabinet/get-user-statistics-overview.command.js +5 -1
- 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/team-account/find-team-account-members-by-team-account-id.command.js +14 -0
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +6 -13
- package/build/commands/team-account/get-team-account-statistics-overview.command.js +5 -1
- package/build/commands/team-account/index.js +2 -0
- package/build/commands/team-account/update-team-account-invite.command.js +17 -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/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +22 -0
- package/build/constants/subscription/enums/index.js +1 -0
- package/build/constants/subscription/enums/subscription-balance-field.enum.js +8 -0
- package/build/constants/tool/enums/index.js +0 -1
- package/build/constants/user/enums/index.js +0 -1
- package/build/models/team-account/team-account-with-balance.schema.js +3 -0
- 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/cabinet/get-user-statistics-by-month.command.ts +7 -14
- package/commands/cabinet/get-user-statistics-overview.command.ts +6 -2
- 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/team-account/find-team-account-members-by-team-account-id.command.ts +16 -0
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +7 -14
- package/commands/team-account/get-team-account-statistics-overview.command.ts +6 -2
- package/commands/team-account/index.ts +2 -0
- package/commands/team-account/update-team-account-invite.command.ts +22 -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/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +18 -0
- package/constants/subscription/enums/index.ts +1 -0
- package/constants/subscription/enums/subscription-balance-field.enum.ts +4 -0
- package/constants/tool/enums/index.ts +0 -1
- package/constants/user/enums/index.ts +0 -1
- package/models/team-account/team-account-with-balance.schema.ts +3 -0
- package/models/user.schema.ts +1 -1
- package/package.json +2 -1
- package/build/constants/tool/enums/job-request-origin.enum.js +0 -8
- package/build/constants/user/enums/locale.enum.js +0 -8
- package/constants/tool/enums/job-request-origin.enum.ts +0 -4
- 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;
|
|
@@ -5,12 +5,14 @@ export const TEAM_ACCOUNT_ROUTES = {
|
|
|
5
5
|
UPDATE_ME: 'me',
|
|
6
6
|
UPDATE_MEMBER: 'members',
|
|
7
7
|
INVITE_MEMBER: 'invite',
|
|
8
|
+
UPDATE_INVITE: (uuid: string) => `invite/${uuid}`,
|
|
8
9
|
REVOKE_INVITE: 'invite/revoke',
|
|
9
10
|
REMOVE_MEMBER: 'members/remove',
|
|
10
11
|
LEAVE_MEMBER: 'members/leave',
|
|
11
12
|
ACCEPT_INVITE: 'invite/accept',
|
|
12
13
|
GET_ME: 'me',
|
|
13
14
|
GET_MEMBERS: 'members',
|
|
15
|
+
ADMIN_GET_MEMBERS: (teamAccountId: string) => `admin/members/${teamAccountId}`,
|
|
14
16
|
GET_OPERATIONS: 'operations',
|
|
15
17
|
GET_CURRENT_PRODUCTS: 'products/current',
|
|
16
18
|
GET_CURRENT_SUBSCRIPTIONS: 'subscriptions/current',
|
package/api/routes.ts
CHANGED
|
@@ -50,6 +50,10 @@ export const REST_API = {
|
|
|
50
50
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
51
51
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
52
52
|
CREATE: `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}`,
|
|
53
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
54
|
+
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
55
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
56
|
+
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
53
57
|
GET_BY_UUID: (uuid: string): string =>
|
|
54
58
|
`${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
55
59
|
GET_BY_ALIAS: (alias: string): string =>
|
|
@@ -64,6 +68,10 @@ export const REST_API = {
|
|
|
64
68
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
65
69
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
66
70
|
CREATE: `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}`,
|
|
71
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
72
|
+
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
73
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
74
|
+
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
67
75
|
GET_BY_UUID: (uuid: string): string =>
|
|
68
76
|
`${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
69
77
|
GET_FORMATTED: `${ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FORMATTED}`,
|
|
@@ -74,6 +82,10 @@ export const REST_API = {
|
|
|
74
82
|
PATCH: (uuid: string) => `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
75
83
|
DELETE: (uuid: string) => `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
76
84
|
CREATE: `${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}`,
|
|
85
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
86
|
+
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
87
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
88
|
+
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
77
89
|
GET_BY_UUID: (uuid: string): string =>
|
|
78
90
|
`${ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
79
91
|
},
|
|
@@ -195,12 +207,16 @@ export const REST_API = {
|
|
|
195
207
|
UPDATE_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
196
208
|
UPDATE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
197
209
|
INVITE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
210
|
+
UPDATE_INVITE: (uuid: string) =>
|
|
211
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_INVITE(uuid)}`,
|
|
198
212
|
REVOKE_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
199
213
|
REMOVE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
200
214
|
LEAVE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.LEAVE_MEMBER}`,
|
|
201
215
|
ACCEPT_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
|
|
202
216
|
GET_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
|
|
203
217
|
GET_MEMBERS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_MEMBERS}`,
|
|
218
|
+
ADMIN_GET_MEMBERS: (teamAccountId: string) =>
|
|
219
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_MEMBERS(teamAccountId)}`,
|
|
204
220
|
GET_OPERATIONS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_OPERATIONS}`,
|
|
205
221
|
GET_CURRENT_PRODUCTS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_PRODUCTS}`,
|
|
206
222
|
GET_CURRENT_SUBSCRIPTIONS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_SUBSCRIPTIONS}`,
|
|
@@ -213,6 +229,8 @@ export const REST_API = {
|
|
|
213
229
|
ADMIN_GET_INVOICES: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
|
|
214
230
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
|
|
215
231
|
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
232
|
+
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId: string) =>
|
|
233
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_PRODUCTS(teamAccountId)}`,
|
|
216
234
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) =>
|
|
217
235
|
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
|
|
218
236
|
ADMIN_FIND_BY_UUID: (teamAccountId: string) =>
|
|
@@ -235,8 +253,12 @@ export const REST_API = {
|
|
|
235
253
|
},
|
|
236
254
|
BLOG_ARTICLES: {
|
|
237
255
|
CREATE: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
256
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
257
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
238
258
|
PATCH: (uuid: string) =>
|
|
239
259
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
260
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
261
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
240
262
|
DELETE: (uuid: string) =>
|
|
241
263
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
242
264
|
GET_BY_UUID: (uuid: string) =>
|
|
@@ -250,8 +272,12 @@ export const REST_API = {
|
|
|
250
272
|
},
|
|
251
273
|
BLOG_UPDATES: {
|
|
252
274
|
CREATE: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
275
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
276
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
253
277
|
PATCH: (uuid: string) =>
|
|
254
278
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
279
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
280
|
+
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
255
281
|
DELETE: (uuid: string) =>
|
|
256
282
|
`${ROOT}/${CONTROLLERS.BLOG_CONTROLLER(POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
257
283
|
GET_BY_UUID: (uuid: string) =>
|
|
@@ -295,8 +321,12 @@ export const REST_API = {
|
|
|
295
321
|
},
|
|
296
322
|
PROMPT_CATEGORY_PRIVATE: {
|
|
297
323
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE}`,
|
|
324
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
325
|
+
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
298
326
|
PATCH: (uuid: string) =>
|
|
299
327
|
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE(uuid)}`,
|
|
328
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
329
|
+
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
300
330
|
DELETE: (uuid: string) =>
|
|
301
331
|
`${ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.DELETE(uuid)}`,
|
|
302
332
|
},
|
|
@@ -309,8 +339,12 @@ export const REST_API = {
|
|
|
309
339
|
},
|
|
310
340
|
PROMPT_TOPIC_PRIVATE: {
|
|
311
341
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE}`,
|
|
342
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
343
|
+
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
312
344
|
PATCH: (uuid: string) =>
|
|
313
345
|
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE(uuid)}`,
|
|
346
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
347
|
+
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
314
348
|
DELETE: (uuid: string) =>
|
|
315
349
|
`${ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.DELETE(uuid)}`,
|
|
316
350
|
},
|
|
@@ -327,8 +361,12 @@ export const REST_API = {
|
|
|
327
361
|
},
|
|
328
362
|
PROMPT_PRIVATE: {
|
|
329
363
|
CREATE: `${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE}`,
|
|
364
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
365
|
+
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
330
366
|
PATCH: (uuid: string) =>
|
|
331
367
|
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE(uuid)}`,
|
|
368
|
+
PATCH_TRANSLATION: (uuid: string, locale: string) =>
|
|
369
|
+
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
332
370
|
DELETE: (uuid: string) =>
|
|
333
371
|
`${ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.DELETE(uuid)}`,
|
|
334
372
|
},
|
|
@@ -981,6 +1019,18 @@ export const REST_API = {
|
|
|
981
1019
|
COURSE: {
|
|
982
1020
|
FIND_BY_UUID: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
983
1021
|
FIND_BY_ALIAS: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
|
1022
|
+
CREATE_TRANSLATION: (uuid: string) =>
|
|
1023
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
1024
|
+
UPDATE_TRANSLATION: (uuid: string, locale: string) =>
|
|
1025
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
1026
|
+
CREATE_SECTION_TRANSLATION: (uuid: string) =>
|
|
1027
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_SECTION_TRANSLATION(uuid)}`,
|
|
1028
|
+
UPDATE_SECTION_TRANSLATION: (uuid: string, locale: string) =>
|
|
1029
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_SECTION_TRANSLATION(uuid, locale)}`,
|
|
1030
|
+
CREATE_LESSON_TRANSLATION: (uuid: string) =>
|
|
1031
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_LESSON_TRANSLATION(uuid)}`,
|
|
1032
|
+
UPDATE_LESSON_TRANSLATION: (uuid: string, locale: string) =>
|
|
1033
|
+
`${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_LESSON_TRANSLATION(uuid, locale)}`,
|
|
984
1034
|
},
|
|
985
1035
|
AI_VENDOR: {
|
|
986
1036
|
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}`,
|
|
@@ -7,12 +7,14 @@ exports.TEAM_ACCOUNT_ROUTES = {
|
|
|
7
7
|
UPDATE_ME: 'me',
|
|
8
8
|
UPDATE_MEMBER: 'members',
|
|
9
9
|
INVITE_MEMBER: 'invite',
|
|
10
|
+
UPDATE_INVITE: (uuid) => `invite/${uuid}`,
|
|
10
11
|
REVOKE_INVITE: 'invite/revoke',
|
|
11
12
|
REMOVE_MEMBER: 'members/remove',
|
|
12
13
|
LEAVE_MEMBER: 'members/leave',
|
|
13
14
|
ACCEPT_INVITE: 'invite/accept',
|
|
14
15
|
GET_ME: 'me',
|
|
15
16
|
GET_MEMBERS: 'members',
|
|
17
|
+
ADMIN_GET_MEMBERS: (teamAccountId) => `admin/members/${teamAccountId}`,
|
|
16
18
|
GET_OPERATIONS: 'operations',
|
|
17
19
|
GET_CURRENT_PRODUCTS: 'products/current',
|
|
18
20
|
GET_CURRENT_SUBSCRIPTIONS: 'subscriptions/current',
|
package/build/api/routes.js
CHANGED
|
@@ -77,6 +77,8 @@ exports.REST_API = {
|
|
|
77
77
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
78
78
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${uuid}`,
|
|
79
79
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}`,
|
|
80
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
81
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
80
82
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
81
83
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
82
84
|
GET_BY_ALL_WITH_RELATIONS: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL_WITH_RELATIONS}`,
|
|
@@ -89,6 +91,8 @@ exports.REST_API = {
|
|
|
89
91
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
90
92
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${uuid}`,
|
|
91
93
|
CREATE: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}`,
|
|
94
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
95
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
92
96
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
93
97
|
GET_FORMATTED: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FORMATTED}`,
|
|
94
98
|
GET_FILTER: `${exports.ROOT}/${CONTROLLERS.CATEGORY_CONTROLLER}/${CONTROLLERS.CATEGORY_ROUTES.GET_FILTER}`,
|
|
@@ -98,6 +102,8 @@ exports.REST_API = {
|
|
|
98
102
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
99
103
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${uuid}`,
|
|
100
104
|
CREATE: `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}`,
|
|
105
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
106
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
101
107
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.QUESTION_CONTROLLER}/${CONTROLLERS.QUESTION_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
102
108
|
},
|
|
103
109
|
UNREGISTERED_USER: {
|
|
@@ -192,12 +198,14 @@ exports.REST_API = {
|
|
|
192
198
|
UPDATE_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
193
199
|
UPDATE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
194
200
|
INVITE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
201
|
+
UPDATE_INVITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_INVITE(uuid)}`,
|
|
195
202
|
REVOKE_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
196
203
|
REMOVE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
197
204
|
LEAVE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.LEAVE_MEMBER}`,
|
|
198
205
|
ACCEPT_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
|
|
199
206
|
GET_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
|
|
200
207
|
GET_MEMBERS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_MEMBERS}`,
|
|
208
|
+
ADMIN_GET_MEMBERS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_MEMBERS(teamAccountId)}`,
|
|
201
209
|
GET_OPERATIONS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_OPERATIONS}`,
|
|
202
210
|
GET_CURRENT_PRODUCTS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_PRODUCTS}`,
|
|
203
211
|
GET_CURRENT_SUBSCRIPTIONS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_SUBSCRIPTIONS}`,
|
|
@@ -209,6 +217,7 @@ exports.REST_API = {
|
|
|
209
217
|
ADMIN_FIND_BY_NAME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_NAME}`,
|
|
210
218
|
ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
|
|
211
219
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
220
|
+
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_PRODUCTS(teamAccountId)}`,
|
|
212
221
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
|
|
213
222
|
ADMIN_FIND_BY_UUID: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
|
|
214
223
|
},
|
|
@@ -226,7 +235,9 @@ exports.REST_API = {
|
|
|
226
235
|
},
|
|
227
236
|
BLOG_ARTICLES: {
|
|
228
237
|
CREATE: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
238
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
229
239
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
240
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
230
241
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
231
242
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
232
243
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.ARTICLE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
@@ -237,7 +248,9 @@ exports.REST_API = {
|
|
|
237
248
|
},
|
|
238
249
|
BLOG_UPDATES: {
|
|
239
250
|
CREATE: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE}`,
|
|
251
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
240
252
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE(uuid)}`,
|
|
253
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
241
254
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.DELETE(uuid)}`,
|
|
242
255
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
243
256
|
GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER(constants_1.POST_TYPE.UPDATE)}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS(alias)}`,
|
|
@@ -274,7 +287,9 @@ exports.REST_API = {
|
|
|
274
287
|
},
|
|
275
288
|
PROMPT_CATEGORY_PRIVATE: {
|
|
276
289
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE}`,
|
|
290
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
277
291
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE(uuid)}`,
|
|
292
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
278
293
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_CATEGORY_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_CATEGORY_ROUTES.DELETE(uuid)}`,
|
|
279
294
|
},
|
|
280
295
|
PROMPT_CATEGORY_PUBLIC: {
|
|
@@ -284,7 +299,9 @@ exports.REST_API = {
|
|
|
284
299
|
},
|
|
285
300
|
PROMPT_TOPIC_PRIVATE: {
|
|
286
301
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE}`,
|
|
302
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
287
303
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE(uuid)}`,
|
|
304
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
288
305
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_TOPIC_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_TOPIC_ROUTES.DELETE(uuid)}`,
|
|
289
306
|
},
|
|
290
307
|
PROMPT_TOPIC_PUBLIC: {
|
|
@@ -296,7 +313,9 @@ exports.REST_API = {
|
|
|
296
313
|
},
|
|
297
314
|
PROMPT_PRIVATE: {
|
|
298
315
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE}`,
|
|
316
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
299
317
|
PATCH: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE(uuid)}`,
|
|
318
|
+
PATCH_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
300
319
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.PROMPT_PRIVATE_CONTROLLER}/${CONTROLLERS.PROMPT_ROUTES.DELETE(uuid)}`,
|
|
301
320
|
},
|
|
302
321
|
PROMPT_PUBLIC: {
|
|
@@ -747,6 +766,12 @@ exports.REST_API = {
|
|
|
747
766
|
COURSE: {
|
|
748
767
|
FIND_BY_UUID: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
749
768
|
FIND_BY_ALIAS: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
|
769
|
+
CREATE_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_TRANSLATION(uuid)}`,
|
|
770
|
+
UPDATE_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_TRANSLATION(uuid, locale)}`,
|
|
771
|
+
CREATE_SECTION_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_SECTION_TRANSLATION(uuid)}`,
|
|
772
|
+
UPDATE_SECTION_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_SECTION_TRANSLATION(uuid, locale)}`,
|
|
773
|
+
CREATE_LESSON_TRANSLATION: (uuid) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.CREATE_LESSON_TRANSLATION(uuid)}`,
|
|
774
|
+
UPDATE_LESSON_TRANSLATION: (uuid, locale) => `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.UPDATE_LESSON_TRANSLATION(uuid, locale)}`,
|
|
750
775
|
},
|
|
751
776
|
AI_VENDOR: {
|
|
752
777
|
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(),
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserStatisticsByMonthCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const constants_1 = require("../../constants");
|
|
6
7
|
var GetUserStatisticsByMonthCommand;
|
|
7
8
|
(function (GetUserStatisticsByMonthCommand) {
|
|
8
9
|
GetUserStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
|
|
10
|
+
callOrigin: zod_1.z
|
|
11
|
+
.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
|
|
12
|
+
.default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
|
|
13
|
+
.optional(),
|
|
10
14
|
metric: zod_1.z
|
|
11
15
|
.nativeEnum(constants_1.STATISTICS_METRIC_TYPE)
|
|
12
16
|
.default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS)
|
|
@@ -14,18 +18,7 @@ var GetUserStatisticsByMonthCommand;
|
|
|
14
18
|
});
|
|
15
19
|
GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema = zod_1.z.object({
|
|
16
20
|
month: zod_1.z.string(),
|
|
17
|
-
|
|
18
|
-
total_audios: zod_1.z.number(),
|
|
19
|
-
total_images: zod_1.z.number(),
|
|
20
|
-
total_videos: zod_1.z.number(),
|
|
21
|
-
total_presentations: zod_1.z.number(),
|
|
22
|
-
total_paraphrases: zod_1.z.number(),
|
|
23
|
-
writers: zod_1.z.object({
|
|
24
|
-
total_writers: zod_1.z.number(),
|
|
25
|
-
total_writer_actions: zod_1.z.number(),
|
|
26
|
-
}),
|
|
27
|
-
total_video_edits: zod_1.z.number(),
|
|
28
|
-
total_musics: zod_1.z.number(),
|
|
21
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
29
22
|
});
|
|
30
23
|
GetUserStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
31
24
|
data: zod_1.z.array(GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetUserStatisticsOverviewCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const constants_1 = require("../../constants");
|
|
6
7
|
var GetUserStatisticsOverviewCommand;
|
|
7
8
|
(function (GetUserStatisticsOverviewCommand) {
|
|
@@ -13,7 +14,10 @@ var GetUserStatisticsOverviewCommand;
|
|
|
13
14
|
message: 'to must be a valid date string',
|
|
14
15
|
}),
|
|
15
16
|
groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
|
|
16
|
-
|
|
17
|
+
callOrigin: zod_1.z
|
|
18
|
+
.nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
|
|
19
|
+
.default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
|
|
20
|
+
.optional(),
|
|
17
21
|
});
|
|
18
22
|
GetUserStatisticsOverviewCommand.UserStatisticsOverviewResponseSchema = zod_1.z.object({
|
|
19
23
|
startDate: zod_1.z.string(),
|