chore: Bringing some changes across from enterprise fork
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
Column,
|
Column,
|
||||||
Table,
|
Table,
|
||||||
DataType,
|
DataType,
|
||||||
|
Scopes,
|
||||||
} from "sequelize-typescript";
|
} from "sequelize-typescript";
|
||||||
import Collection from "./Collection";
|
import Collection from "./Collection";
|
||||||
import IntegrationAuthentication from "./IntegrationAuthentication";
|
import IntegrationAuthentication from "./IntegrationAuthentication";
|
||||||
@@ -12,6 +13,17 @@ import User from "./User";
|
|||||||
import BaseModel from "./base/BaseModel";
|
import BaseModel from "./base/BaseModel";
|
||||||
import Fix from "./decorators/Fix";
|
import Fix from "./decorators/Fix";
|
||||||
|
|
||||||
|
@Scopes(() => ({
|
||||||
|
withAuthentication: {
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: IntegrationAuthentication,
|
||||||
|
as: "authentication",
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}))
|
||||||
@Table({ tableName: "integrations", modelName: "integration" })
|
@Table({ tableName: "integrations", modelName: "integration" })
|
||||||
@Fix
|
@Fix
|
||||||
class Integration extends BaseModel {
|
class Integration extends BaseModel {
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ export type DocumentEvent =
|
|||||||
| {
|
| {
|
||||||
name: "documents.create" // eslint-disable-line
|
name: "documents.create" // eslint-disable-line
|
||||||
| "documents.publish"
|
| "documents.publish"
|
||||||
|
| "documents.unpublish"
|
||||||
| "documents.delete"
|
| "documents.delete"
|
||||||
| "documents.permanent_delete"
|
| "documents.permanent_delete"
|
||||||
| "documents.archive"
|
| "documents.archive"
|
||||||
|
|||||||
Reference in New Issue
Block a user