@purpleschool/gptbot-tools 0.2.70 → 0.2.72-stage2-ph
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/ai-proxy/routes/ai-proxy.routes.d.ts +1 -0
- package/build/ai-proxy/routes/ai-proxy.routes.js +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/build/photo-sessions/commands/admin/create-photo-session-style.command.d.ts +59 -0
- package/build/photo-sessions/commands/admin/create-photo-session-style.command.js +23 -0
- package/build/photo-sessions/commands/admin/delete-photo-session-style.command.d.ts +14 -0
- package/build/photo-sessions/commands/admin/delete-photo-session-style.command.js +12 -0
- package/build/photo-sessions/commands/admin/index.d.ts +3 -0
- package/build/photo-sessions/commands/admin/index.js +19 -0
- package/build/photo-sessions/commands/admin/update-photo-session-style.command.d.ts +55 -0
- package/build/photo-sessions/commands/admin/update-photo-session-style.command.js +21 -0
- package/build/photo-sessions/commands/delete-all-photo-sessions-jobs.command.d.ts +17 -0
- package/build/photo-sessions/commands/delete-all-photo-sessions-jobs.command.js +19 -0
- package/build/photo-sessions/commands/delete-photo-sessions-job-by-uuid.command.d.ts +16 -0
- package/build/photo-sessions/commands/delete-photo-sessions-job-by-uuid.command.js +14 -0
- package/build/photo-sessions/commands/get-photo-sessions-price.command.d.ts +74 -0
- package/build/photo-sessions/commands/get-photo-sessions-price.command.js +28 -0
- package/build/photo-sessions/commands/index.d.ts +10 -0
- package/build/photo-sessions/commands/index.js +26 -0
- package/build/photo-sessions/commands/photo-sessions.command.d.ts +272 -0
- package/build/photo-sessions/commands/photo-sessions.command.js +37 -0
- package/build/photo-sessions/commands/retry-photo-sessions-job.command.d.ts +179 -0
- package/build/photo-sessions/commands/retry-photo-sessions-job.command.js +17 -0
- package/build/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.d.ts +181 -0
- package/build/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.js +27 -0
- package/build/photo-sessions/commands/update-photo-sessions-job-favorite.command.d.ts +179 -0
- package/build/photo-sessions/commands/update-photo-sessions-job-favorite.command.js +16 -0
- package/build/photo-sessions/commands/update-photo-sessions-job-title.command.d.ts +217 -0
- package/build/photo-sessions/commands/update-photo-sessions-job-title.command.js +16 -0
- package/build/photo-sessions/commands/update-published-status-photo-sessions-jobs.command.d.ts +184 -0
- package/build/photo-sessions/commands/update-published-status-photo-sessions-jobs.command.js +26 -0
- package/build/photo-sessions/enums/index.d.ts +3 -0
- package/build/photo-sessions/enums/index.js +19 -0
- package/build/photo-sessions/enums/photo-session-group-status.enum.d.ts +6 -0
- package/build/photo-sessions/enums/photo-session-group-status.enum.js +10 -0
- package/build/photo-sessions/enums/photo-session-look-type.enum.d.ts +5 -0
- package/build/photo-sessions/enums/photo-session-look-type.enum.js +9 -0
- package/build/photo-sessions/enums/photo-session-strategy.enum.d.ts +4 -0
- package/build/photo-sessions/enums/photo-session-strategy.enum.js +8 -0
- package/build/photo-sessions/index.d.ts +5 -0
- package/build/photo-sessions/index.js +21 -0
- package/build/photo-sessions/models/index.d.ts +5 -0
- package/build/photo-sessions/models/index.js +21 -0
- package/build/photo-sessions/models/photo-session-config.schema.d.ts +72 -0
- package/build/photo-sessions/models/photo-session-config.schema.js +16 -0
- package/build/photo-sessions/models/photo-session-group.schema.d.ts +113 -0
- package/build/photo-sessions/models/photo-session-group.schema.js +27 -0
- package/build/photo-sessions/models/photo-session-job.schema.d.ts +159 -0
- package/build/photo-sessions/models/photo-session-job.schema.js +55 -0
- package/build/photo-sessions/models/photo-session-model.schema.d.ts +69 -0
- package/build/photo-sessions/models/photo-session-model.schema.js +42 -0
- package/build/photo-sessions/models/photo-session-style.schema.d.ts +29 -0
- package/build/photo-sessions/models/photo-session-style.schema.js +22 -0
- package/build/photo-sessions/queries/find-photo-session-style-by-id.query.d.ts +47 -0
- package/build/photo-sessions/queries/find-photo-session-style-by-id.query.js +15 -0
- package/build/photo-sessions/queries/find-photo-session-styles.query.d.ts +58 -0
- package/build/photo-sessions/queries/find-photo-session-styles.query.js +21 -0
- package/build/photo-sessions/queries/find-photo-sessions-job-by-id.query.d.ts +216 -0
- package/build/photo-sessions/queries/find-photo-sessions-job-by-id.query.js +18 -0
- package/build/photo-sessions/queries/find-photo-sessions-jobs.query.d.ts +235 -0
- package/build/photo-sessions/queries/find-photo-sessions-jobs.query.js +33 -0
- package/build/photo-sessions/queries/get-photo-sessions-config.query.d.ts +142 -0
- package/build/photo-sessions/queries/get-photo-sessions-config.query.js +10 -0
- package/build/photo-sessions/queries/index.d.ts +5 -0
- package/build/photo-sessions/queries/index.js +21 -0
- package/build/photo-sessions/routes/index.d.ts +2 -0
- package/build/photo-sessions/routes/index.js +18 -0
- package/build/photo-sessions/routes/photo-sessions.amqp.routes.d.ts +19 -0
- package/build/photo-sessions/routes/photo-sessions.amqp.routes.js +22 -0
- package/build/photo-sessions/routes/photo-sessions.http.routes.d.ts +1 -0
- package/build/photo-sessions/routes/photo-sessions.http.routes.js +4 -0
- package/build/spell-corrector/commands/get-spell-corrector-price.command.d.ts +16 -3
- package/build/spell-corrector/commands/get-spell-corrector-price.command.js +6 -1
- package/build/spell-corrector/commands/retry-spell-corrector-job.command.d.ts +67 -0
- package/build/spell-corrector/commands/retry-spell-corrector-job.command.js +2 -0
- package/build/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.d.ts +56 -0
- package/build/spell-corrector/commands/spell-corrector.command.d.ts +69 -1
- package/build/spell-corrector/commands/spell-corrector.command.js +9 -2
- package/build/spell-corrector/commands/update-spell-corrector-job-favorite.command.d.ts +56 -0
- package/build/spell-corrector/commands/update-spell-corrector-job-title.command.d.ts +56 -0
- package/build/spell-corrector/constants/index.d.ts +1 -0
- package/build/spell-corrector/constants/index.js +17 -0
- package/build/spell-corrector/constants/spell-corrector-errors.constant.d.ts +32 -0
- package/build/spell-corrector/constants/spell-corrector-errors.constant.js +35 -0
- package/build/spell-corrector/enums/index.d.ts +1 -0
- package/build/spell-corrector/enums/index.js +17 -0
- package/build/spell-corrector/enums/spell-corrector-input-kind.enum.d.ts +4 -0
- package/build/spell-corrector/enums/spell-corrector-input-kind.enum.js +8 -0
- package/build/spell-corrector/index.d.ts +2 -0
- package/build/spell-corrector/index.js +2 -0
- package/build/spell-corrector/models/index.d.ts +2 -0
- package/build/spell-corrector/models/index.js +2 -0
- package/build/spell-corrector/models/spell-corrector-correction-statistics.schema.d.ts +7 -0
- package/build/spell-corrector/models/spell-corrector-correction-statistics.schema.js +13 -0
- package/build/spell-corrector/models/spell-corrector-document.schema.d.ts +22 -0
- package/build/spell-corrector/models/spell-corrector-document.schema.js +16 -0
- package/build/spell-corrector/models/spell-corrector-job.schema.d.ts +29 -0
- package/build/spell-corrector/models/spell-corrector-job.schema.js +11 -0
- package/build/spell-corrector/models/spell-corrector-model.schema.d.ts +4 -0
- package/build/spell-corrector/models/spell-corrector-model.schema.js +4 -0
- package/build/spell-corrector/models/spell-corrector-tool-config.schema.d.ts +5 -0
- package/build/spell-corrector/models/spell-corrector-tool-config.schema.js +1 -0
- package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.d.ts +56 -0
- package/build/spell-corrector/queries/find-spell-corrector-jobs.query.d.ts +56 -0
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.d.ts +10 -0
- package/build/tools/enums/tool-content-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-content-type.enum.js +1 -0
- package/build/tools/enums/tool-type.enum.d.ts +1 -0
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/build/tools/events/tool-job-complete.event.d.ts +1 -0
- package/build/tools/events/tool-job-failed.event.d.ts +1 -0
- package/build/tools/models/global-tools-config.schema.d.ts +81 -0
- package/build/tools/models/global-tools-config.schema.js +2 -0
- package/build/tools/models/tool-job.schema.d.ts +1 -0
- package/build/tools/models/tool-job.schema.js +1 -0
- package/build/tools/models/tools-with-configs.schema.d.ts +32 -0
- package/build/tools/queries/get-global-tools-config.query.d.ts +162 -0
- package/build/tools/queries/get-tools-with-configs.query.d.ts +32 -0
- package/build/tts/commands/create-voice-clone.command.d.ts +81 -0
- package/build/tts/commands/create-voice-clone.command.js +21 -0
- package/build/tts/commands/create-voice-design.command.d.ts +40 -0
- package/build/tts/commands/create-voice-design.command.js +20 -0
- package/build/tts/commands/delete-voice.command.d.ts +17 -0
- package/build/tts/commands/delete-voice.command.js +14 -0
- package/build/tts/commands/download-tts-job.command.d.ts +25 -0
- package/build/tts/commands/download-tts-job.command.js +19 -0
- package/build/tts/commands/improve-tts-text.command.d.ts +22 -0
- package/build/tts/commands/improve-tts-text.command.js +16 -0
- package/build/tts/commands/index.d.ts +7 -0
- package/build/tts/commands/index.js +7 -0
- package/build/tts/commands/retry-tts-job.command.d.ts +29 -2
- package/build/tts/commands/retry-tts-job.command.js +2 -0
- package/build/tts/commands/select-voice-design.command.d.ts +77 -0
- package/build/tts/commands/select-voice-design.command.js +17 -0
- package/build/tts/commands/set-reaction-to-tts-job.command.d.ts +29 -2
- package/build/tts/commands/set-reaction-to-tts-job.command.js +1 -0
- package/build/tts/commands/tts.command.d.ts +35 -3
- package/build/tts/commands/tts.command.js +4 -1
- package/build/tts/commands/update-tts-job-favorite.command.d.ts +29 -2
- package/build/tts/commands/update-tts-job-favorite.command.js +2 -0
- package/build/tts/commands/update-tts-job-title.command.d.ts +29 -2
- package/build/tts/commands/update-tts-job-title.command.js +2 -0
- package/build/tts/commands/update-voice.command.d.ts +78 -0
- package/build/tts/commands/update-voice.command.js +18 -0
- package/build/tts/enums/index.d.ts +7 -0
- package/build/tts/enums/index.js +7 -0
- package/build/tts/enums/tts-download-format.enum.d.ts +5 -0
- package/build/tts/enums/tts-download-format.enum.js +9 -0
- package/build/tts/enums/voice-category.enum.d.ts +19 -0
- package/build/tts/enums/voice-category.enum.js +23 -0
- package/build/tts/enums/voice-gender.enum.d.ts +4 -0
- package/build/tts/enums/voice-gender.enum.js +8 -0
- package/build/tts/enums/voice-source.enum.d.ts +5 -0
- package/build/tts/enums/voice-source.enum.js +9 -0
- package/build/tts/enums/voice-status.enum.d.ts +5 -0
- package/build/tts/enums/voice-status.enum.js +9 -0
- package/build/tts/enums/voice-tag-group.enum.d.ts +5 -0
- package/build/tts/enums/voice-tag-group.enum.js +9 -0
- package/build/tts/enums/voice-tag.enum.d.ts +20 -0
- package/build/tts/enums/voice-tag.enum.js +24 -0
- package/build/tts/models/index.d.ts +7 -0
- package/build/tts/models/index.js +7 -0
- package/build/tts/models/tts-config-with-vendors.schema.d.ts +1 -0
- package/build/tts/models/tts-config.schema.d.ts +11 -0
- package/build/tts/models/tts-config.schema.js +5 -0
- package/build/tts/models/tts-job.schema.d.ts +34 -2
- package/build/tts/models/tts-job.schema.js +22 -2
- package/build/tts/models/tts-model-with-vendor.schema.d.ts +1 -0
- package/build/tts/models/tts-model.schema.d.ts +1 -0
- package/build/tts/models/tts-model.schema.js +1 -0
- package/build/tts/models/voice-category.schema.d.ts +7 -0
- package/build/tts/models/voice-category.schema.js +9 -0
- package/build/tts/models/voice-design-draft.schema.d.ts +13 -0
- package/build/tts/models/voice-design-draft.schema.js +13 -0
- package/build/tts/models/voice-design-sample.schema.d.ts +6 -0
- package/build/tts/models/voice-design-sample.schema.js +8 -0
- package/build/tts/models/voice-gender.schema.d.ts +7 -0
- package/build/tts/models/voice-gender.schema.js +9 -0
- package/build/tts/models/voice-source.schema.d.ts +7 -0
- package/build/tts/models/voice-source.schema.js +9 -0
- package/build/tts/models/voice-tag.schema.d.ts +9 -0
- package/build/tts/models/voice-tag.schema.js +11 -0
- package/build/tts/models/voice.schema.d.ts +34 -0
- package/build/tts/models/voice.schema.js +30 -0
- package/build/tts/queries/find-tts-job-by-id.query.d.ts +29 -2
- package/build/tts/queries/find-tts-job-by-id.query.js +2 -0
- package/build/tts/queries/find-tts-jobs.query.d.ts +29 -2
- package/build/tts/queries/find-tts-jobs.query.js +1 -0
- package/build/tts/queries/find-voice-by-id.query.d.ts +77 -0
- package/build/tts/queries/find-voice-by-id.query.js +17 -0
- package/build/tts/queries/find-voices.query.d.ts +122 -0
- package/build/tts/queries/find-voices.query.js +25 -0
- package/build/tts/queries/get-tts-config-with-vendors.query.d.ts +2 -0
- package/build/tts/queries/get-tts-config.query.d.ts +22 -0
- package/build/tts/queries/index.d.ts +2 -0
- package/build/tts/queries/index.js +2 -0
- package/build/tts/routes/tts.amqp.routes.d.ts +9 -0
- package/build/tts/routes/tts.amqp.routes.js +9 -0
- package/package.json +1 -1
|
@@ -6,6 +6,17 @@ export declare namespace RetrySpellCorrectorJobCommand {
|
|
|
6
6
|
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
7
|
tokenReservationId: z.ZodString;
|
|
8
8
|
precalculatedPrice: z.ZodNumber;
|
|
9
|
+
userHasActiveSubscriptionOrProduct: z.ZodBoolean;
|
|
10
|
+
document: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
uuid: z.ZodString;
|
|
12
|
+
url: z.ZodString;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
mimeType: z.ZodString;
|
|
15
|
+
type: z.ZodString;
|
|
16
|
+
size: z.ZodNumber;
|
|
17
|
+
extension: z.ZodString;
|
|
18
|
+
content: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
9
20
|
mock: z.ZodOptional<z.ZodBoolean>;
|
|
10
21
|
}, z.core.$strip>;
|
|
11
22
|
type Request = z.infer<typeof RequestSchema>;
|
|
@@ -13,11 +24,39 @@ export declare namespace RetrySpellCorrectorJobCommand {
|
|
|
13
24
|
isSuccess: z.ZodBoolean;
|
|
14
25
|
data: z.ZodOptional<z.ZodType<{
|
|
15
26
|
uuid: string;
|
|
27
|
+
requestId: string | null;
|
|
28
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
29
|
+
sourceDocument: {
|
|
30
|
+
uuid: string;
|
|
31
|
+
url: string;
|
|
32
|
+
name: string;
|
|
33
|
+
mimeType: string;
|
|
34
|
+
type: string;
|
|
35
|
+
size: number;
|
|
36
|
+
extension: string;
|
|
37
|
+
} | null;
|
|
38
|
+
statistics: {
|
|
39
|
+
total: number;
|
|
40
|
+
spelling: number;
|
|
41
|
+
punctuation: number;
|
|
42
|
+
} | null;
|
|
43
|
+
outputDocument: {
|
|
44
|
+
uuid: string;
|
|
45
|
+
url: string;
|
|
46
|
+
name: string;
|
|
47
|
+
mimeType: string;
|
|
48
|
+
type: string;
|
|
49
|
+
size: number;
|
|
50
|
+
extension: string;
|
|
51
|
+
} | null;
|
|
16
52
|
userId: string | null;
|
|
17
53
|
unregisteredUserId: string | null;
|
|
18
54
|
userInput: string;
|
|
19
55
|
aiOutput: string | null;
|
|
20
56
|
aiTokenUsage: number | null;
|
|
57
|
+
wordsChanged: number | null;
|
|
58
|
+
lettersChanged: number | null;
|
|
59
|
+
editOperations: number | null;
|
|
21
60
|
price: number;
|
|
22
61
|
status: import("../..").JOB_STATUS;
|
|
23
62
|
title: string;
|
|
@@ -31,11 +70,39 @@ export declare namespace RetrySpellCorrectorJobCommand {
|
|
|
31
70
|
completedAt: Date | null;
|
|
32
71
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
33
72
|
uuid: string;
|
|
73
|
+
requestId: string | null;
|
|
74
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
75
|
+
sourceDocument: {
|
|
76
|
+
uuid: string;
|
|
77
|
+
url: string;
|
|
78
|
+
name: string;
|
|
79
|
+
mimeType: string;
|
|
80
|
+
type: string;
|
|
81
|
+
size: number;
|
|
82
|
+
extension: string;
|
|
83
|
+
} | null;
|
|
84
|
+
statistics: {
|
|
85
|
+
total: number;
|
|
86
|
+
spelling: number;
|
|
87
|
+
punctuation: number;
|
|
88
|
+
} | null;
|
|
89
|
+
outputDocument: {
|
|
90
|
+
uuid: string;
|
|
91
|
+
url: string;
|
|
92
|
+
name: string;
|
|
93
|
+
mimeType: string;
|
|
94
|
+
type: string;
|
|
95
|
+
size: number;
|
|
96
|
+
extension: string;
|
|
97
|
+
} | null;
|
|
34
98
|
userId: string | null;
|
|
35
99
|
unregisteredUserId: string | null;
|
|
36
100
|
userInput: string;
|
|
37
101
|
aiOutput: string | null;
|
|
38
102
|
aiTokenUsage: number | null;
|
|
103
|
+
wordsChanged: number | null;
|
|
104
|
+
lettersChanged: number | null;
|
|
105
|
+
editOperations: number | null;
|
|
39
106
|
price: number;
|
|
40
107
|
status: import("../..").JOB_STATUS;
|
|
41
108
|
title: string;
|
|
@@ -12,6 +12,8 @@ var RetrySpellCorrectorJobCommand;
|
|
|
12
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
13
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
14
|
precalculatedPrice: zod_1.z.number(),
|
|
15
|
+
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
16
|
+
document: models_1.SpellCorrectorDocumentInputSchema.optional(),
|
|
15
17
|
mock: zod_1.z.boolean().optional(),
|
|
16
18
|
});
|
|
17
19
|
RetrySpellCorrectorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
@@ -13,11 +13,39 @@ export declare namespace SetReactionToSpellCorrectorJobCommand {
|
|
|
13
13
|
isSuccess: z.ZodBoolean;
|
|
14
14
|
data: z.ZodOptional<z.ZodType<{
|
|
15
15
|
uuid: string;
|
|
16
|
+
requestId: string | null;
|
|
17
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
18
|
+
sourceDocument: {
|
|
19
|
+
uuid: string;
|
|
20
|
+
url: string;
|
|
21
|
+
name: string;
|
|
22
|
+
mimeType: string;
|
|
23
|
+
type: string;
|
|
24
|
+
size: number;
|
|
25
|
+
extension: string;
|
|
26
|
+
} | null;
|
|
27
|
+
statistics: {
|
|
28
|
+
total: number;
|
|
29
|
+
spelling: number;
|
|
30
|
+
punctuation: number;
|
|
31
|
+
} | null;
|
|
32
|
+
outputDocument: {
|
|
33
|
+
uuid: string;
|
|
34
|
+
url: string;
|
|
35
|
+
name: string;
|
|
36
|
+
mimeType: string;
|
|
37
|
+
type: string;
|
|
38
|
+
size: number;
|
|
39
|
+
extension: string;
|
|
40
|
+
} | null;
|
|
16
41
|
userId: string | null;
|
|
17
42
|
unregisteredUserId: string | null;
|
|
18
43
|
userInput: string;
|
|
19
44
|
aiOutput: string | null;
|
|
20
45
|
aiTokenUsage: number | null;
|
|
46
|
+
wordsChanged: number | null;
|
|
47
|
+
lettersChanged: number | null;
|
|
48
|
+
editOperations: number | null;
|
|
21
49
|
price: number;
|
|
22
50
|
status: import("../..").JOB_STATUS;
|
|
23
51
|
title: string;
|
|
@@ -31,11 +59,39 @@ export declare namespace SetReactionToSpellCorrectorJobCommand {
|
|
|
31
59
|
completedAt: Date | null;
|
|
32
60
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
33
61
|
uuid: string;
|
|
62
|
+
requestId: string | null;
|
|
63
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
64
|
+
sourceDocument: {
|
|
65
|
+
uuid: string;
|
|
66
|
+
url: string;
|
|
67
|
+
name: string;
|
|
68
|
+
mimeType: string;
|
|
69
|
+
type: string;
|
|
70
|
+
size: number;
|
|
71
|
+
extension: string;
|
|
72
|
+
} | null;
|
|
73
|
+
statistics: {
|
|
74
|
+
total: number;
|
|
75
|
+
spelling: number;
|
|
76
|
+
punctuation: number;
|
|
77
|
+
} | null;
|
|
78
|
+
outputDocument: {
|
|
79
|
+
uuid: string;
|
|
80
|
+
url: string;
|
|
81
|
+
name: string;
|
|
82
|
+
mimeType: string;
|
|
83
|
+
type: string;
|
|
84
|
+
size: number;
|
|
85
|
+
extension: string;
|
|
86
|
+
} | null;
|
|
34
87
|
userId: string | null;
|
|
35
88
|
unregisteredUserId: string | null;
|
|
36
89
|
userInput: string;
|
|
37
90
|
aiOutput: string | null;
|
|
38
91
|
aiTokenUsage: number | null;
|
|
92
|
+
wordsChanged: number | null;
|
|
93
|
+
lettersChanged: number | null;
|
|
94
|
+
editOperations: number | null;
|
|
39
95
|
price: number;
|
|
40
96
|
status: import("../..").JOB_STATUS;
|
|
41
97
|
title: string;
|
|
@@ -3,10 +3,22 @@ export declare namespace SpellCorrectorCommand {
|
|
|
3
3
|
const RequestSchema: z.ZodObject<{
|
|
4
4
|
userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
5
|
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
-
|
|
6
|
+
requestId: z.ZodString;
|
|
7
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
8
|
+
document: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
uuid: z.ZodString;
|
|
10
|
+
url: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
mimeType: z.ZodString;
|
|
13
|
+
type: z.ZodString;
|
|
14
|
+
size: z.ZodNumber;
|
|
15
|
+
extension: z.ZodString;
|
|
16
|
+
content: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
7
18
|
modelId: z.ZodString;
|
|
8
19
|
tokenReservationId: z.ZodString;
|
|
9
20
|
precalculatedPrice: z.ZodNumber;
|
|
21
|
+
userHasActiveSubscriptionOrProduct: z.ZodBoolean;
|
|
10
22
|
mock: z.ZodOptional<z.ZodBoolean>;
|
|
11
23
|
}, z.core.$strip>;
|
|
12
24
|
type Request = z.infer<typeof RequestSchema>;
|
|
@@ -14,11 +26,39 @@ export declare namespace SpellCorrectorCommand {
|
|
|
14
26
|
isSuccess: z.ZodBoolean;
|
|
15
27
|
data: z.ZodOptional<z.ZodType<{
|
|
16
28
|
uuid: string;
|
|
29
|
+
requestId: string | null;
|
|
30
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
31
|
+
sourceDocument: {
|
|
32
|
+
uuid: string;
|
|
33
|
+
url: string;
|
|
34
|
+
name: string;
|
|
35
|
+
mimeType: string;
|
|
36
|
+
type: string;
|
|
37
|
+
size: number;
|
|
38
|
+
extension: string;
|
|
39
|
+
} | null;
|
|
40
|
+
statistics: {
|
|
41
|
+
total: number;
|
|
42
|
+
spelling: number;
|
|
43
|
+
punctuation: number;
|
|
44
|
+
} | null;
|
|
45
|
+
outputDocument: {
|
|
46
|
+
uuid: string;
|
|
47
|
+
url: string;
|
|
48
|
+
name: string;
|
|
49
|
+
mimeType: string;
|
|
50
|
+
type: string;
|
|
51
|
+
size: number;
|
|
52
|
+
extension: string;
|
|
53
|
+
} | null;
|
|
17
54
|
userId: string | null;
|
|
18
55
|
unregisteredUserId: string | null;
|
|
19
56
|
userInput: string;
|
|
20
57
|
aiOutput: string | null;
|
|
21
58
|
aiTokenUsage: number | null;
|
|
59
|
+
wordsChanged: number | null;
|
|
60
|
+
lettersChanged: number | null;
|
|
61
|
+
editOperations: number | null;
|
|
22
62
|
price: number;
|
|
23
63
|
status: import("../..").JOB_STATUS;
|
|
24
64
|
title: string;
|
|
@@ -32,11 +72,39 @@ export declare namespace SpellCorrectorCommand {
|
|
|
32
72
|
completedAt: Date | null;
|
|
33
73
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
34
74
|
uuid: string;
|
|
75
|
+
requestId: string | null;
|
|
76
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
77
|
+
sourceDocument: {
|
|
78
|
+
uuid: string;
|
|
79
|
+
url: string;
|
|
80
|
+
name: string;
|
|
81
|
+
mimeType: string;
|
|
82
|
+
type: string;
|
|
83
|
+
size: number;
|
|
84
|
+
extension: string;
|
|
85
|
+
} | null;
|
|
86
|
+
statistics: {
|
|
87
|
+
total: number;
|
|
88
|
+
spelling: number;
|
|
89
|
+
punctuation: number;
|
|
90
|
+
} | null;
|
|
91
|
+
outputDocument: {
|
|
92
|
+
uuid: string;
|
|
93
|
+
url: string;
|
|
94
|
+
name: string;
|
|
95
|
+
mimeType: string;
|
|
96
|
+
type: string;
|
|
97
|
+
size: number;
|
|
98
|
+
extension: string;
|
|
99
|
+
} | null;
|
|
35
100
|
userId: string | null;
|
|
36
101
|
unregisteredUserId: string | null;
|
|
37
102
|
userInput: string;
|
|
38
103
|
aiOutput: string | null;
|
|
39
104
|
aiTokenUsage: number | null;
|
|
105
|
+
wordsChanged: number | null;
|
|
106
|
+
lettersChanged: number | null;
|
|
107
|
+
editOperations: number | null;
|
|
40
108
|
price: number;
|
|
41
109
|
status: import("../..").JOB_STATUS;
|
|
42
110
|
title: string;
|
|
@@ -6,14 +6,21 @@ const command_response_schema_1 = require("../../common/models/command-response.
|
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
var SpellCorrectorCommand;
|
|
8
8
|
(function (SpellCorrectorCommand) {
|
|
9
|
-
SpellCorrectorCommand.RequestSchema = zod_1.z
|
|
9
|
+
SpellCorrectorCommand.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
10
11
|
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
12
|
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
-
|
|
13
|
+
requestId: zod_1.z.string().uuid(),
|
|
14
|
+
prompt: zod_1.z.string().optional(),
|
|
15
|
+
document: models_1.SpellCorrectorDocumentInputSchema.optional(),
|
|
13
16
|
modelId: zod_1.z.string().uuid(),
|
|
14
17
|
tokenReservationId: zod_1.z.string().uuid(),
|
|
15
18
|
precalculatedPrice: zod_1.z.number(),
|
|
19
|
+
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
16
20
|
mock: zod_1.z.boolean().optional(),
|
|
21
|
+
})
|
|
22
|
+
.refine((request) => (request.prompt !== undefined) !== (request.document !== undefined), {
|
|
23
|
+
message: 'Требуется ровно один из prompt или document',
|
|
17
24
|
});
|
|
18
25
|
SpellCorrectorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
19
26
|
})(SpellCorrectorCommand || (exports.SpellCorrectorCommand = SpellCorrectorCommand = {}));
|
|
@@ -11,11 +11,39 @@ export declare namespace UpdateSpellCorrectorJobFavoriteCommand {
|
|
|
11
11
|
isSuccess: z.ZodBoolean;
|
|
12
12
|
data: z.ZodOptional<z.ZodType<{
|
|
13
13
|
uuid: string;
|
|
14
|
+
requestId: string | null;
|
|
15
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
16
|
+
sourceDocument: {
|
|
17
|
+
uuid: string;
|
|
18
|
+
url: string;
|
|
19
|
+
name: string;
|
|
20
|
+
mimeType: string;
|
|
21
|
+
type: string;
|
|
22
|
+
size: number;
|
|
23
|
+
extension: string;
|
|
24
|
+
} | null;
|
|
25
|
+
statistics: {
|
|
26
|
+
total: number;
|
|
27
|
+
spelling: number;
|
|
28
|
+
punctuation: number;
|
|
29
|
+
} | null;
|
|
30
|
+
outputDocument: {
|
|
31
|
+
uuid: string;
|
|
32
|
+
url: string;
|
|
33
|
+
name: string;
|
|
34
|
+
mimeType: string;
|
|
35
|
+
type: string;
|
|
36
|
+
size: number;
|
|
37
|
+
extension: string;
|
|
38
|
+
} | null;
|
|
14
39
|
userId: string | null;
|
|
15
40
|
unregisteredUserId: string | null;
|
|
16
41
|
userInput: string;
|
|
17
42
|
aiOutput: string | null;
|
|
18
43
|
aiTokenUsage: number | null;
|
|
44
|
+
wordsChanged: number | null;
|
|
45
|
+
lettersChanged: number | null;
|
|
46
|
+
editOperations: number | null;
|
|
19
47
|
price: number;
|
|
20
48
|
status: import("../..").JOB_STATUS;
|
|
21
49
|
title: string;
|
|
@@ -29,11 +57,39 @@ export declare namespace UpdateSpellCorrectorJobFavoriteCommand {
|
|
|
29
57
|
completedAt: Date | null;
|
|
30
58
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
31
59
|
uuid: string;
|
|
60
|
+
requestId: string | null;
|
|
61
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
62
|
+
sourceDocument: {
|
|
63
|
+
uuid: string;
|
|
64
|
+
url: string;
|
|
65
|
+
name: string;
|
|
66
|
+
mimeType: string;
|
|
67
|
+
type: string;
|
|
68
|
+
size: number;
|
|
69
|
+
extension: string;
|
|
70
|
+
} | null;
|
|
71
|
+
statistics: {
|
|
72
|
+
total: number;
|
|
73
|
+
spelling: number;
|
|
74
|
+
punctuation: number;
|
|
75
|
+
} | null;
|
|
76
|
+
outputDocument: {
|
|
77
|
+
uuid: string;
|
|
78
|
+
url: string;
|
|
79
|
+
name: string;
|
|
80
|
+
mimeType: string;
|
|
81
|
+
type: string;
|
|
82
|
+
size: number;
|
|
83
|
+
extension: string;
|
|
84
|
+
} | null;
|
|
32
85
|
userId: string | null;
|
|
33
86
|
unregisteredUserId: string | null;
|
|
34
87
|
userInput: string;
|
|
35
88
|
aiOutput: string | null;
|
|
36
89
|
aiTokenUsage: number | null;
|
|
90
|
+
wordsChanged: number | null;
|
|
91
|
+
lettersChanged: number | null;
|
|
92
|
+
editOperations: number | null;
|
|
37
93
|
price: number;
|
|
38
94
|
status: import("../..").JOB_STATUS;
|
|
39
95
|
title: string;
|
|
@@ -11,11 +11,39 @@ export declare namespace UpdateSpellCorrectorJobTitleCommand {
|
|
|
11
11
|
isSuccess: z.ZodBoolean;
|
|
12
12
|
data: z.ZodOptional<z.ZodType<{
|
|
13
13
|
uuid: string;
|
|
14
|
+
requestId: string | null;
|
|
15
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
16
|
+
sourceDocument: {
|
|
17
|
+
uuid: string;
|
|
18
|
+
url: string;
|
|
19
|
+
name: string;
|
|
20
|
+
mimeType: string;
|
|
21
|
+
type: string;
|
|
22
|
+
size: number;
|
|
23
|
+
extension: string;
|
|
24
|
+
} | null;
|
|
25
|
+
statistics: {
|
|
26
|
+
total: number;
|
|
27
|
+
spelling: number;
|
|
28
|
+
punctuation: number;
|
|
29
|
+
} | null;
|
|
30
|
+
outputDocument: {
|
|
31
|
+
uuid: string;
|
|
32
|
+
url: string;
|
|
33
|
+
name: string;
|
|
34
|
+
mimeType: string;
|
|
35
|
+
type: string;
|
|
36
|
+
size: number;
|
|
37
|
+
extension: string;
|
|
38
|
+
} | null;
|
|
14
39
|
userId: string | null;
|
|
15
40
|
unregisteredUserId: string | null;
|
|
16
41
|
userInput: string;
|
|
17
42
|
aiOutput: string | null;
|
|
18
43
|
aiTokenUsage: number | null;
|
|
44
|
+
wordsChanged: number | null;
|
|
45
|
+
lettersChanged: number | null;
|
|
46
|
+
editOperations: number | null;
|
|
19
47
|
price: number;
|
|
20
48
|
status: import("../..").JOB_STATUS;
|
|
21
49
|
title: string;
|
|
@@ -29,11 +57,39 @@ export declare namespace UpdateSpellCorrectorJobTitleCommand {
|
|
|
29
57
|
completedAt: Date | null;
|
|
30
58
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
31
59
|
uuid: string;
|
|
60
|
+
requestId: string | null;
|
|
61
|
+
inputKind: import("..").SPELL_CORRECTOR_INPUT_KIND;
|
|
62
|
+
sourceDocument: {
|
|
63
|
+
uuid: string;
|
|
64
|
+
url: string;
|
|
65
|
+
name: string;
|
|
66
|
+
mimeType: string;
|
|
67
|
+
type: string;
|
|
68
|
+
size: number;
|
|
69
|
+
extension: string;
|
|
70
|
+
} | null;
|
|
71
|
+
statistics: {
|
|
72
|
+
total: number;
|
|
73
|
+
spelling: number;
|
|
74
|
+
punctuation: number;
|
|
75
|
+
} | null;
|
|
76
|
+
outputDocument: {
|
|
77
|
+
uuid: string;
|
|
78
|
+
url: string;
|
|
79
|
+
name: string;
|
|
80
|
+
mimeType: string;
|
|
81
|
+
type: string;
|
|
82
|
+
size: number;
|
|
83
|
+
extension: string;
|
|
84
|
+
} | null;
|
|
32
85
|
userId: string | null;
|
|
33
86
|
unregisteredUserId: string | null;
|
|
34
87
|
userInput: string;
|
|
35
88
|
aiOutput: string | null;
|
|
36
89
|
aiTokenUsage: number | null;
|
|
90
|
+
wordsChanged: number | null;
|
|
91
|
+
lettersChanged: number | null;
|
|
92
|
+
editOperations: number | null;
|
|
37
93
|
price: number;
|
|
38
94
|
status: import("../..").JOB_STATUS;
|
|
39
95
|
title: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spell-corrector-errors.constant';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./spell-corrector-errors.constant"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const SPELL_CORRECTOR_ERRORS: {
|
|
2
|
+
readonly EMPTY_CONTENT: {
|
|
3
|
+
readonly code: 'SPELL_CORRECTOR.EMPTY_CONTENT';
|
|
4
|
+
readonly httpCode: 400;
|
|
5
|
+
readonly message: 'Содержимое для исправления не должно быть пустым';
|
|
6
|
+
};
|
|
7
|
+
readonly FREE_LIMIT_EXCEEDED: {
|
|
8
|
+
readonly code: 'SPELL_CORRECTOR.FREE_LIMIT_EXCEEDED';
|
|
9
|
+
readonly httpCode: 400;
|
|
10
|
+
readonly message: 'Без платного доступа можно проверить не более 10000 символов';
|
|
11
|
+
};
|
|
12
|
+
readonly MAX_LIMIT_EXCEEDED: {
|
|
13
|
+
readonly code: 'SPELL_CORRECTOR.MAX_LIMIT_EXCEEDED';
|
|
14
|
+
readonly httpCode: 400;
|
|
15
|
+
readonly message: 'Можно проверить не более 100000 символов';
|
|
16
|
+
};
|
|
17
|
+
readonly DOCUMENT_ACCESS_REQUIRED: {
|
|
18
|
+
readonly code: 'SPELL_CORRECTOR.DOCUMENT_ACCESS_REQUIRED';
|
|
19
|
+
readonly httpCode: 403;
|
|
20
|
+
readonly message: 'Проверка документа доступна только при подтвержденном платном доступе';
|
|
21
|
+
};
|
|
22
|
+
readonly DOCUMENT_SOURCE_REQUIRED: {
|
|
23
|
+
readonly code: 'SPELL_CORRECTOR.DOCUMENT_SOURCE_REQUIRED';
|
|
24
|
+
readonly httpCode: 400;
|
|
25
|
+
readonly message: 'Для повторной проверки требуется актуальный подготовленный документ';
|
|
26
|
+
};
|
|
27
|
+
readonly DOCUMENT_SOURCE_MISMATCH: {
|
|
28
|
+
readonly code: 'SPELL_CORRECTOR.DOCUMENT_SOURCE_MISMATCH';
|
|
29
|
+
readonly httpCode: 400;
|
|
30
|
+
readonly message: 'Подготовленный документ не соответствует исходному документу задания';
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SPELL_CORRECTOR_ERRORS = void 0;
|
|
4
|
+
exports.SPELL_CORRECTOR_ERRORS = {
|
|
5
|
+
EMPTY_CONTENT: {
|
|
6
|
+
code: 'SPELL_CORRECTOR.EMPTY_CONTENT',
|
|
7
|
+
httpCode: 400,
|
|
8
|
+
message: 'Содержимое для исправления не должно быть пустым',
|
|
9
|
+
},
|
|
10
|
+
FREE_LIMIT_EXCEEDED: {
|
|
11
|
+
code: 'SPELL_CORRECTOR.FREE_LIMIT_EXCEEDED',
|
|
12
|
+
httpCode: 400,
|
|
13
|
+
message: 'Без платного доступа можно проверить не более 10000 символов',
|
|
14
|
+
},
|
|
15
|
+
MAX_LIMIT_EXCEEDED: {
|
|
16
|
+
code: 'SPELL_CORRECTOR.MAX_LIMIT_EXCEEDED',
|
|
17
|
+
httpCode: 400,
|
|
18
|
+
message: 'Можно проверить не более 100000 символов',
|
|
19
|
+
},
|
|
20
|
+
DOCUMENT_ACCESS_REQUIRED: {
|
|
21
|
+
code: 'SPELL_CORRECTOR.DOCUMENT_ACCESS_REQUIRED',
|
|
22
|
+
httpCode: 403,
|
|
23
|
+
message: 'Проверка документа доступна только при подтвержденном платном доступе',
|
|
24
|
+
},
|
|
25
|
+
DOCUMENT_SOURCE_REQUIRED: {
|
|
26
|
+
code: 'SPELL_CORRECTOR.DOCUMENT_SOURCE_REQUIRED',
|
|
27
|
+
httpCode: 400,
|
|
28
|
+
message: 'Для повторной проверки требуется актуальный подготовленный документ',
|
|
29
|
+
},
|
|
30
|
+
DOCUMENT_SOURCE_MISMATCH: {
|
|
31
|
+
code: 'SPELL_CORRECTOR.DOCUMENT_SOURCE_MISMATCH',
|
|
32
|
+
httpCode: 400,
|
|
33
|
+
message: 'Подготовленный документ не соответствует исходному документу задания',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spell-corrector-input-kind.enum';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./spell-corrector-input-kind.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SPELL_CORRECTOR_INPUT_KIND = void 0;
|
|
4
|
+
var SPELL_CORRECTOR_INPUT_KIND;
|
|
5
|
+
(function (SPELL_CORRECTOR_INPUT_KIND) {
|
|
6
|
+
SPELL_CORRECTOR_INPUT_KIND["TEXT"] = "text";
|
|
7
|
+
SPELL_CORRECTOR_INPUT_KIND["DOCUMENT"] = "document";
|
|
8
|
+
})(SPELL_CORRECTOR_INPUT_KIND || (exports.SPELL_CORRECTOR_INPUT_KIND = SPELL_CORRECTOR_INPUT_KIND = {}));
|
|
@@ -18,3 +18,5 @@ __exportStar(require("./routes"), exports);
|
|
|
18
18
|
__exportStar(require("./commands"), exports);
|
|
19
19
|
__exportStar(require("./models"), exports);
|
|
20
20
|
__exportStar(require("./queries"), exports);
|
|
21
|
+
__exportStar(require("./constants"), exports);
|
|
22
|
+
__exportStar(require("./enums"), exports);
|
|
@@ -17,3 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./spell-corrector-model.schema"), exports);
|
|
18
18
|
__exportStar(require("./spell-corrector-job.schema"), exports);
|
|
19
19
|
__exportStar(require("./spell-corrector-tool-config.schema"), exports);
|
|
20
|
+
__exportStar(require("./spell-corrector-document.schema"), exports);
|
|
21
|
+
__exportStar(require("./spell-corrector-correction-statistics.schema"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SpellCorrectorCorrectionStatisticsSchema: z.ZodObject<{
|
|
3
|
+
total: z.ZodNumber;
|
|
4
|
+
spelling: z.ZodNumber;
|
|
5
|
+
punctuation: z.ZodNumber;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type SpellCorrectorCorrectionStatistics = z.infer<typeof SpellCorrectorCorrectionStatisticsSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorCorrectionStatisticsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.SpellCorrectorCorrectionStatisticsSchema = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
8
|
+
spelling: zod_1.z.number().int().nonnegative(),
|
|
9
|
+
punctuation: zod_1.z.number().int().nonnegative(),
|
|
10
|
+
})
|
|
11
|
+
.refine((statistics) => statistics.total === statistics.spelling + statistics.punctuation, {
|
|
12
|
+
message: 'total must equal spelling + punctuation',
|
|
13
|
+
});
|