@crowdin/app-project-module 1.15.1 → 2.0.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.
Files changed (101) hide show
  1. package/out/index.js +8 -15
  2. package/out/middlewares/auto-credentials-masker.js +5 -2
  3. package/out/middlewares/crowdin-client.d.ts +1 -1
  4. package/out/middlewares/crowdin-client.js +1 -1
  5. package/out/middlewares/export.d.ts +2 -2
  6. package/out/middlewares/export.js +4 -35
  7. package/out/middlewares/json-response.d.ts +1 -1
  8. package/out/middlewares/json-response.js +1 -1
  9. package/out/modules/ai-prompt-provider/index.js +6 -6
  10. package/out/modules/ai-provider/index.js +7 -7
  11. package/out/modules/ai-provider/types.d.ts +10 -0
  12. package/out/modules/ai-provider/types.js +12 -0
  13. package/out/modules/ai-provider/util/index.d.ts +0 -10
  14. package/out/modules/ai-provider/util/index.js +2 -13
  15. package/out/modules/ai-request-processors/index.js +4 -4
  16. package/out/modules/api/api.js +18 -18
  17. package/out/modules/auth-guard/index.js +4 -5
  18. package/out/modules/automation-action/index.js +4 -6
  19. package/out/modules/context-menu/index.js +4 -13
  20. package/out/modules/custom-mt/index.js +4 -4
  21. package/out/modules/custom-spell-check/index.js +11 -11
  22. package/out/modules/editor-right-panel/index.js +1 -1
  23. package/out/modules/external-qa-check/index.js +7 -7
  24. package/out/modules/file-processing/index.js +14 -14
  25. package/out/modules/integration/index.js +26 -26
  26. package/out/modules/integration/types.d.ts +4 -4
  27. package/out/modules/integration/util/files.js +1 -1
  28. package/out/modules/integration/util/types.d.ts +1 -1
  29. package/out/modules/manifest.js +70 -281
  30. package/out/modules/modal/index.js +4 -13
  31. package/out/modules/organization-menu/index.js +1 -1
  32. package/out/modules/organization-settings-menu/index.js +1 -1
  33. package/out/modules/profile-resources-menu/index.js +1 -1
  34. package/out/modules/profile-settings-menu/index.js +1 -1
  35. package/out/modules/project-menu/index.js +1 -1
  36. package/out/modules/project-menu-crowdsource/index.js +1 -1
  37. package/out/modules/project-reports/index.js +1 -1
  38. package/out/modules/project-tools/index.js +1 -1
  39. package/out/modules/webhooks/index.js +3 -6
  40. package/out/modules/workflow-step-type/index.js +6 -6
  41. package/out/static/ui/form.bundle.js +7947 -6975
  42. package/out/static/ui/form.bundle.js.map +1 -1
  43. package/out/storage/drizzle/d1/index.d.ts +7 -0
  44. package/out/storage/drizzle/d1/index.js +48 -0
  45. package/out/storage/drizzle/d1/migrations/init.d.ts +2 -0
  46. package/out/storage/drizzle/d1/migrations/init.js +122 -0
  47. package/out/storage/drizzle/d1/types.d.ts +13 -0
  48. package/out/storage/drizzle/d1/types.js +38 -0
  49. package/out/storage/{sqlite.d.ts → drizzle/index.d.ts} +37 -58
  50. package/out/storage/drizzle/index.js +939 -0
  51. package/out/storage/drizzle/postgresql/config.d.ts +5 -0
  52. package/out/storage/drizzle/postgresql/config.js +11 -0
  53. package/out/storage/drizzle/postgresql/index.d.ts +14 -0
  54. package/out/storage/drizzle/postgresql/index.js +144 -0
  55. package/out/storage/drizzle/postgresql/migrations/0000_init.sql +113 -0
  56. package/out/storage/drizzle/postgresql/migrations/0001_init_indexes.sql +28 -0
  57. package/out/storage/drizzle/postgresql/migrations/meta/0000_snapshot.json +646 -0
  58. package/out/storage/drizzle/postgresql/migrations/meta/0001_snapshot.json +646 -0
  59. package/out/storage/drizzle/postgresql/migrations/meta/_journal.json +20 -0
  60. package/out/storage/drizzle/postgresql/schema.d.ts +1410 -0
  61. package/out/storage/drizzle/postgresql/schema.js +106 -0
  62. package/out/storage/drizzle/sqlite/config.d.ts +5 -0
  63. package/out/storage/drizzle/sqlite/config.js +11 -0
  64. package/out/storage/drizzle/sqlite/index.d.ts +8 -0
  65. package/out/storage/drizzle/sqlite/index.js +63 -0
  66. package/out/storage/drizzle/sqlite/migrations/0000_init.sql +113 -0
  67. package/out/storage/drizzle/sqlite/migrations/meta/0000_snapshot.json +687 -0
  68. package/out/storage/drizzle/sqlite/migrations/meta/_journal.json +13 -0
  69. package/out/storage/drizzle/sqlite/schema.d.ts +1544 -0
  70. package/out/storage/drizzle/sqlite/schema.js +106 -0
  71. package/out/storage/index.d.ts +2 -88
  72. package/out/storage/index.js +12 -128
  73. package/out/storage/internal/backup.d.ts +3 -0
  74. package/out/storage/internal/backup.js +94 -0
  75. package/out/storage/types.d.ts +66 -0
  76. package/out/types.d.ts +43 -47
  77. package/out/util/credentials-masker.js +2 -2
  78. package/out/util/export.d.ts +1 -0
  79. package/out/util/export.js +2 -1
  80. package/out/util/index.d.ts +2 -1
  81. package/out/util/index.js +12 -9
  82. package/out/util/normalize-module.d.ts +0 -1
  83. package/out/util/normalize-module.js +0 -4
  84. package/package.json +23 -23
  85. package/out/modules/ai-tools/handlers/tool-calls.d.ts +0 -4
  86. package/out/modules/ai-tools/handlers/tool-calls.js +0 -52
  87. package/out/modules/ai-tools/index.d.ts +0 -10
  88. package/out/modules/ai-tools/index.js +0 -46
  89. package/out/modules/ai-tools/types.d.ts +0 -63
  90. package/out/modules/ai-tools/types.js +0 -2
  91. package/out/modules/ai-tools/util/index.d.ts +0 -5
  92. package/out/modules/ai-tools/util/index.js +0 -24
  93. package/out/storage/d1.d.ts +0 -107
  94. package/out/storage/d1.js +0 -837
  95. package/out/storage/export.d.ts +0 -1
  96. package/out/storage/export.js +0 -2
  97. package/out/storage/mysql.d.ts +0 -109
  98. package/out/storage/mysql.js +0 -984
  99. package/out/storage/postgre.d.ts +0 -124
  100. package/out/storage/postgre.js +0 -1027
  101. package/out/storage/sqlite.js +0 -786
@@ -0,0 +1,7 @@
1
+ import type { D1Database } from '@cloudflare/workers-types';
2
+ import { D1_DB, Migration } from './types';
3
+ export declare function initD1({ database, additionalSchema, }: {
4
+ database: D1Database;
5
+ additionalSchema?: Record<string, unknown>;
6
+ }): D1_DB;
7
+ export declare const migrateD1: (db: D1_DB, additionalMigrations?: Migration[]) => Promise<void>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.migrateD1 = void 0;
13
+ exports.initD1 = initD1;
14
+ const d1_1 = require("drizzle-orm/d1");
15
+ const init_1 = require("./migrations/init");
16
+ const types_1 = require("./types");
17
+ function initD1({ database, additionalSchema, }) {
18
+ return (0, d1_1.drizzle)(database, { schema: Object.assign(Object.assign({}, types_1.D1_SCHEMA), additionalSchema) });
19
+ }
20
+ const migrations = [init_1.INIT_MIGRATION];
21
+ const migrationHistoryTableName = '__drizzle_migrations';
22
+ const migrateD1 = (db_1, ...args_1) => __awaiter(void 0, [db_1, ...args_1], void 0, function* (db, additionalMigrations = []) {
23
+ const allMigrations = [...migrations, ...additionalMigrations];
24
+ const uniqueMigrationNames = new Set(allMigrations.map((migration) => migration.name));
25
+ if (uniqueMigrationNames.size !== allMigrations.length) {
26
+ throw new Error('Migration names must be unique');
27
+ }
28
+ // Ensure migration history table exists
29
+ yield db.$client
30
+ .prepare(`CREATE TABLE IF NOT EXISTS ${migrationHistoryTableName} (
31
+ name varchar not null primary key,
32
+ created_at varchar not null
33
+ )`)
34
+ .run();
35
+ // Get list of applied migrations
36
+ const appliedMigrationsResult = yield db.$client.prepare(`SELECT name FROM ${migrationHistoryTableName}`).all();
37
+ const appliedMigrations = new Set(appliedMigrationsResult.results.map((row) => row.name));
38
+ // Filter out migrations that have already been applied
39
+ const pendingMigrations = allMigrations.filter((migration) => !appliedMigrations.has(migration.name));
40
+ for (const migration of pendingMigrations) {
41
+ yield migration.run(db);
42
+ yield db.$client
43
+ .prepare(`INSERT INTO ${migrationHistoryTableName} (name, created_at) VALUES (?, ?)`)
44
+ .bind(migration.name, Date.now().toString())
45
+ .run();
46
+ }
47
+ });
48
+ exports.migrateD1 = migrateD1;
@@ -0,0 +1,2 @@
1
+ import { Migration } from '../types';
2
+ export declare const INIT_MIGRATION: Migration;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.INIT_MIGRATION = void 0;
13
+ const types_1 = require("../../../../modules/integration/util/types");
14
+ exports.INIT_MIGRATION = {
15
+ name: 'init',
16
+ run: (db) => __awaiter(void 0, void 0, void 0, function* () {
17
+ const statements = [];
18
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS crowdin_credentials (
19
+ id varchar not null primary key,
20
+ app_secret varchar null,
21
+ domain varchar null,
22
+ user_id varchar null,
23
+ agent_id varchar null,
24
+ organization_id varchar null,
25
+ base_url varchar null,
26
+ access_token varchar not null,
27
+ refresh_token varchar not null,
28
+ expire varchar not null,
29
+ type varchar not null
30
+ )`));
31
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS integration_credentials (
32
+ id varchar not null primary key,
33
+ credentials varchar not null,
34
+ crowdin_id varchar not null,
35
+ managers varchar null
36
+ )`));
37
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS sync_settings (
38
+ id integer not null primary key autoincrement,
39
+ files varchar null,
40
+ integration_id varchar not null,
41
+ crowdin_id varchar not null,
42
+ type varchar not null,
43
+ provider varchar not null
44
+ )`));
45
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS app_metadata (
46
+ id varchar not null primary key,
47
+ data varchar null,
48
+ crowdin_id varchar null
49
+ )`));
50
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS files_snapshot (
51
+ id integer not null primary key autoincrement,
52
+ integration_id varchar not null,
53
+ crowdin_id varchar not null,
54
+ files varchar null,
55
+ provider varchar not null
56
+ )`));
57
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS webhooks (
58
+ id integer not null primary key autoincrement,
59
+ file_id varchar not null,
60
+ integration_id varchar not null,
61
+ crowdin_id varchar not null,
62
+ provider varchar not null
63
+ )`));
64
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS user_errors (
65
+ id integer not null primary key autoincrement,
66
+ action varchar not null,
67
+ message varchar not null,
68
+ data varchar null,
69
+ created_at varchar not null,
70
+ crowdin_id varchar not null,
71
+ integration_id varchar null
72
+ )`));
73
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS integration_settings (
74
+ id integer not null primary key autoincrement,
75
+ integration_id varchar not null,
76
+ crowdin_id varchar not null,
77
+ config varchar null
78
+ )`));
79
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS job (
80
+ id varchar not null primary key,
81
+ integration_id varchar not null,
82
+ crowdin_id varchar not null,
83
+ type varchar not null,
84
+ title varchar null,
85
+ progress integer DEFAULT 0,
86
+ status varchar DEFAULT '${types_1.JobStatus.CREATED}',
87
+ payload varchar null,
88
+ info varchar null,
89
+ data varchar null,
90
+ attempt varchar DEFAULT 0,
91
+ errors varchar null,
92
+ processed_entities varchar null,
93
+ initiated_by varchar null,
94
+ created_at varchar not null,
95
+ updated_at varchar null,
96
+ finished_at varchar null
97
+ )`));
98
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS translation_file_cache (
99
+ id integer not null primary key autoincrement,
100
+ integration_id varchar not null,
101
+ crowdin_id varchar not null,
102
+ file_id integer not null,
103
+ language_id varchar not null,
104
+ etag varchar
105
+ )`));
106
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS unsynced_files (
107
+ id integer not null primary key autoincrement,
108
+ integration_id varchar not null,
109
+ crowdin_id varchar not null,
110
+ files varchar null
111
+ )`));
112
+ statements.push(db.$client.prepare(`CREATE TABLE IF NOT EXISTS synced_data (
113
+ id integer not null primary key autoincrement,
114
+ files varchar null,
115
+ integration_id varchar not null,
116
+ crowdin_id varchar not null,
117
+ type varchar not null,
118
+ updated_at varchar null
119
+ )`));
120
+ yield db.$client.batch(statements);
121
+ }),
122
+ };
@@ -0,0 +1,13 @@
1
+ import { D1Database } from '@cloudflare/workers-types';
2
+ import * as schema from '../sqlite/schema';
3
+ export declare const D1_SCHEMA: typeof schema;
4
+ export type D1StorageConfig = {
5
+ database: D1Database;
6
+ };
7
+ export type Migration = {
8
+ name: string;
9
+ run: (db: D1_DB) => Promise<void> | void;
10
+ };
11
+ export type D1_DB = import('drizzle-orm/d1').DrizzleD1Database<typeof schema> & {
12
+ $client: D1Database;
13
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.D1_SCHEMA = void 0;
37
+ const schema = __importStar(require("../sqlite/schema"));
38
+ exports.D1_SCHEMA = schema;
@@ -1,40 +1,29 @@
1
- import { Storage } from '.';
2
- import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks, Provider } from '../modules/integration/types';
3
- import { CreateJobParams, GetActiveJobsParams, GetAllJobsParams, GetFileTranslationCache, GetFileTranslationCacheByLanguageParams, GetJobParams, GetUnsyncedFiles, IntegrationSyncedData, Job, TranslationCache, UnsyncedFiles, UpdateJobParams, UpdateTranslationCacheParams } from '../modules/integration/util/types';
4
- import { CrowdinCredentials } from '../types';
5
- import { UserErrors } from './types';
6
- export interface SQLiteStorageConfig {
7
- dbFolder: string;
8
- }
9
- export declare class SQLiteStorage implements Storage {
10
- private config;
11
- private db;
12
- tables: {
13
- crowdin_credentials: string;
14
- integration_credentials: string;
15
- sync_settings: string;
16
- app_metadata: string;
17
- files_snapshot: string;
18
- webhooks: string;
19
- user_errors: string;
20
- integration_settings: string;
21
- job: string;
22
- translation_file_cache: string;
23
- unsynced_files: string;
24
- synced_data: string;
25
- };
26
- constructor(config: SQLiteStorageConfig);
27
- private addColumn;
28
- private updateTables;
29
- migrate(skipOnboarding?: boolean): Promise<void>;
1
+ import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks, Provider } from '../../modules/integration/types';
2
+ import { CreateJobParams, GetActiveJobsParams, GetAllJobsParams, GetFileTranslationCache, GetFileTranslationCacheByLanguageParams, GetJobParams, GetUnsyncedFiles, IntegrationSyncedData, Job, TranslationCache, UnsyncedFiles, UpdateJobParams, UpdateTranslationCacheParams } from '../../modules/integration/util/types';
3
+ import { Config, CrowdinCredentials, UnauthorizedConfig } from '../../types';
4
+ import { DB_TYPE, Storage, UserErrors } from '../types';
5
+ import { POSTGRESQL_DB, POSTGRESQL_SCHEMA } from './postgresql';
6
+ export declare class DrizzleStorage implements Storage {
7
+ readonly db: POSTGRESQL_DB;
8
+ protected readonly schema: typeof POSTGRESQL_SCHEMA;
9
+ protected readonly type: DB_TYPE;
10
+ protected readonly migrationPromise: Promise<void>;
11
+ protected migrated: boolean;
12
+ protected readonly config: Config | UnauthorizedConfig;
13
+ constructor({ config, type, delayedMigration, }: {
14
+ config: Config | UnauthorizedConfig;
15
+ type: DB_TYPE;
16
+ delayedMigration?: boolean;
17
+ });
18
+ migrateDelayed(): Promise<void>;
30
19
  saveCrowdinCredentials(credentials: CrowdinCredentials): Promise<void>;
31
20
  updateCrowdinCredentials(credentials: CrowdinCredentials): Promise<void>;
32
21
  getCrowdinCredentials(id: string): Promise<CrowdinCredentials | undefined>;
33
22
  getAllCrowdinCredentials(): Promise<CrowdinCredentials[]>;
34
23
  deleteCrowdinCredentials(id: string): Promise<void>;
35
- saveIntegrationCredentials(id: string, credentials: any, crowdinId: string): Promise<void>;
36
- updateIntegrationCredentials(id: string, credentials: any): Promise<void>;
37
- updateIntegrationManagers(id: string, managers: any): Promise<void>;
24
+ saveIntegrationCredentials(id: string, credentials: string, crowdinId: string): Promise<void>;
25
+ updateIntegrationCredentials(id: string, credentials: string): Promise<void>;
26
+ updateIntegrationManagers(id: string, managers: string): Promise<void>;
38
27
  getIntegrationCredentials(id: string): Promise<IntegrationCredentials | undefined>;
39
28
  getAllIntegrationCredentials(crowdinId: string): Promise<IntegrationCredentials[]>;
40
29
  deleteIntegrationCredentials(id: string): Promise<void>;
@@ -46,31 +35,31 @@ export declare class SQLiteStorage implements Storage {
46
35
  deleteMetadata(id: string): Promise<void>;
47
36
  getSyncSettingsByProvider(integrationId: string, provider: Provider): Promise<IntegrationSyncSettings | undefined>;
48
37
  getSyncSettingsBySchedule(type: string, schedule: string): Promise<IntegrationSyncSettings[]>;
49
- saveSyncSettings(files: any, integrationId: string, crowdinId: string, type: string, provider: Provider): Promise<void>;
50
- updateSyncSettings(files: any, integrationId: string, crowdinId: string, type: string, provider: Provider): Promise<void>;
38
+ saveSyncSettings(files: string, integrationId: string, crowdinId: string, type: string, provider: Provider): Promise<void>;
39
+ updateSyncSettings(files: string, integrationId: string, crowdinId: string, type: string, provider: Provider): Promise<void>;
51
40
  getSyncSettings(integrationId: string, crowdinId: string, type: string, provider: Provider): Promise<IntegrationSyncSettings | undefined>;
52
- saveFilesSnapshot(files: any, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
53
- updateFilesSnapshot(files: any, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
41
+ saveFilesSnapshot(files: string, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
42
+ updateFilesSnapshot(files: string, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
54
43
  getFilesSnapshot(integrationId: string, crowdinId: string, provider: Provider): Promise<IntegrationFilesSnapshot | undefined>;
55
44
  getAllWebhooks(integrationId: string, crowdinId: string, provider: Provider): Promise<IntegrationWebhooks[] | undefined>;
56
45
  getWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<IntegrationWebhooks | undefined>;
57
46
  saveWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
58
- deleteWebhooks(fileIds: any[], integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
47
+ deleteWebhooks(fileIds: string[], integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
59
48
  getAllUserErrors(crowdinId: string, integrationId?: string): Promise<UserErrors[] | undefined>;
60
- saveUserError(action: string, message: string, data: any, createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
61
- deleteUserErrors(date: string, crowdinId: string, integrationId?: string): Promise<void>;
62
- deleteAllUsersErrorsOlderThan(date: string): Promise<void>;
63
- saveIntegrationConfig(integrationId: string, crowdinId: string, config: any): Promise<void>;
49
+ saveUserError(action: string, message: string, data: string, createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
50
+ deleteUserErrors(createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
51
+ deleteAllUsersErrorsOlderThan(createdAt: string): Promise<void>;
52
+ saveIntegrationConfig(integrationId: string, crowdinId: string, config: string): Promise<void>;
64
53
  getAllIntegrationConfigs(crowdinId: string): Promise<IntegrationConfig[]>;
65
54
  getIntegrationConfig(integrationId: string): Promise<IntegrationConfig | undefined>;
66
- updateIntegrationConfig(integrationId: string, config: any): Promise<void>;
55
+ updateIntegrationConfig(integrationId: string, config: string): Promise<void>;
67
56
  createJob(params: CreateJobParams): Promise<string>;
68
- updateJob({ id, progress, status, info, data, attempt, errors, processedEntities, }: UpdateJobParams): Promise<void>;
57
+ updateJob(params: UpdateJobParams): Promise<void>;
69
58
  getJob(params: GetJobParams): Promise<Job | undefined>;
70
59
  getActiveJobs(params: GetActiveJobsParams): Promise<Job[] | undefined>;
71
60
  deleteFinishedJobs(): Promise<void>;
72
61
  getAllInProgressJobs(): Promise<Job[] | undefined>;
73
- getAllJobs({ integrationId, crowdinId, limit, offset }: GetAllJobsParams): Promise<Job[] | undefined>;
62
+ getAllJobs(params: GetAllJobsParams): Promise<Job[] | undefined>;
74
63
  saveTranslationCache(params: TranslationCache): Promise<void>;
75
64
  getFileTranslationCache(params: GetFileTranslationCache): Promise<TranslationCache[] | undefined>;
76
65
  getFileTranslationCacheByLanguage(params: GetFileTranslationCacheByLanguageParams): Promise<TranslationCache | undefined>;
@@ -78,19 +67,9 @@ export declare class SQLiteStorage implements Storage {
78
67
  saveUnsyncedFiles(params: UnsyncedFiles): Promise<void>;
79
68
  getUnsyncedFiles(params: GetUnsyncedFiles): Promise<UnsyncedFiles | undefined>;
80
69
  updateUnsyncedFiles(params: UnsyncedFiles): Promise<void>;
81
- registerCustomTable(tableName: string, schema: Record<string, string>): Promise<void>;
82
- insertRecord(tableName: string, data: Record<string, any>): Promise<void>;
83
- selectRecords(tableName: string, options?: {
84
- columns?: string[];
85
- whereClause?: string;
86
- orderBy?: string;
87
- limit?: number;
88
- offset?: number;
89
- distinct?: boolean;
90
- }, params?: any[]): Promise<any[]>;
91
- updateRecord(tableName: string, data: Record<string, any>, whereClause: string, params?: any[]): Promise<void>;
92
- deleteRecord(tableName: string, whereClause: string, params?: any[]): Promise<void>;
93
- saveSyncedData(files: any, integrationId: string, crowdinId: string, type: string): Promise<void>;
94
- updateSyncedData(files: any, integrationId: string, crowdinId: string, type: string): Promise<void>;
70
+ saveSyncedData(files: string, integrationId: string, crowdinId: string, type: string): Promise<void>;
71
+ updateSyncedData(files: string, integrationId: string, crowdinId: string, type: string): Promise<void>;
95
72
  getSyncedData(integrationId: string, crowdinId: string, type: string): Promise<IntegrationSyncedData | undefined>;
73
+ private toString;
74
+ private toNumber;
96
75
  }