@purpleschool/gptbot-tools 0.2.64-stage2 → 0.2.65-stage2
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/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/sound-generation/commands/delete-all-sound-generation-jobs.command.d.ts +17 -0
- package/build/sound-generation/commands/delete-all-sound-generation-jobs.command.js +14 -0
- package/build/sound-generation/commands/delete-sound-generation-job-by-uuid.command.d.ts +16 -0
- package/build/sound-generation/commands/delete-sound-generation-job-by-uuid.command.js +14 -0
- package/build/sound-generation/commands/get-sound-generation-price.command.d.ts +24 -0
- package/build/sound-generation/commands/get-sound-generation-price.command.js +17 -0
- package/build/sound-generation/commands/index.d.ts +8 -0
- package/build/sound-generation/commands/index.js +24 -0
- package/build/sound-generation/commands/retry-sound-generation-job.command.d.ts +94 -0
- package/build/sound-generation/commands/retry-sound-generation-job.command.js +20 -0
- package/build/sound-generation/commands/set-reaction-to-sound-generation-job.command.d.ts +87 -0
- package/build/sound-generation/commands/set-reaction-to-sound-generation-job.command.js +27 -0
- package/build/sound-generation/commands/sound-generation.command.d.ts +96 -0
- package/build/sound-generation/commands/sound-generation.command.js +27 -0
- package/build/sound-generation/commands/update-sound-generation-job-favorite.command.d.ts +85 -0
- package/build/sound-generation/commands/update-sound-generation-job-favorite.command.js +16 -0
- package/build/sound-generation/commands/update-sound-generation-job-title.command.d.ts +85 -0
- package/build/sound-generation/commands/update-sound-generation-job-title.command.js +16 -0
- package/build/sound-generation/enums/index.d.ts +1 -0
- package/build/sound-generation/enums/index.js +17 -0
- package/build/sound-generation/enums/sound-generation-strategy.enum.d.ts +3 -0
- package/build/sound-generation/enums/sound-generation-strategy.enum.js +7 -0
- package/build/sound-generation/index.d.ts +5 -0
- package/build/sound-generation/index.js +21 -0
- package/build/sound-generation/models/index.d.ts +5 -0
- package/build/sound-generation/models/index.js +21 -0
- package/build/sound-generation/models/sound-generation-config.schema.d.ts +34 -0
- package/build/sound-generation/models/sound-generation-config.schema.js +8 -0
- package/build/sound-generation/models/sound-generation-job.schema.d.ts +39 -0
- package/build/sound-generation/models/sound-generation-job.schema.js +34 -0
- package/build/sound-generation/models/sound-generation-model.schema.d.ts +42 -0
- package/build/sound-generation/models/sound-generation-model.schema.js +28 -0
- package/build/sound-generation/models/sound-generation-params.schema.d.ts +8 -0
- package/build/sound-generation/models/sound-generation-params.schema.js +10 -0
- package/build/sound-generation/models/sound-generation-result.schema.d.ts +7 -0
- package/build/sound-generation/models/sound-generation-result.schema.js +9 -0
- package/build/sound-generation/queries/find-sound-generation-job-by-id.query.d.ts +84 -0
- package/build/sound-generation/queries/find-sound-generation-job-by-id.query.js +15 -0
- package/build/sound-generation/queries/find-sound-generation-jobs.query.d.ts +102 -0
- package/build/sound-generation/queries/find-sound-generation-jobs.query.js +35 -0
- package/build/sound-generation/queries/get-sound-generation-config.query.d.ts +76 -0
- package/build/sound-generation/queries/get-sound-generation-config.query.js +10 -0
- package/build/sound-generation/queries/index.d.ts +3 -0
- package/build/sound-generation/queries/index.js +19 -0
- package/build/sound-generation/routes/index.d.ts +1 -0
- package/build/sound-generation/routes/index.js +17 -0
- package/build/sound-generation/routes/sound-generation.amqp.routes.d.ts +13 -0
- package/build/sound-generation/routes/sound-generation.amqp.routes.js +16 -0
- package/build/tools/enums/tool-content-type.enum.d.ts +2 -1
- package/build/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/enums/tool-type.enum.d.ts +2 -1
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/build/tools/models/global-tools-config.schema.d.ts +32 -0
- package/build/tools/models/global-tools-config.schema.js +2 -0
- package/build/tools/models/tools-with-configs.schema.d.ts +88 -0
- package/build/tools/models/tools-with-configs.schema.js +5 -0
- package/build/tools/queries/get-global-tools-config.query.d.ts +64 -0
- package/build/tools/queries/get-tools-with-configs.query.d.ts +88 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './html-page-builder';
|
|
|
22
22
|
export * from './tool-workspace';
|
|
23
23
|
export * from './diagrams';
|
|
24
24
|
export * from './image-recognition';
|
|
25
|
+
export * from './sound-generation';
|
|
25
26
|
export * from './photo-sessions';
|
|
26
27
|
import * as common from './common';
|
|
27
28
|
import * as paraphrase from './paraphrase';
|
|
@@ -47,6 +48,7 @@ import * as accountMerge from './account-merge';
|
|
|
47
48
|
import * as toolWorkspace from './tool-workspace';
|
|
48
49
|
import * as diagrams from './diagrams';
|
|
49
50
|
import * as imageRecognition from './image-recognition';
|
|
51
|
+
import * as soundGeneration from './sound-generation';
|
|
50
52
|
import * as photoSessions from './photo-sessions';
|
|
51
53
|
export declare namespace ToolService {
|
|
52
54
|
export import Common = common;
|
|
@@ -73,5 +75,6 @@ export declare namespace ToolService {
|
|
|
73
75
|
export import ToolWorkspace = toolWorkspace;
|
|
74
76
|
export import Diagrams = diagrams;
|
|
75
77
|
export import ImageRecognition = imageRecognition;
|
|
78
|
+
export import SoundGeneration = soundGeneration;
|
|
76
79
|
export import PhotoSessions = photoSessions;
|
|
77
80
|
}
|
package/build/index.js
CHANGED
|
@@ -61,6 +61,7 @@ __exportStar(require("./html-page-builder"), exports);
|
|
|
61
61
|
__exportStar(require("./tool-workspace"), exports);
|
|
62
62
|
__exportStar(require("./diagrams"), exports);
|
|
63
63
|
__exportStar(require("./image-recognition"), exports);
|
|
64
|
+
__exportStar(require("./sound-generation"), exports);
|
|
64
65
|
__exportStar(require("./photo-sessions"), exports);
|
|
65
66
|
const common = __importStar(require("./common"));
|
|
66
67
|
const paraphrase = __importStar(require("./paraphrase"));
|
|
@@ -86,6 +87,7 @@ const accountMerge = __importStar(require("./account-merge"));
|
|
|
86
87
|
const toolWorkspace = __importStar(require("./tool-workspace"));
|
|
87
88
|
const diagrams = __importStar(require("./diagrams"));
|
|
88
89
|
const imageRecognition = __importStar(require("./image-recognition"));
|
|
90
|
+
const soundGeneration = __importStar(require("./sound-generation"));
|
|
89
91
|
const photoSessions = __importStar(require("./photo-sessions"));
|
|
90
92
|
var ToolService;
|
|
91
93
|
(function (ToolService) {
|
|
@@ -113,5 +115,6 @@ var ToolService;
|
|
|
113
115
|
ToolService.ToolWorkspace = toolWorkspace;
|
|
114
116
|
ToolService.Diagrams = diagrams;
|
|
115
117
|
ToolService.ImageRecognition = imageRecognition;
|
|
118
|
+
ToolService.SoundGeneration = soundGeneration;
|
|
116
119
|
ToolService.PhotoSessions = photoSessions;
|
|
117
120
|
})(ToolService || (exports.ToolService = ToolService = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JOB_SCOPE } from '../../common';
|
|
3
|
+
export declare namespace DeleteAllSoundGenerationJobsCommand {
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
const ResponseSchema: z.ZodObject<{
|
|
11
|
+
isSuccess: z.ZodBoolean;
|
|
12
|
+
data: z.ZodOptional<z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>>;
|
|
13
|
+
code: z.ZodOptional<z.ZodString>;
|
|
14
|
+
message: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllSoundGenerationJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
var DeleteAllSoundGenerationJobsCommand;
|
|
7
|
+
(function (DeleteAllSoundGenerationJobsCommand) {
|
|
8
|
+
DeleteAllSoundGenerationJobsCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
|
|
12
|
+
});
|
|
13
|
+
DeleteAllSoundGenerationJobsCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteAllSoundGenerationJobsCommand || (exports.DeleteAllSoundGenerationJobsCommand = DeleteAllSoundGenerationJobsCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace DeleteSoundGenerationJobByUuidCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
const ResponseSchema: z.ZodObject<{
|
|
10
|
+
isSuccess: z.ZodBoolean;
|
|
11
|
+
data: z.ZodOptional<z.ZodType<boolean, unknown, z.core.$ZodTypeInternals<boolean, unknown>>>;
|
|
12
|
+
code: z.ZodOptional<z.ZodString>;
|
|
13
|
+
message: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteSoundGenerationJobByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteSoundGenerationJobByUuidCommand;
|
|
7
|
+
(function (DeleteSoundGenerationJobByUuidCommand) {
|
|
8
|
+
DeleteSoundGenerationJobByUuidCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
});
|
|
13
|
+
DeleteSoundGenerationJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteSoundGenerationJobByUuidCommand || (exports.DeleteSoundGenerationJobByUuidCommand = DeleteSoundGenerationJobByUuidCommand = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetSoundGenerationPriceCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
modelId: z.ZodString;
|
|
5
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
variations: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
const ResponseDataSchema: z.ZodObject<{
|
|
10
|
+
price: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
type ResponseData = z.infer<typeof ResponseDataSchema>;
|
|
13
|
+
const ResponseSchema: z.ZodObject<{
|
|
14
|
+
isSuccess: z.ZodBoolean;
|
|
15
|
+
data: z.ZodOptional<z.ZodType<{
|
|
16
|
+
price: number;
|
|
17
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
18
|
+
price: number;
|
|
19
|
+
}, unknown>>>;
|
|
20
|
+
code: z.ZodOptional<z.ZodString>;
|
|
21
|
+
message: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSoundGenerationPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetSoundGenerationPriceCommand;
|
|
7
|
+
(function (GetSoundGenerationPriceCommand) {
|
|
8
|
+
GetSoundGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string().uuid(),
|
|
10
|
+
durationInSeconds: zod_1.z.number().min(0.5).max(30).multipleOf(0.5).optional(),
|
|
11
|
+
variations: zod_1.z.number().int().min(1).max(4).default(1),
|
|
12
|
+
});
|
|
13
|
+
GetSoundGenerationPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
14
|
+
price: zod_1.z.number(),
|
|
15
|
+
});
|
|
16
|
+
GetSoundGenerationPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetSoundGenerationPriceCommand.ResponseDataSchema);
|
|
17
|
+
})(GetSoundGenerationPriceCommand || (exports.GetSoundGenerationPriceCommand = GetSoundGenerationPriceCommand = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './delete-all-sound-generation-jobs.command';
|
|
2
|
+
export * from './delete-sound-generation-job-by-uuid.command';
|
|
3
|
+
export * from './get-sound-generation-price.command';
|
|
4
|
+
export * from './retry-sound-generation-job.command';
|
|
5
|
+
export * from './set-reaction-to-sound-generation-job.command';
|
|
6
|
+
export * from './sound-generation.command';
|
|
7
|
+
export * from './update-sound-generation-job-favorite.command';
|
|
8
|
+
export * from './update-sound-generation-job-title.command';
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./delete-all-sound-generation-jobs.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-sound-generation-job-by-uuid.command"), exports);
|
|
19
|
+
__exportStar(require("./get-sound-generation-price.command"), exports);
|
|
20
|
+
__exportStar(require("./retry-sound-generation-job.command"), exports);
|
|
21
|
+
__exportStar(require("./set-reaction-to-sound-generation-job.command"), exports);
|
|
22
|
+
__exportStar(require("./sound-generation.command"), exports);
|
|
23
|
+
__exportStar(require("./update-sound-generation-job-favorite.command"), exports);
|
|
24
|
+
__exportStar(require("./update-sound-generation-job-title.command"), exports);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace RetrySoundGenerationJobCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
tokenReservationId: z.ZodString;
|
|
8
|
+
precalculatedPrice: z.ZodNumber;
|
|
9
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
10
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
params: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
variations: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
loop: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
promptInfluence: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
19
|
+
const ResponseSchema: z.ZodObject<{
|
|
20
|
+
isSuccess: z.ZodBoolean;
|
|
21
|
+
data: z.ZodOptional<z.ZodType<{
|
|
22
|
+
uuid: string;
|
|
23
|
+
prompt: string;
|
|
24
|
+
title: string;
|
|
25
|
+
status: import("../..").JOB_STATUS;
|
|
26
|
+
error: string | null;
|
|
27
|
+
internalError?: string | null | undefined;
|
|
28
|
+
modelId: string;
|
|
29
|
+
price: number;
|
|
30
|
+
params: {
|
|
31
|
+
durationInSeconds?: number | undefined;
|
|
32
|
+
variations: number;
|
|
33
|
+
loop: boolean;
|
|
34
|
+
promptInfluence: number;
|
|
35
|
+
};
|
|
36
|
+
results: {
|
|
37
|
+
uuid: string;
|
|
38
|
+
audioUrl: string;
|
|
39
|
+
duration: number;
|
|
40
|
+
}[];
|
|
41
|
+
attempts: unknown[];
|
|
42
|
+
reaction: import("../..").USER_REACTION | null;
|
|
43
|
+
dislikeReason: string | null;
|
|
44
|
+
scope: import("../..").JOB_SCOPE;
|
|
45
|
+
locale: string;
|
|
46
|
+
processingAttemptId?: string | null | undefined;
|
|
47
|
+
userId?: string | null | undefined;
|
|
48
|
+
unregisteredUserId?: string | null | undefined;
|
|
49
|
+
tokenReservationId?: string | null | undefined;
|
|
50
|
+
isDeleted: boolean;
|
|
51
|
+
isFavorite: boolean;
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
completedAt?: Date | null | undefined;
|
|
54
|
+
updatedAt: Date;
|
|
55
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
56
|
+
uuid: string;
|
|
57
|
+
prompt: string;
|
|
58
|
+
title: string;
|
|
59
|
+
status: import("../..").JOB_STATUS;
|
|
60
|
+
error: string | null;
|
|
61
|
+
internalError?: string | null | undefined;
|
|
62
|
+
modelId: string;
|
|
63
|
+
price: number;
|
|
64
|
+
params: {
|
|
65
|
+
durationInSeconds?: number | undefined;
|
|
66
|
+
variations: number;
|
|
67
|
+
loop: boolean;
|
|
68
|
+
promptInfluence: number;
|
|
69
|
+
};
|
|
70
|
+
results: {
|
|
71
|
+
uuid: string;
|
|
72
|
+
audioUrl: string;
|
|
73
|
+
duration: number;
|
|
74
|
+
}[];
|
|
75
|
+
attempts: unknown[];
|
|
76
|
+
reaction: import("../..").USER_REACTION | null;
|
|
77
|
+
dislikeReason: string | null;
|
|
78
|
+
scope: import("../..").JOB_SCOPE;
|
|
79
|
+
locale: string;
|
|
80
|
+
processingAttemptId?: string | null | undefined;
|
|
81
|
+
userId?: string | null | undefined;
|
|
82
|
+
unregisteredUserId?: string | null | undefined;
|
|
83
|
+
tokenReservationId?: string | null | undefined;
|
|
84
|
+
isDeleted: boolean;
|
|
85
|
+
isFavorite: boolean;
|
|
86
|
+
createdAt: Date;
|
|
87
|
+
completedAt?: Date | null | undefined;
|
|
88
|
+
updatedAt: Date;
|
|
89
|
+
}, unknown>>>;
|
|
90
|
+
code: z.ZodOptional<z.ZodString>;
|
|
91
|
+
message: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
94
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrySoundGenerationJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var RetrySoundGenerationJobCommand;
|
|
8
|
+
(function (RetrySoundGenerationJobCommand) {
|
|
9
|
+
RetrySoundGenerationJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
|
+
precalculatedPrice: zod_1.z.number().positive(),
|
|
15
|
+
prompt: zod_1.z.string().optional(),
|
|
16
|
+
modelId: zod_1.z.string().uuid().optional(),
|
|
17
|
+
params: models_1.SoundGenerationParamsSchema.optional(),
|
|
18
|
+
});
|
|
19
|
+
RetrySoundGenerationJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SoundGenerationJobSchema);
|
|
20
|
+
})(RetrySoundGenerationJobCommand || (exports.RetrySoundGenerationJobCommand = RetrySoundGenerationJobCommand = {}));
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { USER_REACTION } from '../../common';
|
|
3
|
+
export declare namespace SetReactionToSoundGenerationJobCommand {
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
reaction: z.ZodNullable<z.ZodEnum<typeof USER_REACTION>>;
|
|
9
|
+
dislikeReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
const ResponseSchema: z.ZodObject<{
|
|
13
|
+
isSuccess: z.ZodBoolean;
|
|
14
|
+
data: z.ZodOptional<z.ZodType<{
|
|
15
|
+
uuid: string;
|
|
16
|
+
prompt: string;
|
|
17
|
+
title: string;
|
|
18
|
+
status: import("../..").JOB_STATUS;
|
|
19
|
+
error: string | null;
|
|
20
|
+
internalError?: string | null | undefined;
|
|
21
|
+
modelId: string;
|
|
22
|
+
price: number;
|
|
23
|
+
params: {
|
|
24
|
+
durationInSeconds?: number | undefined;
|
|
25
|
+
variations: number;
|
|
26
|
+
loop: boolean;
|
|
27
|
+
promptInfluence: number;
|
|
28
|
+
};
|
|
29
|
+
results: {
|
|
30
|
+
uuid: string;
|
|
31
|
+
audioUrl: string;
|
|
32
|
+
duration: number;
|
|
33
|
+
}[];
|
|
34
|
+
attempts: unknown[];
|
|
35
|
+
reaction: USER_REACTION | null;
|
|
36
|
+
dislikeReason: string | null;
|
|
37
|
+
scope: import("../..").JOB_SCOPE;
|
|
38
|
+
locale: string;
|
|
39
|
+
processingAttemptId?: string | null | undefined;
|
|
40
|
+
userId?: string | null | undefined;
|
|
41
|
+
unregisteredUserId?: string | null | undefined;
|
|
42
|
+
tokenReservationId?: string | null | undefined;
|
|
43
|
+
isDeleted: boolean;
|
|
44
|
+
isFavorite: boolean;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
completedAt?: Date | null | undefined;
|
|
47
|
+
updatedAt: Date;
|
|
48
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
49
|
+
uuid: string;
|
|
50
|
+
prompt: string;
|
|
51
|
+
title: string;
|
|
52
|
+
status: import("../..").JOB_STATUS;
|
|
53
|
+
error: string | null;
|
|
54
|
+
internalError?: string | null | undefined;
|
|
55
|
+
modelId: string;
|
|
56
|
+
price: number;
|
|
57
|
+
params: {
|
|
58
|
+
durationInSeconds?: number | undefined;
|
|
59
|
+
variations: number;
|
|
60
|
+
loop: boolean;
|
|
61
|
+
promptInfluence: number;
|
|
62
|
+
};
|
|
63
|
+
results: {
|
|
64
|
+
uuid: string;
|
|
65
|
+
audioUrl: string;
|
|
66
|
+
duration: number;
|
|
67
|
+
}[];
|
|
68
|
+
attempts: unknown[];
|
|
69
|
+
reaction: USER_REACTION | null;
|
|
70
|
+
dislikeReason: string | null;
|
|
71
|
+
scope: import("../..").JOB_SCOPE;
|
|
72
|
+
locale: string;
|
|
73
|
+
processingAttemptId?: string | null | undefined;
|
|
74
|
+
userId?: string | null | undefined;
|
|
75
|
+
unregisteredUserId?: string | null | undefined;
|
|
76
|
+
tokenReservationId?: string | null | undefined;
|
|
77
|
+
isDeleted: boolean;
|
|
78
|
+
isFavorite: boolean;
|
|
79
|
+
createdAt: Date;
|
|
80
|
+
completedAt?: Date | null | undefined;
|
|
81
|
+
updatedAt: Date;
|
|
82
|
+
}, unknown>>>;
|
|
83
|
+
code: z.ZodOptional<z.ZodString>;
|
|
84
|
+
message: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
87
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToSoundGenerationJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
7
|
+
const models_1 = require("../models");
|
|
8
|
+
var SetReactionToSoundGenerationJobCommand;
|
|
9
|
+
(function (SetReactionToSoundGenerationJobCommand) {
|
|
10
|
+
SetReactionToSoundGenerationJobCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
16
|
+
dislikeReason: zod_1.z.string().nullable().default(null),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}, {
|
|
24
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
25
|
+
});
|
|
26
|
+
SetReactionToSoundGenerationJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SoundGenerationJobSchema);
|
|
27
|
+
})(SetReactionToSoundGenerationJobCommand || (exports.SetReactionToSoundGenerationJobCommand = SetReactionToSoundGenerationJobCommand = {}));
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JOB_SCOPE } from '../../common';
|
|
3
|
+
export declare namespace SoundGenerationCommand {
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
locale: z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>;
|
|
6
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
|
|
9
|
+
prompt: z.ZodString;
|
|
10
|
+
modelId: z.ZodString;
|
|
11
|
+
params: z.ZodObject<{
|
|
12
|
+
durationInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
variations: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
loop: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
promptInfluence: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
tokenReservationId: z.ZodString;
|
|
18
|
+
precalculatedPrice: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
21
|
+
const ResponseSchema: z.ZodObject<{
|
|
22
|
+
isSuccess: z.ZodBoolean;
|
|
23
|
+
data: z.ZodOptional<z.ZodType<{
|
|
24
|
+
uuid: string;
|
|
25
|
+
prompt: string;
|
|
26
|
+
title: string;
|
|
27
|
+
status: import("../..").JOB_STATUS;
|
|
28
|
+
error: string | null;
|
|
29
|
+
internalError?: string | null | undefined;
|
|
30
|
+
modelId: string;
|
|
31
|
+
price: number;
|
|
32
|
+
params: {
|
|
33
|
+
durationInSeconds?: number | undefined;
|
|
34
|
+
variations: number;
|
|
35
|
+
loop: boolean;
|
|
36
|
+
promptInfluence: number;
|
|
37
|
+
};
|
|
38
|
+
results: {
|
|
39
|
+
uuid: string;
|
|
40
|
+
audioUrl: string;
|
|
41
|
+
duration: number;
|
|
42
|
+
}[];
|
|
43
|
+
attempts: unknown[];
|
|
44
|
+
reaction: import("../..").USER_REACTION | null;
|
|
45
|
+
dislikeReason: string | null;
|
|
46
|
+
scope: JOB_SCOPE;
|
|
47
|
+
locale: string;
|
|
48
|
+
processingAttemptId?: string | null | undefined;
|
|
49
|
+
userId?: string | null | undefined;
|
|
50
|
+
unregisteredUserId?: string | null | undefined;
|
|
51
|
+
tokenReservationId?: string | null | undefined;
|
|
52
|
+
isDeleted: boolean;
|
|
53
|
+
isFavorite: boolean;
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
completedAt?: Date | null | undefined;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
58
|
+
uuid: string;
|
|
59
|
+
prompt: string;
|
|
60
|
+
title: string;
|
|
61
|
+
status: import("../..").JOB_STATUS;
|
|
62
|
+
error: string | null;
|
|
63
|
+
internalError?: string | null | undefined;
|
|
64
|
+
modelId: string;
|
|
65
|
+
price: number;
|
|
66
|
+
params: {
|
|
67
|
+
durationInSeconds?: number | undefined;
|
|
68
|
+
variations: number;
|
|
69
|
+
loop: boolean;
|
|
70
|
+
promptInfluence: number;
|
|
71
|
+
};
|
|
72
|
+
results: {
|
|
73
|
+
uuid: string;
|
|
74
|
+
audioUrl: string;
|
|
75
|
+
duration: number;
|
|
76
|
+
}[];
|
|
77
|
+
attempts: unknown[];
|
|
78
|
+
reaction: import("../..").USER_REACTION | null;
|
|
79
|
+
dislikeReason: string | null;
|
|
80
|
+
scope: JOB_SCOPE;
|
|
81
|
+
locale: string;
|
|
82
|
+
processingAttemptId?: string | null | undefined;
|
|
83
|
+
userId?: string | null | undefined;
|
|
84
|
+
unregisteredUserId?: string | null | undefined;
|
|
85
|
+
tokenReservationId?: string | null | undefined;
|
|
86
|
+
isDeleted: boolean;
|
|
87
|
+
isFavorite: boolean;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
completedAt?: Date | null | undefined;
|
|
90
|
+
updatedAt: Date;
|
|
91
|
+
}, unknown>>>;
|
|
92
|
+
code: z.ZodOptional<z.ZodString>;
|
|
93
|
+
message: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SoundGenerationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
const sound_generation_params_schema_1 = require("../models/sound-generation-params.schema");
|
|
8
|
+
var SoundGenerationCommand;
|
|
9
|
+
(function (SoundGenerationCommand) {
|
|
10
|
+
SoundGenerationCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
locale: common_1.LocaleSchema,
|
|
13
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
15
|
+
scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
|
|
16
|
+
prompt: zod_1.z.string().min(1),
|
|
17
|
+
modelId: zod_1.z.string().uuid(),
|
|
18
|
+
params: sound_generation_params_schema_1.SoundGenerationParamsSchema,
|
|
19
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
20
|
+
precalculatedPrice: zod_1.z.number().positive(),
|
|
21
|
+
})
|
|
22
|
+
.refine((data) => Boolean(data.userId) !== Boolean(data.unregisteredUserId), {
|
|
23
|
+
message: 'Exactly one of userId or unregisteredUserId is required',
|
|
24
|
+
path: ['userId', 'unregisteredUserId'],
|
|
25
|
+
});
|
|
26
|
+
SoundGenerationCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.SoundGenerationJobSchema);
|
|
27
|
+
})(SoundGenerationCommand || (exports.SoundGenerationCommand = SoundGenerationCommand = {}));
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace UpdateSoundGenerationJobFavoriteCommand {
|
|
3
|
+
const RequestSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
isFavorite: z.ZodBoolean;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
const ResponseSchema: z.ZodObject<{
|
|
11
|
+
isSuccess: z.ZodBoolean;
|
|
12
|
+
data: z.ZodOptional<z.ZodType<{
|
|
13
|
+
uuid: string;
|
|
14
|
+
prompt: string;
|
|
15
|
+
title: string;
|
|
16
|
+
status: import("../..").JOB_STATUS;
|
|
17
|
+
error: string | null;
|
|
18
|
+
internalError?: string | null | undefined;
|
|
19
|
+
modelId: string;
|
|
20
|
+
price: number;
|
|
21
|
+
params: {
|
|
22
|
+
durationInSeconds?: number | undefined;
|
|
23
|
+
variations: number;
|
|
24
|
+
loop: boolean;
|
|
25
|
+
promptInfluence: number;
|
|
26
|
+
};
|
|
27
|
+
results: {
|
|
28
|
+
uuid: string;
|
|
29
|
+
audioUrl: string;
|
|
30
|
+
duration: number;
|
|
31
|
+
}[];
|
|
32
|
+
attempts: unknown[];
|
|
33
|
+
reaction: import("../..").USER_REACTION | null;
|
|
34
|
+
dislikeReason: string | null;
|
|
35
|
+
scope: import("../..").JOB_SCOPE;
|
|
36
|
+
locale: string;
|
|
37
|
+
processingAttemptId?: string | null | undefined;
|
|
38
|
+
userId?: string | null | undefined;
|
|
39
|
+
unregisteredUserId?: string | null | undefined;
|
|
40
|
+
tokenReservationId?: string | null | undefined;
|
|
41
|
+
isDeleted: boolean;
|
|
42
|
+
isFavorite: boolean;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
completedAt?: Date | null | undefined;
|
|
45
|
+
updatedAt: Date;
|
|
46
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
47
|
+
uuid: string;
|
|
48
|
+
prompt: string;
|
|
49
|
+
title: string;
|
|
50
|
+
status: import("../..").JOB_STATUS;
|
|
51
|
+
error: string | null;
|
|
52
|
+
internalError?: string | null | undefined;
|
|
53
|
+
modelId: string;
|
|
54
|
+
price: number;
|
|
55
|
+
params: {
|
|
56
|
+
durationInSeconds?: number | undefined;
|
|
57
|
+
variations: number;
|
|
58
|
+
loop: boolean;
|
|
59
|
+
promptInfluence: number;
|
|
60
|
+
};
|
|
61
|
+
results: {
|
|
62
|
+
uuid: string;
|
|
63
|
+
audioUrl: string;
|
|
64
|
+
duration: number;
|
|
65
|
+
}[];
|
|
66
|
+
attempts: unknown[];
|
|
67
|
+
reaction: import("../..").USER_REACTION | null;
|
|
68
|
+
dislikeReason: string | null;
|
|
69
|
+
scope: import("../..").JOB_SCOPE;
|
|
70
|
+
locale: string;
|
|
71
|
+
processingAttemptId?: string | null | undefined;
|
|
72
|
+
userId?: string | null | undefined;
|
|
73
|
+
unregisteredUserId?: string | null | undefined;
|
|
74
|
+
tokenReservationId?: string | null | undefined;
|
|
75
|
+
isDeleted: boolean;
|
|
76
|
+
isFavorite: boolean;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
completedAt?: Date | null | undefined;
|
|
79
|
+
updatedAt: Date;
|
|
80
|
+
}, unknown>>>;
|
|
81
|
+
code: z.ZodOptional<z.ZodString>;
|
|
82
|
+
message: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSoundGenerationJobFavoriteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var UpdateSoundGenerationJobFavoriteCommand;
|
|
8
|
+
(function (UpdateSoundGenerationJobFavoriteCommand) {
|
|
9
|
+
UpdateSoundGenerationJobFavoriteCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
isFavorite: zod_1.z.boolean(),
|
|
14
|
+
});
|
|
15
|
+
UpdateSoundGenerationJobFavoriteCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SoundGenerationJobSchema);
|
|
16
|
+
})(UpdateSoundGenerationJobFavoriteCommand || (exports.UpdateSoundGenerationJobFavoriteCommand = UpdateSoundGenerationJobFavoriteCommand = {}));
|