@aastrika_npmjs/sunbird-sdk 5.1.1

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 (520) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/__test__/mocks.d.ts +6 -0
  4. package/__test__/setup.d.ts +2 -0
  5. package/api/api-service-impl.d.ts +32 -0
  6. package/api/config/api-config.d.ts +21 -0
  7. package/api/config/app-config.d.ts +6 -0
  8. package/api/def/api-request-handler.d.ts +4 -0
  9. package/api/def/api-service.d.ts +8 -0
  10. package/api/handlers/api-token-handler.d.ts +17 -0
  11. package/api/index.d.ts +7 -0
  12. package/api/network-queue/db/schema.d.ts +28 -0
  13. package/api/network-queue/def/network-queue.d.ts +20 -0
  14. package/api/network-queue/handlers/network-request-handler.d.ts +7 -0
  15. package/api/network-queue/impl/network-queue-impl.d.ts +16 -0
  16. package/api/network-queue/index.d.ts +2 -0
  17. package/api/util/authenticators/bearer-token-refresh-interceptor.d.ts +14 -0
  18. package/api/util/authenticators/user-token-refresh-interceptor.d.ts +11 -0
  19. package/api/util/jwt.util.d.ts +7 -0
  20. package/archive/def/archive-service.d.ts +60 -0
  21. package/archive/export/def/archive-export-delegate.d.ts +5 -0
  22. package/archive/export/def/telemetry-archive-package-meta.d.ts +5 -0
  23. package/archive/export/error/export-assertion-error.d.ts +4 -0
  24. package/archive/export/error/invalid-request-error.d.ts +4 -0
  25. package/archive/export/error/object-not-found-error.d.ts +4 -0
  26. package/archive/export/impl/telemetry-export-delegate.d.ts +18 -0
  27. package/archive/export/index.d.ts +1 -0
  28. package/archive/impl/archive-service-impl.d.ts +31 -0
  29. package/archive/import/def/archive-import-delegate.d.ts +6 -0
  30. package/archive/import/error/import-assertion-error.d.ts +4 -0
  31. package/archive/import/error/invalid-archive-error.d.ts +4 -0
  32. package/archive/import/error/unknown-object-error.d.ts +4 -0
  33. package/archive/import/impl/telemetry-import-delegate.d.ts +19 -0
  34. package/archive/import/index.d.ts +1 -0
  35. package/archive/index.d.ts +4 -0
  36. package/auth/def/auth-end-points.d.ts +5 -0
  37. package/auth/def/auth-event.d.ts +8 -0
  38. package/auth/def/auth-service.d.ts +10 -0
  39. package/auth/def/o-auth-session.d.ts +7 -0
  40. package/auth/def/session-provider.d.ts +4 -0
  41. package/auth/errors/auth-token-refresh-error.d.ts +4 -0
  42. package/auth/errors/in-app-browser-exit-error.d.ts +4 -0
  43. package/auth/errors/processing-error.d.ts +4 -0
  44. package/auth/errors/sign-in-error.d.ts +4 -0
  45. package/auth/impl/auth-service-impl.d.ts +22 -0
  46. package/auth/index.d.ts +20 -0
  47. package/auth/util/auth-util.d.ts +15 -0
  48. package/auth/util/native-apple-session-provider/impl/native-apple-session-provider.d.ts +27 -0
  49. package/auth/util/native-custombrowser-session-provider/impl/native-custombrowser-session-provider.d.ts +19 -0
  50. package/auth/util/native-google-session-provider/impl/native-google-session-provider.d.ts +15 -0
  51. package/auth/util/native-keycloak-session-provider/impl/native-keycloak-session-provider.d.ts +18 -0
  52. package/auth/util/webview-session-provider/def/webview-register-session-provider-config.d.ts +22 -0
  53. package/auth/util/webview-session-provider/def/webview-runner.d.ts +49 -0
  54. package/auth/util/webview-session-provider/def/webview-session-provider-config.d.ts +22 -0
  55. package/auth/util/webview-session-provider/def/webview-state-session-provider-config.d.ts +22 -0
  56. package/auth/util/webview-session-provider/errors/interrupt-error.d.ts +4 -0
  57. package/auth/util/webview-session-provider/errors/no-inappbrowser-session-assertion-fail-error.d.ts +4 -0
  58. package/auth/util/webview-session-provider/errors/param-not-captured-error.d.ts +4 -0
  59. package/auth/util/webview-session-provider/errors/webview-runner-error.d.ts +4 -0
  60. package/auth/util/webview-session-provider/impl/webview-auto-merge-session-provider.d.ts +15 -0
  61. package/auth/util/webview-session-provider/impl/webview-base-session-provider.d.ts +23 -0
  62. package/auth/util/webview-session-provider/impl/webview-login-session-provider.d.ts +14 -0
  63. package/auth/util/webview-session-provider/impl/webview-manual-merge-session-provider.d.ts +11 -0
  64. package/auth/util/webview-session-provider/impl/webview-runner-impl.d.ts +56 -0
  65. package/auth/util/webview-session-provider/impl/webview-state-session-provider.d.ts +14 -0
  66. package/certificate/config/certificate-service-config.d.ts +5 -0
  67. package/certificate/db/schema.d.ts +18 -0
  68. package/certificate/def/certificate-service.d.ts +17 -0
  69. package/certificate/handlers/get-public-key-handler.d.ts +18 -0
  70. package/certificate/impl/certificate-service-impl.d.ts +32 -0
  71. package/certificate/index.d.ts +3 -0
  72. package/codepush-experiment/def/codepush-experiment-service.d.ts +9 -0
  73. package/codepush-experiment/handler/codepush-experiment-handler.d.ts +3 -0
  74. package/codepush-experiment/impl/codepush-experiment-service-impl.d.ts +14 -0
  75. package/codepush-experiment/index.d.ts +2 -0
  76. package/content/config/content-config.d.ts +8 -0
  77. package/content/db/schema.d.ts +124 -0
  78. package/content/def/content-delete-listener.d.ts +3 -0
  79. package/content/def/content-event.d.ts +33 -0
  80. package/content/def/content-feedback-service.d.ts +21 -0
  81. package/content/def/content-service.d.ts +46 -0
  82. package/content/def/content.d.ts +43 -0
  83. package/content/def/requests.d.ts +219 -0
  84. package/content/def/response.d.ts +93 -0
  85. package/content/def/search-request.d.ts +37 -0
  86. package/content/handlers/content-aggregator.d.ts +166 -0
  87. package/content/handlers/content-feedback-handler.d.ts +5 -0
  88. package/content/handlers/content-marker-handler.d.ts +10 -0
  89. package/content/handlers/content-storage-handler.d.ts +9 -0
  90. package/content/handlers/delete-content-handler.d.ts +18 -0
  91. package/content/handlers/export/clean-temp-loc.d.ts +8 -0
  92. package/content/handlers/export/compress-content.d.ts +8 -0
  93. package/content/handlers/export/copy-asset.d.ts +8 -0
  94. package/content/handlers/export/copy-to-destination.d.ts +6 -0
  95. package/content/handlers/export/create-content-export-manifest.d.ts +12 -0
  96. package/content/handlers/export/create-temp-loc.d.ts +8 -0
  97. package/content/handlers/export/delete-temp-ecar.d.ts +8 -0
  98. package/content/handlers/export/deletete-temp-dir.d.ts +6 -0
  99. package/content/handlers/export/device-memory-check.d.ts +9 -0
  100. package/content/handlers/export/ecar-bundle.d.ts +11 -0
  101. package/content/handlers/export/generate-export-share-telemetry.d.ts +8 -0
  102. package/content/handlers/export/write-manifest.d.ts +10 -0
  103. package/content/handlers/get-child-contents-handler.d.ts +21 -0
  104. package/content/handlers/get-child-question-set-handler.d.ts +16 -0
  105. package/content/handlers/get-content-details-handler.d.ts +30 -0
  106. package/content/handlers/get-content-heirarchy-handler.d.ts +10 -0
  107. package/content/handlers/get-contents-handler.d.ts +12 -0
  108. package/content/handlers/import/content-search-api-handler.d.ts +13 -0
  109. package/content/handlers/import/create-content-import-manifest.d.ts +15 -0
  110. package/content/handlers/import/create-hierarchy.d.ts +18 -0
  111. package/content/handlers/import/device-memory-check.d.ts +10 -0
  112. package/content/handlers/import/ecar-cleanup.d.ts +8 -0
  113. package/content/handlers/import/extract-ecar.d.ts +11 -0
  114. package/content/handlers/import/extract-payloads.d.ts +53 -0
  115. package/content/handlers/import/generate-import-share-telemetry.d.ts +8 -0
  116. package/content/handlers/import/generate-interact-telemetry.d.ts +8 -0
  117. package/content/handlers/import/hierarchy-manifest-conversion.d.ts +11 -0
  118. package/content/handlers/import/update-size-on-device.d.ts +18 -0
  119. package/content/handlers/import/validate-ecar.d.ts +18 -0
  120. package/content/handlers/import-n-export-handler.d.ts +25 -0
  121. package/content/handlers/question-set-file-read-handler.d.ts +11 -0
  122. package/content/handlers/search-content-handler.d.ts +33 -0
  123. package/content/impl/content-feedback-service-impl.d.ts +13 -0
  124. package/content/impl/content-service-impl.d.ts +100 -0
  125. package/content/index.d.ts +9 -0
  126. package/content/util/content-constants.d.ts +93 -0
  127. package/content/util/content-mapper.d.ts +7 -0
  128. package/content/util/content-util.d.ts +94 -0
  129. package/content/util/linked-list.d.ts +16 -0
  130. package/content/util/stack.d.ts +10 -0
  131. package/course/config/course-service-config.d.ts +3 -0
  132. package/course/course-util.d.ts +6 -0
  133. package/course/def/batch.d.ts +1 -0
  134. package/course/def/course-batches-response.d.ts +5 -0
  135. package/course/def/course-certificate-manager.d.ts +9 -0
  136. package/course/def/course-service.d.ts +51 -0
  137. package/course/def/course.d.ts +1 -0
  138. package/course/def/download-certificate-request.d.ts +5 -0
  139. package/course/def/download-certificate-response.d.ts +3 -0
  140. package/course/def/get-certificate-request.d.ts +6 -0
  141. package/course/def/get-enrolled-course-response.d.ts +10 -0
  142. package/course/def/get-learner-certificate-response.d.ts +22 -0
  143. package/course/def/request-types.d.ts +83 -0
  144. package/course/def/unenrollCourseRequest.d.ts +5 -0
  145. package/course/def/update-content-state-response.d.ts +1 -0
  146. package/course/def/update-course-content-state-request.d.ts +1 -0
  147. package/course/errors/certificate-already-downloaded.d.ts +5 -0
  148. package/course/errors/no-certificate-found.d.ts +4 -0
  149. package/course/handlers/enroll-course-handler.d.ts +11 -0
  150. package/course/handlers/get-batch-details-handler.d.ts +10 -0
  151. package/course/handlers/get-content-state-handler.d.ts +16 -0
  152. package/course/handlers/get-course-batches-handler.d.ts +10 -0
  153. package/course/handlers/get-enrolled-course-handler.d.ts +21 -0
  154. package/course/handlers/get-learner-certificate-handler.d.ts +20 -0
  155. package/course/handlers/offline-content-state-handler.d.ts +12 -0
  156. package/course/handlers/offline-course-cache-handler.d.ts +15 -0
  157. package/course/handlers/sync-assessment-events-handler.d.ts +22 -0
  158. package/course/handlers/unenroll-course-handler.d.ts +10 -0
  159. package/course/handlers/update-content-state-api-handler.d.ts +16 -0
  160. package/course/handlers/update-enrolled-courses-handler.d.ts +11 -0
  161. package/course/impl/course-certificate-manager-impl.d.ts +21 -0
  162. package/course/impl/course-service-impl.d.ts +84 -0
  163. package/course/impl/offline-assessment-score-processor.d.ts +12 -0
  164. package/course/index.d.ts +11 -0
  165. package/db/config/db-config.d.ts +3 -0
  166. package/db/db-constants.d.ts +0 -0
  167. package/db/def/db-constants.d.ts +14 -0
  168. package/db/def/db-service.d.ts +14 -0
  169. package/db/def/migration.d.ts +10 -0
  170. package/db/def/query.d.ts +26 -0
  171. package/db/impl/db-cordova-service.d.ts +23 -0
  172. package/db/impl/db-web-sql-service.d.ts +0 -0
  173. package/db/index.d.ts +5 -0
  174. package/db/migrations/certificate-public-key-migration.d.ts +6 -0
  175. package/db/migrations/content-dialcode-migration.d.ts +9 -0
  176. package/db/migrations/content-generalization-migration.d.ts +8 -0
  177. package/db/migrations/content-marker-migration.d.ts +6 -0
  178. package/db/migrations/course-assessment-migration.d.ts +6 -0
  179. package/db/migrations/error-stack-migration.d.ts +6 -0
  180. package/db/migrations/group-profile-migration.d.ts +7 -0
  181. package/db/migrations/initial-migration.d.ts +6 -0
  182. package/db/migrations/milliseconds-to-seconds-migration.d.ts +6 -0
  183. package/db/migrations/network-queue-migration.d.ts +10 -0
  184. package/db/migrations/offline-search-textbook-migration.d.ts +6 -0
  185. package/db/migrations/player-config-data-migrations.d.ts +7 -0
  186. package/db/migrations/profile-syllabus-migration.d.ts +6 -0
  187. package/db/migrations/recently-viewed-migration.d.ts +6 -0
  188. package/db/migrations/search-history-migration.d.ts +6 -0
  189. package/db/util/query-builder.d.ts +7 -0
  190. package/db/util/unique-id.d.ts +3 -0
  191. package/debugging/def/debugging-service.d.ts +12 -0
  192. package/debugging/handler/debugging-duration-handler.d.ts +9 -0
  193. package/debugging/impl/debuggin-service-impl.d.ts +17 -0
  194. package/debugging/index.d.ts +3 -0
  195. package/device-register/config/device-register-config.d.ts +4 -0
  196. package/device-register/def/device-register-service.d.ts +7 -0
  197. package/device-register/def/request.d.ts +16 -0
  198. package/device-register/def/response.d.ts +7 -0
  199. package/device-register/handler/device-register-handler.d.ts +24 -0
  200. package/device-register/handler/get-device-profile-handler.d.ts +16 -0
  201. package/device-register/impl/device-register-service-impl.d.ts +21 -0
  202. package/device-register/index.d.ts +5 -0
  203. package/discussion/def/discussion-service.d.ts +10 -0
  204. package/discussion/impl/discussion-service.impl.d.ts +15 -0
  205. package/discussion/index.d.ts +1 -0
  206. package/error/config/error-logger-config.d.ts +3 -0
  207. package/error/db/schema.d.ts +17 -0
  208. package/error/def/error-logger-service.d.ts +6 -0
  209. package/error/def/error-stack.d.ts +6 -0
  210. package/error/handlers/error-stack-sync-handler.d.ts +19 -0
  211. package/error/handlers/error-stack-sync-request-decorator.d.ts +23 -0
  212. package/error/impl/error-logger-service-impl.d.ts +31 -0
  213. package/error/index.d.ts +1 -0
  214. package/error/util/error-stack-mapper.d.ts +6 -0
  215. package/errors/index.d.ts +1 -0
  216. package/errors/validation-error.d.ts +4 -0
  217. package/events-bus/config/events-bus-config.d.ts +3 -0
  218. package/events-bus/def/emit-request.d.ts +4 -0
  219. package/events-bus/def/error-event.d.ts +24 -0
  220. package/events-bus/def/event-namespace.d.ts +8 -0
  221. package/events-bus/def/event-observer.d.ts +5 -0
  222. package/events-bus/def/events-bus-event.d.ts +4 -0
  223. package/events-bus/def/events-bus-service.d.ts +11 -0
  224. package/events-bus/def/register-observer-request.d.ts +6 -0
  225. package/events-bus/impl/events-bus-service-impl.d.ts +16 -0
  226. package/events-bus/index.d.ts +4 -0
  227. package/faq/config/faq-service-config.d.ts +3 -0
  228. package/faq/def/faq-service.d.ts +6 -0
  229. package/faq/def/faq.d.ts +1 -0
  230. package/faq/def/get-faq-request.d.ts +4 -0
  231. package/faq/handler/get-faq-details-handler.d.ts +18 -0
  232. package/faq/impl/faq-service-impl.d.ts +15 -0
  233. package/faq/index.d.ts +5 -0
  234. package/form/config/form-service-config.d.ts +4 -0
  235. package/form/def/form-request.d.ts +9 -0
  236. package/form/def/form-service.d.ts +7 -0
  237. package/form/def/models.d.ts +1 -0
  238. package/form/handle/get-form-handler.d.ts +23 -0
  239. package/form/impl/form-service-impl.d.ts +17 -0
  240. package/form/index.d.ts +4 -0
  241. package/framework/config/framework-service-config.d.ts +9 -0
  242. package/framework/def/channel.d.ts +1 -0
  243. package/framework/def/framework-category-code.d.ts +12 -0
  244. package/framework/def/framework-service.d.ts +18 -0
  245. package/framework/def/framework.d.ts +1 -0
  246. package/framework/def/organization.d.ts +1 -0
  247. package/framework/def/requests.d.ts +20 -0
  248. package/framework/def/responses.d.ts +5 -0
  249. package/framework/def/suggested-framework.d.ts +6 -0
  250. package/framework/errors/no-active-channel-found-error.d.ts +4 -0
  251. package/framework/handler/get-channel-detail-handler.d.ts +18 -0
  252. package/framework/handler/get-framework-category-terms-handler.d.ts +16 -0
  253. package/framework/handler/get-framework-detail-handler.d.ts +19 -0
  254. package/framework/impl/framework-service-impl.d.ts +32 -0
  255. package/framework/index.d.ts +12 -0
  256. package/framework/util/framework-mapper.d.ts +7 -0
  257. package/framework/util/framework-util-service-impl.d.ts +15 -0
  258. package/framework/util/framework-util-service.d.ts +13 -0
  259. package/framework/util/requests.d.ts +19 -0
  260. package/group/def/group-activity-service.d.ts +7 -0
  261. package/group/def/group-service.d.ts +25 -0
  262. package/group/def/models.d.ts +1 -0
  263. package/group/def/requests.d.ts +56 -0
  264. package/group/def/responses.d.ts +2 -0
  265. package/group/impl/group-activity-service-impl.d.ts +12 -0
  266. package/group/impl/group-service-impl.d.ts +34 -0
  267. package/group/index.d.ts +5 -0
  268. package/group-deprecated/db/schema.d.ts +35 -0
  269. package/group-deprecated/def/get-all-group-request-deprecated.d.ts +3 -0
  270. package/group-deprecated/def/group-service-deprecated.d.ts +16 -0
  271. package/group-deprecated/def/group-session-deprecated.d.ts +9 -0
  272. package/group-deprecated/def/groupDeprecated.d.ts +16 -0
  273. package/group-deprecated/def/profiles-to-group-request-deprecated.d.ts +4 -0
  274. package/group-deprecated/error/no-active-group-session-error.d.ts +4 -0
  275. package/group-deprecated/error/no-group-found-error.d.ts +4 -0
  276. package/group-deprecated/impl/group-service-deprecated-impl.d.ts +24 -0
  277. package/group-deprecated/index.d.ts +7 -0
  278. package/group-deprecated/util/group-mapper.d.ts +6 -0
  279. package/group-deprecated/util/group-profile-mapper.d.ts +6 -0
  280. package/index.d.ts +38 -0
  281. package/index.js +14 -0
  282. package/injection-tokens.d.ts +60 -0
  283. package/key-value-store/db/schema.d.ts +12 -0
  284. package/key-value-store/def/cached-item-request.d.ts +7 -0
  285. package/key-value-store/def/cached-item-store.d.ts +14 -0
  286. package/key-value-store/def/key-value-store.d.ts +5 -0
  287. package/key-value-store/impl/cached-item-store-impl.d.ts +19 -0
  288. package/key-value-store/impl/key-value-store-impl.d.ts +9 -0
  289. package/key-value-store/index.d.ts +3 -0
  290. package/notification/db/schema.d.ts +21 -0
  291. package/notification/def/notification-service.d.ts +11 -0
  292. package/notification/def/requests.d.ts +32 -0
  293. package/notification/handler/notification-handler.d.ts +9 -0
  294. package/notification/impl/notification-service-impl.d.ts +26 -0
  295. package/notification/index.d.ts +2 -0
  296. package/notification-v2/def/notification-service-v2.d.ts +8 -0
  297. package/notification-v2/impl/notification-service-v2-impl.d.ts +14 -0
  298. package/notification-v2/index.d.ts +1 -0
  299. package/open-rap-configurable.d.ts +3 -0
  300. package/package.json +114 -0
  301. package/page/config/page-service-config.d.ts +4 -0
  302. package/page/def/page-assemble-service.d.ts +7 -0
  303. package/page/def/page-assemble.d.ts +5 -0
  304. package/page/def/requests.d.ts +41 -0
  305. package/page/handle/delegates/course-request-delegate.d.ts +18 -0
  306. package/page/handle/delegates/default-request-delegate.d.ts +28 -0
  307. package/page/handle/delegates/dialcode-request-delegate.d.ts +15 -0
  308. package/page/handle/page-assembler-factory.d.ts +27 -0
  309. package/page/impl/page-assemble-service-impl.d.ts +28 -0
  310. package/page/index.d.ts +4 -0
  311. package/partner/db/schema.d.ts +9 -0
  312. package/player/db/schema.d.ts +27 -0
  313. package/player/def/player-service.d.ts +10 -0
  314. package/player/def/response.d.ts +42 -0
  315. package/player/impl/player-service-impl.d.ts +27 -0
  316. package/player/index.d.ts +2 -0
  317. package/preference-keys.d.ts +54 -0
  318. package/profile/config/profile-service-config.d.ts +9 -0
  319. package/profile/db/schema.d.ts +190 -0
  320. package/profile/def/accept-terms-condition-request.d.ts +5 -0
  321. package/profile/def/add-managed-profile-request.d.ts +10 -0
  322. package/profile/def/check-user-exists-request.d.ts +7 -0
  323. package/profile/def/check-user-exists-response.d.ts +1 -0
  324. package/profile/def/content-access-filter-criteria.d.ts +4 -0
  325. package/profile/def/content-access.d.ts +16 -0
  326. package/profile/def/delete-user-feed-request.d.ts +5 -0
  327. package/profile/def/export-profile-context.d.ts +10 -0
  328. package/profile/def/generate-otp-request.d.ts +6 -0
  329. package/profile/def/get-all-group-request.d.ts +3 -0
  330. package/profile/def/get-all-profile-request.d.ts +5 -0
  331. package/profile/def/get-managed-server-profiles-request.d.ts +4 -0
  332. package/profile/def/import-profile-context.d.ts +8 -0
  333. package/profile/def/is-profile-already-in-use-request.d.ts +4 -0
  334. package/profile/def/location-search-criteria.d.ts +11 -0
  335. package/profile/def/location-search-result.d.ts +1 -0
  336. package/profile/def/merge-server-profiles-request.d.ts +10 -0
  337. package/profile/def/profile-exists-response.d.ts +3 -0
  338. package/profile/def/profile-export-request.d.ts +12 -0
  339. package/profile/def/profile-export-response.d.ts +3 -0
  340. package/profile/def/profile-import-request.d.ts +3 -0
  341. package/profile/def/profile-import-response.d.ts +4 -0
  342. package/profile/def/profile-service.d.ts +70 -0
  343. package/profile/def/profile-session.d.ts +7 -0
  344. package/profile/def/profile.d.ts +30 -0
  345. package/profile/def/profiles-to-group-request.d.ts +4 -0
  346. package/profile/def/server-profile-details-request.d.ts +5 -0
  347. package/profile/def/server-profile.d.ts +1 -0
  348. package/profile/def/tenant-info-request.d.ts +3 -0
  349. package/profile/def/tenant-info.d.ts +7 -0
  350. package/profile/def/update-server-profile-declarations-request.d.ts +4 -0
  351. package/profile/def/update-server-profile-declarations-response.d.ts +1 -0
  352. package/profile/def/update-server-profile-info-request.d.ts +1 -0
  353. package/profile/def/update-server-profile-response.d.ts +1 -0
  354. package/profile/def/update-user-feed-request.d.ts +7 -0
  355. package/profile/def/user-migrate-request.d.ts +7 -0
  356. package/profile/def/user-migrate-response.d.ts +11 -0
  357. package/profile/def/verify-otp-request.d.ts +6 -0
  358. package/profile/errors/invalid-profile-error.d.ts +4 -0
  359. package/profile/errors/no-active-session-error.d.ts +4 -0
  360. package/profile/errors/no-profile-found-error.d.ts +4 -0
  361. package/profile/handler/accept-term-condition-handler.d.ts +10 -0
  362. package/profile/handler/export/clean-up-exported-file.d.ts +20 -0
  363. package/profile/handler/export/copy-database.d.ts +8 -0
  364. package/profile/handler/export/create-metadata.d.ts +14 -0
  365. package/profile/handler/export/generate-profile-export-telemetry.d.ts +8 -0
  366. package/profile/handler/export/get-epar-file-path.d.ts +8 -0
  367. package/profile/handler/generate-otp-handler.d.ts +10 -0
  368. package/profile/handler/get-server-profile-details-handler.d.ts +20 -0
  369. package/profile/handler/import/generate-profile-import-telemetry.d.ts +8 -0
  370. package/profile/handler/import/transport-assesments.d.ts +11 -0
  371. package/profile/handler/import/transport-framework-n-channel.d.ts +9 -0
  372. package/profile/handler/import/transport-group-profile.d.ts +9 -0
  373. package/profile/handler/import/transport-group.d.ts +9 -0
  374. package/profile/handler/import/transport-profiles.d.ts +9 -0
  375. package/profile/handler/import/transport-user.d.ts +9 -0
  376. package/profile/handler/import/update-imported-profile-metadata.d.ts +8 -0
  377. package/profile/handler/import/validate-profile-metadata.d.ts +9 -0
  378. package/profile/handler/is-profile-already-in-use-handler.d.ts +11 -0
  379. package/profile/handler/managed-profile-manager.d.ts +34 -0
  380. package/profile/handler/profile-handler.d.ts +5 -0
  381. package/profile/handler/search-location-handler.d.ts +19 -0
  382. package/profile/handler/tenant-info-handler.d.ts +12 -0
  383. package/profile/handler/user-migrate-handler.d.ts +15 -0
  384. package/profile/handler/verify-otp-handler.d.ts +10 -0
  385. package/profile/impl/profile-service-impl.d.ts +83 -0
  386. package/profile/index.d.ts +25 -0
  387. package/profile/util/profile-db-entry-mapper.d.ts +6 -0
  388. package/sdk-config.d.ts +41 -0
  389. package/sdk-service-on-init-delegate.d.ts +5 -0
  390. package/sdk-service-pre-init-delegate.d.ts +5 -0
  391. package/sdk.d.ts +91 -0
  392. package/segmentation/def/segmentation-service.d.ts +9 -0
  393. package/segmentation/handler/fetch-segmentation-command-handler.d.ts +8 -0
  394. package/segmentation/handler/fetch-segmentation-tags-handler.d.ts +8 -0
  395. package/segmentation/handler/store-segmentation-command-handler.d.ts +8 -0
  396. package/segmentation/handler/store-segmentation-tag-handler.d.ts +8 -0
  397. package/segmentation/impl/segmentaion-service-impl.d.ts +13 -0
  398. package/segmentation/index.d.ts +6 -0
  399. package/storage/def/scan-requests.d.ts +5 -0
  400. package/storage/def/storage-destination.d.ts +4 -0
  401. package/storage/def/storage-event.d.ts +36 -0
  402. package/storage/def/storage-requests.d.ts +15 -0
  403. package/storage/def/storage-service.d.ts +16 -0
  404. package/storage/errors/cancellation-error.d.ts +4 -0
  405. package/storage/errors/duplicate-content-error.d.ts +4 -0
  406. package/storage/errors/low-memory-error.d.ts +4 -0
  407. package/storage/errors/transfer-failed-duplicate-content-error.d.ts +4 -0
  408. package/storage/errors/transfer-failed-error.d.ts +5 -0
  409. package/storage/handler/scan/get-modified-content-handler.d.ts +15 -0
  410. package/storage/handler/scan/perform-actoin-on-content-handler.d.ts +8 -0
  411. package/storage/handler/storage-handler.d.ts +14 -0
  412. package/storage/handler/transfer/copy-content-from-source-to-destination.d.ts +15 -0
  413. package/storage/handler/transfer/delete-destination-folder.d.ts +6 -0
  414. package/storage/handler/transfer/delete-source-folder.d.ts +12 -0
  415. package/storage/handler/transfer/device-memory-check.d.ts +9 -0
  416. package/storage/handler/transfer/duplicate-content-check.d.ts +13 -0
  417. package/storage/handler/transfer/store-destination-content-in-db.d.ts +17 -0
  418. package/storage/handler/transfer/update-source-content-path-in-db.d.ts +8 -0
  419. package/storage/handler/transfer/validate-destination-content.d.ts +13 -0
  420. package/storage/handler/transfer/validate-destination-folder.d.ts +11 -0
  421. package/storage/handler/transfer-content-handler.d.ts +51 -0
  422. package/storage/impl/storage-service-impl.d.ts +35 -0
  423. package/storage/index.d.ts +6 -0
  424. package/summarizer/assesment-analyzer.d.ts +4 -0
  425. package/summarizer/db/schema.d.ts +21 -0
  426. package/summarizer/def/request.d.ts +6 -0
  427. package/summarizer/def/response.d.ts +77 -0
  428. package/summarizer/def/summarizer-service.d.ts +22 -0
  429. package/summarizer/handler/summarizer-handler.d.ts +22 -0
  430. package/summarizer/handler/summarizer-queries.d.ts +12 -0
  431. package/summarizer/handler/summary-telemetry-event-handler.d.ts +40 -0
  432. package/summarizer/impl/summarizer-service-impl.d.ts +40 -0
  433. package/summarizer/index.d.ts +7 -0
  434. package/sunbird-error.d.ts +5 -0
  435. package/system-settings/config/system-settings-config.d.ts +4 -0
  436. package/system-settings/def/request-types.d.ts +3 -0
  437. package/system-settings/def/system-settings-org-ids.d.ts +5 -0
  438. package/system-settings/def/system-settings-service.d.ts +5 -0
  439. package/system-settings/def/system-settings.d.ts +5 -0
  440. package/system-settings/handlers/get-system-settings-handler.d.ts +18 -0
  441. package/system-settings/impl/system-settings-service-impl.d.ts +15 -0
  442. package/system-settings/index.d.ts +5 -0
  443. package/telemetry/config/telemetry-config.d.ts +7 -0
  444. package/telemetry/db/schema.d.ts +66 -0
  445. package/telemetry/def/requests.d.ts +171 -0
  446. package/telemetry/def/telemetry-constants.d.ts +64 -0
  447. package/telemetry/def/telemetry-decorator.d.ts +13 -0
  448. package/telemetry/def/telemetry-event.d.ts +12 -0
  449. package/telemetry/def/telemetry-model.d.ts +193 -0
  450. package/telemetry/def/telemetry-service.d.ts +31 -0
  451. package/telemetry/def/telemetry-stat.d.ts +4 -0
  452. package/telemetry/def/telemetry-sync-preprocessor.d.ts +3 -0
  453. package/telemetry/def/telemetry-sync-stat.d.ts +6 -0
  454. package/telemetry/errors/invalid-input-for-sync-preprocessor-error.d.ts +4 -0
  455. package/telemetry/handler/import/generate-import-telemetry-share.d.ts +9 -0
  456. package/telemetry/handler/import/transport-processed-telemetry.d.ts +9 -0
  457. package/telemetry/handler/import/update-imported-telemetry-metadata.d.ts +8 -0
  458. package/telemetry/handler/import/validate-telemetry-metadata.d.ts +9 -0
  459. package/telemetry/handler/telemetry-sync-handler.d.ts +41 -0
  460. package/telemetry/impl/decorator-impl.d.ts +26 -0
  461. package/telemetry/impl/process-event.d.ts +5 -0
  462. package/telemetry/impl/string-to-byte-array-preprocessor.d.ts +4 -0
  463. package/telemetry/impl/string-to-gzipped-string.d.ts +4 -0
  464. package/telemetry/impl/telemetry-entries-to-string-preprocessor.d.ts +4 -0
  465. package/telemetry/impl/telemetry-service-impl.d.ts +74 -0
  466. package/telemetry/index.d.ts +9 -0
  467. package/telemetry/util/telemetry-auto-sync-modes.d.ts +5 -0
  468. package/telemetry/util/telemetry-auto-sync-service-impl.d.ts +17 -0
  469. package/telemetry/util/telemetry-auto-sync-service.d.ts +9 -0
  470. package/telemetry/util/telemetry-logger.d.ts +4 -0
  471. package/util/app/def/app-info.d.ts +7 -0
  472. package/util/app/impl/app-info-impl.d.ts +19 -0
  473. package/util/app/index.d.ts +1 -0
  474. package/util/array-util.d.ts +6 -0
  475. package/util/device/def/device-info.d.ts +33 -0
  476. package/util/device/impl/device-info-impl.d.ts +12 -0
  477. package/util/device/index.d.ts +1 -0
  478. package/util/download/def/download-complete-delegate.d.ts +5 -0
  479. package/util/download/def/download-event.d.ts +20 -0
  480. package/util/download/def/download-service.d.ts +14 -0
  481. package/util/download/def/download-status.d.ts +7 -0
  482. package/util/download/def/requests.d.ts +20 -0
  483. package/util/download/def/response.d.ts +5 -0
  484. package/util/download/impl/download-service-impl.d.ts +38 -0
  485. package/util/download/index.d.ts +5 -0
  486. package/util/encoders/encoder.d.ts +4 -0
  487. package/util/encoders/utf8-to-b64-encoder.d.ts +5 -0
  488. package/util/file/config/file-config.d.ts +2 -0
  489. package/util/file/def/file-service.d.ts +21 -0
  490. package/util/file/errors/no-file-found.d.ts +4 -0
  491. package/util/file/impl/file-service-impl.d.ts +98 -0
  492. package/util/file/index.d.ts +271 -0
  493. package/util/file/util/file-util.d.ts +9 -0
  494. package/util/file/util/path.d.ts +6 -0
  495. package/util/list/comparator.d.ts +3 -0
  496. package/util/list/linked-list.d.ts +11 -0
  497. package/util/list/list-node.d.ts +6 -0
  498. package/util/network/def/network-info-service.d.ts +5 -0
  499. package/util/network/def/network-status.d.ts +4 -0
  500. package/util/network/impl/network-info-service-impl.d.ts +7 -0
  501. package/util/network/index.d.ts +2 -0
  502. package/util/number-util.d.ts +5 -0
  503. package/util/object-util.d.ts +7 -0
  504. package/util/queue/queue.d.ts +8 -0
  505. package/util/search-history/db/schema.d.ts +17 -0
  506. package/util/search-history/def/requests.d.ts +9 -0
  507. package/util/search-history/def/search-entry.d.ts +5 -0
  508. package/util/search-history/def/search-history-service.d.ts +7 -0
  509. package/util/search-history/impl/search-history-service-impl.d.ts +13 -0
  510. package/util/search-history/index.d.ts +2 -0
  511. package/util/search-history/util/search-history-db-entry-mapper.d.ts +5 -0
  512. package/util/shared-preferences/config/shared-prefernces-config.d.ts +2 -0
  513. package/util/shared-preferences/def/shared-preferences-set-collection.d.ts +12 -0
  514. package/util/shared-preferences/def/shared-preferences.d.ts +9 -0
  515. package/util/shared-preferences/impl/shared-preferences-android.d.ts +13 -0
  516. package/util/shared-preferences/impl/shared-preferences-local-storage.d.ts +11 -0
  517. package/util/shared-preferences/impl/shared-preferences-set-collection-impl.d.ts +19 -0
  518. package/util/shared-preferences/index.d.ts +2 -0
  519. package/util/zip/def/zip-service.d.ts +4 -0
  520. package/util/zip/impl/zip-service-impl.d.ts +5 -0
@@ -0,0 +1,21 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ContentFeedback, ContentFeedbackFilterCriteria } from './content';
3
+ export interface ContentFeedbackService {
4
+ /**
5
+ * This api is used to save the feedback about content.
6
+ *
7
+ * @param contentFeedback - {@link ContentFeedback}
8
+ */
9
+ sendFeedback(contentFeedback: ContentFeedback): Observable<boolean>;
10
+ /**
11
+ * This api is used to get the feedback about a content.
12
+ * <p>
13
+ * <p>On successful fetching the data, the response will return
14
+ * status as TRUE and with result type as {@link ContentFeedback}, if content has any feedback then the result will not be null,
15
+ * <p>
16
+ * On failing to fetch the data, the response will return status as FALSE with the following error.
17
+ *
18
+ * @param contentFeedbackFilterCriteria - {@link ContentFeedbackFilterCriteria}
19
+ */
20
+ getFeedback(contentFeedbackFilterCriteria: ContentFeedbackFilterCriteria): Observable<ContentFeedback[]>;
21
+ }
@@ -0,0 +1,46 @@
1
+ import { ChildContentRequest, ContentDelete, ContentDeleteRequest, ContentDetailRequest, ContentExportRequest, ContentImportRequest, ContentMarkerRequest, ContentRequest, ContentSearchCriteria, ContentSpaceUsageSummaryRequest, ContentSpaceUsageSummaryResponse, EcarImportRequest, RelevantContentRequest } from './requests';
2
+ import { ApiRequestHandler, Response } from '../../api';
3
+ import { Observable } from 'rxjs';
4
+ import { Content, HierarchyInfo } from './content';
5
+ import { ContentDeleteResponse, ContentExportResponse, ContentImportResponse, ContentSearchResult, RelevantContentResponsePlayer, SearchResponse } from './response';
6
+ import { DownloadCompleteDelegate } from '../../util/download/def/download-complete-delegate';
7
+ import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate';
8
+ import { ContentAggregator } from '../handlers/content-aggregator';
9
+ import { FormService } from '../../form';
10
+ import { CourseService } from '../../course';
11
+ import { ProfileService } from '../../profile';
12
+ import { SearchRequest } from "./search-request";
13
+ export interface ContentService extends DownloadCompleteDelegate, SdkServiceOnInitDelegate {
14
+ getContentDetails(request: ContentDetailRequest): Observable<Content>;
15
+ getContentHeirarchy(request: ContentDetailRequest): Observable<Content>;
16
+ getContents(criteria: ContentRequest): Observable<Content[]>;
17
+ getChildContents(childContentRequest: ChildContentRequest): Observable<Content>;
18
+ searchContent(criteria: ContentSearchCriteria, request?: {
19
+ [key: string]: any;
20
+ }, apiHandler?: ApiRequestHandler<SearchRequest, SearchResponse>, isFromContentAggregator?: boolean): Observable<ContentSearchResult>;
21
+ deleteContent(contentDeleteRequest: ContentDeleteRequest): Observable<ContentDeleteResponse[]>;
22
+ enqueueContentDelete(contentDeleteRequest: ContentDeleteRequest): Observable<void>;
23
+ clearContentDeleteQueue(): Observable<void>;
24
+ getContentDeleteQueue(): Observable<ContentDelete[]>;
25
+ prevContent(hierarchyInfo: HierarchyInfo[], currentContentIdentifier: string): Observable<Content>;
26
+ nextContent(hierarchyInfo: HierarchyInfo[], currentContentIdentifier: string): Observable<Content>;
27
+ getRelevantContent(relevantContentRequest: RelevantContentRequest): Observable<RelevantContentResponsePlayer>;
28
+ importEcar(ecarImportRequest: EcarImportRequest): Observable<ContentImportResponse[]>;
29
+ importContent(contentImportRequest: ContentImportRequest): Observable<ContentImportResponse[]>;
30
+ subscribeForImportStatus(contentId: string): Observable<Response>;
31
+ cancelImport(contentId: string): Observable<any>;
32
+ exportContent(contentExportRequest: ContentExportRequest): Observable<ContentExportResponse>;
33
+ getDownloadState(): Promise<Response>;
34
+ cancelDownload(contentId: string): Observable<undefined>;
35
+ setContentMarker(contentMarkerRequest: ContentMarkerRequest): Observable<boolean>;
36
+ getContentSpaceUsageSummary(contentSpaceUsageSummaryRequest: ContentSpaceUsageSummaryRequest): Observable<ContentSpaceUsageSummaryResponse[]>;
37
+ buildContentAggregator(formService: FormService, courseService: CourseService, profileService: ProfileService): ContentAggregator;
38
+ getQuestionList(questionIds: string[], parentId?: string): Observable<any>;
39
+ getQuestionSetHierarchy(data: any): Observable<any>;
40
+ getQuestionSetRead(contentId: string, params?: any): Observable<any>;
41
+ getQuestionSetChildren(questionSetId: string): Promise<any[]>;
42
+ formatSearchCriteria(requestMap: {
43
+ [key: string]: any;
44
+ }): ContentSearchCriteria;
45
+ downloadTranscriptFile(directory: any): Promise<any>;
46
+ }
@@ -0,0 +1,43 @@
1
+ import { Content as ContentData } from '@project-sunbird/client-services/models';
2
+ import { Rollup } from '../../telemetry';
3
+ import { ContentAccess } from '../../profile';
4
+ import { ContentMarker } from './response';
5
+ export { Content as ContentData, LicenseDetails, OriginData, Trackable, TrackingEnabled } from '@project-sunbird/client-services/models/content';
6
+ export interface Content {
7
+ identifier: string;
8
+ name: string;
9
+ contentData: ContentData;
10
+ mimeType: string;
11
+ basePath: string;
12
+ contentType: string;
13
+ referenceCount: number;
14
+ lastUpdatedTime: number;
15
+ isAvailableLocally: boolean;
16
+ isUpdateAvailable: boolean;
17
+ children?: Content[];
18
+ hierarchyInfo?: HierarchyInfo[];
19
+ sizeOnDevice: number;
20
+ lastUsedTime: number;
21
+ rollup?: Rollup;
22
+ contentFeedback?: ContentFeedback[];
23
+ contentAccess?: ContentAccess[];
24
+ contentMarker?: ContentMarker[];
25
+ primaryCategory?: string;
26
+ }
27
+ export interface ContentFeedback {
28
+ contentId: string;
29
+ rating: number;
30
+ comments: string;
31
+ createdAt?: number;
32
+ stageId?: string;
33
+ contentVersion: string;
34
+ }
35
+ export interface ContentFeedbackFilterCriteria {
36
+ uid: string;
37
+ contentId: string;
38
+ }
39
+ export interface HierarchyInfo {
40
+ identifier: string;
41
+ contentType: string;
42
+ primaryCategory?: string;
43
+ }
@@ -0,0 +1,219 @@
1
+ import { ContentData, SearchType } from '..';
2
+ import { Content, HierarchyInfo } from './content';
3
+ import { CorrelationData, Rollup } from '../../telemetry';
4
+ import { ContentImportResponse } from './response';
5
+ import { ContentEntry } from '../db/schema';
6
+ import { DownloadRequest } from '../../util/download';
7
+ import { CachedItemRequest } from '../../key-value-store';
8
+ export interface ContentAggregatorRequest extends CachedItemRequest {
9
+ applyFirstAvailableCombination?: {
10
+ [key in keyof ContentData]?: string[];
11
+ };
12
+ userPreferences?: {
13
+ [key: string]: string[] | string | undefined;
14
+ };
15
+ interceptSearchCriteria?: (searchCriteria: ContentSearchCriteria) => ContentSearchCriteria;
16
+ }
17
+ export interface ContentDecorateRequest {
18
+ content: Content;
19
+ attachFeedback?: boolean;
20
+ attachContentAccess?: boolean;
21
+ attachContentMarker?: boolean;
22
+ }
23
+ export interface ContentDetailRequest {
24
+ contentId: string;
25
+ objectType?: string;
26
+ emitUpdateIfAny?: boolean;
27
+ attachFeedback?: boolean;
28
+ attachContentAccess?: boolean;
29
+ attachContentMarker?: boolean;
30
+ }
31
+ export interface ContentRequest {
32
+ uid?: string | string[];
33
+ primaryCategories: string[];
34
+ audience?: string[];
35
+ pragma?: string[];
36
+ exclPragma?: string[];
37
+ attachFeedback?: boolean;
38
+ attachContentAccess?: boolean;
39
+ attachContentMarker?: boolean;
40
+ sortCriteria?: ContentSortCriteria[];
41
+ recentlyViewed?: boolean;
42
+ localOnly?: boolean;
43
+ resourcesOnly?: boolean;
44
+ limit?: number;
45
+ board?: string[];
46
+ medium?: string[];
47
+ grade?: string[];
48
+ dialcodes?: string[];
49
+ childNodes?: string[];
50
+ }
51
+ export interface ContentSortCriteria {
52
+ sortAttribute: string;
53
+ sortOrder: SortOrder;
54
+ }
55
+ export declare enum SortOrder {
56
+ ASC = "asc",
57
+ DESC = "desc"
58
+ }
59
+ export interface ChildContentRequest {
60
+ contentId: string;
61
+ hierarchyInfo: HierarchyInfo[];
62
+ level?: number;
63
+ }
64
+ export interface ContentDeleteRequest {
65
+ contentDeleteList: ContentDelete[];
66
+ }
67
+ export interface ContentDelete {
68
+ contentId: string;
69
+ isChildContent: boolean;
70
+ }
71
+ export interface EcarImportRequest {
72
+ isChildContent: boolean;
73
+ destinationFolder: string;
74
+ sourceFilePath: string;
75
+ correlationData: CorrelationData[];
76
+ rollUp?: Rollup;
77
+ identifier?: string;
78
+ }
79
+ export interface ContentImportRequest {
80
+ withPriority?: number;
81
+ contentImportArray: ContentImport[];
82
+ contentStatusArray: string[];
83
+ fields?: (keyof ContentData)[];
84
+ }
85
+ export interface ContentImport {
86
+ isChildContent: boolean;
87
+ destinationFolder: string;
88
+ contentId: string;
89
+ correlationData?: CorrelationData[];
90
+ rollUp?: Rollup;
91
+ }
92
+ export interface ContentExportRequest {
93
+ destinationFolder: string;
94
+ contentIds: string[];
95
+ saveLocally?: boolean;
96
+ subContentIds?: string[];
97
+ }
98
+ export interface ContentMarkerRequest {
99
+ contentId: string;
100
+ uid: string;
101
+ data: string;
102
+ extraInfo: {
103
+ [key: string]: any;
104
+ };
105
+ marker: MarkerType;
106
+ isMarked: boolean;
107
+ }
108
+ export declare enum MarkerType {
109
+ NOTHING = 0,
110
+ PREVIEWED = 1,
111
+ BOOKMARKED = 2
112
+ }
113
+ export interface ContentSearchCriteria {
114
+ query?: string;
115
+ exists?: string[];
116
+ offset?: number;
117
+ limit?: number;
118
+ mode?: string;
119
+ age?: number;
120
+ grade?: string[];
121
+ medium?: string[];
122
+ board?: string[];
123
+ createdBy?: string[];
124
+ audience?: string[];
125
+ channel?: string[];
126
+ purpose?: string[];
127
+ topic?: string[];
128
+ pragma?: string[];
129
+ exclPragma?: string[];
130
+ contentStatusArray?: string[];
131
+ facets?: string[];
132
+ contentTypes?: string[];
133
+ keywords?: string[];
134
+ dialCodes?: string[];
135
+ language?: string[];
136
+ offlineSearch?: boolean;
137
+ facetFilters?: ContentSearchFilter[];
138
+ impliedFilters?: ContentSearchFilter[];
139
+ impliedFiltersMap?: {
140
+ [key: string]: any;
141
+ }[];
142
+ sortCriteria?: ContentSortCriteria[];
143
+ searchType?: SearchType;
144
+ framework?: string;
145
+ languageCode?: string;
146
+ mimeType?: string[];
147
+ subject?: string[];
148
+ fields?: string[];
149
+ primaryCategories?: string[];
150
+ }
151
+ export interface ContentSearchFilter {
152
+ name: string;
153
+ values: FilterValue[];
154
+ }
155
+ export interface FilterValue {
156
+ name: string;
157
+ count?: number;
158
+ apply: boolean;
159
+ translations?: string;
160
+ description?: string;
161
+ index?: number;
162
+ values?: FilterValue[];
163
+ }
164
+ export interface ContentSortCriteria {
165
+ sortAttribute: string;
166
+ sortOrder: SortOrder;
167
+ }
168
+ export interface ImportContentContext {
169
+ isChildContent: boolean;
170
+ ecarFilePath: string;
171
+ destinationFolder: string;
172
+ metadata?: any;
173
+ manifestVersion?: string;
174
+ skippedItemsIdentifier?: string[];
175
+ items?: any[];
176
+ identifiers?: string[];
177
+ contentImportResponseList: ContentImportResponse[];
178
+ tmpLocation?: string;
179
+ rootIdentifier?: string;
180
+ correlationData?: CorrelationData[];
181
+ rollUp?: Rollup;
182
+ existedContentIdentifiers?: {
183
+ [identifier: string]: boolean;
184
+ };
185
+ contentIdsToDelete: Set<string>;
186
+ identifier?: string;
187
+ }
188
+ export interface ExportContentContext {
189
+ ecarFilePath?: string;
190
+ tmpLocationPath?: string;
191
+ destinationFolder: string;
192
+ items?: any[];
193
+ contentModelsToExport: ContentEntry.SchemaMap[];
194
+ metadata: {
195
+ [key: string]: any;
196
+ };
197
+ manifest?: any;
198
+ subContentIds?: string[];
199
+ }
200
+ export interface ContentDownloadRequest extends DownloadRequest {
201
+ contentMeta: Partial<Content>;
202
+ isChildContent?: boolean;
203
+ correlationData?: CorrelationData[];
204
+ rollUp?: Rollup;
205
+ }
206
+ export interface RelevantContentRequest extends DownloadRequest {
207
+ hierarchyInfo?: HierarchyInfo[];
208
+ contentIdentifier?: string;
209
+ next?: boolean;
210
+ prev?: boolean;
211
+ shouldConvertBasePath?: boolean;
212
+ }
213
+ export interface ContentSpaceUsageSummaryRequest {
214
+ paths: string[];
215
+ }
216
+ export interface ContentSpaceUsageSummaryResponse {
217
+ path: string;
218
+ sizeOnDevice: number;
219
+ }
@@ -0,0 +1,93 @@
1
+ import { ContentSearchCriteria, ContentSearchFilter } from './requests';
2
+ import { Content, ContentData } from './content';
3
+ import { ContentImportStatus } from '..';
4
+ import { Course } from '../../course/def/course';
5
+ import { ContentAggregation } from '../handlers/content-aggregator';
6
+ export interface ContentSearchResult {
7
+ id: string;
8
+ responseMessageId: string;
9
+ filterCriteria: ContentSearchCriteria;
10
+ request?: {
11
+ [key: string]: any;
12
+ };
13
+ contentDataList: ContentData[];
14
+ collectionDataList?: ContentData[];
15
+ count?: number;
16
+ }
17
+ export interface ContentAggregatorResponse {
18
+ result: ContentAggregation[];
19
+ }
20
+ export interface ContentsGroupedByPageSection {
21
+ name: string;
22
+ combination?: {
23
+ [key in keyof Content]?: string;
24
+ };
25
+ sections: PageSection[];
26
+ }
27
+ export interface PageSection {
28
+ count?: number;
29
+ name?: string;
30
+ contents?: ContentData[] | Course[];
31
+ display?: Display;
32
+ totalCount?: number;
33
+ }
34
+ export interface Display {
35
+ name: {
36
+ [key: string]: any;
37
+ };
38
+ }
39
+ export interface SearchResponse {
40
+ id: string;
41
+ params: {
42
+ resmsgid: string;
43
+ };
44
+ result: {
45
+ count: number;
46
+ content: ContentData[];
47
+ collections: ContentData[];
48
+ facets: ContentSearchFilter[];
49
+ QuestionSet?: ContentData[];
50
+ };
51
+ }
52
+ export interface ChildContent {
53
+ identifier: string;
54
+ name: string;
55
+ objectType: string;
56
+ relation: string;
57
+ index: number;
58
+ }
59
+ export interface ContentImportResponse {
60
+ identifier: string;
61
+ status: ContentImportStatus;
62
+ }
63
+ export interface ContentDeleteResponse {
64
+ identifier: string;
65
+ status: ContentDeleteStatus;
66
+ }
67
+ export declare enum ContentDeleteStatus {
68
+ NOT_FOUND = -1,
69
+ DELETED_SUCCESSFULLY = 1
70
+ }
71
+ export interface ContentMarker {
72
+ contentId: string;
73
+ uid: string;
74
+ extraInfoMap: {
75
+ [key: string]: any;
76
+ };
77
+ marker: number;
78
+ }
79
+ export interface ContentExportResponse {
80
+ exportedFilePath: string;
81
+ }
82
+ export interface RelevantContentResponse {
83
+ nextContent?: Content;
84
+ previousContent?: Content;
85
+ }
86
+ export interface RelevantContentResponsePlayer {
87
+ prev?: {
88
+ content: Content;
89
+ };
90
+ next?: {
91
+ content: Content;
92
+ };
93
+ }
@@ -0,0 +1,37 @@
1
+ import { SortOrder } from './requests';
2
+ export interface SearchRequest {
3
+ filters: SearchFilter;
4
+ fields?: string[];
5
+ query?: string;
6
+ offset?: number;
7
+ limit?: number;
8
+ mode?: string;
9
+ exists?: string[];
10
+ facets?: string[];
11
+ sort_by?: {
12
+ [key: string]: SortOrder;
13
+ };
14
+ }
15
+ export interface SearchFilter {
16
+ compatibilityLevel?: {
17
+ [key: string]: any;
18
+ };
19
+ identifier?: string[];
20
+ status?: string[];
21
+ objectType?: string[];
22
+ contentType?: string[];
23
+ keywords?: string[];
24
+ dialcodes?: string[];
25
+ createdBy?: string[];
26
+ gradeLevel?: string[];
27
+ medium?: string[];
28
+ board?: string[];
29
+ language?: string[];
30
+ topic?: string[];
31
+ purpose?: string[];
32
+ channel?: string[];
33
+ audience?: string[];
34
+ mimeType?: string[];
35
+ subject?: string[];
36
+ primaryCategory?: string[];
37
+ }
@@ -0,0 +1,166 @@
1
+ import { ContentAggregatorRequest, ContentAggregatorResponse, ContentData, ContentSearchCriteria, ContentService, ContentsGroupedByPageSection } from '..';
2
+ import { Observable } from 'rxjs';
3
+ import { CachedItemStore } from '../../key-value-store';
4
+ import { SearchRequest } from '../def/search-request';
5
+ import { FormRequest, FormService } from '../../form';
6
+ import { SearchContentHandler } from './search-content-handler';
7
+ import { CsContentGroup } from '@project-sunbird/client-services/services/content/utilities/content-group-generator';
8
+ import { CourseService } from '../../course';
9
+ import { ProfileService } from '../../profile';
10
+ import { ApiService, SerializedRequest } from '../../api';
11
+ import { NetworkInfoService } from '../../util/network';
12
+ declare type Primitive = string | number | boolean;
13
+ interface AggregationConfig {
14
+ filterBy?: {
15
+ [field in keyof ContentData]: {
16
+ operation: any;
17
+ value: any;
18
+ };
19
+ }[];
20
+ sortBy?: {
21
+ [field in keyof ContentData]: 'asc' | 'desc' | {
22
+ order: 'asc' | 'desc';
23
+ preference: Primitive[];
24
+ };
25
+ }[];
26
+ groupBy?: keyof ContentData;
27
+ groupSortBy?: {
28
+ [field in keyof CsContentGroup]: 'asc' | 'desc' | {
29
+ order: 'asc' | 'desc';
30
+ preference: Primitive[];
31
+ };
32
+ }[];
33
+ groupFilterBy?: {
34
+ [field in keyof CsContentGroup]: {
35
+ operation: any;
36
+ value: any;
37
+ };
38
+ }[];
39
+ }
40
+ export interface DataSourceModelMap {
41
+ 'CONTENTS': {
42
+ type: 'CONTENTS';
43
+ tag?: string;
44
+ request: Partial<SerializedRequest>;
45
+ mapping: {
46
+ applyFirstAvailableCombination?: boolean;
47
+ aggregate?: AggregationConfig;
48
+ }[];
49
+ };
50
+ 'TRACKABLE_COLLECTIONS': {
51
+ type: 'TRACKABLE_COLLECTIONS';
52
+ tag?: string;
53
+ request: Partial<SerializedRequest>;
54
+ mapping: {
55
+ aggregate?: AggregationConfig;
56
+ }[];
57
+ };
58
+ 'CONTENT_FACETS': {
59
+ type: 'CONTENT_FACETS';
60
+ tag?: string;
61
+ values?: DataResponseMap['CONTENT_FACETS'];
62
+ request: Partial<SerializedRequest>;
63
+ mapping: {
64
+ facet: string;
65
+ aggregate?: AggregationConfig;
66
+ filterPillBy?: string;
67
+ }[];
68
+ params?: any;
69
+ };
70
+ 'RECENTLY_VIEWED_CONTENTS': {
71
+ type: 'RECENTLY_VIEWED_CONTENTS';
72
+ tag?: string;
73
+ mapping: {
74
+ aggregate?: AggregationConfig;
75
+ }[];
76
+ };
77
+ 'CONTENT_DISCOVERY_BANNER': {
78
+ type: 'CONTENT_DISCOVERY_BANNER';
79
+ tag?: string;
80
+ values?: DataResponseMap['CONTENT_DISCOVERY_BANNER'];
81
+ mapping: {}[];
82
+ };
83
+ }
84
+ export interface DataResponseMap {
85
+ 'TRACKABLE_COLLECTIONS': ContentsGroupedByPageSection;
86
+ 'CONTENT_FACETS': {
87
+ facet: string;
88
+ index?: number;
89
+ searchCriteria: ContentSearchCriteria;
90
+ primaryFacetFilters?: any;
91
+ aggregate?: AggregationConfig;
92
+ }[];
93
+ 'RECENTLY_VIEWED_CONTENTS': ContentsGroupedByPageSection;
94
+ 'CONTENTS': ContentsGroupedByPageSection;
95
+ 'CONTENT_DISCOVERY_BANNER': {
96
+ code: string;
97
+ ui: {
98
+ background: string;
99
+ text: string;
100
+ };
101
+ action: {
102
+ type: string;
103
+ subType: string;
104
+ params: any;
105
+ };
106
+ expiry: string;
107
+ }[];
108
+ }
109
+ export declare type DataSourceType = keyof DataSourceModelMap;
110
+ export interface AggregatorConfigField<T extends DataSourceType = any> {
111
+ dataSrc: DataSourceModelMap[T];
112
+ sections: {
113
+ index: number;
114
+ code: string;
115
+ description?: string;
116
+ title: string;
117
+ theme: any;
118
+ isEnabled: boolean;
119
+ landingDetails?: {
120
+ title?: string;
121
+ description?: string;
122
+ };
123
+ }[];
124
+ }
125
+ export interface ContentAggregation<T extends DataSourceType = any> {
126
+ index: number;
127
+ title: string;
128
+ description?: string;
129
+ landingDetails?: {
130
+ title?: string;
131
+ description?: string;
132
+ };
133
+ data: DataResponseMap[T];
134
+ dataSrc: DataSourceModelMap[T];
135
+ theme: any;
136
+ meta?: {
137
+ filterCriteria?: ContentSearchCriteria;
138
+ searchRequest?: SearchRequest;
139
+ searchCriteria?: ContentSearchCriteria;
140
+ };
141
+ }
142
+ export declare class ContentAggregator {
143
+ private searchContentHandler;
144
+ private formService;
145
+ private contentService;
146
+ private cachedItemStore;
147
+ private courseService;
148
+ private profileService;
149
+ private apiService;
150
+ private networkInfoService;
151
+ private static searchContentCache;
152
+ private static CONTENT_AGGREGATION_KEY;
153
+ private static buildRequestHash;
154
+ constructor(searchContentHandler: SearchContentHandler, formService: FormService, contentService: ContentService, cachedItemStore: CachedItemStore, courseService: CourseService, profileService: ProfileService, apiService: ApiService, networkInfoService: NetworkInfoService);
155
+ aggregate(request: ContentAggregatorRequest, excludeDataSrc: DataSourceType[], formRequest?: FormRequest, formFields?: AggregatorConfigField[], cacheable?: boolean): Observable<ContentAggregatorResponse>;
156
+ private buildRecentlyViewedTask;
157
+ private buildContentDiscoveryBannerTask;
158
+ private buildFacetsTask;
159
+ private buildTrackableCollectionsTask;
160
+ private buildContentSearchTask;
161
+ private buildFilterByCriteria;
162
+ private buildSortByCriteria;
163
+ private buildSearchRequestAndCriteria;
164
+ private searchContents;
165
+ }
166
+ export {};
@@ -0,0 +1,5 @@
1
+ import { ContentFeedback } from '..';
2
+ import { ContentFeedbackEntry } from '../db/schema';
3
+ export declare class ContentFeedbackHandler {
4
+ static mapFeedbackDBEntrytoResponseFeedback(feedback: ContentFeedbackEntry.SchemaMap): ContentFeedback;
5
+ }
@@ -0,0 +1,10 @@
1
+ import { DbService } from '../../db';
2
+ import { ContentMarker } from '..';
3
+ import { Observable } from 'rxjs';
4
+ import { ContentMarkerEntry } from '../db/schema';
5
+ export declare class ContentMarkerHandler {
6
+ private dbService;
7
+ constructor(dbService: DbService);
8
+ getContentMarker(identifier: string, uid: string): Observable<ContentMarker[]>;
9
+ mapDBEntriesToContentMarkerDetails(markersInDb: ContentMarkerEntry.SchemaMap[]): ContentMarker[];
10
+ }
@@ -0,0 +1,9 @@
1
+ import { DbService } from '../../db';
2
+ import { ContentSpaceUsageSummaryResponse } from '..';
3
+ import { Observable } from 'rxjs';
4
+ export declare class ContentStorageHandler {
5
+ private dbService;
6
+ constructor(dbService: DbService);
7
+ getUsgaeSpace(path: string): Observable<number>;
8
+ getContentUsageSummary(paths: string[]): Promise<ContentSpaceUsageSummaryResponse[]>;
9
+ }
@@ -0,0 +1,18 @@
1
+ import { DbService } from '../../db';
2
+ import { ContentEntry } from '../db/schema';
3
+ import { FileService } from '../../util/file/def/file-service';
4
+ import { SharedPreferences } from '../../util/shared-preferences';
5
+ export declare class DeleteContentHandler {
6
+ private dbService;
7
+ private fileService;
8
+ private sharedPreferences;
9
+ private updateNewContentModels;
10
+ private fileMapList;
11
+ constructor(dbService: DbService, fileService: FileService, sharedPreferences: SharedPreferences);
12
+ deleteAllChildren(row: ContentEntry.SchemaMap, isChildContent: boolean): Promise<void>;
13
+ deleteOrUpdateContent(contentInDb: ContentEntry.SchemaMap, isChildItems: boolean, isChildContent: boolean): Promise<void>;
14
+ private findAllContentsFromDbWithIdentifiers;
15
+ /** @internal */
16
+ private rm;
17
+ private getMetaData;
18
+ }
@@ -0,0 +1,8 @@
1
+ import { FileService } from '../../../util/file/def/file-service';
2
+ import { Response } from '../../../api';
3
+ import { ExportContentContext } from '../..';
4
+ export declare class CleanTempLoc {
5
+ private fileService;
6
+ constructor(fileService: FileService);
7
+ execute(exportContext: ExportContentContext): Promise<Response>;
8
+ }