generaltranslation 8.1.0 → 8.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,11 +12,13 @@ export type ActionType = 'standard' | 'fast' | string;
12
12
  *
13
13
  * @param context - The context of the request.
14
14
  * @param id - The id of the request.
15
+ * @param maxChars - The maxChars of the request.
15
16
  * @param hash - The hash of the request.
16
17
  */
17
18
  export type EntryMetadata = {
18
19
  context?: string;
19
20
  id?: string;
21
+ maxChars?: number;
20
22
  hash?: string;
21
23
  dataFormat?: DataFormat;
22
24
  sourceLocale?: string;
@@ -5,6 +5,7 @@ export type FileMetadata = {
5
5
  filePath: string;
6
6
  fileFormat: FileFormat;
7
7
  context?: string;
8
+ maxChars?: number;
8
9
  sourceLocale?: string;
9
10
  hash?: string;
10
11
  };
@@ -1,5 +1,20 @@
1
1
  import { DataFormat } from '../jsx/content';
2
2
  import { FileFormat, FileReference } from './file';
3
+ /**
4
+ * Metadata stored alongside GTJSON file entries.
5
+ * Keys correspond to the entry id/hash in the GTJSON body.
6
+ */
7
+ export type GTJsonFormatMetadata = Record<string, {
8
+ context?: string;
9
+ id?: string;
10
+ domain?: string;
11
+ maxChars?: number;
12
+ dataFormat?: 'JSX' | 'ICU';
13
+ requestVersion?: number;
14
+ approved_at?: string | null;
15
+ approved_by?: string | null;
16
+ hash?: string;
17
+ }>;
3
18
  export type FileUpload = {
4
19
  branchId?: string;
5
20
  incomingBranchId?: string;
@@ -9,6 +24,7 @@ export type FileUpload = {
9
24
  fileFormat: FileFormat;
10
25
  dataFormat?: DataFormat;
11
26
  locale: string;
27
+ formatMetadata?: GTJsonFormatMetadata;
12
28
  versionId?: string;
13
29
  fileId?: string;
14
30
  };
package/dist/types.d.ts CHANGED
@@ -96,11 +96,13 @@ type ActionType = 'standard' | 'fast' | string;
96
96
  *
97
97
  * @param context - The context of the request.
98
98
  * @param id - The id of the request.
99
+ * @param maxChars - The maxChars of the request.
99
100
  * @param hash - The hash of the request.
100
101
  */
101
102
  type EntryMetadata = {
102
103
  context?: string;
103
104
  id?: string;
105
+ maxChars?: number;
104
106
  hash?: string;
105
107
  dataFormat?: DataFormat;
106
108
  sourceLocale?: string;
@@ -418,6 +420,7 @@ type VariableTransformationSuffix = 'variable' | 'number' | 'datetime' | 'curren
418
420
  type _Content = string | Array<string | Variable>;
419
421
 
420
422
  type Metadata = {
423
+ maxChars?: number;
421
424
  context?: string;
422
425
  id?: string;
423
426
  sourceLocale?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generaltranslation",
3
- "version": "8.1.0",
3
+ "version": "8.1.2",
4
4
  "description": "A language toolkit for AI developers",
5
5
  "main": "dist/index.cjs.min.cjs",
6
6
  "module": "dist/index.esm.min.mjs",