generaltranslation 7.6.3 → 7.6.4-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.
Files changed (80) hide show
  1. package/dist/id.cjs.min.cjs.map +1 -1
  2. package/dist/id.d.ts +76 -2
  3. package/dist/id.esm.min.mjs.map +1 -1
  4. package/dist/index.cjs.min.cjs.map +1 -1
  5. package/dist/index.d.ts +391 -32
  6. package/dist/index.esm.min.mjs.map +1 -1
  7. package/dist/internal.cjs.min.cjs.map +1 -1
  8. package/dist/internal.d.ts +183 -14
  9. package/dist/internal.esm.min.mjs.map +1 -1
  10. package/package.json +15 -15
  11. package/dist/backwards-compatability/dataConversion.d.ts +0 -23
  12. package/dist/backwards-compatability/oldHashJsxChildren.d.ts +0 -23
  13. package/dist/backwards-compatability/oldTypes.d.ts +0 -21
  14. package/dist/backwards-compatability/typeChecking.d.ts +0 -21
  15. package/dist/cache/IntlCache.d.ts +0 -8
  16. package/dist/deprecated/batch/translateBatch.d.ts +0 -1
  17. package/dist/deprecated/icu/translate.d.ts +0 -1
  18. package/dist/deprecated/jsx/translateJsx.d.ts +0 -1
  19. package/dist/deprecated/translate/translate.d.ts +0 -1
  20. package/dist/formatting/format.d.ts +0 -1
  21. package/dist/id/hashSource.d.ts +0 -26
  22. package/dist/id/hashTemplate.d.ts +0 -4
  23. package/dist/locales/customLocaleMapping.d.ts +0 -5
  24. package/dist/locales/determineLocale.d.ts +0 -1
  25. package/dist/locales/getLocaleDirection.d.ts +0 -1
  26. package/dist/locales/getLocaleEmoji.d.ts +0 -2
  27. package/dist/locales/getLocaleName.d.ts +0 -1
  28. package/dist/locales/getLocaleProperties.d.ts +0 -32
  29. package/dist/locales/getPluralForm.d.ts +0 -9
  30. package/dist/locales/getRegionProperties.d.ts +0 -7
  31. package/dist/locales/isSameDialect.d.ts +0 -1
  32. package/dist/locales/isSameLanguage.d.ts +0 -1
  33. package/dist/locales/isSupersetLocale.d.ts +0 -1
  34. package/dist/locales/isValidLocale.d.ts +0 -1
  35. package/dist/locales/requiresTranslation.d.ts +0 -1
  36. package/dist/locales/resolveAliasLocale.d.ts +0 -8
  37. package/dist/logging/errors.d.ts +0 -10
  38. package/dist/logging/logger.d.ts +0 -117
  39. package/dist/logging/warnings.d.ts +0 -2
  40. package/dist/projects/getProjectData.d.ts +0 -1
  41. package/dist/settings/plurals.d.ts +0 -3
  42. package/dist/settings/settings.d.ts +0 -2
  43. package/dist/settings/settingsUrls.d.ts +0 -9
  44. package/dist/translate/checkFileTranslations.d.ts +0 -1
  45. package/dist/translate/checkSetupStatus.d.ts +0 -8
  46. package/dist/translate/checkTranslationStatus.d.ts +0 -1
  47. package/dist/translate/downloadFile.d.ts +0 -1
  48. package/dist/translate/downloadFileBatch.d.ts +0 -1
  49. package/dist/translate/enqueueEntries.d.ts +0 -1
  50. package/dist/translate/enqueueFiles.d.ts +0 -9
  51. package/dist/translate/fetchTranslations.d.ts +0 -1
  52. package/dist/translate/querySourceFile.d.ts +0 -1
  53. package/dist/translate/setupProject.d.ts +0 -4
  54. package/dist/translate/shouldSetupProject.d.ts +0 -3
  55. package/dist/translate/translate.d.ts +0 -1
  56. package/dist/translate/translateMany.d.ts +0 -1
  57. package/dist/translate/uploadSourceFiles.d.ts +0 -1
  58. package/dist/translate/uploadTranslations.d.ts +0 -1
  59. package/dist/translate/utils/fetchWithTimeout.d.ts +0 -1
  60. package/dist/translate/utils/generateRequestHeaders.d.ts +0 -2
  61. package/dist/translate/utils/handleFetchError.d.ts +0 -1
  62. package/dist/translate/utils/validateResponse.d.ts +0 -1
  63. package/dist/types-dir/checkFileTranslations.d.ts +0 -40
  64. package/dist/types-dir/content.d.ts +0 -49
  65. package/dist/types-dir/downloadFile.d.ts +0 -3
  66. package/dist/types-dir/downloadFileBatch.d.ts +0 -22
  67. package/dist/types-dir/enqueueEntries.d.ts +0 -21
  68. package/dist/types-dir/enqueueFiles.d.ts +0 -62
  69. package/dist/types-dir/entry.d.ts +0 -39
  70. package/dist/types-dir/fetchTranslations.d.ts +0 -11
  71. package/dist/types-dir/file.d.ts +0 -23
  72. package/dist/types-dir/project.d.ts +0 -7
  73. package/dist/types-dir/translate.d.ts +0 -34
  74. package/dist/types-dir/translateMany.d.ts +0 -5
  75. package/dist/types-dir/translationStatus.d.ts +0 -9
  76. package/dist/types-dir/uploadFiles.d.ts +0 -38
  77. package/dist/types-dir/variables.d.ts +0 -9
  78. package/dist/utils/base64.d.ts +0 -2
  79. package/dist/utils/isVariable.d.ts +0 -2
  80. package/dist/utils/minify.d.ts +0 -2
@@ -1,117 +0,0 @@
1
- /**
2
- * Comprehensive logging system for the General Translation library
3
- * Provides structured logging with multiple levels and configurable output
4
- */
5
- export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';
6
- export interface LogEntry {
7
- level: LogLevel;
8
- message: string;
9
- timestamp: Date;
10
- context?: string;
11
- metadata?: Record<string, any>;
12
- }
13
- export interface LoggerConfig {
14
- /** Minimum log level to output */
15
- level: LogLevel;
16
- /** Whether to include timestamps in log output */
17
- includeTimestamp: boolean;
18
- /** Whether to include context information */
19
- includeContext: boolean;
20
- /** Custom prefix for all log messages */
21
- prefix?: string;
22
- /** Whether to output to console (default: true) */
23
- enableConsole: boolean;
24
- /** Custom log handlers */
25
- handlers?: LogHandler[];
26
- }
27
- export interface LogHandler {
28
- handle(entry: LogEntry): void;
29
- }
30
- /**
31
- * Console log handler that outputs formatted messages to console
32
- */
33
- export declare class ConsoleLogHandler implements LogHandler {
34
- private config;
35
- constructor(config: LoggerConfig);
36
- handle(entry: LogEntry): void;
37
- }
38
- /**
39
- * Main Logger class providing structured logging capabilities
40
- */
41
- export declare class Logger {
42
- private config;
43
- private handlers;
44
- constructor(config?: Partial<LoggerConfig>);
45
- /**
46
- * Add a custom log handler
47
- */
48
- addHandler(handler: LogHandler): void;
49
- /**
50
- * Remove a log handler
51
- */
52
- removeHandler(handler: LogHandler): void;
53
- /**
54
- * Update logger configuration
55
- */
56
- configure(config: Partial<LoggerConfig>): void;
57
- /**
58
- * Check if a log level should be output based on current configuration
59
- */
60
- private shouldLog;
61
- /**
62
- * Internal logging method that creates log entries and passes them to handlers
63
- */
64
- private log;
65
- /**
66
- * Log a debug message
67
- * Used for detailed diagnostic information, typically of interest only when diagnosing problems
68
- */
69
- debug(message: string, context?: string, metadata?: Record<string, any>): void;
70
- /**
71
- * Log an info message
72
- * Used for general information about application operation
73
- */
74
- info(message: string, context?: string, metadata?: Record<string, any>): void;
75
- /**
76
- * Log a warning message
77
- * Used for potentially problematic situations that don't prevent operation
78
- */
79
- warn(message: string, context?: string, metadata?: Record<string, any>): void;
80
- /**
81
- * Log an error message
82
- * Used for error events that might still allow the application to continue
83
- */
84
- error(message: string, context?: string, metadata?: Record<string, any>): void;
85
- /**
86
- * Create a child logger with a specific context
87
- */
88
- child(context: string): ContextLogger;
89
- /**
90
- * Get current logger configuration
91
- */
92
- getConfig(): LoggerConfig;
93
- }
94
- /**
95
- * Context logger that automatically includes context information
96
- */
97
- export declare class ContextLogger {
98
- private logger;
99
- private context;
100
- constructor(logger: Logger, context: string);
101
- debug(message: string, metadata?: Record<string, any>): void;
102
- info(message: string, metadata?: Record<string, any>): void;
103
- warn(message: string, metadata?: Record<string, any>): void;
104
- error(message: string, metadata?: Record<string, any>): void;
105
- child(childContext: string): ContextLogger;
106
- }
107
- export declare const defaultLogger: Logger;
108
- export declare const debug: (message: string, context?: string, metadata?: Record<string, any>) => void;
109
- export declare const info: (message: string, context?: string, metadata?: Record<string, any>) => void;
110
- export declare const warn: (message: string, context?: string, metadata?: Record<string, any>) => void;
111
- export declare const error: (message: string, context?: string, metadata?: Record<string, any>) => void;
112
- export declare const fetchLogger: ContextLogger;
113
- export declare const validationLogger: ContextLogger;
114
- export declare const formattingLogger: ContextLogger;
115
- export declare const localeLogger: ContextLogger;
116
- export declare const gtInstanceLogger: ContextLogger;
117
- export { Logger as GTLogger };
@@ -1,2 +0,0 @@
1
- export declare const formatI18nextWarning = "Warning: formatI18next is not currently supported but will be implemented in a future version. Use _formatMessage for current ICU message format support.";
2
- export declare const formatJsxWarning = "Warning: formatJsx is not currently supported but will be implemented in a future version. Use _formatMessage for current ICU message format support.";
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export declare const pluralForms: readonly ["singular", "plural", "dual", "zero", "one", "two", "few", "many", "other"];
2
- export type PluralType = (typeof pluralForms)[number];
3
- export declare function isAcceptedPluralForm(form: string): form is PluralType;
@@ -1,2 +0,0 @@
1
- export declare const libraryDefaultLocale: "en";
2
- export declare const maxTimeout = 60000;
@@ -1,9 +0,0 @@
1
- export declare const defaultCacheUrl: "https://cdn.gtx.dev";
2
- export declare const defaultBaseUrl: "https://api2.gtx.dev";
3
- export declare const defaultRuntimeApiUrl: "https://runtime2.gtx.dev";
4
- export declare const translateBatchUrl: "/v1/translate/batch";
5
- export declare const translateJsxUrl: "/v1/translate/react";
6
- export declare const translateContentUrl: "/v1/translate/content";
7
- export declare const translateIcuUrl: "/v1/translate/icu";
8
- export declare const updateProjectTranslationsUrl: "/v1/project/translations/update";
9
- export declare const getProjectLocalesUrl: "/v1/project/locales";
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- export type SetupJobStatus = 'queued' | 'processing' | 'completed' | 'failed';
2
- export type CheckSetupStatusResult = {
3
- jobId: string;
4
- status: SetupJobStatus;
5
- error?: {
6
- message: string;
7
- };
8
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- export type EnqueueOptions = {
2
- sourceLocale: string;
3
- targetLocales: string[];
4
- publish?: boolean;
5
- requireApproval?: boolean;
6
- modelProvider?: string;
7
- force?: boolean;
8
- timeout?: number;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type SetupProjectResult = {
2
- setupJobId: string;
3
- status: 'queued';
4
- };
@@ -1,3 +0,0 @@
1
- export type ShouldSetupProjectResult = {
2
- shouldSetupProject: boolean;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { TranslationRequestConfig } from '../../types';
2
- export default function generateRequestHeaders(config: TranslationRequestConfig, excludeContentType?: boolean): Record<string, string>;
@@ -1 +0,0 @@
1
- export default function handleFetchError(error: unknown, timeout: number): never;
@@ -1 +0,0 @@
1
- export default function validateResponse(response: Response): Promise<void>;
@@ -1,40 +0,0 @@
1
- import { CompletedFileTranslationData } from './file';
2
- export type FileTranslationQuery = {
3
- versionId: string;
4
- fileName?: string;
5
- fileId?: string;
6
- locale: string;
7
- };
8
- export type CheckFileTranslationsOptions = {
9
- timeout?: number;
10
- };
11
- export type CheckFileTranslationsResult = {
12
- translations: CompletedFileTranslationData[];
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,49 +0,0 @@
1
- import { Variable } from './variables';
2
- /**
3
- * Map of data-_gt properties to their corresponding React props
4
- */
5
- export declare const HTML_CONTENT_PROPS: {
6
- readonly pl: "placeholder";
7
- readonly ti: "title";
8
- readonly alt: "alt";
9
- readonly arl: "aria-label";
10
- readonly arb: "aria-labelledby";
11
- readonly ard: "aria-describedby";
12
- };
13
- export type HtmlContentPropKeysRecord = Partial<Record<keyof typeof HTML_CONTENT_PROPS, string>>;
14
- export type HtmlContentPropValuesRecord = Partial<Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>>;
15
- /**
16
- * GTProp is an internal property used to contain data for translating and rendering elements.
17
- * note, transformations are only read on the server side if they are 'plural' or 'branch'
18
- */
19
- export type GTProp = {
20
- b?: Record<string, JsxChildren>;
21
- t?: 'p' | 'b';
22
- } & HtmlContentPropKeysRecord;
23
- export type JsxElement = {
24
- t?: string;
25
- i?: number;
26
- d?: GTProp;
27
- c?: JsxChildren;
28
- };
29
- export type JsxChild = string | JsxElement | Variable;
30
- /**
31
- * The format of the content
32
- */
33
- export type DataFormat = 'JSX' | 'ICU' | 'I18NEXT';
34
- /**
35
- * A content type representing JSX, ICU, and I18next messages
36
- */
37
- export type Content = JsxChildren | IcuMessage | I18nextMessage;
38
- /**
39
- * A content type representing JSX elements
40
- */
41
- export type JsxChildren = JsxChild | JsxChild[];
42
- /**
43
- * A content type representing ICU messages
44
- */
45
- export type IcuMessage = string;
46
- /**
47
- * A content type representing I18next messages
48
- */
49
- export type I18nextMessage = string;
@@ -1,3 +0,0 @@
1
- export type DownloadFileOptions = {
2
- timeout?: number;
3
- };
@@ -1,22 +0,0 @@
1
- export type DownloadFileBatchOptions = {
2
- timeout?: number;
3
- };
4
- export type BatchDownloadResult = {
5
- translationId: string;
6
- fileName?: string;
7
- success: boolean;
8
- content?: string;
9
- contentType?: string;
10
- error?: string;
11
- };
12
- type File = {
13
- id: string;
14
- fileName: string;
15
- data: string;
16
- metadata: any;
17
- };
18
- export type DownloadFileBatchResult = {
19
- files: File[];
20
- count: number;
21
- };
22
- export {};
@@ -1,21 +0,0 @@
1
- import { DataFormat } from './content';
2
- export type { Updates } from './enqueueFiles';
3
- export type EnqueueEntriesOptions = {
4
- timeout?: number;
5
- sourceLocale?: string;
6
- targetLocales?: string[];
7
- dataFormat?: DataFormat;
8
- version?: string;
9
- description?: string;
10
- requireApproval?: boolean;
11
- modelProvider?: string;
12
- };
13
- export type EnqueueEntriesResult = {
14
- versionId: string;
15
- locales: string[];
16
- message: string;
17
- projectSettings: {
18
- cdnEnabled: boolean;
19
- requireApproval: boolean;
20
- };
21
- };
@@ -1,62 +0,0 @@
1
- import { DataFormat, JsxChildren } from './content';
2
- import { CompletedFileTranslationData, FileFormat } from './file';
3
- export type Updates = ({
4
- metadata: Record<string, any>;
5
- } & ({
6
- dataFormat: 'JSX';
7
- source: JsxChildren;
8
- } | {
9
- dataFormat: 'ICU';
10
- source: string;
11
- } | {
12
- dataFormat: 'I18NEXT';
13
- source: string;
14
- }))[];
15
- /**
16
- * File object structure for enqueueing files
17
- * @param content - Content of the file
18
- * @param fileName - Unique identifier for the file (such as the file path + file name)
19
- * @param fileFormat - The format of the file (JSON, MDX, MD, etc.)
20
- * @param formatMetadata - Optional metadata for the file, specific to the format of the file
21
- * @param dataFormat - Optional format of the data within the file
22
- */
23
- export type FileToTranslate = {
24
- content: string;
25
- fileName: string;
26
- fileFormat: FileFormat;
27
- formatMetadata?: Record<string, any>;
28
- dataFormat?: DataFormat;
29
- };
30
- /**
31
- * Options for enqueueing files
32
- * @param publish - Whether to publish the files
33
- * @param requireApproval - Whether to require approval for the files
34
- * @param description - Optional description for the project
35
- * @param sourceLocale - The project's source locale
36
- * @param targetLocales - The locales to translate the files to
37
- * @param version - Optional custom version ID to specify
38
- * @param timeout - Optional timeout for the request
39
- * @param modelProvider - Optional model provider to use
40
- */
41
- export type EnqueueFilesOptions = {
42
- publish?: boolean;
43
- requireApproval?: boolean;
44
- description?: string;
45
- sourceLocale?: string;
46
- targetLocales: string[];
47
- version?: string;
48
- _versionId?: string;
49
- timeout?: number;
50
- modelProvider?: string;
51
- force?: boolean;
52
- };
53
- export type RequiredEnqueueFilesOptions = EnqueueFilesOptions & Required<Pick<EnqueueFilesOptions, 'sourceLocale'>>;
54
- export type EnqueueFilesResult = {
55
- translations: CompletedFileTranslationData[];
56
- data: Record<string, {
57
- fileName: string;
58
- versionId: string;
59
- }>;
60
- locales: string[];
61
- message: string;
62
- };
@@ -1,39 +0,0 @@
1
- import { Content, DataFormat } from '../types';
2
- /**
3
- * ActionType is the type of action to perform on the request.
4
- *
5
- * @param standard - The standard action type (standard model).
6
- * @param fast - The fast action type (mini model).
7
- * @param string - Other model
8
- */
9
- export type ActionType = 'standard' | 'fast' | string;
10
- /**
11
- * EntryMetadata is the metadata for a GTRequest.
12
- *
13
- * @param context - The context of the request.
14
- * @param id - The id of the request.
15
- * @param hash - The hash of the request.
16
- */
17
- export type EntryMetadata = {
18
- context?: string;
19
- id?: string;
20
- hash?: string;
21
- dataFormat?: DataFormat;
22
- sourceLocale?: string;
23
- actionType?: ActionType;
24
- timeout?: number;
25
- regionCode?: string;
26
- scriptCode?: string;
27
- };
28
- /**
29
- * GTRequest is a translation request object for {@link JsxChildren} | {@link IcuMessage} | {@link I18nextMessage}
30
- *
31
- * @param source - The source content to translate.
32
- * @param targetLocale - The target locale to translate to.
33
- * @param metadata - The metadata for the request.
34
- */
35
- export type Entry = {
36
- source: Content;
37
- targetLocale?: string;
38
- metadata?: EntryMetadata;
39
- };
@@ -1,11 +0,0 @@
1
- export type FetchTranslationsOptions = {
2
- timeout?: number;
3
- };
4
- export type RetrievedTranslation = {
5
- locale: string;
6
- translation: any;
7
- };
8
- export type RetrievedTranslations = RetrievedTranslation[];
9
- export type FetchTranslationsResult = {
10
- translations: RetrievedTranslations;
11
- };
@@ -1,23 +0,0 @@
1
- import { Entry } from './entry';
2
- export type FileFormat = 'GTJSON' | 'JSON' | 'YAML' | 'MDX' | 'MD' | 'TS' | 'JS' | 'HTML';
3
- export type FileMetadata = {
4
- filePath: string;
5
- fileFormat: FileFormat;
6
- context?: string;
7
- sourceLocale?: string;
8
- hash?: string;
9
- };
10
- export type File = {
11
- source: Entry[] | string;
12
- fileMetadata: FileMetadata;
13
- };
14
- export type CompletedFileTranslationData = {
15
- locale: string;
16
- metadata: any;
17
- fileId: string;
18
- fileName: string;
19
- versionId: string;
20
- id: string;
21
- isReady: boolean;
22
- downloadUrl: string;
23
- };
@@ -1,7 +0,0 @@
1
- export type ProjectData = {
2
- id: string;
3
- name: string;
4
- orgId: string;
5
- defaultLocale: string;
6
- currentLocales: string[];
7
- };
@@ -1,34 +0,0 @@
1
- import { I18nextMessage, IcuMessage, JsxChildren } from './content';
2
- /**
3
- * TranslationResultReference is used to store the reference for a translation result.
4
- */
5
- export type TranslationResultReference = {
6
- id?: string;
7
- hash: string;
8
- };
9
- /**
10
- * TypedResult is a union type that represents the different types of translations that can be returned.
11
- */
12
- export type TypedResult = {
13
- translation: JsxChildren;
14
- dataFormat: 'JSX';
15
- } | {
16
- translation: I18nextMessage | IcuMessage;
17
- dataFormat: 'ICU' | 'I18NEXT';
18
- };
19
- /**
20
- * RequestError is a type that represents an error that occurred during a translation request.
21
- */
22
- export type TranslationError = {
23
- error: string;
24
- code: number;
25
- reference?: TranslationResultReference;
26
- };
27
- /**
28
- * RequestSuccess is a type that represents a successful translation request.
29
- */
30
- export type RequestSuccess = TypedResult & {
31
- locale: string;
32
- reference: TranslationResultReference;
33
- };
34
- export type TranslationResult = RequestSuccess | TranslationError;
@@ -1,5 +0,0 @@
1
- import { TranslationResult } from './translate';
2
- /**
3
- * BatchTranslationResult is the result of a batch translation request.
4
- */
5
- export type TranslateManyResult = Array<TranslationResult>;
@@ -1,9 +0,0 @@
1
- export type TranslationStatusResult = {
2
- count: number;
3
- availableLocales: string[];
4
- locales: string[];
5
- localesWaitingForApproval: any[];
6
- };
7
- export type CheckTranslationStatusOptions = {
8
- timeout?: number;
9
- };
@@ -1,38 +0,0 @@
1
- import { DataFormat } from './content';
2
- import { FileFormat } from './file';
3
- export type FileUpload = {
4
- content: string;
5
- fileName: string;
6
- fileFormat: FileFormat;
7
- dataFormat?: DataFormat;
8
- locale: string;
9
- versionId?: string;
10
- fileId?: string;
11
- };
12
- export type FileUploadRef = {
13
- fileId: string;
14
- versionId: string;
15
- fileName: string;
16
- fileFormat: FileFormat;
17
- dataFormat?: DataFormat;
18
- locale?: string;
19
- };
20
- export type UploadData = {
21
- data: {
22
- source: FileUpload;
23
- translations: FileUpload[];
24
- }[];
25
- sourceLocale: string;
26
- modelProvider?: string;
27
- };
28
- export type UploadFilesOptions = {
29
- sourceLocale: string;
30
- modelProvider?: string;
31
- timeout?: number;
32
- };
33
- export type UploadFilesResponse = {
34
- uploadedFiles: FileUploadRef[];
35
- count: number;
36
- message: string;
37
- };
38
- export type RequiredUploadFilesOptions = UploadFilesOptions & Required<Pick<UploadFilesOptions, 'sourceLocale'>>;
@@ -1,9 +0,0 @@
1
- export type VariableType = 'v' | 'n' | 'd' | 'c';
2
- /**
3
- * Variables are used to store the variable name and type.
4
- */
5
- export type Variable = {
6
- k: string;
7
- i?: number;
8
- v?: VariableType;
9
- };
@@ -1,2 +0,0 @@
1
- export declare function encode(data: string): string;
2
- export declare function decode(base64: string): string;
@@ -1,2 +0,0 @@
1
- import { Variable } from '../types';
2
- export default function isVariable(obj: unknown): obj is Variable;
@@ -1,2 +0,0 @@
1
- import { VariableTransformationSuffix, VariableType } from '../types';
2
- export declare function minifyVariableType(variableType: VariableTransformationSuffix): VariableType;