@ooneex/typeorm 0.0.1 → 0.3.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-1ez1q8rj.js +5 -0
  2. package/dist/shared/chunk-1ez1q8rj.js.map +10 -0
  3. package/dist/shared/chunk-23739ja5.js +5 -0
  4. package/dist/shared/{chunk-pwhygf44.js.map → chunk-23739ja5.js.map} +2 -2
  5. package/dist/shared/chunk-3s989zjv.js +5 -0
  6. package/dist/shared/{chunk-eh420jqn.js.map → chunk-3s989zjv.js.map} +2 -2
  7. package/dist/shared/chunk-4ysz6b7v.js +5 -0
  8. package/dist/shared/chunk-4ysz6b7v.js.map +10 -0
  9. package/dist/shared/chunk-635xd7h1.js +5 -0
  10. package/dist/shared/{chunk-wmftwzcs.js.map → chunk-635xd7h1.js.map} +2 -2
  11. package/dist/shared/chunk-63wp98dt.js +101 -0
  12. package/dist/shared/chunk-63wp98dt.js.map +11 -0
  13. package/dist/shared/chunk-6gzanxfz.js +5 -0
  14. package/dist/shared/chunk-6gzanxfz.js.map +18 -0
  15. package/dist/shared/chunk-81xh5hbk.js +5 -0
  16. package/dist/shared/chunk-81xh5hbk.js.map +21 -0
  17. package/dist/shared/chunk-8q6vs955.js +5 -0
  18. package/dist/shared/chunk-8q6vs955.js.map +10 -0
  19. package/dist/shared/chunk-bdyby4d8.js +5 -0
  20. package/dist/shared/chunk-bdyby4d8.js.map +10 -0
  21. package/dist/shared/chunk-fjtw26pp.js +5 -0
  22. package/dist/shared/{chunk-j7nprmyh.js.map → chunk-fjtw26pp.js.map} +2 -2
  23. package/dist/shared/chunk-gcch857j.js +5 -0
  24. package/dist/shared/chunk-gcch857j.js.map +11 -0
  25. package/dist/shared/chunk-h5mdrgqp.js +5 -0
  26. package/dist/shared/chunk-h5mdrgqp.js.map +21 -0
  27. package/dist/shared/chunk-mwb9mvew.js +42 -0
  28. package/dist/shared/chunk-mwb9mvew.js.map +10 -0
  29. package/dist/shared/chunk-n5dqa3qy.js +36 -0
  30. package/dist/shared/chunk-n5dqa3qy.js.map +10 -0
  31. package/dist/shared/chunk-qqvx08b4.js +5 -0
  32. package/dist/shared/{chunk-2e7zbxcq.js.map → chunk-qqvx08b4.js.map} +2 -2
  33. package/dist/shared/chunk-r7q1mkar.js +82 -0
  34. package/dist/shared/chunk-r7q1mkar.js.map +10 -0
  35. package/dist/shared/chunk-s1yxjjz5.js +5 -0
  36. package/dist/shared/chunk-s1yxjjz5.js.map +21 -0
  37. package/dist/shared/chunk-sm3brprk.js +51 -0
  38. package/dist/shared/chunk-sm3brprk.js.map +10 -0
  39. package/dist/shared/chunk-wp8mt34q.js +5 -0
  40. package/dist/shared/chunk-wp8mt34q.js.map +12 -0
  41. package/dist/shared/chunk-x9h6vngs.js +5 -0
  42. package/dist/shared/chunk-x9h6vngs.js.map +9 -0
  43. package/dist/shared/chunk-xyq6sfz0.js +5 -0
  44. package/dist/shared/{chunk-zmzz7hqq.js.map → chunk-xyq6sfz0.js.map} +2 -2
  45. package/dist/shared/chunk-yq9g4gac.js +5 -0
  46. package/dist/shared/{chunk-wawk30n1.js.map → chunk-yq9g4gac.js.map} +9 -4
  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
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["src/repositories/gamification/LevelRepository.ts"],
4
4
  "sourcesContent": [
5
- "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabaseAdapter } from \"@ooneex/database\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { LevelEntity } from \"../../entities/gamification/LevelEntity\";\n\nexport class LevelRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabaseAdapter,\n ) {}\n\n public async open(): Promise<Repository<LevelEntity>> {\n return await this.database.open(LevelEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<LevelEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<LevelEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply level name search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n name: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including name search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n name: ILike(`%${q}%`),\n };\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<LevelEntity>): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async findByCode(code: string): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { code },\n });\n }\n\n public async create(entity: LevelEntity, options?: SaveOptions): Promise<LevelEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: LevelEntity[], options?: SaveOptions): Promise<LevelEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: LevelEntity, options?: SaveOptions): Promise<LevelEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: LevelEntity[], options?: SaveOptions): Promise<LevelEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<LevelEntity> | FindOptionsWhere<LevelEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(criteria?: FindOptionsWhere<LevelEntity> | FindOptionsWhere<LevelEntity>[]): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
5
+ "import { inject } from \"@ooneex/container\";\nimport type { ITypeormDatabase } from \"@ooneex/database\";\nimport { decorator } from \"@ooneex/repository\";\nimport type { FilterResultType } from \"@ooneex/types\";\nimport type { FindManyOptions, FindOptionsWhere, Repository, SaveOptions, UpdateResult } from \"typeorm\";\nimport { ILike } from \"typeorm\";\nimport { LevelEntity } from \"../../entities/gamification/LevelEntity\";\n\n@decorator.repository()\nexport class LevelRepository {\n constructor(\n @inject(\"database\")\n private readonly database: ITypeormDatabase,\n ) {}\n\n public async open(): Promise<Repository<LevelEntity>> {\n return await this.database.open(LevelEntity);\n }\n\n public async close(): Promise<void> {\n await this.database.close();\n }\n\n public async find(\n criteria: FindManyOptions<LevelEntity> & { page?: number; limit?: number; q?: string },\n ): Promise<FilterResultType<LevelEntity>> {\n const repository = await this.open();\n\n const { page = 1, limit = 100, q, ...rest } = criteria;\n\n let skip: number | undefined;\n const take = limit === 0 ? 100 : limit;\n\n if (page && page > 0 && limit && limit > 0) {\n skip = (page - 1) * take;\n }\n\n // Apply level name search if q parameter is provided\n let findOptions = { ...rest, take, ...(skip !== undefined && { skip }) };\n if (q) {\n findOptions = {\n ...findOptions,\n where: {\n ...rest.where,\n name: ILike(`%${q}%`),\n },\n };\n }\n\n const result = await repository.find(findOptions);\n\n // Apply the same where conditions for count including name search\n let countWhere = rest.where;\n if (q) {\n countWhere = {\n ...rest.where,\n name: ILike(`%${q}%`),\n };\n }\n\n const total = await this.count(countWhere);\n const totalPages = Math.ceil(total / limit);\n\n return {\n resources: result,\n total,\n totalPages,\n page,\n limit,\n };\n }\n\n public async findOne(id: string): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { id },\n });\n }\n\n public async findOneBy(criteria: FindOptionsWhere<LevelEntity>): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: criteria,\n });\n }\n\n public async findByCode(code: string): Promise<LevelEntity | null> {\n const repository = await this.open();\n\n return await repository.findOne({\n where: { code },\n });\n }\n\n public async create(entity: LevelEntity, options?: SaveOptions): Promise<LevelEntity> {\n const repository = await this.open();\n\n return await repository.save(entity, options);\n }\n\n public async createMany(entities: LevelEntity[], options?: SaveOptions): Promise<LevelEntity[]> {\n const repository = await this.open();\n\n return await repository.save(entities, options);\n }\n\n public async update(entity: LevelEntity, options?: SaveOptions): Promise<LevelEntity> {\n return await this.create(entity, options);\n }\n\n public async updateMany(entities: LevelEntity[], options?: SaveOptions): Promise<LevelEntity[]> {\n return await this.createMany(entities, options);\n }\n\n public async delete(\n criteria: FindOptionsWhere<LevelEntity> | FindOptionsWhere<LevelEntity>[],\n ): Promise<UpdateResult> {\n const repository = await this.open();\n\n return await repository.softDelete(criteria);\n }\n\n public async count(criteria?: FindOptionsWhere<LevelEntity> | FindOptionsWhere<LevelEntity>[]): Promise<number> {\n const repository = await this.open();\n\n return await repository.count(criteria ? { where: criteria } : {});\n }\n}\n"
6
6
  ],
7
- "mappings": ";qaAAA,MAAS,kCAIT,wBAAS,wBAGF,cAAM,SAAgB,SAGR,iBAFnB,WAAW,CAEQ,EACjB,CADiB,qBAGN,KAAI,EAAqC,CACpD,OAAO,MAAM,KAAK,SAAS,KAAK,CAAW,OAGhC,MAAK,EAAkB,CAClC,MAAM,KAAK,SAAS,MAAM,OAGf,KAAI,CACf,EACwC,CACxC,IAAM,EAAa,MAAM,KAAK,KAAK,GAE3B,OAAO,EAAG,QAAQ,IAAK,OAAM,GAAS,EAE1C,EACE,EAAO,IAAU,EAAI,IAAM,EAEjC,GAAI,GAAQ,EAAO,GAAK,GAAS,EAAQ,EACvC,GAAQ,EAAO,GAAK,EAItB,IAAI,EAAc,IAAK,EAAM,UAAU,IAAS,QAAa,CAAE,MAAK,CAAG,EACvE,GAAI,EACF,EAAc,IACT,EACH,MAAO,IACF,EAAK,MACR,KAAM,EAAM,IAAI,IAAI,CACtB,CACF,EAGF,IAAM,EAAS,MAAM,EAAW,KAAK,CAAW,EAG5C,EAAa,EAAK,MACtB,GAAI,EACF,EAAa,IACR,EAAK,MACR,KAAM,EAAM,IAAI,IAAI,CACtB,EAGF,IAAM,EAAQ,MAAM,KAAK,MAAM,CAAU,EACnC,EAAa,KAAK,KAAK,EAAQ,CAAK,EAE1C,MAAO,CACL,UAAW,EACX,QACA,aACA,OACA,OACF,OAGW,QAAO,CAAC,EAAyC,CAG5D,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CAAE,IAAG,CACd,CAAC,OAGU,UAAS,CAAC,EAAsE,CAG3F,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CACT,CAAC,OAGU,WAAU,CAAC,EAA2C,CAGjE,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CAAE,MAAK,CAChB,CAAC,OAGU,OAAM,CAAC,EAAqB,EAA6C,CAGpF,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,KAAK,EAAQ,CAAO,OAGjC,WAAU,CAAC,EAAyB,EAA+C,CAG9F,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,KAAK,EAAU,CAAO,OAGnC,OAAM,CAAC,EAAqB,EAA6C,CACpF,OAAO,MAAM,KAAK,OAAO,EAAQ,CAAO,OAG7B,WAAU,CAAC,EAAyB,EAA+C,CAC9F,OAAO,MAAM,KAAK,WAAW,EAAU,CAAO,OAGnC,OAAM,CACjB,EACuB,CAGvB,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,WAAW,CAAQ,OAGhC,MAAK,CAAC,EAA6F,CAG9G,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,MAAM,EAAW,CAAE,MAAO,CAAS,EAAI,CAAC,CAAC,EAErE,CAxHa,EAAN,GAEF,MAAO,UAAU,GAFf,sGAAM",
8
- "debugId": "22C9B241C8D4094864756E2164756E21",
7
+ "mappings": ";0iBAAA,MAAS,kCAET,4BAAS,mCAGT,wBAAS,wBAIF,cAAM,SAAgB,SAGR,iBAFnB,WAAW,CAEQ,EACjB,CADiB,qBAGN,KAAI,EAAqC,CACpD,OAAO,MAAM,KAAK,SAAS,KAAK,CAAW,OAGhC,MAAK,EAAkB,CAClC,MAAM,KAAK,SAAS,MAAM,OAGf,KAAI,CACf,EACwC,CACxC,IAAM,EAAa,MAAM,KAAK,KAAK,GAE3B,OAAO,EAAG,QAAQ,IAAK,OAAM,GAAS,EAE1C,EACE,EAAO,IAAU,EAAI,IAAM,EAEjC,GAAI,GAAQ,EAAO,GAAK,GAAS,EAAQ,EACvC,GAAQ,EAAO,GAAK,EAItB,IAAI,EAAc,IAAK,EAAM,UAAU,IAAS,QAAa,CAAE,MAAK,CAAG,EACvE,GAAI,EACF,EAAc,IACT,EACH,MAAO,IACF,EAAK,MACR,KAAM,EAAM,IAAI,IAAI,CACtB,CACF,EAGF,IAAM,EAAS,MAAM,EAAW,KAAK,CAAW,EAG5C,EAAa,EAAK,MACtB,GAAI,EACF,EAAa,IACR,EAAK,MACR,KAAM,EAAM,IAAI,IAAI,CACtB,EAGF,IAAM,EAAQ,MAAM,KAAK,MAAM,CAAU,EACnC,EAAa,KAAK,KAAK,EAAQ,CAAK,EAE1C,MAAO,CACL,UAAW,EACX,QACA,aACA,OACA,OACF,OAGW,QAAO,CAAC,EAAyC,CAG5D,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CAAE,IAAG,CACd,CAAC,OAGU,UAAS,CAAC,EAAsE,CAG3F,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CACT,CAAC,OAGU,WAAU,CAAC,EAA2C,CAGjE,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,QAAQ,CAC9B,MAAO,CAAE,MAAK,CAChB,CAAC,OAGU,OAAM,CAAC,EAAqB,EAA6C,CAGpF,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,KAAK,EAAQ,CAAO,OAGjC,WAAU,CAAC,EAAyB,EAA+C,CAG9F,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,KAAK,EAAU,CAAO,OAGnC,OAAM,CAAC,EAAqB,EAA6C,CACpF,OAAO,MAAM,KAAK,OAAO,EAAQ,CAAO,OAG7B,WAAU,CAAC,EAAyB,EAA+C,CAC9F,OAAO,MAAM,KAAK,WAAW,EAAU,CAAO,OAGnC,OAAM,CACjB,EACuB,CAGvB,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,WAAW,CAAQ,OAGhC,MAAK,CAAC,EAA6F,CAG9G,OAAO,MAFY,MAAM,KAAK,KAAK,GAEX,MAAM,EAAW,CAAE,MAAO,CAAS,EAAI,CAAC,CAAC,EAErE,CAxHa,EAAN,GADN,EAAU,WAAW,EAGjB,MAAO,UAAU,GAFf,wFAAM",
8
+ "debugId": "6517AE5B63760E9964756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1,4 +1,4 @@
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
4
  import { IMcqQuestion, IMcqQuestionChoice } from "@ooneex/gamification/mcq";
@@ -27,7 +27,7 @@ declare class McqQuestionChoiceEntity extends BaseEntity implements IMcqQuestion
27
27
  }
28
28
  declare class McqQuestionChoiceRepository {
29
29
  private readonly database;
30
- constructor(database: ITypeormDatabaseAdapter);
30
+ constructor(database: ITypeormDatabase);
31
31
  open(): Promise<Repository<McqQuestionChoiceEntity>>;
32
32
  close(): Promise<void>;
33
33
  find(criteria: FindManyOptions<McqQuestionChoiceEntity> & {
@@ -45,52 +45,297 @@ declare class McqQuestionChoiceRepository {
45
45
  delete(criteria: FindOptionsWhere<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[]): Promise<UpdateResult>;
46
46
  count(criteria?: FindOptionsWhere<McqQuestionChoiceEntity> | FindOptionsWhere<McqQuestionChoiceEntity>[]): Promise<number>;
47
47
  }
48
- import { ITypeormDatabaseAdapter as ITypeormDatabaseAdapter2 } from "@ooneex/database";
48
+ import { ITypeormDatabase as ITypeormDatabase2 } from "@ooneex/database";
49
49
  import { FilterResultType as FilterResultType2 } from "@ooneex/types";
50
50
  import { FindManyOptions as FindManyOptions2, FindOptionsWhere as FindOptionsWhere2, Repository as Repository2, SaveOptions as SaveOptions2, UpdateResult as UpdateResult2 } from "typeorm";
51
- import { IMcqQuestion as IMcqQuestion2, IMcqQuestionChoice as IMcqQuestionChoice2 } from "@ooneex/gamification/mcq";
52
- import { IImage } from "@ooneex/image";
51
+ import { IMcqQuestion as IMcqQuestion2, IMcqQuestionComment } from "@ooneex/gamification/mcq";
52
+ declare class McqQuestionCommentEntity extends BaseEntity implements IMcqQuestionComment {
53
+ question?: IMcqQuestion2;
54
+ questionId?: string;
55
+ comment: string;
56
+ commentedBy?: string;
57
+ commentedById?: string;
58
+ parentCommentId?: string;
59
+ }
60
+ declare class McqQuestionCommentRepository {
61
+ private readonly database;
62
+ constructor(database: ITypeormDatabase2);
63
+ open(): Promise<Repository2<McqQuestionCommentEntity>>;
64
+ close(): Promise<void>;
65
+ find(criteria: FindManyOptions2<McqQuestionCommentEntity> & {
66
+ page?: number;
67
+ limit?: number;
68
+ q?: string;
69
+ }): Promise<FilterResultType2<McqQuestionCommentEntity>>;
70
+ findOne(id: string): Promise<McqQuestionCommentEntity | null>;
71
+ findOneBy(criteria: FindOptionsWhere2<McqQuestionCommentEntity>): Promise<McqQuestionCommentEntity | null>;
72
+ create(entity: McqQuestionCommentEntity, options?: SaveOptions2): Promise<McqQuestionCommentEntity>;
73
+ createMany(entities: McqQuestionCommentEntity[], options?: SaveOptions2): Promise<McqQuestionCommentEntity[]>;
74
+ update(entity: McqQuestionCommentEntity, options?: SaveOptions2): Promise<McqQuestionCommentEntity>;
75
+ updateMany(entities: McqQuestionCommentEntity[], options?: SaveOptions2): Promise<McqQuestionCommentEntity[]>;
76
+ delete(criteria: FindOptionsWhere2<McqQuestionCommentEntity> | FindOptionsWhere2<McqQuestionCommentEntity>[]): Promise<UpdateResult2>;
77
+ count(criteria?: FindOptionsWhere2<McqQuestionCommentEntity> | FindOptionsWhere2<McqQuestionCommentEntity>[]): Promise<number>;
78
+ }
79
+ import { ITypeormDatabase as ITypeormDatabase3 } from "@ooneex/database";
80
+ import { FilterResultType as FilterResultType3 } from "@ooneex/types";
81
+ import { FindManyOptions as FindManyOptions3, FindOptionsWhere as FindOptionsWhere3, Repository as Repository3, SaveOptions as SaveOptions3, UpdateResult as UpdateResult3 } from "typeorm";
82
+ import { IMcqQuestion as IMcqQuestion3, IMcqQuestionDisliked } from "@ooneex/gamification/mcq";
83
+ declare class McqQuestionDislikedEntity extends BaseEntity implements IMcqQuestionDisliked {
84
+ question?: IMcqQuestion3;
85
+ questionId?: string;
86
+ dislikedBy?: string;
87
+ dislikedById?: string;
88
+ }
89
+ declare class McqQuestionDislikedRepository {
90
+ private readonly database;
91
+ constructor(database: ITypeormDatabase3);
92
+ open(): Promise<Repository3<McqQuestionDislikedEntity>>;
93
+ close(): Promise<void>;
94
+ find(criteria: FindManyOptions3<McqQuestionDislikedEntity> & {
95
+ page?: number;
96
+ limit?: number;
97
+ q?: string;
98
+ }): Promise<FilterResultType3<McqQuestionDislikedEntity>>;
99
+ findOne(id: string): Promise<McqQuestionDislikedEntity | null>;
100
+ findOneBy(criteria: FindOptionsWhere3<McqQuestionDislikedEntity>): Promise<McqQuestionDislikedEntity | null>;
101
+ create(entity: McqQuestionDislikedEntity, options?: SaveOptions3): Promise<McqQuestionDislikedEntity>;
102
+ createMany(entities: McqQuestionDislikedEntity[], options?: SaveOptions3): Promise<McqQuestionDislikedEntity[]>;
103
+ update(entity: McqQuestionDislikedEntity, options?: SaveOptions3): Promise<McqQuestionDislikedEntity>;
104
+ updateMany(entities: McqQuestionDislikedEntity[], options?: SaveOptions3): Promise<McqQuestionDislikedEntity[]>;
105
+ delete(criteria: FindOptionsWhere3<McqQuestionDislikedEntity> | FindOptionsWhere3<McqQuestionDislikedEntity>[]): Promise<UpdateResult3>;
106
+ count(criteria?: FindOptionsWhere3<McqQuestionDislikedEntity> | FindOptionsWhere3<McqQuestionDislikedEntity>[]): Promise<number>;
107
+ }
108
+ import { ITypeormDatabase as ITypeormDatabase4 } from "@ooneex/database";
109
+ import { FilterResultType as FilterResultType4 } from "@ooneex/types";
110
+ import { FindManyOptions as FindManyOptions4, FindOptionsWhere as FindOptionsWhere4, Repository as Repository4, SaveOptions as SaveOptions4, UpdateResult as UpdateResult4 } from "typeorm";
111
+ import { IMcqQuestion as IMcqQuestion4, IMcqQuestionLiked } from "@ooneex/gamification/mcq";
112
+ declare class McqQuestionLikedEntity extends BaseEntity implements IMcqQuestionLiked {
113
+ question?: IMcqQuestion4;
114
+ questionId?: string;
115
+ likedBy?: string;
116
+ likedById?: string;
117
+ }
118
+ declare class McqQuestionLikedRepository {
119
+ private readonly database;
120
+ constructor(database: ITypeormDatabase4);
121
+ open(): Promise<Repository4<McqQuestionLikedEntity>>;
122
+ close(): Promise<void>;
123
+ find(criteria: FindManyOptions4<McqQuestionLikedEntity> & {
124
+ page?: number;
125
+ limit?: number;
126
+ q?: string;
127
+ }): Promise<FilterResultType4<McqQuestionLikedEntity>>;
128
+ findOne(id: string): Promise<McqQuestionLikedEntity | null>;
129
+ findOneBy(criteria: FindOptionsWhere4<McqQuestionLikedEntity>): Promise<McqQuestionLikedEntity | null>;
130
+ create(entity: McqQuestionLikedEntity, options?: SaveOptions4): Promise<McqQuestionLikedEntity>;
131
+ createMany(entities: McqQuestionLikedEntity[], options?: SaveOptions4): Promise<McqQuestionLikedEntity[]>;
132
+ update(entity: McqQuestionLikedEntity, options?: SaveOptions4): Promise<McqQuestionLikedEntity>;
133
+ updateMany(entities: McqQuestionLikedEntity[], options?: SaveOptions4): Promise<McqQuestionLikedEntity[]>;
134
+ delete(criteria: FindOptionsWhere4<McqQuestionLikedEntity> | FindOptionsWhere4<McqQuestionLikedEntity>[]): Promise<UpdateResult4>;
135
+ count(criteria?: FindOptionsWhere4<McqQuestionLikedEntity> | FindOptionsWhere4<McqQuestionLikedEntity>[]): Promise<number>;
136
+ }
137
+ import { ITypeormDatabase as ITypeormDatabase5 } from "@ooneex/database";
138
+ import { FilterResultType as FilterResultType5 } from "@ooneex/types";
139
+ import { FindManyOptions as FindManyOptions5, FindOptionsWhere as FindOptionsWhere5, Repository as Repository5, SaveOptions as SaveOptions5, UpdateResult as UpdateResult5 } from "typeorm";
140
+ import { IMcqQuestion as IMcqQuestion5, IMcqQuestionReport } from "@ooneex/gamification/mcq";
53
141
  import { IStatus } from "@ooneex/status";
142
+ declare class McqQuestionReportEntity extends BaseEntity implements IMcqQuestionReport {
143
+ question?: IMcqQuestion5;
144
+ questionId?: string;
145
+ reason: string;
146
+ description?: string;
147
+ reportedBy?: string;
148
+ reportedById?: string;
149
+ status?: IStatus;
150
+ }
151
+ declare class McqQuestionReportRepository {
152
+ private readonly database;
153
+ constructor(database: ITypeormDatabase5);
154
+ open(): Promise<Repository5<McqQuestionReportEntity>>;
155
+ close(): Promise<void>;
156
+ find(criteria: FindManyOptions5<McqQuestionReportEntity> & {
157
+ page?: number;
158
+ limit?: number;
159
+ q?: string;
160
+ }): Promise<FilterResultType5<McqQuestionReportEntity>>;
161
+ findOne(id: string): Promise<McqQuestionReportEntity | null>;
162
+ findOneBy(criteria: FindOptionsWhere5<McqQuestionReportEntity>): Promise<McqQuestionReportEntity | null>;
163
+ create(entity: McqQuestionReportEntity, options?: SaveOptions5): Promise<McqQuestionReportEntity>;
164
+ createMany(entities: McqQuestionReportEntity[], options?: SaveOptions5): Promise<McqQuestionReportEntity[]>;
165
+ update(entity: McqQuestionReportEntity, options?: SaveOptions5): Promise<McqQuestionReportEntity>;
166
+ updateMany(entities: McqQuestionReportEntity[], options?: SaveOptions5): Promise<McqQuestionReportEntity[]>;
167
+ delete(criteria: FindOptionsWhere5<McqQuestionReportEntity> | FindOptionsWhere5<McqQuestionReportEntity>[]): Promise<UpdateResult5>;
168
+ count(criteria?: FindOptionsWhere5<McqQuestionReportEntity> | FindOptionsWhere5<McqQuestionReportEntity>[]): Promise<number>;
169
+ }
170
+ import { ITypeormDatabase as ITypeormDatabase6 } from "@ooneex/database";
171
+ import { FilterResultType as FilterResultType6 } from "@ooneex/types";
172
+ import { FindManyOptions as FindManyOptions6, FindOptionsWhere as FindOptionsWhere6, Repository as Repository6, SaveOptions as SaveOptions6, UpdateResult as UpdateResult6 } from "typeorm";
173
+ import { IMcqQuestion as IMcqQuestion6, IMcqQuestionChoice as IMcqQuestionChoice2 } from "@ooneex/gamification/mcq";
174
+ import { IImage } from "@ooneex/image";
175
+ import { IStatus as IStatus2 } from "@ooneex/status";
54
176
  import { ITag } from "@ooneex/tag";
55
177
  import { IStat } from "@ooneex/types";
56
- declare class McqQuestionEntity extends BaseEntity implements IMcqQuestion2 {
178
+ declare class McqQuestionEntity extends BaseEntity implements IMcqQuestion6 {
57
179
  questionNumber: number;
58
180
  text: string;
59
181
  choices: IMcqQuestionChoice2[];
60
182
  context?: string;
61
183
  contextId?: string;
62
184
  stat?: IStat;
63
- status?: IStatus;
185
+ status?: IStatus2;
64
186
  image?: IImage;
65
187
  tags?: ITag[];
66
188
  }
67
189
  declare class McqQuestionRepository {
68
190
  private readonly database;
69
- constructor(database: ITypeormDatabaseAdapter2);
70
- open(): Promise<Repository2<McqQuestionEntity>>;
191
+ constructor(database: ITypeormDatabase6);
192
+ open(): Promise<Repository6<McqQuestionEntity>>;
71
193
  close(): Promise<void>;
72
- find(criteria: FindManyOptions2<McqQuestionEntity> & {
194
+ find(criteria: FindManyOptions6<McqQuestionEntity> & {
73
195
  page?: number;
74
196
  limit?: number;
75
197
  q?: string;
76
- }): Promise<FilterResultType2<McqQuestionEntity>>;
198
+ }): Promise<FilterResultType6<McqQuestionEntity>>;
77
199
  findOne(id: string): Promise<McqQuestionEntity | null>;
78
- findOneBy(criteria: FindOptionsWhere2<McqQuestionEntity>): Promise<McqQuestionEntity | null>;
79
- create(entity: McqQuestionEntity, options?: SaveOptions2): Promise<McqQuestionEntity>;
80
- createMany(entities: McqQuestionEntity[], options?: SaveOptions2): Promise<McqQuestionEntity[]>;
81
- update(entity: McqQuestionEntity, options?: SaveOptions2): Promise<McqQuestionEntity>;
82
- updateMany(entities: McqQuestionEntity[], options?: SaveOptions2): Promise<McqQuestionEntity[]>;
83
- delete(criteria: FindOptionsWhere2<McqQuestionEntity> | FindOptionsWhere2<McqQuestionEntity>[]): Promise<UpdateResult2>;
84
- count(criteria?: FindOptionsWhere2<McqQuestionEntity> | FindOptionsWhere2<McqQuestionEntity>[]): Promise<number>;
85
- }
86
- import { ITypeormDatabaseAdapter as ITypeormDatabaseAdapter3 } from "@ooneex/database";
87
- import { FilterResultType as FilterResultType3 } from "@ooneex/types";
88
- import { FindManyOptions as FindManyOptions3, FindOptionsWhere as FindOptionsWhere3, Repository as Repository3, SaveOptions as SaveOptions3, UpdateResult as UpdateResult3 } from "typeorm";
200
+ findOneBy(criteria: FindOptionsWhere6<McqQuestionEntity>): Promise<McqQuestionEntity | null>;
201
+ create(entity: McqQuestionEntity, options?: SaveOptions6): Promise<McqQuestionEntity>;
202
+ createMany(entities: McqQuestionEntity[], options?: SaveOptions6): Promise<McqQuestionEntity[]>;
203
+ update(entity: McqQuestionEntity, options?: SaveOptions6): Promise<McqQuestionEntity>;
204
+ updateMany(entities: McqQuestionEntity[], options?: SaveOptions6): Promise<McqQuestionEntity[]>;
205
+ delete(criteria: FindOptionsWhere6<McqQuestionEntity> | FindOptionsWhere6<McqQuestionEntity>[]): Promise<UpdateResult6>;
206
+ count(criteria?: FindOptionsWhere6<McqQuestionEntity> | FindOptionsWhere6<McqQuestionEntity>[]): Promise<number>;
207
+ }
208
+ import { ITypeormDatabase as ITypeormDatabase7 } from "@ooneex/database";
209
+ import { FilterResultType as FilterResultType7 } from "@ooneex/types";
210
+ import { FindManyOptions as FindManyOptions7, FindOptionsWhere as FindOptionsWhere7, Repository as Repository7, SaveOptions as SaveOptions7, UpdateResult as UpdateResult7 } from "typeorm";
211
+ import { IMcqQuestion as IMcqQuestion7, IMcqQuestionSaved } from "@ooneex/gamification/mcq";
212
+ declare class McqQuestionSavedEntity extends BaseEntity implements IMcqQuestionSaved {
213
+ question?: IMcqQuestion7;
214
+ questionId?: string;
215
+ savedBy?: string;
216
+ savedById?: string;
217
+ }
218
+ declare class McqQuestionSavedRepository {
219
+ private readonly database;
220
+ constructor(database: ITypeormDatabase7);
221
+ open(): Promise<Repository7<McqQuestionSavedEntity>>;
222
+ close(): Promise<void>;
223
+ find(criteria: FindManyOptions7<McqQuestionSavedEntity> & {
224
+ page?: number;
225
+ limit?: number;
226
+ q?: string;
227
+ }): Promise<FilterResultType7<McqQuestionSavedEntity>>;
228
+ findOne(id: string): Promise<McqQuestionSavedEntity | null>;
229
+ findOneBy(criteria: FindOptionsWhere7<McqQuestionSavedEntity>): Promise<McqQuestionSavedEntity | null>;
230
+ create(entity: McqQuestionSavedEntity, options?: SaveOptions7): Promise<McqQuestionSavedEntity>;
231
+ createMany(entities: McqQuestionSavedEntity[], options?: SaveOptions7): Promise<McqQuestionSavedEntity[]>;
232
+ update(entity: McqQuestionSavedEntity, options?: SaveOptions7): Promise<McqQuestionSavedEntity>;
233
+ updateMany(entities: McqQuestionSavedEntity[], options?: SaveOptions7): Promise<McqQuestionSavedEntity[]>;
234
+ delete(criteria: FindOptionsWhere7<McqQuestionSavedEntity> | FindOptionsWhere7<McqQuestionSavedEntity>[]): Promise<UpdateResult7>;
235
+ count(criteria?: FindOptionsWhere7<McqQuestionSavedEntity> | FindOptionsWhere7<McqQuestionSavedEntity>[]): Promise<number>;
236
+ }
237
+ import { ITypeormDatabase as ITypeormDatabase8 } from "@ooneex/database";
238
+ import { FilterResultType as FilterResultType8 } from "@ooneex/types";
239
+ import { FindManyOptions as FindManyOptions8, FindOptionsWhere as FindOptionsWhere8, Repository as Repository8, SaveOptions as SaveOptions8, UpdateResult as UpdateResult8 } from "typeorm";
240
+ import { IMcqQuestion as IMcqQuestion8, IMcqQuestionShared } from "@ooneex/gamification/mcq";
241
+ declare class McqQuestionSharedEntity extends BaseEntity implements IMcqQuestionShared {
242
+ question?: IMcqQuestion8;
243
+ questionId?: string;
244
+ sharedWith?: string;
245
+ sharedById?: string;
246
+ permission?: string;
247
+ expiresAt?: string;
248
+ }
249
+ declare class McqQuestionSharedRepository {
250
+ private readonly database;
251
+ constructor(database: ITypeormDatabase8);
252
+ open(): Promise<Repository8<McqQuestionSharedEntity>>;
253
+ close(): Promise<void>;
254
+ find(criteria: FindManyOptions8<McqQuestionSharedEntity> & {
255
+ page?: number;
256
+ limit?: number;
257
+ q?: string;
258
+ }): Promise<FilterResultType8<McqQuestionSharedEntity>>;
259
+ findOne(id: string): Promise<McqQuestionSharedEntity | null>;
260
+ findOneBy(criteria: FindOptionsWhere8<McqQuestionSharedEntity>): Promise<McqQuestionSharedEntity | null>;
261
+ create(entity: McqQuestionSharedEntity, options?: SaveOptions8): Promise<McqQuestionSharedEntity>;
262
+ createMany(entities: McqQuestionSharedEntity[], options?: SaveOptions8): Promise<McqQuestionSharedEntity[]>;
263
+ update(entity: McqQuestionSharedEntity, options?: SaveOptions8): Promise<McqQuestionSharedEntity>;
264
+ updateMany(entities: McqQuestionSharedEntity[], options?: SaveOptions8): Promise<McqQuestionSharedEntity[]>;
265
+ delete(criteria: FindOptionsWhere8<McqQuestionSharedEntity> | FindOptionsWhere8<McqQuestionSharedEntity>[]): Promise<UpdateResult8>;
266
+ count(criteria?: FindOptionsWhere8<McqQuestionSharedEntity> | FindOptionsWhere8<McqQuestionSharedEntity>[]): Promise<number>;
267
+ }
268
+ import { ITypeormDatabase as ITypeormDatabase9 } from "@ooneex/database";
269
+ import { FilterResultType as FilterResultType9 } from "@ooneex/types";
270
+ import { FindManyOptions as FindManyOptions9, FindOptionsWhere as FindOptionsWhere9, Repository as Repository9, SaveOptions as SaveOptions9, UpdateResult as UpdateResult9 } from "typeorm";
271
+ import { IMcqQuestion as IMcqQuestion9, IMcqQuestionStat } from "@ooneex/gamification/mcq";
272
+ declare class McqQuestionStatEntity extends BaseEntity implements IMcqQuestionStat {
273
+ question?: IMcqQuestion9;
274
+ questionId?: string;
275
+ likesCount?: number;
276
+ dislikesCount?: number;
277
+ commentsCount?: number;
278
+ sharesCount?: number;
279
+ savesCount?: number;
280
+ viewsCount?: number;
281
+ reportsCount?: number;
282
+ }
283
+ declare class McqQuestionStatRepository {
284
+ private readonly database;
285
+ constructor(database: ITypeormDatabase9);
286
+ open(): Promise<Repository9<McqQuestionStatEntity>>;
287
+ close(): Promise<void>;
288
+ find(criteria: FindManyOptions9<McqQuestionStatEntity> & {
289
+ page?: number;
290
+ limit?: number;
291
+ q?: string;
292
+ }): Promise<FilterResultType9<McqQuestionStatEntity>>;
293
+ findOne(id: string): Promise<McqQuestionStatEntity | null>;
294
+ findOneBy(criteria: FindOptionsWhere9<McqQuestionStatEntity>): Promise<McqQuestionStatEntity | null>;
295
+ create(entity: McqQuestionStatEntity, options?: SaveOptions9): Promise<McqQuestionStatEntity>;
296
+ createMany(entities: McqQuestionStatEntity[], options?: SaveOptions9): Promise<McqQuestionStatEntity[]>;
297
+ update(entity: McqQuestionStatEntity, options?: SaveOptions9): Promise<McqQuestionStatEntity>;
298
+ updateMany(entities: McqQuestionStatEntity[], options?: SaveOptions9): Promise<McqQuestionStatEntity[]>;
299
+ delete(criteria: FindOptionsWhere9<McqQuestionStatEntity> | FindOptionsWhere9<McqQuestionStatEntity>[]): Promise<UpdateResult9>;
300
+ count(criteria?: FindOptionsWhere9<McqQuestionStatEntity> | FindOptionsWhere9<McqQuestionStatEntity>[]): Promise<number>;
301
+ }
302
+ import { ITypeormDatabase as ITypeormDatabase10 } from "@ooneex/database";
303
+ import { FilterResultType as FilterResultType10 } from "@ooneex/types";
304
+ import { FindManyOptions as FindManyOptions10, FindOptionsWhere as FindOptionsWhere10, Repository as Repository10, SaveOptions as SaveOptions10, UpdateResult as UpdateResult10 } from "typeorm";
305
+ import { IMcqQuestion as IMcqQuestion10, IMcqQuestionViewed } from "@ooneex/gamification/mcq";
306
+ declare class McqQuestionViewedEntity extends BaseEntity implements IMcqQuestionViewed {
307
+ question?: IMcqQuestion10;
308
+ questionId?: string;
309
+ viewedBy?: string;
310
+ viewedById?: string;
311
+ }
312
+ declare class McqQuestionViewedRepository {
313
+ private readonly database;
314
+ constructor(database: ITypeormDatabase10);
315
+ open(): Promise<Repository10<McqQuestionViewedEntity>>;
316
+ close(): Promise<void>;
317
+ find(criteria: FindManyOptions10<McqQuestionViewedEntity> & {
318
+ page?: number;
319
+ limit?: number;
320
+ q?: string;
321
+ }): Promise<FilterResultType10<McqQuestionViewedEntity>>;
322
+ findOne(id: string): Promise<McqQuestionViewedEntity | null>;
323
+ findOneBy(criteria: FindOptionsWhere10<McqQuestionViewedEntity>): Promise<McqQuestionViewedEntity | null>;
324
+ create(entity: McqQuestionViewedEntity, options?: SaveOptions10): Promise<McqQuestionViewedEntity>;
325
+ createMany(entities: McqQuestionViewedEntity[], options?: SaveOptions10): Promise<McqQuestionViewedEntity[]>;
326
+ update(entity: McqQuestionViewedEntity, options?: SaveOptions10): Promise<McqQuestionViewedEntity>;
327
+ updateMany(entities: McqQuestionViewedEntity[], options?: SaveOptions10): Promise<McqQuestionViewedEntity[]>;
328
+ delete(criteria: FindOptionsWhere10<McqQuestionViewedEntity> | FindOptionsWhere10<McqQuestionViewedEntity>[]): Promise<UpdateResult10>;
329
+ count(criteria?: FindOptionsWhere10<McqQuestionViewedEntity> | FindOptionsWhere10<McqQuestionViewedEntity>[]): Promise<number>;
330
+ }
331
+ import { ITypeormDatabase as ITypeormDatabase11 } from "@ooneex/database";
332
+ import { FilterResultType as FilterResultType11 } from "@ooneex/types";
333
+ import { FindManyOptions as FindManyOptions11, FindOptionsWhere as FindOptionsWhere11, Repository as Repository11, SaveOptions as SaveOptions11, UpdateResult as UpdateResult11 } from "typeorm";
89
334
  import { EAnswerState } from "@ooneex/gamification";
90
- import { IMcqQuestion as IMcqQuestion3, IMcqQuestionChoice as IMcqQuestionChoice3, IMcqSession, IMcqSessionQuestion } from "@ooneex/gamification/mcq";
335
+ import { IMcqQuestion as IMcqQuestion11, IMcqQuestionChoice as IMcqQuestionChoice3, IMcqSession, IMcqSessionQuestion } from "@ooneex/gamification/mcq";
91
336
  declare class McqSessionQuestionEntity extends BaseEntity implements IMcqSessionQuestion {
92
337
  session: IMcqSession;
93
- question: IMcqQuestion3;
338
+ question: IMcqQuestion11;
94
339
  questionNumber: number;
95
340
  selectedChoices: IMcqQuestionChoice3[];
96
341
  context?: string;
@@ -100,29 +345,29 @@ declare class McqSessionQuestionEntity extends BaseEntity implements IMcqSession
100
345
  }
101
346
  declare class McqSessionQuestionRepository {
102
347
  private readonly database;
103
- constructor(database: ITypeormDatabaseAdapter3);
104
- open(): Promise<Repository3<McqSessionQuestionEntity>>;
348
+ constructor(database: ITypeormDatabase11);
349
+ open(): Promise<Repository11<McqSessionQuestionEntity>>;
105
350
  close(): Promise<void>;
106
- find(criteria: FindManyOptions3<McqSessionQuestionEntity> & {
351
+ find(criteria: FindManyOptions11<McqSessionQuestionEntity> & {
107
352
  page?: number;
108
353
  limit?: number;
109
354
  q?: string;
110
- }): Promise<FilterResultType3<McqSessionQuestionEntity>>;
355
+ }): Promise<FilterResultType11<McqSessionQuestionEntity>>;
111
356
  findOne(id: string): Promise<McqSessionQuestionEntity | null>;
112
- findOneBy(criteria: FindOptionsWhere3<McqSessionQuestionEntity>): Promise<McqSessionQuestionEntity | null>;
113
- create(entity: McqSessionQuestionEntity, options?: SaveOptions3): Promise<McqSessionQuestionEntity>;
114
- createMany(entities: McqSessionQuestionEntity[], options?: SaveOptions3): Promise<McqSessionQuestionEntity[]>;
115
- update(entity: McqSessionQuestionEntity, options?: SaveOptions3): Promise<McqSessionQuestionEntity>;
116
- updateMany(entities: McqSessionQuestionEntity[], options?: SaveOptions3): Promise<McqSessionQuestionEntity[]>;
117
- delete(criteria: FindOptionsWhere3<McqSessionQuestionEntity> | FindOptionsWhere3<McqSessionQuestionEntity>[]): Promise<UpdateResult3>;
118
- count(criteria?: FindOptionsWhere3<McqSessionQuestionEntity> | FindOptionsWhere3<McqSessionQuestionEntity>[]): Promise<number>;
119
- }
120
- import { ITypeormDatabaseAdapter as ITypeormDatabaseAdapter4 } from "@ooneex/database";
121
- import { FilterResultType as FilterResultType4 } from "@ooneex/types";
122
- import { FindManyOptions as FindManyOptions4, FindOptionsWhere as FindOptionsWhere4, Repository as Repository4, SaveOptions as SaveOptions4, UpdateResult as UpdateResult4 } from "typeorm";
357
+ findOneBy(criteria: FindOptionsWhere11<McqSessionQuestionEntity>): Promise<McqSessionQuestionEntity | null>;
358
+ create(entity: McqSessionQuestionEntity, options?: SaveOptions11): Promise<McqSessionQuestionEntity>;
359
+ createMany(entities: McqSessionQuestionEntity[], options?: SaveOptions11): Promise<McqSessionQuestionEntity[]>;
360
+ update(entity: McqSessionQuestionEntity, options?: SaveOptions11): Promise<McqSessionQuestionEntity>;
361
+ updateMany(entities: McqSessionQuestionEntity[], options?: SaveOptions11): Promise<McqSessionQuestionEntity[]>;
362
+ delete(criteria: FindOptionsWhere11<McqSessionQuestionEntity> | FindOptionsWhere11<McqSessionQuestionEntity>[]): Promise<UpdateResult11>;
363
+ count(criteria?: FindOptionsWhere11<McqSessionQuestionEntity> | FindOptionsWhere11<McqSessionQuestionEntity>[]): Promise<number>;
364
+ }
365
+ import { ITypeormDatabase as ITypeormDatabase12 } from "@ooneex/database";
366
+ import { FilterResultType as FilterResultType12 } from "@ooneex/types";
367
+ import { FindManyOptions as FindManyOptions12, FindOptionsWhere as FindOptionsWhere12, Repository as Repository12, SaveOptions as SaveOptions12, UpdateResult as UpdateResult12 } from "typeorm";
123
368
  import { ILevel } from "@ooneex/gamification";
124
369
  import { ESessionType } from "@ooneex/gamification";
125
- import { IMcqQuestion as IMcqQuestion4, IMcqSession as IMcqSession2 } from "@ooneex/gamification/mcq";
370
+ import { IMcqQuestion as IMcqQuestion12, IMcqSession as IMcqSession2 } from "@ooneex/gamification/mcq";
126
371
  import { EMcqSessionStatus } from "@ooneex/gamification/mcq";
127
372
  declare class McqSessionEntity extends BaseEntity implements IMcqSession2 {
128
373
  name: string;
@@ -131,7 +376,7 @@ declare class McqSessionEntity extends BaseEntity implements IMcqSession2 {
131
376
  correctCount: number;
132
377
  incorrectCount: number;
133
378
  timing: number;
134
- questions: IMcqQuestion4[];
379
+ questions: IMcqQuestion12[];
135
380
  status: EMcqSessionStatus;
136
381
  score: number;
137
382
  startedAt?: Date | null;
@@ -143,21 +388,21 @@ declare class McqSessionEntity extends BaseEntity implements IMcqSession2 {
143
388
  }
144
389
  declare class McqSessionRepository {
145
390
  private readonly database;
146
- constructor(database: ITypeormDatabaseAdapter4);
147
- open(): Promise<Repository4<McqSessionEntity>>;
391
+ constructor(database: ITypeormDatabase12);
392
+ open(): Promise<Repository12<McqSessionEntity>>;
148
393
  close(): Promise<void>;
149
- find(criteria: FindManyOptions4<McqSessionEntity> & {
394
+ find(criteria: FindManyOptions12<McqSessionEntity> & {
150
395
  page?: number;
151
396
  limit?: number;
152
397
  q?: string;
153
- }): Promise<FilterResultType4<McqSessionEntity>>;
398
+ }): Promise<FilterResultType12<McqSessionEntity>>;
154
399
  findOne(id: string): Promise<McqSessionEntity | null>;
155
- findOneBy(criteria: FindOptionsWhere4<McqSessionEntity>): Promise<McqSessionEntity | null>;
156
- create(entity: McqSessionEntity, options?: SaveOptions4): Promise<McqSessionEntity>;
157
- createMany(entities: McqSessionEntity[], options?: SaveOptions4): Promise<McqSessionEntity[]>;
158
- update(entity: McqSessionEntity, options?: SaveOptions4): Promise<McqSessionEntity>;
159
- updateMany(entities: McqSessionEntity[], options?: SaveOptions4): Promise<McqSessionEntity[]>;
160
- delete(criteria: FindOptionsWhere4<McqSessionEntity> | FindOptionsWhere4<McqSessionEntity>[]): Promise<UpdateResult4>;
161
- count(criteria?: FindOptionsWhere4<McqSessionEntity> | FindOptionsWhere4<McqSessionEntity>[]): Promise<number>;
162
- }
163
- export { McqSessionRepository, McqSessionQuestionRepository, McqQuestionRepository, McqQuestionChoiceRepository };
400
+ findOneBy(criteria: FindOptionsWhere12<McqSessionEntity>): Promise<McqSessionEntity | null>;
401
+ create(entity: McqSessionEntity, options?: SaveOptions12): Promise<McqSessionEntity>;
402
+ createMany(entities: McqSessionEntity[], options?: SaveOptions12): Promise<McqSessionEntity[]>;
403
+ update(entity: McqSessionEntity, options?: SaveOptions12): Promise<McqSessionEntity>;
404
+ updateMany(entities: McqSessionEntity[], options?: SaveOptions12): Promise<McqSessionEntity[]>;
405
+ delete(criteria: FindOptionsWhere12<McqSessionEntity> | FindOptionsWhere12<McqSessionEntity>[]): Promise<UpdateResult12>;
406
+ count(criteria?: FindOptionsWhere12<McqSessionEntity> | FindOptionsWhere12<McqSessionEntity>[]): Promise<number>;
407
+ }
408
+ export { McqSessionRepository, McqSessionQuestionRepository, McqQuestionViewedRepository, McqQuestionStatRepository, McqQuestionSharedRepository, McqQuestionSavedRepository, McqQuestionRepository, McqQuestionReportRepository, McqQuestionLikedRepository, McqQuestionDislikedRepository, McqQuestionCommentRepository, McqQuestionChoiceRepository };
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{l as w,m as b,n as W,o as C}from"../../../../shared/chunk-kgxsdeye.js";import"../../../../shared/chunk-hw4vdg6q.js";import"../../../../shared/chunk-2e7zbxcq.js";import"../../../../shared/chunk-764bzjhz.js";import"../../../../shared/chunk-pwhygf44.js";import{V as N,W as T,X as U}from"../../../../shared/chunk-j7nprmyh.js";import{inject as E}from"@ooneex/container";class Y{database;constructor(x){this.database=x}async open(){return await this.database.open(b)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,...D}=x,B,F=A===0?100:A;if(z&&z>0&&A&&A>0)B=(z-1)*F;let H=await v.find({...D,take:F,...B!==void 0&&{skip:B}}),G=await this.count(D.where),V=Math.ceil(G/A);return{resources:H,total:G,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 findByQuestion(x){return await(await this.open()).find({where:{question:{id:x}},order:{letter:"ASC"}})}async findCorrectChoicesByQuestion(x){return await(await this.open()).find({where:{question:{id:x},isCorrect:!0},order:{letter:"ASC"}})}async create(x,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}Y=N([T(0,E("database")),U("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],Y);import{inject as f}from"@ooneex/container";import{ILike as j}from"typeorm";class Z{database;constructor(x){this.database=x}async open(){return await this.database.open(w)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:D,...B}=x,F,H=A===0?100:A;if(z&&z>0&&A&&A>0)F=(z-1)*H;let G={...B,take:H,...F!==void 0&&{skip:F}};if(D)G={...G,where:{...B.where,text:j(`%${D}%`)}};let V=await v.find(G),J=B.where;if(D)J={...B.where,text:j(`%${D}%`)};let K=await this.count(J),X=Math.ceil(K/A);return{resources:V,total:K,totalPages:X,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,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}Z=N([T(0,f("database")),U("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],Z);import{inject as O}from"@ooneex/container";import{ILike as P}from"typeorm";class _{database;constructor(x){this.database=x}async open(){return await this.database.open(C)}async close(){await this.database.close()}async find(x){let v=await this.open(),{page:z=1,limit:A=100,q:D,...B}=x,F,H=A===0?100:A;if(z&&z>0&&A&&A>0)F=(z-1)*H;let G={...B,take:H,...F!==void 0&&{skip:F}};if(D)G={...G,where:{...B.where,question:{text:P(`%${D}%`)}}};let V=await v.find(G),J=B.where;if(D)J={...B.where,question:{text:P(`%${D}%`)}};let K=await this.count(J),X=Math.ceil(K/A);return{resources:V,total:K,totalPages:X,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,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}_=N([T(0,O("database")),U("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],_);import{inject as I}from"@ooneex/container";import{ILike as L}from"typeorm";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 v=await this.open(),{page:z=1,limit:A=100,q:D,...B}=x,F,H=A===0?100:A;if(z&&z>0&&A&&A>0)F=(z-1)*H;let G={...B,take:H,...F!==void 0&&{skip:F}};if(D)G={...G,where:{...B.where,name:L(`%${D}%`)}};let V=await v.find(G),J=B.where;if(D)J={...B.where,name:L(`%${D}%`)};let K=await this.count(J),X=Math.ceil(K/A);return{resources:V,total:K,totalPages:X,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,v){return await(await this.open()).save(x,v)}async createMany(x,v){return await(await this.open()).save(x,v)}async update(x,v){return await this.create(x,v)}async updateMany(x,v){return await this.createMany(x,v)}async delete(x){return await(await this.open()).softDelete(x)}async count(x){return await(await this.open()).count(x?{where:x}:{})}}$=N([T(0,I("database")),U("design:paramtypes",[typeof ITypeormDatabaseAdapter==="undefined"?Object:ITypeormDatabaseAdapter])],$);export{$ as McqSessionRepository,_ as McqSessionQuestionRepository,Z as McqQuestionRepository,Y as McqQuestionChoiceRepository};export{Y as h,Z as i,_ as j,$ as k};
2
+ import{G as Q,H as P,I as h,J as w,K as E,L as S,M,N as g,O as d,P as k,Q as y,R as u}from"../../../../shared/chunk-s1yxjjz5.js";import"../../../../shared/chunk-4ysz6b7v.js";import"../../../../shared/chunk-qqvx08b4.js";import"../../../../shared/chunk-bdyby4d8.js";import"../../../../shared/chunk-gcch857j.js";import"../../../../shared/chunk-23739ja5.js";import"../../../../shared/chunk-fjtw26pp.js";import{$a as T,_a as N,ab as U}from"../../../../shared/chunk-x9h6vngs.js";import{inject as l}from"@ooneex/container";import{decorator as c}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 z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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 findByQuestion(x){return await(await this.open()).find({where:{question:{id:x}},order:{letter:"ASC"}})}async findCorrectChoicesByQuestion(x){return await(await this.open()).find({where:{question:{id:x},isCorrect:!0},order:{letter:"ASC"}})}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([c.repository(),T(0,l("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],$);import{inject as p}from"@ooneex/container";import{decorator as a}from"@ooneex/repository";class v{database;constructor(x){this.database=x}async open(){return await this.database.open(h)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}v=N([a.repository(),T(0,p("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],v);import{inject as n}from"@ooneex/container";import{decorator as r}from"@ooneex/repository";class D{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,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}D=N([r.repository(),T(0,n("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],D);import{inject as s}from"@ooneex/container";import{decorator as o}from"@ooneex/repository";class V{database;constructor(x){this.database=x}async open(){return await this.database.open(E)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}V=N([o.repository(),T(0,s("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],V);import{inject as e}from"@ooneex/container";import{decorator as t}from"@ooneex/repository";class W{database;constructor(x){this.database=x}async open(){return await this.database.open(S)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}W=N([t.repository(),T(0,e("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],W);import{inject as i}from"@ooneex/container";import{decorator as xx}from"@ooneex/repository";import{ILike as R}from"typeorm";class f{database;constructor(x){this.database=x}async open(){return await this.database.open(Q)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,q:G,...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(G)J={...J,where:{...F.where,text:R(`%${G}%`)}};let X=await z.find(J),Y=F.where;if(G)Y={...F.where,text:R(`%${G}%`)};let Z=await this.count(Y),_=Math.ceil(Z/B);return{resources:X,total:Z,totalPages:_,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}:{})}}f=N([xx.repository(),T(0,i("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],f);import{inject as zx}from"@ooneex/container";import{decorator as Ax}from"@ooneex/repository";class O{database;constructor(x){this.database=x}async open(){return await this.database.open(M)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}O=N([Ax.repository(),T(0,zx("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],O);import{inject as Bx}from"@ooneex/container";import{decorator as Fx}from"@ooneex/repository";class C{database;constructor(x){this.database=x}async open(){return await this.database.open(g)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}C=N([Fx.repository(),T(0,Bx("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],C);import{inject as Gx}from"@ooneex/container";import{decorator as Hx}from"@ooneex/repository";class I{database;constructor(x){this.database=x}async open(){return await this.database.open(d)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}I=N([Hx.repository(),T(0,Gx("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],I);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(k)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,...G}=x,F,H=B===0?100:B;if(A&&A>0&&B&&B>0)F=(A-1)*H;let K=await z.find({...G,take:H,...F!==void 0&&{skip:F}}),J=await this.count(G.where),X=Math.ceil(J/B);return{resources:K,total:J,totalPages:X,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}:{})}}L=N([Kx.repository(),T(0,Jx("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],L);import{inject as Nx}from"@ooneex/container";import{decorator as Tx}from"@ooneex/repository";import{ILike as q}from"typeorm";class b{database;constructor(x){this.database=x}async open(){return await this.database.open(u)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,q:G,...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(G)J={...J,where:{...F.where,question:{text:q(`%${G}%`)}}};let X=await z.find(J),Y=F.where;if(G)Y={...F.where,question:{text:q(`%${G}%`)}};let Z=await this.count(Y),_=Math.ceil(Z/B);return{resources:X,total:Z,totalPages:_,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([Tx.repository(),T(0,Nx("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],b);import{inject as Ux}from"@ooneex/container";import{decorator as Xx}from"@ooneex/repository";import{ILike as m}from"typeorm";class j{database;constructor(x){this.database=x}async open(){return await this.database.open(y)}async close(){await this.database.close()}async find(x){let z=await this.open(),{page:A=1,limit:B=100,q:G,...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(G)J={...J,where:{...F.where,name:m(`%${G}%`)}};let X=await z.find(J),Y=F.where;if(G)Y={...F.where,name:m(`%${G}%`)};let Z=await this.count(Y),_=Math.ceil(Z/B);return{resources:X,total:Z,totalPages:_,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}:{})}}j=N([Xx.repository(),T(0,Ux("database")),U("design:paramtypes",[typeof ITypeormDatabase==="undefined"?Object:ITypeormDatabase])],j);export{j as McqSessionRepository,b as McqSessionQuestionRepository,L as McqQuestionViewedRepository,I as McqQuestionStatRepository,C as McqQuestionSharedRepository,O as McqQuestionSavedRepository,f as McqQuestionRepository,W as McqQuestionReportRepository,V as McqQuestionLikedRepository,D as McqQuestionDislikedRepository,v as McqQuestionCommentRepository,$ as McqQuestionChoiceRepository};export{$ as n,v as o,D as p,V as q,W as r,f as s,O as t,C as u,I as v,L as w,b as x,j as y};
3
3
 
4
- //# debugId=11E930C017B42A4F64756E2164756E21
4
+ //# debugId=EA4B44160548439A64756E2164756E21