@purpleschool/gptbot 0.19.7 → 0.19.9-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/build/api/controllers/http/greetings.d.ts +24 -0
- package/build/api/controllers/http/greetings.js +28 -0
- package/build/api/controllers/http/index.d.ts +1 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/index.d.ts +1 -0
- package/build/api/index.js +1 -0
- package/build/api/partner-code-routes.d.ts +21 -0
- package/build/api/partner-code-routes.js +25 -0
- package/build/commands/content-report/create-content-report.command.d.ts +2 -0
- package/build/commands/content-report/find-content-reports.query.d.ts +2 -0
- package/build/commands/content-report/update-content-report-status.command.d.ts +1 -0
- package/build/commands/index.d.ts +1 -0
- package/build/commands/index.js +1 -0
- package/build/commands/message/create-text-message.command.js +1 -1
- package/build/commands/partner-codes/index.d.ts +489 -0
- package/build/commands/partner-codes/index.js +73 -0
- package/build/commands/tools/greetings/index.d.ts +2 -0
- package/build/commands/tools/greetings/index.js +18 -0
- package/build/commands/tools/greetings/requests.d.ts +130 -0
- package/build/commands/tools/greetings/requests.js +34 -0
- package/build/commands/tools/greetings/responses.d.ts +251 -0
- package/build/commands/tools/greetings/responses.js +29 -0
- package/build/commands/tools/index.d.ts +1 -0
- package/build/commands/tools/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.d.ts +1 -0
- package/build/constants/cabinet/enums/statistics-request-type.enum.js +1 -0
- package/build/constants/content-report/enums/content-report-target-type.enum.d.ts +1 -0
- package/build/constants/tool/enums/greetings-kind.enum.d.ts +12 -0
- package/build/constants/tool/enums/greetings-kind.enum.js +17 -0
- package/build/constants/tool/enums/index.d.ts +1 -0
- package/build/constants/tool/enums/index.js +1 -0
- package/build/constants/tool/enums/tool-content-type.enum.d.ts +1 -0
- package/build/constants/tool/enums/tool-content-type.enum.js +1 -0
- package/build/greetings/index.d.ts +4 -0
- package/build/greetings/index.js +20 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/content-report.schema.d.ts +1 -0
- package/build/models/index.d.ts +1 -0
- package/build/models/index.js +1 -0
- package/build/models/partner-codes/index.d.ts +1 -0
- package/build/models/partner-codes/index.js +17 -0
- package/build/models/partner-codes/partner-codes.schema.d.ts +739 -0
- package/build/models/partner-codes/partner-codes.schema.js +347 -0
- package/build/models/tools/greetings/greeting-config.schema.d.ts +70 -0
- package/build/models/tools/greetings/greeting-config.schema.js +35 -0
- package/build/models/tools/greetings/greeting-input.schema.d.ts +49 -0
- package/build/models/tools/greetings/greeting-input.schema.js +27 -0
- package/build/models/tools/greetings/greeting-job.schema.d.ts +94 -0
- package/build/models/tools/greetings/greeting-job.schema.js +23 -0
- package/build/models/tools/greetings/greeting-result.schema.d.ts +43 -0
- package/build/models/tools/greetings/greeting-result.schema.js +32 -0
- package/build/models/tools/greetings/index.d.ts +4 -0
- package/build/models/tools/greetings/index.js +20 -0
- package/build/models/tools/index.d.ts +1 -0
- package/build/models/tools/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GREETINGS_KIND } from '../../../constants';
|
|
3
|
+
export declare const GreetingTrackSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
audioUrl: z.ZodURL;
|
|
7
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
8
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
lyrics: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const GreetingResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
+
kind: z.ZodLiteral<GREETINGS_KIND.TEXT>;
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<GREETINGS_KIND.SONG>;
|
|
16
|
+
tracks: z.ZodArray<z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
audioUrl: z.ZodURL;
|
|
20
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
21
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
lyrics: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
kind: z.ZodLiteral<GREETINGS_KIND.VIDEO>;
|
|
26
|
+
video: z.ZodObject<{
|
|
27
|
+
url: z.ZodURL;
|
|
28
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
29
|
+
uuid: z.ZodUUID;
|
|
30
|
+
url: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<GREETINGS_KIND.IMAGE>;
|
|
35
|
+
image: z.ZodObject<{
|
|
36
|
+
url: z.ZodURL;
|
|
37
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
38
|
+
uuid: z.ZodUUID;
|
|
39
|
+
url: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
}, z.core.$strip>], "kind">;
|
|
43
|
+
export type GreetingResult = z.infer<typeof GreetingResultSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GreetingResultSchema = exports.GreetingTrackSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const file_schema_1 = require("../../file.schema");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
exports.GreetingTrackSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.string(),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
audioUrl: zod_1.z.url(),
|
|
11
|
+
imageUrl: zod_1.z.url().optional(),
|
|
12
|
+
duration: zod_1.z.number().nonnegative().optional(),
|
|
13
|
+
lyrics: zod_1.z.string().optional(),
|
|
14
|
+
});
|
|
15
|
+
exports.GreetingResultSchema = zod_1.z.discriminatedUnion('kind', [
|
|
16
|
+
zod_1.z.object({ kind: zod_1.z.literal(constants_1.GREETINGS_KIND.TEXT), text: zod_1.z.string().min(1) }),
|
|
17
|
+
zod_1.z.object({ kind: zod_1.z.literal(constants_1.GREETINGS_KIND.SONG), tracks: zod_1.z.array(exports.GreetingTrackSchema).min(1) }),
|
|
18
|
+
zod_1.z.object({
|
|
19
|
+
kind: zod_1.z.literal(constants_1.GREETINGS_KIND.VIDEO),
|
|
20
|
+
video: zod_1.z.object({
|
|
21
|
+
url: zod_1.z.url(),
|
|
22
|
+
file: file_schema_1.FileSchema.pick({ uuid: true, url: true }).nullable().optional(),
|
|
23
|
+
}),
|
|
24
|
+
}),
|
|
25
|
+
zod_1.z.object({
|
|
26
|
+
kind: zod_1.z.literal(constants_1.GREETINGS_KIND.IMAGE),
|
|
27
|
+
image: zod_1.z.object({
|
|
28
|
+
url: zod_1.z.url(),
|
|
29
|
+
file: file_schema_1.FileSchema.pick({ uuid: true, url: true }).nullable().optional(),
|
|
30
|
+
}),
|
|
31
|
+
}),
|
|
32
|
+
]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./greeting-input.schema"), exports);
|
|
18
|
+
__exportStar(require("./greeting-result.schema"), exports);
|
|
19
|
+
__exportStar(require("./greeting-job.schema"), exports);
|
|
20
|
+
__exportStar(require("./greeting-config.schema"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.9-stage-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@purpleschool/rugpt-lib-common": "^0.0.
|
|
18
|
+
"@purpleschool/rugpt-lib-common": "^0.0.99",
|
|
19
19
|
"zod": "^4.4.3"
|
|
20
20
|
}
|
|
21
21
|
}
|