@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
@@ -1 +0,0 @@
1
- export { Storage } from './';
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,109 +0,0 @@
1
- import { Storage } from '.';
2
- import { CrowdinCredentials } from '../types';
3
- import { CreateJobParams, GetActiveJobsParams, GetJobParams, GetFileTranslationCacheByLanguageParams, Job, TranslationCache, UpdateJobParams, UpdateTranslationCacheParams, GetFileTranslationCache, UnsyncedFiles, GetUnsyncedFiles, IntegrationSyncedData, GetAllJobsParams } from '../modules/integration/util/types';
4
- import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks } from '../modules/integration/types';
5
- import { UserErrors } from './types';
6
- export interface MySQLStorageConfig {
7
- uri?: string;
8
- host?: string;
9
- user?: string;
10
- password?: string;
11
- database?: string;
12
- port?: number;
13
- }
14
- export declare class MySQLStorage implements Storage {
15
- private mysql;
16
- private _res?;
17
- private _rej?;
18
- private dbPromise;
19
- private config;
20
- tableIndexes: {
21
- [key: string]: {
22
- [key: string]: string;
23
- };
24
- };
25
- tables: {
26
- crowdin_credentials: string;
27
- integration_credentials: string;
28
- sync_settings: string;
29
- app_metadata: string;
30
- files_snapshot: string;
31
- webhooks: string;
32
- user_errors: string;
33
- integration_settings: string;
34
- job: string;
35
- translation_file_cache: string;
36
- unsynced_files: string;
37
- synced_data: string;
38
- };
39
- constructor(config: MySQLStorageConfig);
40
- executeQuery<T>(command: (connection: any) => Promise<T>): Promise<T>;
41
- migrate(skipOnboarding?: boolean): Promise<void>;
42
- addTables(connection: any): Promise<void>;
43
- saveCrowdinCredentials(credentials: CrowdinCredentials): Promise<void>;
44
- updateCrowdinCredentials(credentials: CrowdinCredentials): Promise<void>;
45
- getCrowdinCredentials(id: string): Promise<CrowdinCredentials | undefined>;
46
- getAllCrowdinCredentials(): Promise<CrowdinCredentials[]>;
47
- deleteCrowdinCredentials(id: string): Promise<void>;
48
- saveIntegrationCredentials(id: string, credentials: any, crowdinId: string): Promise<void>;
49
- updateIntegrationCredentials(id: string, credentials: any): Promise<void>;
50
- updateIntegrationManagers(id: string, managers: any): Promise<void>;
51
- getIntegrationCredentials(id: string): Promise<IntegrationCredentials | undefined>;
52
- getAllIntegrationCredentials(crowdinId: string): Promise<IntegrationCredentials[]>;
53
- deleteIntegrationCredentials(id: string): Promise<void>;
54
- deleteAllIntegrationCredentials(crowdinId: string): Promise<void>;
55
- saveMetadata(id: string, metadata: any, crowdinId: string): Promise<void>;
56
- updateMetadata(id: string, metadata: any, crowdinId: string): Promise<void>;
57
- getMetadata(id: string): Promise<any>;
58
- getAllMetadata(): Promise<any[]>;
59
- deleteMetadata(id: string): Promise<void>;
60
- getSyncSettingsByProvider(integrationId: string, provider: string): Promise<IntegrationSyncSettings | undefined>;
61
- getSyncSettingsBySchedule(type: string, schedule: string): Promise<IntegrationSyncSettings[]>;
62
- saveSyncSettings(files: any, integrationId: string, crowdinId: string, type: string, provider: string): Promise<void>;
63
- updateSyncSettings(files: any, integrationId: string, crowdinId: string, type: string, provider: string): Promise<void>;
64
- getSyncSettings(integrationId: string, crowdinId: string, type: string, provider: string): Promise<IntegrationSyncSettings | undefined>;
65
- saveFilesSnapshot(files: any, integrationId: string, crowdinId: string, provider: string): Promise<void>;
66
- updateFilesSnapshot(files: any, integrationId: string, crowdinId: string, provider: string): Promise<void>;
67
- getFilesSnapshot(integrationId: string, crowdinId: string, provider: string): Promise<IntegrationFilesSnapshot | undefined>;
68
- getAllWebhooks(integrationId: string, crowdinId: string, provider: string): Promise<IntegrationWebhooks[] | undefined>;
69
- getWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: string): Promise<IntegrationWebhooks | undefined>;
70
- saveWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: string): Promise<void>;
71
- deleteWebhooks(fileIds: any[], integrationId: string, crowdinId: string, provider: string): Promise<void>;
72
- getAllUserErrors(crowdinId: string, integrationId?: string): Promise<UserErrors[] | undefined>;
73
- saveUserError(action: string, message: string, data: any, createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
74
- deleteUserErrors(createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
75
- deleteAllUsersErrorsOlderThan(createdAt: string): Promise<void>;
76
- saveIntegrationConfig(integrationId: string, crowdinId: string, config: any): Promise<void>;
77
- getAllIntegrationConfigs(crowdinId: string): Promise<IntegrationConfig[]>;
78
- getIntegrationConfig(integrationId: string): Promise<IntegrationConfig | undefined>;
79
- updateIntegrationConfig(integrationId: string, config: any): Promise<void>;
80
- createJob({ integrationId, crowdinId, type, title, payload, initiatedBy }: CreateJobParams): Promise<string>;
81
- updateJob({ id, progress, status, info, data, attempt, errors, processedEntities, }: UpdateJobParams): Promise<void>;
82
- getJob({ id }: GetJobParams): Promise<Job | undefined>;
83
- getActiveJobs({ integrationId, crowdinId }: GetActiveJobsParams): Promise<Job[] | undefined>;
84
- deleteFinishedJobs(): Promise<void>;
85
- getAllInProgressJobs(): Promise<Job[] | undefined>;
86
- getAllJobs({ integrationId, crowdinId, limit, offset }: GetAllJobsParams): Promise<Job[] | undefined>;
87
- saveTranslationCache({ integrationId, crowdinId, fileId, languageId, etag, }: TranslationCache): Promise<void>;
88
- getFileTranslationCache({ integrationId, crowdinId, fileId, }: GetFileTranslationCache): Promise<TranslationCache[] | undefined>;
89
- getFileTranslationCacheByLanguage({ integrationId, crowdinId, fileId, languageId, }: GetFileTranslationCacheByLanguageParams): Promise<TranslationCache | undefined>;
90
- updateTranslationCache({ integrationId, crowdinId, fileId, languageId, etag, }: UpdateTranslationCacheParams): Promise<void>;
91
- saveUnsyncedFiles({ integrationId, crowdinId, files }: UnsyncedFiles): Promise<void>;
92
- updateUnsyncedFiles({ integrationId, crowdinId, files }: UnsyncedFiles): Promise<void>;
93
- getUnsyncedFiles({ integrationId, crowdinId }: GetUnsyncedFiles): Promise<UnsyncedFiles | undefined>;
94
- registerCustomTable(tableName: string, schema: Record<string, string>): Promise<void>;
95
- insertRecord(tableName: string, data: Record<string, any>): Promise<void>;
96
- selectRecords(tableName: string, options?: {
97
- columns?: string[];
98
- whereClause?: string;
99
- orderBy?: string;
100
- limit?: number;
101
- offset?: number;
102
- distinct?: boolean;
103
- }, params?: any[]): Promise<any[]>;
104
- updateRecord(tableName: string, data: Record<string, any>, whereClause: string, params?: any[]): Promise<void>;
105
- deleteRecord(tableName: string, whereClause: string, params?: any[]): Promise<void>;
106
- saveSyncedData(files: any, integrationId: string, crowdinId: string, type: string): Promise<void>;
107
- updateSyncedData(files: any, integrationId: string, crowdinId: string, type: string): Promise<void>;
108
- getSyncedData(integrationId: string, crowdinId: string, type: string): Promise<IntegrationSyncedData | undefined>;
109
- }