@purpleschool/gptbot 0.13.21 → 0.14.1-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/agents/agent-dialog.ts +0 -11
- package/api/controllers/http/agents/agent-lead-form.ts +0 -2
- package/api/controllers/http/agents/agent-lead.ts +0 -1
- package/api/controllers/http/agents/agent-template.ts +0 -4
- package/api/controllers/http/agents/agent-tool.ts +1 -2
- package/api/controllers/http/agents/agent.ts +3 -0
- package/api/controllers/http/agents/index.ts +0 -1
- package/api/controllers/http/b2b-compatible.ts +14 -0
- package/api/controllers/http/b2b-usage-log.ts +5 -0
- package/api/controllers/http/index.ts +2 -2
- package/api/routes.ts +19 -38
- package/build/api/controllers/http/agents/agent-dialog.js +0 -7
- package/build/api/controllers/http/agents/agent-lead-form.js +0 -2
- package/build/api/controllers/http/agents/agent-lead.js +0 -1
- package/build/api/controllers/http/agents/agent-template.js +0 -4
- package/build/api/controllers/http/agents/agent-tool.js +1 -2
- package/build/api/controllers/http/agents/agent.js +2 -0
- package/build/api/controllers/http/agents/index.js +0 -1
- package/build/api/controllers/http/b2b-compatible.js +15 -0
- package/build/api/controllers/http/b2b-usage-log.js +7 -0
- package/build/api/controllers/http/index.js +2 -2
- package/build/api/routes.js +16 -22
- package/build/commands/agents/agent-dialog/find-agent-dialogs.command.js +0 -1
- package/build/commands/agents/agent-dialog/index.js +0 -5
- package/build/commands/agents/agent-dialog/send-cabinet-message.command.js +4 -4
- package/build/commands/agents/agent-lead/find-agent-leads.command.js +4 -2
- package/build/commands/agents/agent-template/index.js +0 -1
- package/build/commands/agents/agent-tool/find-agent-tools-catalog.command.js +0 -2
- package/build/commands/agents/agent-tool/find-agent-tools.command.js +0 -2
- package/build/commands/agents/agents/index.js +0 -1
- package/build/commands/ai-studio/canvas-tool/index.js +0 -1
- package/build/commands/b2b/send-text-request.command.js +8 -1
- package/build/commands/b2b-compatible/anthropic-files.command.js +21 -0
- package/build/commands/b2b-compatible/anthropic-messages.command.js +217 -0
- package/build/commands/b2b-compatible/anthropic-models.command.js +26 -0
- package/build/commands/b2b-compatible/common.schemas.js +46 -0
- package/build/commands/{ai-studio/canvas-tool/var-gen → b2b-compatible}/index.js +7 -3
- package/build/commands/b2b-compatible/openai-files.command.js +26 -0
- package/build/commands/b2b-compatible/openai-models.command.js +24 -0
- package/build/commands/b2b-compatible/openai-responses.command.js +171 -0
- package/build/commands/b2b-usage-log/get-b2b-usage-statistics.command.js +111 -0
- package/build/{constants/photo-studio/enums → commands/b2b-usage-log}/index.js +1 -1
- package/build/commands/index.js +2 -1
- package/build/constants/b2b/enums/b2b-debit-status.enum.js +9 -0
- package/build/constants/b2b/enums/b2b-endpoint-family.enum.js +9 -0
- package/build/constants/b2b/enums/b2b-statistics-granularity.enum.js +8 -0
- package/build/constants/b2b/enums/b2b-statistics-period.enum.js +13 -0
- package/build/constants/b2b/enums/b2b-usage-operation.enum.js +8 -0
- package/build/constants/b2b/enums/b2b-usage-spend-component.enum.js +12 -0
- package/build/constants/b2b/enums/b2b-usage-status.enum.js +8 -0
- package/build/{models/photo-studio → constants/b2b/enums}/index.js +7 -4
- package/build/constants/index.js +1 -1
- package/build/models/agents/index.js +0 -2
- package/build/models/b2b/b2b-usage-statistics.schema.js +69 -0
- package/build/models/b2b/index.js +1 -0
- package/build/models/canvas-node.schema.js +2 -2
- package/build/models/file.schema.js +1 -7
- package/build/models/index.js +0 -1
- package/build/models/tools/image-generation/image-generation-job.schema.js +0 -3
- package/commands/agents/agent-dialog/find-agent-dialogs.command.ts +0 -1
- package/commands/agents/agent-dialog/index.ts +0 -5
- package/commands/agents/agent-dialog/send-cabinet-message.command.ts +10 -18
- package/commands/agents/agent-lead/find-agent-leads.command.ts +4 -2
- package/commands/agents/agent-template/index.ts +0 -1
- package/commands/agents/agent-tool/find-agent-tools-catalog.command.ts +0 -2
- package/commands/agents/agent-tool/find-agent-tools.command.ts +0 -2
- package/commands/agents/agents/index.ts +0 -1
- package/commands/ai-studio/canvas-tool/index.ts +0 -1
- package/commands/b2b/send-text-request.command.ts +10 -1
- package/commands/b2b-compatible/anthropic-files.command.ts +29 -0
- package/commands/b2b-compatible/anthropic-messages.command.ts +244 -0
- package/commands/b2b-compatible/anthropic-models.command.ts +31 -0
- package/commands/b2b-compatible/common.schemas.ts +55 -0
- package/commands/b2b-compatible/index.ts +7 -0
- package/commands/b2b-compatible/openai-files.command.ts +37 -0
- package/commands/b2b-compatible/openai-models.command.ts +29 -0
- package/commands/b2b-compatible/openai-responses.command.ts +191 -0
- package/commands/b2b-usage-log/get-b2b-usage-statistics.command.ts +128 -0
- package/commands/b2b-usage-log/index.ts +1 -0
- package/commands/index.ts +2 -1
- package/constants/b2b/enums/b2b-debit-status.enum.ts +5 -0
- package/constants/b2b/enums/b2b-endpoint-family.enum.ts +5 -0
- package/constants/b2b/enums/b2b-statistics-granularity.enum.ts +4 -0
- package/constants/b2b/enums/b2b-statistics-period.enum.ts +9 -0
- package/constants/b2b/enums/b2b-usage-operation.enum.ts +4 -0
- package/constants/b2b/enums/b2b-usage-spend-component.enum.ts +8 -0
- package/constants/b2b/enums/b2b-usage-status.enum.ts +4 -0
- package/constants/b2b/enums/index.ts +7 -0
- package/constants/index.ts +1 -1
- package/models/agents/index.ts +0 -2
- package/models/b2b/b2b-usage-statistics.schema.ts +81 -0
- package/models/b2b/index.ts +1 -0
- package/models/canvas-node.schema.ts +2 -2
- package/models/file.schema.ts +0 -8
- package/models/index.ts +0 -1
- package/models/tools/image-generation/image-generation-job.schema.ts +0 -3
- package/package.json +1 -1
- package/api/controllers/http/agents/agent-statistics.ts +0 -5
- package/api/controllers/http/canvas-var-generation.ts +0 -7
- package/api/controllers/http/photo-studio.ts +0 -21
- package/build/api/controllers/http/agents/agent-statistics.js +0 -7
- package/build/api/controllers/http/canvas-var-generation.js +0 -9
- package/build/api/controllers/http/photo-studio.js +0 -21
- package/build/commands/agents/agent-dialog/get-cabinet-config.command.js +0 -12
- package/build/commands/agents/agent-dialog/get-cabinet-price-preview.command.js +0 -28
- package/build/commands/agents/agent-dialog/get-dialog-context-length.command.js +0 -30
- package/build/commands/agents/agent-dialog/rename-agent-dialog.command.js +0 -17
- package/build/commands/agents/agent-dialog/stop-cabinet-stream.command.js +0 -15
- package/build/commands/agents/agent-template/get-agent-template-instructions-by-template.command.js +0 -14
- package/build/commands/agents/agents/get-agent-statistics.command.js +0 -20
- package/build/commands/ai-studio/canvas-tool/var-gen/generate-variables.command.js +0 -18
- package/build/commands/ai-studio/canvas-tool/var-gen/get-var-gen-config.command.js +0 -11
- package/build/commands/ai-studio/canvas-tool/var-gen/get-var-gen-price.command.js +0 -18
- package/build/commands/photo-studio/add-photo-studio-checkpoint.command.js +0 -17
- package/build/commands/photo-studio/clear-photo-studio-checkpoints.command.js +0 -12
- package/build/commands/photo-studio/create-photo-studio-canvas.command.js +0 -15
- package/build/commands/photo-studio/delete-photo-studio-canvas.command.js +0 -11
- package/build/commands/photo-studio/delete-photo-studio-checkpoint.command.js +0 -14
- package/build/commands/photo-studio/execute-photo-studio-action.command.js +0 -47
- package/build/commands/photo-studio/find-photo-studio-canvas-by-uuid.query.js +0 -12
- package/build/commands/photo-studio/find-photo-studio-canvases.query.js +0 -18
- package/build/commands/photo-studio/find-photo-studio-checkpoints.query.js +0 -12
- package/build/commands/photo-studio/find-photo-studio-job-by-id.query.js +0 -32
- package/build/commands/photo-studio/find-photo-studio-jobs.query.js +0 -18
- package/build/commands/photo-studio/get-photo-studio-actions.query.js +0 -11
- package/build/commands/photo-studio/index.js +0 -31
- package/build/commands/photo-studio/save-photo-studio-canvas.command.js +0 -18
- package/build/commands/photo-studio/update-photo-studio-canvas.command.js +0 -15
- package/build/commands/photo-studio/update-photo-studio-checkpoint.command.js +0 -19
- package/build/constants/photo-studio/enums/photo-studio-checkpoint-action-type.enum.js +0 -11
- package/build/models/agents/agent-statistics.schema.js +0 -33
- package/build/models/agents/message-attachment.schema.js +0 -21
- package/build/models/photo-studio/photo-studio-action.schema.js +0 -17
- package/build/models/photo-studio/photo-studio-checkpoint.schema.js +0 -21
- package/build/models/photo-studio/photo-studio-image-node.schema.js +0 -19
- package/build/models/photo-studio/photo-studio.schema.js +0 -15
- package/commands/agents/agent-dialog/get-cabinet-config.command.ts +0 -11
- package/commands/agents/agent-dialog/get-cabinet-price-preview.command.ts +0 -30
- package/commands/agents/agent-dialog/get-dialog-context-length.command.ts +0 -33
- package/commands/agents/agent-dialog/rename-agent-dialog.command.ts +0 -19
- package/commands/agents/agent-dialog/stop-cabinet-stream.command.ts +0 -15
- package/commands/agents/agent-template/get-agent-template-instructions-by-template.command.ts +0 -14
- package/commands/agents/agents/get-agent-statistics.command.ts +0 -28
- package/commands/ai-studio/canvas-tool/var-gen/generate-variables.command.ts +0 -20
- package/commands/ai-studio/canvas-tool/var-gen/get-var-gen-config.command.ts +0 -9
- package/commands/ai-studio/canvas-tool/var-gen/get-var-gen-price.command.ts +0 -18
- package/commands/ai-studio/canvas-tool/var-gen/index.ts +0 -3
- package/commands/photo-studio/add-photo-studio-checkpoint.command.ts +0 -23
- package/commands/photo-studio/clear-photo-studio-checkpoints.command.ts +0 -12
- package/commands/photo-studio/create-photo-studio-canvas.command.ts +0 -16
- package/commands/photo-studio/delete-photo-studio-canvas.command.ts +0 -11
- package/commands/photo-studio/delete-photo-studio-checkpoint.command.ts +0 -14
- package/commands/photo-studio/execute-photo-studio-action.command.ts +0 -49
- package/commands/photo-studio/find-photo-studio-canvas-by-uuid.query.ts +0 -12
- package/commands/photo-studio/find-photo-studio-canvases.query.ts +0 -20
- package/commands/photo-studio/find-photo-studio-checkpoints.query.ts +0 -12
- package/commands/photo-studio/find-photo-studio-job-by-id.query.ts +0 -36
- package/commands/photo-studio/find-photo-studio-jobs.query.ts +0 -20
- package/commands/photo-studio/get-photo-studio-actions.query.ts +0 -10
- package/commands/photo-studio/index.ts +0 -15
- package/commands/photo-studio/save-photo-studio-canvas.command.ts +0 -24
- package/commands/photo-studio/update-photo-studio-canvas.command.ts +0 -17
- package/commands/photo-studio/update-photo-studio-checkpoint.command.ts +0 -25
- package/constants/photo-studio/enums/index.ts +0 -1
- package/constants/photo-studio/enums/photo-studio-checkpoint-action-type.enum.ts +0 -7
- package/models/agents/agent-statistics.schema.ts +0 -38
- package/models/agents/message-attachment.schema.ts +0 -22
- package/models/photo-studio/index.ts +0 -4
- package/models/photo-studio/photo-studio-action.schema.ts +0 -18
- package/models/photo-studio/photo-studio-checkpoint.schema.ts +0 -22
- package/models/photo-studio/photo-studio-image-node.schema.ts +0 -22
- package/models/photo-studio/photo-studio.schema.ts +0 -16
- /package/build/constants/{photo-studio → b2b}/index.js +0 -0
- /package/constants/{photo-studio → b2b}/index.ts +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AgentStatisticsDataSchema } from '../../../models/agents/agent-statistics.schema';
|
|
3
|
-
|
|
4
|
-
export namespace GetAgentStatisticsCommand {
|
|
5
|
-
export const RequestQuerySchema = z.object({
|
|
6
|
-
from: z.string().datetime().optional(),
|
|
7
|
-
to: z.string().datetime().optional(),
|
|
8
|
-
granularity: z.enum(['day', 'week', 'month']).optional().default('day'),
|
|
9
|
-
source: z.string().optional(),
|
|
10
|
-
});
|
|
11
|
-
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
12
|
-
|
|
13
|
-
export const RequestParamsSchema = z.object({
|
|
14
|
-
agentId: z.string().uuid(),
|
|
15
|
-
});
|
|
16
|
-
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
17
|
-
|
|
18
|
-
export const ResponseSchema = z.object({
|
|
19
|
-
data: AgentStatisticsDataSchema,
|
|
20
|
-
});
|
|
21
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
-
|
|
23
|
-
// Internal RMQ envelope — not part of the HTTP contract
|
|
24
|
-
export type RmqResponse = {
|
|
25
|
-
isSuccess: true;
|
|
26
|
-
data: z.infer<typeof AgentStatisticsDataSchema>;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { VarGenOutputSchema } from '../../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GenerateVariablesCommand {
|
|
5
|
-
export const OutputSchema = VarGenOutputSchema;
|
|
6
|
-
export type Output = z.infer<typeof OutputSchema>;
|
|
7
|
-
|
|
8
|
-
export const RequestSchema = z.object({
|
|
9
|
-
nodeUuid: z.string().uuid(),
|
|
10
|
-
canvasId: z.string().uuid(),
|
|
11
|
-
modelId: z.string().uuid(),
|
|
12
|
-
prompt: z.string().min(1),
|
|
13
|
-
});
|
|
14
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
-
|
|
16
|
-
export const ResponseSchema = z.object({
|
|
17
|
-
data: OutputSchema,
|
|
18
|
-
});
|
|
19
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AiModelSchema } from '../../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GetVarGenConfigCommand {
|
|
5
|
-
export const ResponseSchema = z.object({
|
|
6
|
-
data: z.array(AiModelSchema),
|
|
7
|
-
});
|
|
8
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export namespace GetVarGenPriceCommand {
|
|
4
|
-
export const RequestSchema = z.object({
|
|
5
|
-
modelId: z.string().uuid(),
|
|
6
|
-
promptLength: z.coerce.number().int().positive(),
|
|
7
|
-
});
|
|
8
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
-
|
|
10
|
-
export const ResponseSchema = z.object({
|
|
11
|
-
data: z.object({
|
|
12
|
-
price: z.number(),
|
|
13
|
-
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable().optional(),
|
|
14
|
-
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable().optional(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PhotoStudioCheckpointActionSchema,
|
|
4
|
-
PhotoStudioCheckpointSchema,
|
|
5
|
-
PhotoStudioImageInputSchema,
|
|
6
|
-
} from '../../models';
|
|
7
|
-
|
|
8
|
-
export namespace AddPhotoStudioCheckpointCommand {
|
|
9
|
-
export const RequestParamSchema = z.object({ canvasId: z.string().uuid() });
|
|
10
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
11
|
-
|
|
12
|
-
export const RequestSchema = z.object({
|
|
13
|
-
action: PhotoStudioCheckpointActionSchema,
|
|
14
|
-
images: z.array(PhotoStudioImageInputSchema).optional(),
|
|
15
|
-
baseCheckpointSequence: z.number().int().positive().optional(),
|
|
16
|
-
});
|
|
17
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
-
|
|
19
|
-
export const ResponseSchema = z.object({
|
|
20
|
-
data: PhotoStudioCheckpointSchema,
|
|
21
|
-
});
|
|
22
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCheckpointSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace ClearPhotoStudioCheckpointsCommand {
|
|
5
|
-
export const RequestParamSchema = z.object({ canvasId: z.string().uuid() });
|
|
6
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
7
|
-
|
|
8
|
-
export const ResponseSchema = z.object({
|
|
9
|
-
data: z.array(PhotoStudioCheckpointSchema),
|
|
10
|
-
});
|
|
11
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCanvasWithImagesSchema, PhotoStudioImageInputSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace CreatePhotoStudioCanvasCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
name: z.string().trim().min(1).optional(),
|
|
7
|
-
images: z.array(PhotoStudioImageInputSchema).default([]).optional(),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
-
|
|
12
|
-
export const ResponseSchema = z.object({
|
|
13
|
-
data: PhotoStudioCanvasWithImagesSchema,
|
|
14
|
-
});
|
|
15
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export namespace DeletePhotoStudioCanvasCommand {
|
|
4
|
-
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
5
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
6
|
-
|
|
7
|
-
export const ResponseSchema = z.object({
|
|
8
|
-
data: z.object({ isDeleted: z.boolean() }),
|
|
9
|
-
});
|
|
10
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export namespace DeletePhotoStudioCheckpointCommand {
|
|
4
|
-
export const RequestParamSchema = z.object({
|
|
5
|
-
canvasId: z.string().uuid(),
|
|
6
|
-
checkpointId: z.string().uuid(),
|
|
7
|
-
});
|
|
8
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
9
|
-
|
|
10
|
-
export const ResponseSchema = z.object({
|
|
11
|
-
data: z.object({ isDeleted: z.boolean() }),
|
|
12
|
-
});
|
|
13
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { TOOL_CONTENT_TYPE } from '../../constants';
|
|
3
|
-
import { IMAGE_GENERATION_RESOLUTION } from '../../constants/tool-image-generation/enums/image-generation-resolution.enum';
|
|
4
|
-
import { CanvasNodePositionSchema, ToolJobSchema } from '../../models';
|
|
5
|
-
|
|
6
|
-
export namespace ExecutePhotoStudioActionCommand {
|
|
7
|
-
export const RequestSchema = z.object({
|
|
8
|
-
actionAlias: z.string().min(1),
|
|
9
|
-
modelId: z.string().uuid(),
|
|
10
|
-
prompt: z.string().optional(),
|
|
11
|
-
params: z
|
|
12
|
-
.object({
|
|
13
|
-
imageUrls: z.array(z.string().uuid()).optional(),
|
|
14
|
-
enhancePrompt: z.boolean().optional(),
|
|
15
|
-
resolution: z.nativeEnum(IMAGE_GENERATION_RESOLUTION).optional(),
|
|
16
|
-
aspectRatio: z.string().optional(),
|
|
17
|
-
effect: z.string().optional(),
|
|
18
|
-
size: z.enum(['2x', '4x', '8x']).optional(),
|
|
19
|
-
variationsCount: z.union([z.literal(2), z.literal(3), z.literal(4)]).optional(),
|
|
20
|
-
variationStrength: z.enum(['light', 'medium', 'high']).optional(),
|
|
21
|
-
fontStyle: z
|
|
22
|
-
.enum([
|
|
23
|
-
'calligraphy',
|
|
24
|
-
'handwritten',
|
|
25
|
-
'elegant',
|
|
26
|
-
'decorative',
|
|
27
|
-
'poster',
|
|
28
|
-
'engraving',
|
|
29
|
-
])
|
|
30
|
-
.optional(),
|
|
31
|
-
placement: z.enum(['top', 'center', 'bottom']).optional(),
|
|
32
|
-
color: z.string().optional(),
|
|
33
|
-
})
|
|
34
|
-
.default({}),
|
|
35
|
-
position: CanvasNodePositionSchema,
|
|
36
|
-
baseCheckpointSequence: z.number().int().positive().optional(),
|
|
37
|
-
});
|
|
38
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
39
|
-
|
|
40
|
-
export const PhotoStudioExecuteJobSchema = ToolJobSchema.extend({
|
|
41
|
-
toolType: z.nativeEnum(TOOL_CONTENT_TYPE),
|
|
42
|
-
});
|
|
43
|
-
export type PhotoStudioExecuteJob = z.infer<typeof PhotoStudioExecuteJobSchema>;
|
|
44
|
-
|
|
45
|
-
export const ResponseSchema = z.object({
|
|
46
|
-
data: z.array(PhotoStudioExecuteJobSchema),
|
|
47
|
-
});
|
|
48
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
49
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCanvasWithImagesSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace FindPhotoStudioCanvasByUuidQuery {
|
|
5
|
-
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
6
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
7
|
-
|
|
8
|
-
export const ResponseSchema = z.object({
|
|
9
|
-
data: PhotoStudioCanvasWithImagesSchema,
|
|
10
|
-
});
|
|
11
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCanvasSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace FindPhotoStudioCanvasesQuery {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
limit: z.coerce.number().int().min(1).default(20).optional(),
|
|
7
|
-
offset: z.coerce.number().int().min(0).default(0).optional(),
|
|
8
|
-
name: z.string().optional(),
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
-
|
|
13
|
-
export const ResponseSchema = z.object({
|
|
14
|
-
data: z.array(PhotoStudioCanvasSchema.extend({ countOfImages: z.number() })),
|
|
15
|
-
page: z.number(),
|
|
16
|
-
totalPages: z.number(),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCheckpointSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace FindPhotoStudioCheckpointsQuery {
|
|
5
|
-
export const RequestParamSchema = z.object({ canvasId: z.string().uuid() });
|
|
6
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
7
|
-
|
|
8
|
-
export const ResponseSchema = z.object({
|
|
9
|
-
data: z.array(PhotoStudioCheckpointSchema),
|
|
10
|
-
});
|
|
11
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
12
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { TOOL_CONTENT_TYPE, TOOL_JOB_STATUS } from '../../constants';
|
|
3
|
-
import { CanvasNodePositionSchema, FileResolutionSchema } from '../../models';
|
|
4
|
-
|
|
5
|
-
export namespace FindPhotoStudioJobByIdQuery {
|
|
6
|
-
export const RequestParamSchema = z.object({
|
|
7
|
-
canvasId: z.string().uuid(),
|
|
8
|
-
jobId: z.string().uuid(),
|
|
9
|
-
});
|
|
10
|
-
export type RequestParams = z.infer<typeof RequestParamSchema>;
|
|
11
|
-
|
|
12
|
-
export const PhotoStudioJobImageSchema = z.object({
|
|
13
|
-
fileId: z.string().uuid(),
|
|
14
|
-
url: z.string(),
|
|
15
|
-
originalName: z.string().nullable().optional(),
|
|
16
|
-
resolution: FileResolutionSchema.nullable().optional(),
|
|
17
|
-
});
|
|
18
|
-
export type PhotoStudioJobImage = z.infer<typeof PhotoStudioJobImageSchema>;
|
|
19
|
-
|
|
20
|
-
export const PhotoStudioJobSchema = z.object({
|
|
21
|
-
jobId: z.string().uuid(),
|
|
22
|
-
toolType: z.nativeEnum(TOOL_CONTENT_TYPE),
|
|
23
|
-
status: z.nativeEnum(TOOL_JOB_STATUS),
|
|
24
|
-
position: CanvasNodePositionSchema,
|
|
25
|
-
images: z.array(PhotoStudioJobImageSchema),
|
|
26
|
-
error: z.string().nullable(),
|
|
27
|
-
createdAt: z.date(),
|
|
28
|
-
updatedAt: z.date(),
|
|
29
|
-
});
|
|
30
|
-
export type PhotoStudioJob = z.infer<typeof PhotoStudioJobSchema>;
|
|
31
|
-
|
|
32
|
-
export const ResponseSchema = z.object({
|
|
33
|
-
data: PhotoStudioJobSchema,
|
|
34
|
-
});
|
|
35
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
36
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { TOOL_JOB_STATUS } from '../../constants';
|
|
3
|
-
import { FindPhotoStudioJobByIdQuery } from './find-photo-studio-job-by-id.query';
|
|
4
|
-
|
|
5
|
-
export namespace FindPhotoStudioJobsQuery {
|
|
6
|
-
export const RequestParamSchema = z.object({
|
|
7
|
-
canvasId: z.string().uuid(),
|
|
8
|
-
});
|
|
9
|
-
export type RequestParams = z.infer<typeof RequestParamSchema>;
|
|
10
|
-
|
|
11
|
-
export const RequestQuerySchema = z.object({
|
|
12
|
-
status: z.nativeEnum(TOOL_JOB_STATUS).optional(),
|
|
13
|
-
});
|
|
14
|
-
export type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
|
15
|
-
|
|
16
|
-
export const ResponseSchema = z.object({
|
|
17
|
-
data: z.array(FindPhotoStudioJobByIdQuery.PhotoStudioJobSchema),
|
|
18
|
-
});
|
|
19
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioActionSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GetPhotoStudioActionsQuery {
|
|
5
|
-
export const ResponseSchema = z.object({
|
|
6
|
-
data: z.array(PhotoStudioActionSchema),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from './add-photo-studio-checkpoint.command';
|
|
2
|
-
export * from './clear-photo-studio-checkpoints.command';
|
|
3
|
-
export * from './create-photo-studio-canvas.command';
|
|
4
|
-
export * from './delete-photo-studio-canvas.command';
|
|
5
|
-
export * from './delete-photo-studio-checkpoint.command';
|
|
6
|
-
export * from './execute-photo-studio-action.command';
|
|
7
|
-
export * from './find-photo-studio-canvas-by-uuid.query';
|
|
8
|
-
export * from './find-photo-studio-canvases.query';
|
|
9
|
-
export * from './find-photo-studio-checkpoints.query';
|
|
10
|
-
export * from './find-photo-studio-job-by-id.query';
|
|
11
|
-
export * from './find-photo-studio-jobs.query';
|
|
12
|
-
export * from './get-photo-studio-actions.query';
|
|
13
|
-
export * from './save-photo-studio-canvas.command';
|
|
14
|
-
export * from './update-photo-studio-canvas.command';
|
|
15
|
-
export * from './update-photo-studio-checkpoint.command';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PhotoStudioCanvasWithImagesSchema,
|
|
4
|
-
PhotoStudioCheckpointActionSchema,
|
|
5
|
-
PhotoStudioImageInputSchema,
|
|
6
|
-
} from '../../models';
|
|
7
|
-
|
|
8
|
-
export namespace SavePhotoStudioCanvasCommand {
|
|
9
|
-
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
10
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
11
|
-
|
|
12
|
-
export const RequestSchema = z.object({
|
|
13
|
-
updatedAt: z.coerce.date().optional(),
|
|
14
|
-
images: z.array(PhotoStudioImageInputSchema),
|
|
15
|
-
action: PhotoStudioCheckpointActionSchema.optional(),
|
|
16
|
-
baseCheckpointSequence: z.number().int().positive().optional(),
|
|
17
|
-
});
|
|
18
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
19
|
-
|
|
20
|
-
export const ResponseSchema = z.object({
|
|
21
|
-
data: PhotoStudioCanvasWithImagesSchema,
|
|
22
|
-
});
|
|
23
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
24
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioCanvasWithImagesSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace UpdatePhotoStudioCanvasCommand {
|
|
5
|
-
export const RequestParamSchema = z.object({ uuid: z.string().uuid() });
|
|
6
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
7
|
-
|
|
8
|
-
export const RequestSchema = z.object({
|
|
9
|
-
name: z.string().trim().min(1),
|
|
10
|
-
});
|
|
11
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
-
|
|
13
|
-
export const ResponseSchema = z.object({
|
|
14
|
-
data: PhotoStudioCanvasWithImagesSchema,
|
|
15
|
-
});
|
|
16
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
PhotoStudioCheckpointActionSchema,
|
|
4
|
-
PhotoStudioCheckpointSchema,
|
|
5
|
-
PhotoStudioImageInputSchema,
|
|
6
|
-
} from '../../models';
|
|
7
|
-
|
|
8
|
-
export namespace UpdatePhotoStudioCheckpointCommand {
|
|
9
|
-
export const RequestParamSchema = z.object({
|
|
10
|
-
canvasId: z.string().uuid(),
|
|
11
|
-
checkpointId: z.string().uuid(),
|
|
12
|
-
});
|
|
13
|
-
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
14
|
-
|
|
15
|
-
export const RequestSchema = z.object({
|
|
16
|
-
action: PhotoStudioCheckpointActionSchema.optional(),
|
|
17
|
-
images: z.array(PhotoStudioImageInputSchema).optional(),
|
|
18
|
-
});
|
|
19
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
20
|
-
|
|
21
|
-
export const ResponseSchema = z.object({
|
|
22
|
-
data: PhotoStudioCheckpointSchema,
|
|
23
|
-
});
|
|
24
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './photo-studio-checkpoint-action-type.enum';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const AgentStatisticsRangeSchema = z.object({
|
|
4
|
-
from: z.string().datetime(),
|
|
5
|
-
to: z.string().datetime(),
|
|
6
|
-
granularity: z.enum(['day', 'week', 'month']),
|
|
7
|
-
});
|
|
8
|
-
export type AgentStatisticsRange = z.infer<typeof AgentStatisticsRangeSchema>;
|
|
9
|
-
|
|
10
|
-
export const AgentStatisticsTotalsSchema = z.object({
|
|
11
|
-
dialogs: z.number().int().min(0),
|
|
12
|
-
leads: z.number().int().min(0),
|
|
13
|
-
messagesIncoming: z.number().int().min(0),
|
|
14
|
-
messagesOutgoing: z.number().int().min(0),
|
|
15
|
-
starsSpent: z.number().int().min(0),
|
|
16
|
-
conversionToLeadPercent: z.number().min(0),
|
|
17
|
-
conversionToDialogPercent: z.number().min(0),
|
|
18
|
-
agentActivations: z.number().int().min(0),
|
|
19
|
-
});
|
|
20
|
-
export type AgentStatisticsTotals = z.infer<typeof AgentStatisticsTotalsSchema>;
|
|
21
|
-
|
|
22
|
-
export const AgentStatisticsBucketSchema = z.object({
|
|
23
|
-
start: z.string().datetime(),
|
|
24
|
-
dialogs: z.number().int().min(0),
|
|
25
|
-
leads: z.number().int().min(0),
|
|
26
|
-
launches: z.number().int().min(0),
|
|
27
|
-
starsSpent: z.number().int().min(0),
|
|
28
|
-
});
|
|
29
|
-
export type AgentStatisticsBucket = z.infer<typeof AgentStatisticsBucketSchema>;
|
|
30
|
-
|
|
31
|
-
export const AgentStatisticsDataSchema = z.object({
|
|
32
|
-
range: AgentStatisticsRangeSchema,
|
|
33
|
-
totals: AgentStatisticsTotalsSchema,
|
|
34
|
-
chart: z.object({
|
|
35
|
-
buckets: z.array(AgentStatisticsBucketSchema),
|
|
36
|
-
}),
|
|
37
|
-
});
|
|
38
|
-
export type AgentStatisticsData = z.infer<typeof AgentStatisticsDataSchema>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const MessageAttachmentTypeEnum = z.enum([
|
|
4
|
-
'image',
|
|
5
|
-
'document',
|
|
6
|
-
'text',
|
|
7
|
-
'audio',
|
|
8
|
-
'video',
|
|
9
|
-
'other',
|
|
10
|
-
]);
|
|
11
|
-
export type MessageAttachmentType = z.infer<typeof MessageAttachmentTypeEnum>;
|
|
12
|
-
|
|
13
|
-
export const MessageAttachmentInputSchema = z.object({
|
|
14
|
-
fileId: z.string().uuid().optional(),
|
|
15
|
-
url: z.string(),
|
|
16
|
-
mimeType: z.string(),
|
|
17
|
-
type: MessageAttachmentTypeEnum,
|
|
18
|
-
originalName: z.string().optional(),
|
|
19
|
-
content: z.string().optional(),
|
|
20
|
-
contentLength: z.number().int().optional(),
|
|
21
|
-
});
|
|
22
|
-
export type MessageAttachmentInput = z.infer<typeof MessageAttachmentInputSchema>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export const PhotoStudioImageSettingsSchema = z.object({
|
|
4
|
-
minImages: z.number().int().min(0),
|
|
5
|
-
maxImages: z.number().int().min(1),
|
|
6
|
-
});
|
|
7
|
-
export type PhotoStudioImageSettings = z.infer<typeof PhotoStudioImageSettingsSchema>;
|
|
8
|
-
|
|
9
|
-
export const PhotoStudioActionSchema = z.object({
|
|
10
|
-
alias: z.string().min(1),
|
|
11
|
-
title: z.string().min(1),
|
|
12
|
-
icon: z.string().min(1),
|
|
13
|
-
allowUserPrompt: z.boolean(),
|
|
14
|
-
systemPrompt: z.string().nullable(),
|
|
15
|
-
imageSettings: PhotoStudioImageSettingsSchema,
|
|
16
|
-
params: z.record(z.string(), z.unknown()).default({}),
|
|
17
|
-
});
|
|
18
|
-
export type PhotoStudioAction = z.infer<typeof PhotoStudioActionSchema>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PHOTO_STUDIO_CHECKPOINT_ACTION_TYPE } from '../../constants';
|
|
3
|
-
import { PhotoStudioImageNodeSchema } from './photo-studio-image-node.schema';
|
|
4
|
-
|
|
5
|
-
export const PhotoStudioCheckpointActionSchema = z.object({
|
|
6
|
-
type: z.nativeEnum(PHOTO_STUDIO_CHECKPOINT_ACTION_TYPE),
|
|
7
|
-
actionAlias: z.string().nullable().optional(),
|
|
8
|
-
title: z.string().nullable().optional(),
|
|
9
|
-
params: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
10
|
-
});
|
|
11
|
-
export type PhotoStudioCheckpointAction = z.infer<typeof PhotoStudioCheckpointActionSchema>;
|
|
12
|
-
|
|
13
|
-
export const PhotoStudioCheckpointSchema = z.object({
|
|
14
|
-
uuid: z.string().uuid(),
|
|
15
|
-
canvasId: z.string().uuid(),
|
|
16
|
-
sequence: z.number().int().positive(),
|
|
17
|
-
action: PhotoStudioCheckpointActionSchema,
|
|
18
|
-
images: z.array(PhotoStudioImageNodeSchema),
|
|
19
|
-
createdAt: z.date(),
|
|
20
|
-
updatedAt: z.date(),
|
|
21
|
-
});
|
|
22
|
-
export type PhotoStudioCheckpoint = z.infer<typeof PhotoStudioCheckpointSchema>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CanvasNodePositionSchema } from '../canvas-node.schema';
|
|
3
|
-
import { FileResolutionSchema } from '../file.schema';
|
|
4
|
-
|
|
5
|
-
export const PhotoStudioImageResolutionSchema = FileResolutionSchema;
|
|
6
|
-
export type PhotoStudioImageResolution = z.infer<typeof PhotoStudioImageResolutionSchema>;
|
|
7
|
-
|
|
8
|
-
export const PhotoStudioImageNodeSchema = z.object({
|
|
9
|
-
uuid: z.string().uuid(),
|
|
10
|
-
fileId: z.string().uuid(),
|
|
11
|
-
url: z.string().url(),
|
|
12
|
-
originalName: z.string().nullable().optional(),
|
|
13
|
-
resolution: PhotoStudioImageResolutionSchema.nullable().optional(),
|
|
14
|
-
position: CanvasNodePositionSchema,
|
|
15
|
-
});
|
|
16
|
-
export type PhotoStudioImageNode = z.infer<typeof PhotoStudioImageNodeSchema>;
|
|
17
|
-
|
|
18
|
-
export const PhotoStudioImageInputSchema = z.object({
|
|
19
|
-
fileId: z.string().uuid(),
|
|
20
|
-
position: CanvasNodePositionSchema,
|
|
21
|
-
});
|
|
22
|
-
export type PhotoStudioImageInput = z.infer<typeof PhotoStudioImageInputSchema>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { PhotoStudioImageNodeSchema } from './photo-studio-image-node.schema';
|
|
3
|
-
|
|
4
|
-
export const PhotoStudioCanvasSchema = z.object({
|
|
5
|
-
uuid: z.string().uuid(),
|
|
6
|
-
name: z.string(),
|
|
7
|
-
userId: z.string().uuid(),
|
|
8
|
-
createdAt: z.date(),
|
|
9
|
-
updatedAt: z.date(),
|
|
10
|
-
});
|
|
11
|
-
export type PhotoStudioCanvas = z.infer<typeof PhotoStudioCanvasSchema>;
|
|
12
|
-
|
|
13
|
-
export const PhotoStudioCanvasWithImagesSchema = PhotoStudioCanvasSchema.extend({
|
|
14
|
-
images: z.array(PhotoStudioImageNodeSchema),
|
|
15
|
-
});
|
|
16
|
-
export type PhotoStudioCanvasWithImages = z.infer<typeof PhotoStudioCanvasWithImagesSchema>;
|
|
File without changes
|
|
File without changes
|