dl-commons 0.0.2-testing.31 → 0.0.2-testing.33

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dl-commons",
3
3
  "type": "commonjs",
4
- "version": "0.0.2-testing.31",
4
+ "version": "0.0.2-testing.33",
5
5
  "description": "distance learning commons",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -103,9 +103,9 @@ import {
103
103
  import { IUserMeta } from './models/interfaces/user-meta.interface';
104
104
  import { ICropArea } from './models/interfaces/crop-area.interface';
105
105
  import { CropArea, CropAreaDocument, CropAreaSchema } from './models/schemas/embedded/crop-area.schema';
106
- import { AttachementType } from './models/enums/attachement-type.enum';
107
- import { IAttachement } from './models/interfaces/attachement.interface';
108
- import { Attachement, AttachementDocument, AttachementSchema } from './models/schemas/embedded/attachement.schema';
106
+ import { AttachmentType } from './models/enums/attachment-type.enum';
107
+ import { IAttachment } from './models/interfaces/attachment.interface';
108
+ import { Attachment, AttachmentDocument, AttachmentSchema } from './models/schemas/embedded/attachment.schema';
109
109
  import { Picture, PictureSchema, PictureDocument } from './models/schemas/embedded/picture.schema';
110
110
  import { IPicture } from './models/interfaces/picture.interface';
111
111
  import { IAuthor } from './models/interfaces/author.interface';
@@ -184,7 +184,7 @@ export {
184
184
  GroupState,
185
185
  S3FileState,
186
186
  FileLogInitType,
187
- AttachementType,
187
+ AttachmentType,
188
188
  VirtualAddressType,
189
189
  LocationType,
190
190
 
@@ -227,7 +227,7 @@ export {
227
227
  IFileLog,
228
228
  IUserMeta,
229
229
  ICropArea,
230
- IAttachement,
230
+ IAttachment,
231
231
  IPicture,
232
232
  IAuthor,
233
233
  IFileEmbedded,
@@ -309,9 +309,9 @@ export {
309
309
  CropArea,
310
310
  CropAreaSchema,
311
311
  CropAreaDocument,
312
- Attachement,
313
- AttachementSchema,
314
- AttachementDocument,
312
+ Attachment,
313
+ AttachmentSchema,
314
+ AttachmentDocument,
315
315
  Picture,
316
316
  PictureSchema,
317
317
  PictureDocument,
@@ -1,4 +1,4 @@
1
- export enum AttachementType {
1
+ export enum AttachmentType {
2
2
  File = 'file',
3
3
  Link = 'link',
4
4
  }
@@ -1,9 +1,9 @@
1
- import { AttachementType } from '../enums/attachement-type.enum';
1
+ import { AttachmentType } from '../enums/attachment-type.enum';
2
2
  import { IIdentifable } from './identifable.interface';
3
3
  import { IFileEmbedded } from './s3.interface';
4
4
 
5
- export interface IAttachement extends IIdentifable {
6
- type: AttachementType;
5
+ export interface IAttachment extends IIdentifable {
6
+ type: AttachmentType;
7
7
  file?: IFileEmbedded | null | undefined;
8
8
  link?: string | null | undefined;
9
9
  }
@@ -1,15 +1,15 @@
1
1
  import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
2
2
  import { HydratedDocument } from 'mongoose';
3
- import { IAttachement } from '../../interfaces/attachement.interface';
3
+ import { IAttachment } from '../../interfaces/attachment.interface';
4
4
  import { Identifable } from '../identifable.schema';
5
- import { AttachementType } from '../../enums/attachement-type.enum';
5
+ import { AttachmentType } from '../../enums/attachment-type.enum';
6
6
  import { IFileEmbedded } from '../../interfaces/s3.interface';
7
7
  import { FileEmbeddedSchema } from './s3.schema';
8
8
 
9
9
  @Schema({ _id: false })
10
- export class Attachement extends Identifable implements IAttachement {
11
- @Prop({ required: true, enum: AttachementType, type: String })
12
- type: AttachementType;
10
+ export class Attachment extends Identifable implements IAttachment {
11
+ @Prop({ required: true, enum: AttachmentType, type: String })
12
+ type: AttachmentType;
13
13
 
14
14
  @Prop({ type: FileEmbeddedSchema, required: false, default: null })
15
15
  file: IFileEmbedded;
@@ -18,5 +18,5 @@ export class Attachement extends Identifable implements IAttachement {
18
18
  link: string;
19
19
  }
20
20
 
21
- export const AttachementSchema = SchemaFactory.createForClass(Attachement);
22
- export type AttachementDocument = HydratedDocument<Attachement>;
21
+ export const AttachmentSchema = SchemaFactory.createForClass(Attachment);
22
+ export type AttachmentDocument = HydratedDocument<Attachment>;
@@ -5,10 +5,10 @@ import { VirtualAddressType } from '../../enums/virtual-address-type.enum';
5
5
 
6
6
  @Schema({ _id: false })
7
7
  export class VirtualAddress implements IVirtualAddress {
8
- @Prop({ type: String, enum: VirtualAddressType, required: true, default: null })
8
+ @Prop({ type: String, enum: VirtualAddressType, required: true, default: VirtualAddressType.Uncategorized })
9
9
  type: VirtualAddressType;
10
10
 
11
- @Prop({ type: String, required: true, default: null })
11
+ @Prop({ type: String, required: false, default: null })
12
12
  link: string;
13
13
  }
14
14