generaltranslation 7.6.1 → 7.6.3-alpha.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.
@@ -1,7 +1,8 @@
1
1
  import { CompletedFileTranslationData } from './file';
2
2
  export type FileTranslationQuery = {
3
3
  versionId: string;
4
- fileName: string;
4
+ fileName?: string;
5
+ fileId?: string;
5
6
  locale: string;
6
7
  };
7
8
  export type CheckFileTranslationsOptions = {
@@ -10,3 +11,30 @@ export type CheckFileTranslationsOptions = {
10
11
  export type CheckFileTranslationsResult = {
11
12
  translations: CompletedFileTranslationData[];
12
13
  };
14
+ export type FileQuery = {
15
+ fileId: string;
16
+ versionId?: string;
17
+ };
18
+ export type FileQueryResult = {
19
+ sourceFile: {
20
+ id: string;
21
+ fileId: string;
22
+ versionId: string;
23
+ sourceLocale: string;
24
+ fileName: string;
25
+ fileFormat: string;
26
+ dataFormat: string | null;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ approvalRequiredAt: string | null;
30
+ locales: string[];
31
+ };
32
+ translations: {
33
+ locale: string;
34
+ completedAt: string | null;
35
+ approvedAt: string | null;
36
+ publishedAt: string | null;
37
+ createdAt: string | null;
38
+ updatedAt: string | null;
39
+ }[];
40
+ };
@@ -1,5 +1,5 @@
1
1
  import { Entry } from './entry';
2
- export type FileFormat = 'GTJSON' | 'JSON' | 'YAML' | 'MDX' | 'MD' | 'TS' | 'JS';
2
+ export type FileFormat = 'GTJSON' | 'JSON' | 'YAML' | 'MDX' | 'MD' | 'TS' | 'JS' | 'HTML';
3
3
  export type FileMetadata = {
4
4
  filePath: string;
5
5
  fileFormat: FileFormat;
@@ -0,0 +1,7 @@
1
+ export type ProjectData = {
2
+ id: string;
3
+ name: string;
4
+ orgId: string;
5
+ defaultLocale: string;
6
+ currentLocales: string[];
7
+ };
@@ -6,6 +6,8 @@ export type FileUpload = {
6
6
  fileFormat: FileFormat;
7
7
  dataFormat?: DataFormat;
8
8
  locale: string;
9
+ versionId?: string;
10
+ fileId?: string;
9
11
  };
10
12
  export type FileUploadRef = {
11
13
  fileId: string;
package/dist/types.d.ts CHANGED
@@ -129,7 +129,7 @@ type TranslationStatusResult = {
129
129
  localesWaitingForApproval: any[];
130
130
  };
131
131
 
132
- type FileFormat = 'GTJSON' | 'JSON' | 'YAML' | 'MDX' | 'MD' | 'TS' | 'JS';
132
+ type FileFormat = 'GTJSON' | 'JSON' | 'YAML' | 'MDX' | 'MD' | 'TS' | 'JS' | 'HTML';
133
133
  type CompletedFileTranslationData = {
134
134
  locale: string;
135
135
  metadata: any;
@@ -143,7 +143,8 @@ type CompletedFileTranslationData = {
143
143
 
144
144
  type FileTranslationQuery = {
145
145
  versionId: string;
146
- fileName: string;
146
+ fileName?: string;
147
+ fileId?: string;
147
148
  locale: string;
148
149
  };
149
150
  type CheckFileTranslationsOptions = {
@@ -0,0 +1,2 @@
1
+ export declare function encode(data: string): string;
2
+ export declare function decode(base64: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generaltranslation",
3
- "version": "7.6.1",
3
+ "version": "7.6.3-alpha.1",
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",