@brimble/models 3.4.5 → 3.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/region.d.ts CHANGED
@@ -21,10 +21,10 @@
21
21
  /// <reference types="mongoose/types/utility" />
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose" />
25
24
  /// <reference types="mongoose/types/inferschematype" />
25
+ import { Schema } from "mongoose";
26
26
  import { IRegion } from "./types/region";
27
- declare const _default: import("mongoose").Model<IRegion, {}, {}, {}, import("mongoose").Document<unknown, {}, IRegion> & IRegion & {
28
- _id: import("mongoose").Types.ObjectId;
29
- }, any>;
27
+ declare const _default: import("mongoose").Model<IRegion, {}, {}, {}, import("mongoose").Document<unknown, {}, IRegion> & IRegion & Required<{
28
+ _id: Schema.Types.ObjectId;
29
+ }>, any>;
30
30
  export default _default;
@@ -1,5 +1,7 @@
1
+ import { Schema } from "mongoose";
1
2
  import { REGION_CONTINENT } from "../enum";
2
3
  export interface IRegion extends Document {
4
+ _id: Schema.Types.ObjectId;
3
5
  name: string;
4
6
  country: string;
5
7
  continent?: REGION_CONTINENT;
@@ -7,6 +7,7 @@ export interface IWebhookSetting extends Document {
7
7
  user_id: IUser;
8
8
  team_id?: ITeam;
9
9
  subscription_id: ISubscription;
10
+ webhook_id: string;
10
11
  webhookUrl: string;
11
12
  discordUrl: string;
12
13
  slackUrl: string;
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const mongoose_1 = require("mongoose");
7
7
  const webhook_event_1 = __importDefault(require("./webhook-event"));
8
8
  const webhookSettingSchema = new mongoose_1.Schema({
9
+ webhook_id: {
10
+ type: String,
11
+ required: false,
12
+ },
9
13
  user_id: {
10
14
  type: mongoose_1.Schema.Types.ObjectId,
11
15
  ref: "User",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.4.5",
3
+ "version": "3.5.7",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types/region.ts CHANGED
@@ -1,6 +1,8 @@
1
+ import { Schema } from "mongoose";
1
2
  import { REGION_CONTINENT } from "../enum";
2
3
 
3
4
  export interface IRegion extends Document {
5
+ _id: Schema.Types.ObjectId;
4
6
  name: string;
5
7
  country: string;
6
8
  continent?: REGION_CONTINENT;
@@ -8,6 +8,7 @@ export interface IWebhookSetting extends Document {
8
8
  user_id: IUser;
9
9
  team_id?: ITeam;
10
10
  subscription_id: ISubscription;
11
+ webhook_id: string;
11
12
  webhookUrl: string;
12
13
  discordUrl: string;
13
14
  slackUrl: string;
@@ -3,6 +3,10 @@ import { IWebhookSetting } from "./types/webhook-setting";
3
3
  import WebhookEvent from "./webhook-event";
4
4
 
5
5
  const webhookSettingSchema: Schema = new Schema({
6
+ webhook_id: {
7
+ type: String,
8
+ required: false,
9
+ },
6
10
  user_id: {
7
11
  type: Schema.Types.ObjectId,
8
12
  ref: "User",