mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 22:54:05 -08:00
37a6e329af
* 🚚 Move schema to standalone file * ⚡ Add assertions to string literal arrays * ✨ Infer typings for convict schema * 🔥 Remove unneeded assertions * 🔨 Fix errors surfaced by typings * ⚡ Type nodes.include/exclude per docs * ⚡ Account for types for exception paths * ⚡ Set method alias to flag incorrect paths * ⚡ Replace original with alias * ⚡ Make allowance for nodes.include * ⚡ Adjust leftover calls * 🔀 Fix conflicts * 🔥 Remove unneeded castings * 📘 Simplify exception path type * 📦 Update package-lock.json * 🔥 Remove unneeded imports * 🔥 Remove unrelated file * ⚡ Update schema * ⚡ Update interface * 📦 Update package-lock.json * 📦 Update package-lock.json * 🔥 Remove leftover assertions Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import config = require('../../../config');
|
|
|
|
export const REST_PATH_SEGMENT = config.getEnv('endpoints.rest') as Readonly<string>;
|
|
|
|
export const AUTHLESS_ENDPOINTS: Readonly<string[]> = [
|
|
'healthz',
|
|
'metrics',
|
|
config.getEnv('endpoints.webhook'),
|
|
config.getEnv('endpoints.webhookWaiting'),
|
|
config.getEnv('endpoints.webhookTest'),
|
|
];
|
|
|
|
export const SUCCESS_RESPONSE_BODY = {
|
|
data: {
|
|
success: true,
|
|
},
|
|
} as const;
|
|
|
|
export const LOGGED_OUT_RESPONSE_BODY = {
|
|
data: {
|
|
loggedOut: true,
|
|
},
|
|
};
|
|
|
|
/**
|
|
* Routes requiring a valid `n8n-auth` cookie for a user, either owner or member.
|
|
*/
|
|
export const ROUTES_REQUIRING_AUTHENTICATION: Readonly<string[]> = [
|
|
'GET /me',
|
|
'PATCH /me',
|
|
'PATCH /me/password',
|
|
'POST /me/survey',
|
|
'POST /owner',
|
|
'GET /non-existent',
|
|
];
|
|
|
|
/**
|
|
* Routes requiring a valid `n8n-auth` cookie for an owner.
|
|
*/
|
|
export const ROUTES_REQUIRING_AUTHORIZATION: Readonly<string[]> = [
|
|
'POST /users',
|
|
'GET /users',
|
|
'DELETE /users/123',
|
|
'POST /users/123/reinvite',
|
|
'POST /owner',
|
|
'POST /owner/skip-setup',
|
|
];
|
|
|
|
/**
|
|
* Name of the connection used for creating and dropping a Postgres DB
|
|
* for each suite test run.
|
|
*/
|
|
export const BOOTSTRAP_POSTGRES_CONNECTION_NAME: Readonly<string> = 'n8n_bs_postgres';
|
|
|
|
/**
|
|
* Name of the connection (and database) used for creating and dropping a MySQL DB
|
|
* for each suite test run.
|
|
*/
|
|
export const BOOTSTRAP_MYSQL_CONNECTION_NAME: Readonly<string> = 'n8n_bs_mysql';
|