@crowdin/app-project-module 0.43.1 → 0.45.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.
- package/out/index.d.ts +3 -3
- package/out/index.js +103 -219
- package/out/middlewares/crowdin-client.d.ts +1 -1
- package/out/middlewares/crowdin-client.js +3 -2
- package/out/middlewares/integration-credentials.d.ts +3 -2
- package/out/middlewares/render-ui-module.d.ts +2 -2
- package/out/middlewares/ui-module.d.ts +2 -2
- package/out/middlewares/ui-module.js +5 -1
- package/out/{util → modules}/api/api.d.ts +3 -2
- package/out/{util → modules}/api/api.js +22 -22
- package/out/modules/api/index.d.ts +6 -0
- package/out/modules/api/index.js +14 -0
- package/out/modules/api/types.d.ts +20 -0
- package/out/modules/api/types.js +11 -0
- package/out/modules/context-menu/index.d.ts +6 -0
- package/out/modules/context-menu/index.js +17 -0
- package/out/modules/context-menu/types.d.ts +27 -0
- package/out/modules/context-menu/types.js +18 -0
- package/out/{handlers/custom-mt → modules/custom-mt/handlers}/translate.d.ts +2 -1
- package/out/{handlers/custom-mt → modules/custom-mt/handlers}/translate.js +2 -2
- package/out/modules/custom-mt/index.d.ts +6 -0
- package/out/modules/custom-mt/index.js +17 -0
- package/out/modules/custom-mt/types.d.ts +22 -0
- package/out/modules/custom-mt/types.js +2 -0
- package/out/{handlers/custom-spell-check → modules/custom-spell-check/handlers}/get-languages-list.d.ts +2 -1
- package/out/{handlers/custom-spell-check → modules/custom-spell-check/handlers}/get-languages-list.js +2 -2
- package/out/{handlers/custom-spell-check → modules/custom-spell-check/handlers}/spell-check.d.ts +2 -1
- package/out/{handlers/custom-spell-check → modules/custom-spell-check/handlers}/spell-check.js +5 -3
- package/out/modules/custom-spell-check/index.d.ts +6 -0
- package/out/modules/custom-spell-check/index.js +32 -0
- package/out/modules/custom-spell-check/types.d.ts +56 -0
- package/out/modules/custom-spell-check/types.js +2 -0
- package/out/modules/editor-right-panel/index.d.ts +6 -0
- package/out/modules/editor-right-panel/index.js +17 -0
- package/out/modules/editor-right-panel/types.d.ts +7 -0
- package/out/modules/editor-right-panel/types.js +2 -0
- package/out/modules/editor-themes/index.d.ts +6 -0
- package/out/modules/editor-themes/index.js +11 -0
- package/out/modules/editor-themes/types.d.ts +17 -0
- package/out/modules/editor-themes/types.js +2 -0
- package/out/{handlers/file-processing → modules/file-processing/handlers}/custom-file-format.d.ts +2 -1
- package/out/{handlers/file-processing → modules/file-processing/handlers}/custom-file-format.js +5 -5
- package/out/modules/file-processing/handlers/file-download.d.ts +5 -0
- package/out/{handlers/file-processing → modules/file-processing/handlers}/file-download.js +2 -2
- package/out/{handlers/file-processing → modules/file-processing/handlers}/pre-post-process.d.ts +2 -1
- package/out/{handlers/file-processing → modules/file-processing/handlers}/pre-post-process.js +8 -8
- package/out/modules/file-processing/index.d.ts +22 -0
- package/out/modules/file-processing/index.js +57 -0
- package/out/modules/file-processing/types.d.ts +133 -0
- package/out/modules/file-processing/types.js +12 -0
- package/out/modules/file-processing/util/defaults.d.ts +3 -0
- package/out/modules/file-processing/util/defaults.js +30 -0
- package/out/modules/file-processing/util/files.d.ts +6 -0
- package/out/modules/file-processing/util/files.js +47 -0
- package/out/{handlers/integration/crowdin-project.d.ts → modules/form-data-display.d.ts} +1 -1
- package/out/modules/form-data-save.d.ts +4 -0
- package/out/modules/install.d.ts +4 -0
- package/out/{handlers → modules}/install.js +3 -3
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-file-progress.d.ts +2 -1
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-file-progress.js +2 -2
- package/out/modules/integration/handlers/crowdin-files.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-files.js +3 -3
- package/out/modules/integration/handlers/crowdin-project.d.ts +4 -0
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-project.js +1 -1
- package/out/modules/integration/handlers/crowdin-update.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-update.js +9 -9
- package/out/modules/integration/handlers/crowdin-webhook.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/crowdin-webhook.js +19 -8
- package/out/modules/integration/handlers/integration-data.d.ts +4 -0
- package/out/{handlers/integration → modules/integration/handlers}/integration-data.js +5 -5
- package/out/{handlers/integration → modules/integration/handlers}/integration-login.d.ts +2 -1
- package/out/{handlers/integration → modules/integration/handlers}/integration-login.js +3 -3
- package/out/modules/integration/handlers/integration-logout.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/integration-logout.js +14 -7
- package/out/modules/integration/handlers/integration-update.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/integration-update.js +9 -8
- package/out/modules/integration/handlers/integration-webhook.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/integration-webhook.js +9 -4
- package/out/modules/integration/handlers/job-cancel.d.ts +3 -0
- package/out/{handlers/integration → modules/integration/handlers}/job-cancel.js +4 -4
- package/out/modules/integration/handlers/job-info.d.ts +3 -0
- package/out/{handlers/integration → modules/integration/handlers}/job-info.js +4 -4
- package/out/modules/integration/handlers/main.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/main.js +5 -5
- package/out/modules/integration/handlers/oauth-login.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/oauth-login.js +3 -3
- package/out/{handlers/integration → modules/integration/handlers}/oauth-url.d.ts +2 -1
- package/out/{handlers/integration → modules/integration/handlers}/oauth-url.js +2 -2
- package/out/modules/integration/handlers/settings-save.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/settings-save.js +28 -11
- package/out/modules/integration/handlers/settings.d.ts +3 -0
- package/out/{handlers/integration → modules/integration/handlers}/settings.js +1 -1
- package/out/{handlers/integration → modules/integration/handlers}/subscription-info.d.ts +1 -1
- package/out/{handlers/integration → modules/integration/handlers}/subscription-info.js +2 -2
- package/out/modules/integration/handlers/sync-settings-save.d.ts +5 -0
- package/out/{handlers/integration → modules/integration/handlers}/sync-settings-save.js +16 -8
- package/out/modules/integration/handlers/sync-settings.d.ts +3 -0
- package/out/{handlers/integration → modules/integration/handlers}/sync-settings.js +2 -2
- package/out/modules/integration/handlers/user-errors.d.ts +3 -0
- package/out/{handlers/integration → modules/integration/handlers}/user-errors.js +2 -2
- package/out/modules/integration/index.d.ts +6 -0
- package/out/modules/integration/index.js +118 -0
- package/out/modules/integration/types.d.ts +435 -0
- package/out/modules/integration/types.js +19 -0
- package/out/modules/integration/util/cron.d.ts +27 -0
- package/out/{util → modules/integration/util}/cron.js +97 -28
- package/out/{util → modules/integration/util}/defaults.d.ts +2 -3
- package/out/{util → modules/integration/util}/defaults.js +1 -36
- package/out/modules/integration/util/files.d.ts +5 -0
- package/out/{util → modules/integration/util}/files.js +9 -40
- package/out/{util → modules/integration/util}/job.d.ts +1 -1
- package/out/{util → modules/integration/util}/job.js +11 -11
- package/out/{util/file-snapshot.d.ts → modules/integration/util/snapshot.d.ts} +2 -3
- package/out/{util/file-snapshot.js → modules/integration/util/snapshot.js} +6 -65
- package/out/{models/job.d.ts → modules/integration/util/types.d.ts} +14 -0
- package/out/modules/integration/util/webhooks.d.ts +48 -0
- package/out/{util → modules/integration/util}/webhooks.js +95 -49
- package/out/modules/manifest.d.ts +3 -0
- package/out/{handlers → modules}/manifest.js +22 -16
- package/out/modules/modal/index.d.ts +6 -0
- package/out/modules/modal/index.js +17 -0
- package/out/modules/organization-menu/index.d.ts +6 -0
- package/out/modules/organization-menu/index.js +18 -0
- package/out/modules/profile-resources-menu/index.d.ts +6 -0
- package/out/modules/profile-resources-menu/index.js +18 -0
- package/out/modules/project-menu/index.d.ts +6 -0
- package/out/modules/project-menu/index.js +17 -0
- package/out/modules/project-menu-crowdsource/index.d.ts +6 -0
- package/out/modules/project-menu-crowdsource/index.js +17 -0
- package/out/modules/project-reports/index.d.ts +6 -0
- package/out/modules/project-reports/index.js +18 -0
- package/out/modules/project-tools/index.d.ts +6 -0
- package/out/modules/project-tools/index.js +18 -0
- package/out/modules/subscription-paid.d.ts +3 -0
- package/out/{handlers → modules}/subscription-paid.js +2 -2
- package/out/modules/uninstall.d.ts +4 -0
- package/out/{handlers → modules}/uninstall.js +6 -2
- package/out/storage/index.d.ts +5 -3
- package/out/storage/mysql.d.ts +4 -2
- package/out/storage/mysql.js +3 -3
- package/out/storage/postgre.d.ts +4 -2
- package/out/storage/postgre.js +3 -3
- package/out/storage/sqlite.d.ts +4 -2
- package/out/storage/sqlite.js +3 -3
- package/out/storage/types.d.ts +9 -0
- package/out/storage/types.js +2 -0
- package/out/types.d.ts +374 -0
- package/out/types.js +59 -0
- package/out/util/connection.d.ts +2 -9
- package/out/util/connection.js +54 -150
- package/out/util/handlebars.d.ts +1 -0
- package/out/util/handlebars.js +34 -0
- package/out/util/index.d.ts +2 -2
- package/out/util/index.js +6 -6
- package/out/util/logger.d.ts +2 -2
- package/out/util/subscription.d.ts +9 -0
- package/out/util/subscription.js +111 -0
- package/package.json +1 -1
- package/out/handlers/file-processing/file-download.d.ts +0 -4
- package/out/handlers/form-data-display.d.ts +0 -3
- package/out/handlers/form-data-save.d.ts +0 -3
- package/out/handlers/install.d.ts +0 -4
- package/out/handlers/integration/crowdin-files.d.ts +0 -4
- package/out/handlers/integration/crowdin-update.d.ts +0 -4
- package/out/handlers/integration/crowdin-webhook.d.ts +0 -4
- package/out/handlers/integration/integration-data.d.ts +0 -4
- package/out/handlers/integration/integration-logout.d.ts +0 -4
- package/out/handlers/integration/integration-update.d.ts +0 -4
- package/out/handlers/integration/integration-webhook.d.ts +0 -4
- package/out/handlers/integration/job-cancel.d.ts +0 -3
- package/out/handlers/integration/job-info.d.ts +0 -3
- package/out/handlers/integration/main.d.ts +0 -4
- package/out/handlers/integration/oauth-login.d.ts +0 -4
- package/out/handlers/integration/settings-save.d.ts +0 -4
- package/out/handlers/integration/settings.d.ts +0 -3
- package/out/handlers/integration/sync-settings-save.d.ts +0 -4
- package/out/handlers/integration/sync-settings.d.ts +0 -3
- package/out/handlers/integration/user-errors.d.ts +0 -3
- package/out/handlers/manifest.d.ts +0 -3
- package/out/handlers/subscription-paid.d.ts +0 -3
- package/out/handlers/uninstall.d.ts +0 -4
- package/out/models/index.d.ts +0 -1088
- package/out/models/index.js +0 -106
- package/out/util/cron.d.ts +0 -7
- package/out/util/files.d.ts +0 -9
- package/out/util/webhooks.d.ts +0 -28
- /package/out/{util → modules}/api/base.d.ts +0 -0
- /package/out/{util → modules}/api/base.js +0 -0
- /package/out/{util → modules}/api/components.d.ts +0 -0
- /package/out/{util → modules}/api/components.js +0 -0
- /package/out/{handlers → modules}/form-data-display.js +0 -0
- /package/out/{handlers → modules}/form-data-save.js +0 -0
- /package/out/{models/job.js → modules/integration/util/types.js} +0 -0
|
@@ -10,13 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const util_1 = require("../util");
|
|
13
|
-
const
|
|
13
|
+
const subscription_1 = require("../util/subscription");
|
|
14
14
|
const logger_1 = require("../util/logger");
|
|
15
15
|
function handle() {
|
|
16
16
|
return (0, util_1.runAsyncWrapper)((req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
const organizationId = (req.query || {})['organization_id'] || (req.body || {})['organization_id'];
|
|
18
18
|
(0, logger_1.log)(`Received subscription paid request for organization ${organizationId}`);
|
|
19
|
-
(0,
|
|
19
|
+
(0, subscription_1.clearCache)(organizationId);
|
|
20
20
|
res.status(204).end();
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="qs" />
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import { Config } from '../types';
|
|
4
|
+
export default function handle(config: Config): (req: import("../types").CrowdinClientRequest | Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -13,7 +13,7 @@ const storage_1 = require("../storage");
|
|
|
13
13
|
const util_1 = require("../util");
|
|
14
14
|
const connection_1 = require("../util/connection");
|
|
15
15
|
const logger_1 = require("../util/logger");
|
|
16
|
-
const webhooks_1 = require("
|
|
16
|
+
const webhooks_1 = require("./integration/util/webhooks");
|
|
17
17
|
function handle(config) {
|
|
18
18
|
return (0, util_1.runAsyncWrapper)((req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const event = req.body;
|
|
@@ -40,7 +40,11 @@ function handle(config) {
|
|
|
40
40
|
}
|
|
41
41
|
if (projectIntegration) {
|
|
42
42
|
if (projectIntegration.webhooks) {
|
|
43
|
-
yield (0, webhooks_1.unregisterAllCrowdinWebhooks)(
|
|
43
|
+
yield (0, webhooks_1.unregisterAllCrowdinWebhooks)({
|
|
44
|
+
config,
|
|
45
|
+
integration: projectIntegration,
|
|
46
|
+
crowdinId: organization,
|
|
47
|
+
});
|
|
44
48
|
}
|
|
45
49
|
(0, logger_1.log)(`Deleting all integration credentials for ${organization} organization`);
|
|
46
50
|
yield (0, storage_1.getStorage)().deleteAllIntegrationCredentials(organization);
|
package/out/storage/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks, Provider } from '../modules/integration/types';
|
|
2
|
+
import { Config, CrowdinCredentials, UnauthorizedConfig } from '../types';
|
|
3
|
+
import { CreateJobParams, GetActiveJobsParams, GetJobParams, Job, UpdateJobParams } from '../modules/integration/util/types';
|
|
4
|
+
import { UserErrors } from './types';
|
|
3
5
|
export interface Storage {
|
|
4
6
|
migrate(): Promise<void>;
|
|
5
7
|
saveCrowdinCredentials(credentials: CrowdinCredentials): Promise<void>;
|
|
@@ -42,5 +44,5 @@ export interface Storage {
|
|
|
42
44
|
getActiveJobs(params: GetActiveJobsParams): Promise<Job[] | undefined>;
|
|
43
45
|
deleteFinishedJobs(): Promise<void>;
|
|
44
46
|
}
|
|
45
|
-
export declare function initialize(config: Config): Promise<void>;
|
|
47
|
+
export declare function initialize(config: Config | UnauthorizedConfig): Promise<void>;
|
|
46
48
|
export declare function getStorage(): Storage;
|
package/out/storage/mysql.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Storage } from '.';
|
|
2
|
-
import { CrowdinCredentials
|
|
3
|
-
import { CreateJobParams, GetActiveJobsParams, GetJobParams, Job, UpdateJobParams } from '../
|
|
2
|
+
import { CrowdinCredentials } from '../types';
|
|
3
|
+
import { CreateJobParams, GetActiveJobsParams, GetJobParams, Job, UpdateJobParams } from '../modules/integration/util/types';
|
|
4
|
+
import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks } from '../modules/integration/types';
|
|
5
|
+
import { UserErrors } from './types';
|
|
4
6
|
export interface MySQLStorageConfig {
|
|
5
7
|
uri?: string;
|
|
6
8
|
host?: string;
|
package/out/storage/mysql.js
CHANGED
|
@@ -14,7 +14,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.MySQLStorage = void 0;
|
|
16
16
|
const uuid_1 = require("uuid");
|
|
17
|
-
const
|
|
17
|
+
const types_1 = require("../modules/integration/util/types");
|
|
18
18
|
const util_1 = require("../util");
|
|
19
19
|
class MySQLStorage {
|
|
20
20
|
constructor(config) {
|
|
@@ -156,7 +156,7 @@ class MySQLStorage {
|
|
|
156
156
|
payload text,
|
|
157
157
|
title text,
|
|
158
158
|
progress int 0,
|
|
159
|
-
status varchar(255) '${
|
|
159
|
+
status varchar(255) '${types_1.JobStatus.CREATED}',
|
|
160
160
|
payload text,
|
|
161
161
|
info text,
|
|
162
162
|
data text,
|
|
@@ -518,7 +518,7 @@ class MySQLStorage {
|
|
|
518
518
|
if (status) {
|
|
519
519
|
updateFields.push('status = ?');
|
|
520
520
|
updateParams.push(status);
|
|
521
|
-
if (!updateFields.includes('finished_at = ?') && [
|
|
521
|
+
if (!updateFields.includes('finished_at = ?') && [types_1.JobStatus.FAILED, types_1.JobStatus.CANCELED].includes(status)) {
|
|
522
522
|
updateFields.push('finished_at = ?');
|
|
523
523
|
updateParams.push(Date.now().toString());
|
|
524
524
|
}
|
package/out/storage/postgre.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Client } from 'pg';
|
|
2
2
|
import { Storage } from '.';
|
|
3
|
-
import { CrowdinCredentials
|
|
4
|
-
import {
|
|
3
|
+
import { CrowdinCredentials } from '../types';
|
|
4
|
+
import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks } from '../modules/integration/types';
|
|
5
|
+
import { CreateJobParams, GetActiveJobsParams, GetJobParams, Job, UpdateJobParams } from '../modules/integration/util/types';
|
|
6
|
+
import { UserErrors } from './types';
|
|
5
7
|
export interface PostgreStorageConfig {
|
|
6
8
|
host?: string;
|
|
7
9
|
connectionString?: string;
|
package/out/storage/postgre.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
exports.PostgreStorage = void 0;
|
|
14
14
|
const pg_1 = require("pg");
|
|
15
15
|
const uuid_1 = require("uuid");
|
|
16
|
-
const
|
|
16
|
+
const types_1 = require("../modules/integration/util/types");
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
class PostgreStorage {
|
|
19
19
|
constructor(config) {
|
|
@@ -169,7 +169,7 @@ class PostgreStorage {
|
|
|
169
169
|
type varchar not null,
|
|
170
170
|
title varchar null,
|
|
171
171
|
progress int default 0,
|
|
172
|
-
status varchar default '${
|
|
172
|
+
status varchar default '${types_1.JobStatus.CREATED}',
|
|
173
173
|
payload varchar null,
|
|
174
174
|
info varchar null,
|
|
175
175
|
data varchar null,
|
|
@@ -534,7 +534,7 @@ class PostgreStorage {
|
|
|
534
534
|
if (status) {
|
|
535
535
|
updateFields.push('status = $' + updateParams.length.toString());
|
|
536
536
|
updateParams.push(status);
|
|
537
|
-
if ((!progress || progress <= 100) && [
|
|
537
|
+
if ((!progress || progress <= 100) && [types_1.JobStatus.FAILED, types_1.JobStatus.CANCELED].includes(status)) {
|
|
538
538
|
updateFields.push('finished_at = $' + updateParams.length.toString());
|
|
539
539
|
updateParams.push(Date.now().toString());
|
|
540
540
|
}
|
package/out/storage/sqlite.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Storage } from '.';
|
|
2
|
-
import { CrowdinCredentials
|
|
3
|
-
import {
|
|
2
|
+
import { CrowdinCredentials } from '../types';
|
|
3
|
+
import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, IntegrationSyncSettings, IntegrationWebhooks } from '../modules/integration/types';
|
|
4
|
+
import { CreateJobParams, GetActiveJobsParams, GetJobParams, Job, UpdateJobParams } from '../modules/integration/util/types';
|
|
5
|
+
import { UserErrors } from './types';
|
|
4
6
|
export interface SQLiteStorageConfig {
|
|
5
7
|
dbFolder: string;
|
|
6
8
|
}
|
package/out/storage/sqlite.js
CHANGED
|
@@ -16,7 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.SQLiteStorage = void 0;
|
|
17
17
|
const path_1 = require("path");
|
|
18
18
|
const uuid_1 = require("uuid");
|
|
19
|
-
const
|
|
19
|
+
const types_1 = require("../modules/integration/util/types");
|
|
20
20
|
class SQLiteStorage {
|
|
21
21
|
constructor(config) {
|
|
22
22
|
this.dbPromise = new Promise((res, rej) => {
|
|
@@ -247,7 +247,7 @@ class SQLiteStorage {
|
|
|
247
247
|
type varchar not null,
|
|
248
248
|
title varchar null,
|
|
249
249
|
progress integer DEFAULT 0,
|
|
250
|
-
status varchar DEFAULT '${
|
|
250
|
+
status varchar DEFAULT '${types_1.JobStatus.CREATED}',
|
|
251
251
|
payload varchar null,
|
|
252
252
|
info varchar null,
|
|
253
253
|
data varchar null,
|
|
@@ -524,7 +524,7 @@ class SQLiteStorage {
|
|
|
524
524
|
if (status) {
|
|
525
525
|
updateFields.push('status = ?');
|
|
526
526
|
updateParams.push(status);
|
|
527
|
-
if (!updateFields.includes('finished_at = ?') && [
|
|
527
|
+
if (!updateFields.includes('finished_at = ?') && [types_1.JobStatus.FAILED, types_1.JobStatus.CANCELED].includes(status)) {
|
|
528
528
|
updateFields.push('finished_at = ?');
|
|
529
529
|
updateParams.push(Date.now().toString());
|
|
530
530
|
}
|
package/out/types.d.ts
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import Crowdin from '@crowdin/crowdin-api-client';
|
|
2
|
+
import { JwtPayload, VerifyOptions } from '@crowdin/crowdin-apps-functions';
|
|
3
|
+
import { Request } from 'express';
|
|
4
|
+
import { ContextModule } from './modules/context-menu/types';
|
|
5
|
+
import { CustomMTLogic } from './modules/custom-mt/types';
|
|
6
|
+
import { CustomSpellcheckerModule } from './modules/custom-spell-check/types';
|
|
7
|
+
import { EditorPanels } from './modules/editor-right-panel/types';
|
|
8
|
+
import { EditorThemes } from './modules/editor-themes/types';
|
|
9
|
+
import { CustomFileFormatLogic, FilePostExportLogic, FilePostImportLogic, FilePreExportLogic, FilePreImportLogic } from './modules/file-processing/types';
|
|
10
|
+
import { IntegrationLogic } from './modules/integration/types';
|
|
11
|
+
import { MySQLStorageConfig } from './storage/mysql';
|
|
12
|
+
import { PostgreStorageConfig } from './storage/postgre';
|
|
13
|
+
import { ApiModule } from './modules/api/types';
|
|
14
|
+
import { LogErrorFunction, LogFunction } from './util/logger';
|
|
15
|
+
export interface ClientConfig extends ImagePath {
|
|
16
|
+
/**
|
|
17
|
+
* Authentication Crowdin App type: "authorization_code", "crowdin_app". Default: "crowdin_app"
|
|
18
|
+
*/
|
|
19
|
+
authenticationType?: AuthenticationType;
|
|
20
|
+
/**
|
|
21
|
+
* client id that we received when registering the app
|
|
22
|
+
*/
|
|
23
|
+
clientId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* client secret that we received when registering the app
|
|
26
|
+
*/
|
|
27
|
+
clientSecret?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Secret to encrypt/decrypt credentials (by default @clientSecret will be used)
|
|
30
|
+
*/
|
|
31
|
+
cryptoSecret?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Options to validate Crowdin JWT token
|
|
34
|
+
*/
|
|
35
|
+
jwtValidationOptions?: VerifyOptions;
|
|
36
|
+
/**
|
|
37
|
+
* https url where an app is reachable from the internet (e.g. the one that ngrok generates for us)
|
|
38
|
+
*/
|
|
39
|
+
baseUrl?: string;
|
|
40
|
+
/**
|
|
41
|
+
* define custom Crowdin urls (e.g. to work against local Crowdin server)
|
|
42
|
+
*/
|
|
43
|
+
crowdinUrls?: CrowdinUrls;
|
|
44
|
+
/**
|
|
45
|
+
* Set of scopes requested by this app (default 'project')
|
|
46
|
+
*/
|
|
47
|
+
scopes?: Scope[];
|
|
48
|
+
/**
|
|
49
|
+
* app name
|
|
50
|
+
*/
|
|
51
|
+
name: string;
|
|
52
|
+
/**
|
|
53
|
+
* app identifier
|
|
54
|
+
*/
|
|
55
|
+
identifier: string;
|
|
56
|
+
/**
|
|
57
|
+
* app description
|
|
58
|
+
*/
|
|
59
|
+
description: string;
|
|
60
|
+
/**
|
|
61
|
+
* Set default app permissions
|
|
62
|
+
*/
|
|
63
|
+
defaultPermissions?: DefaultPermissions;
|
|
64
|
+
/**
|
|
65
|
+
* port where to start express application
|
|
66
|
+
*/
|
|
67
|
+
port?: number;
|
|
68
|
+
/**
|
|
69
|
+
* folder where module will create sqlite db file to persist credentials (e.g. {@example __dirname})
|
|
70
|
+
*/
|
|
71
|
+
dbFolder?: string;
|
|
72
|
+
/**
|
|
73
|
+
* config to configure PostgreSQL as a storage
|
|
74
|
+
*/
|
|
75
|
+
postgreConfig?: PostgreStorageConfig;
|
|
76
|
+
/**
|
|
77
|
+
* config to configure MySQL as a storage
|
|
78
|
+
*/
|
|
79
|
+
mysqlConfig?: MySQLStorageConfig;
|
|
80
|
+
/**
|
|
81
|
+
* integration module logic
|
|
82
|
+
*/
|
|
83
|
+
projectIntegration?: IntegrationLogic & ImagePath & Environments;
|
|
84
|
+
/**
|
|
85
|
+
* custom file format module logic
|
|
86
|
+
*/
|
|
87
|
+
customFileFormat?: CustomFileFormatLogic;
|
|
88
|
+
/**
|
|
89
|
+
* custom MT module logic
|
|
90
|
+
*/
|
|
91
|
+
customMT?: CustomMTLogic & ImagePath & Environments;
|
|
92
|
+
/**
|
|
93
|
+
* resources module
|
|
94
|
+
*/
|
|
95
|
+
profileResourcesMenu?: UiModule & ImagePath & Environments;
|
|
96
|
+
/**
|
|
97
|
+
* organization-menu module
|
|
98
|
+
*/
|
|
99
|
+
organizationMenu?: UiModule & ImagePath;
|
|
100
|
+
/**
|
|
101
|
+
* editor-right-panel module
|
|
102
|
+
*/
|
|
103
|
+
editorRightPanel?: EditorPanels & Environments;
|
|
104
|
+
/**
|
|
105
|
+
* editor-themes module
|
|
106
|
+
*/
|
|
107
|
+
editorThemes?: EditorThemes & ImagePath & Environments;
|
|
108
|
+
/**
|
|
109
|
+
* project menu module
|
|
110
|
+
*/
|
|
111
|
+
projectMenu?: UiModule & Environments;
|
|
112
|
+
/**
|
|
113
|
+
* project menu crowdsource module
|
|
114
|
+
*/
|
|
115
|
+
projectMenuCrowdsource?: UiModule;
|
|
116
|
+
/**
|
|
117
|
+
* tools module
|
|
118
|
+
*/
|
|
119
|
+
projectTools?: UiModule & ImagePath & Environments;
|
|
120
|
+
/**
|
|
121
|
+
* reports module
|
|
122
|
+
*/
|
|
123
|
+
projectReports?: UiModule & ImagePath;
|
|
124
|
+
/**
|
|
125
|
+
* API module
|
|
126
|
+
*/
|
|
127
|
+
api?: ApiModule;
|
|
128
|
+
/**
|
|
129
|
+
* context menu module
|
|
130
|
+
*/
|
|
131
|
+
contextMenu?: ContextModule & UiModule & Environments;
|
|
132
|
+
/**
|
|
133
|
+
* modal module
|
|
134
|
+
*/
|
|
135
|
+
modal?: ModuleContent & UiModule & Environments;
|
|
136
|
+
/**
|
|
137
|
+
* Uninstall hook for cleanup logic
|
|
138
|
+
*/
|
|
139
|
+
onUninstall?: (organization: string, allCredentials: {
|
|
140
|
+
settings?: any;
|
|
141
|
+
credentials: any;
|
|
142
|
+
}[]) => Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Error interceptor (can be used to log error in centralized place)
|
|
145
|
+
*/
|
|
146
|
+
onError?: (error: any, context?: CrowdinContextInfo) => void;
|
|
147
|
+
/**
|
|
148
|
+
* Disable global error handling of unhandledRejection and uncaughtException events
|
|
149
|
+
*/
|
|
150
|
+
disableGlobalErrorHandling?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Configuration to log everything that are happening in the app
|
|
153
|
+
*/
|
|
154
|
+
logger?: Logger;
|
|
155
|
+
/**
|
|
156
|
+
* Configuration of app pricing
|
|
157
|
+
*/
|
|
158
|
+
pricing?: Pricing;
|
|
159
|
+
filePreImport?: FilePreImportLogic;
|
|
160
|
+
filePostImport?: FilePostImportLogic;
|
|
161
|
+
filePreExport?: FilePreExportLogic;
|
|
162
|
+
filePostExport?: FilePostExportLogic;
|
|
163
|
+
/**
|
|
164
|
+
* Disable formatting logs
|
|
165
|
+
*/
|
|
166
|
+
disableLogsFormatter?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* AWS configuration for uploading big files to temporary bucket. Used with customFileFormat and file processors modules.
|
|
169
|
+
*
|
|
170
|
+
* Not necessary to configure if environment variables AWS_REGION and AWS_TMP_BUCKET_NAME are properly set.
|
|
171
|
+
*/
|
|
172
|
+
awsConfig?: AWSConfig;
|
|
173
|
+
customSpellchecker?: CustomSpellcheckerModule;
|
|
174
|
+
}
|
|
175
|
+
export interface Environments {
|
|
176
|
+
environments: Environment | Environment[];
|
|
177
|
+
}
|
|
178
|
+
type Environment = 'crowdin' | 'crowdin-enterprise';
|
|
179
|
+
export type Config = ClientConfig & {
|
|
180
|
+
baseUrl: string;
|
|
181
|
+
clientId: string;
|
|
182
|
+
clientSecret: string;
|
|
183
|
+
port: number;
|
|
184
|
+
dbFolder: string;
|
|
185
|
+
imagePath: string;
|
|
186
|
+
};
|
|
187
|
+
export type UnauthorizedConfig = Omit<Config, 'clientId' | 'clientSecret'> & {
|
|
188
|
+
clientId?: string;
|
|
189
|
+
clientSecret?: string;
|
|
190
|
+
};
|
|
191
|
+
export declare enum AuthenticationType {
|
|
192
|
+
CODE = "authorization_code",
|
|
193
|
+
APP = "crowdin_app",
|
|
194
|
+
NONE = "none"
|
|
195
|
+
}
|
|
196
|
+
export interface CrowdinUrls {
|
|
197
|
+
apiUrl?: string;
|
|
198
|
+
accountUrl?: string;
|
|
199
|
+
subscriptionUrl?: string;
|
|
200
|
+
}
|
|
201
|
+
export declare enum Scope {
|
|
202
|
+
ALL_SCOPES = "all",
|
|
203
|
+
NOTIFICATIONS = "notification",
|
|
204
|
+
TRANSLATION_MEMORIES = "tm",
|
|
205
|
+
MACHINE_TRANSLATION_ENGINES = "mt",
|
|
206
|
+
GLOSSARIES = "glossary",
|
|
207
|
+
USERS = "user",
|
|
208
|
+
TEAMS = "team",
|
|
209
|
+
GROUPS = "group",
|
|
210
|
+
PROJECTS = "project",
|
|
211
|
+
TASKS = "project.task",
|
|
212
|
+
REPORTS = "project.report",
|
|
213
|
+
TRANSLATION_STATUS = "project.status",
|
|
214
|
+
SOURCE_FILES_AND_STRINGS = "project.source",
|
|
215
|
+
WEBHOOKS = "project.webhook",
|
|
216
|
+
TRANSLATIONS = "project.translation",
|
|
217
|
+
SCREENSHOTS = "project.screenshot",
|
|
218
|
+
SECURITY_LOGS = "security-log",
|
|
219
|
+
VENDORS = "vendor"
|
|
220
|
+
}
|
|
221
|
+
export interface CrowdinClientRequest extends Request {
|
|
222
|
+
crowdinApiClient: Crowdin;
|
|
223
|
+
crowdinContext: CrowdinContextInfo;
|
|
224
|
+
subscriptionInfo?: SubscriptionInfo;
|
|
225
|
+
logInfo: LogFunction;
|
|
226
|
+
logError: LogErrorFunction;
|
|
227
|
+
}
|
|
228
|
+
export interface CrowdinCredentials {
|
|
229
|
+
id: string;
|
|
230
|
+
appSecret: string;
|
|
231
|
+
domain?: string;
|
|
232
|
+
userId: number;
|
|
233
|
+
organizationId: number;
|
|
234
|
+
baseUrl: string;
|
|
235
|
+
accessToken: string;
|
|
236
|
+
refreshToken: string;
|
|
237
|
+
expire: string;
|
|
238
|
+
type: AccountType;
|
|
239
|
+
}
|
|
240
|
+
export declare enum AccountType {
|
|
241
|
+
NORMAL = "normal",
|
|
242
|
+
ENTERPRISE = "enterprise"
|
|
243
|
+
}
|
|
244
|
+
export interface CrowdinContextInfo {
|
|
245
|
+
jwtPayload: JwtPayload;
|
|
246
|
+
crowdinId: string;
|
|
247
|
+
clientId: string;
|
|
248
|
+
appIdentifier: string;
|
|
249
|
+
}
|
|
250
|
+
export declare enum SubscriptionInfoType {
|
|
251
|
+
TRIAL = "trial",
|
|
252
|
+
SUBSCRIPTION = "subscription"
|
|
253
|
+
}
|
|
254
|
+
export interface SubscriptionInfo {
|
|
255
|
+
expired: boolean;
|
|
256
|
+
subscribeLink?: string;
|
|
257
|
+
daysLeft?: number;
|
|
258
|
+
type?: SubscriptionInfoType;
|
|
259
|
+
}
|
|
260
|
+
export declare enum EditorMode {
|
|
261
|
+
ASSETS = "assets",
|
|
262
|
+
REVIEW = "review",
|
|
263
|
+
TRANSLATE = "TRANSLATE",
|
|
264
|
+
PROOFREAD = "proofread"
|
|
265
|
+
}
|
|
266
|
+
interface ModuleContent {
|
|
267
|
+
/**
|
|
268
|
+
* relative URL to the content page of the module
|
|
269
|
+
*/
|
|
270
|
+
url?: string;
|
|
271
|
+
}
|
|
272
|
+
export interface CrowdinAppUtilities extends CrowdinMetadataStore {
|
|
273
|
+
establishCrowdinConnection: (authRequest: string | CrowdinClientRequest) => Promise<{
|
|
274
|
+
context: CrowdinContextInfo;
|
|
275
|
+
client?: Crowdin;
|
|
276
|
+
}>;
|
|
277
|
+
encryptCrowdinConnection: (data: {
|
|
278
|
+
crowdinId: string;
|
|
279
|
+
extra: Record<string, any>;
|
|
280
|
+
}) => string;
|
|
281
|
+
dencryptCrowdinConnection: (hash: string) => Promise<{
|
|
282
|
+
client: Crowdin;
|
|
283
|
+
extra: Record<string, any>;
|
|
284
|
+
}>;
|
|
285
|
+
}
|
|
286
|
+
export interface CrowdinMetadataStore {
|
|
287
|
+
saveMetadata: (id: string, metadata: any, crowdinId?: string) => Promise<void>;
|
|
288
|
+
getMetadata: (id: string) => Promise<any | undefined>;
|
|
289
|
+
deleteMetadata: (id: string) => Promise<void>;
|
|
290
|
+
/**
|
|
291
|
+
* Settings that users manage in the integration module
|
|
292
|
+
*/
|
|
293
|
+
getUserSettings: (clientId: string) => Promise<any | undefined>;
|
|
294
|
+
}
|
|
295
|
+
export interface UiModule {
|
|
296
|
+
/**
|
|
297
|
+
* Form schema for react-jsonschema-doc to be used as front-end
|
|
298
|
+
* https://rjsf-team.github.io/react-jsonschema-form/docs
|
|
299
|
+
*/
|
|
300
|
+
formSchema?: object;
|
|
301
|
+
/**
|
|
302
|
+
* URL to custom endpoint that can be used instead of default one to save form data.
|
|
303
|
+
* Endpoint should accept POST requests.
|
|
304
|
+
*/
|
|
305
|
+
formPostDataUrl?: string;
|
|
306
|
+
/**
|
|
307
|
+
* URL to custom endpoint that can be used instead of default one to retrieve form data.
|
|
308
|
+
* Endpoint should accept GET requests.
|
|
309
|
+
*/
|
|
310
|
+
formGetDataUrl?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Additional attributes for react-jsonschema-doc
|
|
313
|
+
*/
|
|
314
|
+
formUiSchema?: object;
|
|
315
|
+
/**
|
|
316
|
+
* path to ui folder (e.g. {@example join(__dirname, 'public')})
|
|
317
|
+
*/
|
|
318
|
+
uiPath?: string;
|
|
319
|
+
/**
|
|
320
|
+
* page name (default index.html)
|
|
321
|
+
*/
|
|
322
|
+
fileName?: string;
|
|
323
|
+
/**
|
|
324
|
+
* Module name
|
|
325
|
+
*/
|
|
326
|
+
name?: string;
|
|
327
|
+
}
|
|
328
|
+
export interface ImagePath {
|
|
329
|
+
/**
|
|
330
|
+
* path to app logo (e.g. {@example join(__dirname, 'logo.png')})
|
|
331
|
+
*/
|
|
332
|
+
imagePath?: string;
|
|
333
|
+
}
|
|
334
|
+
export interface Logger {
|
|
335
|
+
enabled: boolean;
|
|
336
|
+
log?: (message: string, context?: CrowdinContextInfo) => void;
|
|
337
|
+
}
|
|
338
|
+
export interface Pricing {
|
|
339
|
+
planType: 'free' | 'recurring';
|
|
340
|
+
trial?: number;
|
|
341
|
+
trialCrowdin?: number;
|
|
342
|
+
trialEnterprise?: number;
|
|
343
|
+
cachingSeconds?: number;
|
|
344
|
+
infoDisplayDaysThreshold?: number;
|
|
345
|
+
}
|
|
346
|
+
export declare enum UserPermissions {
|
|
347
|
+
OWNER = "owner",
|
|
348
|
+
MANAGERS = "managers",
|
|
349
|
+
ALL_MEMBERS = "all",
|
|
350
|
+
GUESTS = "guests"
|
|
351
|
+
}
|
|
352
|
+
export declare enum ProjectPermissions {
|
|
353
|
+
OWN = "own",
|
|
354
|
+
RESTRICTED = "restricted"
|
|
355
|
+
}
|
|
356
|
+
export interface DefaultPermissions {
|
|
357
|
+
user?: UserPermissions;
|
|
358
|
+
project?: ProjectPermissions;
|
|
359
|
+
}
|
|
360
|
+
export interface AWSConfig {
|
|
361
|
+
/**
|
|
362
|
+
* AWS bucket name for temporary files
|
|
363
|
+
*/
|
|
364
|
+
tmpBucketName?: string;
|
|
365
|
+
/**
|
|
366
|
+
* AWS region
|
|
367
|
+
*/
|
|
368
|
+
region?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface SignaturePatterns {
|
|
371
|
+
fileName?: string;
|
|
372
|
+
fileContent?: string;
|
|
373
|
+
}
|
|
374
|
+
export {};
|
package/out/types.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectPermissions = exports.UserPermissions = exports.EditorMode = exports.SubscriptionInfoType = exports.AccountType = exports.Scope = exports.AuthenticationType = void 0;
|
|
4
|
+
var AuthenticationType;
|
|
5
|
+
(function (AuthenticationType) {
|
|
6
|
+
AuthenticationType["CODE"] = "authorization_code";
|
|
7
|
+
AuthenticationType["APP"] = "crowdin_app";
|
|
8
|
+
AuthenticationType["NONE"] = "none";
|
|
9
|
+
})(AuthenticationType = exports.AuthenticationType || (exports.AuthenticationType = {}));
|
|
10
|
+
var Scope;
|
|
11
|
+
(function (Scope) {
|
|
12
|
+
Scope["ALL_SCOPES"] = "all";
|
|
13
|
+
Scope["NOTIFICATIONS"] = "notification";
|
|
14
|
+
Scope["TRANSLATION_MEMORIES"] = "tm";
|
|
15
|
+
Scope["MACHINE_TRANSLATION_ENGINES"] = "mt";
|
|
16
|
+
Scope["GLOSSARIES"] = "glossary";
|
|
17
|
+
Scope["USERS"] = "user";
|
|
18
|
+
Scope["TEAMS"] = "team";
|
|
19
|
+
Scope["GROUPS"] = "group";
|
|
20
|
+
Scope["PROJECTS"] = "project";
|
|
21
|
+
Scope["TASKS"] = "project.task";
|
|
22
|
+
Scope["REPORTS"] = "project.report";
|
|
23
|
+
Scope["TRANSLATION_STATUS"] = "project.status";
|
|
24
|
+
Scope["SOURCE_FILES_AND_STRINGS"] = "project.source";
|
|
25
|
+
Scope["WEBHOOKS"] = "project.webhook";
|
|
26
|
+
Scope["TRANSLATIONS"] = "project.translation";
|
|
27
|
+
Scope["SCREENSHOTS"] = "project.screenshot";
|
|
28
|
+
Scope["SECURITY_LOGS"] = "security-log";
|
|
29
|
+
Scope["VENDORS"] = "vendor";
|
|
30
|
+
})(Scope = exports.Scope || (exports.Scope = {}));
|
|
31
|
+
var AccountType;
|
|
32
|
+
(function (AccountType) {
|
|
33
|
+
AccountType["NORMAL"] = "normal";
|
|
34
|
+
AccountType["ENTERPRISE"] = "enterprise";
|
|
35
|
+
})(AccountType = exports.AccountType || (exports.AccountType = {}));
|
|
36
|
+
var SubscriptionInfoType;
|
|
37
|
+
(function (SubscriptionInfoType) {
|
|
38
|
+
SubscriptionInfoType["TRIAL"] = "trial";
|
|
39
|
+
SubscriptionInfoType["SUBSCRIPTION"] = "subscription";
|
|
40
|
+
})(SubscriptionInfoType = exports.SubscriptionInfoType || (exports.SubscriptionInfoType = {}));
|
|
41
|
+
var EditorMode;
|
|
42
|
+
(function (EditorMode) {
|
|
43
|
+
EditorMode["ASSETS"] = "assets";
|
|
44
|
+
EditorMode["REVIEW"] = "review";
|
|
45
|
+
EditorMode["TRANSLATE"] = "TRANSLATE";
|
|
46
|
+
EditorMode["PROOFREAD"] = "proofread";
|
|
47
|
+
})(EditorMode = exports.EditorMode || (exports.EditorMode = {}));
|
|
48
|
+
var UserPermissions;
|
|
49
|
+
(function (UserPermissions) {
|
|
50
|
+
UserPermissions["OWNER"] = "owner";
|
|
51
|
+
UserPermissions["MANAGERS"] = "managers";
|
|
52
|
+
UserPermissions["ALL_MEMBERS"] = "all";
|
|
53
|
+
UserPermissions["GUESTS"] = "guests";
|
|
54
|
+
})(UserPermissions = exports.UserPermissions || (exports.UserPermissions = {}));
|
|
55
|
+
var ProjectPermissions;
|
|
56
|
+
(function (ProjectPermissions) {
|
|
57
|
+
ProjectPermissions["OWN"] = "own";
|
|
58
|
+
ProjectPermissions["RESTRICTED"] = "restricted";
|
|
59
|
+
})(ProjectPermissions = exports.ProjectPermissions || (exports.ProjectPermissions = {}));
|
package/out/util/connection.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Crowdin from '@crowdin/crowdin-api-client';
|
|
2
|
-
import {
|
|
2
|
+
import { IntegrationCredentials, IntegrationLogic } from '../modules/integration/types';
|
|
3
|
+
import { Config, CrowdinContextInfo, CrowdinCredentials } from '../types';
|
|
3
4
|
export declare function prepareCrowdinClient({ config, credentials, autoRenew, context, }: {
|
|
4
5
|
config: Config;
|
|
5
6
|
credentials: CrowdinCredentials;
|
|
@@ -10,11 +11,3 @@ export declare function prepareCrowdinClient({ config, credentials, autoRenew, c
|
|
|
10
11
|
token: string;
|
|
11
12
|
}>;
|
|
12
13
|
export declare function prepareIntegrationCredentials(config: Config, integration: IntegrationLogic, integrationCredentials: IntegrationCredentials): Promise<any>;
|
|
13
|
-
export declare function clearCache(organization: string): void;
|
|
14
|
-
export declare function isAppFree(config: Config): boolean;
|
|
15
|
-
export declare function checkSubscription({ config, token, organization, accountType, }: {
|
|
16
|
-
config: Config;
|
|
17
|
-
token: string;
|
|
18
|
-
organization: string;
|
|
19
|
-
accountType: AccountType;
|
|
20
|
-
}): Promise<SubscriptionInfo>;
|