@lokalise/polyglot-sdk 19.1.0 → 20.0.1

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 (46) hide show
  1. package/dist/index.d.ts +22 -22
  2. package/dist/index.js +20 -20
  3. package/dist/index.js.map +1 -1
  4. package/dist/sdk/PolyglotClient.d.ts +7 -7
  5. package/dist/sdk/PolyglotClient.js +6 -6
  6. package/dist/sdk/helpers/htmlEscaping.d.ts +1 -1
  7. package/dist/sdk/helpers/htmlEscaping.js +2 -2
  8. package/dist/sdk/helpers/nonTranslatableContentHelper.d.ts +1 -1
  9. package/dist/sdk/helpers/nonTranslatableContentHelper.js +1 -1
  10. package/dist/sdk/helpers/nonTranslatableContentWrappers.d.ts +1 -1
  11. package/dist/sdk/helpers/nonTranslatableContentWrappers.js +2 -2
  12. package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +1 -1
  13. package/dist/sdk/schemas/common/commonSchemas.d.ts +38 -21
  14. package/dist/sdk/schemas/common/commonSchemas.js +24 -5
  15. package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
  16. package/dist/sdk/schemas/common/errorSchemas.d.ts +16 -21
  17. package/dist/sdk/schemas/common/errorSchemas.js +1 -1
  18. package/dist/sdk/schemas/common/translationContextSchemas.d.ts +32 -43
  19. package/dist/sdk/schemas/common/translationContextSchemas.js +4 -6
  20. package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
  21. package/dist/sdk/schemas/lqa/commonSchemas.d.ts +1 -1
  22. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +122 -101
  23. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +10 -7
  24. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
  25. package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +105 -94
  26. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +9 -6
  27. package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
  28. package/dist/sdk/schemas/translation/generateVariants.d.ts +68 -67
  29. package/dist/sdk/schemas/translation/generateVariants.js +3 -3
  30. package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +172 -170
  31. package/dist/sdk/schemas/translation/rewriteTextSchemas.js +4 -4
  32. package/dist/sdk/schemas/translation/sharedSchemas.d.ts +321 -8
  33. package/dist/sdk/schemas/translation/sharedSchemas.js +43 -5
  34. package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
  35. package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +419 -154
  36. package/dist/sdk/schemas/translation/translateAsyncSchemas.js +5 -5
  37. package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +333 -100
  38. package/dist/sdk/schemas/translation/translateSyncSchemas.js +4 -4
  39. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +429 -81
  40. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +27 -9
  41. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
  42. package/dist/sdk/validation/isSegmentUnderLengthLimit.d.ts +1 -1
  43. package/dist/sdk/validation/isSegmentUnderLengthLimit.js +3 -3
  44. package/dist/sdk/validation/requestSizeLimit.d.ts +2 -2
  45. package/dist/sdk/validation/requestSizeLimit.js +2 -2
  46. package/package.json +13 -13
package/dist/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- export { PolyglotClient } from './sdk/PolyglotClient.js';
2
- export { PolyglotError } from './sdk/errors/PolyglotError.js';
3
- export type { ClientOptions, PolyglotClientConfig } from './sdk/types/client.js';
4
- export * from './sdk/schemas/common/asyncRequestSchemas.js';
5
- export * from './sdk/schemas/common/commonSchemas.js';
6
- export * from './sdk/schemas/common/errorSchemas.js';
7
- export { TRANSLATION_CONTEXT_SCHEMA, isStructuredStyleGuide, } from './sdk/schemas/common/translationContextSchemas.js';
8
- export type { StructuredStyleGuide, FreeformStyleGuide, StyleGuideData, GlossaryTerm, TranslationContext, TextRewritingContext, TranslationExample, } from './sdk/schemas/common/translationContextSchemas.js';
9
- export { LqaIssueSeverityEnum } from './sdk/schemas/lqa/commonSchemas.js';
10
- export * from './sdk/schemas/lqa/lqaAsyncSchemas.js';
11
- export * from './sdk/schemas/lqa/lqaSyncSchemas.js';
12
- export * from './sdk/schemas/translation/generateVariants.js';
13
- export * from './sdk/schemas/translation/rewriteTextSchemas.js';
14
- export * from './sdk/schemas/translation/translateSyncSchemas.js';
15
- export * from './sdk/schemas/translation/translateAsyncSchemas.js';
16
- export * from './sdk/schemas/translation/translateTextSegmentSchemas.js';
17
- export * from './sdk/schemas/translation/sharedSchemas.js';
18
- export { isSegmentUnderLengthLimit, isSegmentUnderLengthLimit as isSegmentExceedingLengthLimit, } from './sdk/validation/isSegmentUnderLengthLimit.js';
19
- export { getRequestSizeLimit, isRequestSizeUnderLimit } from './sdk/validation/requestSizeLimit.js';
20
- export * from './sdk/helpers/htmlEscaping.js';
21
- export * from './sdk/helpers/nonTranslatableContentHelper.js';
22
- export * from './sdk/helpers/nonTranslatableContentWrappers.js';
1
+ export { PolyglotClient } from './sdk/PolyglotClient.ts';
2
+ export { PolyglotError } from './sdk/errors/PolyglotError.ts';
3
+ export type { ClientOptions, PolyglotClientConfig } from './sdk/types/client.ts';
4
+ export * from './sdk/schemas/common/asyncRequestSchemas.ts';
5
+ export * from './sdk/schemas/common/commonSchemas.ts';
6
+ export * from './sdk/schemas/common/errorSchemas.ts';
7
+ export { TRANSLATION_CONTEXT_SCHEMA, isStructuredStyleGuide, } from './sdk/schemas/common/translationContextSchemas.ts';
8
+ export type { StructuredStyleGuide, FreeformStyleGuide, StyleGuideData, GlossaryTerm, TranslationContext, TextRewritingContext, } from './sdk/schemas/common/translationContextSchemas.ts';
9
+ export { LqaIssueSeverityEnum } from './sdk/schemas/lqa/commonSchemas.ts';
10
+ export * from './sdk/schemas/lqa/lqaAsyncSchemas.ts';
11
+ export * from './sdk/schemas/lqa/lqaSyncSchemas.ts';
12
+ export * from './sdk/schemas/translation/generateVariants.ts';
13
+ export * from './sdk/schemas/translation/rewriteTextSchemas.ts';
14
+ export * from './sdk/schemas/translation/translateSyncSchemas.ts';
15
+ export * from './sdk/schemas/translation/translateAsyncSchemas.ts';
16
+ export * from './sdk/schemas/translation/translateTextSegmentSchemas.ts';
17
+ export * from './sdk/schemas/translation/sharedSchemas.ts';
18
+ export { isSegmentUnderLengthLimit, isSegmentUnderLengthLimit as isSegmentExceedingLengthLimit, } from './sdk/validation/isSegmentUnderLengthLimit.ts';
19
+ export { getRequestSizeLimit, isRequestSizeUnderLimit } from './sdk/validation/requestSizeLimit.ts';
20
+ export * from './sdk/helpers/htmlEscaping.ts';
21
+ export * from './sdk/helpers/nonTranslatableContentHelper.ts';
22
+ export * from './sdk/helpers/nonTranslatableContentWrappers.ts';
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- export { PolyglotClient } from './sdk/PolyglotClient.js';
2
- export { PolyglotError } from './sdk/errors/PolyglotError.js';
3
- export * from './sdk/schemas/common/asyncRequestSchemas.js';
4
- export * from './sdk/schemas/common/commonSchemas.js';
5
- export * from './sdk/schemas/common/errorSchemas.js';
6
- export { TRANSLATION_CONTEXT_SCHEMA, isStructuredStyleGuide, } from './sdk/schemas/common/translationContextSchemas.js';
7
- export { LqaIssueSeverityEnum } from './sdk/schemas/lqa/commonSchemas.js';
8
- export * from './sdk/schemas/lqa/lqaAsyncSchemas.js';
9
- export * from './sdk/schemas/lqa/lqaSyncSchemas.js';
10
- export * from './sdk/schemas/translation/generateVariants.js';
11
- export * from './sdk/schemas/translation/rewriteTextSchemas.js';
12
- export * from './sdk/schemas/translation/translateSyncSchemas.js';
13
- export * from './sdk/schemas/translation/translateAsyncSchemas.js';
14
- export * from './sdk/schemas/translation/translateTextSegmentSchemas.js';
15
- export * from './sdk/schemas/translation/sharedSchemas.js';
16
- export { isSegmentUnderLengthLimit, isSegmentUnderLengthLimit as isSegmentExceedingLengthLimit, } from './sdk/validation/isSegmentUnderLengthLimit.js';
17
- export { getRequestSizeLimit, isRequestSizeUnderLimit } from './sdk/validation/requestSizeLimit.js';
18
- export * from './sdk/helpers/htmlEscaping.js';
19
- export * from './sdk/helpers/nonTranslatableContentHelper.js';
20
- export * from './sdk/helpers/nonTranslatableContentWrappers.js';
1
+ export { PolyglotClient } from "./sdk/PolyglotClient.js";
2
+ export { PolyglotError } from "./sdk/errors/PolyglotError.js";
3
+ export * from "./sdk/schemas/common/asyncRequestSchemas.js";
4
+ export * from "./sdk/schemas/common/commonSchemas.js";
5
+ export * from "./sdk/schemas/common/errorSchemas.js";
6
+ export { TRANSLATION_CONTEXT_SCHEMA, isStructuredStyleGuide, } from "./sdk/schemas/common/translationContextSchemas.js";
7
+ export { LqaIssueSeverityEnum } from "./sdk/schemas/lqa/commonSchemas.js";
8
+ export * from "./sdk/schemas/lqa/lqaAsyncSchemas.js";
9
+ export * from "./sdk/schemas/lqa/lqaSyncSchemas.js";
10
+ export * from "./sdk/schemas/translation/generateVariants.js";
11
+ export * from "./sdk/schemas/translation/rewriteTextSchemas.js";
12
+ export * from "./sdk/schemas/translation/translateSyncSchemas.js";
13
+ export * from "./sdk/schemas/translation/translateAsyncSchemas.js";
14
+ export * from "./sdk/schemas/translation/translateTextSegmentSchemas.js";
15
+ export * from "./sdk/schemas/translation/sharedSchemas.js";
16
+ export { isSegmentUnderLengthLimit, isSegmentUnderLengthLimit as isSegmentExceedingLengthLimit, } from "./sdk/validation/isSegmentUnderLengthLimit.js";
17
+ export { getRequestSizeLimit, isRequestSizeUnderLimit } from "./sdk/validation/requestSizeLimit.js";
18
+ export * from "./sdk/helpers/htmlEscaping.js";
19
+ export * from "./sdk/helpers/nonTranslatableContentHelper.js";
20
+ export * from "./sdk/helpers/nonTranslatableContentWrappers.js";
21
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EA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D,CAAA;AACjE,cAAc,oDAAoD,CAAA;AAClE,cAAc,0DAA0D,CAAA;AACxE,cAAc,4CAA4C,CAAA;AAE1D,OAAO,EACL,yBAAyB,EACzB,yBAAyB,IAAI,6BAA6B,GAC3D,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAEnG,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+CAA+C,CAAA;AAC7D,cAAc,iDAAiD,CAAA"}
@@ -1,12 +1,12 @@
1
1
  import type { Either } from '@lokalise/node-core';
2
2
  import { InternalError } from '@lokalise/node-core';
3
- import { PolyglotError } from './errors/PolyglotError.js';
4
- import { type LqaAsyncBody, type LqaAsyncResponse } from './schemas/lqa/lqaAsyncSchemas.js';
5
- import type { LqaSyncBody, LqaSyncResponse } from './schemas/lqa/lqaSyncSchemas.js';
6
- import type { GenerateVariantsBody, GenerateVariantsResponse } from './schemas/translation/generateVariants.js';
7
- import type { TranslateAsyncBody, TranslateAsyncResponse } from './schemas/translation/translateAsyncSchemas.js';
8
- import { type TranslateSyncBody, type TranslateSyncResponse } from './schemas/translation/translateSyncSchemas.js';
9
- import type { ClientOptions, PolyglotClientConfig } from './types/client.js';
3
+ import { PolyglotError } from './errors/PolyglotError.ts';
4
+ import { type LqaAsyncBody, type LqaAsyncResponse } from './schemas/lqa/lqaAsyncSchemas.ts';
5
+ import type { LqaSyncBody, LqaSyncResponse } from './schemas/lqa/lqaSyncSchemas.ts';
6
+ import type { GenerateVariantsBody, GenerateVariantsResponse } from './schemas/translation/generateVariants.ts';
7
+ import type { TranslateAsyncBody, TranslateAsyncResponse } from './schemas/translation/translateAsyncSchemas.ts';
8
+ import { type TranslateSyncBody, type TranslateSyncResponse } from './schemas/translation/translateSyncSchemas.ts';
9
+ import type { ClientOptions, PolyglotClientConfig } from './types/client.ts';
10
10
  type InstrumentationOutput<T> = Either<PolyglotError | InternalError, T>;
11
11
  export declare class PolyglotClient {
12
12
  private readonly client;
@@ -1,12 +1,12 @@
1
1
  import { buildClient, isResponseStatusError, sendPost } from '@lokalise/backend-http-client';
2
2
  import { InternalError } from '@lokalise/node-core';
3
3
  import pino from 'pino';
4
- import { PolyglotError } from './errors/PolyglotError.js';
5
- import { LQA_ASYNC_RESPONSE_SCHEMA, } from './schemas/lqa/lqaAsyncSchemas.js';
6
- import { LQA_SYNC_RESPONSE_SCHEMA } from './schemas/lqa/lqaSyncSchemas.js';
7
- import { GENERATE_VARIANTS_RESPONSE_SCHEMA } from './schemas/translation/generateVariants.js';
8
- import { TRANSLATE_ASYNC_RESPONSE_SCHEMA } from './schemas/translation/translateAsyncSchemas.js';
9
- import { TRANSLATE_SYNC_RESPONSE_SCHEMA, } from './schemas/translation/translateSyncSchemas.js';
4
+ import { PolyglotError } from "./errors/PolyglotError.js";
5
+ import { LQA_ASYNC_RESPONSE_SCHEMA, } from "./schemas/lqa/lqaAsyncSchemas.js";
6
+ import { LQA_SYNC_RESPONSE_SCHEMA } from "./schemas/lqa/lqaSyncSchemas.js";
7
+ import { GENERATE_VARIANTS_RESPONSE_SCHEMA } from "./schemas/translation/generateVariants.js";
8
+ import { TRANSLATE_ASYNC_RESPONSE_SCHEMA } from "./schemas/translation/translateAsyncSchemas.js";
9
+ import { TRANSLATE_SYNC_RESPONSE_SCHEMA, } from "./schemas/translation/translateSyncSchemas.js";
10
10
  const DEFAULT_CLIENT_OPTIONS = {
11
11
  timeout: 30000,
12
12
  };
@@ -1,3 +1,3 @@
1
- import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.js';
1
+ import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.ts';
2
2
  export declare const handleHtmlEscape: (text: string, integration?: IntegrationEngineEnum) => string;
3
3
  export declare const handleHtmlUnescape: (text: string, integration?: IntegrationEngineEnum) => string;
@@ -1,6 +1,6 @@
1
1
  import { escape as escapeHtml, unescape as unescapeHtml } from 'html-escaper';
2
- import { MtIntegrationEngineEnum, } from '../schemas/common/commonSchemas.js';
3
- import { isEnumValue } from './isEnumValue.js';
2
+ import { MtIntegrationEngineEnum, } from "../schemas/common/commonSchemas.js";
3
+ import { isEnumValue } from "./isEnumValue.js";
4
4
  const isHtmlEscapingNeededByMtIntegration = {
5
5
  [MtIntegrationEngineEnum.DEEPL]: true,
6
6
  [MtIntegrationEngineEnum.GOOGLE_TRANSLATE]: true,
@@ -1,4 +1,4 @@
1
- import type { IntegrationEngineEnum } from '../schemas/common/commonSchemas.js';
1
+ import type { IntegrationEngineEnum } from '../schemas/common/commonSchemas.ts';
2
2
  export type TextWithNonTranslatableRegions = {
3
3
  wrappedText: string;
4
4
  nonTranslatableRegions: string[];
@@ -1,5 +1,5 @@
1
1
  import { NON_TRANSLATABLE_END_TAG, NON_TRANSLATABLE_START_TAG, } from '@lokalise/non-translatable-markup';
2
- import { getWrapperByIntegration } from './nonTranslatableContentWrappers.js';
2
+ import { getWrapperByIntegration } from "./nonTranslatableContentWrappers.js";
3
3
  export const NON_TRANSLATABLE_REGION_REGEX = new RegExp(String.raw `${NON_TRANSLATABLE_START_TAG}[\s\S]*?${NON_TRANSLATABLE_END_TAG}`, 'g');
4
4
  /**
5
5
  * Extracts matches from a string using a regular expression
@@ -1,4 +1,4 @@
1
- import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.js';
1
+ import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.ts';
2
2
  export type WrapperDefinition = {
3
3
  wrap: (content: string, id: number) => string;
4
4
  regexp: RegExp;
@@ -1,5 +1,5 @@
1
- import { MtIntegrationEngineEnum, } from '../schemas/common/commonSchemas.js';
2
- import { isEnumValue } from './isEnumValue.js';
1
+ import { MtIntegrationEngineEnum, } from "../schemas/common/commonSchemas.js";
2
+ import { isEnumValue } from "./isEnumValue.js";
3
3
  const createWrapperMatchingRegexp = (tagWithAttributes) => {
4
4
  const tag = tagWithAttributes.trim().split(' ').shift();
5
5
  return new RegExp(String.raw `<${tagWithAttributes} id=\\*["'](\d+)\\*["']>([\s\S]*?)</${tag}>`, 'g');
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
- import type { ObjectValues } from '../../types/common.js';
2
+ import type { ObjectValues } from '../../types/common.ts';
3
3
  export declare const ORIGIN_CORRELATION_ID_SCHEMA: z.ZodString;
4
4
  export declare const OWNER_ID_SCHEMA: z.ZodString;
5
5
  export declare const TENANT_ID_SCHEMA: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
- import type { ObjectValues } from '../../types/common.js';
2
+ import type { ObjectValues } from '../../types/common.ts';
3
3
  export declare const FinetunedIntegrationEngineEnum: {
4
4
  readonly FINETUNED_OPENAI: "FT-OpenAI";
5
5
  };
@@ -7,16 +7,21 @@ export type FinetunedIntegrationEngineEnum = ObjectValues<typeof FinetunedIntegr
7
7
  export declare const AiIntegrationEngineEnum: {
8
8
  readonly FINETUNED_OPENAI: "FT-OpenAI";
9
9
  readonly CLAUDE: "Claude";
10
- readonly CHAT_GPT4: "ChatGPT-4";
10
+ readonly GPT: "GPT";
11
11
  readonly GEMINI: "Gemini";
12
12
  };
13
13
  export type AiIntegrationEngineEnum = ObjectValues<typeof AiIntegrationEngineEnum>;
14
- export declare const AI_INTEGRATION_ENGINE_SCHEMA: z.ZodNativeEnum<{
15
- readonly FINETUNED_OPENAI: "FT-OpenAI";
16
- readonly CLAUDE: "Claude";
14
+ export declare const DeprecatedAiIntegrationEngineEnum: {
17
15
  readonly CHAT_GPT4: "ChatGPT-4";
18
- readonly GEMINI: "Gemini";
19
- }>;
16
+ };
17
+ export type DeprecatedAiIntegrationEngineEnum = ObjectValues<typeof DeprecatedAiIntegrationEngineEnum>;
18
+ export declare const AI_INTEGRATION_ENGINE_SCHEMA: z.ZodEffects<z.ZodNativeEnum<{
19
+ CHAT_GPT4: "ChatGPT-4";
20
+ FINETUNED_OPENAI: "FT-OpenAI";
21
+ CLAUDE: "Claude";
22
+ GPT: "GPT";
23
+ GEMINI: "Gemini";
24
+ }>, "FT-OpenAI" | "Claude" | "GPT" | "Gemini", "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4">;
20
25
  export declare const MtIntegrationEngineEnum: {
21
26
  readonly DEEPL: "DeepL";
22
27
  readonly GOOGLE_TRANSLATE: "GoogleTranslate";
@@ -31,22 +36,23 @@ export declare const MT_INTEGRATION_ENGINE_SCHEMA: z.ZodNativeEnum<{
31
36
  export declare const RealIntegrationEngineEnum: {
32
37
  readonly FINETUNED_OPENAI: "FT-OpenAI";
33
38
  readonly CLAUDE: "Claude";
34
- readonly CHAT_GPT4: "ChatGPT-4";
39
+ readonly GPT: "GPT";
35
40
  readonly GEMINI: "Gemini";
36
41
  readonly DEEPL: "DeepL";
37
42
  readonly GOOGLE_TRANSLATE: "GoogleTranslate";
38
43
  readonly MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
39
44
  };
40
45
  export type RealIntegrationEngineEnum = ObjectValues<typeof RealIntegrationEngineEnum>;
41
- export declare const REAL_INTEGRATION_ENGINE_SCHEMA: z.ZodNativeEnum<{
42
- readonly FINETUNED_OPENAI: "FT-OpenAI";
43
- readonly CLAUDE: "Claude";
44
- readonly CHAT_GPT4: "ChatGPT-4";
45
- readonly GEMINI: "Gemini";
46
- readonly DEEPL: "DeepL";
47
- readonly GOOGLE_TRANSLATE: "GoogleTranslate";
48
- readonly MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
49
- }>;
46
+ export declare const REAL_INTEGRATION_ENGINE_SCHEMA: z.ZodEffects<z.ZodNativeEnum<{
47
+ CHAT_GPT4: "ChatGPT-4";
48
+ FINETUNED_OPENAI: "FT-OpenAI";
49
+ CLAUDE: "Claude";
50
+ GPT: "GPT";
51
+ GEMINI: "Gemini";
52
+ DEEPL: "DeepL";
53
+ GOOGLE_TRANSLATE: "GoogleTranslate";
54
+ MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
55
+ }>, "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator", "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator">;
50
56
  export declare const FORCE_INTEGRATION_SCHEMA: z.ZodBoolean;
51
57
  export declare const refineIntegrationIsPresent: readonly [(data: {
52
58
  integration?: string;
@@ -56,7 +62,7 @@ export declare const IntegrationEngineEnum: {
56
62
  readonly FAKE: "Fake";
57
63
  readonly FINETUNED_OPENAI: "FT-OpenAI";
58
64
  readonly CLAUDE: "Claude";
59
- readonly CHAT_GPT4: "ChatGPT-4";
65
+ readonly GPT: "GPT";
60
66
  readonly GEMINI: "Gemini";
61
67
  readonly DEEPL: "DeepL";
62
68
  readonly GOOGLE_TRANSLATE: "GoogleTranslate";
@@ -77,14 +83,14 @@ export declare const COMMON_ERROR_RESPONSE_SCHEMA: z.ZodObject<{
77
83
  details?: Record<string, unknown> | undefined;
78
84
  }>;
79
85
  export type CommonErrorResponse = z.infer<typeof COMMON_ERROR_RESPONSE_SCHEMA>;
80
- export declare const COMMON_FAILED_OPERATION_CALLBACK_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
86
+ export declare const COMMON_FAILED_OPERATION_CALLBACK_SCHEMA: z.ZodObject<{
81
87
  message: z.ZodString;
82
88
  errorCode: z.ZodString;
83
89
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
- }, {
90
+ } & {
85
91
  status: z.ZodLiteral<"error">;
86
92
  originCorrelationId: z.ZodString;
87
- }>, "strip", z.ZodTypeAny, {
93
+ }, "strip", z.ZodTypeAny, {
88
94
  originCorrelationId: string;
89
95
  message: string;
90
96
  status: "error";
@@ -117,6 +123,17 @@ export declare const TM_MATCH_SCHEMA: z.ZodOptional<z.ZodObject<{
117
123
  sourceValue: string;
118
124
  translatedValue: string;
119
125
  }>>;
126
+ export declare const TRANSLATION_EXAMPLE_SCHEMA: z.ZodObject<{
127
+ sourceValue: z.ZodString;
128
+ translatedValue: z.ZodString;
129
+ }, "strip", z.ZodTypeAny, {
130
+ sourceValue: string;
131
+ translatedValue: string;
132
+ }, {
133
+ sourceValue: string;
134
+ translatedValue: string;
135
+ }>;
136
+ export type TranslationExample = z.infer<typeof TRANSLATION_EXAMPLE_SCHEMA>;
120
137
  export declare const SEGMENT_VALUE_MAX_LENGTH_DEFAULT = 16384;
121
138
  export declare const REQUEST_SIZE_LIMIT_MAP: Record<IntegrationEngineEnum, number>;
122
139
  declare const JSON_PRIMITIVE_DATA_SCHEMA: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
@@ -1,18 +1,27 @@
1
1
  import { isSupportedLocale } from '@lokalise/supported-languages';
2
2
  import { toBooleanPreprocessor } from '@lokalise/zod-extras';
3
3
  import z from 'zod';
4
- import { AsyncRequestCallbackStatusEnum } from './asyncRequestSchemas.js';
4
+ import { AsyncRequestCallbackStatusEnum } from "./asyncRequestSchemas.js";
5
5
  export const FinetunedIntegrationEngineEnum = {
6
6
  FINETUNED_OPENAI: 'FT-OpenAI',
7
7
  };
8
8
  export const AiIntegrationEngineEnum = {
9
9
  CLAUDE: 'Claude',
10
- CHAT_GPT4: 'ChatGPT-4',
10
+ GPT: 'GPT',
11
11
  GEMINI: 'Gemini',
12
12
  ...FinetunedIntegrationEngineEnum,
13
13
  };
14
+ export const DeprecatedAiIntegrationEngineEnum = {
15
+ CHAT_GPT4: 'ChatGPT-4', // ChatGPT-4 is depreciated in favour of GPT
16
+ };
14
17
  export const AI_INTEGRATION_ENGINE_SCHEMA = z
15
- .nativeEnum(AiIntegrationEngineEnum)
18
+ .nativeEnum({ ...AiIntegrationEngineEnum, ...DeprecatedAiIntegrationEngineEnum })
19
+ .transform((val) => {
20
+ if (val === DeprecatedAiIntegrationEngineEnum.CHAT_GPT4) {
21
+ return AiIntegrationEngineEnum.GPT;
22
+ }
23
+ return val;
24
+ })
16
25
  .describe('Indicates which integration should be used to process the request');
17
26
  export const MtIntegrationEngineEnum = {
18
27
  DEEPL: 'DeepL',
@@ -27,7 +36,13 @@ export const RealIntegrationEngineEnum = {
27
36
  ...AiIntegrationEngineEnum,
28
37
  };
29
38
  export const REAL_INTEGRATION_ENGINE_SCHEMA = z
30
- .nativeEnum(RealIntegrationEngineEnum)
39
+ .nativeEnum({ ...RealIntegrationEngineEnum, ...DeprecatedAiIntegrationEngineEnum })
40
+ .transform((val) => {
41
+ if (val === DeprecatedAiIntegrationEngineEnum.CHAT_GPT4) {
42
+ return AiIntegrationEngineEnum.GPT;
43
+ }
44
+ return val;
45
+ })
31
46
  .describe('Indicates which integration should be used to process the request (preferably)');
32
47
  export const FORCE_INTEGRATION_SCHEMA = z
33
48
  .boolean()
@@ -76,6 +91,10 @@ export const TM_MATCH_SCHEMA = z
76
91
  })
77
92
  .optional()
78
93
  .describe('When defined, the translation will attempt to follow the provided sourceValue and translatedValue translation example');
94
+ export const TRANSLATION_EXAMPLE_SCHEMA = z.object({
95
+ sourceValue: z.string().min(1).max(50_000),
96
+ translatedValue: z.string().min(1).max(50_000),
97
+ });
79
98
  export const SEGMENT_VALUE_MAX_LENGTH_DEFAULT = 16384;
80
99
  export const REQUEST_SIZE_LIMIT_MAP = {
81
100
  /**
@@ -101,7 +120,7 @@ export const REQUEST_SIZE_LIMIT_MAP = {
101
120
  */
102
121
  [IntegrationEngineEnum.GEMINI]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
103
122
  [IntegrationEngineEnum.CLAUDE]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
104
- [IntegrationEngineEnum.CHAT_GPT4]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
123
+ [IntegrationEngineEnum.GPT]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
105
124
  [IntegrationEngineEnum.FINETUNED_OPENAI]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
106
125
  [IntegrationEngineEnum.FAKE]: SEGMENT_VALUE_MAX_LENGTH_DEFAULT,
107
126
  };
@@ -1 +1 @@
1
- {"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,CACxD,CAAC,CAAC,KAAK,CAAC,CAAC,0BAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAC7F,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC,gBAAgB,CAAC;KACxB,QAAQ,CAAC,qEAAqE,CAAC;KAC/E,QAAQ,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
- import type { ObjectValues } from '../../types/common.js';
2
+ import type { ObjectValues } from '../../types/common.ts';
3
3
  export declare const ErrorCodeEnum: {
4
4
  readonly ValidationError: "VALIDATION_ERROR";
5
5
  readonly ContextNotSupportedError: "CONTEXT_NOT_SUPPORTED";
@@ -8,13 +8,12 @@ export declare const ErrorCodeEnum: {
8
8
  readonly LanguagePairNotSupportedError: "LANGUAGE_PAIR_NOT_SUPPORTED";
9
9
  };
10
10
  export type ErrorCodeEnum = ObjectValues<typeof ErrorCodeEnum>;
11
- export declare const VALIDATION_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
11
+ export declare const VALIDATION_ERROR_SCHEMA: z.ZodObject<{
12
12
  message: z.ZodString;
13
- errorCode: z.ZodString;
14
13
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15
- }, {
14
+ } & {
16
15
  errorCode: z.ZodLiteral<"VALIDATION_ERROR">;
17
- }>, "strip", z.ZodTypeAny, {
16
+ }, "strip", z.ZodTypeAny, {
18
17
  message: string;
19
18
  errorCode: "VALIDATION_ERROR";
20
19
  details?: Record<string, unknown> | undefined;
@@ -23,13 +22,12 @@ export declare const VALIDATION_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendSha
23
22
  errorCode: "VALIDATION_ERROR";
24
23
  details?: Record<string, unknown> | undefined;
25
24
  }>;
26
- export declare const CONTEXT_NOT_SUPPORTED_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
25
+ export declare const CONTEXT_NOT_SUPPORTED_ERROR_SCHEMA: z.ZodObject<{
27
26
  message: z.ZodString;
28
- errorCode: z.ZodString;
29
27
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
- }, {
28
+ } & {
31
29
  errorCode: z.ZodLiteral<"CONTEXT_NOT_SUPPORTED">;
32
- }>, "strip", z.ZodTypeAny, {
30
+ }, "strip", z.ZodTypeAny, {
33
31
  message: string;
34
32
  errorCode: "CONTEXT_NOT_SUPPORTED";
35
33
  details?: Record<string, unknown> | undefined;
@@ -38,13 +36,12 @@ export declare const CONTEXT_NOT_SUPPORTED_ERROR_SCHEMA: z.ZodObject<z.objectUti
38
36
  errorCode: "CONTEXT_NOT_SUPPORTED";
39
37
  details?: Record<string, unknown> | undefined;
40
38
  }>;
41
- export declare const INTEGRATION_NOT_AVAILABLE_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
39
+ export declare const INTEGRATION_NOT_AVAILABLE_ERROR_SCHEMA: z.ZodObject<{
42
40
  message: z.ZodString;
43
- errorCode: z.ZodString;
44
41
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
45
- }, {
42
+ } & {
46
43
  errorCode: z.ZodLiteral<"INTEGRATION_NOT_AVAILABLE_ERROR">;
47
- }>, "strip", z.ZodTypeAny, {
44
+ }, "strip", z.ZodTypeAny, {
48
45
  message: string;
49
46
  errorCode: "INTEGRATION_NOT_AVAILABLE_ERROR";
50
47
  details?: Record<string, unknown> | undefined;
@@ -53,13 +50,12 @@ export declare const INTEGRATION_NOT_AVAILABLE_ERROR_SCHEMA: z.ZodObject<z.objec
53
50
  errorCode: "INTEGRATION_NOT_AVAILABLE_ERROR";
54
51
  details?: Record<string, unknown> | undefined;
55
52
  }>;
56
- export declare const INTEGRATION_NOT_ENABLED_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
53
+ export declare const INTEGRATION_NOT_ENABLED_ERROR_SCHEMA: z.ZodObject<{
57
54
  message: z.ZodString;
58
- errorCode: z.ZodString;
59
55
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
60
- }, {
56
+ } & {
61
57
  errorCode: z.ZodLiteral<"INTEGRATION_NOT_ENABLED_ERROR">;
62
- }>, "strip", z.ZodTypeAny, {
58
+ }, "strip", z.ZodTypeAny, {
63
59
  message: string;
64
60
  errorCode: "INTEGRATION_NOT_ENABLED_ERROR";
65
61
  details?: Record<string, unknown> | undefined;
@@ -68,13 +64,12 @@ export declare const INTEGRATION_NOT_ENABLED_ERROR_SCHEMA: z.ZodObject<z.objectU
68
64
  errorCode: "INTEGRATION_NOT_ENABLED_ERROR";
69
65
  details?: Record<string, unknown> | undefined;
70
66
  }>;
71
- export declare const LANGUAGE_PAIR_NOT_SUPPORTED_ERROR_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
67
+ export declare const LANGUAGE_PAIR_NOT_SUPPORTED_ERROR_SCHEMA: z.ZodObject<{
72
68
  message: z.ZodString;
73
- errorCode: z.ZodString;
74
69
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
75
- }, {
70
+ } & {
76
71
  errorCode: z.ZodLiteral<"LANGUAGE_PAIR_NOT_SUPPORTED">;
77
- }>, "strip", z.ZodTypeAny, {
72
+ }, "strip", z.ZodTypeAny, {
78
73
  message: string;
79
74
  errorCode: "LANGUAGE_PAIR_NOT_SUPPORTED";
80
75
  details?: Record<string, unknown> | undefined;
@@ -1,5 +1,5 @@
1
1
  import z from 'zod';
2
- import { COMMON_ERROR_RESPONSE_SCHEMA } from './commonSchemas.js';
2
+ import { COMMON_ERROR_RESPONSE_SCHEMA } from "./commonSchemas.js";
3
3
  export const ErrorCodeEnum = {
4
4
  ValidationError: 'VALIDATION_ERROR',
5
5
  ContextNotSupportedError: 'CONTEXT_NOT_SUPPORTED',