@purpleschool/gptbot 0.11.7 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/controllers/http/team-account.ts +2 -2
- package/api/routes.ts +2 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +1 -12
- package/build/commands/team-account/get-team-account-statistics-by-month.command.js +1 -12
- package/build/commands/team-account/index.js +1 -0
- package/build/commands/team-account/update-team-account-invite.command.js +17 -0
- package/build/commands/tools/presentation/create-presentation.command.js +0 -3
- package/build/commands/tools/presentation/update-presentation.command.js +0 -1
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +22 -0
- package/build/constants/presentation/enums/index.js +0 -1
- package/build/models/tools/presentation/index.js +0 -1
- package/build/models/tools/presentation/presentation-template.schema.js +0 -1
- package/build/models/tools/presentation/presentation.schema.js +0 -3
- package/build/models/tools/presentation/slide-content-edit.schema.js +12 -18
- package/build/models/tools/presentation/slide-content.schema.js +12 -16
- package/commands/cabinet/get-user-statistics-by-month.command.ts +6 -13
- package/commands/team-account/get-team-account-statistics-by-month.command.ts +6 -13
- package/commands/team-account/index.ts +1 -0
- package/commands/team-account/update-team-account-invite.command.ts +22 -0
- package/commands/tools/presentation/create-presentation.command.ts +1 -7
- package/commands/tools/presentation/update-presentation.command.ts +0 -1
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-request-type.enum.ts +18 -0
- package/constants/presentation/enums/index.ts +0 -1
- package/models/tools/presentation/index.ts +0 -1
- package/models/tools/presentation/presentation-template.schema.ts +0 -1
- package/models/tools/presentation/presentation.schema.ts +1 -8
- package/models/tools/presentation/slide-content-edit.schema.ts +12 -18
- package/models/tools/presentation/slide-content.schema.ts +21 -25
- package/package.json +1 -1
- package/build/constants/presentation/enums/presentation-target-audience.enum.js +0 -10
- package/build/models/tools/presentation/presentation-title-page.schema.js +0 -9
- package/constants/presentation/enums/presentation-target-audience.enum.ts +0 -6
- package/models/tools/presentation/presentation-title-page.schema.ts +0 -9
|
@@ -5,6 +5,7 @@ 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',
|
|
@@ -24,6 +25,5 @@ export const TEAM_ACCOUNT_ROUTES = {
|
|
|
24
25
|
ADMIN_FIND_BY_NAME: 'admin/find',
|
|
25
26
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
|
|
26
27
|
`admin/subscriptions/current/${teamAccountId}`,
|
|
27
|
-
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) =>
|
|
28
|
-
`admin/payments/history/${teamAccountId}`,
|
|
28
|
+
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) => `admin/payments/history/${teamAccountId}`,
|
|
29
29
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -190,6 +190,8 @@ export const REST_API = {
|
|
|
190
190
|
UPDATE_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
191
191
|
UPDATE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
192
192
|
INVITE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
193
|
+
UPDATE_INVITE: (uuid: string) =>
|
|
194
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_INVITE(uuid)}`,
|
|
193
195
|
REVOKE_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
194
196
|
REMOVE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
195
197
|
LEAVE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.LEAVE_MEMBER}`,
|
package/build/api/routes.js
CHANGED
|
@@ -189,6 +189,7 @@ exports.REST_API = {
|
|
|
189
189
|
UPDATE_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
190
190
|
UPDATE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
191
191
|
INVITE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
192
|
+
UPDATE_INVITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_INVITE(uuid)}`,
|
|
192
193
|
REVOKE_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
193
194
|
REMOVE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
194
195
|
LEAVE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.LEAVE_MEMBER}`,
|
|
@@ -14,18 +14,7 @@ var GetUserStatisticsByMonthCommand;
|
|
|
14
14
|
});
|
|
15
15
|
GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema = zod_1.z.object({
|
|
16
16
|
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(),
|
|
17
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
29
18
|
});
|
|
30
19
|
GetUserStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
31
20
|
data: zod_1.z.array(GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema),
|
|
@@ -15,18 +15,7 @@ var GetTeamAccountStatisticsByMonthCommand;
|
|
|
15
15
|
});
|
|
16
16
|
GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema = zod_1.z.object({
|
|
17
17
|
month: zod_1.z.string(),
|
|
18
|
-
|
|
19
|
-
total_audios: zod_1.z.number(),
|
|
20
|
-
total_images: zod_1.z.number(),
|
|
21
|
-
total_videos: zod_1.z.number(),
|
|
22
|
-
total_presentations: zod_1.z.number(),
|
|
23
|
-
total_paraphrases: zod_1.z.number(),
|
|
24
|
-
writers: zod_1.z.object({
|
|
25
|
-
total_writers: zod_1.z.number(),
|
|
26
|
-
total_writer_actions: zod_1.z.number(),
|
|
27
|
-
}),
|
|
28
|
-
total_video_edits: zod_1.z.number(),
|
|
29
|
-
total_musics: zod_1.z.number(),
|
|
18
|
+
statistics: zod_1.z.record(zod_1.z.nativeEnum(constants_1.STATISTICS_REQUEST_TYPE), zod_1.z.number()),
|
|
30
19
|
});
|
|
31
20
|
GetTeamAccountStatisticsByMonthCommand.ResponseSchema = zod_1.z.object({
|
|
32
21
|
data: zod_1.z.array(GetTeamAccountStatisticsByMonthCommand.TeamAccountStatisticsByMonthItemSchema),
|
|
@@ -18,6 +18,7 @@ __exportStar(require("./create-team-account.command"), exports);
|
|
|
18
18
|
__exportStar(require("./update-team-account.command"), exports);
|
|
19
19
|
__exportStar(require("./cancel-team-trial-subscription.command"), exports);
|
|
20
20
|
__exportStar(require("./invite-team-account-member.command"), exports);
|
|
21
|
+
__exportStar(require("./update-team-account-invite.command"), exports);
|
|
21
22
|
__exportStar(require("./accept-team-account-invite.command"), exports);
|
|
22
23
|
__exportStar(require("./remove-team-account-member.command"), exports);
|
|
23
24
|
__exportStar(require("./leave-team-account-member.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateTeamAccountInviteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var UpdateTeamAccountInviteCommand;
|
|
7
|
+
(function (UpdateTeamAccountInviteCommand) {
|
|
8
|
+
UpdateTeamAccountInviteCommand.RequestParam = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
UpdateTeamAccountInviteCommand.RequestSchema = zod_1.z.object({
|
|
12
|
+
limit: zod_1.z.number().int().positive().nullable(),
|
|
13
|
+
});
|
|
14
|
+
UpdateTeamAccountInviteCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
data: models_1.TeamAccountInviteResponseSchema,
|
|
16
|
+
});
|
|
17
|
+
})(UpdateTeamAccountInviteCommand || (exports.UpdateTeamAccountInviteCommand = UpdateTeamAccountInviteCommand = {}));
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreatePresentationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const presentation_1 = require("../../../models/tools/presentation");
|
|
6
|
-
const constants_1 = require("../../../constants");
|
|
7
6
|
var CreatePresentationCommand;
|
|
8
7
|
(function (CreatePresentationCommand) {
|
|
9
8
|
CreatePresentationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -11,8 +10,6 @@ var CreatePresentationCommand;
|
|
|
11
10
|
slideCount: zod_1.z.number().min(1).max(20),
|
|
12
11
|
templateId: zod_1.z.string().uuid(),
|
|
13
12
|
languageId: zod_1.z.string().uuid(),
|
|
14
|
-
titlePage: presentation_1.PresentationTitlePageSchema.optional().nullable(),
|
|
15
|
-
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
16
13
|
});
|
|
17
14
|
CreatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
18
15
|
data: presentation_1.PresentationSchema,
|
|
@@ -11,7 +11,6 @@ var UpdatePresentationCommand;
|
|
|
11
11
|
UpdatePresentationCommand.RequestBodySchema = presentation_1.PresentationSchema.pick({
|
|
12
12
|
title: true,
|
|
13
13
|
templateId: true,
|
|
14
|
-
titlePage: true,
|
|
15
14
|
}).partial();
|
|
16
15
|
UpdatePresentationCommand.ResponseSchema = zod_1.z.object({
|
|
17
16
|
data: presentation_1.PresentationSchema,
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./group-by.enum"), exports);
|
|
18
18
|
__exportStar(require("./statistics-metric-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./statistics-request-type.enum"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATISTICS_REQUEST_TYPE = void 0;
|
|
4
|
+
var STATISTICS_REQUEST_TYPE;
|
|
5
|
+
(function (STATISTICS_REQUEST_TYPE) {
|
|
6
|
+
STATISTICS_REQUEST_TYPE["IMAGE"] = "IMAGE";
|
|
7
|
+
STATISTICS_REQUEST_TYPE["VIDEO"] = "VIDEO";
|
|
8
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
9
|
+
STATISTICS_REQUEST_TYPE["TEXT"] = "TEXT";
|
|
10
|
+
STATISTICS_REQUEST_TYPE["AUDIO"] = "AUDIO";
|
|
11
|
+
STATISTICS_REQUEST_TYPE["PARAPHRASE"] = "PARAPHRASE";
|
|
12
|
+
STATISTICS_REQUEST_TYPE["WRITER"] = "WRITER";
|
|
13
|
+
STATISTICS_REQUEST_TYPE["PRESENTATION_AI_ACTION"] = "PRESENTATION_AI_ACTION";
|
|
14
|
+
STATISTICS_REQUEST_TYPE["WRITER_ACTION"] = "WRITER_ACTION";
|
|
15
|
+
STATISTICS_REQUEST_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
16
|
+
STATISTICS_REQUEST_TYPE["MUSIC"] = "MUSIC";
|
|
17
|
+
STATISTICS_REQUEST_TYPE["MUSIC_ACTION"] = "MUSIC_ACTION";
|
|
18
|
+
STATISTICS_REQUEST_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
19
|
+
STATISTICS_REQUEST_TYPE["MARKETPLACE_CARD"] = "MARKETPLACE_CARD";
|
|
20
|
+
STATISTICS_REQUEST_TYPE["SOLVING_EDU_TASK"] = "SOLVING_EDU_TASK";
|
|
21
|
+
STATISTICS_REQUEST_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
22
|
+
})(STATISTICS_REQUEST_TYPE || (exports.STATISTICS_REQUEST_TYPE = STATISTICS_REQUEST_TYPE = {}));
|
|
@@ -23,4 +23,3 @@ __exportStar(require("./slide-image-slot-action.enum"), exports);
|
|
|
23
23
|
__exportStar(require("./presentation-ai-action-type.enum"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action-pricing-type.enum"), exports);
|
|
25
25
|
__exportStar(require("./presentation-ai-action-call-status.enum"), exports);
|
|
26
|
-
__exportStar(require("./presentation-target-audience.enum"), exports);
|
|
@@ -22,4 +22,3 @@ __exportStar(require("./slide.schema"), exports);
|
|
|
22
22
|
__exportStar(require("./slide-content.schema"), exports);
|
|
23
23
|
__exportStar(require("./presentation-config.schema"), exports);
|
|
24
24
|
__exportStar(require("./presentation-ai-action.schema"), exports);
|
|
25
|
-
__exportStar(require("./presentation-title-page.schema"), exports);
|
|
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const slide_outline_schema_1 = require("./slide-outline.schema");
|
|
7
7
|
const slide_schema_1 = require("./slide.schema");
|
|
8
|
-
const presentation_title_page_schema_1 = require("./presentation-title-page.schema");
|
|
9
8
|
exports.PresentationSchema = zod_1.z.object({
|
|
10
9
|
uuid: zod_1.z.string().uuid(),
|
|
11
10
|
prompt: zod_1.z.string(),
|
|
@@ -20,8 +19,6 @@ exports.PresentationSchema = zod_1.z.object({
|
|
|
20
19
|
slideCount: zod_1.z.number(),
|
|
21
20
|
lastContentUpdateAt: zod_1.z.date().nullable(),
|
|
22
21
|
lastPptxExportedAt: zod_1.z.date().nullable(),
|
|
23
|
-
titlePage: presentation_title_page_schema_1.PresentationTitlePageSchema.nullable(),
|
|
24
|
-
targetAudience: zod_1.z.nativeEnum(constants_1.PRESENTATION_TARGET_AUDIENCE),
|
|
25
22
|
createdAt: zod_1.z.date(),
|
|
26
23
|
updatedAt: zod_1.z.date(),
|
|
27
24
|
});
|
|
@@ -10,24 +10,18 @@ const constants_1 = require("../../../constants");
|
|
|
10
10
|
exports.CoverSlideDataUserEditSchema = zod_1.default.object({
|
|
11
11
|
contentType: zod_1.default.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
12
12
|
title: zod_1.default.string().max(1000),
|
|
13
|
-
author: zod_1.default
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
email: zod_1.default
|
|
26
|
-
.object({
|
|
27
|
-
label: zod_1.default.string().min(1).max(100),
|
|
28
|
-
value: zod_1.default.string().min(1).max(200),
|
|
29
|
-
})
|
|
30
|
-
.optional(),
|
|
13
|
+
author: zod_1.default.object({
|
|
14
|
+
label: zod_1.default.string().max(200),
|
|
15
|
+
value: zod_1.default.string().max(500),
|
|
16
|
+
}),
|
|
17
|
+
date: zod_1.default.object({
|
|
18
|
+
label: zod_1.default.string().max(200),
|
|
19
|
+
value: zod_1.default.string().max(500),
|
|
20
|
+
}),
|
|
21
|
+
email: zod_1.default.object({
|
|
22
|
+
label: zod_1.default.string().max(200),
|
|
23
|
+
value: zod_1.default.string().max(500),
|
|
24
|
+
}),
|
|
31
25
|
version: zod_1.default.literal(1),
|
|
32
26
|
});
|
|
33
27
|
exports.ThankYouSlideDataUserEditSchema = zod_1.default.object({
|
|
@@ -24,26 +24,22 @@ exports.IconSlotSchema = zod_1.z.object({
|
|
|
24
24
|
exports.CoverSlideDataSchema = zod_1.z.object({
|
|
25
25
|
contentType: zod_1.z.literal(constants_1.SLIDE_CONTENT_TYPE.COVER),
|
|
26
26
|
title: zod_1.z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
27
|
-
author: zod_1.z
|
|
28
|
-
.object({
|
|
27
|
+
author: zod_1.z.object({
|
|
29
28
|
label: zod_1.z.string().describe('Literal "Author" in presentation\'s language'),
|
|
30
|
-
value: zod_1.z
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
value: zod_1.z
|
|
30
|
+
.string()
|
|
31
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
32
|
+
}),
|
|
33
|
+
date: zod_1.z.object({
|
|
35
34
|
label: zod_1.z.string().describe('Literal "Date" in presentation\'s language'),
|
|
36
35
|
value: zod_1.z
|
|
37
36
|
.string()
|
|
38
|
-
.describe('Date
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
-
value: zod_1.z.string().describe('Email value from titlePage if provided'),
|
|
45
|
-
})
|
|
46
|
-
.optional(),
|
|
37
|
+
.describe('Date of the presentation in the "dd month yyyy" format in presentation\'s locale'),
|
|
38
|
+
}),
|
|
39
|
+
email: zod_1.z.object({
|
|
40
|
+
label: zod_1.z.string().describe('Just default word "Email"'),
|
|
41
|
+
value: zod_1.z.string().describe('Just default "email@example.com"'),
|
|
42
|
+
}),
|
|
47
43
|
version: zod_1.z.literal(1),
|
|
48
44
|
});
|
|
49
45
|
exports.ThankYouSlideDataSchema = zod_1.z.object({
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
JOB_REQUEST_ORIGIN,
|
|
4
|
+
STATISTICS_METRIC_TYPE,
|
|
5
|
+
STATISTICS_REQUEST_TYPE,
|
|
6
|
+
} from '../../constants';
|
|
3
7
|
|
|
4
8
|
export namespace GetUserStatisticsByMonthCommand {
|
|
5
9
|
export const RequestSchema = z.object({
|
|
@@ -14,18 +18,7 @@ export namespace GetUserStatisticsByMonthCommand {
|
|
|
14
18
|
|
|
15
19
|
export const UserStatisticsByMonthResponseSchema = z.object({
|
|
16
20
|
month: z.string(),
|
|
17
|
-
|
|
18
|
-
total_audios: z.number(),
|
|
19
|
-
total_images: z.number(),
|
|
20
|
-
total_videos: z.number(),
|
|
21
|
-
total_presentations: z.number(),
|
|
22
|
-
total_paraphrases: z.number(),
|
|
23
|
-
writers: z.object({
|
|
24
|
-
total_writers: z.number(),
|
|
25
|
-
total_writer_actions: z.number(),
|
|
26
|
-
}),
|
|
27
|
-
total_video_edits: z.number(),
|
|
28
|
-
total_musics: z.number(),
|
|
21
|
+
statistics: z.record(z.nativeEnum(STATISTICS_REQUEST_TYPE), z.number()),
|
|
29
22
|
});
|
|
30
23
|
|
|
31
24
|
export const ResponseSchema = z.object({
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
JOB_REQUEST_ORIGIN,
|
|
4
|
+
STATISTICS_METRIC_TYPE,
|
|
5
|
+
STATISTICS_REQUEST_TYPE,
|
|
6
|
+
} from '../../constants';
|
|
3
7
|
|
|
4
8
|
export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
5
9
|
export const RequestSchema = z.object({
|
|
@@ -15,18 +19,7 @@ export namespace GetTeamAccountStatisticsByMonthCommand {
|
|
|
15
19
|
|
|
16
20
|
export const TeamAccountStatisticsByMonthItemSchema = z.object({
|
|
17
21
|
month: z.string(),
|
|
18
|
-
|
|
19
|
-
total_audios: z.number(),
|
|
20
|
-
total_images: z.number(),
|
|
21
|
-
total_videos: z.number(),
|
|
22
|
-
total_presentations: z.number(),
|
|
23
|
-
total_paraphrases: z.number(),
|
|
24
|
-
writers: z.object({
|
|
25
|
-
total_writers: z.number(),
|
|
26
|
-
total_writer_actions: z.number(),
|
|
27
|
-
}),
|
|
28
|
-
total_video_edits: z.number(),
|
|
29
|
-
total_musics: z.number(),
|
|
22
|
+
statistics: z.record(z.nativeEnum(STATISTICS_REQUEST_TYPE), z.number()),
|
|
30
23
|
});
|
|
31
24
|
|
|
32
25
|
export const ResponseSchema = z.object({
|
|
@@ -2,6 +2,7 @@ export * from './create-team-account.command';
|
|
|
2
2
|
export * from './update-team-account.command';
|
|
3
3
|
export * from './cancel-team-trial-subscription.command';
|
|
4
4
|
export * from './invite-team-account-member.command';
|
|
5
|
+
export * from './update-team-account-invite.command';
|
|
5
6
|
export * from './accept-team-account-invite.command';
|
|
6
7
|
export * from './remove-team-account-member.command';
|
|
7
8
|
export * from './leave-team-account-member.command';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamAccountInviteResponseSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace UpdateTeamAccountInviteCommand {
|
|
5
|
+
export const RequestParam = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParam>;
|
|
10
|
+
|
|
11
|
+
export const RequestSchema = z.object({
|
|
12
|
+
limit: z.number().int().positive().nullable(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
16
|
+
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: TeamAccountInviteResponseSchema,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PresentationSchema,
|
|
4
|
-
PresentationTitlePageSchema,
|
|
5
|
-
} from '../../../models/tools/presentation';
|
|
6
|
-
import { PRESENTATION_TARGET_AUDIENCE } from '../../../constants';
|
|
2
|
+
import { PresentationSchema } from '../../../models/tools/presentation';
|
|
7
3
|
|
|
8
4
|
export namespace CreatePresentationCommand {
|
|
9
5
|
export const RequestSchema = z.object({
|
|
@@ -11,8 +7,6 @@ export namespace CreatePresentationCommand {
|
|
|
11
7
|
slideCount: z.number().min(1).max(20),
|
|
12
8
|
templateId: z.string().uuid(),
|
|
13
9
|
languageId: z.string().uuid(),
|
|
14
|
-
titlePage: PresentationTitlePageSchema.optional().nullable(),
|
|
15
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE).optional(),
|
|
16
10
|
});
|
|
17
11
|
|
|
18
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export enum STATISTICS_REQUEST_TYPE {
|
|
2
|
+
IMAGE = 'IMAGE',
|
|
3
|
+
VIDEO = 'VIDEO',
|
|
4
|
+
PRESENTATION = 'PRESENTATION',
|
|
5
|
+
TEXT = 'TEXT',
|
|
6
|
+
AUDIO = 'AUDIO',
|
|
7
|
+
PARAPHRASE = 'PARAPHRASE',
|
|
8
|
+
WRITER = 'WRITER',
|
|
9
|
+
PRESENTATION_AI_ACTION = 'PRESENTATION_AI_ACTION',
|
|
10
|
+
WRITER_ACTION = 'WRITER_ACTION',
|
|
11
|
+
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
12
|
+
MUSIC = 'MUSIC',
|
|
13
|
+
MUSIC_ACTION = 'MUSIC_ACTION',
|
|
14
|
+
INTERIOR_DESIGN = 'INTERIOR_DESIGN',
|
|
15
|
+
MARKETPLACE_CARD = 'MARKETPLACE_CARD',
|
|
16
|
+
SOLVING_EDU_TASK = 'SOLVING_EDU_TASK',
|
|
17
|
+
SPELL_CORRECTOR = 'SPELL_CORRECTOR',
|
|
18
|
+
}
|
|
@@ -7,4 +7,3 @@ export * from './slide-image-slot-action.enum';
|
|
|
7
7
|
export * from './presentation-ai-action-type.enum';
|
|
8
8
|
export * from './presentation-ai-action-pricing-type.enum';
|
|
9
9
|
export * from './presentation-ai-action-call-status.enum';
|
|
10
|
-
export * from './presentation-target-audience.enum';
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PRESENTATION_STAGE,
|
|
4
|
-
PRESENTATION_TARGET_AUDIENCE,
|
|
5
|
-
USER_REACTION,
|
|
6
|
-
} from '../../../constants';
|
|
2
|
+
import { PRESENTATION_STAGE, USER_REACTION } from '../../../constants';
|
|
7
3
|
import { SlideOutlineSchema } from './slide-outline.schema';
|
|
8
4
|
import { SlideSchema } from './slide.schema';
|
|
9
|
-
import { PresentationTitlePageSchema } from './presentation-title-page.schema';
|
|
10
5
|
|
|
11
6
|
export const PresentationSchema = z.object({
|
|
12
7
|
uuid: z.string().uuid(),
|
|
@@ -22,8 +17,6 @@ export const PresentationSchema = z.object({
|
|
|
22
17
|
slideCount: z.number(),
|
|
23
18
|
lastContentUpdateAt: z.date().nullable(),
|
|
24
19
|
lastPptxExportedAt: z.date().nullable(),
|
|
25
|
-
titlePage: PresentationTitlePageSchema.nullable(),
|
|
26
|
-
targetAudience: z.nativeEnum(PRESENTATION_TARGET_AUDIENCE),
|
|
27
20
|
createdAt: z.date(),
|
|
28
21
|
updatedAt: z.date(),
|
|
29
22
|
});
|
|
@@ -19,24 +19,18 @@ import { SLIDE_CONTENT_TYPE } from '../../../constants';
|
|
|
19
19
|
export const CoverSlideDataUserEditSchema = z.object({
|
|
20
20
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
21
21
|
title: z.string().max(1000),
|
|
22
|
-
author: z
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
email: z
|
|
35
|
-
.object({
|
|
36
|
-
label: z.string().min(1).max(100),
|
|
37
|
-
value: z.string().min(1).max(200),
|
|
38
|
-
})
|
|
39
|
-
.optional(),
|
|
22
|
+
author: z.object({
|
|
23
|
+
label: z.string().max(200),
|
|
24
|
+
value: z.string().max(500),
|
|
25
|
+
}),
|
|
26
|
+
date: z.object({
|
|
27
|
+
label: z.string().max(200),
|
|
28
|
+
value: z.string().max(500),
|
|
29
|
+
}),
|
|
30
|
+
email: z.object({
|
|
31
|
+
label: z.string().max(200),
|
|
32
|
+
value: z.string().max(500),
|
|
33
|
+
}),
|
|
40
34
|
version: z.literal(1),
|
|
41
35
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
42
36
|
|
|
@@ -26,9 +26,9 @@ export type IconSlot = z.infer<typeof IconSlotSchema>;
|
|
|
26
26
|
export interface ICoverSlideDataStructure {
|
|
27
27
|
contentType: SLIDE_CONTENT_TYPE.COVER;
|
|
28
28
|
title: string;
|
|
29
|
-
author
|
|
30
|
-
date
|
|
31
|
-
email
|
|
29
|
+
author: { label: string; value: string };
|
|
30
|
+
date: { label: string; value: string };
|
|
31
|
+
email: { label: string; value: string };
|
|
32
32
|
version: 1;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -125,28 +125,24 @@ export interface ITimelineSlideDataStructure {
|
|
|
125
125
|
export const CoverSlideDataSchema = z.object({
|
|
126
126
|
contentType: z.literal(SLIDE_CONTENT_TYPE.COVER),
|
|
127
127
|
title: z.string().describe('Slide title in about 6 words').min(10).max(150),
|
|
128
|
-
author: z
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
date: z
|
|
135
|
-
.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
label: z.string().describe('Localized contact/email label'),
|
|
147
|
-
value: z.string().describe('Email value from titlePage if provided'),
|
|
148
|
-
})
|
|
149
|
-
.optional(),
|
|
128
|
+
author: z.object({
|
|
129
|
+
label: z.string().describe('Literal "Author" in presentation\'s language'),
|
|
130
|
+
value: z
|
|
131
|
+
.string()
|
|
132
|
+
.describe('Literal "Author of the presentation" in presentation\'s language'),
|
|
133
|
+
}),
|
|
134
|
+
date: z.object({
|
|
135
|
+
label: z.string().describe('Literal "Date" in presentation\'s language'),
|
|
136
|
+
value: z
|
|
137
|
+
.string()
|
|
138
|
+
.describe(
|
|
139
|
+
'Date of the presentation in the "dd month yyyy" format in presentation\'s locale',
|
|
140
|
+
),
|
|
141
|
+
}),
|
|
142
|
+
email: z.object({
|
|
143
|
+
label: z.string().describe('Just default word "Email"'),
|
|
144
|
+
value: z.string().describe('Just default "email@example.com"'),
|
|
145
|
+
}),
|
|
150
146
|
version: z.literal(1),
|
|
151
147
|
}) satisfies z.ZodType<ICoverSlideDataStructure>;
|
|
152
148
|
export type CoverSlideData = z.infer<typeof CoverSlideDataSchema>;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRESENTATION_TARGET_AUDIENCE = void 0;
|
|
4
|
-
var PRESENTATION_TARGET_AUDIENCE;
|
|
5
|
-
(function (PRESENTATION_TARGET_AUDIENCE) {
|
|
6
|
-
PRESENTATION_TARGET_AUDIENCE["NONE"] = "NONE";
|
|
7
|
-
PRESENTATION_TARGET_AUDIENCE["SCHOOL"] = "SCHOOL";
|
|
8
|
-
PRESENTATION_TARGET_AUDIENCE["UNIVERSITY"] = "UNIVERSITY";
|
|
9
|
-
PRESENTATION_TARGET_AUDIENCE["BUSINESS"] = "BUSINESS";
|
|
10
|
-
})(PRESENTATION_TARGET_AUDIENCE || (exports.PRESENTATION_TARGET_AUDIENCE = PRESENTATION_TARGET_AUDIENCE = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PresentationTitlePageSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.PresentationTitlePageSchema = zod_1.z.object({
|
|
6
|
-
author: zod_1.z.string().optional().nullable(),
|
|
7
|
-
createdAt: zod_1.z.coerce.date().optional().nullable(),
|
|
8
|
-
email: zod_1.z.string().email().optional().nullable(),
|
|
9
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const PresentationTitlePageSchema = z.object({
|
|
4
|
-
author: z.string().optional().nullable(),
|
|
5
|
-
createdAt: z.coerce.date().optional().nullable(),
|
|
6
|
-
email: z.string().email().optional().nullable(),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type PresentationTitlePage = z.infer<typeof PresentationTitlePageSchema>;
|