Removed XMLResponseGenerator class in favor of Mongoose Schema methods

This commit is contained in:
Jonathan Barrow
2023-04-24 16:29:04 -04:00
parent c869b3ae36
commit 4664d9fe05
11 changed files with 272 additions and 326 deletions

View File

@@ -30,10 +30,11 @@ export interface ICommunity {
}
export interface ICommunityMethods {
upEmpathy(): Promise<void>
downEmpathy(): Promise<void>
upFollower(): Promise<void>
downFollower(): Promise<void>
upEmpathy(): Promise<void>;
downEmpathy(): Promise<void>;
upFollower(): Promise<void>;
downFollower(): Promise<void>;
json(): Record<string, any>;
}
interface ICommunityQueryHelpers {}

View File

@@ -1,4 +1,4 @@
export interface XMLResponseGeneratorOptions {
export interface PostToJSONOptions {
name?: string;
with_mii: boolean;
app_data?: boolean;

View File

@@ -1,4 +1,6 @@
import { Model, Types, HydratedDocument } from 'mongoose';
import { HydratedCommunityDocument } from '@/types/mongoose/community';
import { PostToJSONOptions } from '@/types/mongoose/post-to-json-options';
export interface IPost {
id: string;
@@ -42,6 +44,7 @@ export interface IPostMethods {
remove(reason: string): Promise<void>;
unRemove(reason: string): Promise<void>;
generatePostUID(length: number): Promise<void>;
json(options: PostToJSONOptions, community?: HydratedCommunityDocument): Record<string, any>;
}
interface IPostQueryHelpers {}

View File

@@ -26,6 +26,7 @@ export interface ISettingsMethods {
relationshipVisible(active: boolean): Promise<void>;
countryVisible(active: boolean): Promise<void>;
favCommunityVisible(active: boolean): Promise<void>;
json(): Record<string, any>;
}
interface ISettingsQueryHelpers {}