mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-10-22 23:42:05 -05:00
BOSS 2.0 - Full TS and microservice rewrite. Still pulls from local until admin panel updates
This commit is contained in:
@@ -1,14 +1,47 @@
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
export interface DisabledFeatures {
|
||||
s3: boolean
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
http: {
|
||||
port: number;
|
||||
};
|
||||
crypto: {
|
||||
wup: {
|
||||
aes_key: Buffer;
|
||||
hmac_key: Buffer;
|
||||
aes_key: string;
|
||||
hmac_key: string;
|
||||
};
|
||||
ctr: {
|
||||
aes_key: Buffer;
|
||||
};
|
||||
};
|
||||
grpc: {
|
||||
boss: {
|
||||
address: string;
|
||||
port: number;
|
||||
api_key: string;
|
||||
};
|
||||
account: {
|
||||
address: string;
|
||||
port: number;
|
||||
api_key: string;
|
||||
};
|
||||
};
|
||||
mongoose: {
|
||||
connection_string: string;
|
||||
options: mongoose.ConnectOptions;
|
||||
};
|
||||
cdn: {
|
||||
download_url: string;
|
||||
s3: {
|
||||
endpoint: string;
|
||||
region: string;
|
||||
bucket: string;
|
||||
key: string;
|
||||
secret: string;
|
||||
};
|
||||
disk_path: string;
|
||||
};
|
||||
}
|
||||
5
src/types/common/user-agent-info.ts
Normal file
5
src/types/common/user-agent-info.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type UserAgentInfo = {
|
||||
deviceID?: number;
|
||||
localFriendCodeSeed?: number;
|
||||
userPID: number;
|
||||
};
|
||||
10
src/types/express.d.ts
vendored
Normal file
10
src/types/express.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { GetUserDataResponse } from '@pretendonetwork/grpc/account/get_user_data_rpc';
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface Request {
|
||||
pid: number;
|
||||
pnid: GetUserDataResponse | null;
|
||||
}
|
||||
}
|
||||
}
|
||||
27
src/types/mongoose/file.ts
Normal file
27
src/types/mongoose/file.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Model, HydratedDocument } from 'mongoose';
|
||||
|
||||
export interface IFile {
|
||||
deleted: boolean;
|
||||
data_id: bigint;
|
||||
task_id: string;
|
||||
boss_app_id: string;
|
||||
supported_countries: string[];
|
||||
supported_languages: string[];
|
||||
creator_pid: number;
|
||||
name: string;
|
||||
type: string;
|
||||
hash: string;
|
||||
size: bigint;
|
||||
notify_on_new: string[];
|
||||
notify_led: boolean;
|
||||
created: bigint;
|
||||
updated: bigint;
|
||||
}
|
||||
|
||||
export interface IFileMethods {}
|
||||
|
||||
interface IFileQueryHelpers {}
|
||||
|
||||
export interface FileModel extends Model<IFile, IFileQueryHelpers, IFileMethods> {}
|
||||
|
||||
export type HydratedFileDocument = HydratedDocument<IFile, IFileMethods>
|
||||
21
src/types/mongoose/task.ts
Normal file
21
src/types/mongoose/task.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Model, HydratedDocument } from 'mongoose';
|
||||
|
||||
export interface ITask {
|
||||
deleted: boolean;
|
||||
id: string;
|
||||
boss_app_id: string;
|
||||
creator_pid: number;
|
||||
status: 'open'; // TODO - Make this a union. What else is there?
|
||||
title_id: string;
|
||||
description: string;
|
||||
created: bigint;
|
||||
updated: bigint;
|
||||
}
|
||||
|
||||
export interface ITaskMethods {}
|
||||
|
||||
interface ITaskQueryHelpers {}
|
||||
|
||||
export interface TaskModel extends Model<ITask, ITaskQueryHelpers, ITaskMethods> {}
|
||||
|
||||
export type HydratedTaskDocument = HydratedDocument<ITask, ITaskMethods>
|
||||
Reference in New Issue
Block a user