mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 08:42:13 +02:00
Compare commits
4 Commits
7.0.376
...
fix-typesc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d70d45365 | ||
|
|
7c9626a067 | ||
|
|
8a9a97162d | ||
|
|
9e41f4731c |
@@ -24,6 +24,7 @@
|
||||
"react",
|
||||
"jsx-a11y",
|
||||
"progress",
|
||||
"import",
|
||||
"@typescript-eslint",
|
||||
"unused-imports"
|
||||
],
|
||||
@@ -81,15 +82,15 @@
|
||||
"@typescript-eslint/no-empty-interface": [
|
||||
"error",
|
||||
{
|
||||
"allowSingleExtends": true
|
||||
"allowSingleExtends": true
|
||||
}
|
||||
],
|
||||
],
|
||||
// https://www.npmjs.com/package/eslint-plugin-unused-imports
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-floating-promises":"error",
|
||||
"@typescript-eslint/await-thenable":"error",
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"error",
|
||||
@@ -125,6 +126,7 @@
|
||||
"react/no-deprecated": "error",
|
||||
"react/boolean-prop-naming": "error",
|
||||
"react/no-is-mounted": "error",
|
||||
"@typescript-eslint/consistent-type-imports": "error",
|
||||
"react/no-find-dom-node": "error",
|
||||
"one-var-declaration-per-line": "error",
|
||||
"arrow-parens": "error",
|
||||
@@ -163,7 +165,7 @@
|
||||
"react/jsx-pascal-case": "error",
|
||||
"array-callback-return": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"import/no-duplicates": "error",
|
||||
"no-promise-executor-return": "error",
|
||||
"capitalized-comments": "off", // this is turned off because come commented code should not be capitalized.
|
||||
"for-direction": "error",
|
||||
@@ -184,4 +186,4 @@
|
||||
"version": "18.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import type { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import Express from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
|
||||
export const APP_NAME: string = 'accounts';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { ReactElement } from 'react';
|
||||
import type { ReactElement } from 'react';
|
||||
import React from 'react';
|
||||
import {
|
||||
Routes,
|
||||
Route,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Footer: FunctionComponent = () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
@@ -6,7 +7,7 @@ import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSc
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import { FORGOT_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import type URL from 'Common/Types/API/URL';
|
||||
|
||||
const ForgotPassword: FunctionComponent = () => {
|
||||
const apiUrl: URL = FORGOT_PASSWORD_API_URL;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React from 'react';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
@@ -6,8 +7,8 @@ import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import { LOGIN_API_URL } from '../Utils/ApiPaths';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type URL from 'Common/Types/API/URL';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
const LoginPage: FunctionComponent = () => {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
@@ -6,11 +7,11 @@ import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import type URL from 'Common/Types/API/URL';
|
||||
import { SIGNUP_API_URL } from '../Utils/ApiPaths';
|
||||
|
||||
const RegisterPage: FunctionComponent = () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
@@ -6,7 +7,7 @@ import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import type URL from 'Common/Types/API/URL';
|
||||
import { RESET_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React from 'react';
|
||||
import BasicModelForm from 'CommonUI/src/Components/Forms/BasicModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
|
||||
import type FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FunctionComponent, useEffect, useState } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
@@ -9,8 +10,8 @@ import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
|
||||
import type URL from 'Common/Types/API/URL';
|
||||
import type HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
|
||||
|
||||
const VerifyEmail: FunctionComponent = () => {
|
||||
const apiUrl: URL = VERIFY_EMAIL_API_URL;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Email from 'Common/Types/Email';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Name from 'Common/Types/Name';
|
||||
import type Email from 'Common/Types/Email';
|
||||
import type ObjectID from 'Common/Types/ObjectID';
|
||||
import type Name from 'Common/Types/Name';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import User from 'Model/Models/User';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Analytics from 'CommonUI/src/Utils/Analytics';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import type { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import Express from 'CommonServer/Utils/Express';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Express, {
|
||||
import type {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import Express, { ExpressStatic } from 'CommonServer/Utils/Express';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ObjectID from '../Types/ObjectID';
|
||||
import type ObjectID from '../Types/ObjectID';
|
||||
import BaseModel from './BaseModel';
|
||||
|
||||
export default class AccessControlModel extends BaseModel {
|
||||
|
||||
@@ -8,30 +8,33 @@ import {
|
||||
} from 'typeorm';
|
||||
|
||||
import Columns from '../Types/Database/Columns';
|
||||
import type { TableColumnMetadata } from '../Types/Database/TableColumn';
|
||||
import TableColumn, {
|
||||
getTableColumn,
|
||||
getTableColumns,
|
||||
TableColumnMetadata,
|
||||
} from '../Types/Database/TableColumn';
|
||||
import { JSONArray, JSONObject, JSONValue } from '../Types/JSON';
|
||||
import type { JSONArray, JSONObject, JSONValue } from '../Types/JSON';
|
||||
import ObjectID from '../Types/ObjectID';
|
||||
import Dictionary from '../Types/Dictionary';
|
||||
import HashedString from '../Types/HashedString';
|
||||
import Email from '../Types/Email';
|
||||
import Phone from '../Types/Phone';
|
||||
import PositiveNumber from '../Types/PositiveNumber';
|
||||
import Route from '../Types/API/Route';
|
||||
import type Dictionary from '../Types/Dictionary';
|
||||
import type HashedString from '../Types/HashedString';
|
||||
import type Email from '../Types/Email';
|
||||
import type Phone from '../Types/Phone';
|
||||
import type PositiveNumber from '../Types/PositiveNumber';
|
||||
import type Route from '../Types/API/Route';
|
||||
import TableColumnType from '../Types/Database/TableColumnType';
|
||||
import Permission, {
|
||||
instaceOfUserTenantAccessPermission,
|
||||
PermissionHelper,
|
||||
import type {
|
||||
UserPermission,
|
||||
UserTenantAccessPermission,
|
||||
} from '../Types/Permission';
|
||||
import { ColumnAccessControl } from '../Types/Database/AccessControl/AccessControl';
|
||||
import type Permission from '../Types/Permission';
|
||||
import {
|
||||
instaceOfUserTenantAccessPermission,
|
||||
PermissionHelper,
|
||||
} from '../Types/Permission';
|
||||
import type { ColumnAccessControl } from '../Types/Database/AccessControl/AccessControl';
|
||||
import { getColumnAccessControlForAllColumns } from '../Types/Database/AccessControl/ColumnAccessControl';
|
||||
import BadDataException from '../Types/Exception/BadDataException';
|
||||
import { PlanSelect } from '../Types/Billing/SubscriptionPlan';
|
||||
import type { PlanSelect } from '../Types/Billing/SubscriptionPlan';
|
||||
|
||||
export type DbTypes =
|
||||
| string
|
||||
|
||||
@@ -5,8 +5,8 @@ import ColumnType from '../Types/Database/ColumnType';
|
||||
import SlugifyColumn from '../Types/Database/SlugifyColumn';
|
||||
import TableColumn from '../Types/Database/TableColumn';
|
||||
import TableColumnType from '../Types/Database/TableColumnType';
|
||||
import MimeType from '../Types/File/MimeType';
|
||||
import ObjectID from '../Types/ObjectID';
|
||||
import type MimeType from '../Types/File/MimeType';
|
||||
import type ObjectID from '../Types/ObjectID';
|
||||
import Permission from '../Types/Permission';
|
||||
import BaseModel from './BaseModel';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ObjectID from '../Types/ObjectID';
|
||||
import type ObjectID from '../Types/ObjectID';
|
||||
import BaseModel from './BaseModel';
|
||||
|
||||
export default class TenantModel extends BaseModel {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ObjectID from '../Types/ObjectID';
|
||||
import type ObjectID from '../Types/ObjectID';
|
||||
import BaseModel from './BaseModel';
|
||||
|
||||
export default class UserModel extends BaseModel {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import ErrorResponse from '../../../Types/API/HTTPErrorResponse';
|
||||
describe('ErrorResponse', () => {
|
||||
test('should return a valid error response object', () => {
|
||||
const errorResponseObject: ErrorResponse = new ErrorResponse(500, {
|
||||
import HTTPErrorResponse from '../../../Types/API/HTTPErrorResponse';
|
||||
describe('HTTPErrorResponse', () => {
|
||||
test('should return a valid error HTTPErrorResponse object', () => {
|
||||
const errorResponseObject: HTTPErrorResponse = new HTTPErrorResponse(500, {
|
||||
error: 'Internal Server Error',
|
||||
});
|
||||
}, {});
|
||||
expect(errorResponseObject.statusCode).toBe(500);
|
||||
expect(errorResponseObject.data).toEqual({
|
||||
error: 'Internal Server Error',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Headers from '../../../Types/API/Headers';
|
||||
import type Headers from '../../../Types/API/Headers';
|
||||
import Faker from '../../../Utils/Faker';
|
||||
describe('Headers', () => {
|
||||
test('should compile', () => {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import Response from '../../../Types/API/HTTPResponse';
|
||||
import { JSONObject } from '../../../Types/JSON';
|
||||
import type { JSONObject } from '../../../Types/JSON';
|
||||
|
||||
describe('Response()', () => {
|
||||
test('should return a valid response object', () => {
|
||||
const responseObject: Response<JSONObject> = new Response(200, {
|
||||
welcome: 'here',
|
||||
});
|
||||
}, {});
|
||||
expect(responseObject.statusCode).toBe(200);
|
||||
expect(responseObject.data).toEqual({ welcome: 'here' });
|
||||
const responseObjectArray: Response<Array<JSONObject>> = new Response<
|
||||
Array<JSONObject>
|
||||
>(200, [{ welcome: 'here' }]);
|
||||
>(200, [{ welcome: 'here' }], {});
|
||||
expect(responseObjectArray.statusCode).toBe(200);
|
||||
expect(responseObjectArray.data).toEqual([{ welcome: 'here' }]);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Char from '../../Types/Char';
|
||||
import Dictionary from '../../Types/Dictionary';
|
||||
import type Char from '../../Types/Char';
|
||||
import type Dictionary from '../../Types/Dictionary';
|
||||
|
||||
describe('type Char', () => {
|
||||
test('Char can used be type', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Color, { RGB } from '../../Types/Color';
|
||||
import type { RGB } from '../../Types/Color';
|
||||
import Color from '../../Types/Color';
|
||||
import BadDataException from '../../Types/Exception/BadDataException';
|
||||
|
||||
describe('Color', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Dictionary from '../../Types/Dictionary';
|
||||
import type Dictionary from '../../Types/Dictionary';
|
||||
describe('Dictionary', () => {
|
||||
test('should allow basic types compile', () => {
|
||||
const dictionary: Dictionary<string> = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Email from '../../Types/Email';
|
||||
import type Email from '../../Types/Email';
|
||||
import EmailWithName from '../../Types/EmailWithName';
|
||||
import BadDataException from '../../Types/Exception/BadDataException';
|
||||
import Faker from '../../Utils/Faker';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { File } from '../../Types/File';
|
||||
import type { File } from '../../Types/File';
|
||||
|
||||
describe('interface File', () => {
|
||||
test('should have name and contentType property', () => {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { JSONObject } from '../JSON';
|
||||
import type { JSONObject } from '../JSON';
|
||||
|
||||
export default interface EmptyResponseData extends JSONObject {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { JSONObject } from '../JSON';
|
||||
import type { JSONObject } from '../JSON';
|
||||
import Typeof from '../Typeof';
|
||||
import HTTPResponse from './HTTPResponse';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import BaseModel from '../../Models/BaseModel';
|
||||
import { JSONArray, JSONObject, JSONObjectOrArray } from '../JSON';
|
||||
import type BaseModel from '../../Models/BaseModel';
|
||||
import type { JSONArray, JSONObject, JSONObjectOrArray } from '../JSON';
|
||||
import JSONFunctions from '../JSONFunctions';
|
||||
import Typeof from '../Typeof';
|
||||
import Headers from './Headers';
|
||||
import type Headers from './Headers';
|
||||
|
||||
export default class HTTPResponse<
|
||||
T extends JSONObjectOrArray | BaseModel | Array<BaseModel>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Dictionary from '../Dictionary';
|
||||
import type Dictionary from '../Dictionary';
|
||||
|
||||
type Headers = Dictionary<string>;
|
||||
export default Headers;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import DatabaseProperty from '../Database/DatabaseProperty';
|
||||
import BadDataException from '../Exception/BadDataException';
|
||||
import Port from '../Port';
|
||||
|
||||
@@ -2,8 +2,8 @@ import Protocol from './Protocol';
|
||||
import Route from './Route';
|
||||
import Hostname from './Hostname';
|
||||
import DatabaseProperty from '../Database/DatabaseProperty';
|
||||
import { FindOperator } from 'typeorm';
|
||||
import Dictionary from '../Dictionary';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import type Dictionary from '../Dictionary';
|
||||
import Typeof from '../Typeof';
|
||||
import Email from '../Email';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import BadDataException from '../Exception/BadDataException';
|
||||
import { JSONObject } from '../JSON';
|
||||
import type { JSONObject } from '../JSON';
|
||||
|
||||
export enum PlanSelect {
|
||||
Free = 'Free',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { PlanSelect } from '../../Billing/SubscriptionPlan';
|
||||
import Permission from '../../Permission';
|
||||
import type { PlanSelect } from '../../Billing/SubscriptionPlan';
|
||||
import type Permission from '../../Permission';
|
||||
|
||||
export interface ColumnAccessControl {
|
||||
read: Array<Permission>;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'reflect-metadata';
|
||||
import BaseModel from '../../../Models/BaseModel';
|
||||
import Dictionary from '../../Dictionary';
|
||||
import { ReflectionMetadataType } from '../../Reflection';
|
||||
import { ColumnAccessControl } from './AccessControl';
|
||||
import type BaseModel from '../../../Models/BaseModel';
|
||||
import type Dictionary from '../../Dictionary';
|
||||
import type { ReflectionMetadataType } from '../../Reflection';
|
||||
import type { ColumnAccessControl } from './AccessControl';
|
||||
|
||||
const accessControlSymbol: Symbol = Symbol('ColumnAccessControl');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableAccessControl } from './AccessControl';
|
||||
import type { TableAccessControl } from './AccessControl';
|
||||
|
||||
export default (accessControl: TableAccessControl) => {
|
||||
return (ctr: Function) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BillingAccessControl } from './AccessControl';
|
||||
import type { BillingAccessControl } from './AccessControl';
|
||||
|
||||
export default (accessControl: BillingAccessControl) => {
|
||||
return (ctr: Function) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Route from '../API/Route';
|
||||
import type Route from '../API/Route';
|
||||
|
||||
export default (apiPath: Route) => {
|
||||
return (ctr: Function) => {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { PlanSelect } from '../Billing/SubscriptionPlan';
|
||||
import Dictionary from '../Dictionary';
|
||||
import ObjectID from '../ObjectID';
|
||||
import {
|
||||
import type { PlanSelect } from '../Billing/SubscriptionPlan';
|
||||
import type Dictionary from '../Dictionary';
|
||||
import type ObjectID from '../ObjectID';
|
||||
import type {
|
||||
UserGlobalAccessPermission,
|
||||
UserTenantAccessPermission,
|
||||
} from '../Permission';
|
||||
import UserType from '../UserType';
|
||||
import type UserType from '../UserType';
|
||||
|
||||
export default interface DatabaseCommonInteractionProps {
|
||||
userId?: ObjectID | undefined;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import { ValueTransformer } from 'typeorm/decorator/options/ValueTransformer';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import type { ValueTransformer } from 'typeorm/decorator/options/ValueTransformer';
|
||||
import NotImplementedException from '../Exception/NotImplementedException';
|
||||
|
||||
export default class DatabaseProperty {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Permission from '../Permission';
|
||||
import type Permission from '../Permission';
|
||||
|
||||
export default (
|
||||
permission: Permission,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
||||
import type { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
||||
|
||||
export default QueryDeepPartialEntity;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'reflect-metadata';
|
||||
import BaseModel from '../../Models/BaseModel';
|
||||
import Dictionary from '../Dictionary';
|
||||
import { ReflectionMetadataType } from '../Reflection';
|
||||
import TableColumnType from './TableColumnType';
|
||||
import type BaseModel from '../../Models/BaseModel';
|
||||
import type Dictionary from '../Dictionary';
|
||||
import type { ReflectionMetadataType } from '../Reflection';
|
||||
import type TableColumnType from './TableColumnType';
|
||||
|
||||
const tableColumn: Symbol = Symbol('TableColumn');
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'reflect-metadata';
|
||||
import BaseModel from '../../Models/BaseModel';
|
||||
import Dictionary from '../Dictionary';
|
||||
import { ReflectionMetadataType } from '../Reflection';
|
||||
import type BaseModel from '../../Models/BaseModel';
|
||||
import type Dictionary from '../Dictionary';
|
||||
import type { ReflectionMetadataType } from '../Reflection';
|
||||
|
||||
const uniqueColumnBy: Symbol = Symbol('UniqueColumnBy');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm/find-options/FindOperator';
|
||||
import type { FindOperator } from 'typeorm/find-options/FindOperator';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import Hostname from './API/Hostname';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Email from '../Email';
|
||||
import Dictionary from '../Dictionary';
|
||||
import EmailTemplateType from './EmailTemplateType';
|
||||
import type Email from '../Email';
|
||||
import type Dictionary from '../Dictionary';
|
||||
import type EmailTemplateType from './EmailTemplateType';
|
||||
|
||||
export default interface EmailMessage {
|
||||
toEmail: Email;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Email from '../Email';
|
||||
import Port from '../Port';
|
||||
import Hostname from '../API/Hostname';
|
||||
import type Email from '../Email';
|
||||
import type Port from '../Port';
|
||||
import type Hostname from '../API/Hostname';
|
||||
|
||||
export default interface EmailServer {
|
||||
host: Hostname;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import EmailBody from './EmailBody';
|
||||
import EmailTemplateType from './EmailTemplateType';
|
||||
import type EmailBody from './EmailBody';
|
||||
import type EmailTemplateType from './EmailTemplateType';
|
||||
|
||||
export default interface EmailTemplate {
|
||||
allowedVariables: Array<string>;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import UUID from '../Utils/UUID';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadOperationException from './Exception/BadOperationException';
|
||||
import ObjectID from './ObjectID';
|
||||
import type ObjectID from './ObjectID';
|
||||
import CryptoJS from 'crypto-js';
|
||||
|
||||
export default class HashedString extends DatabaseProperty {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import ObjectID from './ObjectID';
|
||||
import Version from './Version';
|
||||
import Email from './Email';
|
||||
import Phone from './Phone';
|
||||
import Color from './Color';
|
||||
import Route from './API/Route';
|
||||
import URL from './API/URL';
|
||||
import Name from './Name';
|
||||
import Permission from './Permission';
|
||||
import Search from './Database/Search';
|
||||
import Port from './Port';
|
||||
import Hostname from './API/Hostname';
|
||||
import HashedString from './HashedString';
|
||||
import GreaterThan from './Database/GreaterThan';
|
||||
import GreaterThanOrEqual from './Database/GreaterThanOrEqual';
|
||||
import LessThan from './Database/LessThan';
|
||||
import LessThanOrEqual from './Database/LessThanOrEqual';
|
||||
import InBetween from './Database/InBetween';
|
||||
import Domain from './Domain';
|
||||
import NotNull from './Database/NotNull';
|
||||
import { BaseEntity } from 'typeorm';
|
||||
import type ObjectID from './ObjectID';
|
||||
import type Version from './Version';
|
||||
import type Email from './Email';
|
||||
import type Phone from './Phone';
|
||||
import type Color from './Color';
|
||||
import type Route from './API/Route';
|
||||
import type URL from './API/URL';
|
||||
import type Name from './Name';
|
||||
import type Permission from './Permission';
|
||||
import type Search from './Database/Search';
|
||||
import type Port from './Port';
|
||||
import type Hostname from './API/Hostname';
|
||||
import type HashedString from './HashedString';
|
||||
import type GreaterThan from './Database/GreaterThan';
|
||||
import type GreaterThanOrEqual from './Database/GreaterThanOrEqual';
|
||||
import type LessThan from './Database/LessThan';
|
||||
import type LessThanOrEqual from './Database/LessThanOrEqual';
|
||||
import type InBetween from './Database/InBetween';
|
||||
import type Domain from './Domain';
|
||||
import type NotNull from './Database/NotNull';
|
||||
import type { BaseEntity } from 'typeorm';
|
||||
|
||||
export enum ObjectType {
|
||||
ObjectID = 'ObjectID',
|
||||
|
||||
@@ -21,8 +21,9 @@ import LessThanOrEqual from './Database/LessThanOrEqual';
|
||||
import InBetween from './Database/InBetween';
|
||||
import Domain from './Domain';
|
||||
import NotNull from './Database/NotNull';
|
||||
import { JSONArray, JSONObject, JSONValue, ObjectType } from './JSON';
|
||||
import { TableColumnMetadata } from '../Types/Database/TableColumn';
|
||||
import type { JSONArray, JSONObject, JSONValue } from './JSON';
|
||||
import { ObjectType } from './JSON';
|
||||
import type { TableColumnMetadata } from '../Types/Database/TableColumn';
|
||||
import TableColumnType from '../Types/Database/TableColumnType';
|
||||
|
||||
export default class JSONFunctions {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Email from './Email';
|
||||
import { JSONObject } from './JSON';
|
||||
import Name from './Name';
|
||||
import ObjectID from './ObjectID';
|
||||
import type Email from './Email';
|
||||
import type { JSONObject } from './JSON';
|
||||
import type Name from './Name';
|
||||
import type ObjectID from './ObjectID';
|
||||
|
||||
export default interface JSONWebTokenData extends JSONObject {
|
||||
userId: ObjectID;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Route from './API/Route';
|
||||
import URL from './API/URL';
|
||||
import type Route from './API/Route';
|
||||
import type URL from './API/URL';
|
||||
|
||||
export default interface Link {
|
||||
title: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { JSONArray, JSONObject } from './JSON';
|
||||
import PositiveNumber from './PositiveNumber';
|
||||
import type { JSONArray, JSONObject } from './JSON';
|
||||
import type PositiveNumber from './PositiveNumber';
|
||||
|
||||
export default class ListData {
|
||||
public constructor(obj: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
|
||||
export default class Name extends DatabaseProperty {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// This is for Object ID for all the things in our database.
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import UUID from '../Utils/UUID';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Have "Project" string in the permission to make sure this permission is by Project.
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
import { JSONObject } from './JSON';
|
||||
import ObjectID from './ObjectID';
|
||||
import type { JSONObject } from './JSON';
|
||||
import type ObjectID from './ObjectID';
|
||||
|
||||
export interface PermissionProps {
|
||||
permission: Permission;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm/find-options/FindOperator';
|
||||
import type { FindOperator } from 'typeorm/find-options/FindOperator';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
import PositiveNumber from './PositiveNumber';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default class Sleep {
|
||||
public static async sleep(ms: number): Promise<void> {
|
||||
return new Promise((resolve: Function) => {
|
||||
return new Promise((resolve: () => void) => {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FindOperator } from 'typeorm';
|
||||
import type { FindOperator } from 'typeorm';
|
||||
import DatabaseProperty from './Database/DatabaseProperty';
|
||||
import BadDataException from './Exception/BadDataException';
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import axios, { AxiosError, AxiosResponse } from 'axios';
|
||||
import type { AxiosError, AxiosResponse } from 'axios';
|
||||
import axios from 'axios';
|
||||
import URL from '../Types/API/URL';
|
||||
import { JSONObject, JSONArray } from '../Types/JSON';
|
||||
import Headers from '../Types/API/Headers';
|
||||
import type { JSONObject, JSONArray } from '../Types/JSON';
|
||||
import type Headers from '../Types/API/Headers';
|
||||
import HTTPResponse from '../Types/API/HTTPResponse';
|
||||
import HTTPErrorResponse from '../Types/API/HTTPErrorResponse';
|
||||
import HTTPMethod from '../Types/API/HTTPMethod';
|
||||
import APIException from '../Types/Exception/ApiException';
|
||||
import Protocol from '../Types/API/Protocol';
|
||||
import Hostname from '../Types/API/Hostname';
|
||||
import type Hostname from '../Types/API/Hostname';
|
||||
import Route from '../Types/API/Route';
|
||||
import BaseModel from '../Models/BaseModel';
|
||||
import Dictionary from '../Types/Dictionary';
|
||||
import type BaseModel from '../Models/BaseModel';
|
||||
import type Dictionary from '../Types/Dictionary';
|
||||
|
||||
export default class API {
|
||||
private _protocol: Protocol = Protocol.HTTPS;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Email from '../Types/Email';
|
||||
import { JSONObject } from '../Types/JSON';
|
||||
import type Email from '../Types/Email';
|
||||
import type { JSONObject } from '../Types/JSON';
|
||||
import posthog from 'posthog-js';
|
||||
|
||||
export default class Analytics {
|
||||
|
||||
13
Common/package-lock.json
generated
13
Common/package-lock.json
generated
@@ -27,6 +27,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^6.3.1",
|
||||
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^17.0.22",
|
||||
"jest": "^27.5.1",
|
||||
@@ -958,6 +959,12 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@tsconfig/node-lts-strictest-esm": {
|
||||
"version": "18.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node-lts-strictest-esm/-/node-lts-strictest-esm-18.12.1.tgz",
|
||||
"integrity": "sha512-LvBLmaC6Q/txTddLc11OeMHF9XjJFzlilkETJuvBlUvHy9pPiMsoH3nxWZM1FMSO53zp4mJP6gzOzxKEq0me7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__core": {
|
||||
"version": "7.1.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz",
|
||||
@@ -5428,6 +5435,12 @@
|
||||
"integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
|
||||
"dev": true
|
||||
},
|
||||
"@tsconfig/node-lts-strictest-esm": {
|
||||
"version": "18.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node-lts-strictest-esm/-/node-lts-strictest-esm-18.12.1.tgz",
|
||||
"integrity": "sha512-LvBLmaC6Q/txTddLc11OeMHF9XjJFzlilkETJuvBlUvHy9pPiMsoH3nxWZM1FMSO53zp4mJP6gzOzxKEq0me7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/babel__core": {
|
||||
"version": "7.1.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"name": "common",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
@@ -11,6 +12,7 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^6.3.1",
|
||||
"@tsconfig/node-lts-strictest-esm": "^18.12.1",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^17.0.22",
|
||||
"jest": "^27.5.1",
|
||||
|
||||
@@ -1,113 +1,9 @@
|
||||
{
|
||||
"ts-node": {
|
||||
// these options are overrides used only by ts-node
|
||||
// same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@tsconfig/node-lts-strictest-esm/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"outDir": "./build/dist",
|
||||
"experimentalDecorators": true,
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
"jsx": "react", /* Specify what JSX code is generated. */ /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
"emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
"module": "es2022" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./" /* Specify the root folder within your source files. */,
|
||||
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
] /* Specify multiple folders that act like `./node_modules/@types`. */,
|
||||
"types": [
|
||||
"node",
|
||||
"jest"
|
||||
] /* Specify type package names to be included without being referenced in a source file. */,
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files */
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
/* JavaScript Support */
|
||||
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./build/dist" /* Specify an output folder for all emitted files. */,
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
|
||||
/* Interop Constraints */
|
||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied `any` type.. */,
|
||||
"strictNullChecks": true /* When type checking, take into account `null` and `undefined`. */,
|
||||
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
|
||||
"strictBindCallApply": true /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */,
|
||||
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
|
||||
"noImplicitThis": true /* Enable error reporting when `this` is given the type `any`. */,
|
||||
"useUnknownInCatchVariables": true /* Type catch clause variables as 'unknown' instead of 'any'. */,
|
||||
"alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
|
||||
"noUnusedLocals": true /* Enable error reporting when a local variables aren't read. */,
|
||||
"noUnusedParameters": true /* Raise an error when a function parameter isn't read */,
|
||||
"exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */,
|
||||
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
|
||||
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
|
||||
"noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */,
|
||||
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */,
|
||||
"noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type */,
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,32 @@
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import DatabaseService from '../Services/DatabaseService';
|
||||
import Express, {
|
||||
import type BaseModel from 'Common/Models/BaseModel';
|
||||
import type DatabaseService from '../Services/DatabaseService';
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
NextFunction,
|
||||
OneUptimeRequest,
|
||||
} from '../Utils/Express';
|
||||
import Express from '../Utils/Express';
|
||||
import UserMiddleware from '../Middleware/UserAuthorization';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import BadRequestException from 'Common/Types/Exception/BadRequestException';
|
||||
import Response from '../Utils/Response';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import CreateBy from '../Types/Database/CreateBy';
|
||||
import DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import Query from '../Types/Database/Query';
|
||||
import Select from '../Types/Database/Select';
|
||||
import Sort from '../Types/Database/Sort';
|
||||
import type CreateBy from '../Types/Database/CreateBy';
|
||||
import type DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import type Query from '../Types/Database/Query';
|
||||
import type Select from '../Types/Database/Select';
|
||||
import type Sort from '../Types/Database/Sort';
|
||||
import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax';
|
||||
import Populate from '../Types/Database/Populate';
|
||||
import PartialEntity from 'Common/Types/Database/PartialEntity';
|
||||
import { UserPermission } from 'Common/Types/Permission';
|
||||
import type Populate from '../Types/Database/Populate';
|
||||
import type PartialEntity from 'Common/Types/Database/PartialEntity';
|
||||
import type { UserPermission } from 'Common/Types/Permission';
|
||||
import { IsBillingEnabled } from '../Config';
|
||||
import ProjectService from '../Services/ProjectService';
|
||||
import { PlanSelect } from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import type { PlanSelect } from 'Common/Types/Billing/SubscriptionPlan';
|
||||
|
||||
export default class BaseAPI<
|
||||
TBaseModel extends BaseModel,
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Permission, { UserPermission } from 'Common/Types/Permission';
|
||||
import type { UserPermission } from 'Common/Types/Permission';
|
||||
import Permission from 'Common/Types/Permission';
|
||||
import BillingInvoice from 'Model/Models/BillingInvoice';
|
||||
import Project from 'Model/Models/Project';
|
||||
import type Project from 'Model/Models/Project';
|
||||
import { IsBillingEnabled } from '../Config';
|
||||
import UserMiddleware from '../Middleware/UserAuthorization';
|
||||
import BillingInvoiceService, {
|
||||
Service as BillingInvoiceServiceType,
|
||||
} from '../Services/BillingInvoiceService';
|
||||
import BillingService, { Invoice } from '../Services/BillingService';
|
||||
import type { Service as BillingInvoiceServiceType } from '../Services/BillingInvoiceService';
|
||||
import BillingInvoiceService from '../Services/BillingInvoiceService';
|
||||
import type { Invoice } from '../Services/BillingService';
|
||||
import BillingService from '../Services/BillingService';
|
||||
import ProjectService from '../Services/ProjectService';
|
||||
import {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Permission, { UserPermission } from 'Common/Types/Permission';
|
||||
import type { UserPermission } from 'Common/Types/Permission';
|
||||
import Permission from 'Common/Types/Permission';
|
||||
import BillingPaymentMethod from 'Model/Models/BillingPaymentMethod';
|
||||
import Project from 'Model/Models/Project';
|
||||
import type Project from 'Model/Models/Project';
|
||||
import { IsBillingEnabled } from '../Config';
|
||||
import UserMiddleware from '../Middleware/UserAuthorization';
|
||||
import BillingPaymentMethodService, {
|
||||
Service as BillingPaymentMethodServiceType,
|
||||
} from '../Services/BillingPaymentMethodService';
|
||||
import type { Service as BillingPaymentMethodServiceType } from '../Services/BillingPaymentMethodService';
|
||||
import BillingPaymentMethodService from '../Services/BillingPaymentMethodService';
|
||||
import BillingService from '../Services/BillingService';
|
||||
import ProjectService from '../Services/ProjectService';
|
||||
import {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import version from './VersionAPI';
|
||||
import status from './StatusAPI';
|
||||
import Express, { ExpressApplication } from '../Utils/Express';
|
||||
import type { ExpressApplication } from '../Utils/Express';
|
||||
import Express from '../Utils/Express';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import User from 'Model/Models/User';
|
||||
import UserService, {
|
||||
Service as UserServiceType,
|
||||
} from '../Services/UserService';
|
||||
import type { Service as UserServiceType } from '../Services/UserService';
|
||||
import UserService from '../Services/UserService';
|
||||
import BaseAPI from './BaseAPI';
|
||||
|
||||
export default class UserAPI extends BaseAPI<User, UserServiceType> {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Express, {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from '../Utils/Express';
|
||||
import Express from '../Utils/Express';
|
||||
import LocalCache from '../Infrastructure/LocalCache';
|
||||
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import StatusPage from 'Model/Models/StatusPage';
|
||||
import UserMiddleware from '../Middleware/UserAuthorization';
|
||||
import StatusPageService, {
|
||||
Service as StatusPageServiceType,
|
||||
} from '../Services/StatusPageService';
|
||||
import Populate from '../Types/Database/Populate';
|
||||
import Select from '../Types/Database/Select';
|
||||
import {
|
||||
import type { Service as StatusPageServiceType } from '../Services/StatusPageService';
|
||||
import StatusPageService from '../Services/StatusPageService';
|
||||
import type Populate from '../Types/Database/Populate';
|
||||
import type Select from '../Types/Database/Select';
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
@@ -20,9 +19,9 @@ import { LIMIT_PER_PROJECT } from 'Common/Types/Database/LimitMax';
|
||||
import StatusPageFooterLink from 'Model/Models/StatusPageFooterLink';
|
||||
import StatusPageHeaderLinkService from '../Services/StatusPageHeaderLinkService';
|
||||
import StatusPageHeaderLink from 'Model/Models/StatusPageHeaderLink';
|
||||
import StatusPageDomain from 'Model/Models/StatusPageDomain';
|
||||
import type StatusPageDomain from 'Model/Models/StatusPageDomain';
|
||||
import StatusPageDomainService from '../Services/StatusPageDomainService';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import StatusPageGroup from 'Model/Models/StatusPageGroup';
|
||||
import StatusPageGroupService from '../Services/StatusPageGroupService';
|
||||
import StatusPageResource from 'Model/Models/StatusPageResource';
|
||||
@@ -48,10 +47,10 @@ import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
|
||||
import IncidentStateTimelineService from '../Services/IncidentStateTimelineService';
|
||||
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
|
||||
import ScheduledMaintenanceStateTimelineService from '../Services/ScheduledMaintenanceStateTimelineService';
|
||||
import DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import Query from '../Types/Database/Query';
|
||||
import type DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import type Query from '../Types/Database/Query';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import GreenlockChallenge from 'Model/Models/GreenlockChallenge';
|
||||
import type GreenlockChallenge from 'Model/Models/GreenlockChallenge';
|
||||
import GreenlockChallengeService from '../Services/GreenlockChallengeService';
|
||||
import NotFoundException from 'Common/Types/Exception/NotFoundException';
|
||||
import logger from '../Utils/Logger';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import StatusPageSubscriber from 'Model/Models/StatusPageSubscriber';
|
||||
import StatusPageSubscriberService, {
|
||||
Service as StatusPageSubscriberServiceType,
|
||||
} from '../Services/StatusPageSubscriberService';
|
||||
import {
|
||||
import type { Service as StatusPageSubscriberServiceType } from '../Services/StatusPageSubscriberService';
|
||||
import StatusPageSubscriberService from '../Services/StatusPageSubscriberService';
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import User from 'Model/Models/User';
|
||||
import UserService, {
|
||||
Service as UserServiceType,
|
||||
} from '../Services/UserService';
|
||||
import type { Service as UserServiceType } from '../Services/UserService';
|
||||
import UserService from '../Services/UserService';
|
||||
import BaseAPI from './BaseAPI';
|
||||
|
||||
export default class UserAPI extends BaseAPI<User, UserServiceType> {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Express, {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressRouter,
|
||||
} from '../Utils/Express';
|
||||
import Express from '../Utils/Express';
|
||||
import { Version } from '../Config';
|
||||
const router: ExpressRouter = Express.getRouter();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import Port from 'Common/Types/Port';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
|
||||
export const getAllEnvVars: Function = (): JSONObject => {
|
||||
return process.env;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Redis, { ClientType } from './Redis';
|
||||
import type { ClientType } from './Redis';
|
||||
import Redis from './Redis';
|
||||
import DatabaseNotConnectedException from 'Common/Types/Exception/DatabaseNotConnectedException';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import logger from '../Utils/Logger';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import { JSONValue } from 'Common/Types/JSON';
|
||||
import type BaseModel from 'Common/Models/BaseModel';
|
||||
import type Dictionary from 'Common/Types/Dictionary';
|
||||
import type { JSONValue } from 'Common/Types/JSON';
|
||||
|
||||
export default abstract class LocalCache {
|
||||
private static cache: Dictionary<JSONValue | BaseModel> = {};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DataSource, DataSourceOptions } from 'typeorm';
|
||||
import type { DataSourceOptions } from 'typeorm';
|
||||
import { DataSource } from 'typeorm';
|
||||
import {
|
||||
DatabaseHost,
|
||||
DatabaseName,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DataSource, DataSourceOptions } from 'typeorm';
|
||||
import type { DataSourceOptions } from 'typeorm';
|
||||
import { DataSource } from 'typeorm';
|
||||
import logger from '../Utils/Logger';
|
||||
import { dataSourceOptions, testDataSourceOptions } from './PostgresConfig';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createClient, RedisClientType } from 'redis';
|
||||
import type { RedisClientType } from 'redis';
|
||||
import { createClient } from 'redis';
|
||||
import { RedisHostname, RedisPassword, RedisPort } from '../Config';
|
||||
import logger from '../Utils/Logger';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import SocketIO from 'socket.io';
|
||||
import http from 'http';
|
||||
import Express, { ExpressApplication } from '../Utils/Express';
|
||||
import type { ExpressApplication } from '../Utils/Express';
|
||||
import Express from '../Utils/Express';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
const server: http.Server = http.createServer(app);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClusterKey as ONEUPTIME_SECRET } from '../Config';
|
||||
import {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
|
||||
@@ -2,7 +2,7 @@ import ProbeService from '../Services/ProbeService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Version from 'Common/Types/Version';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import ApiKeyService from '../Services/ApiKeyService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import {
|
||||
import type {
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
NextFunction,
|
||||
OneUptimeRequest,
|
||||
} from '../Utils/Express';
|
||||
|
||||
import ApiKey from 'Model/Models/ApiKey';
|
||||
import type ApiKey from 'Model/Models/ApiKey';
|
||||
import { LessThan } from 'typeorm';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import UserType from 'Common/Types/UserType';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
ExpressResponse,
|
||||
ExpressRequest,
|
||||
NextFunction,
|
||||
@@ -7,15 +7,15 @@ import {
|
||||
import UserService from '../Services/UserService';
|
||||
import ProjectMiddleware from './ProjectAuthorization';
|
||||
import JSONWebToken from '../Utils/JsonWebToken';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import type ObjectID from 'Common/Types/ObjectID';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import UserType from 'Common/Types/UserType';
|
||||
import {
|
||||
import type {
|
||||
UserGlobalAccessPermission,
|
||||
UserTenantAccessPermission,
|
||||
} from 'Common/Types/Permission';
|
||||
import AccessTokenService from '../Services/AccessTokenService';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import HashedString from 'Common/Types/HashedString';
|
||||
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import type ObjectID from 'Common/Types/ObjectID';
|
||||
import TeamMemberService from './TeamMemberService';
|
||||
import TeamMember from 'Model/Models/TeamMember';
|
||||
import type TeamMember from 'Model/Models/TeamMember';
|
||||
import GlobalCache from '../Infrastructure/GlobalCache';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import Permission, {
|
||||
import type { JSONObject } from 'Common/Types/JSON';
|
||||
import type {
|
||||
UserGlobalAccessPermission,
|
||||
UserPermission,
|
||||
UserTenantAccessPermission,
|
||||
} from 'Common/Types/Permission';
|
||||
import TeamPermission from 'Model/Models/TeamPermission';
|
||||
import Permission from 'Common/Types/Permission';
|
||||
import type TeamPermission from 'Model/Models/TeamPermission';
|
||||
import TeamPermissionService from './TeamPermissionService';
|
||||
import LIMIT_MAX from 'Common/Types/Database/LimitMax';
|
||||
import Label from 'Model/Models/Label';
|
||||
import type Label from 'Model/Models/Label';
|
||||
|
||||
enum PermissionNamespace {
|
||||
GlobalPermission = 'global-permissions',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/ApiKeyPermission';
|
||||
import DatabaseService from './DatabaseService';
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/ApiKey';
|
||||
import DatabaseService, { OnCreate } from './DatabaseService';
|
||||
import CreateBy from '../Types/Database/CreateBy';
|
||||
import type { OnCreate } from './DatabaseService';
|
||||
import DatabaseService from './DatabaseService';
|
||||
import type CreateBy from '../Types/Database/CreateBy';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
|
||||
export class Service extends DatabaseService<Model> {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/BillingInvoice';
|
||||
import DatabaseService, { OnDelete, OnFind } from './DatabaseService';
|
||||
import FindBy from '../Types/Database/FindBy';
|
||||
import type { OnDelete, OnFind } from './DatabaseService';
|
||||
import DatabaseService from './DatabaseService';
|
||||
import type FindBy from '../Types/Database/FindBy';
|
||||
import ProjectService from './ProjectService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Project from 'Model/Models/Project';
|
||||
import BillingService, { Invoice } from './BillingService';
|
||||
import DeleteBy from '../Types/Database/DeleteBy';
|
||||
import type Project from 'Model/Models/Project';
|
||||
import type { Invoice } from './BillingService';
|
||||
import BillingService from './BillingService';
|
||||
import type DeleteBy from '../Types/Database/DeleteBy';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
|
||||
export class Service extends DatabaseService<Model> {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/BillingPaymentMethod';
|
||||
import DatabaseService, { OnDelete, OnFind } from './DatabaseService';
|
||||
import FindBy from '../Types/Database/FindBy';
|
||||
import type { OnDelete, OnFind } from './DatabaseService';
|
||||
import DatabaseService from './DatabaseService';
|
||||
import type FindBy from '../Types/Database/FindBy';
|
||||
import ProjectService from './ProjectService';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Project from 'Model/Models/Project';
|
||||
import BillingService, { PaymentMethod } from './BillingService';
|
||||
import DeleteBy from '../Types/Database/DeleteBy';
|
||||
import type Project from 'Model/Models/Project';
|
||||
import type { PaymentMethod } from './BillingService';
|
||||
import BillingService from './BillingService';
|
||||
import type DeleteBy from '../Types/Database/DeleteBy';
|
||||
import LIMIT_MAX from 'Common/Types/Database/LimitMax';
|
||||
|
||||
export class Service extends DatabaseService<Model> {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import type SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
|
||||
import OneUptimeDate from 'Common/Types/Date';
|
||||
import APIException from 'Common/Types/Exception/ApiException';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import type ObjectID from 'Common/Types/ObjectID';
|
||||
import Typeof from 'Common/Types/Typeof';
|
||||
import Stripe from 'stripe';
|
||||
import { BillingPrivateKey, IsBillingEnabled } from '../Config';
|
||||
|
||||
@@ -1,48 +1,47 @@
|
||||
import Slug from 'Common/Utils/Slug';
|
||||
import FindOneBy from '../Types/Database/FindOneBy';
|
||||
import UpdateOneBy from '../Types/Database/UpdateOneBy';
|
||||
import CountBy from '../Types/Database/CountBy';
|
||||
import DeleteOneBy from '../Types/Database/DeleteOneBy';
|
||||
import SearchBy from '../Types/Database/SearchBy';
|
||||
import DeleteBy from '../Types/Database/DeleteBy';
|
||||
import type FindOneBy from '../Types/Database/FindOneBy';
|
||||
import type UpdateOneBy from '../Types/Database/UpdateOneBy';
|
||||
import type CountBy from '../Types/Database/CountBy';
|
||||
import type DeleteOneBy from '../Types/Database/DeleteOneBy';
|
||||
import type SearchBy from '../Types/Database/SearchBy';
|
||||
import type DeleteBy from '../Types/Database/DeleteBy';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import FindBy from '../Types/Database/FindBy';
|
||||
import UpdateBy from '../Types/Database/UpdateBy';
|
||||
import Query, { FindWhere } from '../Types/Database/Query';
|
||||
import CreateBy from '../Types/Database/CreateBy';
|
||||
import type FindBy from '../Types/Database/FindBy';
|
||||
import type UpdateBy from '../Types/Database/UpdateBy';
|
||||
import type { FindWhere } from '../Types/Database/Query';
|
||||
import type Query from '../Types/Database/Query';
|
||||
import type CreateBy from '../Types/Database/CreateBy';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import DatabaseNotConnectedException from 'Common/Types/Exception/DatabaseNotConnectedException';
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import SearchResult from '../Types/Database/SearchResult';
|
||||
import type Exception from 'Common/Types/Exception/Exception';
|
||||
import type SearchResult from '../Types/Database/SearchResult';
|
||||
import Encryption from '../Utils/Encryption';
|
||||
import { JSONObject, JSONValue } from 'Common/Types/JSON';
|
||||
import type { JSONObject, JSONValue } from 'Common/Types/JSON';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import PostgresDatabase, {
|
||||
PostgresAppInstance,
|
||||
} from '../Infrastructure/PostgresDatabase';
|
||||
import { DataSource, Repository, SelectQueryBuilder } from 'typeorm';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import { PostgresAppInstance } from '../Infrastructure/PostgresDatabase';
|
||||
import type { DataSource, Repository, SelectQueryBuilder } from 'typeorm';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import SortOrder from 'Common/Types/Database/SortOrder';
|
||||
import { EncryptionSecret } from '../Config';
|
||||
import HashedString from 'Common/Types/HashedString';
|
||||
import UpdateByID from '../Types/Database/UpdateByID';
|
||||
import Columns from 'Common/Types/Database/Columns';
|
||||
import FindOneByID from '../Types/Database/FindOneByID';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import type UpdateByID from '../Types/Database/UpdateByID';
|
||||
import type Columns from 'Common/Types/Database/Columns';
|
||||
import type FindOneByID from '../Types/Database/FindOneByID';
|
||||
import type Dictionary from 'Common/Types/Dictionary';
|
||||
import type DatabaseCommonInteractionProps from 'Common/Types/Database/DatabaseCommonInteractionProps';
|
||||
import QueryHelper from '../Types/Database/QueryHelper';
|
||||
import { getUniqueColumnsBy } from 'Common/Types/Database/UniqueColumnBy';
|
||||
import Typeof from 'Common/Types/Typeof';
|
||||
import TableColumnType from 'Common/Types/Database/TableColumnType';
|
||||
import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
||||
import type { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
|
||||
import LIMIT_MAX from 'Common/Types/Database/LimitMax';
|
||||
import { TableColumnMetadata } from 'Common/Types/Database/TableColumn';
|
||||
import ModelPermission, {
|
||||
CheckReadPermissionType,
|
||||
} from '../Utils/ModelPermission';
|
||||
import Select from '../Types/Database/Select';
|
||||
import Populate from '../Types/Database/Populate';
|
||||
import UpdateByIDAndFetch from '../Types/Database/UpdateByIDAndFetch';
|
||||
import type { TableColumnMetadata } from 'Common/Types/Database/TableColumn';
|
||||
import type { CheckReadPermissionType } from '../Utils/ModelPermission';
|
||||
import ModelPermission from '../Utils/ModelPermission';
|
||||
import type Select from '../Types/Database/Select';
|
||||
import type Populate from '../Types/Database/Populate';
|
||||
import type UpdateByIDAndFetch from '../Types/Database/UpdateByIDAndFetch';
|
||||
|
||||
export interface OnCreate<TBaseModel extends BaseModel> {
|
||||
createBy: CreateBy<TBaseModel>;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/Domain';
|
||||
import DatabaseService, { OnCreate, OnUpdate } from './DatabaseService';
|
||||
import CreateBy from '../Types/Database/CreateBy';
|
||||
import type { OnCreate, OnUpdate } from './DatabaseService';
|
||||
import DatabaseService from './DatabaseService';
|
||||
import type CreateBy from '../Types/Database/CreateBy';
|
||||
import Text from 'Common/Types/Text';
|
||||
import UpdateBy from '../Types/Database/UpdateBy';
|
||||
import type UpdateBy from '../Types/Database/UpdateBy';
|
||||
import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import Domain from '../Types/Domain';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/EmailLog';
|
||||
import DatabaseService from './DatabaseService';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import type PostgresDatabase from '../Infrastructure/PostgresDatabase';
|
||||
import Model from 'Model/Models/EmailVerificationToken';
|
||||
import DatabaseService from './DatabaseService';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user