@lokalise/polyglot-sdk 12.7.0 → 13.0.0
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/dist/index.d.ts +5 -4
- package/dist/index.js +9 -17
- package/dist/index.js.map +1 -1
- package/dist/sdk/PolyglotClient.d.ts +4 -4
- package/dist/sdk/PolyglotClient.js +6 -5
- package/dist/sdk/PolyglotClient.js.map +1 -1
- package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +6 -3
- package/dist/sdk/schemas/common/asyncRequestSchemas.js +5 -2
- package/dist/sdk/schemas/common/asyncRequestSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/commonSchemas.d.ts +22 -0
- package/dist/sdk/schemas/common/commonSchemas.js +6 -1
- package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/errorSchemas.d.ts +85 -0
- package/dist/sdk/schemas/common/errorSchemas.js +29 -0
- package/dist/sdk/schemas/common/errorSchemas.js.map +1 -0
- package/dist/sdk/schemas/lqa/{lqaAsyncV1Schemas.d.ts → lqaAsyncSchemas.d.ts} +265 -11
- package/dist/sdk/schemas/lqa/{lqaAsyncV1Schemas.js → lqaAsyncSchemas.js} +12 -8
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -0
- package/dist/sdk/schemas/translation/{translateAsyncV2Schemas.d.ts → translateAsyncSchemas.d.ts} +255 -17
- package/dist/sdk/schemas/translation/{translateAsyncV2Schemas.js → translateAsyncSchemas.js} +26 -17
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -0
- package/dist/sdk/schemas/translation/translateSyncV2Schemas.d.ts +4 -4
- package/package.json +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncV1Schemas.js.map +0 -1
- package/dist/sdk/schemas/translation/translateAsyncV2Schemas.js.map +0 -1
|
@@ -196,10 +196,9 @@ declare const LQA_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
|
196
196
|
} | undefined;
|
|
197
197
|
characterLimit?: number | undefined;
|
|
198
198
|
}>;
|
|
199
|
-
export declare const
|
|
199
|
+
export declare const LQA_ASYNC_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
|
|
200
200
|
originCorrelationId: z.ZodString;
|
|
201
201
|
ownerId: z.ZodString;
|
|
202
|
-
tenantId: z.ZodOptional<z.ZodString>;
|
|
203
202
|
callbackUrl: z.ZodString;
|
|
204
203
|
callbackToken: z.ZodString;
|
|
205
204
|
}, {
|
|
@@ -577,7 +576,6 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
577
576
|
} | undefined;
|
|
578
577
|
characterLimit?: number | undefined;
|
|
579
578
|
}[]];
|
|
580
|
-
tenantId?: string | undefined;
|
|
581
579
|
context?: {
|
|
582
580
|
description?: string | undefined;
|
|
583
581
|
styleGuide?: {
|
|
@@ -684,7 +682,6 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
684
682
|
} | undefined;
|
|
685
683
|
characterLimit?: number | undefined;
|
|
686
684
|
}[]];
|
|
687
|
-
tenantId?: string | undefined;
|
|
688
685
|
context?: {
|
|
689
686
|
description?: string | undefined;
|
|
690
687
|
styleGuide?: {
|
|
@@ -711,14 +708,14 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
|
|
|
711
708
|
} | undefined;
|
|
712
709
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
713
710
|
}>;
|
|
714
|
-
export declare const
|
|
711
|
+
export declare const LQA_ASYNC_HEADERS_SCHEMA: z.ZodObject<{
|
|
715
712
|
'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
716
713
|
}, "strip", z.ZodTypeAny, {
|
|
717
714
|
'x-fake-processing'?: boolean | undefined;
|
|
718
715
|
}, {
|
|
719
716
|
'x-fake-processing'?: unknown;
|
|
720
717
|
}>;
|
|
721
|
-
export declare const
|
|
718
|
+
export declare const LQA_ASYNC_RESPONSE_SCHEMA: z.ZodObject<{
|
|
722
719
|
requestId: z.ZodString;
|
|
723
720
|
expectedAt: z.ZodString;
|
|
724
721
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -842,10 +839,267 @@ export declare const LQA_ASYNC_V1_CALLBACK_SCHEMA: z.ZodObject<{
|
|
|
842
839
|
details?: Record<string, unknown> | undefined;
|
|
843
840
|
}[] | undefined;
|
|
844
841
|
}>;
|
|
845
|
-
export
|
|
846
|
-
|
|
847
|
-
|
|
842
|
+
export declare const LQA_ASYNC_SUCCESS_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
|
|
843
|
+
originCorrelationId: z.ZodString;
|
|
844
|
+
data: z.ZodArray<z.ZodObject<{
|
|
845
|
+
contentUnitId: z.ZodString;
|
|
846
|
+
translationId: z.ZodString;
|
|
847
|
+
suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
848
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
849
|
+
category: z.ZodNativeEnum<{
|
|
850
|
+
readonly ACCURACY: "accuracy";
|
|
851
|
+
readonly FLUENCY: "fluency";
|
|
852
|
+
readonly TERMINOLOGY: "terminology";
|
|
853
|
+
readonly LOCALE_CONVENTION: "locale convention";
|
|
854
|
+
readonly STYLE: "style";
|
|
855
|
+
readonly CONSISTENCY: "consistency";
|
|
856
|
+
readonly COHERENCE: "coherence";
|
|
857
|
+
readonly DESIGN: "design";
|
|
858
|
+
readonly MARKUP: "markup";
|
|
859
|
+
readonly INTERNATIONALIZATION: "internationalization";
|
|
860
|
+
readonly VERITY: "verity";
|
|
861
|
+
}>;
|
|
862
|
+
severity: z.ZodNativeEnum<{
|
|
863
|
+
readonly NEUTRAL: "neutral";
|
|
864
|
+
readonly MINOR: "minor";
|
|
865
|
+
readonly MAJOR: "major";
|
|
866
|
+
readonly CRITICAL: "critical";
|
|
867
|
+
}>;
|
|
868
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
869
|
+
}, "strip", z.ZodTypeAny, {
|
|
870
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
871
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
872
|
+
comment?: string | null | undefined;
|
|
873
|
+
}, {
|
|
874
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
875
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
876
|
+
comment?: string | null | undefined;
|
|
877
|
+
}>, "many">;
|
|
878
|
+
}, "strip", z.ZodTypeAny, {
|
|
879
|
+
contentUnitId: string;
|
|
880
|
+
translationId: string;
|
|
881
|
+
issues: {
|
|
882
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
883
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
884
|
+
comment?: string | null | undefined;
|
|
885
|
+
}[];
|
|
886
|
+
suggestion?: string | null | undefined;
|
|
887
|
+
}, {
|
|
888
|
+
contentUnitId: string;
|
|
889
|
+
translationId: string;
|
|
890
|
+
issues: {
|
|
891
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
892
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
893
|
+
comment?: string | null | undefined;
|
|
894
|
+
}[];
|
|
895
|
+
suggestion?: string | null | undefined;
|
|
896
|
+
}>, "many">;
|
|
897
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
898
|
+
message: z.ZodString;
|
|
899
|
+
errorCode: z.ZodString;
|
|
900
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
901
|
+
}, {
|
|
902
|
+
contentUnitId: z.ZodString;
|
|
903
|
+
translationId: z.ZodString;
|
|
904
|
+
}>, "strip", z.ZodTypeAny, {
|
|
905
|
+
message: string;
|
|
906
|
+
errorCode: string;
|
|
907
|
+
contentUnitId: string;
|
|
908
|
+
translationId: string;
|
|
909
|
+
details?: Record<string, unknown> | undefined;
|
|
910
|
+
}, {
|
|
911
|
+
message: string;
|
|
912
|
+
errorCode: string;
|
|
913
|
+
contentUnitId: string;
|
|
914
|
+
translationId: string;
|
|
915
|
+
details?: Record<string, unknown> | undefined;
|
|
916
|
+
}>, "many">>;
|
|
917
|
+
}, {
|
|
918
|
+
status: z.ZodLiteral<"success">;
|
|
919
|
+
}>, "strip", z.ZodTypeAny, {
|
|
920
|
+
originCorrelationId: string;
|
|
921
|
+
status: "success";
|
|
922
|
+
data: {
|
|
923
|
+
contentUnitId: string;
|
|
924
|
+
translationId: string;
|
|
925
|
+
issues: {
|
|
926
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
927
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
928
|
+
comment?: string | null | undefined;
|
|
929
|
+
}[];
|
|
930
|
+
suggestion?: string | null | undefined;
|
|
931
|
+
}[];
|
|
932
|
+
errors?: {
|
|
933
|
+
message: string;
|
|
934
|
+
errorCode: string;
|
|
935
|
+
contentUnitId: string;
|
|
936
|
+
translationId: string;
|
|
937
|
+
details?: Record<string, unknown> | undefined;
|
|
938
|
+
}[] | undefined;
|
|
939
|
+
}, {
|
|
940
|
+
originCorrelationId: string;
|
|
941
|
+
status: "success";
|
|
942
|
+
data: {
|
|
943
|
+
contentUnitId: string;
|
|
944
|
+
translationId: string;
|
|
945
|
+
issues: {
|
|
946
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
947
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
948
|
+
comment?: string | null | undefined;
|
|
949
|
+
}[];
|
|
950
|
+
suggestion?: string | null | undefined;
|
|
951
|
+
}[];
|
|
952
|
+
errors?: {
|
|
953
|
+
message: string;
|
|
954
|
+
errorCode: string;
|
|
955
|
+
contentUnitId: string;
|
|
956
|
+
translationId: string;
|
|
957
|
+
details?: Record<string, unknown> | undefined;
|
|
958
|
+
}[] | undefined;
|
|
959
|
+
}>;
|
|
960
|
+
export declare const LQA_ASYNC_CALLBACK_SCHEMA: z.ZodDiscriminatedUnion<"status", [z.ZodObject<z.objectUtil.extendShape<{
|
|
961
|
+
originCorrelationId: z.ZodString;
|
|
962
|
+
data: z.ZodArray<z.ZodObject<{
|
|
963
|
+
contentUnitId: z.ZodString;
|
|
964
|
+
translationId: z.ZodString;
|
|
965
|
+
suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
966
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
967
|
+
category: z.ZodNativeEnum<{
|
|
968
|
+
readonly ACCURACY: "accuracy";
|
|
969
|
+
readonly FLUENCY: "fluency";
|
|
970
|
+
readonly TERMINOLOGY: "terminology";
|
|
971
|
+
readonly LOCALE_CONVENTION: "locale convention";
|
|
972
|
+
readonly STYLE: "style";
|
|
973
|
+
readonly CONSISTENCY: "consistency";
|
|
974
|
+
readonly COHERENCE: "coherence";
|
|
975
|
+
readonly DESIGN: "design";
|
|
976
|
+
readonly MARKUP: "markup";
|
|
977
|
+
readonly INTERNATIONALIZATION: "internationalization";
|
|
978
|
+
readonly VERITY: "verity";
|
|
979
|
+
}>;
|
|
980
|
+
severity: z.ZodNativeEnum<{
|
|
981
|
+
readonly NEUTRAL: "neutral";
|
|
982
|
+
readonly MINOR: "minor";
|
|
983
|
+
readonly MAJOR: "major";
|
|
984
|
+
readonly CRITICAL: "critical";
|
|
985
|
+
}>;
|
|
986
|
+
comment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
987
|
+
}, "strip", z.ZodTypeAny, {
|
|
988
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
989
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
990
|
+
comment?: string | null | undefined;
|
|
991
|
+
}, {
|
|
992
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
993
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
994
|
+
comment?: string | null | undefined;
|
|
995
|
+
}>, "many">;
|
|
996
|
+
}, "strip", z.ZodTypeAny, {
|
|
997
|
+
contentUnitId: string;
|
|
998
|
+
translationId: string;
|
|
999
|
+
issues: {
|
|
1000
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
1001
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
1002
|
+
comment?: string | null | undefined;
|
|
1003
|
+
}[];
|
|
1004
|
+
suggestion?: string | null | undefined;
|
|
1005
|
+
}, {
|
|
1006
|
+
contentUnitId: string;
|
|
1007
|
+
translationId: string;
|
|
1008
|
+
issues: {
|
|
1009
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
1010
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
1011
|
+
comment?: string | null | undefined;
|
|
1012
|
+
}[];
|
|
1013
|
+
suggestion?: string | null | undefined;
|
|
1014
|
+
}>, "many">;
|
|
1015
|
+
errors: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
1016
|
+
message: z.ZodString;
|
|
1017
|
+
errorCode: z.ZodString;
|
|
1018
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1019
|
+
}, {
|
|
1020
|
+
contentUnitId: z.ZodString;
|
|
1021
|
+
translationId: z.ZodString;
|
|
1022
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1023
|
+
message: string;
|
|
1024
|
+
errorCode: string;
|
|
1025
|
+
contentUnitId: string;
|
|
1026
|
+
translationId: string;
|
|
1027
|
+
details?: Record<string, unknown> | undefined;
|
|
1028
|
+
}, {
|
|
1029
|
+
message: string;
|
|
1030
|
+
errorCode: string;
|
|
1031
|
+
contentUnitId: string;
|
|
1032
|
+
translationId: string;
|
|
1033
|
+
details?: Record<string, unknown> | undefined;
|
|
1034
|
+
}>, "many">>;
|
|
1035
|
+
}, {
|
|
1036
|
+
status: z.ZodLiteral<"success">;
|
|
1037
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1038
|
+
originCorrelationId: string;
|
|
1039
|
+
status: "success";
|
|
1040
|
+
data: {
|
|
1041
|
+
contentUnitId: string;
|
|
1042
|
+
translationId: string;
|
|
1043
|
+
issues: {
|
|
1044
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
1045
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
1046
|
+
comment?: string | null | undefined;
|
|
1047
|
+
}[];
|
|
1048
|
+
suggestion?: string | null | undefined;
|
|
1049
|
+
}[];
|
|
1050
|
+
errors?: {
|
|
1051
|
+
message: string;
|
|
1052
|
+
errorCode: string;
|
|
1053
|
+
contentUnitId: string;
|
|
1054
|
+
translationId: string;
|
|
1055
|
+
details?: Record<string, unknown> | undefined;
|
|
1056
|
+
}[] | undefined;
|
|
1057
|
+
}, {
|
|
1058
|
+
originCorrelationId: string;
|
|
1059
|
+
status: "success";
|
|
1060
|
+
data: {
|
|
1061
|
+
contentUnitId: string;
|
|
1062
|
+
translationId: string;
|
|
1063
|
+
issues: {
|
|
1064
|
+
category: "accuracy" | "fluency" | "terminology" | "locale convention" | "style" | "consistency" | "coherence" | "design" | "markup" | "internationalization" | "verity";
|
|
1065
|
+
severity: "neutral" | "minor" | "major" | "critical";
|
|
1066
|
+
comment?: string | null | undefined;
|
|
1067
|
+
}[];
|
|
1068
|
+
suggestion?: string | null | undefined;
|
|
1069
|
+
}[];
|
|
1070
|
+
errors?: {
|
|
1071
|
+
message: string;
|
|
1072
|
+
errorCode: string;
|
|
1073
|
+
contentUnitId: string;
|
|
1074
|
+
translationId: string;
|
|
1075
|
+
details?: Record<string, unknown> | undefined;
|
|
1076
|
+
}[] | undefined;
|
|
1077
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
1078
|
+
message: z.ZodString;
|
|
1079
|
+
errorCode: z.ZodString;
|
|
1080
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1081
|
+
}, {
|
|
1082
|
+
status: z.ZodLiteral<"error">;
|
|
1083
|
+
originCorrelationId: z.ZodString;
|
|
1084
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1085
|
+
originCorrelationId: string;
|
|
1086
|
+
message: string;
|
|
1087
|
+
status: "error";
|
|
1088
|
+
errorCode: string;
|
|
1089
|
+
details?: Record<string, unknown> | undefined;
|
|
1090
|
+
}, {
|
|
1091
|
+
originCorrelationId: string;
|
|
1092
|
+
message: string;
|
|
1093
|
+
status: "error";
|
|
1094
|
+
errorCode: string;
|
|
1095
|
+
details?: Record<string, unknown> | undefined;
|
|
1096
|
+
}>]>;
|
|
1097
|
+
export type LqaAsyncBody = z.infer<typeof LQA_ASYNC_BODY_SCHEMA>;
|
|
1098
|
+
export type LqaAsyncHeaders = z.infer<typeof LQA_ASYNC_HEADERS_SCHEMA>;
|
|
1099
|
+
export type LqaAsyncResponse = z.infer<typeof LQA_ASYNC_RESPONSE_SCHEMA>;
|
|
848
1100
|
export type LqaAsyncV1CallbackBody = z.infer<typeof LQA_ASYNC_V1_CALLBACK_SCHEMA>;
|
|
849
|
-
export type
|
|
850
|
-
export type
|
|
1101
|
+
export type LqaAsyncSuccess = z.infer<typeof LQA_ASYNC_SUCCESS_SCHEMA>;
|
|
1102
|
+
export type LqaAsyncCallbackBody = z.infer<typeof LQA_ASYNC_CALLBACK_SCHEMA>;
|
|
1103
|
+
export type LqaAsyncContentUnit = z.infer<typeof LQA_CONTENT_UNIT_SCHEMA>;
|
|
1104
|
+
export type LqaAsyncSegment = z.infer<typeof LQA_SEGMENT_SCHEMA>;
|
|
851
1105
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LQA_ASYNC_V1_CALLBACK_SCHEMA = exports.
|
|
3
|
+
exports.LQA_ASYNC_CALLBACK_SCHEMA = exports.LQA_ASYNC_SUCCESS_SCHEMA = exports.LQA_ASYNC_V1_CALLBACK_SCHEMA = exports.LQA_ASYNC_RESPONSE_SCHEMA = exports.LQA_ASYNC_HEADERS_SCHEMA = exports.LQA_ASYNC_BODY_SCHEMA = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const zod_1 = tslib_1.__importDefault(require("zod"));
|
|
6
6
|
const asyncRequestSchemas_1 = require("../common/asyncRequestSchemas");
|
|
@@ -55,7 +55,7 @@ const LQA_CONTENT_UNIT_SCHEMA = zod_1.default.object({
|
|
|
55
55
|
.describe('List of segments to be reviewed'),
|
|
56
56
|
characterLimit: zod_1.default.number().optional(),
|
|
57
57
|
});
|
|
58
|
-
exports.
|
|
58
|
+
exports.LQA_ASYNC_BODY_SCHEMA = asyncRequestSchemas_1.ASYNC_REQUEST_SCHEMA.extend({
|
|
59
59
|
sourceLocale: commonSchemas_1.LOCALE_SCHEMA,
|
|
60
60
|
integration: commonSchemas_1.AI_INTEGRATION_ENGINE_SCHEMA.optional(),
|
|
61
61
|
context: translationContextSchemas_1.TRANSLATION_CONTEXT_SCHEMA.optional(),
|
|
@@ -65,15 +65,14 @@ exports.LQA_ASYNC_V1_BODY_SCHEMA = asyncRequestSchemas_1.ASYNC_REQUEST_SCHEMA.ex
|
|
|
65
65
|
.max(LQA_CONTENT_UNITS_MAX_LENGTH)
|
|
66
66
|
.describe('A list of content units to be reviewed. Each unit might have 1 or more segments, but all segments in content unit are considered to be parts of the same piece of content.'),
|
|
67
67
|
});
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
68
|
+
exports.LQA_ASYNC_HEADERS_SCHEMA = commonSchemas_1.COMMON_REQUEST_HEADERS_SCHEMA;
|
|
69
|
+
exports.LQA_ASYNC_RESPONSE_SCHEMA = zod_1.default
|
|
70
70
|
.object({
|
|
71
71
|
requestId: zod_1.default.string().uuid(),
|
|
72
72
|
expectedAt: zod_1.default.string().datetime(),
|
|
73
73
|
})
|
|
74
74
|
.describe('Accepted for processing. Await the callback for the results.');
|
|
75
|
-
exports.LQA_ASYNC_V1_CALLBACK_SCHEMA = zod_1.default
|
|
76
|
-
.object({
|
|
75
|
+
exports.LQA_ASYNC_V1_CALLBACK_SCHEMA = zod_1.default.object({
|
|
77
76
|
originCorrelationId: zod_1.default.string(),
|
|
78
77
|
data: zod_1.default.array(zod_1.default.object({
|
|
79
78
|
contentUnitId: LQA_CONTENT_UNIT_ID_SCHEMA,
|
|
@@ -91,6 +90,11 @@ exports.LQA_ASYNC_V1_CALLBACK_SCHEMA = zod_1.default
|
|
|
91
90
|
translationId: LQA_TRANSLATION_ID_SCHEMA,
|
|
92
91
|
}))
|
|
93
92
|
.optional(),
|
|
94
|
-
})
|
|
93
|
+
});
|
|
94
|
+
exports.LQA_ASYNC_SUCCESS_SCHEMA = exports.LQA_ASYNC_V1_CALLBACK_SCHEMA.extend({
|
|
95
|
+
status: zod_1.default.literal(asyncRequestSchemas_1.AsyncRequestCallbackStatusEnum.SUCCESS),
|
|
96
|
+
});
|
|
97
|
+
exports.LQA_ASYNC_CALLBACK_SCHEMA = zod_1.default
|
|
98
|
+
.discriminatedUnion('status', [exports.LQA_ASYNC_SUCCESS_SCHEMA, commonSchemas_1.COMMON_FAILED_OPERATION_CALLBACK_SCHEMA])
|
|
95
99
|
.describe('Callback with results.');
|
|
96
|
-
//# sourceMappingURL=
|
|
100
|
+
//# sourceMappingURL=lqaAsyncSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lqaAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/lqa/lqaAsyncSchemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;AAEnB,uEAAoG;AACpG,2DAOgC;AAChC,mFAAgF;AAEhF,kGAGuD;AACvD,mDAA4E;AAE5E,MAAM,mCAAmC,GAAG,EAAE,CAAA;AAC9C,MAAM,uCAAuC,GAAG,GAAG,CAAA;AACnD,MAAM,oCAAoC,GAAG,GAAG,CAAA;AAChD,MAAM,4BAA4B,GAAG,EAAE,CAAA;AAEvC,MAAM,yBAAyB,GAAG,aAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC,CAAA;AAEpG,MAAM,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,yBAAyB;IAC7B,MAAM,EAAE,6BAAa;IACrB,KAAK,EAAE,aAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,6DAA6B,EAAC,KAAK,CAAC,EAC/C,6CAA6C,wDAAwB,aAAa,CACnF;SACA,QAAQ,CAAC,gDAAgD,CAAC;CAC9D,CAAC,CAAA;AAEF,MAAM,kBAAkB,GAAG,aAAC,CAAC,MAAM,CAAC;IAClC,WAAW,EAAE,aAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,6DAA6B,EAAC,KAAK,CAAC,EAC/C,yCAAyC,wDAAwB,aAAa,CAC/E;SACA,QAAQ,CAAC,gDAAgD,CAAC;IAC7D,YAAY,EAAE,aAAC;SACZ,KAAK,CAAC,sBAAsB,CAA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