|
@@ -1,9 +1,14 @@
|
|
|
import { Schema } from 'mongoose';
|
|
import { Schema } from 'mongoose';
|
|
|
|
|
|
|
|
|
|
+import { AttachmentMethodType } from '~/interfaces/attachment';
|
|
|
|
|
+import { GrowiDeploymentType, GrowiServiceType } from '~/interfaces/system';
|
|
|
|
|
+
|
|
|
|
|
+import type { IGrowiInfo } from '../../../interfaces/growi-info';
|
|
|
import {
|
|
import {
|
|
|
- GrowiAttachmentType, GrowiDeploymentType, GrowiExternalAuthProviderType, GrowiServiceType, GrowiWikiType, IGrowiInfo,
|
|
|
|
|
|
|
+ GrowiExternalAuthProviderType, GrowiWikiType,
|
|
|
} from '../../../interfaces/growi-info';
|
|
} from '../../../interfaces/growi-info';
|
|
|
|
|
|
|
|
|
|
+
|
|
|
export const growiInfoSchema = new Schema<IGrowiInfo>({
|
|
export const growiInfoSchema = new Schema<IGrowiInfo>({
|
|
|
version: { type: String, required: true },
|
|
version: { type: String, required: true },
|
|
|
appSiteUrl: { type: String },
|
|
appSiteUrl: { type: String },
|
|
@@ -14,7 +19,7 @@ export const growiInfoSchema = new Schema<IGrowiInfo>({
|
|
|
currentUsersCount: { type: Number, required: true },
|
|
currentUsersCount: { type: Number, required: true },
|
|
|
currentActiveUsersCount: { type: Number, required: true },
|
|
currentActiveUsersCount: { type: Number, required: true },
|
|
|
wikiType: { type: String, required: true, enum: Object.values(GrowiWikiType) },
|
|
wikiType: { type: String, required: true, enum: Object.values(GrowiWikiType) },
|
|
|
- attachmentType: { type: String, required: true, enum: Object.values(GrowiAttachmentType) },
|
|
|
|
|
|
|
+ attachmentType: { type: String, required: true, enum: Object.values(AttachmentMethodType) },
|
|
|
activeExternalAccountTypes: [{ type: String, enum: Object.values(GrowiExternalAuthProviderType) }],
|
|
activeExternalAccountTypes: [{ type: String, enum: Object.values(GrowiExternalAuthProviderType) }],
|
|
|
osInfo: {
|
|
osInfo: {
|
|
|
type: { type: String },
|
|
type: { type: String },
|