@ooneex/typeorm 0.0.1 → 0.4.0

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 (178) hide show
  1. package/dist/shared/chunk-19qhst35.js +5 -0
  2. package/dist/shared/chunk-19qhst35.js.map +12 -0
  3. package/dist/shared/chunk-31y260d6.js +101 -0
  4. package/dist/shared/chunk-31y260d6.js.map +11 -0
  5. package/dist/shared/chunk-59vwmfpm.js +5 -0
  6. package/dist/shared/chunk-59vwmfpm.js.map +9 -0
  7. package/dist/shared/chunk-5tnqjb3n.js +5 -0
  8. package/dist/shared/{chunk-eh420jqn.js.map → chunk-5tnqjb3n.js.map} +2 -2
  9. package/dist/shared/chunk-5ybg5hda.js +5 -0
  10. package/dist/shared/{chunk-pwhygf44.js.map → chunk-5ybg5hda.js.map} +2 -2
  11. package/dist/shared/chunk-6jnj2pfx.js +5 -0
  12. package/dist/shared/chunk-6jnj2pfx.js.map +10 -0
  13. package/dist/shared/chunk-6kdkyjbn.js +5 -0
  14. package/dist/shared/chunk-6kdkyjbn.js.map +10 -0
  15. package/dist/shared/chunk-aj0aak90.js +42 -0
  16. package/dist/shared/chunk-aj0aak90.js.map +10 -0
  17. package/dist/shared/chunk-e51ktjsq.js +5 -0
  18. package/dist/shared/chunk-e51ktjsq.js.map +18 -0
  19. package/dist/shared/chunk-jr0xys18.js +36 -0
  20. package/dist/shared/chunk-jr0xys18.js.map +10 -0
  21. package/dist/shared/chunk-kw4t1san.js +5 -0
  22. package/dist/shared/{chunk-wawk30n1.js.map → chunk-kw4t1san.js.map} +9 -4
  23. package/dist/shared/chunk-nfv9ce7v.js +5 -0
  24. package/dist/shared/{chunk-wmftwzcs.js.map → chunk-nfv9ce7v.js.map} +2 -2
  25. package/dist/shared/chunk-p22keb3y.js +5 -0
  26. package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-p22keb3y.js.map} +2 -2
  27. package/dist/shared/chunk-pbns711f.js +5 -0
  28. package/dist/shared/chunk-pbns711f.js.map +10 -0
  29. package/dist/shared/chunk-qrs0g3m9.js +51 -0
  30. package/dist/shared/chunk-qrs0g3m9.js.map +10 -0
  31. package/dist/shared/chunk-qyf32qsz.js +82 -0
  32. package/dist/shared/chunk-qyf32qsz.js.map +10 -0
  33. package/dist/shared/chunk-t1jad451.js +5 -0
  34. package/dist/shared/chunk-t1jad451.js.map +21 -0
  35. package/dist/shared/chunk-t5cy307m.js +5 -0
  36. package/dist/shared/chunk-t5cy307m.js.map +10 -0
  37. package/dist/shared/chunk-x2d798hg.js +5 -0
  38. package/dist/shared/chunk-x2d798hg.js.map +11 -0
  39. package/dist/shared/chunk-x3pmm3na.js +5 -0
  40. package/dist/shared/chunk-x3pmm3na.js.map +21 -0
  41. package/dist/shared/chunk-xrqhqgen.js +5 -0
  42. package/dist/shared/{chunk-j7nprmyh.js.map → chunk-xrqhqgen.js.map} +2 -2
  43. package/dist/shared/chunk-xwe8m6av.js +5 -0
  44. package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xwe8m6av.js.map} +2 -2
  45. package/dist/shared/chunk-yrwsqc6r.js +5 -0
  46. package/dist/shared/chunk-yrwsqc6r.js.map +21 -0
  47. package/dist/src/entities/book/index.d.ts +80 -3
  48. package/dist/src/entities/book/index.js +2 -2
  49. package/dist/src/entities/book/index.js.map +1 -1
  50. package/dist/src/entities/common/index.d.ts +21 -28
  51. package/dist/src/entities/common/index.js +2 -2
  52. package/dist/src/entities/common/index.js.map +1 -1
  53. package/dist/src/entities/country/index.d.ts +21 -0
  54. package/dist/src/entities/country/index.js +4 -0
  55. package/dist/src/entities/country/index.js.map +9 -0
  56. package/dist/src/entities/currency/index.d.ts +23 -0
  57. package/dist/src/entities/currency/index.js +4 -0
  58. package/dist/src/entities/currency/index.js.map +9 -0
  59. package/dist/src/entities/folder/index.d.ts +104 -0
  60. package/dist/src/entities/folder/index.js +4 -0
  61. package/dist/src/entities/folder/index.js.map +19 -0
  62. package/dist/src/entities/gamification/flashcard/index.js +2 -2
  63. package/dist/src/entities/gamification/flashcard/index.js.map +1 -1
  64. package/dist/src/entities/gamification/index.js +2 -2
  65. package/dist/src/entities/gamification/index.js.map +1 -1
  66. package/dist/src/entities/gamification/mcq/index.d.ts +76 -7
  67. package/dist/src/entities/gamification/mcq/index.js +2 -2
  68. package/dist/src/entities/gamification/mcq/index.js.map +1 -1
  69. package/dist/src/entities/image/index.d.ts +83 -6
  70. package/dist/src/entities/image/index.js +2 -2
  71. package/dist/src/entities/image/index.js.map +1 -1
  72. package/dist/src/entities/medecine/index.d.ts +36 -0
  73. package/dist/src/entities/medecine/index.js +4 -0
  74. package/dist/src/entities/medecine/index.js.map +9 -0
  75. package/dist/src/entities/payment/index.js +2 -2
  76. package/dist/src/entities/payment/index.js.map +1 -1
  77. package/dist/src/entities/user/index.d.ts +48 -7
  78. package/dist/src/entities/user/index.js +2 -2
  79. package/dist/src/entities/user/index.js.map +1 -1
  80. package/dist/src/entities/video/index.d.ts +88 -10
  81. package/dist/src/entities/video/index.js +2 -2
  82. package/dist/src/entities/video/index.js.map +1 -1
  83. package/dist/src/migrations/book/index.d.ts +97 -0
  84. package/dist/src/migrations/book/index.js +516 -0
  85. package/dist/src/migrations/book/index.js.map +21 -0
  86. package/dist/src/migrations/common/index.d.ts +41 -0
  87. package/dist/src/migrations/common/index.js +57 -0
  88. package/dist/src/migrations/common/index.js.map +10 -0
  89. package/dist/src/migrations/country/index.d.ts +9 -0
  90. package/dist/src/migrations/country/index.js +40 -0
  91. package/dist/src/migrations/country/index.js.map +10 -0
  92. package/dist/src/migrations/currency/index.d.ts +9 -0
  93. package/dist/src/migrations/currency/index.js +44 -0
  94. package/dist/src/migrations/currency/index.js.map +10 -0
  95. package/dist/src/migrations/folder/index.d.ts +81 -0
  96. package/dist/src/migrations/folder/index.js +387 -0
  97. package/dist/src/migrations/folder/index.js.map +19 -0
  98. package/dist/src/migrations/gamification/flashcard/index.d.ts +57 -0
  99. package/dist/src/migrations/gamification/flashcard/index.js +420 -0
  100. package/dist/src/migrations/gamification/flashcard/index.js.map +16 -0
  101. package/dist/src/migrations/gamification/index.d.ts +9 -0
  102. package/dist/src/migrations/gamification/index.js +4 -0
  103. package/dist/src/migrations/gamification/index.js.map +9 -0
  104. package/dist/src/migrations/gamification/mcq/index.d.ts +97 -0
  105. package/dist/src/migrations/gamification/mcq/index.js +526 -0
  106. package/dist/src/migrations/gamification/mcq/index.js.map +21 -0
  107. package/dist/src/migrations/image/index.d.ts +81 -0
  108. package/dist/src/migrations/image/index.js +328 -0
  109. package/dist/src/migrations/image/index.js.map +18 -0
  110. package/dist/src/migrations/medecine/index.d.ts +25 -0
  111. package/dist/src/migrations/medecine/index.js +119 -0
  112. package/dist/src/migrations/medecine/index.js.map +12 -0
  113. package/dist/src/migrations/payment/index.d.ts +49 -0
  114. package/dist/src/migrations/payment/index.js +352 -0
  115. package/dist/src/migrations/payment/index.js.map +15 -0
  116. package/dist/src/migrations/user/index.d.ts +81 -0
  117. package/dist/src/migrations/user/index.js +309 -0
  118. package/dist/src/migrations/user/index.js.map +19 -0
  119. package/dist/src/migrations/video/index.d.ts +97 -0
  120. package/dist/src/migrations/video/index.js +289 -0
  121. package/dist/src/migrations/video/index.js.map +21 -0
  122. package/dist/src/repositories/book/index.d.ts +310 -35
  123. package/dist/src/repositories/book/index.js +2 -2
  124. package/dist/src/repositories/book/index.js.map +15 -6
  125. package/dist/src/repositories/common/index.d.ts +65 -94
  126. package/dist/src/repositories/common/index.js +2 -2
  127. package/dist/src/repositories/common/index.js.map +8 -9
  128. package/dist/src/repositories/country/index.d.ts +42 -0
  129. package/dist/src/repositories/country/index.js +4 -0
  130. package/dist/src/repositories/country/index.js.map +10 -0
  131. package/dist/src/repositories/currency/index.d.ts +44 -0
  132. package/dist/src/repositories/currency/index.js +4 -0
  133. package/dist/src/repositories/currency/index.js.map +10 -0
  134. package/dist/src/repositories/gamification/flashcard/index.d.ts +14 -14
  135. package/dist/src/repositories/gamification/flashcard/index.js +2 -2
  136. package/dist/src/repositories/gamification/flashcard/index.js.map +9 -9
  137. package/dist/src/repositories/gamification/index.d.ts +328 -83
  138. package/dist/src/repositories/gamification/index.js +2 -2
  139. package/dist/src/repositories/gamification/index.js.map +3 -3
  140. package/dist/src/repositories/gamification/mcq/index.d.ts +299 -54
  141. package/dist/src/repositories/gamification/mcq/index.js +2 -2
  142. package/dist/src/repositories/gamification/mcq/index.js.map +15 -7
  143. package/dist/src/repositories/image/index.d.ts +295 -20
  144. package/dist/src/repositories/image/index.js +2 -2
  145. package/dist/src/repositories/image/index.js.map +13 -4
  146. package/dist/src/repositories/medecine/index.d.ts +99 -0
  147. package/dist/src/repositories/medecine/index.js +4 -0
  148. package/dist/src/repositories/medecine/index.js.map +12 -0
  149. package/dist/src/repositories/payment/index.d.ts +12 -12
  150. package/dist/src/repositories/payment/index.js +2 -2
  151. package/dist/src/repositories/payment/index.js.map +8 -8
  152. package/dist/src/repositories/user/index.d.ts +210 -59
  153. package/dist/src/repositories/user/index.js +2 -2
  154. package/dist/src/repositories/user/index.js.map +13 -8
  155. package/dist/src/repositories/video/index.d.ts +330 -54
  156. package/dist/src/repositories/video/index.js +2 -2
  157. package/dist/src/repositories/video/index.js.map +15 -6
  158. package/package.json +188 -58
  159. package/dist/ooneex-typeorm-0.0.1.tgz +0 -0
  160. package/dist/shared/chunk-2e7zbxcq.js +0 -5
  161. package/dist/shared/chunk-764bzjhz.js +0 -5
  162. package/dist/shared/chunk-764bzjhz.js.map +0 -12
  163. package/dist/shared/chunk-eh420jqn.js +0 -5
  164. package/dist/shared/chunk-gjsgnzaq.js +0 -5
  165. package/dist/shared/chunk-gjsgnzaq.js.map +0 -10
  166. package/dist/shared/chunk-hw4vdg6q.js +0 -5
  167. package/dist/shared/chunk-hw4vdg6q.js.map +0 -10
  168. package/dist/shared/chunk-j7nprmyh.js +0 -5
  169. package/dist/shared/chunk-kgxsdeye.js +0 -5
  170. package/dist/shared/chunk-kgxsdeye.js.map +0 -13
  171. package/dist/shared/chunk-ntrrrvwt.js +0 -5
  172. package/dist/shared/chunk-ntrrrvwt.js.map +0 -12
  173. package/dist/shared/chunk-pwhygf44.js +0 -5
  174. package/dist/shared/chunk-sd6mmec6.js +0 -5
  175. package/dist/shared/chunk-sd6mmec6.js.map +0 -12
  176. package/dist/shared/chunk-wawk30n1.js +0 -5
  177. package/dist/shared/chunk-wmftwzcs.js +0 -5
  178. package/dist/shared/chunk-zmzz7hqq.js +0 -5
@@ -1,9 +1,7 @@
1
- import { ITypeormDatabaseAdapter } from "@ooneex/database";
1
+ import { ITypeormDatabase } from "@ooneex/database";
2
2
  import { FilterResultType } from "@ooneex/types";
3
3
  import { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from "typeorm";
4
- import { IStatus } from "@ooneex/status";
5
- import { ITag } from "@ooneex/tag";
6
- import { IPlaylist, IVideo } from "@ooneex/video";
4
+ import { IVideo, IVideoComment } from "@ooneex/video";
7
5
  import { LocaleType } from "@ooneex/translation";
8
6
  import { IBase } from "@ooneex/types";
9
7
  declare abstract class BaseEntity implements IBase {
@@ -19,38 +17,158 @@ declare abstract class BaseEntity implements IBase {
19
17
  updatedAt?: Date;
20
18
  deletedAt?: Date;
21
19
  }
20
+ declare class VideoCommentEntity extends BaseEntity implements IVideoComment {
21
+ video?: IVideo;
22
+ videoId?: string;
23
+ comment: string;
24
+ commentedBy?: string;
25
+ commentedById?: string;
26
+ parentCommentId?: string;
27
+ }
28
+ declare class VideoCommentRepository {
29
+ private readonly database;
30
+ constructor(database: ITypeormDatabase);
31
+ open(): Promise<Repository<VideoCommentEntity>>;
32
+ close(): Promise<void>;
33
+ find(criteria: FindManyOptions<VideoCommentEntity> & {
34
+ page?: number;
35
+ limit?: number;
36
+ q?: string;
37
+ }): Promise<FilterResultType<VideoCommentEntity>>;
38
+ findOne(id: string): Promise<VideoCommentEntity | null>;
39
+ findOneBy(criteria: FindOptionsWhere<VideoCommentEntity>): Promise<VideoCommentEntity | null>;
40
+ create(entity: VideoCommentEntity, options?: SaveOptions): Promise<VideoCommentEntity>;
41
+ createMany(entities: VideoCommentEntity[], options?: SaveOptions): Promise<VideoCommentEntity[]>;
42
+ update(entity: VideoCommentEntity, options?: SaveOptions): Promise<VideoCommentEntity>;
43
+ updateMany(entities: VideoCommentEntity[], options?: SaveOptions): Promise<VideoCommentEntity[]>;
44
+ delete(criteria: FindOptionsWhere<VideoCommentEntity> | FindOptionsWhere<VideoCommentEntity>[]): Promise<UpdateResult>;
45
+ count(criteria?: FindOptionsWhere<VideoCommentEntity> | FindOptionsWhere<VideoCommentEntity>[]): Promise<number>;
46
+ }
47
+ import { ITypeormDatabase as ITypeormDatabase2 } from "@ooneex/database";
48
+ import { FilterResultType as FilterResultType2 } from "@ooneex/types";
49
+ import { FindManyOptions as FindManyOptions2, FindOptionsWhere as FindOptionsWhere2, Repository as Repository2, SaveOptions as SaveOptions2, UpdateResult as UpdateResult2 } from "typeorm";
50
+ import { IVideo as IVideo2, IVideoDisliked } from "@ooneex/video";
51
+ declare class VideoDislikedEntity extends BaseEntity implements IVideoDisliked {
52
+ video?: IVideo2;
53
+ videoId?: string;
54
+ dislikedBy?: string;
55
+ dislikedById?: string;
56
+ }
57
+ declare class VideoDislikedRepository {
58
+ private readonly database;
59
+ constructor(database: ITypeormDatabase2);
60
+ open(): Promise<Repository2<VideoDislikedEntity>>;
61
+ close(): Promise<void>;
62
+ find(criteria: FindManyOptions2<VideoDislikedEntity> & {
63
+ page?: number;
64
+ limit?: number;
65
+ q?: string;
66
+ }): Promise<FilterResultType2<VideoDislikedEntity>>;
67
+ findOne(id: string): Promise<VideoDislikedEntity | null>;
68
+ findOneBy(criteria: FindOptionsWhere2<VideoDislikedEntity>): Promise<VideoDislikedEntity | null>;
69
+ create(entity: VideoDislikedEntity, options?: SaveOptions2): Promise<VideoDislikedEntity>;
70
+ createMany(entities: VideoDislikedEntity[], options?: SaveOptions2): Promise<VideoDislikedEntity[]>;
71
+ update(entity: VideoDislikedEntity, options?: SaveOptions2): Promise<VideoDislikedEntity>;
72
+ updateMany(entities: VideoDislikedEntity[], options?: SaveOptions2): Promise<VideoDislikedEntity[]>;
73
+ delete(criteria: FindOptionsWhere2<VideoDislikedEntity> | FindOptionsWhere2<VideoDislikedEntity>[]): Promise<UpdateResult2>;
74
+ count(criteria?: FindOptionsWhere2<VideoDislikedEntity> | FindOptionsWhere2<VideoDislikedEntity>[]): Promise<number>;
75
+ }
76
+ import { ITypeormDatabase as ITypeormDatabase3 } from "@ooneex/database";
77
+ import { FilterResultType as FilterResultType3 } from "@ooneex/types";
78
+ import { FindManyOptions as FindManyOptions3, FindOptionsWhere as FindOptionsWhere3, Repository as Repository3, SaveOptions as SaveOptions3, UpdateResult as UpdateResult3 } from "typeorm";
79
+ import { IVideo as IVideo3, IVideoDownloaded } from "@ooneex/video";
80
+ declare class VideoDownloadedEntity extends BaseEntity implements IVideoDownloaded {
81
+ video?: IVideo3;
82
+ videoId?: string;
83
+ downloadedBy?: string;
84
+ downloadedById?: string;
85
+ }
86
+ declare class VideoDownloadedRepository {
87
+ private readonly database;
88
+ constructor(database: ITypeormDatabase3);
89
+ open(): Promise<Repository3<VideoDownloadedEntity>>;
90
+ close(): Promise<void>;
91
+ find(criteria: FindManyOptions3<VideoDownloadedEntity> & {
92
+ page?: number;
93
+ limit?: number;
94
+ q?: string;
95
+ }): Promise<FilterResultType3<VideoDownloadedEntity>>;
96
+ findOne(id: string): Promise<VideoDownloadedEntity | null>;
97
+ findOneBy(criteria: FindOptionsWhere3<VideoDownloadedEntity>): Promise<VideoDownloadedEntity | null>;
98
+ create(entity: VideoDownloadedEntity, options?: SaveOptions3): Promise<VideoDownloadedEntity>;
99
+ createMany(entities: VideoDownloadedEntity[], options?: SaveOptions3): Promise<VideoDownloadedEntity[]>;
100
+ update(entity: VideoDownloadedEntity, options?: SaveOptions3): Promise<VideoDownloadedEntity>;
101
+ updateMany(entities: VideoDownloadedEntity[], options?: SaveOptions3): Promise<VideoDownloadedEntity[]>;
102
+ delete(criteria: FindOptionsWhere3<VideoDownloadedEntity> | FindOptionsWhere3<VideoDownloadedEntity>[]): Promise<UpdateResult3>;
103
+ count(criteria?: FindOptionsWhere3<VideoDownloadedEntity> | FindOptionsWhere3<VideoDownloadedEntity>[]): Promise<number>;
104
+ }
105
+ import { ITypeormDatabase as ITypeormDatabase4 } from "@ooneex/database";
106
+ import { FilterResultType as FilterResultType4 } from "@ooneex/types";
107
+ import { FindManyOptions as FindManyOptions4, FindOptionsWhere as FindOptionsWhere4, Repository as Repository4, SaveOptions as SaveOptions4, UpdateResult as UpdateResult4 } from "typeorm";
108
+ import { IVideo as IVideo4, IVideoLiked } from "@ooneex/video";
109
+ declare class VideoLikedEntity extends BaseEntity implements IVideoLiked {
110
+ video?: IVideo4;
111
+ videoId?: string;
112
+ likedBy?: string;
113
+ likedById?: string;
114
+ }
115
+ declare class VideoLikedRepository {
116
+ private readonly database;
117
+ constructor(database: ITypeormDatabase4);
118
+ open(): Promise<Repository4<VideoLikedEntity>>;
119
+ close(): Promise<void>;
120
+ find(criteria: FindManyOptions4<VideoLikedEntity> & {
121
+ page?: number;
122
+ limit?: number;
123
+ q?: string;
124
+ }): Promise<FilterResultType4<VideoLikedEntity>>;
125
+ findOne(id: string): Promise<VideoLikedEntity | null>;
126
+ findOneBy(criteria: FindOptionsWhere4<VideoLikedEntity>): Promise<VideoLikedEntity | null>;
127
+ create(entity: VideoLikedEntity, options?: SaveOptions4): Promise<VideoLikedEntity>;
128
+ createMany(entities: VideoLikedEntity[], options?: SaveOptions4): Promise<VideoLikedEntity[]>;
129
+ update(entity: VideoLikedEntity, options?: SaveOptions4): Promise<VideoLikedEntity>;
130
+ updateMany(entities: VideoLikedEntity[], options?: SaveOptions4): Promise<VideoLikedEntity[]>;
131
+ delete(criteria: FindOptionsWhere4<VideoLikedEntity> | FindOptionsWhere4<VideoLikedEntity>[]): Promise<UpdateResult4>;
132
+ count(criteria?: FindOptionsWhere4<VideoLikedEntity> | FindOptionsWhere4<VideoLikedEntity>[]): Promise<number>;
133
+ }
134
+ import { ITypeormDatabase as ITypeormDatabase5 } from "@ooneex/database";
135
+ import { FilterResultType as FilterResultType5 } from "@ooneex/types";
136
+ import { FindManyOptions as FindManyOptions5, FindOptionsWhere as FindOptionsWhere5, Repository as Repository5, SaveOptions as SaveOptions5, UpdateResult as UpdateResult5 } from "typeorm";
137
+ import { IStatus } from "@ooneex/status";
138
+ import { ITag } from "@ooneex/tag";
139
+ import { IPlaylist, IVideo as IVideo5 } from "@ooneex/video";
22
140
  declare class VideoPlaylistEntity extends BaseEntity implements IPlaylist {
23
141
  name: string;
24
142
  description?: string;
25
- videos?: IVideo[];
143
+ videos?: IVideo5[];
26
144
  tags?: ITag[];
27
145
  status?: IStatus;
28
146
  }
29
147
  declare class VideoPlaylistRepository {
30
148
  private readonly database;
31
- constructor(database: ITypeormDatabaseAdapter);
32
- open(): Promise<Repository<VideoPlaylistEntity>>;
149
+ constructor(database: ITypeormDatabase5);
150
+ open(): Promise<Repository5<VideoPlaylistEntity>>;
33
151
  close(): Promise<void>;
34
- find(criteria: FindManyOptions<VideoPlaylistEntity> & {
152
+ find(criteria: FindManyOptions5<VideoPlaylistEntity> & {
35
153
  page?: number;
36
154
  limit?: number;
37
155
  q?: string;
38
- }): Promise<FilterResultType<VideoPlaylistEntity>>;
156
+ }): Promise<FilterResultType5<VideoPlaylistEntity>>;
39
157
  findOne(id: string): Promise<VideoPlaylistEntity | null>;
40
- findOneBy(criteria: FindOptionsWhere<VideoPlaylistEntity>): Promise<VideoPlaylistEntity | null>;
41
- create(entity: VideoPlaylistEntity, options?: SaveOptions): Promise<VideoPlaylistEntity>;
42
- createMany(entities: VideoPlaylistEntity[], options?: SaveOptions): Promise<VideoPlaylistEntity[]>;
43
- update(entity: VideoPlaylistEntity, options?: SaveOptions): Promise<VideoPlaylistEntity>;
44
- updateMany(entities: VideoPlaylistEntity[], options?: SaveOptions): Promise<VideoPlaylistEntity[]>;
45
- delete(criteria: FindOptionsWhere<VideoPlaylistEntity> | FindOptionsWhere<VideoPlaylistEntity>[]): Promise<UpdateResult>;
46
- count(criteria?: FindOptionsWhere<VideoPlaylistEntity> | FindOptionsWhere<VideoPlaylistEntity>[]): Promise<number>;
47
- }
48
- import { ITypeormDatabaseAdapter as ITypeormDatabaseAdapter2 } from "@ooneex/database";
49
- import { FilterResultType as FilterResultType2 } from "@ooneex/types";
50
- import { FindManyOptions as FindManyOptions2, FindOptionsWhere as FindOptionsWhere2, Repository as Repository2, SaveOptions as SaveOptions2, UpdateResult as UpdateResult2 } from "typeorm";
51
- import { IVideo as IVideo2, IVideoProgress } from "@ooneex/video";
158
+ findOneBy(criteria: FindOptionsWhere5<VideoPlaylistEntity>): Promise<VideoPlaylistEntity | null>;
159
+ create(entity: VideoPlaylistEntity, options?: SaveOptions5): Promise<VideoPlaylistEntity>;
160
+ createMany(entities: VideoPlaylistEntity[], options?: SaveOptions5): Promise<VideoPlaylistEntity[]>;
161
+ update(entity: VideoPlaylistEntity, options?: SaveOptions5): Promise<VideoPlaylistEntity>;
162
+ updateMany(entities: VideoPlaylistEntity[], options?: SaveOptions5): Promise<VideoPlaylistEntity[]>;
163
+ delete(criteria: FindOptionsWhere5<VideoPlaylistEntity> | FindOptionsWhere5<VideoPlaylistEntity>[]): Promise<UpdateResult5>;
164
+ count(criteria?: FindOptionsWhere5<VideoPlaylistEntity> | FindOptionsWhere5<VideoPlaylistEntity>[]): Promise<number>;
165
+ }
166
+ import { ITypeormDatabase as ITypeormDatabase6 } from "@ooneex/database";
167
+ import { FilterResultType as FilterResultType6 } from "@ooneex/types";
168
+ import { FindManyOptions as FindManyOptions6, FindOptionsWhere as FindOptionsWhere6, Repository as Repository6, SaveOptions as SaveOptions6, UpdateResult as UpdateResult6 } from "typeorm";
169
+ import { IVideo as IVideo6, IVideoProgress } from "@ooneex/video";
52
170
  declare class VideoProgressEntity extends BaseEntity implements IVideoProgress {
53
- video?: IVideo2;
171
+ video?: IVideo6;
54
172
  userId: string;
55
173
  currentTime: number;
56
174
  duration?: number;
@@ -59,30 +177,63 @@ declare class VideoProgressEntity extends BaseEntity implements IVideoProgress {
59
177
  }
60
178
  declare class VideoProgressRepository {
61
179
  private readonly database;
62
- constructor(database: ITypeormDatabaseAdapter2);
63
- open(): Promise<Repository2<VideoProgressEntity>>;
180
+ constructor(database: ITypeormDatabase6);
181
+ open(): Promise<Repository6<VideoProgressEntity>>;
64
182
  close(): Promise<void>;
65
- find(criteria: FindManyOptions2<VideoProgressEntity> & {
183
+ find(criteria: FindManyOptions6<VideoProgressEntity> & {
66
184
  page?: number;
67
185
  limit?: number;
68
- }): Promise<FilterResultType2<VideoProgressEntity>>;
186
+ }): Promise<FilterResultType6<VideoProgressEntity>>;
69
187
  findOne(id: string): Promise<VideoProgressEntity | null>;
70
- findOneBy(criteria: FindOptionsWhere2<VideoProgressEntity>): Promise<VideoProgressEntity | null>;
71
- create(entity: VideoProgressEntity, options?: SaveOptions2): Promise<VideoProgressEntity>;
72
- createMany(entities: VideoProgressEntity[], options?: SaveOptions2): Promise<VideoProgressEntity[]>;
73
- update(entity: VideoProgressEntity, options?: SaveOptions2): Promise<VideoProgressEntity>;
74
- updateMany(entities: VideoProgressEntity[], options?: SaveOptions2): Promise<VideoProgressEntity[]>;
75
- delete(criteria: FindOptionsWhere2<VideoProgressEntity> | FindOptionsWhere2<VideoProgressEntity>[]): Promise<UpdateResult2>;
76
- count(criteria?: FindOptionsWhere2<VideoProgressEntity> | FindOptionsWhere2<VideoProgressEntity>[]): Promise<number>;
77
- }
78
- import { ITypeormDatabaseAdapter as ITypeormDatabaseAdapter3 } from "@ooneex/database";
79
- import { FilterResultType as FilterResultType3 } from "@ooneex/types";
80
- import { FindManyOptions as FindManyOptions3, FindOptionsWhere as FindOptionsWhere3, Repository as Repository3, SaveOptions as SaveOptions3, UpdateResult as UpdateResult3 } from "typeorm";
81
- import { ICategory } from "@ooneex/category";
188
+ findOneBy(criteria: FindOptionsWhere6<VideoProgressEntity>): Promise<VideoProgressEntity | null>;
189
+ create(entity: VideoProgressEntity, options?: SaveOptions6): Promise<VideoProgressEntity>;
190
+ createMany(entities: VideoProgressEntity[], options?: SaveOptions6): Promise<VideoProgressEntity[]>;
191
+ update(entity: VideoProgressEntity, options?: SaveOptions6): Promise<VideoProgressEntity>;
192
+ updateMany(entities: VideoProgressEntity[], options?: SaveOptions6): Promise<VideoProgressEntity[]>;
193
+ delete(criteria: FindOptionsWhere6<VideoProgressEntity> | FindOptionsWhere6<VideoProgressEntity>[]): Promise<UpdateResult6>;
194
+ count(criteria?: FindOptionsWhere6<VideoProgressEntity> | FindOptionsWhere6<VideoProgressEntity>[]): Promise<number>;
195
+ }
196
+ import { ITypeormDatabase as ITypeormDatabase7 } from "@ooneex/database";
197
+ import { FilterResultType as FilterResultType7 } from "@ooneex/types";
198
+ import { FindManyOptions as FindManyOptions7, FindOptionsWhere as FindOptionsWhere7, Repository as Repository7, SaveOptions as SaveOptions7, UpdateResult as UpdateResult7 } from "typeorm";
82
199
  import { IStatus as IStatus2 } from "@ooneex/status";
200
+ import { IVideo as IVideo7, IVideoReport } from "@ooneex/video";
201
+ declare class VideoReportEntity extends BaseEntity implements IVideoReport {
202
+ video?: IVideo7;
203
+ videoId?: string;
204
+ reason: string;
205
+ description?: string;
206
+ reportedBy?: string;
207
+ reportedById?: string;
208
+ status?: IStatus2;
209
+ }
210
+ declare class VideoReportRepository {
211
+ private readonly database;
212
+ constructor(database: ITypeormDatabase7);
213
+ open(): Promise<Repository7<VideoReportEntity>>;
214
+ close(): Promise<void>;
215
+ find(criteria: FindManyOptions7<VideoReportEntity> & {
216
+ page?: number;
217
+ limit?: number;
218
+ q?: string;
219
+ }): Promise<FilterResultType7<VideoReportEntity>>;
220
+ findOne(id: string): Promise<VideoReportEntity | null>;
221
+ findOneBy(criteria: FindOptionsWhere7<VideoReportEntity>): Promise<VideoReportEntity | null>;
222
+ create(entity: VideoReportEntity, options?: SaveOptions7): Promise<VideoReportEntity>;
223
+ createMany(entities: VideoReportEntity[], options?: SaveOptions7): Promise<VideoReportEntity[]>;
224
+ update(entity: VideoReportEntity, options?: SaveOptions7): Promise<VideoReportEntity>;
225
+ updateMany(entities: VideoReportEntity[], options?: SaveOptions7): Promise<VideoReportEntity[]>;
226
+ delete(criteria: FindOptionsWhere7<VideoReportEntity> | FindOptionsWhere7<VideoReportEntity>[]): Promise<UpdateResult7>;
227
+ count(criteria?: FindOptionsWhere7<VideoReportEntity> | FindOptionsWhere7<VideoReportEntity>[]): Promise<number>;
228
+ }
229
+ import { ITypeormDatabase as ITypeormDatabase8 } from "@ooneex/database";
230
+ import { FilterResultType as FilterResultType8 } from "@ooneex/types";
231
+ import { FindManyOptions as FindManyOptions8, FindOptionsWhere as FindOptionsWhere8, Repository as Repository8, SaveOptions as SaveOptions8, UpdateResult as UpdateResult8 } from "typeorm";
232
+ import { ICategory } from "@ooneex/category";
233
+ import { IStatus as IStatus3 } from "@ooneex/status";
83
234
  import { ITag as ITag2 } from "@ooneex/tag";
84
- import { AudioChannelsType, AudioCodecType, EVideoCodec, EVideoFormat, EVideoQuality, EVideoResolution, IVideo as IVideo3 } from "@ooneex/video";
85
- declare class VideoEntity extends BaseEntity implements IVideo3 {
235
+ import { AudioChannelsType, AudioCodecType, EVideoCodec, EVideoFormat, EVideoQuality, EVideoResolution, IVideo as IVideo8 } from "@ooneex/video";
236
+ declare class VideoEntity extends BaseEntity implements IVideo8 {
86
237
  title: string;
87
238
  subtitle?: string;
88
239
  releaseDate?: string;
@@ -107,26 +258,151 @@ declare class VideoEntity extends BaseEntity implements IVideo3 {
107
258
  contentRating?: string;
108
259
  context?: string;
109
260
  contextId?: string;
261
+ isYoutube: boolean;
110
262
  tags?: ITag2[];
111
- status?: IStatus2;
263
+ status?: IStatus3;
112
264
  }
113
265
  declare class VideoRepository {
114
266
  private readonly database;
115
- constructor(database: ITypeormDatabaseAdapter3);
116
- open(): Promise<Repository3<VideoEntity>>;
267
+ constructor(database: ITypeormDatabase8);
268
+ open(): Promise<Repository8<VideoEntity>>;
117
269
  close(): Promise<void>;
118
- find(criteria: FindManyOptions3<VideoEntity> & {
270
+ find(criteria: FindManyOptions8<VideoEntity> & {
119
271
  page?: number;
120
272
  limit?: number;
121
273
  q?: string;
122
- }): Promise<FilterResultType3<VideoEntity>>;
274
+ }): Promise<FilterResultType8<VideoEntity>>;
123
275
  findOne(id: string): Promise<VideoEntity | null>;
124
- findOneBy(criteria: FindOptionsWhere3<VideoEntity>): Promise<VideoEntity | null>;
125
- create(entity: VideoEntity, options?: SaveOptions3): Promise<VideoEntity>;
126
- createMany(entities: VideoEntity[], options?: SaveOptions3): Promise<VideoEntity[]>;
127
- update(entity: VideoEntity, options?: SaveOptions3): Promise<VideoEntity>;
128
- updateMany(entities: VideoEntity[], options?: SaveOptions3): Promise<VideoEntity[]>;
129
- delete(criteria: FindOptionsWhere3<VideoEntity> | FindOptionsWhere3<VideoEntity>[]): Promise<UpdateResult3>;
130
- count(criteria?: FindOptionsWhere3<VideoEntity> | FindOptionsWhere3<VideoEntity>[]): Promise<number>;
131
- }
132
- export { VideoRepository, VideoProgressRepository, VideoPlaylistRepository };
276
+ findOneBy(criteria: FindOptionsWhere8<VideoEntity>): Promise<VideoEntity | null>;
277
+ create(entity: VideoEntity, options?: SaveOptions8): Promise<VideoEntity>;
278
+ createMany(entities: VideoEntity[], options?: SaveOptions8): Promise<VideoEntity[]>;
279
+ update(entity: VideoEntity, options?: SaveOptions8): Promise<VideoEntity>;
280
+ updateMany(entities: VideoEntity[], options?: SaveOptions8): Promise<VideoEntity[]>;
281
+ delete(criteria: FindOptionsWhere8<VideoEntity> | FindOptionsWhere8<VideoEntity>[]): Promise<UpdateResult8>;
282
+ count(criteria?: FindOptionsWhere8<VideoEntity> | FindOptionsWhere8<VideoEntity>[]): Promise<number>;
283
+ }
284
+ import { ITypeormDatabase as ITypeormDatabase9 } from "@ooneex/database";
285
+ import { FilterResultType as FilterResultType9 } from "@ooneex/types";
286
+ import { FindManyOptions as FindManyOptions9, FindOptionsWhere as FindOptionsWhere9, Repository as Repository9, SaveOptions as SaveOptions9, UpdateResult as UpdateResult9 } from "typeorm";
287
+ import { IVideo as IVideo9, IVideoSaved } from "@ooneex/video";
288
+ declare class VideoSavedEntity extends BaseEntity implements IVideoSaved {
289
+ video?: IVideo9;
290
+ videoId?: string;
291
+ savedBy?: string;
292
+ savedById?: string;
293
+ }
294
+ declare class VideoSavedRepository {
295
+ private readonly database;
296
+ constructor(database: ITypeormDatabase9);
297
+ open(): Promise<Repository9<VideoSavedEntity>>;
298
+ close(): Promise<void>;
299
+ find(criteria: FindManyOptions9<VideoSavedEntity> & {
300
+ page?: number;
301
+ limit?: number;
302
+ q?: string;
303
+ }): Promise<FilterResultType9<VideoSavedEntity>>;
304
+ findOne(id: string): Promise<VideoSavedEntity | null>;
305
+ findOneBy(criteria: FindOptionsWhere9<VideoSavedEntity>): Promise<VideoSavedEntity | null>;
306
+ create(entity: VideoSavedEntity, options?: SaveOptions9): Promise<VideoSavedEntity>;
307
+ createMany(entities: VideoSavedEntity[], options?: SaveOptions9): Promise<VideoSavedEntity[]>;
308
+ update(entity: VideoSavedEntity, options?: SaveOptions9): Promise<VideoSavedEntity>;
309
+ updateMany(entities: VideoSavedEntity[], options?: SaveOptions9): Promise<VideoSavedEntity[]>;
310
+ delete(criteria: FindOptionsWhere9<VideoSavedEntity> | FindOptionsWhere9<VideoSavedEntity>[]): Promise<UpdateResult9>;
311
+ count(criteria?: FindOptionsWhere9<VideoSavedEntity> | FindOptionsWhere9<VideoSavedEntity>[]): Promise<number>;
312
+ }
313
+ import { ITypeormDatabase as ITypeormDatabase10 } from "@ooneex/database";
314
+ import { FilterResultType as FilterResultType10 } from "@ooneex/types";
315
+ import { FindManyOptions as FindManyOptions10, FindOptionsWhere as FindOptionsWhere10, Repository as Repository10, SaveOptions as SaveOptions10, UpdateResult as UpdateResult10 } from "typeorm";
316
+ import { IVideo as IVideo10, IVideoShared } from "@ooneex/video";
317
+ declare class VideoSharedEntity extends BaseEntity implements IVideoShared {
318
+ video?: IVideo10;
319
+ videoId?: string;
320
+ sharedWith?: string;
321
+ sharedById?: string;
322
+ permission?: string;
323
+ expiresAt?: string;
324
+ }
325
+ declare class VideoSharedRepository {
326
+ private readonly database;
327
+ constructor(database: ITypeormDatabase10);
328
+ open(): Promise<Repository10<VideoSharedEntity>>;
329
+ close(): Promise<void>;
330
+ find(criteria: FindManyOptions10<VideoSharedEntity> & {
331
+ page?: number;
332
+ limit?: number;
333
+ q?: string;
334
+ }): Promise<FilterResultType10<VideoSharedEntity>>;
335
+ findOne(id: string): Promise<VideoSharedEntity | null>;
336
+ findOneBy(criteria: FindOptionsWhere10<VideoSharedEntity>): Promise<VideoSharedEntity | null>;
337
+ create(entity: VideoSharedEntity, options?: SaveOptions10): Promise<VideoSharedEntity>;
338
+ createMany(entities: VideoSharedEntity[], options?: SaveOptions10): Promise<VideoSharedEntity[]>;
339
+ update(entity: VideoSharedEntity, options?: SaveOptions10): Promise<VideoSharedEntity>;
340
+ updateMany(entities: VideoSharedEntity[], options?: SaveOptions10): Promise<VideoSharedEntity[]>;
341
+ delete(criteria: FindOptionsWhere10<VideoSharedEntity> | FindOptionsWhere10<VideoSharedEntity>[]): Promise<UpdateResult10>;
342
+ count(criteria?: FindOptionsWhere10<VideoSharedEntity> | FindOptionsWhere10<VideoSharedEntity>[]): Promise<number>;
343
+ }
344
+ import { ITypeormDatabase as ITypeormDatabase11 } from "@ooneex/database";
345
+ import { FilterResultType as FilterResultType11 } from "@ooneex/types";
346
+ import { FindManyOptions as FindManyOptions11, FindOptionsWhere as FindOptionsWhere11, Repository as Repository11, SaveOptions as SaveOptions11, UpdateResult as UpdateResult11 } from "typeorm";
347
+ import { IVideo as IVideo11, IVideoStat } from "@ooneex/video";
348
+ declare class VideoStatEntity extends BaseEntity implements IVideoStat {
349
+ video?: IVideo11;
350
+ videoId?: string;
351
+ likesCount?: number;
352
+ dislikesCount?: number;
353
+ commentsCount?: number;
354
+ sharesCount?: number;
355
+ savesCount?: number;
356
+ downloadsCount?: number;
357
+ viewsCount?: number;
358
+ reportsCount?: number;
359
+ }
360
+ declare class VideoStatRepository {
361
+ private readonly database;
362
+ constructor(database: ITypeormDatabase11);
363
+ open(): Promise<Repository11<VideoStatEntity>>;
364
+ close(): Promise<void>;
365
+ find(criteria: FindManyOptions11<VideoStatEntity> & {
366
+ page?: number;
367
+ limit?: number;
368
+ q?: string;
369
+ }): Promise<FilterResultType11<VideoStatEntity>>;
370
+ findOne(id: string): Promise<VideoStatEntity | null>;
371
+ findOneBy(criteria: FindOptionsWhere11<VideoStatEntity>): Promise<VideoStatEntity | null>;
372
+ create(entity: VideoStatEntity, options?: SaveOptions11): Promise<VideoStatEntity>;
373
+ createMany(entities: VideoStatEntity[], options?: SaveOptions11): Promise<VideoStatEntity[]>;
374
+ update(entity: VideoStatEntity, options?: SaveOptions11): Promise<VideoStatEntity>;
375
+ updateMany(entities: VideoStatEntity[], options?: SaveOptions11): Promise<VideoStatEntity[]>;
376
+ delete(criteria: FindOptionsWhere11<VideoStatEntity> | FindOptionsWhere11<VideoStatEntity>[]): Promise<UpdateResult11>;
377
+ count(criteria?: FindOptionsWhere11<VideoStatEntity> | FindOptionsWhere11<VideoStatEntity>[]): Promise<number>;
378
+ }
379
+ import { ITypeormDatabase as ITypeormDatabase12 } from "@ooneex/database";
380
+ import { FilterResultType as FilterResultType12 } from "@ooneex/types";
381
+ import { FindManyOptions as FindManyOptions12, FindOptionsWhere as FindOptionsWhere12, Repository as Repository12, SaveOptions as SaveOptions12, UpdateResult as UpdateResult12 } from "typeorm";
382
+ import { IVideo as IVideo12, IVideoViewed } from "@ooneex/video";
383
+ declare class VideoViewedEntity extends BaseEntity implements IVideoViewed {
384
+ video?: IVideo12;
385
+ videoId?: string;
386
+ viewedBy?: string;
387
+ viewedById?: string;
388
+ }
389
+ declare class VideoViewedRepository {
390
+ private readonly database;
391
+ constructor(database: ITypeormDatabase12);
392
+ open(): Promise<Repository12<VideoViewedEntity>>;
393
+ close(): Promise<void>;
394
+ find(criteria: FindManyOptions12<VideoViewedEntity> & {
395
+ page?: number;
396
+ limit?: number;
397
+ q?: string;
398
+ }): Promise<FilterResultType12<VideoViewedEntity>>;
399
+ findOne(id: string): Promise<VideoViewedEntity | null>;
400
+ findOneBy(criteria: FindOptionsWhere12<VideoViewedEntity>): Promise<VideoViewedEntity | null>;
401
+ create(entity: VideoViewedEntity, options?: SaveOptions12): Promise<VideoViewedEntity>;
402
+ createMany(entities: VideoViewedEntity[], options?: SaveOptions12): Promise<VideoViewedEntity[]>;
403
+ update(entity: VideoViewedEntity, options?: SaveOptions12): Promise<VideoViewedEntity>;
404
+ updateMany(entities: VideoViewedEntity[], options?: SaveOptions12): Promise<VideoViewedEntity[]>;
405
+ delete(criteria: FindOptionsWhere12<VideoViewedEntity> | FindOptionsWhere12<VideoViewedEntity>[]): Promise<UpdateResult12>;
406
+ count(criteria?: FindOptionsWhere12<VideoViewedEntity> | FindOptionsWhere12<VideoViewedEntity>[]): Promise<number>;
407
+ }
408
+ export { VideoViewedRepository, VideoStatRepository, VideoSharedRepository, VideoSavedRepository, VideoRepository, VideoReportRepository, VideoProgressRepository, VideoPlaylistRepository, VideoLikedRepository, VideoDownloadedRepository, VideoDislikedRepository, VideoCommentRepository };
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{A as j,B as v,z as w}from"../../../shared/chunk-sd6mmec6.js";import"../../../shared/chunk-zmzz7hqq.js";import"../../../shared/chunk-764bzjhz.js";import{V as N,W as Q,X as S}from"../../../shared/chunk-j7nprmyh.js";import{inject as W}from"@ooneex/container";import{ILike as Z}from"typeorm";class _{database;constructor(x){this.database=x}async open(){return await this.database.open(j)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,q:D,...F}=x,H,K=B===0?100:B;if(A&&A>0&&B&&B>0)H=(A-1)*K;let J={...F,take:K,...H!==void 0&&{skip:H}};if(D){let G=[{name:Z(`%${D}%`)},{description:Z(`%${D}%`)}];J={...J,where:F.where?[...G.map((M)=>({...F.where,...M}))]:G}}let U=await z.find(J),X=F.where;if(D){let G=[{name:Z(`%${D}%`)},{description:Z(`%${D}%`)}];X=F.where?[...G.map((M)=>({...F.where,...M}))]:G}let Y=await this.count(X),f=Math.ceil(Y/B);return{resources:U,total:Y,totalPages:f,page:A,limit:B}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,z){return await(await this.open()).save(x,z)}async createMany(x,z){return await(await this.open()).save(x,z)}async update(x,z){return await this.create(x,z)}async updateMany(x,z){return await this.createMany(x,z)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}_=N([Q(0,W("database")),S("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],_);import{inject as E}from"@ooneex/container";class ${database;constructor(x){this.database=x}async open(){return await this.database.open(v)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...D}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...D,take:H,...F!==void 0&&{skip:F}}),J=await this.count(D.where),U=Math.ceil(J/B);return{resources:K,total:J,totalPages:U,page:A,limit:B}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,z){return await(await this.open()).save(x,z)}async createMany(x,z){return await(await this.open()).save(x,z)}async update(x,z){return await this.create(x,z)}async updateMany(x,z){return await this.createMany(x,z)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}$=N([Q(0,E("database")),S("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],$);import{inject as O}from"@ooneex/container";import{ILike as T}from"typeorm";class b{database;constructor(x){this.database=x}async open(){return await this.database.open(w)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,q:D,...F}=x,H,K=B===0?100:B;if(A&&A>0&&B&&B>0)H=(A-1)*K;let J={...F,take:K,...H!==void 0&&{skip:H}};if(D){let G=[{title:T(`%${D}%`)},{subtitle:T(`%${D}%`)},{description:T(`%${D}%`)}];J={...J,where:F.where?[...G.map((M)=>({...F.where,...M}))]:G}}let U=await z.find(J),X=F.where;if(D){let G=[{title:T(`%${D}%`)},{subtitle:T(`%${D}%`)},{description:T(`%${D}%`)}];X=F.where?[...G.map((M)=>({...F.where,...M}))]:G}let Y=await this.count(X),f=Math.ceil(Y/B);return{resources:U,total:Y,totalPages:f,page:A,limit:B}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,z){return await(await this.open()).save(x,z)}async createMany(x,z){return await(await this.open()).save(x,z)}async update(x,z){return await this.create(x,z)}async updateMany(x,z){return await this.createMany(x,z)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}b=N([Q(0,O("database")),S("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],b);export{b as VideoRepository,$ as VideoProgressRepository,_ as VideoPlaylistRepository};
2
+ import{ea as m,fa as w,ga as P,ha as E,ia as u,ja as R,ka as g,la as V,ma as k,na as y,oa as l,pa as c}from"../../../shared/chunk-t1jad451.js";import"../../../shared/chunk-xwe8m6av.js";import"../../../shared/chunk-6jnj2pfx.js";import"../../../shared/chunk-x2d798hg.js";import"../../../shared/chunk-xrqhqgen.js";import{Ha as K,Ia as M,Ja as N}from"../../../shared/chunk-59vwmfpm.js";import{inject as d}from"@ooneex/container";import{decorator as p}from"@ooneex/repository";class _{database;constructor(x){this.database=x}async open(){return await this.database.open(w)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}_=K([p.repository(),M(0,d("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],_);import{inject as a}from"@ooneex/container";import{decorator as n}from"@ooneex/repository";class ${database;constructor(x){this.database=x}async open(){return await this.database.open(P)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}$=K([n.repository(),M(0,a("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],$);import{inject as s}from"@ooneex/container";import{decorator as r}from"@ooneex/repository";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(E)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}W=K([r.repository(),M(0,s("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as o}from"@ooneex/container";import{decorator as e}from"@ooneex/repository";class O{database;constructor(x){this.database=x}async open(){return await this.database.open(u)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}O=K([e.repository(),M(0,o("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],O);import{inject as t}from"@ooneex/container";import{decorator as i}from"@ooneex/repository";import{ILike as D}from"typeorm";class I{database;constructor(x){this.database=x}async open(){return await this.database.open(R)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,q:F,...B}=x,G,J=A===0?100:A;if(z&&z>0&&A&&A>0)G=(z-1)*J;let H={...B,take:J,...G!==void 0&&{skip:G}};if(F){let T=[{name:D(`%${F}%`)},{description:D(`%${F}%`)}];H={...H,where:B.where?[...T.map((U)=>({...B.where,...U}))]:T}}let Q=await f.find(H),Y=B.where;if(F){let T=[{name:D(`%${F}%`)},{description:D(`%${F}%`)}];Y=B.where?[...T.map((U)=>({...B.where,...U}))]:T}let Z=await this.count(Y),v=Math.ceil(Z/A);return{resources:Q,total:Z,totalPages:v,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}I=K([i.repository(),M(0,t("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],I);import{inject as xx}from"@ooneex/container";import{decorator as fx}from"@ooneex/repository";class b{database;constructor(x){this.database=x}async open(){return await this.database.open(g)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}b=K([fx.repository(),M(0,xx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],b);import{inject as zx}from"@ooneex/container";import{decorator as Ax}from"@ooneex/repository";class j{database;constructor(x){this.database=x}async open(){return await this.database.open(V)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}j=K([Ax.repository(),M(0,zx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],j);import{inject as Bx}from"@ooneex/container";import{decorator as Fx}from"@ooneex/repository";import{ILike as X}from"typeorm";class C{database;constructor(x){this.database=x}async open(){return await this.database.open(m)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,q:F,...B}=x,G,J=A===0?100:A;if(z&&z>0&&A&&A>0)G=(z-1)*J;let H={...B,take:J,...G!==void 0&&{skip:G}};if(F){let T=[{title:X(`%${F}%`)},{subtitle:X(`%${F}%`)},{description:X(`%${F}%`)}];H={...H,where:B.where?[...T.map((U)=>({...B.where,...U}))]:T}}let Q=await f.find(H),Y=B.where;if(F){let T=[{title:X(`%${F}%`)},{subtitle:X(`%${F}%`)},{description:X(`%${F}%`)}];Y=B.where?[...T.map((U)=>({...B.where,...U}))]:T}let Z=await this.count(Y),v=Math.ceil(Z/A);return{resources:Q,total:Z,totalPages:v,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}C=K([Fx.repository(),M(0,Bx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],C);import{inject as Gx}from"@ooneex/container";import{decorator as Hx}from"@ooneex/repository";class q{database;constructor(x){this.database=x}async open(){return await this.database.open(k)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}q=K([Hx.repository(),M(0,Gx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],q);import{inject as Jx}from"@ooneex/container";import{decorator as Kx}from"@ooneex/repository";class L{database;constructor(x){this.database=x}async open(){return await this.database.open(y)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}L=K([Kx.repository(),M(0,Jx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],L);import{inject as Mx}from"@ooneex/container";import{decorator as Nx}from"@ooneex/repository";class S{database;constructor(x){this.database=x}async open(){return await this.database.open(l)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}S=K([Nx.repository(),M(0,Mx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],S);import{inject as Qx}from"@ooneex/container";import{decorator as Tx}from"@ooneex/repository";class h{database;constructor(x){this.database=x}async open(){return await this.database.open(c)}async close(){await this.database.close()}async find(x){let f=await this.open(),{page:z=1,limit:A=100,...F}=x,B,G=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*G;let J=await f.find({...F,take:G,...B!==void 0&&{skip:B}}),H=await this.count(F.where),Q=Math.ceil(H/A);return{resources:J,total:H,totalPages:Q,page:z,limit:A}}async findOne(x){return await(await this.open()).findOne({where:{id:x}})}async findOneBy(x){return await(await this.open()).findOne({where:x})}async create(x,f){return await(await this.open()).save(x,f)}async createMany(x,f){return await(await this.open()).save(x,f)}async update(x,f){return await this.create(x,f)}async updateMany(x,f){return await this.createMany(x,f)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}h=K([Tx.repository(),M(0,Qx("database")),N("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],h);export{h as VideoViewedRepository,S as VideoStatRepository,L as VideoSharedRepository,q as VideoSavedRepository,C as VideoRepository,j as VideoReportRepository,b as VideoProgressRepository,I as VideoPlaylistRepository,O as VideoLikedRepository,W as VideoDownloadedRepository,$ as VideoDislikedRepository,_ as VideoCommentRepository};
3
3
 
4
- //# debugId=59AB9CEDA5BB815B64756E2164756E21
4
+ //# debugId=F9B81E93DBCDEB7164756E2164756E21