@purpleschool/gptbot 0.15.75 → 0.15.77-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.
Files changed (112) hide show
  1. package/build/api/controllers/http/avatar-studio.d.ts +12 -0
  2. package/build/api/controllers/http/avatar-studio.js +13 -0
  3. package/build/api/controllers/http/paraphrase.d.ts +1 -0
  4. package/build/api/controllers/http/paraphrase.js +1 -0
  5. package/build/api/routes.d.ts +2 -0
  6. package/build/api/routes.js +2 -0
  7. package/build/commands/ai-model/create-ai-model.command.d.ts +0 -10
  8. package/build/commands/ai-model/find-ai-model.command.d.ts +0 -10
  9. package/build/commands/ai-model/find-ai-models-available-to-user.comand.d.ts +0 -5
  10. package/build/commands/ai-model/find-formatted-ai-model.command.d.ts +0 -10
  11. package/build/commands/ai-model/update-ai-model.command.d.ts +0 -10
  12. package/build/commands/ai-studio/canvas-node/find-canvas-node-definitions-with-configs.query.d.ts +0 -5
  13. package/build/commands/ai-studio/canvas-tool/text-gen/get-text-generation-config.command.d.ts +0 -5
  14. package/build/commands/ai-studio/canvas-tool/var-gen/get-var-gen-config.command.d.ts +0 -5
  15. package/build/commands/avatar-studio/character/create-avatar-studio-character.command.d.ts +32 -0
  16. package/build/commands/avatar-studio/character/create-avatar-studio-character.command.js +23 -0
  17. package/build/commands/avatar-studio/character/delete-avatar-studio-character.command.d.ts +13 -0
  18. package/build/commands/avatar-studio/character/delete-avatar-studio-character.command.js +12 -0
  19. package/build/commands/avatar-studio/character/find-avatar-studio-characters.query.d.ts +28 -0
  20. package/build/commands/avatar-studio/character/find-avatar-studio-characters.query.js +10 -0
  21. package/build/commands/avatar-studio/character/generate-avatar-studio-character-reference.command.d.ts +76 -0
  22. package/build/commands/avatar-studio/character/generate-avatar-studio-character-reference.command.js +24 -0
  23. package/build/commands/avatar-studio/character/get-avatar-studio-character.query.d.ts +25 -0
  24. package/build/commands/avatar-studio/character/get-avatar-studio-character.query.js +13 -0
  25. package/build/commands/avatar-studio/character/index.d.ts +6 -0
  26. package/build/{helpers/ai-model → commands/avatar-studio/character}/index.js +6 -1
  27. package/build/commands/avatar-studio/character/update-avatar-studio-character.command.d.ts +32 -0
  28. package/build/commands/avatar-studio/character/update-avatar-studio-character.command.js +24 -0
  29. package/build/commands/avatar-studio/clip/create-avatar-studio-clip.command.d.ts +2 -0
  30. package/build/commands/avatar-studio/clip/find-avatar-studio-clips.query.d.ts +2 -0
  31. package/build/commands/avatar-studio/clip/get-avatar-studio-clip.query.d.ts +2 -0
  32. package/build/commands/avatar-studio/clip/update-avatar-studio-clip.command.d.ts +2 -0
  33. package/build/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.d.ts +3 -1
  34. package/build/commands/avatar-studio/generation-job/generate-avatar-studio-frame.command.js +5 -1
  35. package/build/commands/avatar-studio/index.d.ts +2 -0
  36. package/build/commands/avatar-studio/index.js +2 -0
  37. package/build/commands/avatar-studio/location/create-avatar-studio-location.command.d.ts +30 -0
  38. package/build/commands/avatar-studio/location/create-avatar-studio-location.command.js +22 -0
  39. package/build/commands/avatar-studio/location/delete-avatar-studio-location.command.d.ts +13 -0
  40. package/build/commands/avatar-studio/location/delete-avatar-studio-location.command.js +12 -0
  41. package/build/commands/avatar-studio/location/find-avatar-studio-locations.query.d.ts +27 -0
  42. package/build/commands/avatar-studio/location/find-avatar-studio-locations.query.js +10 -0
  43. package/build/commands/avatar-studio/location/generate-avatar-studio-location-reference.command.d.ts +76 -0
  44. package/build/commands/avatar-studio/location/generate-avatar-studio-location-reference.command.js +24 -0
  45. package/build/commands/avatar-studio/location/get-avatar-studio-location.query.d.ts +24 -0
  46. package/build/commands/avatar-studio/location/get-avatar-studio-location.query.js +13 -0
  47. package/build/commands/avatar-studio/location/index.d.ts +6 -0
  48. package/build/commands/avatar-studio/location/index.js +22 -0
  49. package/build/commands/avatar-studio/location/update-avatar-studio-location.command.d.ts +30 -0
  50. package/build/commands/avatar-studio/location/update-avatar-studio-location.command.js +23 -0
  51. package/build/commands/avatar-studio/scene/apply-avatar-studio-voice-to-all-scenes.command.d.ts +2 -0
  52. package/build/commands/avatar-studio/scene/create-avatar-studio-scene.command.d.ts +2 -0
  53. package/build/commands/avatar-studio/scene/reorder-avatar-studio-scenes.command.d.ts +2 -0
  54. package/build/commands/avatar-studio/scene/set-avatar-studio-scene-slot.command.d.ts +2 -0
  55. package/build/commands/avatar-studio/scene/update-avatar-studio-scene.command.d.ts +4 -0
  56. package/build/commands/avatar-studio/scriptwriter/apply-avatar-studio-scriptwriter-message.command.d.ts +2 -0
  57. package/build/commands/avatar-studio/shared/avatar-studio-common.schema.d.ts +8 -0
  58. package/build/commands/avatar-studio/shared/avatar-studio-common.schema.js +8 -1
  59. package/build/commands/avatar-studio/shared/get-avatar-studio-config.query.d.ts +42 -0
  60. package/build/commands/avatar-studio/shared/get-avatar-studio-config.query.js +22 -0
  61. package/build/commands/b2b/get-b2b-documentation.command.d.ts +0 -10
  62. package/build/commands/page/find-page-by-alias.command.d.ts +0 -10
  63. package/build/commands/page/find-page.command.d.ts +0 -5
  64. package/build/commands/page/find-pages-by-criteria.command.d.ts +0 -10
  65. package/build/commands/tools/paraphrase/find-paraphrase-job-by-uuid.command.d.ts +20 -0
  66. package/build/commands/tools/paraphrase/find-paraphrase-jobs.command.d.ts +20 -0
  67. package/build/commands/tools/paraphrase/get-paraphrase-price.command.d.ts +31 -0
  68. package/build/commands/tools/paraphrase/get-paraphrase-price.command.js +30 -0
  69. package/build/commands/tools/paraphrase/get-paraphrase-tool-config.command.d.ts +3 -0
  70. package/build/commands/tools/paraphrase/index.d.ts +1 -0
  71. package/build/commands/tools/paraphrase/index.js +1 -0
  72. package/build/commands/tools/paraphrase/paraphrase.command.d.ts +36 -1
  73. package/build/commands/tools/paraphrase/paraphrase.command.js +16 -3
  74. package/build/commands/tools/paraphrase/retry-paraphrase-job.command.d.ts +20 -0
  75. package/build/commands/tools/paraphrase/set-reaction-to-paraphrase-job.command.d.ts +20 -0
  76. package/build/commands/tools/paraphrase/update-paraphrase-job-favorite.command.d.ts +20 -0
  77. package/build/commands/tools/paraphrase/update-paraphrase-job-title.command.d.ts +20 -0
  78. package/build/constants/ai-model/enums/ai-model-config-selector-type.enum.d.ts +0 -1
  79. package/build/constants/ai-model/enums/ai-model-config-selector-type.enum.js +0 -1
  80. package/build/constants/avatar-studio/enums/avatar-studio-job-type.enum.d.ts +5 -1
  81. package/build/constants/avatar-studio/enums/avatar-studio-job-type.enum.js +4 -0
  82. package/build/constants/avatar-studio/enums/avatar-studio-reference-card-status.enum.d.ts +6 -0
  83. package/build/constants/avatar-studio/enums/avatar-studio-reference-card-status.enum.js +10 -0
  84. package/build/constants/avatar-studio/enums/index.d.ts +1 -0
  85. package/build/constants/avatar-studio/enums/index.js +1 -0
  86. package/build/constants/tool-paraphrase/enums/index.d.ts +1 -0
  87. package/build/constants/tool-paraphrase/enums/index.js +1 -0
  88. package/build/constants/tool-paraphrase/enums/paraphrase-input-kind.enum.d.ts +4 -0
  89. package/build/constants/tool-paraphrase/enums/paraphrase-input-kind.enum.js +8 -0
  90. package/build/helpers/index.d.ts +0 -1
  91. package/build/helpers/index.js +0 -1
  92. package/build/models/ai-model-config.schema.d.ts +0 -11
  93. package/build/models/ai-model-config.schema.js +1 -8
  94. package/build/models/ai-model-formatted.schema.d.ts +0 -5
  95. package/build/models/ai-model.schema.d.ts +0 -15
  96. package/build/models/avatar-studio/avatar-studio.schema.d.ts +59 -1
  97. package/build/models/avatar-studio/avatar-studio.schema.js +31 -1
  98. package/build/models/canvas-node-definition.schema.d.ts +0 -20
  99. package/build/models/tools/paraphrase/index.d.ts +1 -0
  100. package/build/models/tools/paraphrase/index.js +1 -0
  101. package/build/models/tools/paraphrase/paraphrase-config.schema.d.ts +3 -0
  102. package/build/models/tools/paraphrase/paraphrase-config.schema.js +1 -0
  103. package/build/models/tools/paraphrase/paraphrase-document.schema.d.ts +10 -0
  104. package/build/models/tools/paraphrase/paraphrase-document.schema.js +13 -0
  105. package/build/models/tools/paraphrase/paraphrase-job.schema.d.ts +21 -1
  106. package/build/models/tools/paraphrase/paraphrase-job.schema.js +5 -0
  107. package/build/models/tools/paraphrase/paraphrase-model.schema.d.ts +2 -0
  108. package/build/models/tools/paraphrase/paraphrase-model.schema.js +2 -0
  109. package/package.json +1 -1
  110. package/build/helpers/ai-model/calc-base-text-generation-price.helper.d.ts +0 -8
  111. package/build/helpers/ai-model/calc-base-text-generation-price.helper.js +0 -15
  112. package/build/helpers/ai-model/index.d.ts +0 -1
@@ -53,11 +53,6 @@ export declare const AiModelSchema: z.ZodObject<{
53
53
  "web-search": z.ZodOptional<z.ZodObject<{
54
54
  webSearchPrice: z.ZodNumber;
55
55
  }, z.core.$strip>>;
56
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
57
- stepSize: z.ZodNumber;
58
- stepPrice: z.ZodNumber;
59
- isActive: z.ZodBoolean;
60
- }, z.core.$strip>>;
61
56
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
62
57
  multiplier: z.ZodNumber;
63
58
  }, z.core.$strip>>;
@@ -118,11 +113,6 @@ export declare const CreateAiModelSchema: z.ZodObject<{
118
113
  "web-search": z.ZodOptional<z.ZodObject<{
119
114
  webSearchPrice: z.ZodNumber;
120
115
  }, z.core.$strip>>;
121
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
122
- stepSize: z.ZodNumber;
123
- stepPrice: z.ZodNumber;
124
- isActive: z.ZodBoolean;
125
- }, z.core.$strip>>;
126
116
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
127
117
  multiplier: z.ZodNumber;
128
118
  }, z.core.$strip>>;
@@ -188,11 +178,6 @@ export declare const AiModelWithUnlockedBySchema: z.ZodObject<{
188
178
  "web-search": z.ZodOptional<z.ZodObject<{
189
179
  webSearchPrice: z.ZodNumber;
190
180
  }, z.core.$strip>>;
191
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
192
- stepSize: z.ZodNumber;
193
- stepPrice: z.ZodNumber;
194
- isActive: z.ZodBoolean;
195
- }, z.core.$strip>>;
196
181
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
197
182
  multiplier: z.ZodNumber;
198
183
  }, z.core.$strip>>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AVATAR_STUDIO_EXPORT_STATUS, AVATAR_STUDIO_IMAGE_STYLE, AVATAR_STUDIO_JOB_STATUS, AVATAR_STUDIO_JOB_TYPE, AVATAR_STUDIO_MEDIA_KIND, AVATAR_STUDIO_SCRIPTWRITER_ROLE, AVATAR_STUDIO_SLOT, AVATAR_STUDIO_SUBTITLE_FONT, AVATAR_STUDIO_SUBTITLE_MODE, AVATAR_STUDIO_VIDEO_MODE } from '../../constants';
2
+ import { AVATAR_STUDIO_EXPORT_STATUS, AVATAR_STUDIO_IMAGE_STYLE, AVATAR_STUDIO_JOB_STATUS, AVATAR_STUDIO_JOB_TYPE, AVATAR_STUDIO_MEDIA_KIND, AVATAR_STUDIO_REFERENCE_CARD_STATUS, AVATAR_STUDIO_SCRIPTWRITER_ROLE, AVATAR_STUDIO_SLOT, AVATAR_STUDIO_SUBTITLE_FONT, AVATAR_STUDIO_SUBTITLE_MODE, AVATAR_STUDIO_VIDEO_MODE } from '../../constants';
3
3
  export declare const AvatarStudioAspectRatioSchema: z.ZodEnum<{
4
4
  "16:9": "16:9";
5
5
  "1:1": "1:1";
@@ -59,6 +59,56 @@ export declare const AvatarStudioMediaSchema: z.ZodObject<{
59
59
  updatedAt: z.ZodDate;
60
60
  }, z.core.$strip>;
61
61
  export type AvatarStudioMedia = z.infer<typeof AvatarStudioMediaSchema>;
62
+ /**
63
+ * Общие поля персонажа и локации — переиспользуемых карточек с одним reference sheet
64
+ * (2x2-сетка ракурсов). Reference sheet — File, а не AvatarStudioMedia: карточка не должна
65
+ * попадать в сетку фото медиатеки.
66
+ */
67
+ export declare const AvatarStudioReferenceCardBaseSchema: z.ZodObject<{
68
+ uuid: z.ZodString;
69
+ userId: z.ZodNullable<z.ZodString>;
70
+ unregisteredUserId: z.ZodNullable<z.ZodString>;
71
+ name: z.ZodString;
72
+ description: z.ZodNullable<z.ZodString>;
73
+ fileId: z.ZodNullable<z.ZodString>;
74
+ fileUrl: z.ZodNullable<z.ZodString>;
75
+ status: z.ZodEnum<typeof AVATAR_STUDIO_REFERENCE_CARD_STATUS>;
76
+ error: z.ZodNullable<z.ZodString>;
77
+ generationJobId: z.ZodNullable<z.ZodString>;
78
+ createdAt: z.ZodDate;
79
+ updatedAt: z.ZodDate;
80
+ }, z.core.$strip>;
81
+ export declare const AvatarStudioCharacterSchema: z.ZodObject<{
82
+ uuid: z.ZodString;
83
+ userId: z.ZodNullable<z.ZodString>;
84
+ unregisteredUserId: z.ZodNullable<z.ZodString>;
85
+ name: z.ZodString;
86
+ description: z.ZodNullable<z.ZodString>;
87
+ fileId: z.ZodNullable<z.ZodString>;
88
+ fileUrl: z.ZodNullable<z.ZodString>;
89
+ status: z.ZodEnum<typeof AVATAR_STUDIO_REFERENCE_CARD_STATUS>;
90
+ error: z.ZodNullable<z.ZodString>;
91
+ generationJobId: z.ZodNullable<z.ZodString>;
92
+ createdAt: z.ZodDate;
93
+ updatedAt: z.ZodDate;
94
+ voiceId: z.ZodNullable<z.ZodString>;
95
+ }, z.core.$strip>;
96
+ export type AvatarStudioCharacter = z.infer<typeof AvatarStudioCharacterSchema>;
97
+ export declare const AvatarStudioLocationSchema: z.ZodObject<{
98
+ uuid: z.ZodString;
99
+ userId: z.ZodNullable<z.ZodString>;
100
+ unregisteredUserId: z.ZodNullable<z.ZodString>;
101
+ name: z.ZodString;
102
+ description: z.ZodNullable<z.ZodString>;
103
+ fileId: z.ZodNullable<z.ZodString>;
104
+ fileUrl: z.ZodNullable<z.ZodString>;
105
+ status: z.ZodEnum<typeof AVATAR_STUDIO_REFERENCE_CARD_STATUS>;
106
+ error: z.ZodNullable<z.ZodString>;
107
+ generationJobId: z.ZodNullable<z.ZodString>;
108
+ createdAt: z.ZodDate;
109
+ updatedAt: z.ZodDate;
110
+ }, z.core.$strip>;
111
+ export type AvatarStudioLocation = z.infer<typeof AvatarStudioLocationSchema>;
62
112
  export declare const AvatarStudioTrimConfigFields: {
63
113
  trimStart: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
64
114
  trimEnd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
@@ -95,6 +145,8 @@ export declare const AvatarStudioSceneImageConfigSchema: z.ZodObject<{
95
145
  prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
96
146
  style: z.ZodDefault<z.ZodEnum<typeof AVATAR_STUDIO_IMAGE_STYLE>>;
97
147
  references: z.ZodDefault<z.ZodArray<z.ZodString>>;
148
+ characterId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
149
+ locationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
98
150
  }, z.core.$strip>;
99
151
  export type AvatarStudioSceneImageConfig = z.infer<typeof AvatarStudioSceneImageConfigSchema>;
100
152
  export declare const AvatarStudioSceneImageReferenceSchema: z.ZodObject<{
@@ -105,6 +157,8 @@ export type AvatarStudioSceneImageReference = z.infer<typeof AvatarStudioSceneIm
105
157
  export declare const AvatarStudioSceneImageConfigResponseSchema: z.ZodObject<{
106
158
  prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
107
159
  style: z.ZodDefault<z.ZodEnum<typeof AVATAR_STUDIO_IMAGE_STYLE>>;
160
+ characterId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
161
+ locationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
108
162
  references: z.ZodDefault<z.ZodArray<z.ZodObject<{
109
163
  uuid: z.ZodString;
110
164
  url: z.ZodNullable<z.ZodString>;
@@ -156,6 +210,8 @@ export declare const AvatarStudioSceneSchema: z.ZodObject<{
156
210
  imageConfig: z.ZodObject<{
157
211
  prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
158
212
  style: z.ZodDefault<z.ZodEnum<typeof AVATAR_STUDIO_IMAGE_STYLE>>;
213
+ characterId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
214
+ locationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
159
215
  references: z.ZodDefault<z.ZodArray<z.ZodObject<{
160
216
  uuid: z.ZodString;
161
217
  url: z.ZodNullable<z.ZodString>;
@@ -547,6 +603,8 @@ export declare const AvatarStudioClipSchema: z.ZodObject<{
547
603
  imageConfig: z.ZodObject<{
548
604
  prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
549
605
  style: z.ZodDefault<z.ZodEnum<typeof AVATAR_STUDIO_IMAGE_STYLE>>;
606
+ characterId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
607
+ locationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
550
608
  references: z.ZodDefault<z.ZodArray<z.ZodObject<{
551
609
  uuid: z.ZodString;
552
610
  url: z.ZodNullable<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AvatarStudioClipSchema = exports.AvatarStudioScriptwriterMessageSchema = exports.AvatarStudioExportJobSchema = exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema = exports.AvatarStudioSceneSchema = exports.AvatarStudioSceneGenerationJobSchema = exports.AvatarStudioSceneVideoConfigSchema = exports.AvatarStudioSceneVideoConfigBaseSchema = exports.AvatarStudioSceneImageConfigResponseSchema = exports.AvatarStudioSceneImageReferenceSchema = exports.AvatarStudioSceneImageConfigSchema = exports.AvatarStudioSceneVoiceConfigSchema = exports.AvatarStudioSceneVoiceConfigBaseSchema = exports.validateAvatarStudioTrim = exports.AvatarStudioTrimConfigFields = exports.AvatarStudioMediaSchema = exports.AvatarStudioWordTimingSchema = exports.AvatarStudioSubtitleSettingsSchema = exports.AvatarStudioAspectRatioSchema = void 0;
3
+ exports.AvatarStudioClipSchema = exports.AvatarStudioScriptwriterMessageSchema = exports.AvatarStudioExportJobSchema = exports.AvatarStudioGenerationJobSchema = exports.AvatarStudioGenerationJobBaseSchema = exports.AvatarStudioSceneSchema = exports.AvatarStudioSceneGenerationJobSchema = exports.AvatarStudioSceneVideoConfigSchema = exports.AvatarStudioSceneVideoConfigBaseSchema = exports.AvatarStudioSceneImageConfigResponseSchema = exports.AvatarStudioSceneImageReferenceSchema = exports.AvatarStudioSceneImageConfigSchema = exports.AvatarStudioSceneVoiceConfigSchema = exports.AvatarStudioSceneVoiceConfigBaseSchema = exports.validateAvatarStudioTrim = exports.AvatarStudioTrimConfigFields = exports.AvatarStudioLocationSchema = exports.AvatarStudioCharacterSchema = exports.AvatarStudioReferenceCardBaseSchema = exports.AvatarStudioMediaSchema = exports.AvatarStudioWordTimingSchema = exports.AvatarStudioSubtitleSettingsSchema = exports.AvatarStudioAspectRatioSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../../constants");
6
6
  const file_schema_1 = require("../file.schema");
@@ -47,6 +47,32 @@ exports.AvatarStudioMediaSchema = zod_1.z.object({
47
47
  createdAt: zod_1.z.date(),
48
48
  updatedAt: zod_1.z.date(),
49
49
  });
50
+ /**
51
+ * Общие поля персонажа и локации — переиспользуемых карточек с одним reference sheet
52
+ * (2x2-сетка ракурсов). Reference sheet — File, а не AvatarStudioMedia: карточка не должна
53
+ * попадать в сетку фото медиатеки.
54
+ */
55
+ exports.AvatarStudioReferenceCardBaseSchema = zod_1.z.object({
56
+ uuid: zod_1.z.string().uuid(),
57
+ userId: zod_1.z.string().uuid().nullable(),
58
+ unregisteredUserId: zod_1.z.string().uuid().nullable(),
59
+ name: zod_1.z.string(),
60
+ description: zod_1.z.string().nullable(),
61
+ fileId: zod_1.z.string().uuid().nullable(),
62
+ /** URL reference sheet. null — файла ещё нет. */
63
+ fileUrl: zod_1.z.string().nullable(),
64
+ status: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_REFERENCE_CARD_STATUS),
65
+ error: zod_1.z.string().nullable(),
66
+ /** Job текущей генерации; фронт поллит его на GET generation-jobs/:jobId. null — генерации нет. */
67
+ generationJobId: zod_1.z.string().uuid().nullable(),
68
+ createdAt: zod_1.z.date(),
69
+ updatedAt: zod_1.z.date(),
70
+ });
71
+ exports.AvatarStudioCharacterSchema = exports.AvatarStudioReferenceCardBaseSchema.extend({
72
+ /** uuid голоса инструмента (scope = avatar_studio). null — голос не закреплён. */
73
+ voiceId: zod_1.z.string().uuid().nullable(),
74
+ });
75
+ exports.AvatarStudioLocationSchema = exports.AvatarStudioReferenceCardBaseSchema;
50
76
  exports.AvatarStudioTrimConfigFields = {
51
77
  trimStart: zod_1.z.number().nonnegative().nullable().default(null),
52
78
  trimEnd: zod_1.z.number().nonnegative().nullable().default(null),
@@ -78,6 +104,10 @@ exports.AvatarStudioSceneImageConfigSchema = zod_1.z.object({
78
104
  prompt: zod_1.z.string().nullable().default(null),
79
105
  style: zod_1.z.nativeEnum(constants_1.AVATAR_STUDIO_IMAGE_STYLE).default(constants_1.AVATAR_STUDIO_IMAGE_STYLE.UGC),
80
106
  references: zod_1.z.array(zod_1.z.string().uuid()).default([]),
107
+ /** Персонаж сцены. Его reference sheet подставляется в референсы генерации кадра. */
108
+ characterId: zod_1.z.string().uuid().nullable().default(null),
109
+ /** Локация сцены. Её reference sheet подставляется в референсы генерации кадра. */
110
+ locationId: zod_1.z.string().uuid().nullable().default(null),
81
111
  });
82
112
  exports.AvatarStudioSceneImageReferenceSchema = zod_1.z.object({
83
113
  uuid: zod_1.z.string().uuid(),
@@ -70,11 +70,6 @@ export declare const CanvasTextGenerationConfigSchema: z.ZodArray<z.ZodObject<{
70
70
  "web-search": z.ZodOptional<z.ZodObject<{
71
71
  webSearchPrice: z.ZodNumber;
72
72
  }, z.core.$strip>>;
73
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
74
- stepSize: z.ZodNumber;
75
- stepPrice: z.ZodNumber;
76
- isActive: z.ZodBoolean;
77
- }, z.core.$strip>>;
78
73
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
79
74
  multiplier: z.ZodNumber;
80
75
  }, z.core.$strip>>;
@@ -326,11 +321,6 @@ export declare const CanvasNodeDefinitionToolConfigSchema: z.ZodDiscriminatedUni
326
321
  "web-search": z.ZodOptional<z.ZodObject<{
327
322
  webSearchPrice: z.ZodNumber;
328
323
  }, z.core.$strip>>;
329
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
330
- stepSize: z.ZodNumber;
331
- stepPrice: z.ZodNumber;
332
- isActive: z.ZodBoolean;
333
- }, z.core.$strip>>;
334
324
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
335
325
  multiplier: z.ZodNumber;
336
326
  }, z.core.$strip>>;
@@ -1099,11 +1089,6 @@ export declare const CanvasNodeDefinitionWithConfigSchema: z.ZodObject<{
1099
1089
  "web-search": z.ZodOptional<z.ZodObject<{
1100
1090
  webSearchPrice: z.ZodNumber;
1101
1091
  }, z.core.$strip>>;
1102
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
1103
- stepSize: z.ZodNumber;
1104
- stepPrice: z.ZodNumber;
1105
- isActive: z.ZodBoolean;
1106
- }, z.core.$strip>>;
1107
1092
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
1108
1093
  multiplier: z.ZodNumber;
1109
1094
  }, z.core.$strip>>;
@@ -1830,11 +1815,6 @@ export declare const CanvasNodeDefinitionsWithConfigsSchema: z.ZodRecord<z.ZodEn
1830
1815
  "web-search": z.ZodOptional<z.ZodObject<{
1831
1816
  webSearchPrice: z.ZodNumber;
1832
1817
  }, z.core.$strip>>;
1833
- "extra-symbols-pricing": z.ZodOptional<z.ZodObject<{
1834
- stepSize: z.ZodNumber;
1835
- stepPrice: z.ZodNumber;
1836
- isActive: z.ZodBoolean;
1837
- }, z.core.$strip>>;
1838
1818
  "no-active-subscription-or-product-multiplier": z.ZodOptional<z.ZodObject<{
1839
1819
  multiplier: z.ZodNumber;
1840
1820
  }, z.core.$strip>>;
@@ -2,3 +2,4 @@ export * from './paraphrase-config.schema';
2
2
  export * from './paraphrase-job.schema';
3
3
  export * from './paraphrase-model.schema';
4
4
  export * from './paraphrase-style.schema';
5
+ export * from './paraphrase-document.schema';
@@ -18,3 +18,4 @@ __exportStar(require("./paraphrase-config.schema"), exports);
18
18
  __exportStar(require("./paraphrase-job.schema"), exports);
19
19
  __exportStar(require("./paraphrase-model.schema"), exports);
20
20
  __exportStar(require("./paraphrase-style.schema"), exports);
21
+ __exportStar(require("./paraphrase-document.schema"), exports);
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ParaphraseToolConfigSchema: z.ZodObject<{
3
3
  maxSymbols: z.ZodNumber;
4
+ freeMaxSymbols: z.ZodNumber;
4
5
  styles: z.ZodArray<z.ZodObject<{
5
6
  uuid: z.ZodString;
6
7
  title: z.ZodString;
@@ -17,6 +18,8 @@ export declare const ParaphraseToolConfigSchema: z.ZodObject<{
17
18
  title: z.ZodString;
18
19
  icon: z.ZodString;
19
20
  price: z.ZodNumber;
21
+ freeMaxPromptLength: z.ZodNumber;
22
+ maxPromptLength: z.ZodNumber;
20
23
  order: z.ZodNumber;
21
24
  status: z.ZodEnum<typeof import("../../..").TOOL_MODEL_STATUS>;
22
25
  canUse: z.ZodBoolean;
@@ -6,6 +6,7 @@ const paraphrase_style_schema_1 = require("./paraphrase-style.schema");
6
6
  const paraphrase_model_schema_1 = require("./paraphrase-model.schema");
7
7
  exports.ParaphraseToolConfigSchema = zod_1.z.object({
8
8
  maxSymbols: zod_1.z.number(),
9
+ freeMaxSymbols: zod_1.z.number(),
9
10
  styles: zod_1.z.array(paraphrase_style_schema_1.ParaphraseStyleSchema),
10
11
  types: zod_1.z.array(paraphrase_model_schema_1.ParaphraseModelSchema),
11
12
  });
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const ParaphraseDocumentMetadataSchema: z.ZodObject<{
3
+ uuid: z.ZodString;
4
+ url: z.ZodString;
5
+ name: z.ZodString;
6
+ mimeType: z.ZodString;
7
+ type: z.ZodString;
8
+ size: z.ZodNumber;
9
+ extension: z.ZodString;
10
+ }, z.core.$strip>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParaphraseDocumentMetadataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ParaphraseDocumentMetadataSchema = zod_1.z.object({
6
+ uuid: zod_1.z.string().uuid(),
7
+ url: zod_1.z.string(),
8
+ name: zod_1.z.string(),
9
+ mimeType: zod_1.z.string(),
10
+ type: zod_1.z.string(),
11
+ size: zod_1.z.number().nonnegative(),
12
+ extension: zod_1.z.string(),
13
+ });
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { PARAPHRASING_INTENSITY, USER_REACTION } from '../../../constants';
2
+ import { PARAPHRASE_INPUT_KIND, PARAPHRASING_INTENSITY, USER_REACTION } from '../../../constants';
3
3
  export declare const ParaphraseToolJobSchema: z.ZodObject<{
4
4
  uuid: z.ZodString;
5
5
  status: z.ZodEnum<typeof import("../../..").TOOL_JOB_STATUS>;
@@ -15,4 +15,24 @@ export declare const ParaphraseToolJobSchema: z.ZodObject<{
15
15
  intensity: z.ZodEnum<typeof PARAPHRASING_INTENSITY>;
16
16
  reaction: z.ZodNullable<z.ZodEnum<typeof USER_REACTION>>;
17
17
  aiOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ inputKind: z.ZodDefault<z.ZodNullable<z.ZodEnum<typeof PARAPHRASE_INPUT_KIND>>>;
19
+ sourceDocument: z.ZodDefault<z.ZodNullable<z.ZodObject<{
20
+ uuid: z.ZodString;
21
+ url: z.ZodString;
22
+ name: z.ZodString;
23
+ mimeType: z.ZodString;
24
+ type: z.ZodString;
25
+ size: z.ZodNumber;
26
+ extension: z.ZodString;
27
+ }, z.core.$strip>>>;
28
+ outputDocument: z.ZodDefault<z.ZodNullable<z.ZodObject<{
29
+ uuid: z.ZodString;
30
+ url: z.ZodString;
31
+ name: z.ZodString;
32
+ mimeType: z.ZodString;
33
+ type: z.ZodString;
34
+ size: z.ZodNumber;
35
+ extension: z.ZodString;
36
+ }, z.core.$strip>>>;
37
+ uniquenessPercentage: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
18
38
  }, z.core.$strip>;
@@ -4,6 +4,7 @@ exports.ParaphraseToolJobSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tool_job_schema_1 = require("../../tool-job.schema");
6
6
  const constants_1 = require("../../../constants");
7
+ const paraphrase_document_schema_1 = require("./paraphrase-document.schema");
7
8
  exports.ParaphraseToolJobSchema = tool_job_schema_1.ToolJobSchema.extend({
8
9
  styleId: zod_1.z.string().uuid().nullable().optional(),
9
10
  modelId: zod_1.z.string().uuid().nullable().optional(),
@@ -13,4 +14,8 @@ exports.ParaphraseToolJobSchema = tool_job_schema_1.ToolJobSchema.extend({
13
14
  intensity: zod_1.z.nativeEnum(constants_1.PARAPHRASING_INTENSITY),
14
15
  reaction: zod_1.z.nativeEnum(constants_1.USER_REACTION).nullable(),
15
16
  aiOutput: zod_1.z.string().nullable().optional(),
17
+ inputKind: zod_1.z.nativeEnum(constants_1.PARAPHRASE_INPUT_KIND).nullable().default(null),
18
+ sourceDocument: paraphrase_document_schema_1.ParaphraseDocumentMetadataSchema.nullable().default(null),
19
+ outputDocument: paraphrase_document_schema_1.ParaphraseDocumentMetadataSchema.nullable().default(null),
20
+ uniquenessPercentage: zod_1.z.number().int().min(0).max(100).nullable().default(null),
16
21
  });
@@ -5,6 +5,8 @@ export declare const ParaphraseModelSchema: z.ZodObject<{
5
5
  title: z.ZodString;
6
6
  icon: z.ZodString;
7
7
  price: z.ZodNumber;
8
+ freeMaxPromptLength: z.ZodNumber;
9
+ maxPromptLength: z.ZodNumber;
8
10
  order: z.ZodNumber;
9
11
  status: z.ZodEnum<typeof TOOL_MODEL_STATUS>;
10
12
  canUse: z.ZodBoolean;
@@ -9,6 +9,8 @@ exports.ParaphraseModelSchema = zod_1.z.object({
9
9
  title: zod_1.z.string(),
10
10
  icon: zod_1.z.string(),
11
11
  price: zod_1.z.number(),
12
+ freeMaxPromptLength: zod_1.z.number(),
13
+ maxPromptLength: zod_1.z.number(),
12
14
  order: zod_1.z.number(),
13
15
  status: zod_1.z.nativeEnum(constants_1.TOOL_MODEL_STATUS),
14
16
  canUse: zod_1.z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.15.75",
3
+ "version": "0.15.77-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,8 +0,0 @@
1
- export declare function calcBaseTextGenerationPrice({ symbolsInRequest, defaultPrice, config, }: {
2
- symbolsInRequest: number;
3
- defaultPrice: number;
4
- config: {
5
- stepSize: number;
6
- stepPrice: number;
7
- } | null;
8
- }): number;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calcBaseTextGenerationPrice = calcBaseTextGenerationPrice;
4
- function calcBaseTextGenerationPrice({ symbolsInRequest, defaultPrice, config, }) {
5
- if (!config) {
6
- return defaultPrice;
7
- }
8
- const { stepSize, stepPrice } = config;
9
- if (symbolsInRequest <= stepSize) {
10
- return defaultPrice;
11
- }
12
- const symbolsBeyondFirstStep = symbolsInRequest - stepSize;
13
- const additionalSteps = Math.ceil(symbolsBeyondFirstStep / stepSize);
14
- return defaultPrice + Math.ceil(additionalSteps * stepPrice);
15
- }
@@ -1 +0,0 @@
1
- export * from './calc-base-text-generation-price.helper';