itlab-internal-services 2.6.0 → 2.6.2

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.
@@ -1,3 +1,4 @@
1
+ export { LabAccount } from './jwt.constants';
1
2
  export * from './jwt.decorators';
2
3
  export * from './jwt.guard';
3
4
  export * from './jwt.strategy';
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.LabAccount = void 0;
18
+ var jwt_constants_1 = require("./jwt.constants");
19
+ Object.defineProperty(exports, "LabAccount", { enumerable: true, get: function () { return jwt_constants_1.LabAccount; } });
17
20
  __exportStar(require("./jwt.decorators"), exports);
18
21
  __exportStar(require("./jwt.guard"), exports);
19
22
  __exportStar(require("./jwt.strategy"), exports);
@@ -5,25 +5,10 @@ export interface AccountInformation {
5
5
  email: string;
6
6
  avatar?: string;
7
7
  }
8
- /**
9
- * Account avatar model
10
- * @class AvatarModel
11
- * @property {string} extension - The extension of the avatar
12
- * @property {string} mimetype - The mimetype of the avatar
13
- * @property {number} size - The size of the avatar
14
- */
15
- declare class AvatarModel {
16
- /** The extension of the avatar */
17
- extension: string;
18
- /** The mimetype of the avatar */
19
- mimetype: string;
20
- /** The size of the avatar */
21
- size: number;
22
- }
23
8
  declare class AccountModel extends Document {
24
9
  username: string;
25
10
  email: string;
26
- avatar?: AvatarModel;
11
+ avatar?: boolean;
27
12
  }
28
13
  declare const AccountSchema: import("mongoose").Schema<AccountModel, import("mongoose").Model<AccountModel, any, any, any, Document<unknown, any, AccountModel> & AccountModel & Required<{
29
14
  _id: unknown;
@@ -31,4 +16,4 @@ declare const AccountSchema: import("mongoose").Schema<AccountModel, import("mon
31
16
  _id: unknown;
32
17
  }>>;
33
18
  declare const AccountDB = "hub-account";
34
- export { AccountModel, AccountSchema, AccountDB };
19
+ export { AccountDB, AccountModel, AccountSchema };
@@ -9,18 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AccountDB = exports.AccountSchema = exports.AccountModel = void 0;
12
+ exports.AccountSchema = exports.AccountModel = exports.AccountDB = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
- /**
16
- * Account avatar model
17
- * @class AvatarModel
18
- * @property {string} extension - The extension of the avatar
19
- * @property {string} mimetype - The mimetype of the avatar
20
- * @property {number} size - The size of the avatar
21
- */
22
- class AvatarModel {
23
- }
24
15
  const transform = {
25
16
  virtuals: true,
26
17
  transform: (_, ret) => {
@@ -46,8 +37,8 @@ __decorate([
46
37
  __metadata("design:type", String)
47
38
  ], AccountModel.prototype, "email", void 0);
48
39
  __decorate([
49
- (0, mongoose_1.Prop)({ type: AvatarModel }),
50
- __metadata("design:type", AvatarModel)
40
+ (0, mongoose_1.Prop)({ required: false }),
41
+ __metadata("design:type", Boolean)
51
42
  ], AccountModel.prototype, "avatar", void 0);
52
43
  exports.AccountModel = AccountModel = __decorate([
53
44
  (0, mongoose_1.Schema)({ collection: 'accounts', toObject: transform, toJSON: transform })
@@ -38,10 +38,4 @@ export declare class PopulateService {
38
38
  * @returns {PopulateOptions} the populate options
39
39
  */
40
40
  commentsAndReplies: () => PopulateOptions;
41
- /**
42
- * Populates the content field of a document
43
- * @param {string} contentAs - the format of the content
44
- * @returns {PopulateOptions} the populate options
45
- */
46
- content: (contentAs?: "json" | "text" | "html") => PopulateOptions;
47
41
  }
@@ -76,17 +76,6 @@ let PopulateService = class PopulateService {
76
76
  ],
77
77
  },
78
78
  });
79
- /**
80
- * Populates the content field of a document
81
- * @param {string} contentAs - the format of the content
82
- * @returns {PopulateOptions} the populate options
83
- */
84
- this.content = (contentAs = 'html') => ({
85
- path: 'content',
86
- justOne: true,
87
- model: this.modelService.contentModel(),
88
- select: contentAs,
89
- });
90
79
  }
91
80
  };
92
81
  exports.PopulateService = PopulateService;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "timo.scheuermann@sv-informatik.de",
6
6
  "url": "https://timos.design"
7
7
  },
8
- "version": "2.6.0",
8
+ "version": "2.6.2",
9
9
  "type": "commonjs",
10
10
  "files": [
11
11
  "dist"