@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,60 @@
1
+ export declare const CsInjectionTokens: {
2
+ HTTP_SERVICE: symbol;
3
+ GROUP_SERVICE: symbol;
4
+ COURSE_SERVICE: symbol;
5
+ USER_SERVICE: symbol;
6
+ DISCUSSION_SERVICE: symbol;
7
+ CONTENT_SERVICE: symbol;
8
+ NOTIFICATION_SERVICE_V2: symbol;
9
+ CERTIFICATE_SERVICE: symbol;
10
+ };
11
+ export declare const InjectionTokens: {
12
+ CONTAINER: symbol;
13
+ DB_VERSION: symbol;
14
+ DB_MIGRATION_LIST: symbol;
15
+ SDK_CONFIG: symbol;
16
+ DEVICE_INFO: symbol;
17
+ SHARED_PREFERENCES: symbol;
18
+ EVENTS_BUS_SERVICE: symbol;
19
+ DB_SERVICE: symbol;
20
+ APP_INFO: symbol;
21
+ API_SERVICE: symbol;
22
+ AUTH_SERVICE: symbol;
23
+ FILE_SERVICE: symbol;
24
+ SYSTEM_SETTINGS_SERVICE: symbol;
25
+ FRAMEWORK_SERVICE: symbol;
26
+ PROFILE_SERVICE: symbol;
27
+ GROUP_SERVICE: symbol;
28
+ GROUP_SERVICE_DEPRECATED: symbol;
29
+ ZIP_SERVICE: symbol;
30
+ TELEMETRY_SERVICE: symbol;
31
+ CONTENT_FEEDBACK_SERVICE: symbol;
32
+ FORM_SERVICE: symbol;
33
+ PAGE_ASSEMBLE_SERVICE: symbol;
34
+ FRAMEWORK_UTIL_SERVICE: symbol;
35
+ DOWNLOAD_SERVICE: symbol;
36
+ CONTENT_SERVICE: symbol;
37
+ COURSE_SERVICE: symbol;
38
+ SUMMARIZER_SERVICE: symbol;
39
+ PLAYER_SERVICE: symbol;
40
+ CACHED_ITEM_STORE: symbol;
41
+ KEY_VALUE_STORE: symbol;
42
+ TELEMETRY_DECORATOR: symbol;
43
+ STORAGE_SERVICE: symbol;
44
+ NOTIFICATION_SERVICE: symbol;
45
+ ERROR_LOGGER_SERVICE: symbol;
46
+ NETWORKINFO_SERVICE: symbol;
47
+ SEARCH_HISTORY_SERVICE: symbol;
48
+ CODEPUSH_EXPERIMENT_SERVICE: symbol;
49
+ FAQ_SERVICE: symbol;
50
+ DEVICE_REGISTER_SERVICE: symbol;
51
+ CONTENT_RATING_SERVICE: symbol;
52
+ ARCHIVE_SERVICE: symbol;
53
+ NETWORK_QUEUE: symbol;
54
+ CLASS_ROOM_SERVICE: symbol;
55
+ DISCUSSION_SERVICE: symbol;
56
+ SEGMENTATION_SERVICE: symbol;
57
+ DEBUGGING_SERVICE: symbol;
58
+ NOTIFICATION_SERVICE_V2: symbol;
59
+ CERTIFICATE_SERVICE: symbol;
60
+ };
@@ -0,0 +1,12 @@
1
+ export declare namespace KeyValueStoreEntry {
2
+ const _ID = "_id";
3
+ const TABLE_NAME = "no_sql";
4
+ const COLUMN_NAME_KEY = "key";
5
+ const COLUMN_NAME_VALUE = "value";
6
+ const getCreateEntry: (() => string);
7
+ const getDeleteEntry: (() => string);
8
+ interface SchemaMap {
9
+ [COLUMN_NAME_KEY]: string;
10
+ [COLUMN_NAME_VALUE]: string;
11
+ }
12
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum CachedItemRequestSourceFrom {
2
+ SERVER = "server",
3
+ CACHE = "cache"
4
+ }
5
+ export interface CachedItemRequest {
6
+ from?: CachedItemRequestSourceFrom;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { Observable } from 'rxjs';
2
+ export interface CachedItemStore {
3
+ /**
4
+ * @param id: identifier of the cached item
5
+ * @param noSqlkey: prefix for noSQL store
6
+ * @param timeToLiveKey: prefix for preferences store
7
+ * @param fromServer: function returning server-request-observable for the item
8
+ * @param initial?: optional function returning initial-source-observable for the item; typically a file
9
+ * @param timeToLive?: optional timeToLive override in milliseconds
10
+ * @param emptyCondition?: optional emptyCondition predicate - when true, item won't be cached
11
+ * */
12
+ getCached<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
13
+ get<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { Observable } from 'rxjs';
2
+ export interface KeyValueStore {
3
+ setValue(key: string, value: string): Observable<boolean>;
4
+ getValue(key: string): Observable<string | undefined>;
5
+ }
@@ -0,0 +1,19 @@
1
+ import { CachedItemStore, KeyValueStore } from '..';
2
+ import { Observable } from 'rxjs';
3
+ import { SharedPreferences } from '../../util/shared-preferences';
4
+ import { SdkConfig } from '../../sdk-config';
5
+ export declare class CachedItemStoreImpl implements CachedItemStore {
6
+ private sdkConfig;
7
+ private keyValueStore;
8
+ private sharedPreferences;
9
+ private apiConfig;
10
+ constructor(sdkConfig: SdkConfig, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences);
11
+ private static isItemEmpty;
12
+ get<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
13
+ getCached<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
14
+ private isItemCachedInDb;
15
+ private isItemTTLExpired;
16
+ private saveItem;
17
+ private saveItemTTL;
18
+ private saveItemToDb;
19
+ }
@@ -0,0 +1,9 @@
1
+ import { KeyValueStore } from '..';
2
+ import { DbService } from '../../db';
3
+ import { Observable } from 'rxjs';
4
+ export declare class KeyValueStoreImpl implements KeyValueStore {
5
+ private dbService;
6
+ constructor(dbService: DbService);
7
+ getValue(key: string): Observable<string | undefined>;
8
+ setValue(key: string, value: string): Observable<boolean>;
9
+ }
@@ -0,0 +1,3 @@
1
+ export * from './def/key-value-store';
2
+ export * from './def/cached-item-store';
3
+ export * from './def/cached-item-request';
@@ -0,0 +1,21 @@
1
+ export declare namespace NotificationEntry {
2
+ const _ID = "_id";
3
+ const TABLE_NAME = "notifications";
4
+ const COLUMN_NAME_MESSAGE_ID = "message_id";
5
+ const COLUMN_NAME_EXPIRY_TIME = "expiry_time";
6
+ const COLUMN_NAME_NOTIFICATION_DISPLAY_TIME = "display_time";
7
+ const COLUMN_NAME_NOTIFICATION_RECEIVED_AT = "received_at";
8
+ const COLUMN_NAME_NOTIFICATION_JSON = "notification_json";
9
+ const COLUMN_NAME_IS_READ = "is_read";
10
+ interface SchemaMap {
11
+ [COLUMN_NAME_MESSAGE_ID]: number;
12
+ [COLUMN_NAME_EXPIRY_TIME]: number;
13
+ [COLUMN_NAME_EXPIRY_TIME]: number;
14
+ [COLUMN_NAME_NOTIFICATION_DISPLAY_TIME]: number;
15
+ [COLUMN_NAME_NOTIFICATION_RECEIVED_AT]?: number;
16
+ [COLUMN_NAME_NOTIFICATION_JSON]?: string;
17
+ [COLUMN_NAME_IS_READ]?: number;
18
+ }
19
+ const getCreateEntry: (() => string);
20
+ const deleteTable: (() => string);
21
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Notification, NotificationFilterCriteria } from './requests';
3
+ import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate';
4
+ export interface NotificationService extends SdkServiceOnInitDelegate {
5
+ notifications$: Observable<Notification[]>;
6
+ addNotification(notification: Notification): Observable<boolean>;
7
+ updateNotification(notification: Notification): Observable<boolean>;
8
+ getAllNotifications(criteria: NotificationFilterCriteria): Observable<Notification[]>;
9
+ deleteNotification(notification: Notification): Observable<boolean>;
10
+ deleteAllNotifications(): Observable<boolean>;
11
+ }
@@ -0,0 +1,32 @@
1
+ export interface NotificationFilterCriteria {
2
+ notificationStatus: NotificationStatus;
3
+ }
4
+ export declare enum NotificationType {
5
+ ACTIONABLE_NOTIFICATION = 1,
6
+ NOTIFY = 2,
7
+ CONFIG = 3
8
+ }
9
+ export interface Notification {
10
+ id: number | string;
11
+ source?: 'FCM' | 'USER_FEED';
12
+ type: NotificationType;
13
+ displayTime: number;
14
+ expiry: number;
15
+ isRead: number;
16
+ actionData: ActionData;
17
+ }
18
+ export interface ActionData {
19
+ actionType: string;
20
+ title: string;
21
+ identifier: string;
22
+ ctaText: string;
23
+ deepLink: string;
24
+ thumbnail: string;
25
+ banner: string;
26
+ deploymentKey: string;
27
+ }
28
+ export declare enum NotificationStatus {
29
+ READ = "read",
30
+ UNREAD = "unread",
31
+ ALL = "all"
32
+ }
@@ -0,0 +1,9 @@
1
+ import { Notification, NotificationFilterCriteria } from '..';
2
+ import { NotificationEntry } from '../db/schema';
3
+ export declare class NotificationHandler {
4
+ static constructNotificationDBModel(notification: Notification): NotificationEntry.SchemaMap;
5
+ static getFilterForNotification(criteria: NotificationFilterCriteria): {
6
+ table: string;
7
+ orderBy: string;
8
+ };
9
+ }
@@ -0,0 +1,26 @@
1
+ import { Notification, NotificationFilterCriteria, NotificationService } from '..';
2
+ import { DbService } from '../../db';
3
+ import { SharedPreferences } from '../../util/shared-preferences';
4
+ import { Observable, Subject } from 'rxjs';
5
+ import { ProfileService } from '../../profile';
6
+ import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate';
7
+ import { KeyValueStore } from '../../key-value-store';
8
+ export declare class NotificationServiceImpl implements NotificationService, SdkServiceOnInitDelegate {
9
+ private dbService;
10
+ private sharedPreferences;
11
+ private profileService;
12
+ private keyValueStore;
13
+ private static readonly USER_NOTIFICATION_FEED_KEY;
14
+ constructor(dbService: DbService, sharedPreferences: SharedPreferences, profileService: ProfileService, keyValueStore: KeyValueStore);
15
+ private _notifications$;
16
+ private _notificationTrigger$;
17
+ readonly notifications$: Subject<Notification[]>;
18
+ onInit(): Observable<undefined>;
19
+ addNotification(notification: Notification): Observable<boolean>;
20
+ deleteNotification(notification: Notification): Observable<boolean>;
21
+ getAllNotifications(criteria: NotificationFilterCriteria): Observable<Notification[]>;
22
+ updateNotification(notification: Notification): Observable<boolean>;
23
+ deleteAllNotifications(): Observable<boolean>;
24
+ private fetchNotificationAndUserFeed;
25
+ private triggerNotificationChange;
26
+ }
@@ -0,0 +1,2 @@
1
+ export * from './def/requests';
2
+ export * from './def/notification-service';
@@ -0,0 +1,8 @@
1
+ import { CsNotificationServiceConfig } from "@project-sunbird/client-services";
2
+ import { CsNotificationDeleteReq, CsNotificationReadResponse, CsNotificationUpdateReq } from "@project-sunbird/client-services/services/notification/interface/cs-notification-service";
3
+ import { Observable } from "rxjs";
4
+ export interface NotificationServiceV2 {
5
+ notificationRead(uid: string, config?: CsNotificationServiceConfig): Observable<CsNotificationReadResponse>;
6
+ notificationUpdate(req: CsNotificationUpdateReq, config?: CsNotificationServiceConfig): Observable<any>;
7
+ notificationDelete(req: CsNotificationDeleteReq, config?: CsNotificationServiceConfig): Observable<any>;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { CsAttachForumResponse } from "@project-sunbird/client-services/services/discussion";
2
+ import { Container } from "inversify";
3
+ import { Observable } from "rxjs";
4
+ import { CsCreateUserResponse } from "@project-sunbird/client-services/services/discussion";
5
+ import { CsNotificationDeleteReq, CsNotificationReadResponse, CsNotificationUpdateReq } from "@project-sunbird/client-services/services/notification/interface/cs-notification-service";
6
+ import { NotificationServiceV2 } from "../def/notification-service-v2";
7
+ export declare class NotificationServiceV2Impl implements NotificationServiceV2 {
8
+ private container;
9
+ constructor(container: Container);
10
+ private readonly NotificationServiceV2Delegate;
11
+ notificationRead(uid: string): Observable<CsNotificationReadResponse>;
12
+ notificationUpdate(request: CsNotificationUpdateReq): Observable<CsCreateUserResponse>;
13
+ notificationDelete(request: CsNotificationDeleteReq): Observable<CsAttachForumResponse>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './def/notification-service-v2';
@@ -0,0 +1,3 @@
1
+ export interface OpenRapConfigurable {
2
+ host?: string;
3
+ }
package/package.json ADDED
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "@aastrika_npmjs/sunbird-sdk",
3
+ "version": "5.1.1",
4
+ "description": "Heart of the sunbird mobile app.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "lint": "tslint --config ./tslint.json --project ./tsconfig.json",
8
+ "test": "jest",
9
+ "test:coverage": "jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx}",
10
+ "test:ci": "jest --silent --ci --w 2 --collectCoverage=true --coverageReporters=lcov",
11
+ "test:ci-json": "jest --ci --w 2 --collectCoverage=true --coverageReporters=json",
12
+ "build:prod": "rm -rf dist && NODE_ENV=production webpack --verbose true --progress true --cache false --output-file index.js && cp ./package.json ./LICENSE ./README.md ./dist",
13
+ "build:analyze": "webpack --verbose true --progress true --cache false --profile --json > stats.json && npx webpack-bundle-analyzer ./stats.json",
14
+ "build:dev": "rm -rf tmp && mkdir tmp && cp ./package-dev.json ./tmp/package.json && tsc -w --outDir ./tmp"
15
+ },
16
+ "author": "",
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "crypto-js": "3.1.9-1",
20
+ "dayjs": "^1.8.20",
21
+ "inversify": "^5.1.1",
22
+ "jsonwebtoken": "^8.5.1",
23
+ "node-fetch": "2.6.7",
24
+ "pako": "^1.0.11",
25
+ "qs": "^6.9.7",
26
+ "reflect-metadata": "^0.1.13",
27
+ "typescript-collections": "^1.3.3",
28
+ "uuid": "^3.4.0",
29
+ "whatwg-fetch": "^3.6.2"
30
+ },
31
+ "peerDependencies": {
32
+ "@project-sunbird/client-services": "3.6.x",
33
+ "rxjs": ">=6",
34
+ "cordova-plugin-advanced-http": "^2.0.2",
35
+ "cordova-plugin-file": "^6.0.1",
36
+ "cordova-plugin-awesome-shared-preferences": "^0.1.0",
37
+ "cordova-plugin-inappbrowser": "3.0.0",
38
+ "sb-cordova-plugin-customtabs": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs.git",
39
+ "sb-cordova-plugin-db": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git",
40
+ "jjdltc-cordova-plugin-zip": "git+https://github.com/swayangjit/jjdltc-cordova-plugin-zip.git",
41
+ "cordova-plugin-android-downloadmanager": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git",
42
+ "sb-cordova-plugin-utility": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git"
43
+ },
44
+ "devDependencies": {
45
+ "@project-sunbird/client-services": "5.1.0",
46
+ "@types/jest": "^25.2.3",
47
+ "@types/node": "12.0.2",
48
+ "@types/node-fetch": "2.5.4",
49
+ "@types/pako": "^1.0.4",
50
+ "@types/websql": "0.0.27",
51
+ "cordova-plugin-android-downloadmanager": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git",
52
+ "jest": "^25.5.4",
53
+ "rxjs": "^6.6.7",
54
+ "ts-jest": "^25.5.1",
55
+ "ts-loader": "^8.2.0",
56
+ "ts-mockito": "^2.6.1",
57
+ "tsickle": "^0.27.2",
58
+ "tslib": "^1.14.1",
59
+ "tslint": "^5.20.1",
60
+ "typescript": "2.9.1",
61
+ "webpack": "^4.46.0",
62
+ "webpack-cli": "^3.3.12"
63
+ },
64
+ "browser": {
65
+ "crypto": false
66
+ },
67
+ "jest": {
68
+ "globals": {
69
+ "ts-jest": {
70
+ "tsConfig": "tsconfig.spec.json"
71
+ }
72
+ },
73
+ "browser": false,
74
+ "rootDir": "./",
75
+ "roots": [
76
+ "<rootDir>/src/"
77
+ ],
78
+ "moduleDirectories": [
79
+ "node_modules"
80
+ ],
81
+ "testPathIgnorePatterns": [
82
+ "/node_modules/"
83
+ ],
84
+ "coveragePathIgnorePatterns": [
85
+ "<rootDir>/src/util/file/impl",
86
+ "<rootDir>/src/codepush-experiment",
87
+ "<rootDir>/src/util/shared-preferences/impl/shared-preferences-local-storage",
88
+ "<rootDir>/src/group-deprecated"
89
+ ],
90
+ "testMatch": [
91
+ "**/?(*.)(spec).ts"
92
+ ],
93
+ "restoreMocks": true,
94
+ "moduleFileExtensions": [
95
+ "js",
96
+ "jsx",
97
+ "json",
98
+ "ts",
99
+ "tsx"
100
+ ],
101
+ "setupFiles": [
102
+ "./src/__test__/setup.ts",
103
+ "./src/__test__/cordova-mocks.js"
104
+ ],
105
+ "transform": {
106
+ "^.+\\.(ts)$": "ts-jest"
107
+ },
108
+ "coverageReporters": [
109
+ "text",
110
+ "json"
111
+ ],
112
+ "transformIgnorePatterns": []
113
+ }
114
+ }
@@ -0,0 +1,4 @@
1
+ import { OpenRapConfigurable } from '../../open-rap-configurable';
2
+ export interface PageServiceConfig extends OpenRapConfigurable {
3
+ apiPath: string;
4
+ }
@@ -0,0 +1,7 @@
1
+ import { PageAssembleCriteria, SetPageAssembleChannelRequest } from './requests';
2
+ import { Observable } from 'rxjs';
3
+ import { PageAssemble } from './page-assemble';
4
+ export interface PageAssembleService {
5
+ setPageAssembleChannel(request: SetPageAssembleChannelRequest): void;
6
+ getPageAssemble(criteria: PageAssembleCriteria): Observable<PageAssemble>;
7
+ }
@@ -0,0 +1,5 @@
1
+ export { PageSection as PageSections } from '@project-sunbird/client-services/models';
2
+ import { Page as PageAssembleModel } from '@project-sunbird/client-services/models';
3
+ export interface PageAssemble extends PageAssembleModel {
4
+ ssoSectionId?: string;
5
+ }
@@ -0,0 +1,41 @@
1
+ import { CachedItemRequest } from '../../key-value-store';
2
+ export interface PageAssembleFilter {
3
+ subject?: Array<string>;
4
+ board?: Array<string>;
5
+ domain?: Array<string>;
6
+ medium?: Array<string>;
7
+ gradeLevel?: Array<string>;
8
+ language?: Array<string>;
9
+ concepts?: Array<string>;
10
+ contentType?: Array<string>;
11
+ primaryCategory?: Array<string>;
12
+ ageGroup?: Array<string>;
13
+ ownership?: Array<string>;
14
+ dialcodes?: string;
15
+ 'batches.createdFor'?: string[];
16
+ }
17
+ export interface PageAssembleProfile {
18
+ board: string[];
19
+ }
20
+ export interface SetPageAssembleChannelRequest {
21
+ channelId: string;
22
+ }
23
+ export interface PageAssembleCriteria extends CachedItemRequest {
24
+ organisationId?: string;
25
+ name: PageName;
26
+ source?: 'app' | 'web';
27
+ mode?: 'soft' | 'hard';
28
+ filters?: PageAssembleFilter;
29
+ userProfile?: PageAssembleProfile;
30
+ sections?: {
31
+ [sectionId: string]: {
32
+ filters?: PageAssembleFilter;
33
+ };
34
+ };
35
+ }
36
+ export declare enum PageName {
37
+ RESOURCE = "Resource",
38
+ COURSE = "Course",
39
+ ANONYMOUS_COURSE = "AnonymousCourse",
40
+ DIAL_CODE = "DIAL Code Consumption"
41
+ }
@@ -0,0 +1,18 @@
1
+ import { ApiRequestHandler } from '../../../api';
2
+ import { PageAssembleCriteria } from '../..';
3
+ import { PageAssemble } from '../..';
4
+ import { Observable } from 'rxjs';
5
+ import { DefaultRequestDelegate } from './default-request-delegate';
6
+ import { AuthService } from '../../../auth';
7
+ import { FrameworkService } from '../../../framework';
8
+ import { SystemSettingsService } from '../../../system-settings';
9
+ export declare class CourseRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
10
+ private defaultDelegate;
11
+ private authService;
12
+ private frameworkService;
13
+ private systemSettingsService;
14
+ private static readonly SSO_COURSE_SECTION_ID;
15
+ private ssoSectionIdMap;
16
+ constructor(defaultDelegate: DefaultRequestDelegate, authService: AuthService, frameworkService: FrameworkService, systemSettingsService: SystemSettingsService);
17
+ handle(request: PageAssembleCriteria): Observable<PageAssemble>;
18
+ }
@@ -0,0 +1,28 @@
1
+ import { ApiRequestHandler, ApiService } from '../../../api';
2
+ import { PageAssembleCriteria, PageServiceConfig } from '../..';
3
+ import { PageAssemble } from '../../index';
4
+ import { CachedItemStore, KeyValueStore } from '../../../key-value-store';
5
+ import { Observable } from 'rxjs';
6
+ import { SharedPreferences } from '../../../util/shared-preferences';
7
+ import { AuthService } from '../../../auth';
8
+ import { ProfileService } from '../../../profile';
9
+ import { SystemSettingsService } from '../../../system-settings';
10
+ export declare class DefaultRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
11
+ private apiService;
12
+ private pageApiServiceConfig;
13
+ private sharedPreferences;
14
+ private cachedItemStore;
15
+ private keyValueStore;
16
+ private authService;
17
+ private profileService;
18
+ private systemSettingsService;
19
+ private readonly PAGE_ASSEMBLE_LOCAL_KEY;
20
+ private readonly PAGE_ASSEMBLE_ENDPOINT;
21
+ private readonly DIALCODE_ASSEMBLE_ENDPOINT;
22
+ private static readonly SYSTEM_SETTINGS_TENANT_COURSE_PAGE_ID;
23
+ private static getIdForDb;
24
+ constructor(apiService: ApiService, pageApiServiceConfig: PageServiceConfig, sharedPreferences: SharedPreferences, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, authService: AuthService, profileService: ProfileService, systemSettingsService: SystemSettingsService);
25
+ handle(request: PageAssembleCriteria): Observable<PageAssemble>;
26
+ private fetchFromServer;
27
+ private fetchFromCache;
28
+ }
@@ -0,0 +1,15 @@
1
+ import { ApiRequestHandler } from '../../../api';
2
+ import { PageAssembleCriteria } from '../..';
3
+ import { PageAssemble } from '../..';
4
+ import { Observable } from 'rxjs';
5
+ import { DefaultRequestDelegate } from './default-request-delegate';
6
+ import { DbService } from '../../../db';
7
+ export declare class DialcodeRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
8
+ private defaultDelegate;
9
+ private dbService;
10
+ constructor(defaultDelegate: DefaultRequestDelegate, dbService: DbService);
11
+ handle(request: PageAssembleCriteria): Observable<PageAssemble>;
12
+ private buildPageAssembleWithLocalContents;
13
+ private mergePageAssembleWithLocalContents;
14
+ private mergePageAssembleWithLocalCollections;
15
+ }
@@ -0,0 +1,27 @@
1
+ import { ApiRequestHandler, ApiService } from '../../api';
2
+ import { PageAssemble, PageAssembleCriteria, PageServiceConfig } from '..';
3
+ import { CachedItemStore, KeyValueStore } from '../../key-value-store';
4
+ import { Observable } from 'rxjs';
5
+ import { SharedPreferences } from '../../util/shared-preferences';
6
+ import { AuthService } from '../../auth';
7
+ import { FrameworkService } from '../../framework';
8
+ import { SystemSettingsService } from '../../system-settings';
9
+ import { DbService } from '../../db';
10
+ import { ProfileService } from '../../profile';
11
+ export declare class PageAssemblerFactory implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
12
+ private apiService;
13
+ private pageApiServiceConfig;
14
+ private cachedItemStore;
15
+ private keyValueStore;
16
+ private sharedPreferences;
17
+ private frameworkService;
18
+ private authService;
19
+ private systemSettingsService;
20
+ private dbService;
21
+ private profileService;
22
+ private readonly defaultRequestDelegate;
23
+ private readonly dialcodeRequestDelegate;
24
+ private readonly courseRequestDelegate;
25
+ constructor(apiService: ApiService, pageApiServiceConfig: PageServiceConfig, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences, frameworkService: FrameworkService, authService: AuthService, systemSettingsService: SystemSettingsService, dbService: DbService, profileService: ProfileService);
26
+ handle(request: PageAssembleCriteria): Observable<PageAssemble>;
27
+ }
@@ -0,0 +1,28 @@
1
+ import { PageAssembleCriteria, PageAssembleService, SetPageAssembleChannelRequest } from '..';
2
+ import { PageAssemble } from '..';
3
+ import { Observable } from 'rxjs';
4
+ import { ApiService } from '../../api';
5
+ import { CachedItemStore, KeyValueStore } from '../../key-value-store';
6
+ import { SharedPreferences } from '../../util/shared-preferences';
7
+ import { SdkConfig } from '../../sdk-config';
8
+ import { FrameworkService } from '../../framework';
9
+ import { AuthService } from '../../auth';
10
+ import { ProfileService } from '../../profile';
11
+ import { SystemSettingsService } from '../../system-settings';
12
+ import { DbService } from '../../db';
13
+ export declare class PageAssembleServiceImpl implements PageAssembleService {
14
+ private apiService;
15
+ private sdkConfig;
16
+ private cachedItemStore;
17
+ private keyValueStore;
18
+ private sharedPreferences;
19
+ private frameworkService;
20
+ private authService;
21
+ private systemSettingsService;
22
+ private dbService;
23
+ private profileService;
24
+ private pageAssembleServiceConfig;
25
+ constructor(apiService: ApiService, sdkConfig: SdkConfig, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences, frameworkService: FrameworkService, authService: AuthService, systemSettingsService: SystemSettingsService, dbService: DbService, profileService: ProfileService);
26
+ setPageAssembleChannel(request: SetPageAssembleChannelRequest): void;
27
+ getPageAssemble(criteria: PageAssembleCriteria): Observable<PageAssemble>;
28
+ }
@@ -0,0 +1,4 @@
1
+ export * from './def/page-assemble-service';
2
+ export * from './def/requests';
3
+ export * from './def/page-assemble';
4
+ export * from './config/page-service-config';
@@ -0,0 +1,9 @@
1
+ export declare namespace PartnerEntry {
2
+ const _ID = "_id";
3
+ const TABLE_NAME = "partners";
4
+ const COLUMN_NAME_PARTNER_ID = "partnerID";
5
+ const COLUMN_NAME_KEY = "publicKey";
6
+ const COLUMN_NAME_KEY_ID = "publicKeyID";
7
+ const getCreateEntry: (() => string);
8
+ const getDeleteEntry: (() => string);
9
+ }
@@ -0,0 +1,27 @@
1
+ export declare namespace PlayerConfigEntry {
2
+ const TABLE_NAME = "player_data";
3
+ const _ID = "_id";
4
+ const COLUMN_NAME_USER_ID = "user_id";
5
+ const COLUMN_PARENT_IDENTIFIER = "parent_identifier";
6
+ const COLUMN_IDENTIFIER = "identifier";
7
+ const COLUMN_PLAYER_CONFIG = "player_config";
8
+ interface SchemaMap {
9
+ [COLUMN_NAME_USER_ID]: string;
10
+ [COLUMN_PARENT_IDENTIFIER]: string;
11
+ [COLUMN_IDENTIFIER]: string;
12
+ [COLUMN_PLAYER_CONFIG]: string;
13
+ }
14
+ const getCreateEntry: (() => string);
15
+ const deleteTable: (() => string);
16
+ const getAlterEntryForPlayerConfig: (() => string);
17
+ }
18
+ export interface PlayerSaveState {
19
+ userId: string;
20
+ parentId: string;
21
+ contentId: string;
22
+ saveState: string;
23
+ }
24
+ export declare class PlayerDbEntryMapper {
25
+ static mapPlayerDbEntryToPlayer(playerEntry: PlayerConfigEntry.SchemaMap): PlayerSaveState;
26
+ static mapPlayerStateToPlayerDbEntry(userId: string, parentId: string, contentId: string, saveState: string): PlayerConfigEntry.SchemaMap;
27
+ }
@@ -0,0 +1,10 @@
1
+ import { Content } from '../../content';
2
+ import { Observable } from 'rxjs';
3
+ import { PlayerInput } from './response';
4
+ export interface PlayerService {
5
+ getPlayerConfig(content: Content, extraInfo: {
6
+ [key: string]: any;
7
+ }): Observable<PlayerInput>;
8
+ savePlayerState(userId: string, parentId: string, identifier: string, saveState: string): any;
9
+ deletePlayerSaveState(userId: string, parentId: string, contentId: string): any;
10
+ }