mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
ts: models
This commit is contained in:
1 parent
d4bb04e921
commit
db79a2cd1e
28 files changed
+5
-35
No files matched your search
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import randomstring from "randomstring";
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import path from "path";
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
import { deleteFromS3 } from "../utils/s3";
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize, encryptedFields } from "../sequelize";
|
||||
|
||||
const Authentication = sequelize.define("authentication", {
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const Backlink = sequelize.define("backlink", {
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { find, concat, remove, uniq } from "lodash";
|
||||
import randomstring from "randomstring";
|
||||
import slug from "slug";
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const CollectionGroup = sequelize.define(
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const CollectionUser = sequelize.define(
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import removeMarkdown from "@tommoor/remove-markdown";
|
||||
import { compact, find, map, uniq } from "lodash";
|
||||
import randomstring from "randomstring";
|
||||
@@ -228,9 +227,9 @@ type SearchResponse = {
|
||||
results: {
|
||||
ranking: number,
|
||||
context: string,
|
||||
document: Document,
|
||||
document: Document
|
||||
}[],
|
||||
totalCount: number,
|
||||
totalCount: number
|
||||
};
|
||||
|
||||
type SearchOptions = {
|
||||
@@ -240,7 +239,7 @@ type SearchOptions = {
|
||||
dateFilter?: "day" | "week" | "month" | "year",
|
||||
collaboratorIds?: string[],
|
||||
includeArchived?: boolean,
|
||||
includeDrafts?: boolean,
|
||||
includeDrafts?: boolean
|
||||
};
|
||||
|
||||
function escape(query: string): string {
|
||||
@@ -249,11 +248,7 @@ function escape(query: string): string {
|
||||
return sequelize.escape(query).replace("\\", "\\\\");
|
||||
}
|
||||
|
||||
Document.searchForTeam = async (
|
||||
team,
|
||||
query,
|
||||
options: SearchOptions = {}
|
||||
): Promise<SearchResponse> => {
|
||||
Document.searchForTeam = async (team, query, options: SearchOptions = {}): Promise<SearchResponse> => {
|
||||
const limit = options.limit || 15;
|
||||
const offset = options.offset || 0;
|
||||
const wildcardQuery = `${escape(query)}:*`;
|
||||
@@ -339,11 +334,7 @@ Document.searchForTeam = async (
|
||||
};
|
||||
};
|
||||
|
||||
Document.searchForUser = async (
|
||||
user,
|
||||
query,
|
||||
options: SearchOptions = {}
|
||||
): Promise<SearchResponse> => {
|
||||
Document.searchForUser = async (user, query, options: SearchOptions = {}): Promise<SearchResponse> => {
|
||||
const limit = options.limit || 15;
|
||||
const offset = options.offset || 0;
|
||||
const wildcardQuery = `${escape(query)}:*`;
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import events from "../events";
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { CollectionGroup, GroupUser } from "../models";
|
||||
import { Op, DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { sequelize } from "../sequelize";
|
||||
|
||||
const GroupUser = sequelize.define(
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const Integration = sequelize.define("integration", {
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const Notification = sequelize.define(
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import crypto from "crypto";
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import MarkdownSerializer from "slate-md-serializer";
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const SearchQuery = sequelize.define(
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const Share = sequelize.define(
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import { DataTypes, sequelize } from "../sequelize";
|
||||
|
||||
const Star = sequelize.define("star", {
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { URL } from "url";
|
||||
File renamed without changes.
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import crypto from "crypto";
|
||||
import addMinutes from "date-fns/add_minutes";
|
||||
import subMinutes from "date-fns/sub_minutes";
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import subMilliseconds from "date-fns/sub_milliseconds";
|
||||
import { USER_PRESENCE_INTERVAL } from "../../shared/constants";
|
||||
import { User } from "../models";
|
||||
@@ -1,4 +1,3 @@
|
||||
// @flow
|
||||
import ApiKey from "./ApiKey";
|
||||
import Attachment from "./Attachment";
|
||||
import Authentication from "./Authentication";
|
||||
Reference in new issue
Block a user