@crowdin/app-project-module 0.97.0 → 0.98.0-cf-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.
- package/out/index.js +25 -10
- package/out/middlewares/crowdin-client.d.ts +1 -1
- package/out/middlewares/integration-credentials.d.ts +1 -1
- package/out/middlewares/integration-credentials.js +4 -1
- package/out/middlewares/render-ui-module.d.ts +3 -3
- package/out/middlewares/render-ui-module.js +9 -13
- package/out/middlewares/ui-module.d.ts +1 -1
- package/out/middlewares/ui-module.js +4 -1
- package/out/modules/about.d.ts +1 -1
- package/out/modules/about.js +8 -2
- package/out/modules/ai-prompt-provider/handlers/compile.d.ts +1 -1
- package/out/modules/ai-prompt-provider/index.js +4 -2
- package/out/modules/ai-provider/handlers/chat-completions.d.ts +1 -1
- package/out/modules/ai-provider/handlers/get-model-list.d.ts +1 -1
- package/out/modules/ai-provider/index.js +4 -2
- package/out/modules/ai-request-processors/handler.d.ts +1 -1
- package/out/modules/ai-tools/handlers/tool-calls.d.ts +1 -1
- package/out/modules/ai-tools/index.js +1 -1
- package/out/modules/context-menu/index.js +2 -2
- package/out/modules/custom-mt/handlers/translate.d.ts +1 -1
- package/out/modules/custom-mt/index.js +3 -1
- package/out/modules/custom-spell-check/handlers/get-languages-list.d.ts +1 -1
- package/out/modules/custom-spell-check/handlers/spell-check.d.ts +1 -1
- package/out/modules/custom-spell-check/index.js +4 -4
- package/out/modules/editor-right-panel/index.js +1 -1
- package/out/modules/external-qa-check/handlers/validate.d.ts +1 -1
- package/out/modules/external-qa-check/index.js +2 -2
- package/out/modules/file-processing/handlers/custom-file-format.d.ts +1 -1
- package/out/modules/file-processing/handlers/file-download.d.ts +1 -1
- package/out/modules/file-processing/handlers/pre-post-process.d.ts +1 -1
- package/out/modules/form-data-display.d.ts +1 -1
- package/out/modules/form-data-save.d.ts +1 -1
- package/out/modules/install.d.ts +1 -1
- package/out/modules/integration/handlers/crowdin-file-progress.d.ts +1 -1
- package/out/modules/integration/handlers/crowdin-files.d.ts +1 -1
- package/out/modules/integration/handlers/crowdin-project.d.ts +1 -1
- package/out/modules/integration/handlers/crowdin-update.d.ts +1 -1
- package/out/modules/integration/handlers/crowdin-webhook.d.ts +1 -1
- package/out/modules/integration/handlers/integration-data.d.ts +1 -1
- package/out/modules/integration/handlers/integration-login.d.ts +1 -1
- package/out/modules/integration/handlers/integration-logout.d.ts +1 -1
- package/out/modules/integration/handlers/integration-update.d.ts +1 -1
- package/out/modules/integration/handlers/integration-webhook.d.ts +1 -1
- package/out/modules/integration/handlers/invite-users.d.ts +1 -1
- package/out/modules/integration/handlers/job-cancel.d.ts +1 -1
- package/out/modules/integration/handlers/job-info.d.ts +1 -1
- package/out/modules/integration/handlers/main.d.ts +1 -1
- package/out/modules/integration/handlers/main.js +13 -1
- package/out/modules/integration/handlers/oauth-login.d.ts +1 -1
- package/out/modules/integration/handlers/oauth-login.js +10 -2
- package/out/modules/integration/handlers/oauth-polling.d.ts +1 -1
- package/out/modules/integration/handlers/oauth-url.d.ts +1 -1
- package/out/modules/integration/handlers/settings-save.d.ts +1 -1
- package/out/modules/integration/handlers/settings.d.ts +1 -1
- package/out/modules/integration/handlers/sync-settings-save.d.ts +1 -1
- package/out/modules/integration/handlers/sync-settings.d.ts +1 -1
- package/out/modules/integration/handlers/user-errors.d.ts +1 -1
- package/out/modules/integration/handlers/users.d.ts +1 -1
- package/out/modules/integration/index.js +27 -21
- package/out/modules/modal/index.js +2 -2
- package/out/modules/organization-menu/index.js +6 -4
- package/out/modules/organization-settings-menu/index.js +6 -4
- package/out/modules/profile-resources-menu/index.js +6 -4
- package/out/modules/profile-settings-menu/index.js +6 -4
- package/out/modules/project-menu/index.js +1 -1
- package/out/modules/project-menu-crowdsource/index.js +1 -1
- package/out/modules/project-reports/index.js +4 -2
- package/out/modules/project-tools/index.js +4 -2
- package/out/modules/status.d.ts +1 -1
- package/out/modules/subscription-paid.d.ts +1 -1
- package/out/modules/uninstall.d.ts +1 -1
- package/out/modules/webhooks/handlers/webhook-handler.d.ts +1 -1
- package/out/modules/workflow-step-type/handlers/delete-step.d.ts +1 -1
- package/out/modules/workflow-step-type/handlers/step-settings-save.d.ts +1 -1
- package/out/modules/workflow-step-type/index.js +3 -2
- package/out/storage/d1.d.ts +99 -0
- package/out/storage/d1.js +769 -0
- package/out/storage/index.js +8 -1
- package/out/types.d.ts +11 -1
- package/out/util/credentials-masker.d.ts +1 -1
- package/out/util/index.d.ts +2 -0
- package/out/util/index.js +14 -2
- package/out/util/jsx-renderer.d.ts +6 -0
- package/out/util/jsx-renderer.js +13 -0
- package/out/util/static-files.d.ts +19 -0
- package/out/util/static-files.js +80 -0
- package/out/views/AboutPage.d.ts +9 -0
- package/out/views/AboutPage.js +79 -0
- package/out/views/ErrorPage.d.ts +18 -0
- package/out/views/ErrorPage.js +56 -0
- package/out/views/FormPage.d.ts +13 -0
- package/out/views/FormPage.js +27 -0
- package/out/views/InstallPage.d.ts +10 -0
- package/out/views/InstallPage.js +22 -0
- package/out/views/LoginPage.d.ts +33 -0
- package/out/views/LoginPage.js +199 -0
- package/out/views/MainPage.d.ts +79 -0
- package/out/views/MainPage.js +1613 -0
- package/out/views/OAuthPage.d.ts +7 -0
- package/out/views/OAuthPage.js +17 -0
- package/out/views/SubscriptionPage.d.ts +7 -0
- package/out/views/SubscriptionPage.js +26 -0
- package/out/views/index.d.ts +13 -0
- package/out/views/index.js +25 -0
- package/out/views/layout/Head.d.ts +9 -0
- package/out/views/layout/Head.js +54 -0
- package/package.json +12 -11
- package/out/util/handlebars.d.ts +0 -1
- package/out/util/handlebars.js +0 -46
- package/out/views/about.handlebars +0 -102
- package/out/views/error.handlebars +0 -54
- package/out/views/form.handlebars +0 -30
- package/out/views/install.handlebars +0 -16
- package/out/views/login.handlebars +0 -331
- package/out/views/main.handlebars +0 -1857
- package/out/views/oauth.handlebars +0 -11
- package/out/views/partials/head.handlebars +0 -53
- package/out/views/subscription.handlebars +0 -26
package/out/index.js
CHANGED
|
@@ -50,11 +50,11 @@ const subscription_paid_1 = __importDefault(require("./modules/subscription-paid
|
|
|
50
50
|
const uninstall_1 = __importDefault(require("./modules/uninstall"));
|
|
51
51
|
const status_1 = __importDefault(require("./modules/status"));
|
|
52
52
|
const storage = __importStar(require("./storage"));
|
|
53
|
+
const d1_1 = require("./storage/d1");
|
|
53
54
|
const types_1 = require("./types");
|
|
54
55
|
const util_1 = require("./util");
|
|
55
56
|
const form_schema_1 = require("./util/form-schema");
|
|
56
57
|
const connection_1 = require("./util/connection");
|
|
57
|
-
const handlebars_1 = require("./util/handlebars");
|
|
58
58
|
const logger = __importStar(require("./util/logger"));
|
|
59
59
|
const logger_1 = require("./util/logger");
|
|
60
60
|
const terminus_express_1 = __importDefault(require("./util/terminus-express"));
|
|
@@ -63,6 +63,7 @@ const credentials_masker_1 = require("./util/credentials-masker");
|
|
|
63
63
|
Object.defineProperty(exports, "getRequestCredentialsMasker", { enumerable: true, get: function () { return credentials_masker_1.getRequestCredentialsMasker; } });
|
|
64
64
|
Object.defineProperty(exports, "postRequestCredentialsMasker", { enumerable: true, get: function () { return credentials_masker_1.postRequestCredentialsMasker; } });
|
|
65
65
|
Object.defineProperty(exports, "maskKey", { enumerable: true, get: function () { return credentials_masker_1.maskKey; } });
|
|
66
|
+
const static_files_1 = require("./util/static-files");
|
|
66
67
|
//apps
|
|
67
68
|
const apiApp = __importStar(require("./modules/api"));
|
|
68
69
|
const contextMenuApp = __importStar(require("./modules/context-menu"));
|
|
@@ -138,6 +139,26 @@ function addCrowdinEndpoints(app, clientConfig) {
|
|
|
138
139
|
}
|
|
139
140
|
storage.initialize(config);
|
|
140
141
|
logger.initialize(config);
|
|
142
|
+
// Middleware to ensure D1 migration before handling requests
|
|
143
|
+
app.use((req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
try {
|
|
145
|
+
const storageInstance = storage.getStorage();
|
|
146
|
+
if (storageInstance instanceof d1_1.D1Storage) {
|
|
147
|
+
yield storageInstance.ensureMigrated();
|
|
148
|
+
}
|
|
149
|
+
next();
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
next(error);
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
// Middleware to detect and cache baseUrl from request if not provided
|
|
156
|
+
app.use((req, res, next) => {
|
|
157
|
+
if (!config.baseUrl) {
|
|
158
|
+
config.baseUrl = (0, util_1.extractBaseUrlFromRequest)(req);
|
|
159
|
+
}
|
|
160
|
+
next();
|
|
161
|
+
});
|
|
141
162
|
app.use((req, res, next) => {
|
|
142
163
|
if (config.webhooks && req.path === '/webhooks') {
|
|
143
164
|
return terminus_express_1.default.raw({ type: '*/*', limit: '50mb' })(req, res, next);
|
|
@@ -151,11 +172,8 @@ function addCrowdinEndpoints(app, clientConfig) {
|
|
|
151
172
|
app.use(logsFormatter.contextResolverMiddleware());
|
|
152
173
|
app.use(logsFormatter.expressMiddleware());
|
|
153
174
|
}
|
|
154
|
-
app.use('/assets',
|
|
155
|
-
app.
|
|
156
|
-
app.engine('handlebars', handlebars_1.engine);
|
|
157
|
-
app.set('view engine', 'handlebars');
|
|
158
|
-
app.get((0, util_1.getLogoUrl)(), (req, res) => res.sendFile(config.imagePath));
|
|
175
|
+
app.use('/assets', (0, static_files_1.serveStatic)(config, 'static'));
|
|
176
|
+
app.get((0, util_1.getLogoUrl)(), (0, static_files_1.serveFile)(config, config.imagePath));
|
|
159
177
|
app.get('/manifest.json', json_response_1.default, (0, manifest_1.default)(config));
|
|
160
178
|
app.get('/', (0, about_1.default)(config));
|
|
161
179
|
if (((_a = config === null || config === void 0 ? void 0 : config.enableStatusPage) === null || _a === void 0 ? void 0 : _a.database) || ((_b = config === null || config === void 0 ? void 0 : config.enableStatusPage) === null || _b === void 0 ? void 0 : _b.filesystem)) {
|
|
@@ -274,9 +292,6 @@ function convertClientConfig(clientConfig) {
|
|
|
274
292
|
const clientSecret = clientConfig.clientSecret || process.env.CROWDIN_CLIENT_SECRET;
|
|
275
293
|
const port = clientConfig.port || process.env.PORT || 3000;
|
|
276
294
|
const { region = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION, tmpBucketName = process.env.AWS_TMP_BUCKET_NAME, } = clientConfig.awsConfig || {};
|
|
277
|
-
if (!baseUrl) {
|
|
278
|
-
throw new Error('Missing baseUrl parameter');
|
|
279
|
-
}
|
|
280
295
|
if (clientConfig.authenticationType !== types_1.AuthenticationType.NONE) {
|
|
281
296
|
if (!clientId && !clientSecret) {
|
|
282
297
|
throw new Error('Missing [clientId, clientSecret] parameters');
|
|
@@ -286,7 +301,7 @@ function convertClientConfig(clientConfig) {
|
|
|
286
301
|
clientConfig.api = Object.assign({ default: true }, clientConfig.api);
|
|
287
302
|
}
|
|
288
303
|
clientConfig.enableStatusPage = Object.assign({ database: true, filesystem: true }, (clientConfig.enableStatusPage || {}));
|
|
289
|
-
return Object.assign(Object.assign({}, clientConfig), { baseUrl: baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl, clientId,
|
|
304
|
+
return Object.assign(Object.assign({}, clientConfig), { baseUrl: baseUrl ? (baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl) : undefined, clientId,
|
|
290
305
|
clientSecret, awsConfig: {
|
|
291
306
|
tmpBucketName,
|
|
292
307
|
region,
|
|
@@ -21,5 +21,5 @@ export default function handle({ config, optional, checkSubscriptionExpiration,
|
|
|
21
21
|
optional: boolean;
|
|
22
22
|
checkSubscriptionExpiration: boolean;
|
|
23
23
|
moduleKey?: string[] | string | undefined;
|
|
24
|
-
}): (req:
|
|
24
|
+
}): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
25
25
|
export declare function getToken(req: CrowdinClientRequest): string | undefined;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config } from '../types';
|
|
4
4
|
import { IntegrationLogic } from '../modules/integration/types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic, optional?: boolean): (req: import("
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic, optional?: boolean): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -37,6 +37,7 @@ const util_1 = require("../util");
|
|
|
37
37
|
const connection_1 = require("../util/connection");
|
|
38
38
|
const logger_1 = require("../util/logger");
|
|
39
39
|
const crowdinAppFunctions = __importStar(require("@crowdin/crowdin-apps-functions"));
|
|
40
|
+
const views_1 = require("../views");
|
|
40
41
|
function handle(config, integration, optional = false) {
|
|
41
42
|
return (0, util_1.runAsyncWrapper)((req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
let clientId = req.crowdinContext.clientId;
|
|
@@ -89,7 +90,9 @@ function handle(config, integration, optional = false) {
|
|
|
89
90
|
else {
|
|
90
91
|
(0, logger_1.temporaryErrorDebug)('Access denied: integration-credentials', req);
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
const html = (0, util_1.renderJSX)(views_1.ErrorPage, errorOptions);
|
|
94
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
95
|
+
return res.send(html);
|
|
93
96
|
}
|
|
94
97
|
try {
|
|
95
98
|
req.integrationCredentials = yield (0, connection_1.prepareIntegrationCredentials)(config, integration, integrationCredentials);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
|
-
import
|
|
3
|
-
import { UiModule } from '../types';
|
|
4
|
-
export default function handle(moduleConfig: UiModule): (req:
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import { UiModule, Config, UnauthorizedConfig } from '../types';
|
|
4
|
+
export default function handle(moduleConfig: UiModule, config: Config | UnauthorizedConfig): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -8,28 +8,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const express_1 = __importDefault(require("express"));
|
|
16
12
|
const util_1 = require("../util");
|
|
17
|
-
|
|
13
|
+
const static_files_1 = require("../util/static-files");
|
|
14
|
+
const views_1 = require("../views");
|
|
15
|
+
function handle(moduleConfig, config) {
|
|
18
16
|
return (0, util_1.runAsyncWrapper)((req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
19
17
|
if (moduleConfig.formSchema) {
|
|
20
|
-
|
|
21
|
-
formGetDataUrl: moduleConfig.formGetDataUrl
|
|
22
|
-
|
|
23
|
-
: `/api/${moduleConfig.key}/form-data`,
|
|
24
|
-
formPostDataUrl: moduleConfig.formPostDataUrl
|
|
25
|
-
? moduleConfig.formPostDataUrl
|
|
26
|
-
: `/api/${moduleConfig.key}/form-data`,
|
|
18
|
+
const html = (0, util_1.renderJSX)(views_1.FormPage, {
|
|
19
|
+
formGetDataUrl: moduleConfig.formGetDataUrl || `/api/${moduleConfig.key}/form-data`,
|
|
20
|
+
formPostDataUrl: moduleConfig.formPostDataUrl || `/api/${moduleConfig.key}/form-data`,
|
|
27
21
|
formSchema: JSON.stringify(moduleConfig.formSchema),
|
|
28
22
|
formUiSchema: moduleConfig.formUiSchema ? JSON.stringify(moduleConfig.formUiSchema) : '{}',
|
|
29
23
|
});
|
|
24
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
25
|
+
return res.send(html);
|
|
30
26
|
}
|
|
31
27
|
if (moduleConfig.uiPath) {
|
|
32
|
-
return
|
|
28
|
+
return (0, static_files_1.serveStatic)(config, moduleConfig.uiPath)(req, res, next);
|
|
33
29
|
}
|
|
34
30
|
throw new Error('uiPath or formSchema should be provided for module');
|
|
35
31
|
}));
|
|
@@ -5,4 +5,4 @@ export default function handle({ config, allowUnauthorized, moduleType, }: {
|
|
|
5
5
|
config: Config | UnauthorizedConfig;
|
|
6
6
|
allowUnauthorized?: boolean;
|
|
7
7
|
moduleType?: string | undefined;
|
|
8
|
-
}): (req:
|
|
8
|
+
}): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -15,6 +15,7 @@ const util_1 = require("../util");
|
|
|
15
15
|
const connection_1 = require("../util/connection");
|
|
16
16
|
const logger_1 = require("../util/logger");
|
|
17
17
|
const subscription_1 = require("../util/subscription");
|
|
18
|
+
const views_1 = require("../views");
|
|
18
19
|
function handle({ config, allowUnauthorized = false, moduleType, }) {
|
|
19
20
|
return (0, util_1.runAsyncWrapper)((req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
20
21
|
if (allowUnauthorized) {
|
|
@@ -57,7 +58,9 @@ function handle({ config, allowUnauthorized = false, moduleType, }) {
|
|
|
57
58
|
accountType: credentials.type,
|
|
58
59
|
});
|
|
59
60
|
if (expired) {
|
|
60
|
-
|
|
61
|
+
const html = (0, util_1.renderJSX)(views_1.SubscriptionPage, { subscribeLink });
|
|
62
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
63
|
+
return res.send(html);
|
|
61
64
|
}
|
|
62
65
|
next();
|
|
63
66
|
}));
|
package/out/modules/about.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export declare function getAboutPageOptions(config: Config | UnauthorizedConfig)
|
|
|
6
6
|
manifest: string;
|
|
7
7
|
storeLink: string;
|
|
8
8
|
}>;
|
|
9
|
-
export default function handle(config: Config | UnauthorizedConfig): (req: Request, res: Response, next: NextFunction) => Promise<
|
|
9
|
+
export default function handle(config: Config | UnauthorizedConfig): (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
package/out/modules/about.js
CHANGED
|
@@ -16,6 +16,8 @@ exports.getAboutPageOptions = void 0;
|
|
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const crowdin_client_1 = require("../middlewares/crowdin-client");
|
|
19
|
+
const jsx_renderer_1 = require("../util/jsx-renderer");
|
|
20
|
+
const views_1 = require("../views");
|
|
19
21
|
function getAboutPageOptions(config) {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
23
|
let detailPage = '';
|
|
@@ -43,7 +45,9 @@ function handle(config) {
|
|
|
43
45
|
const jwtToken = (0, crowdin_client_1.getToken)(req);
|
|
44
46
|
if (!jwtToken) {
|
|
45
47
|
const options = yield getAboutPageOptions(config);
|
|
46
|
-
|
|
48
|
+
const html = (0, jsx_renderer_1.renderJSX)(views_1.AboutPage, options);
|
|
49
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
50
|
+
return res.send(html);
|
|
47
51
|
}
|
|
48
52
|
else {
|
|
49
53
|
next();
|
|
@@ -51,7 +55,9 @@ function handle(config) {
|
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
const options = yield getAboutPageOptions(config);
|
|
54
|
-
|
|
58
|
+
const html = (0, jsx_renderer_1.renderJSX)(views_1.AboutPage, options);
|
|
59
|
+
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
60
|
+
return res.send(html);
|
|
55
61
|
});
|
|
56
62
|
}
|
|
57
63
|
exports.default = handle;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { AiPromptProviderModule } from '../types';
|
|
5
|
-
export default function handle(aiPromptProvider: AiPromptProviderModule): (req:
|
|
5
|
+
export default function handle(aiPromptProvider: AiPromptProviderModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -8,9 +8,11 @@ const json_response_1 = __importDefault(require("../../middlewares/json-response
|
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
10
10
|
const util_1 = require("../../util");
|
|
11
|
+
const static_files_1 = require("../../util/static-files");
|
|
11
12
|
const crowdin_client_1 = __importDefault(require("../../middlewares/crowdin-client"));
|
|
12
13
|
const compile_1 = __importDefault(require("./handlers/compile"));
|
|
13
14
|
function register({ config, app }) {
|
|
15
|
+
var _a;
|
|
14
16
|
if (!config.aiPromptProvider) {
|
|
15
17
|
return;
|
|
16
18
|
}
|
|
@@ -21,8 +23,8 @@ function register({ config, app }) {
|
|
|
21
23
|
moduleKey: config.aiPromptProvider.key,
|
|
22
24
|
}), (0, compile_1.default)(config.aiPromptProvider));
|
|
23
25
|
if (config.aiPromptProvider.formSchema || config.aiPromptProvider.uiPath) {
|
|
24
|
-
app.use('/prompt-provider/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.aiPromptProvider.key }), (0, render_ui_module_1.default)(config.aiPromptProvider));
|
|
26
|
+
app.use('/prompt-provider/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.aiPromptProvider.key }), (0, render_ui_module_1.default)(config.aiPromptProvider, config));
|
|
25
27
|
}
|
|
26
|
-
app.get((0, util_1.getLogoUrl)(config.aiPromptProvider, '/ai-prompt-provider'), (
|
|
28
|
+
app.get((0, util_1.getLogoUrl)(config.aiPromptProvider, '/ai-prompt-provider'), (0, static_files_1.serveFile)(config, ((_a = config.aiPromptProvider) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath));
|
|
27
29
|
}
|
|
28
30
|
exports.register = register;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { AiProviderModule } from '../types';
|
|
5
|
-
export default function handle(aiProvider: AiProviderModule): (req:
|
|
5
|
+
export default function handle(aiProvider: AiProviderModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -3,4 +3,4 @@ import { Response } from 'express';
|
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { AiProviderModule } from '../types';
|
|
5
5
|
export declare const CONTEXT_WINDOW_LIMIT = 4096;
|
|
6
|
-
export default function handle(aiProvider: AiProviderModule): (req:
|
|
6
|
+
export default function handle(aiProvider: AiProviderModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -10,15 +10,17 @@ const chat_completions_1 = __importDefault(require("./handlers/chat-completions"
|
|
|
10
10
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
11
11
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
12
12
|
const util_1 = require("../../util");
|
|
13
|
+
const static_files_1 = require("../../util/static-files");
|
|
13
14
|
const crowdin_client_1 = __importDefault(require("../../middlewares/crowdin-client"));
|
|
14
15
|
function register({ config, app }) {
|
|
16
|
+
var _a;
|
|
15
17
|
if (!config.aiProvider) {
|
|
16
18
|
return;
|
|
17
19
|
}
|
|
18
20
|
if (config.aiProvider.settingsUiModule) {
|
|
19
|
-
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.aiProvider.key }), (0, render_ui_module_1.default)(config.aiProvider.settingsUiModule));
|
|
21
|
+
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.aiProvider.key }), (0, render_ui_module_1.default)(config.aiProvider.settingsUiModule, config));
|
|
20
22
|
}
|
|
21
|
-
app.get((0, util_1.getLogoUrl)(config.aiProvider, '/aiprovider'), (
|
|
23
|
+
app.get((0, util_1.getLogoUrl)(config.aiProvider, '/aiprovider'), (0, static_files_1.serveFile)(config, ((_a = config.aiProvider) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath));
|
|
22
24
|
app.get('/ai-provider/models', json_response_1.default, (0, crowdin_client_1.default)({
|
|
23
25
|
config,
|
|
24
26
|
optional: false,
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../types';
|
|
4
4
|
import { AiRequestProcessorModule, AiStreamProcessorModule } from './types';
|
|
5
|
-
export default function handle(module: AiRequestProcessorModule | AiStreamProcessorModule, canHandleStream?: boolean): (req:
|
|
5
|
+
export default function handle(module: AiRequestProcessorModule | AiStreamProcessorModule, canHandleStream?: boolean): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { AiTool } from '../types';
|
|
5
|
-
export default function handle(aiTool: AiTool): (req:
|
|
5
|
+
export default function handle(aiTool: AiTool): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -37,7 +37,7 @@ function registerAiToolWidgets({ config, app }) {
|
|
|
37
37
|
const tools = Array.isArray(config.aiToolsWidget) ? config.aiToolsWidget : [config.aiToolsWidget];
|
|
38
38
|
for (const tool of tools) {
|
|
39
39
|
if ((0, util_1.isUniqueFunctionName)(tool)) {
|
|
40
|
-
app.use((0, util_1.getAiToolWidgetUrl)(tool), (0, ui_module_1.default)({ config, moduleType: tool.key }), (0, render_ui_module_1.default)(tool));
|
|
40
|
+
app.use((0, util_1.getAiToolWidgetUrl)(tool), (0, ui_module_1.default)({ config, moduleType: tool.key }), (0, render_ui_module_1.default)(tool, config));
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
43
|
throw new Error(`The function name '${tool.function.name}' is not unique within aiTools and aiToolsWidget`);
|
|
@@ -16,14 +16,14 @@ function register({ config, app }) {
|
|
|
16
16
|
if (Array.isArray(config.contextMenu)) {
|
|
17
17
|
config.contextMenu.forEach((contextMenu) => {
|
|
18
18
|
if ((contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.uiPath) || (contextMenu === null || contextMenu === void 0 ? void 0 : contextMenu.formSchema)) {
|
|
19
|
-
app.use(`/context-${contextMenu.key}`, (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: contextMenu.key }), (0, render_ui_module_1.default)(contextMenu));
|
|
19
|
+
app.use(`/context-${contextMenu.key}`, (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: contextMenu.key }), (0, render_ui_module_1.default)(contextMenu, config));
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
// backward compatibility will be removed after migration
|
|
25
25
|
if (((_a = config.contextMenu) === null || _a === void 0 ? void 0 : _a.uiPath) || ((_b = config.contextMenu) === null || _b === void 0 ? void 0 : _b.formSchema)) {
|
|
26
|
-
app.use('/context', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.contextMenu.key }), (0, render_ui_module_1.default)(config.contextMenu));
|
|
26
|
+
app.use('/context', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.contextMenu.key }), (0, render_ui_module_1.default)(config.contextMenu, config));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { CustomMTLogic } from '../types';
|
|
5
|
-
export default function handle(config: CustomMTLogic): (req:
|
|
5
|
+
export default function handle(config: CustomMTLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.register = void 0;
|
|
7
7
|
const crowdin_client_1 = __importDefault(require("../../middlewares/crowdin-client"));
|
|
8
8
|
const util_1 = require("../../util");
|
|
9
|
+
const static_files_1 = require("../../util/static-files");
|
|
9
10
|
const translate_1 = __importDefault(require("./handlers/translate"));
|
|
10
11
|
function register({ config, app }) {
|
|
12
|
+
var _a;
|
|
11
13
|
if (!config.customMT) {
|
|
12
14
|
return;
|
|
13
15
|
}
|
|
14
|
-
app.get((0, util_1.getLogoUrl)(config.customMT, '/mt'), (
|
|
16
|
+
app.get((0, util_1.getLogoUrl)(config.customMT, '/mt'), (0, static_files_1.serveFile)(config, ((_a = config.customMT) === null || _a === void 0 ? void 0 : _a.imagePath) || config.imagePath));
|
|
15
17
|
app.post('/mt/translate', (0, crowdin_client_1.default)({
|
|
16
18
|
config,
|
|
17
19
|
optional: false,
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { CustomSpellcheckerModule } from '../types';
|
|
5
|
-
export default function handle(customSpellchecker: CustomSpellcheckerModule): (req:
|
|
5
|
+
export default function handle(customSpellchecker: CustomSpellcheckerModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { CustomSpellcheckerModule } from '../types';
|
|
5
|
-
export default function handle(customSpellchecker: CustomSpellcheckerModule): (req:
|
|
5
|
+
export default function handle(customSpellchecker: CustomSpellcheckerModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -17,9 +17,9 @@ function register({ config, app }) {
|
|
|
17
17
|
}
|
|
18
18
|
if ((0, util_1.isAuthorizedConfig)(config)) {
|
|
19
19
|
if (config.customSpellchecker.settingsUiModule) {
|
|
20
|
-
app.use('/spellchecker/settings', (0, ui_module_1.default)({ config, moduleType: config.customSpellchecker.key }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule));
|
|
20
|
+
app.use('/spellchecker/settings', (0, ui_module_1.default)({ config, moduleType: config.customSpellchecker.key }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule, config));
|
|
21
21
|
// TEMPORARY CODE: it needs to support old path
|
|
22
|
-
app.use('/settings', (0, ui_module_1.default)({ config }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule));
|
|
22
|
+
app.use('/settings', (0, ui_module_1.default)({ config }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule, config));
|
|
23
23
|
// END TEMPORARY CODE
|
|
24
24
|
}
|
|
25
25
|
app.get('/spellchecker/languages', json_response_1.default, (0, crowdin_client_1.default)({
|
|
@@ -49,9 +49,9 @@ function register({ config, app }) {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
if (config.customSpellchecker.settingsUiModule) {
|
|
52
|
-
app.use('/spellchecker/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.customSpellchecker.key }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule));
|
|
52
|
+
app.use('/spellchecker/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: config.customSpellchecker.key }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule, config));
|
|
53
53
|
// TEMPORARY CODE: it needs to support old path
|
|
54
|
-
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule));
|
|
54
|
+
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true }), (0, render_ui_module_1.default)(config.customSpellchecker.settingsUiModule, config));
|
|
55
55
|
// END TEMPORARY CODE
|
|
56
56
|
}
|
|
57
57
|
app.get('/spellchecker/languages', json_response_1.default, (0, get_languages_list_1.default)(config.customSpellchecker));
|
|
@@ -12,6 +12,6 @@ function register({ config, app }) {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
|
|
15
|
-
app.use('/editor-panels', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.editorRightPanel.key }), (0, render_ui_module_1.default)(config.editorRightPanel));
|
|
15
|
+
app.use('/editor-panels', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.editorRightPanel.key }), (0, render_ui_module_1.default)(config.editorRightPanel, config));
|
|
16
16
|
}
|
|
17
17
|
exports.register = register;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { ExternalQaCheckModule } from '../types';
|
|
5
|
-
export default function handle(externalQaCheck: ExternalQaCheckModule): (req:
|
|
5
|
+
export default function handle(externalQaCheck: ExternalQaCheckModule): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -38,9 +38,9 @@ function register({ config, app }) {
|
|
|
38
38
|
}), (0, validate_1.default)(qaCheck));
|
|
39
39
|
// END TEMPORARY CODE
|
|
40
40
|
if (qaCheck.settingsUiModule) {
|
|
41
|
-
app.use('/qa-check/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: qaCheck.key }), (0, render_ui_module_1.default)(qaCheck.settingsUiModule));
|
|
41
|
+
app.use('/qa-check/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true, moduleType: qaCheck.key }), (0, render_ui_module_1.default)(qaCheck.settingsUiModule, config));
|
|
42
42
|
// TEMPORARY CODE: it needs to support old path
|
|
43
|
-
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true }), (0, render_ui_module_1.default)(qaCheck.settingsUiModule));
|
|
43
|
+
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized: true }), (0, render_ui_module_1.default)(qaCheck.settingsUiModule, config));
|
|
44
44
|
// END TEMPORARY CODE
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { CustomFileFormatLogic } from '../types';
|
|
5
|
-
export default function handle(baseUrl: string, folder: string, config: CustomFileFormatLogic): (req:
|
|
5
|
+
export default function handle(baseUrl: string, folder: string, config: CustomFileFormatLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { FileProcessLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, processingConfig: FileProcessLogic, folderName: string): (req:
|
|
5
|
+
export default function handle(config: Config, processingConfig: FileProcessLogic, folderName: string): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config, CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { FileImportExportLogic } from '../types';
|
|
5
|
-
export default function handle(baseConfig: Config, config: FileImportExportLogic, folderName: string): (req:
|
|
5
|
+
export default function handle(baseConfig: Config, config: FileImportExportLogic, folderName: string): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Config, CrowdinClientRequest } from '../types';
|
|
3
3
|
import { Response } from 'express';
|
|
4
|
-
export default function handle(config: Config): (req:
|
|
4
|
+
export default function handle(config: Config): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Config, CrowdinClientRequest } from '../types';
|
|
3
3
|
import { Response } from 'express';
|
|
4
|
-
export default function handle(config: Config): (req:
|
|
4
|
+
export default function handle(config: Config): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
package/out/modules/install.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
import { Config } from '../types';
|
|
4
|
-
export default function handle(config: Config): (req:
|
|
4
|
+
export default function handle(config: Config): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(integration: IntegrationLogic): (req:
|
|
5
|
+
export default function handle(integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req: import("
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
|
-
export default function handle(): (req:
|
|
4
|
+
export default function handle(): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req: import("
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req:
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { IntegrationLogic } from '../types';
|
|
4
|
-
export default function handle(integration: IntegrationLogic): (req: import("
|
|
4
|
+
export default function handle(integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config, CrowdinClientRequest } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req:
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req: import("
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req: import("
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
import { Config } from '../../../types';
|
|
4
4
|
import { IntegrationLogic } from '../types';
|
|
5
|
-
export default function handle(config: Config, integration: IntegrationLogic): (req:
|
|
5
|
+
export default function handle(config: Config, integration: IntegrationLogic): (req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Response } from 'express';
|
|
3
|
-
export default function handle(): (req: import("
|
|
3
|
+
export default function handle(): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="qs" />
|
|
2
2
|
import { Response } from 'express';
|
|
3
|
-
export default function handle(): (req: import("
|
|
3
|
+
export default function handle(): (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | import("../../../types").CrowdinClientRequest, res: Response<any, Record<string, any>>, next: Function) => void;
|