@tomei/media 0.7.1 → 0.7.3

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.
Files changed (114) hide show
  1. package/.commitlintrc.json +22 -22
  2. package/.eslintrc.js +66 -66
  3. package/.gitlab-ci.yml +16 -16
  4. package/.husky/commit-msg +15 -15
  5. package/.husky/pre-commit +7 -7
  6. package/.prettierrc +4 -4
  7. package/.prettierrc copy +3 -3
  8. package/README.md +93 -93
  9. package/dist/base/base.medias.d.ts +38 -38
  10. package/dist/base/base.medias.js +174 -174
  11. package/dist/base/base.medias.js.map +1 -1
  12. package/dist/base/base.repository.abstract.d.ts +12 -12
  13. package/dist/base/base.repository.abstract.js +21 -21
  14. package/dist/base/base.repository.interface.d.ts +9 -9
  15. package/dist/base/base.repository.interface.js +2 -2
  16. package/dist/common/common.module.d.ts +2 -2
  17. package/dist/common/common.module.js +22 -22
  18. package/dist/common/common.module.js.map +1 -1
  19. package/dist/common/common.service.d.ts +13 -13
  20. package/dist/common/common.service.js +105 -105
  21. package/dist/common/common.service.js.map +1 -1
  22. package/dist/common/dto/add-field-translation.dto.d.ts +7 -7
  23. package/dist/common/dto/add-field-translation.dto.js +41 -41
  24. package/dist/common/dto/add-field-translation.dto.js.map +1 -1
  25. package/dist/common/dto/get-media.dto.d.ts +5 -5
  26. package/dist/common/dto/get-media.dto.js +28 -28
  27. package/dist/common/dto/get-media.dto.js.map +1 -1
  28. package/dist/database.d.ts +4 -4
  29. package/dist/database.js +15 -16
  30. package/dist/database.js.map +1 -1
  31. package/dist/dto/external-media.dto.d.ts +10 -10
  32. package/dist/dto/external-media.dto.js +69 -69
  33. package/dist/dto/external-media.dto.js.map +1 -1
  34. package/dist/dto/internal-medias.dto.d.ts +12 -12
  35. package/dist/dto/internal-medias.dto.js +86 -86
  36. package/dist/dto/internal-medias.dto.js.map +1 -1
  37. package/dist/entities/medias.entity.d.ts +23 -23
  38. package/dist/entities/medias.entity.js +159 -159
  39. package/dist/entities/medias.entity.js.map +1 -1
  40. package/dist/enum/index.d.ts +2 -2
  41. package/dist/enum/index.js +5 -5
  42. package/dist/enum/medias.enum.d.ts +5 -5
  43. package/dist/enum/medias.enum.js +9 -9
  44. package/dist/enum/medias.enum.js.map +1 -1
  45. package/dist/helpers/error.d.ts +1 -1
  46. package/dist/helpers/error.js +12 -13
  47. package/dist/helpers/error.js.map +1 -1
  48. package/dist/helpers/index.d.ts +2 -2
  49. package/dist/helpers/index.js +5 -5
  50. package/dist/index.d.ts +12 -12
  51. package/dist/index.js +21 -21
  52. package/dist/interfaces/base.medias-attr.interface.d.ts +20 -20
  53. package/dist/interfaces/base.medias-attr.interface.js +2 -2
  54. package/dist/interfaces/medias.repository.interface.d.ts +3 -3
  55. package/dist/interfaces/medias.repository.interface.js +2 -2
  56. package/dist/medias.d.ts +65 -67
  57. package/dist/medias.js +531 -528
  58. package/dist/medias.js.map +1 -1
  59. package/dist/medias.repository.d.ts +8 -8
  60. package/dist/medias.repository.js +55 -55
  61. package/dist/medias.repository.js.map +1 -1
  62. package/dist/pipe/append-id.pipe.d.ts +6 -6
  63. package/dist/pipe/append-id.pipe.js +27 -27
  64. package/dist/pipe/append-id.pipe.js.map +1 -1
  65. package/dist/pipe/validate-enum.pipe.d.ts +6 -6
  66. package/dist/pipe/validate-enum.pipe.js +33 -33
  67. package/dist/pipe/validate-enum.pipe.js.map +1 -1
  68. package/dist/pipe/validate-id.pipe.d.ts +6 -6
  69. package/dist/pipe/validate-id.pipe.js +30 -30
  70. package/dist/pipe/validate-id.pipe.js.map +1 -1
  71. package/dist/pipe/validate-search.pipe.d.ts +7 -7
  72. package/dist/pipe/validate-search.pipe.js +45 -45
  73. package/dist/pipe/validate-search.pipe.js.map +1 -1
  74. package/dist/responses/deleted.response.d.ts +3 -3
  75. package/dist/responses/deleted.response.js +20 -20
  76. package/dist/responses/deleted.response.js.map +1 -1
  77. package/dist/responses/pagination.response.d.ts +5 -5
  78. package/dist/responses/pagination.response.js +25 -25
  79. package/dist/responses/pagination.response.js.map +1 -1
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/migration/0001-add-defaultyn-hiddenyn-to-media-table.js +36 -36
  82. package/migration/media-migration.js +82 -82
  83. package/nest-cli.json +18 -18
  84. package/package.json +75 -75
  85. package/sonar-project.properties +12 -12
  86. package/src/base/base.medias.ts +210 -210
  87. package/src/base/base.repository.abstract.ts +28 -28
  88. package/src/base/base.repository.interface.ts +9 -9
  89. package/src/common/common.module.ts +10 -10
  90. package/src/common/common.service.ts +107 -107
  91. package/src/common/dto/add-field-translation.dto.ts +23 -23
  92. package/src/common/dto/get-media.dto.ts +12 -12
  93. package/src/database.ts +16 -16
  94. package/src/dto/external-media.dto.ts +49 -49
  95. package/src/dto/internal-medias.dto.ts +64 -64
  96. package/src/entities/medias.entity.ts +125 -125
  97. package/src/enum/index.ts +3 -3
  98. package/src/enum/medias.enum.ts +5 -5
  99. package/src/helpers/error.ts +12 -12
  100. package/src/helpers/index.ts +3 -3
  101. package/src/index.ts +24 -24
  102. package/src/interfaces/base.medias-attr.interface.ts +21 -21
  103. package/src/interfaces/medias.repository.interface.ts +4 -4
  104. package/src/medias.repository.ts +55 -55
  105. package/src/medias.ts +724 -720
  106. package/src/pipe/append-id.pipe.ts +15 -15
  107. package/src/pipe/validate-enum.pipe.ts +31 -31
  108. package/src/pipe/validate-id.pipe.ts +18 -18
  109. package/src/pipe/validate-search.pipe.ts +44 -44
  110. package/src/responses/deleted.response.ts +6 -6
  111. package/src/responses/pagination.response.ts +10 -10
  112. package/tsconfig.build.json +4 -4
  113. package/tsconfig.json +29 -29
  114. package/tslint.json +18 -18
@@ -1,107 +1,107 @@
1
- import {
2
- HttpException,
3
- Injectable,
4
- InternalServerErrorException,
5
- } from '@nestjs/common';
6
- import { ConfigService } from '@nestjs/config';
7
- import axios from 'axios';
8
- import * as cuid from 'cuid';
9
- import { omit, omitBy, keys, pick } from 'lodash';
10
- import { AddFieldTranslationDto } from './dto/add-field-translation.dto';
11
- import { GetMediaDto } from './dto/get-media.dto';
12
- @Injectable()
13
- export class CommonService {
14
- private readonly commonApiUrl: string;
15
-
16
- constructor(private configService: ConfigService) {
17
- this.commonApiUrl = this.configService.get('COMMON_API_URL');
18
- }
19
-
20
- handleAxiosError(err) {
21
- if (err.response) {
22
- throw new HttpException(err.response.data, err.response.status);
23
- } else if (err.request) {
24
- throw new HttpException(err.request, 500);
25
- } else {
26
- throw new InternalServerErrorException(err.message);
27
- }
28
- }
29
-
30
- async addActivityHistory(record, entity, method) {
31
- const activity =
32
- method === 'create'
33
- ? 'Insert new'
34
- : method === 'update'
35
- ? 'Update'
36
- : 'Delete';
37
-
38
- const filteredRecord = omit(record.EntityValueAfter, [
39
- 'CreatedById',
40
- 'CreatedAt',
41
- 'UpdatedById',
42
- 'UpdatedAt',
43
- ]);
44
-
45
- const filteredRecordBefore = pick(
46
- record.EntityValueBefore,
47
- keys(filteredRecord),
48
- );
49
-
50
- const payload = {
51
- Action: record.Action || (method === 'create' ? 'Insert' : activity),
52
- Activity: record.Activity || `${activity} ${entity}`,
53
- Description: record.Description || `${activity} details of ${entity}`,
54
- EntityType: record?.EntityType || entity,
55
- EntityValueBefore:
56
- method === 'create'
57
- ? JSON.stringify({})
58
- : method === 'update'
59
- ? filteredRecordBefore
60
- : record.EntityValueBefore,
61
- EntityValueAfter: JSON.stringify(filteredRecord),
62
- PerformedById: record.PerformedById,
63
- PerformedAt: record.PerformedAt || Date.now(),
64
- EntityId: record.EntityId ? record.EntityId : cuid(),
65
- };
66
-
67
- try {
68
- const { data } = await axios.post(
69
- `${this.commonApiUrl}/activity-histories`,
70
- payload,
71
- );
72
- return data.EntityId;
73
- } catch (err) {
74
- this.handleAxiosError(err);
75
- }
76
- }
77
-
78
- async getList(listName: string): Promise<[]> {
79
- try {
80
- const { data } = await axios.get(`${this.commonApiUrl}/lists/items`, {
81
- params: { ListName: listName },
82
- });
83
- return data?.rows;
84
- } catch (err) {
85
- this.handleAxiosError(err);
86
- }
87
- }
88
-
89
- async addFieldTranslation(payload: AddFieldTranslationDto) {
90
- try {
91
- await axios.post(`${this.commonApiUrl}/field-translations`, payload);
92
- } catch (err) {
93
- this.handleAxiosError(err);
94
- }
95
- }
96
-
97
- async getMedia(query: GetMediaDto) {
98
- try {
99
- const { data } = await axios.get(`${this.commonApiUrl}/medias`, {
100
- params: query,
101
- });
102
- return data?.rows;
103
- } catch (err) {
104
- this.handleAxiosError(err);
105
- }
106
- }
107
- }
1
+ import {
2
+ HttpException,
3
+ Injectable,
4
+ InternalServerErrorException,
5
+ } from '@nestjs/common';
6
+ import { ConfigService } from '@nestjs/config';
7
+ import axios from 'axios';
8
+ import * as cuid from 'cuid';
9
+ import { omit, omitBy, keys, pick } from 'lodash';
10
+ import { AddFieldTranslationDto } from './dto/add-field-translation.dto';
11
+ import { GetMediaDto } from './dto/get-media.dto';
12
+ @Injectable()
13
+ export class CommonService {
14
+ private readonly commonApiUrl: string;
15
+
16
+ constructor(private configService: ConfigService) {
17
+ this.commonApiUrl = this.configService.get('COMMON_API_URL');
18
+ }
19
+
20
+ handleAxiosError(err) {
21
+ if (err.response) {
22
+ throw new HttpException(err.response.data, err.response.status);
23
+ } else if (err.request) {
24
+ throw new HttpException(err.request, 500);
25
+ } else {
26
+ throw new InternalServerErrorException(err.message);
27
+ }
28
+ }
29
+
30
+ async addActivityHistory(record, entity, method) {
31
+ const activity =
32
+ method === 'create'
33
+ ? 'Insert new'
34
+ : method === 'update'
35
+ ? 'Update'
36
+ : 'Delete';
37
+
38
+ const filteredRecord = omit(record.EntityValueAfter, [
39
+ 'CreatedById',
40
+ 'CreatedAt',
41
+ 'UpdatedById',
42
+ 'UpdatedAt',
43
+ ]);
44
+
45
+ const filteredRecordBefore = pick(
46
+ record.EntityValueBefore,
47
+ keys(filteredRecord),
48
+ );
49
+
50
+ const payload = {
51
+ Action: record.Action || (method === 'create' ? 'Insert' : activity),
52
+ Activity: record.Activity || `${activity} ${entity}`,
53
+ Description: record.Description || `${activity} details of ${entity}`,
54
+ EntityType: record?.EntityType || entity,
55
+ EntityValueBefore:
56
+ method === 'create'
57
+ ? JSON.stringify({})
58
+ : method === 'update'
59
+ ? filteredRecordBefore
60
+ : record.EntityValueBefore,
61
+ EntityValueAfter: JSON.stringify(filteredRecord),
62
+ PerformedById: record.PerformedById,
63
+ PerformedAt: record.PerformedAt || Date.now(),
64
+ EntityId: record.EntityId ? record.EntityId : cuid(),
65
+ };
66
+
67
+ try {
68
+ const { data } = await axios.post(
69
+ `${this.commonApiUrl}/activity-histories`,
70
+ payload,
71
+ );
72
+ return data.EntityId;
73
+ } catch (err) {
74
+ this.handleAxiosError(err);
75
+ }
76
+ }
77
+
78
+ async getList(listName: string): Promise<[]> {
79
+ try {
80
+ const { data } = await axios.get(`${this.commonApiUrl}/lists/items`, {
81
+ params: { ListName: listName },
82
+ });
83
+ return data?.rows;
84
+ } catch (err) {
85
+ this.handleAxiosError(err);
86
+ }
87
+ }
88
+
89
+ async addFieldTranslation(payload: AddFieldTranslationDto) {
90
+ try {
91
+ await axios.post(`${this.commonApiUrl}/field-translations`, payload);
92
+ } catch (err) {
93
+ this.handleAxiosError(err);
94
+ }
95
+ }
96
+
97
+ async getMedia(query: GetMediaDto) {
98
+ try {
99
+ const { data } = await axios.get(`${this.commonApiUrl}/medias`, {
100
+ params: query,
101
+ });
102
+ return data?.rows;
103
+ } catch (err) {
104
+ this.handleAxiosError(err);
105
+ }
106
+ }
107
+ }
@@ -1,23 +1,23 @@
1
- import { IsNotEmpty, IsString } from 'class-validator';
2
-
3
- export class AddFieldTranslationDto {
4
- @IsNotEmpty()
5
- @IsString()
6
- ObjectTable: string;
7
-
8
- @IsNotEmpty()
9
- @IsString()
10
- ObjectField: string;
11
-
12
- @IsNotEmpty()
13
- @IsString()
14
- ObjectId: string;
15
-
16
- @IsNotEmpty()
17
- @IsString()
18
- LanguageCode: string;
19
-
20
- @IsNotEmpty()
21
- @IsString()
22
- Translation: string;
23
- }
1
+ import { IsNotEmpty, IsString } from 'class-validator';
2
+
3
+ export class AddFieldTranslationDto {
4
+ @IsNotEmpty()
5
+ @IsString()
6
+ ObjectTable: string;
7
+
8
+ @IsNotEmpty()
9
+ @IsString()
10
+ ObjectField: string;
11
+
12
+ @IsNotEmpty()
13
+ @IsString()
14
+ ObjectId: string;
15
+
16
+ @IsNotEmpty()
17
+ @IsString()
18
+ LanguageCode: string;
19
+
20
+ @IsNotEmpty()
21
+ @IsString()
22
+ Translation: string;
23
+ }
@@ -1,12 +1,12 @@
1
- import { IsString } from 'class-validator';
2
-
3
- export class GetMediaDto {
4
- @IsString()
5
- ObjectID?: string;
6
-
7
- @IsString()
8
- ObjectType?: string;
9
-
10
- @IsString()
11
- Title?: string;
12
- }
1
+ import { IsString } from 'class-validator';
2
+
3
+ export class GetMediaDto {
4
+ @IsString()
5
+ ObjectID?: string;
6
+
7
+ @IsString()
8
+ ObjectType?: string;
9
+
10
+ @IsString()
11
+ Title?: string;
12
+ }
package/src/database.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
2
- import { MediasModel } from './entities/medias.entity';
3
-
4
- const sequelize: any = {};
5
-
6
- function init(key: string, sequelizeOptions: SequelizeOptions) {
7
- const s = new Sequelize(sequelizeOptions);
8
- s.addModels([MediasModel]);
9
- sequelize[key] = s;
10
- }
11
-
12
- function getConnection(key: string) {
13
- return sequelize[key];
14
- }
15
-
16
- export { init, getConnection };
1
+ import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
2
+ import { MediasModel } from './entities/medias.entity';
3
+
4
+ const sequelize: any = {};
5
+
6
+ function init(key: string, sequelizeOptions: SequelizeOptions) {
7
+ const s = new Sequelize(sequelizeOptions);
8
+ s.addModels([MediasModel]);
9
+ sequelize[key] = s;
10
+ }
11
+
12
+ function getConnection(key: string) {
13
+ return sequelize[key];
14
+ }
15
+
16
+ export { init, getConnection };
@@ -1,49 +1,49 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import { IsEnum, IsNotEmpty, IsString, MaxLength } from 'class-validator';
3
- import { MediaType } from '../enum/medias.enum';
4
-
5
- export class ExternalMediaDto {
6
- @IsNotEmpty()
7
- @IsString()
8
- @MaxLength(30)
9
- @ApiProperty({ type: String, description: 'ObjectID' })
10
- ObjectId: string;
11
-
12
- @IsNotEmpty()
13
- @IsString()
14
- @MaxLength(200)
15
- @ApiProperty({ type: String, description: 'ObjectType' })
16
- ObjectType: string;
17
-
18
- @IsNotEmpty()
19
- @ApiProperty({
20
- type: String,
21
- description: 'Enum either Photo, Video, Document',
22
- })
23
- @IsEnum(MediaType)
24
- Type: MediaType;
25
-
26
- @IsNotEmpty()
27
- @IsString()
28
- @MaxLength(200)
29
- @ApiProperty({ type: String, description: 'URL whre the file stored' })
30
- URL: string;
31
-
32
- @IsNotEmpty()
33
- @IsString()
34
- @MaxLength(200)
35
- @ApiProperty({ type: String, description: 'external source of the file' })
36
- ExternalSource: string;
37
-
38
- @IsNotEmpty()
39
- @IsString()
40
- @MaxLength(100)
41
- @ApiProperty({ type: String, description: 'title of the media' })
42
- Title: string;
43
-
44
- @IsNotEmpty()
45
- @IsString()
46
- @MaxLength(1000)
47
- @ApiProperty({ type: String, description: 'Description of the media' })
48
- Description: string;
49
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsEnum, IsNotEmpty, IsString, MaxLength } from 'class-validator';
3
+ import { MediaType } from '../enum/medias.enum';
4
+
5
+ export class ExternalMediaDto {
6
+ @IsNotEmpty()
7
+ @IsString()
8
+ @MaxLength(30)
9
+ @ApiProperty({ type: String, description: 'ObjectID' })
10
+ ObjectId: string;
11
+
12
+ @IsNotEmpty()
13
+ @IsString()
14
+ @MaxLength(200)
15
+ @ApiProperty({ type: String, description: 'ObjectType' })
16
+ ObjectType: string;
17
+
18
+ @IsNotEmpty()
19
+ @ApiProperty({
20
+ type: String,
21
+ description: 'Enum either Photo, Video, Document',
22
+ })
23
+ @IsEnum(MediaType)
24
+ Type: MediaType;
25
+
26
+ @IsNotEmpty()
27
+ @IsString()
28
+ @MaxLength(200)
29
+ @ApiProperty({ type: String, description: 'URL whre the file stored' })
30
+ URL: string;
31
+
32
+ @IsNotEmpty()
33
+ @IsString()
34
+ @MaxLength(200)
35
+ @ApiProperty({ type: String, description: 'external source of the file' })
36
+ ExternalSource: string;
37
+
38
+ @IsNotEmpty()
39
+ @IsString()
40
+ @MaxLength(100)
41
+ @ApiProperty({ type: String, description: 'title of the media' })
42
+ Title: string;
43
+
44
+ @IsNotEmpty()
45
+ @IsString()
46
+ @MaxLength(1000)
47
+ @ApiProperty({ type: String, description: 'Description of the media' })
48
+ Description: string;
49
+ }
@@ -1,64 +1,64 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import { IsEnum, IsNotEmpty, IsString, MaxLength } from 'class-validator';
3
- import { MediaType } from '../enum/medias.enum';
4
-
5
- export class InternalMediaDto {
6
- @IsNotEmpty()
7
- @IsString()
8
- @MaxLength(30)
9
- @ApiProperty({ type: String, description: 'ObjectID' })
10
- ObjectId: string;
11
-
12
- @IsNotEmpty()
13
- @IsString()
14
- @MaxLength(200)
15
- @ApiProperty({ type: String, description: 'ObjectType' })
16
- ObjectType: string;
17
-
18
- @IsNotEmpty()
19
- @ApiProperty({
20
- type: String,
21
- description: 'Enum either Photo, Video, Document',
22
- })
23
- @IsEnum(MediaType)
24
- Type: MediaType;
25
-
26
- @IsNotEmpty()
27
- @IsString()
28
- @MaxLength(200)
29
- @ApiProperty({ type: String, description: 'file name without extension' })
30
- FileName: string;
31
-
32
- @IsNotEmpty()
33
- @IsString()
34
- @MaxLength(10)
35
- @ApiProperty({ type: String, description: 'extention of file in jpg etc' })
36
- FileExtension: string;
37
-
38
- @ApiProperty({
39
- type: String,
40
- description: 'File stream buffer',
41
- format: 'binary',
42
- })
43
- FileStream: any;
44
-
45
- @IsNotEmpty()
46
- @IsString()
47
- @MaxLength(100)
48
- @ApiProperty({ type: String, description: 'title of the media' })
49
- Title: string;
50
-
51
- @IsNotEmpty()
52
- @IsString()
53
- @MaxLength(1000)
54
- @ApiProperty({ type: String, description: 'Description of the media' })
55
- Description: string;
56
-
57
- @IsNotEmpty()
58
- @IsEnum(['N', 'Y'])
59
- @ApiProperty({
60
- type: String,
61
- description: 'Option if media needed to be encryped : Y or N',
62
- })
63
- IsEncryptedYN: string;
64
- }
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsEnum, IsNotEmpty, IsString, MaxLength } from 'class-validator';
3
+ import { MediaType } from '../enum/medias.enum';
4
+
5
+ export class InternalMediaDto {
6
+ @IsNotEmpty()
7
+ @IsString()
8
+ @MaxLength(30)
9
+ @ApiProperty({ type: String, description: 'ObjectID' })
10
+ ObjectId: string;
11
+
12
+ @IsNotEmpty()
13
+ @IsString()
14
+ @MaxLength(200)
15
+ @ApiProperty({ type: String, description: 'ObjectType' })
16
+ ObjectType: string;
17
+
18
+ @IsNotEmpty()
19
+ @ApiProperty({
20
+ type: String,
21
+ description: 'Enum either Photo, Video, Document',
22
+ })
23
+ @IsEnum(MediaType)
24
+ Type: MediaType;
25
+
26
+ @IsNotEmpty()
27
+ @IsString()
28
+ @MaxLength(200)
29
+ @ApiProperty({ type: String, description: 'file name without extension' })
30
+ FileName: string;
31
+
32
+ @IsNotEmpty()
33
+ @IsString()
34
+ @MaxLength(10)
35
+ @ApiProperty({ type: String, description: 'extention of file in jpg etc' })
36
+ FileExtension: string;
37
+
38
+ @ApiProperty({
39
+ type: String,
40
+ description: 'File stream buffer',
41
+ format: 'binary',
42
+ })
43
+ FileStream: any;
44
+
45
+ @IsNotEmpty()
46
+ @IsString()
47
+ @MaxLength(100)
48
+ @ApiProperty({ type: String, description: 'title of the media' })
49
+ Title: string;
50
+
51
+ @IsNotEmpty()
52
+ @IsString()
53
+ @MaxLength(1000)
54
+ @ApiProperty({ type: String, description: 'Description of the media' })
55
+ Description: string;
56
+
57
+ @IsNotEmpty()
58
+ @IsEnum(['N', 'Y'])
59
+ @ApiProperty({
60
+ type: String,
61
+ description: 'Option if media needed to be encryped : Y or N',
62
+ })
63
+ IsEncryptedYN: string;
64
+ }