@lokalise/polyglot-sdk 5.4.0 → 5.5.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.
@@ -8,13 +8,21 @@ export type TranslateAsyncCallbackRequestBody = {
8
8
  errors: CommonErrorType[];
9
9
  };
10
10
  };
11
+ export type LqaAsyncCallbackData = {
12
+ contentUnitId: string;
13
+ translationId: string;
14
+ suggestion: string | null;
15
+ issues: LqaIssue[];
16
+ };
17
+ export type LqaAsyncCallbackError = {
18
+ contentUnitId: string;
19
+ translationId: string;
20
+ errorCode: string;
21
+ message: string;
22
+ details?: Record<string, unknown>;
23
+ };
11
24
  export type LqaAsyncCallbackRequestBody = {
12
25
  originCorrelationId: string;
13
- data: {
14
- contentUnitId: string;
15
- translationId: string;
16
- suggestion: string | null;
17
- issues: LqaIssue[];
18
- }[];
19
- errors: CommonErrorType[];
26
+ data: LqaAsyncCallbackData[];
27
+ errors: LqaAsyncCallbackError[];
20
28
  };
@@ -14,7 +14,7 @@ export declare const ErrorCodeEnum: {
14
14
  readonly EDITED_NON_TRANSLATABLE_CONTENT: "EDITED_NON_TRANSLATABLE_CONTENT_ERROR";
15
15
  readonly TRANSLATION_FAILED: "TRANSLATION_FAILED";
16
16
  };
17
- export type ErrorCode = ObjectValues<typeof ErrorCodeEnum>;
17
+ export type ErrorCodeEnum = ObjectValues<typeof ErrorCodeEnum>;
18
18
  export type CommonErrorType = {
19
19
  errorCode: string;
20
20
  message: string;
@@ -37,8 +37,27 @@ export type ContentUnitTranslationResponse = {
37
37
  polyglotRefId?: string;
38
38
  }[];
39
39
  };
40
- export type LqaSeverityResponse = 'neutral' | 'minor' | 'major' | 'critical';
41
- export type LqaCategoryResponse = 'accuracy' | 'fluency' | 'terminology' | 'locale convention' | 'style' | 'consistency' | 'coherence' | 'design' | 'markup' | 'internationalization' | 'verity';
40
+ export declare const LqaSeverityResponseEnum: {
41
+ readonly NEUTRAL: "neutral";
42
+ readonly MINOR: "minor";
43
+ readonly MAJOR: "major";
44
+ readonly CRITICAL: "critical";
45
+ };
46
+ export type LqaSeverityResponseEnum = ObjectValues<typeof LqaSeverityResponseEnum>;
47
+ export declare const LqaCategoryResponseEnum: {
48
+ readonly ACCURACY: "accuracy";
49
+ readonly FLUENCY: "fluency";
50
+ readonly TERMINOLOGY: "terminology";
51
+ readonly LOCALE_CONVENTION: "locale convention";
52
+ readonly STYLE: "style";
53
+ readonly CONSISTENCY: "consistency";
54
+ readonly COHERENCE: "coherence";
55
+ readonly DESIGN: "design";
56
+ readonly MARKUP: "markup";
57
+ readonly INTERNATIONALIZATION: "internationalization";
58
+ readonly VERITY: "verity";
59
+ };
60
+ export type LqaCategoryResponseEnum = ObjectValues<typeof LqaCategoryResponseEnum>;
42
61
  export type ContentUnitLqaResponse = {
43
62
  id: string;
44
63
  segments: SegmentLqaResponse[];
@@ -50,8 +69,8 @@ export type SegmentLqaResponse = {
50
69
  suggestion?: string;
51
70
  };
52
71
  export type LqaIssue = {
53
- severity: LqaSeverityResponse;
54
- category: LqaCategoryResponse;
72
+ severity: LqaSeverityResponseEnum;
73
+ category: LqaCategoryResponseEnum;
55
74
  comment?: string;
56
75
  };
57
76
  export type PolyglotGenerateVariantsResponse = {
@@ -1,8 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorCodeEnum = void 0;
3
+ exports.LqaCategoryResponseEnum = exports.LqaSeverityResponseEnum = exports.ErrorCodeEnum = void 0;
4
4
  exports.ErrorCodeEnum = {
5
5
  EDITED_NON_TRANSLATABLE_CONTENT: 'EDITED_NON_TRANSLATABLE_CONTENT_ERROR',
6
6
  TRANSLATION_FAILED: 'TRANSLATION_FAILED',
7
7
  };
8
+ exports.LqaSeverityResponseEnum = {
9
+ NEUTRAL: 'neutral',
10
+ MINOR: 'minor',
11
+ MAJOR: 'major',
12
+ CRITICAL: 'critical',
13
+ };
14
+ exports.LqaCategoryResponseEnum = {
15
+ ACCURACY: 'accuracy',
16
+ FLUENCY: 'fluency',
17
+ TERMINOLOGY: 'terminology',
18
+ LOCALE_CONVENTION: 'locale convention',
19
+ STYLE: 'style',
20
+ CONSISTENCY: 'consistency',
21
+ COHERENCE: 'coherence',
22
+ DESIGN: 'design',
23
+ MARKUP: 'markup',
24
+ INTERNATIONALIZATION: 'internationalization',
25
+ VERITY: 'verity',
26
+ };
8
27
  //# sourceMappingURL=responses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/sdk/types/responses.ts"],"names":[],"mappings":";;;AAiBa,QAAA,aAAa,GAAG;IAC3B,+BAA+B,EAAE,uCAAuC;IACxE,kBAAkB,EAAE,oBAAoB;CAChC,CAAA"}
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/sdk/types/responses.ts"],"names":[],"mappings":";;;AAiBa,QAAA,aAAa,GAAG;IAC3B,+BAA+B,EAAE,uCAAuC;IACxE,kBAAkB,EAAE,oBAAoB;CAChC,CAAA;AA2BG,QAAA,uBAAuB,GAAG;IACrC,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAA;AAGG,QAAA,uBAAuB,GAAG;IACrC,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,oBAAoB,EAAE,sBAAsB;IAC5C,MAAM,EAAE,QAAQ;CACR,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/polyglot-sdk",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"