@armi-wave/common 1.23.33 → 1.23.35

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.
@@ -0,0 +1,4 @@
1
+ export interface Content {
2
+ type: string;
3
+ url: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  import mongoose, { Document, Model } from 'mongoose';
2
2
  import { PostType } from '../enums/PostType';
3
3
  import { Mention } from './Mention';
4
+ import { Content } from './Content';
4
5
  interface TextPost extends Document {
5
6
  userId: mongoose.Types.ObjectId;
6
7
  textPostId?: mongoose.Types.ObjectId;
@@ -14,7 +15,7 @@ interface TextPost extends Document {
14
15
  sharesNr?: number;
15
16
  postType: PostType;
16
17
  reportsNr?: number;
17
- contentUrl: string;
18
+ contentArr: Content[];
18
19
  }
19
20
  interface TextPostModel extends Model<TextPost> {
20
21
  }
@@ -62,7 +62,16 @@ const textPostSchema = new mongoose_1.Schema({
62
62
  sharesNr: { type: Number, required: false, default: 0 },
63
63
  postType: { type: String, required: true },
64
64
  reportsNr: { type: Number, required: false, default: 0 },
65
- contentUrl: { type: String, required: true },
65
+ contentArr: [
66
+ {
67
+ type: {
68
+ type: String,
69
+ enum: ['image', 'video', 'document'],
70
+ required: true,
71
+ },
72
+ url: { type: String, required: true },
73
+ },
74
+ ],
66
75
  }, {
67
76
  timestamps: true,
68
77
  toJSON: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armi-wave/common",
3
- "version": "1.23.33",
3
+ "version": "1.23.35",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",