@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,7 @@
1
+ export declare enum DownloadStatus {
2
+ STATUS_FAILED = 16,
3
+ STATUS_PAUSED = 4,
4
+ STATUS_PENDING = 1,
5
+ STATUS_RUNNING = 2,
6
+ STATUS_SUCCESSFUL = 8
7
+ }
@@ -0,0 +1,20 @@
1
+ export interface DownloadRequest {
2
+ withPriority?: number;
3
+ downloadId?: string;
4
+ title?: string;
5
+ identifier: string;
6
+ downloadUrl: string;
7
+ mimeType: string;
8
+ destinationFolder: string;
9
+ filename: string;
10
+ downloadedFilePath?: string;
11
+ }
12
+ export interface DownloadCancelRequest {
13
+ identifier: string;
14
+ }
15
+ export interface TrackDownloadRequest {
16
+ groupBy: {
17
+ fieldPath: string;
18
+ value: any;
19
+ };
20
+ }
@@ -0,0 +1,5 @@
1
+ import { DownloadRequest } from './requests';
2
+ export interface DownloadTracking {
3
+ completed: DownloadRequest[];
4
+ queued: DownloadRequest[];
5
+ }
@@ -0,0 +1,38 @@
1
+ import { DownloadCancelRequest, DownloadRequest, DownloadService, TrackDownloadRequest } from '..';
2
+ import { Observable } from 'rxjs';
3
+ import { SdkServiceOnInitDelegate } from '../../../sdk-service-on-init-delegate';
4
+ import { EventsBusService } from '../../../events-bus';
5
+ import { SharedPreferences } from '../../shared-preferences';
6
+ import { DownloadCompleteDelegate } from '../def/download-complete-delegate';
7
+ import { ContentDeleteListener } from '../../../content/def/content-delete-listener';
8
+ import { DownloadTracking } from '../def/response';
9
+ export declare class DownloadServiceImpl implements DownloadService, SdkServiceOnInitDelegate, ContentDeleteListener {
10
+ private eventsBusService;
11
+ private sharedPreferences;
12
+ private static readonly KEY_TO_DOWNLOAD_LIST;
13
+ private static readonly DOWNLOAD_DIR_NAME;
14
+ private currentDownloadRequest$;
15
+ private downloadCompleteDelegate?;
16
+ private sharedPreferencesSetCollection;
17
+ private completedDownloadRequestsCache;
18
+ constructor(eventsBusService: EventsBusService, sharedPreferences: SharedPreferences);
19
+ private static generateDownloadStartTelemetry;
20
+ private static generateDownloadCompleteTelemetry;
21
+ private static generateDownloadCancelTelemetry;
22
+ onInit(): Observable<undefined>;
23
+ download(downloadRequests: DownloadRequest[]): Observable<undefined>;
24
+ cancel(downloadCancelRequest: DownloadCancelRequest, generateTelemetry?: boolean): Observable<undefined>;
25
+ cancelAll(): Observable<void>;
26
+ registerOnDownloadCompleteDelegate(downloadCompleteDelegate: DownloadCompleteDelegate): void;
27
+ getActiveDownloadRequests(): Observable<DownloadRequest[]>;
28
+ private switchToNextDownloadRequest;
29
+ private addToDownloadList;
30
+ private removeFromDownloadList;
31
+ private removeAllFromDownloadList;
32
+ private handleDownloadCompletion;
33
+ private emitProgressInEventBus;
34
+ private getDownloadProgress;
35
+ private listenForDownloadProgressChanges;
36
+ trackDownloads(downloadStatRequest: TrackDownloadRequest): Observable<DownloadTracking>;
37
+ onContentDelete(identifier: string): void;
38
+ }
@@ -0,0 +1,5 @@
1
+ export * from './def/download-event';
2
+ export * from './def/download-service';
3
+ export * from './def/download-status';
4
+ export * from './def/requests';
5
+ export * from './def/response';
@@ -0,0 +1,4 @@
1
+ export interface Encoder<E, D> {
2
+ encode(arg: E): D;
3
+ decode(arg: D): E;
4
+ }
@@ -0,0 +1,5 @@
1
+ import { Encoder } from './encoder';
2
+ export declare class Utf8ToB64Encoder implements Encoder<string, string> {
3
+ decode(arg: string): string;
4
+ encode(arg: string): string;
5
+ }
@@ -0,0 +1,2 @@
1
+ export interface FileConfig {
2
+ }
@@ -0,0 +1,21 @@
1
+ import { DirectoryEntry, Entry, FileEntry, Flags, IWriteOptions, Metadata, RemoveResult } from '../index';
2
+ export interface FileService {
3
+ readAsText(path: string, file: string): Promise<string>;
4
+ readAsBinaryString(path: string, file: string): Promise<string>;
5
+ readFileFromAssets(fileName: string): Promise<string>;
6
+ writeFile(path: string, fileName: string, text: string, options: IWriteOptions): Promise<string>;
7
+ createFile(path: string, fileName: string, replace: boolean): Promise<FileEntry>;
8
+ removeFile(path: string): Promise<RemoveResult>;
9
+ getFile(directoryEntry: DirectoryEntry, fileName: string, flags: Flags): Promise<FileEntry>;
10
+ createDir(path: string, replace: boolean): Promise<DirectoryEntry>;
11
+ listDir(directoryPath: string): Promise<Entry[]>;
12
+ removeDir(path: string, dirName: string): Promise<RemoveResult>;
13
+ removeRecursively(path: string): Promise<RemoveResult>;
14
+ copyDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<Entry>;
15
+ copyFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<Entry>;
16
+ getMetaData(path: string): Promise<Metadata>;
17
+ exists(path: string): Promise<Entry>;
18
+ getTempLocation(destinationPath: string): Promise<DirectoryEntry>;
19
+ getFreeDiskSpace(): Promise<number>;
20
+ getDirectorySize(path: string): Promise<number>;
21
+ }
@@ -0,0 +1,4 @@
1
+ import { SunbirdError } from '../../../sunbird-error';
2
+ export declare class NoFileFoundError extends SunbirdError {
3
+ constructor(message: string);
4
+ }
@@ -0,0 +1,98 @@
1
+ import { FileService } from '../def/file-service';
2
+ import { DirectoryEntry, Entry, FileEntry, Flags, IWriteOptions, Metadata, RemoveResult } from '../index';
3
+ export declare class FileServiceImpl implements FileService {
4
+ private fileSystem;
5
+ private initialized;
6
+ init(): void;
7
+ readAsText(path: string, filePath: string): Promise<string>;
8
+ readAsBinaryString(path: string, filePath: string): Promise<string>;
9
+ readFileFromAssets(fileName: string): Promise<string>;
10
+ writeFile(path: string, fileName: string, text: string, options?: IWriteOptions): Promise<any>;
11
+ /**
12
+ * Creates a new file in the specific path.
13
+ * The replace boolean value determines whether to replace an existing file with the same name.
14
+ * If an existing file exists and the replace value is false, the promise will fail and return an error.
15
+ *
16
+ * @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
17
+ * @param {string} fileName Name of file to create
18
+ * @param {boolean} replace If true, replaces file with same name. If false returns error
19
+ * @returns {Promise<FileEntry>} Returns a Promise that resolves to a FileEntry or rejects with an error.
20
+ */
21
+ createFile(path: string, fileName: string, replace: boolean): Promise<FileEntry>;
22
+ getFile(directoryEntry: DirectoryEntry, fileName: string, flags: Flags): Promise<FileEntry>;
23
+ /**
24
+ * Removes a file from a desired location.
25
+ *
26
+ * @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
27
+ * @returns {Promise<RemoveResult>} Returns a Promise that resolves to a RemoveResult or rejects with an error.
28
+ */
29
+ removeFile(path: string): Promise<RemoveResult>;
30
+ createDir(path: string, replace: boolean): Promise<DirectoryEntry>;
31
+ /**
32
+ * List files and directory from a given path.
33
+ *
34
+ * @param {string} directoryPath. Please refer to the iOS and Android filesystems above
35
+ * @returns {Promise<Entry[]>} Returns a Promise that resolves to an array of Entry objects or rejects with an error.
36
+ */
37
+ listDir(directoryPath: string): Promise<Entry[]>;
38
+ removeDir(path: string, dirName: string): Promise<RemoveResult>;
39
+ /**
40
+ * Removes all files and the directory from a desired location.
41
+ *
42
+ * @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
43
+ * @returns {Promise<RemoveResult>} Returns a Promise that resolves with a RemoveResult or rejects with an error.
44
+ */
45
+ removeRecursively(path: string): Promise<RemoveResult>;
46
+ /**
47
+ * Copy a directory in various methods. If destination directory exists, will fail to copy.
48
+ *
49
+ * @param {string} path Base FileSystem. Please refer to the iOS and Android filesystems above
50
+ * @param {string} dirName Name of directory to copy
51
+ * @param {string} newPath Base FileSystem of new location
52
+ * @param {string} newDirName New name of directory to copy to (leave blank to remain the same)
53
+ * @returns {Promise<Entry>} Returns a Promise that resolves to the new Entry object or rejects with an error.
54
+ */
55
+ copyDir(path: string, dirName: string, newPath: string, newDirName: string): Promise<Entry>;
56
+ /**
57
+ * Copy a file in various methods. If file exists, will fail to copy.
58
+ *
59
+ * @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
60
+ * @param {string} fileName Name of file to copy
61
+ * @param {string} newPath Base FileSystem of new location
62
+ * @param {string} newFileName New name of file to copy to (leave blank to remain the same)
63
+ * @returns {Promise<Entry>} Returns a Promise that resolves to an Entry or rejects with an error.
64
+ */
65
+ copyFile(path: string, fileName: string, newPath: string, newFileName: string): Promise<Entry>;
66
+ exists(path: string): Promise<Entry>;
67
+ getTempLocation(destinationPath: string): Promise<DirectoryEntry>;
68
+ getFreeDiskSpace(): Promise<number>;
69
+ /**
70
+ * Resolves a local file system URL
71
+ * @param fileUrl {string} file system url
72
+ * @returns {Promise<Entry>}
73
+ */
74
+ resolveLocalFilesystemUrl(fileUrl: string): Promise<Entry>;
75
+ getMetaData(path: string | Entry): Promise<Metadata>;
76
+ getExternalApplicationStorageDirectory(): string;
77
+ getDirectorySize(path: string): Promise<number>;
78
+ size(entry: Entry): Promise<number>;
79
+ private readEntries;
80
+ private readFile;
81
+ private resolveDirectoryUrl;
82
+ private remove;
83
+ private copy;
84
+ private getDirectory;
85
+ private rimraf;
86
+ private createWriter;
87
+ /**
88
+ * Write content to FileEntry.
89
+ * @hidden
90
+ * Write to an existing file.
91
+ * @param {FileEntry} fe file entry object
92
+ * @param {string | Blob | ArrayBuffer} text text content or blob to write
93
+ * @param {IWriteOptions} options replace file if set to true. See WriteOptions for more information.
94
+ * @returns {Promise<FileEntry>} Returns a Promise that resolves to updated file entry or rejects with an error.
95
+ */
96
+ private writeFileEntry;
97
+ private write;
98
+ }
@@ -0,0 +1,271 @@
1
+ /** This interface represents a file system. */
2
+ export interface FileSystem {
3
+ name: string;
4
+ /** The root directory of the file system. */
5
+ root: DirectoryEntry;
6
+ }
7
+ /**
8
+ * An abstract interface representing entries in a file system,
9
+ * each of which may be a File or DirectoryEntry.
10
+ */
11
+ export interface Entry {
12
+ /** Entry is a file. */
13
+ isFile: boolean;
14
+ /** Entry is a directory. */
15
+ isDirectory: boolean;
16
+ /** The name of the entry, excluding the path leading to it. */
17
+ name: string;
18
+ /** The full absolute path from the root to the entry. */
19
+ fullPath: string;
20
+ /** The file system on which the entry resides. */
21
+ filesystem: FileSystem;
22
+ nativeURL: string;
23
+ /**
24
+ * Look up metadata about this entry.
25
+ * @param successCallback A callback that is called with the time of the last modification.
26
+ * @param errorCallback A callback that is called when errors happen.
27
+ */
28
+ getMetadata(successCallback: (metadata: Metadata) => void, errorCallback?: (error: FileError) => void): void;
29
+ /**
30
+ * Move an entry to a different location on the file system. It is an error to try to:
31
+ * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different
32
+ * from its current one isn't provided;
33
+ * move a file to a path occupied by a directory;
34
+ * move a directory to a path occupied by a file;
35
+ * move any element to a path occupied by a directory which is not empty.
36
+ * A move of a file on top of an existing file must attempt to delete and replace that file.
37
+ * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory.
38
+ * @param parent The directory to which to move the entry.
39
+ * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified.
40
+ * @param successCallback A callback that is called with the Entry for the new location.
41
+ * @param errorCallback A callback that is called when errors happen.
42
+ */
43
+ moveTo(parent: DirectoryEntry, newName?: string, successCallback?: (entry: Entry) => void, errorCallback?: (error: FileError) => void): void;
44
+ /**
45
+ * Copy an entry to a different location on the file system. It is an error to try to:
46
+ * copy a directory inside itself or to any child at any depth;
47
+ * copy an entry into its parent if a name different from its current one isn't provided;
48
+ * copy a file to a path occupied by a directory;
49
+ * copy a directory to a path occupied by a file;
50
+ * copy any element to a path occupied by a directory which is not empty.
51
+ * A copy of a file on top of an existing file must attempt to delete and replace that file.
52
+ * A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory.
53
+ * Directory copies are always recursive--that is, they copy all contents of the directory.
54
+ * @param parent The directory to which to move the entry.
55
+ * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified.
56
+ * @param successCallback A callback that is called with the Entry for the new object.
57
+ * @param errorCallback A callback that is called when errors happen.
58
+ */
59
+ copyTo(parent: DirectoryEntry, newName?: string, successCallback?: (entry: Entry) => void, errorCallback?: (error: FileError) => void): void;
60
+ /**
61
+ * Returns a URL that can be used as the src attribute of a <video> or <audio> tag.
62
+ * If that is not possible, construct a cdvfile:// URL.
63
+ * @return string URL
64
+ */
65
+ toURL(): string;
66
+ /**
67
+ * Return a URL that can be passed across the bridge to identify this entry.
68
+ * @return string URL that can be passed across the bridge to identify this entry
69
+ */
70
+ toInternalURL(): string;
71
+ /**
72
+ * Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete
73
+ * the root directory of a filesystem.
74
+ * @param successCallback A callback that is called on success.
75
+ * @param errorCallback A callback that is called when errors happen.
76
+ */
77
+ remove(successCallback: () => void, errorCallback?: (error: FileError) => void): void;
78
+ /**
79
+ * Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself.
80
+ * @param successCallback A callback that is called with the time of the last modification.
81
+ * @param errorCallback A callback that is called when errors happen.
82
+ */
83
+ getParent(successCallback: (entry: Entry) => void, errorCallback?: (error: FileError) => void): void;
84
+ }
85
+ /** This interface supplies information about the state of a file or directory. */
86
+ export interface Metadata {
87
+ /** This is the time at which the file or directory was last modified. */
88
+ modificationTime: Date;
89
+ /** The size of the file, in bytes. This must return 0 for directories. */
90
+ size: number;
91
+ }
92
+ /** This interface represents a directory on a file system. */
93
+ export interface DirectoryEntry extends Entry {
94
+ /**
95
+ * Creates a new DirectoryReader to read Entries from this Directory.
96
+ */
97
+ createReader(): DirectoryReader;
98
+ /**
99
+ * Creates or looks up a file.
100
+ * @param path Either an absolute path or a relative path from this DirectoryEntry
101
+ * to the file to be looked up or created.
102
+ * It is an error to attempt to create a file whose immediate parent does not yet exist.
103
+ * @param options If create and exclusive are both true, and the path already exists, getFile must fail.
104
+ * If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file
105
+ * and return a corresponding FileEntry.
106
+ * If create is not true and the path doesn't exist, getFile must fail.
107
+ * If create is not true and the path exists, but is a directory, getFile must fail.
108
+ * Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.
109
+ * @param successCallback A callback that is called to return the File selected or created.
110
+ * @param errorCallback A callback that is called when errors happen.
111
+ */
112
+ getFile(path: string, options?: Flags, successCallback?: (entry: FileEntry) => void, errorCallback?: (error: FileError) => void): void;
113
+ /**
114
+ * Creates or looks up a directory.
115
+ * @param path Either an absolute path or a relative path from this DirectoryEntry
116
+ * to the directory to be looked up or created.
117
+ * It is an error to attempt to create a directory whose immediate parent does not yet exist.
118
+ * @param options If create and exclusive are both true and the path already exists, getDirectory must fail.
119
+ * If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a
120
+ * corresponding DirectoryEntry.
121
+ * If create is not true and the path doesn't exist, getDirectory must fail.
122
+ * If create is not true and the path exists, but is a file, getDirectory must fail.
123
+ * Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path.
124
+ * @param successCallback A callback that is called to return the Directory selected or created.
125
+ * @param errorCallback A callback that is called when errors happen.
126
+ */
127
+ getDirectory(path: string, options?: Flags, successCallback?: (entry: DirectoryEntry) => void, errorCallback?: (error: FileError) => void): void;
128
+ /**
129
+ * Deletes a directory and all of its contents, if any. In the event of an error (e.g. trying
130
+ * to delete a directory that contains a file that cannot be removed), some of the contents
131
+ * of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem.
132
+ * @param successCallback A callback that is called on success.
133
+ * @param errorCallback A callback that is called when errors happen.
134
+ */
135
+ removeRecursively(successCallback: () => void, errorCallback?: (error: FileError) => void): void;
136
+ }
137
+ /**
138
+ * This dictionary is used to supply arguments to methods
139
+ * that look up or create files or directories.
140
+ */
141
+ export interface Flags {
142
+ /** Used to indicate that the user wants to create a file or directory if it was not previously there. */
143
+ create?: boolean;
144
+ /** By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path
145
+ * already exists. */
146
+ exclusive?: boolean;
147
+ }
148
+ /**
149
+ * This interface lets a user list files and directories in a directory. If there are
150
+ * no additions to or deletions from a directory between the first and last call to
151
+ * readEntries, and no errors occur, then:
152
+ * A series of calls to readEntries must return each entry in the directory exactly once.
153
+ * Once all entries have been returned, the next call to readEntries must produce an empty array.
154
+ * If not all entries have been returned, the array produced by readEntries must not be empty.
155
+ * The entries produced by readEntries must not include the directory itself ["."] or its parent [".."].
156
+ */
157
+ export interface DirectoryReader {
158
+ /**
159
+ * Read the next block of entries from this directory.
160
+ * @param successCallback Called once per successful call to readEntries to deliver the next
161
+ * previously-unreported set of Entries in the associated Directory.
162
+ * If all Entries have already been returned from previous invocations
163
+ * of readEntries, successCallback must be called with a zero-length array as an argument.
164
+ * @param errorCallback A callback indicating that there was an error reading from the Directory.
165
+ */
166
+ readEntries(successCallback: (entries: Entry[]) => void, errorCallback?: (error: FileError) => void): void;
167
+ }
168
+ /** This interface represents a file on a file system. */
169
+ export interface FileEntry extends Entry {
170
+ /**
171
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
172
+ * @param successCallback A callback that is called with the new FileWriter.
173
+ * @param errorCallback A callback that is called when errors happen.
174
+ */
175
+ createWriter(successCallback: (writer: FileWriter) => void, errorCallback?: (error: FileError) => void): void;
176
+ /**
177
+ * Returns a File that represents the current state of the file that this FileEntry represents.
178
+ * @param successCallback A callback that is called with the File.
179
+ * @param errorCallback A callback that is called when errors happen.
180
+ */
181
+ file(successCallback: (file: File) => void, errorCallback?: (error: FileError) => void): void;
182
+ }
183
+ /**
184
+ * This interface provides methods to monitor the asynchronous writing of blobs
185
+ * to disk using progress events and event handler attributes.
186
+ */
187
+ interface FileSaver extends EventTarget {
188
+ /**
189
+ * The FileSaver object can be in one of 3 states. The readyState attribute, on getting,
190
+ * must return the current state, which must be one of the following values:
191
+ * INIT
192
+ * WRITING
193
+ * DONE
194
+ */
195
+ readyState: number;
196
+ /** Handler for writestart events. */
197
+ onwritestart: (event: ProgressEvent) => void;
198
+ /** Handler for progress events. */
199
+ onprogress: (event: ProgressEvent) => void;
200
+ /** Handler for write events. */
201
+ onwrite: (event: ProgressEvent) => void;
202
+ /** Handler for abort events. */
203
+ onabort: (event: ProgressEvent) => void;
204
+ /** Handler for error events. */
205
+ onerror: (event: ProgressEvent) => void;
206
+ /** Handler for writeend events. */
207
+ onwriteend: (event: ProgressEvent) => void;
208
+ /** The last error that occurred on the FileSaver. */
209
+ error: Error;
210
+ /** Terminate file operation */
211
+ abort(): void;
212
+ }
213
+ /**
214
+ * This interface expands on the FileSaver interface to allow for multiple write
215
+ * actions, rather than just saving a single Blob.
216
+ */
217
+ export interface FileWriter extends FileSaver {
218
+ /**
219
+ * The byte offset at which the next write to the file will occur. This always less or equal than length.
220
+ * A newly-created FileWriter will have position set to 0.
221
+ */
222
+ position: number;
223
+ /**
224
+ * The length of the file. If the user does not have read access to the file,
225
+ * this will be the highest byte offset at which the user has written.
226
+ */
227
+ length: number;
228
+ /**
229
+ * Write the supplied data to the file at position.
230
+ * @param {Blob|string} data The blob to write.
231
+ */
232
+ write(data: Blob | string): void;
233
+ /**
234
+ * The file position at which the next write will occur.
235
+ * @param offset If nonnegative, an absolute byte offset into the file.
236
+ * If negative, an offset back from the end of the file.
237
+ */
238
+ seek(offset: number): void;
239
+ /**
240
+ * Changes the length of the file to that specified. If shortening the file, data beyond the new length
241
+ * will be discarded. If extending the file, the existing data will be zero-padded up to the new length.
242
+ * @param size The size to which the length of the file is to be adjusted, measured in bytes.
243
+ */
244
+ truncate(size: number): void;
245
+ }
246
+ export interface FileError {
247
+ /** Error code */
248
+ code: number;
249
+ }
250
+ export interface RemoveResult {
251
+ success: boolean;
252
+ fileRemoved: Entry;
253
+ }
254
+ /**
255
+ * When an error occurs, the following callback is made.
256
+ */
257
+ export declare type ErrorCallback = (err: FileError) => void;
258
+ /**
259
+ * This export interface is the callback used to look up Entry objects.
260
+ */
261
+ export declare type EntryCallback = (entry: Entry) => void;
262
+ export declare enum LocalFileSystem {
263
+ PERSISTENT = 1,
264
+ TEMPORARY = 0
265
+ }
266
+ export interface IWriteOptions {
267
+ replace?: boolean;
268
+ append?: boolean;
269
+ truncate?: number;
270
+ }
271
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare class FileUtil {
2
+ static getFileExtension(filePath: string): string;
3
+ static getFileName(filePath: string): string;
4
+ static getParentDir(directoryPath: string): string;
5
+ static getDirectoryName(filePath: string): string;
6
+ static getTempDirPath(externalFilesDir: string): string;
7
+ static isFreeSpaceAvailable(deviceAvailableFreeSpace: number, fileSpace: number, bufferSize: number): boolean;
8
+ static getDirecory(path: string): string;
9
+ }
@@ -0,0 +1,6 @@
1
+ export declare class Path {
2
+ static ASSETS_PATH: string;
3
+ static dirPathFromFilePath(filePath: string): string;
4
+ static fileNameFromFilePath(filePath: string): string;
5
+ static getAssetPath(): string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface Comparator<V> {
2
+ isEqual(v: V): boolean;
3
+ }
@@ -0,0 +1,11 @@
1
+ import { ListNode } from './list-node';
2
+ import { Comparator } from './comparator';
3
+ export declare class LinkedList<T extends Comparator<T>> {
4
+ protected head: ListNode<T>;
5
+ constructor();
6
+ static fromJson(json: string): LinkedList<any>;
7
+ add(value: T): void;
8
+ search(value: T): ListNode<T> | null;
9
+ forEach(consumer: Function): void;
10
+ toJson(): string;
11
+ }
@@ -0,0 +1,6 @@
1
+ export declare class ListNode<T> {
2
+ private _next;
3
+ private _value;
4
+ next: ListNode<T>;
5
+ value: T;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { Observable } from 'rxjs';
2
+ import { NetworkStatus } from './network-status';
3
+ export interface NetworkInfoService {
4
+ networkStatus$: Observable<NetworkStatus>;
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum NetworkStatus {
2
+ ONLINE = "ONLINE",
3
+ OFFLINE = "OFFLINE"
4
+ }
@@ -0,0 +1,7 @@
1
+ import { NetworkInfoService, NetworkStatus } from '..';
2
+ import { Observable } from 'rxjs';
3
+ export declare class NetworkInfoServiceImpl implements NetworkInfoService {
4
+ networkStatus$: Observable<NetworkStatus>;
5
+ private networkStatusSource;
6
+ constructor();
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './def/network-info-service';
2
+ export * from './def/network-status';
@@ -0,0 +1,5 @@
1
+ export declare class NumberUtil {
2
+ static toFixed(input: any): number;
3
+ static parseInt(input: any): number;
4
+ static round(input: any): number;
5
+ }
@@ -0,0 +1,7 @@
1
+ export declare class ObjectUtil {
2
+ static equals(a: any, b: any): boolean;
3
+ static getPropDiff(newObj: {}, oldObj: {}): string[];
4
+ static getTruthyProps(obj: {}): string[];
5
+ static toOrderedString(obj: {}): string;
6
+ static withDeeplyOrderedKeys(obj: {}): {};
7
+ }
@@ -0,0 +1,8 @@
1
+ import { LinkedList } from '../list/linked-list';
2
+ import { ListNode } from '../list/list-node';
3
+ import { Comparator } from '../list/comparator';
4
+ export declare class Queue<T extends Comparator<T>> extends LinkedList<T> {
5
+ constructor();
6
+ enque(value: T): void;
7
+ deque(): ListNode<T>;
8
+ }
@@ -0,0 +1,17 @@
1
+ export declare namespace SearchHistoryEntry {
2
+ const TABLE_NAME = "search_history";
3
+ const _ID = "_id";
4
+ const COLUMN_NAME_USER_ID = "uid";
5
+ const COLUMN_NAME_QUERY = "query";
6
+ const COLUMN_NAME_TIME_STAMP = "time_stamp";
7
+ const COLUMN_NAME_NAMESPACE = "namespace";
8
+ interface SchemaMap {
9
+ [_ID]?: string;
10
+ [COLUMN_NAME_USER_ID]: string;
11
+ [COLUMN_NAME_QUERY]: string;
12
+ [COLUMN_NAME_TIME_STAMP]: number;
13
+ [COLUMN_NAME_NAMESPACE]: string;
14
+ }
15
+ const getCreateEntry: (() => string);
16
+ const deleteTable: (() => string);
17
+ }
@@ -0,0 +1,9 @@
1
+ export interface AddEntryRequest {
2
+ query: string;
3
+ namespace: string;
4
+ }
5
+ export interface GetEntriesRequest {
6
+ namespace: string;
7
+ like?: string;
8
+ limit: number;
9
+ }
@@ -0,0 +1,5 @@
1
+ export interface SearchEntry {
2
+ uid: string;
3
+ query: string;
4
+ timestamp: number;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AddEntryRequest, GetEntriesRequest } from './requests';
3
+ import { SearchEntry } from './search-entry';
4
+ export interface SearchHistoryService {
5
+ addEntry(request: AddEntryRequest): Observable<undefined>;
6
+ getEntries(request: GetEntriesRequest): Observable<SearchEntry[]>;
7
+ }
@@ -0,0 +1,13 @@
1
+ import { SearchEntry, SearchHistoryService } from '..';
2
+ import { Observable } from 'rxjs';
3
+ import { AddEntryRequest, GetEntriesRequest } from '../def/requests';
4
+ import { DbService } from '../../../db';
5
+ import { ProfileService } from '../../../profile';
6
+ export declare class SearchHistoryServiceImpl implements SearchHistoryService {
7
+ private dbService;
8
+ private profileService;
9
+ private static MAX_USER_SEARCH_HISTORY_ENTRIES;
10
+ constructor(dbService: DbService, profileService: ProfileService);
11
+ addEntry({ query, namespace }: AddEntryRequest): Observable<undefined>;
12
+ getEntries({ like, limit, namespace }: GetEntriesRequest): Observable<SearchEntry[]>;
13
+ }