├── src ├── db │ ├── db-constants.ts │ ├── config │ │ └── db-config.ts │ ├── util │ │ ├── unique-id.ts │ │ ├── unique-id.spec.ts │ │ └── query-builder.spec.ts │ ├── index.ts │ └── def │ │ └── db-constants.ts ├── util │ ├── app │ │ ├── index.ts │ │ └── def │ │ │ └── app-info.ts │ ├── device │ │ └── index.ts │ ├── list │ │ ├── comparator.ts │ │ └── list-node.ts │ ├── network │ │ ├── index.ts │ │ └── def │ │ │ ├── network-status.ts │ │ │ └── network-info-service.ts │ ├── search-history │ │ ├── index.ts │ │ ├── def │ │ │ ├── search-entry.ts │ │ │ ├── requests.ts │ │ │ └── search-history-service.ts │ │ └── impl │ │ │ └── __snapshots__ │ │ │ └── search-history-service-impl.spec.ts.snap │ ├── file │ │ ├── config │ │ │ └── file-config.ts │ │ ├── errors │ │ │ └── no-file-found.ts │ │ └── util │ │ │ └── path.spec.ts │ ├── encoders │ │ ├── encoder.ts │ │ └── utf8-to-b64-encoder.ts │ ├── shared-preferences │ │ ├── index.ts │ │ ├── config │ │ │ └── shared-prefernces-config.ts │ │ └── def │ │ │ └── shared-preferences.ts │ ├── download │ │ ├── def │ │ │ ├── response.ts │ │ │ ├── download-status.ts │ │ │ ├── download-complete-delegate.ts │ │ │ └── requests.ts │ │ └── index.ts │ ├── zip │ │ └── def │ │ │ └── zip-service.ts │ ├── number-util.ts │ └── queue │ │ └── queue.ts ├── errors │ ├── index.ts │ └── validation-error.ts ├── discussion │ └── index.ts ├── error │ ├── index.ts │ ├── config │ │ └── error-logger-config.ts │ ├── def │ │ ├── error-stack.ts │ │ └── error-logger-service.ts │ └── impl │ │ └── error-logger-service-impl.spec.data.ts ├── archive │ ├── export │ │ ├── index.ts │ │ ├── def │ │ │ ├── telemetry-archive-package-meta.ts │ │ │ └── archive-export-delegate.ts │ │ └── error │ │ │ ├── invalid-request-error.ts │ │ │ ├── object-not-found-error.ts │ │ │ └── export-assertion-error.ts │ ├── import │ │ ├── index.ts │ │ ├── error │ │ │ ├── invalid-archive-error.ts │ │ │ ├── unknown-object-error.ts │ │ │ └── import-assertion-error.ts │ │ └── def │ │ │ └── archive-import-delegate.ts │ └── index.ts ├── notification-v2 │ └── index.ts ├── __test__ │ ├── setup.ts │ └── mocks.ts ├── .DS_Store ├── course │ ├── def │ │ ├── batch.ts │ │ ├── course.ts │ │ ├── download-certificate-response.ts │ │ ├── download-certificate-request.ts │ │ ├── unenrollCourseRequest.ts │ │ ├── course-batches-response.ts │ │ ├── update-content-state-response.ts │ │ ├── update-course-content-state-request.ts │ │ ├── get-enrolled-course-response.ts │ │ ├── get-certificate-request.ts │ │ └── get-learner-certificate-response.ts │ ├── config │ │ └── course-service-config.ts │ ├── errors │ │ ├── no-certificate-found.ts │ │ └── certificate-already-downloaded.ts │ ├── impl │ │ └── course-service-impl.spec.data.ts │ └── index.ts ├── faq │ ├── def │ │ ├── faq.ts │ │ ├── get-faq-request.ts │ │ └── faq-service.ts │ ├── config │ │ └── faq-service-config.ts │ └── index.ts ├── framework │ ├── def │ │ ├── channel.ts │ │ ├── organization.ts │ │ ├── framework.ts │ │ ├── suggested-framework.ts │ │ └── responses.ts │ ├── errors │ │ └── no-active-channel-found-error.ts │ ├── config │ │ └── framework-service-config.ts │ └── index.ts ├── open-rap-configurable.ts ├── api │ ├── network-queue │ │ └── index.ts │ ├── def │ │ └── api-request-handler.ts │ ├── config │ │ └── app-config.ts │ └── util │ │ └── jwt.util.ts ├── form │ ├── def │ │ ├── models.ts │ │ ├── form-service.ts │ │ └── form-request.ts │ ├── config │ │ └── form-service-config.ts │ ├── index.ts │ └── impl │ │ └── form-service-impl.spec.data.ts ├── notification │ └── index.ts ├── player │ ├── index.ts │ └── def │ │ └── player-service.ts ├── profile │ ├── def │ │ ├── get-all-group-request.ts │ │ ├── tenant-info-request.ts │ │ ├── profile-exists-response.ts │ │ ├── profile-import-request.ts │ │ ├── profile-export-response.ts │ │ ├── server-profile.ts │ │ ├── location-search-result.ts │ │ ├── profile-import-response.ts │ │ ├── is-profile-already-in-use-request.ts │ │ ├── profiles-to-group-request.ts │ │ ├── content-access-filter-criteria.ts │ │ ├── get-all-profile-request.ts │ │ ├── verify-otp-request.ts │ │ ├── check-user-exists-response.ts │ │ ├── accept-terms-condition-request.ts │ │ ├── check-user-exists-request.ts │ │ ├── generate-otp-request.ts │ │ ├── update-server-profile-response.ts │ │ ├── tenant-info.ts │ │ ├── update-server-profile-info-request.ts │ │ ├── delete-user-feed-request.ts │ │ ├── update-server-profile-declarations-response.ts │ │ ├── import-profile-context.ts │ │ ├── update-server-profile-declarations-request.ts │ │ ├── user-migrate-request.ts │ │ ├── get-managed-server-profiles-request.ts │ │ ├── server-profile-details-request.ts │ │ ├── merge-server-profiles-request.ts │ │ ├── export-profile-context.ts │ │ ├── add-managed-profile-request.ts │ │ ├── user-migrate-response.ts │ │ ├── update-user-feed-request.ts │ │ ├── location-search-criteria.ts │ │ ├── profile-export-request.ts │ │ ├── content-access.ts │ │ └── profile-session.ts │ ├── config │ │ └── profile-service-config.ts │ ├── errors │ │ ├── no-profile-found-error.ts │ │ ├── invalid-profile-error.ts │ │ └── no-active-session-error.ts │ └── handler │ │ └── accept-term-condition-handler.spec.data.ts ├── events-bus │ ├── config │ │ └── events-bus-config.ts │ ├── def │ │ ├── emit-request.ts │ │ ├── events-bus-event.ts │ │ ├── event-namespace.ts │ │ ├── event-observer.ts │ │ └── register-observer-request.ts │ └── index.ts ├── system-settings │ ├── def │ │ ├── request-types.ts │ │ ├── system-settings.ts │ │ ├── system-settings-org-ids.ts │ │ └── system-settings-service.ts │ ├── config │ │ └── system-settings-config.ts │ ├── index.ts │ └── impl │ │ └── system-settings-service-impl.spec.data.ts ├── codepush-experiment │ ├── handler │ │ └── codepush-experiment-handler.ts │ └── index.ts ├── content │ ├── def │ │ └── content-delete-listener.ts │ ├── config │ │ └── content-config.ts │ └── index.ts ├── telemetry │ ├── def │ │ ├── telemetry-sync-preprocessor.ts │ │ ├── telemetry-stat.ts │ │ ├── telemetry-sync-stat.ts │ │ └── telemetry-event.ts │ ├── util │ │ ├── telemetry-auto-sync-modes.ts │ │ ├── telemetry-logger.ts │ │ └── telemetry-auto-sync-service.ts │ ├── config │ │ └── telemetry-config.ts │ ├── impl │ │ └── telemetry-service-impl.spec.data.ts │ ├── errors │ │ └── invalid-input-for-sync-preprocessor-error.ts │ └── index.ts ├── group-deprecated │ ├── def │ │ ├── get-all-group-request-deprecated.ts │ │ ├── profiles-to-group-request-deprecated.ts │ │ └── groupDeprecated.ts │ ├── error │ │ ├── no-group-found-error.ts │ │ └── no-active-group-session-error.ts │ └── index.ts ├── auth │ ├── def │ │ ├── auth-end-points.ts │ │ ├── session-provider.ts │ │ ├── o-auth-session.ts │ │ ├── auth-event.ts │ │ └── auth-service.ts │ ├── errors │ │ ├── sign-in-error.ts │ │ ├── processing-error.ts │ │ ├── auth-token-refresh-error.ts │ │ └── in-app-browser-exit-error.ts │ └── util │ │ └── webview-session-provider │ │ └── errors │ │ ├── interrupt-error.ts │ │ ├── param-not-captured-error.ts │ │ ├── webview-runner-error.ts │ │ └── no-inappbrowser-session-assertion-fail-error.ts ├── device-register │ ├── config │ │ └── device-register-config.ts │ ├── index.ts │ └── def │ │ ├── response.ts │ │ ├── device-register-service.ts │ │ └── request.ts ├── key-value-store │ ├── index.ts │ └── def │ │ ├── cached-item-request.ts │ │ └── key-value-store.ts ├── debugging │ ├── index.ts │ └── def │ │ └── debugging-service.ts ├── storage │ ├── def │ │ ├── storage-destination.ts │ │ ├── scan-requests.ts │ │ └── storage-requests.ts │ ├── index.ts │ ├── errors │ │ ├── low-memory-error.ts │ │ ├── cancellation-error.ts │ │ ├── duplicate-content-error.ts │ │ ├── transfer-failed-error.ts │ │ └── transfer-failed-duplicate-content-error.ts │ └── handler │ │ └── transfer │ │ └── delete-destination-folder.ts ├── certificate │ ├── index.ts │ └── config │ │ └── certificate-service-config.ts ├── summarizer │ ├── def │ │ └── request.ts │ ├── assesment-analyzer.ts │ └── index.ts ├── page │ ├── index.ts │ ├── config │ │ └── page-service-config.ts │ └── def │ │ ├── page-assemble.ts │ │ └── page-assemble-service.ts ├── group │ ├── def │ │ ├── models.ts │ │ └── group-activity-service.ts │ └── index.ts ├── sdk-service-on-init-delegate.ts ├── sdk-service-pre-init-delegate.ts ├── segmentation │ ├── index.ts │ ├── def │ │ └── segmentation-service.ts │ └── handler │ │ ├── store-segmentation-tag-handler.ts │ │ └── store-segmentation-command-handler.ts └── sunbird-error.ts ├── dist ├── db │ ├── db-constants.d.ts │ ├── impl │ │ └── db-web-sql-service.d.ts │ ├── config │ │ └── db-config.d.ts │ ├── util │ │ ├── unique-id.d.ts │ │ └── query-builder.d.ts │ ├── index.d.ts │ ├── migrations │ │ ├── initial-migration.d.ts │ │ ├── error-stack-migration.d.ts │ │ ├── content-marker-migration.d.ts │ │ ├── search-history-migration.d.ts │ │ ├── profile-syllabus-migration.d.ts │ │ ├── recently-viewed-migration.d.ts │ │ ├── course-assessment-migration.d.ts │ │ ├── milliseconds-to-seconds-migration.d.ts │ │ ├── offline-search-textbook-migration.d.ts │ │ └── group-profile-migration.d.ts │ └── def │ │ ├── migration.d.ts │ │ └── db-constants.d.ts ├── README.md ├── util │ ├── app │ │ ├── index.d.ts │ │ └── def │ │ │ └── app-info.d.ts │ ├── device │ │ ├── index.d.ts │ │ └── impl │ │ │ └── device-info-impl.d.ts │ ├── file │ │ ├── config │ │ │ └── file-config.d.ts │ │ ├── errors │ │ │ └── no-file-found.d.ts │ │ └── util │ │ │ ├── path.d.ts │ │ │ └── file-util.d.ts │ ├── list │ │ ├── comparator.d.ts │ │ ├── list-node.d.ts │ │ └── linked-list.d.ts │ ├── network │ │ ├── index.d.ts │ │ ├── def │ │ │ ├── network-status.d.ts │ │ │ └── network-info-service.d.ts │ │ └── impl │ │ │ └── network-info-service-impl.d.ts │ ├── shared-preferences │ │ ├── config │ │ │ └── shared-prefernces-config.d.ts │ │ ├── index.d.ts │ │ ├── def │ │ │ ├── shared-preferences.d.ts │ │ │ └── shared-preferences-set-collection.d.ts │ │ └── impl │ │ │ ├── shared-preferences-local-storage.d.ts │ │ │ └── shared-preferences-android.d.ts │ ├── encoders │ │ ├── encoder.d.ts │ │ └── utf8-to-b64-encoder.d.ts │ ├── search-history │ │ ├── index.d.ts │ │ ├── def │ │ │ ├── search-entry.d.ts │ │ │ ├── requests.d.ts │ │ │ └── search-history-service.d.ts │ │ └── util │ │ │ └── search-history-db-entry-mapper.d.ts │ ├── download │ │ ├── index.d.ts │ │ └── def │ │ │ ├── download-status.d.ts │ │ │ ├── download-complete-delegate.d.ts │ │ │ └── requests.d.ts │ ├── number-util.d.ts │ ├── object-util.d.ts │ ├── array-util.d.ts │ ├── zip │ │ ├── def │ │ │ └── zip-service.d.ts │ │ └── impl │ │ │ └── zip-service-impl.d.ts │ └── queue │ │ └── queue.d.ts ├── error │ ├── index.d.ts │ ├── config │ │ └── error-logger-config.d.ts │ ├── def │ │ ├── error-stack.d.ts │ │ └── error-logger-service.d.ts │ └── util │ │ └── error-stack-mapper.d.ts ├── __test__ │ ├── setup.d.ts │ └── mocks.d.ts ├── archive │ ├── export │ │ ├── index.d.ts │ │ ├── def │ │ │ ├── telemetry-archive-package-meta.d.ts │ │ │ └── archive-export-delegate.d.ts │ │ └── error │ │ │ ├── invalid-request-error.d.ts │ │ │ ├── object-not-found-error.d.ts │ │ │ └── export-assertion-error.d.ts │ ├── import │ │ ├── index.d.ts │ │ ├── error │ │ │ ├── invalid-archive-error.d.ts │ │ │ ├── unknown-object-error.d.ts │ │ │ └── import-assertion-error.d.ts │ │ └── def │ │ │ └── archive-import-delegate.d.ts │ └── index.d.ts ├── course │ ├── def │ │ ├── batch.d.ts │ │ ├── course.d.ts │ │ ├── download-certificate-response.d.ts │ │ ├── download-certificate-request.d.ts │ │ ├── unenrollCourseRequest.d.ts │ │ ├── course-batches-response.d.ts │ │ └── get-enrolled-course-response.d.ts │ ├── config │ │ └── course-service-config.d.ts │ ├── errors │ │ └── no-certificate-found.d.ts │ ├── index.d.ts │ ├── course-util.d.ts │ └── handlers │ │ ├── enroll-course-handler.d.ts │ │ └── get-content-state-handler.d.ts ├── faq │ ├── def │ │ ├── faq.d.ts │ │ ├── get-faq-request.d.ts │ │ └── faq-service.d.ts │ ├── config │ │ └── faq-service-config.d.ts │ └── index.d.ts ├── framework │ ├── def │ │ ├── channel.d.ts │ │ ├── Organization.d.ts │ │ ├── framework.d.ts │ │ ├── framework-category-code.d.ts │ │ ├── suggested-framework.d.ts │ │ └── request-types.d.ts │ ├── errors │ │ └── no-active-channel-found-error.d.ts │ ├── config │ │ └── framework-service-config.d.ts │ ├── index.d.ts │ └── util │ │ ├── framework-mapper.d.ts │ │ └── requests.d.ts ├── open-rap-configurable.d.ts ├── group │ ├── def │ │ ├── get-all-group-request.d.ts │ │ ├── profiles-to-group-request.d.ts │ │ ├── group-session.d.ts │ │ └── group.d.ts │ ├── error │ │ ├── no-group-found-error.d.ts │ │ └── no-active-group-session-error.d.ts │ ├── util │ │ ├── group-mapper.d.ts │ │ └── group-profile-mapper.d.ts │ └── index.d.ts ├── notification │ ├── index.d.ts │ ├── handler │ │ └── notification-handler.d.ts │ └── def │ │ └── notification-service.d.ts ├── player │ ├── index.d.ts │ └── def │ │ └── player-service.d.ts ├── profile │ ├── def │ │ ├── get-all-group-request.d.ts │ │ ├── tenant-info-request.d.ts │ │ ├── profile-exists-response.d.ts │ │ ├── server-profile.d.ts │ │ ├── profile-import-request.d.ts │ │ ├── profile-export-response.d.ts │ │ ├── accept-terms-condition-request.d.ts │ │ ├── profile-import-response.d.ts │ │ ├── verify-otp-request.d.ts │ │ ├── content-access-filter-criteria.d.ts │ │ ├── is-profile-already-in-use-request.d.ts │ │ ├── profiles-to-group-request.d.ts │ │ ├── get-all-profile-request.d.ts │ │ ├── location-search-result.d.ts │ │ ├── generate-otp-request.d.ts │ │ ├── tenant-info.d.ts │ │ ├── user-migrate-request.d.ts │ │ ├── import-profile-context.d.ts │ │ ├── server-profile-details-request.d.ts │ │ ├── server-profile-search-criteria.d.ts │ │ ├── merge-server-profiles-request.d.ts │ │ ├── location-search-criteria.d.ts │ │ ├── export-profile-context.d.ts │ │ ├── user-migrate-response.d.ts │ │ ├── profile-session.d.ts │ │ ├── profile-export-request.d.ts │ │ ├── content-access.d.ts │ │ ├── user-feed-response.d.ts │ │ └── update-server-profile-info-request.d.ts │ ├── errors │ │ ├── invalid-profile-error.d.ts │ │ ├── no-active-session-error.d.ts │ │ └── no-profile-found-error.d.ts │ ├── config │ │ └── profile-service-config.d.ts │ ├── handler │ │ ├── profile-handler.d.ts │ │ ├── export │ │ │ ├── copy-database.d.ts │ │ │ ├── generate-profile-export-telemetry.d.ts │ │ │ └── get-epar-file-path.d.ts │ │ ├── import │ │ │ ├── generate-profile-import-telemetry.d.ts │ │ │ ├── update-imported-profile-metadata.d.ts │ │ │ ├── transport-group.d.ts │ │ │ ├── transport-user.d.ts │ │ │ ├── transport-profiles.d.ts │ │ │ ├── validate-profile-metadata.d.ts │ │ │ ├── transport-group-profile.d.ts │ │ │ ├── transport-framework-n-channel.d.ts │ │ │ └── transport-assesments.d.ts │ │ ├── generate-otp-handler.d.ts │ │ └── verify-otp-handler.d.ts │ └── util │ │ └── profile-db-entry-mapper.d.ts ├── events-bus │ ├── config │ │ └── events-bus-config.d.ts │ ├── def │ │ ├── emit-request.d.ts │ │ ├── events-bus-event.d.ts │ │ ├── event-namespace.d.ts │ │ ├── event-observer.d.ts │ │ └── register-observer-request.d.ts │ └── index.d.ts ├── page │ ├── def │ │ ├── page-assemble.d.ts │ │ └── page-assemble-service.d.ts │ ├── index.d.ts │ └── config │ │ └── page-service-config.d.ts ├── system-settings │ ├── def │ │ ├── request-types.d.ts │ │ ├── system-settings.d.ts │ │ ├── system-settings-org-ids.d.ts │ │ └── system-settings-service.d.ts │ ├── config │ │ └── system-settings-config.d.ts │ └── index.d.ts ├── telemetry │ ├── def │ │ ├── telemetry-sync-preprocessor.d.ts │ │ ├── telemetry-stat.d.ts │ │ ├── telemetry-sync-stat.d.ts │ │ ├── telemetry-error.d.ts │ │ └── telemetry-event.d.ts │ ├── util │ │ ├── telemetry-logger.d.ts │ │ ├── telemetry-auto-sync-modes.d.ts │ │ └── telemetry-auto-sync-service.d.ts │ ├── impl │ │ ├── process-event.d.ts │ │ ├── string-to-gzipped-string.d.ts │ │ ├── string-to-byte-array-preprocessor.d.ts │ │ └── telemetry-entries-to-string-preprocessor.d.ts │ ├── errors │ │ └── invalid-input-for-sync-preprocessor-error.d.ts │ ├── decorators │ │ ├── generate-error-telemetry-decorators.d.ts │ │ └── generate-log-telemetry-decorators.d.ts │ ├── config │ │ └── telemetry-config.d.ts │ └── handler │ │ └── import │ │ ├── update-imported-telemetry-metadata.d.ts │ │ ├── validate-telemetry-metadata.d.ts │ │ ├── transport-processed-telemetry.d.ts │ │ └── generate-import-telemetry-share.d.ts ├── codepush-experiment │ ├── handler │ │ └── codepush-experiment-handler.d.ts │ ├── index.d.ts │ └── def │ │ └── codepush-experiment-service.d.ts ├── form │ ├── config │ │ └── form-service-config.d.ts │ ├── index.d.ts │ └── def │ │ ├── form-service.d.ts │ │ └── form-request.d.ts ├── device-register │ ├── config │ │ └── device-register-config.d.ts │ ├── index.d.ts │ └── def │ │ ├── response.d.ts │ │ ├── device-register-service.d.ts │ │ └── request.d.ts ├── auth │ ├── def │ │ ├── auth-end-points.d.ts │ │ ├── o-auth-session.d.ts │ │ ├── session-provider.d.ts │ │ ├── auth-event.d.ts │ │ └── auth-service.d.ts │ ├── errors │ │ ├── sign-in-error.d.ts │ │ ├── processing-error.d.ts │ │ ├── auth-token-refresh-error.d.ts │ │ └── in-app-browser-exit-error.d.ts │ └── util │ │ └── webview-session-provider │ │ └── errors │ │ ├── interrupt-error.d.ts │ │ ├── param-not-captured-error.d.ts │ │ ├── webview-runner-error.d.ts │ │ └── no-inappbrowser-session-assertion-fail-error.d.ts ├── key-value-store │ ├── index.d.ts │ ├── def │ │ ├── cached-item-request.d.ts │ │ └── key-value-store.d.ts │ ├── impl │ │ └── key-value-store-impl.d.ts │ └── db │ │ └── schema.d.ts ├── api │ ├── def │ │ ├── api-request-handler.d.ts │ │ ├── request-interceptor.d.ts │ │ ├── connection.d.ts │ │ ├── authenticator.d.ts │ │ ├── response-interceptor.d.ts │ │ ├── response.d.ts │ │ └── api-service.d.ts │ ├── errors │ │ ├── network-error.d.ts │ │ ├── request-build-error.d.ts │ │ ├── http-client-error.d.ts │ │ └── http-server-error.d.ts │ ├── config │ │ ├── app-config.d.ts │ │ └── api-config.d.ts │ ├── util │ │ └── jwt.util.d.ts │ └── index.d.ts ├── summarizer │ ├── def │ │ └── request.d.ts │ ├── assesment-analyzer.d.ts │ └── index.d.ts ├── storage │ ├── def │ │ ├── storage-destination.d.ts │ │ ├── scan-requests.d.ts │ │ └── storage-requests.d.ts │ ├── errors │ │ ├── low-memory-error.d.ts │ │ ├── cancellation-error.d.ts │ │ ├── duplicate-content-error.d.ts │ │ ├── transfer-failed-duplicate-content-error.d.ts │ │ └── transfer-failed-error.d.ts │ ├── index.d.ts │ └── handler │ │ ├── transfer │ │ ├── delete-destination-folder.d.ts │ │ ├── update-source-content-path-in-db.d.ts │ │ ├── device-memory-check.d.ts │ │ ├── validate-destination-folder.d.ts │ │ └── delete-source-folder.d.ts │ │ └── scan │ │ └── perform-actoin-on-content-handler.d.ts ├── sdk-service-on-init-delegate.d.ts ├── sdk-service-pre-init-delegate.d.ts ├── sunbird-error.d.ts ├── content │ ├── config │ │ └── content-config.d.ts │ ├── handlers │ │ ├── export │ │ │ ├── deletete-temp-dir.d.ts │ │ │ ├── copy-to-destination.d.ts │ │ │ ├── clean-temp-loc.d.ts │ │ │ ├── create-temp-loc.d.ts │ │ │ ├── compress-content.d.ts │ │ │ ├── delete-temp-ecar.d.ts │ │ │ ├── copy-asset.d.ts │ │ │ ├── device-memory-check.d.ts │ │ │ ├── generate-export-share-telemetry.d.ts │ │ │ ├── write-manifest.d.ts │ │ │ └── ecar-bundle.d.ts │ │ ├── content-feedback-handler.d.ts │ │ ├── import │ │ │ ├── ecar-cleanup.d.ts │ │ │ ├── generate-import-share-telemetry.d.ts │ │ │ ├── generate-interact-telemetry.d.ts │ │ │ ├── device-memory-check.d.ts │ │ │ └── extract-ecar.d.ts │ │ ├── content-storage-handler.d.ts │ │ ├── get-contents-handler.d.ts │ │ └── content-marker-handler.d.ts │ ├── util │ │ ├── stack.d.ts │ │ ├── content-mapper.d.ts │ │ └── linked-list.d.ts │ └── index.d.ts └── partner │ └── db │ └── schema.d.ts ├── plugins ├── cordova.d.ts ├── cordova-plugin-device.d.ts ├── cordova-plugin-app-version.d.ts ├── cordova-plugin-file-transfer.d.ts ├── jjdltc-cordova-plugin-zip.d.ts ├── cordova-plugin-network-information.d.ts ├── sb-cordova-plugin-customtabs.d.ts └── sb-cordova-plugin-sync.d.ts ├── package-dev.json ├── README.md ├── scripts ├── pre-commit.bash └── install-hooks.bash ├── sonar-project.properties └── tsconfig.spec.json /src/db/db-constants.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/db/db-constants.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | # sunbird-mobile-sdk -------------------------------------------------------------------------------- /dist/db/impl/db-web-sql-service.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/cordova.d.ts: -------------------------------------------------------------------------------- 1 | declare var cordova: Cordova; 2 | -------------------------------------------------------------------------------- /src/util/app/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/app-info'; 2 | -------------------------------------------------------------------------------- /dist/util/app/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/app-info'; 2 | -------------------------------------------------------------------------------- /src/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './validation-error'; 2 | -------------------------------------------------------------------------------- /src/util/device/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/device-info'; 2 | -------------------------------------------------------------------------------- /dist/util/device/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/device-info'; 2 | -------------------------------------------------------------------------------- /src/discussion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/discussion-service'; -------------------------------------------------------------------------------- /dist/error/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/error-logger-service'; 2 | -------------------------------------------------------------------------------- /src/error/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/error-logger-service'; 2 | 3 | -------------------------------------------------------------------------------- /dist/util/file/config/file-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface FileConfig { 2 | } 3 | -------------------------------------------------------------------------------- /src/archive/export/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-export-delegate'; 2 | -------------------------------------------------------------------------------- /src/archive/import/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-import-delegate'; 2 | -------------------------------------------------------------------------------- /src/notification-v2/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/notification-service-v2'; -------------------------------------------------------------------------------- /dist/__test__/setup.d.ts: -------------------------------------------------------------------------------- 1 | import 'reflect-metadata'; 2 | import 'whatwg-fetch'; 3 | -------------------------------------------------------------------------------- /dist/archive/export/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-export-delegate'; 2 | -------------------------------------------------------------------------------- /dist/archive/import/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-import-delegate'; 2 | -------------------------------------------------------------------------------- /src/__test__/setup.ts: -------------------------------------------------------------------------------- 1 | import 'reflect-metadata'; 2 | import 'whatwg-fetch'; 3 | -------------------------------------------------------------------------------- /dist/course/def/batch.d.ts: -------------------------------------------------------------------------------- 1 | export { Batch } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /dist/faq/def/faq.d.ts: -------------------------------------------------------------------------------- 1 | export { Faq, Faqs } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /src/db/config/db-config.ts: -------------------------------------------------------------------------------- 1 | export interface DbConfig { 2 | dbName: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/db/config/db-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface DbConfig { 2 | dbName: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sphere/sunbird-mobile-sdk/master/src/.DS_Store -------------------------------------------------------------------------------- /src/course/def/batch.ts: -------------------------------------------------------------------------------- 1 | export {Batch} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/faq/def/faq.ts: -------------------------------------------------------------------------------- 1 | export {Faq, Faqs} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /dist/framework/def/channel.d.ts: -------------------------------------------------------------------------------- 1 | export { Channel } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /src/framework/def/channel.ts: -------------------------------------------------------------------------------- 1 | export {Channel} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /dist/open-rap-configurable.d.ts: -------------------------------------------------------------------------------- 1 | export interface OpenRapConfigurable { 2 | host?: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/open-rap-configurable.ts: -------------------------------------------------------------------------------- 1 | export interface OpenRapConfigurable { 2 | host?: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/util/list/comparator.d.ts: -------------------------------------------------------------------------------- 1 | export interface Comparator { 2 | isEqual(v: V): boolean; 3 | } 4 | -------------------------------------------------------------------------------- /src/api/network-queue/index.ts: -------------------------------------------------------------------------------- 1 | export * from './db/schema'; 2 | export * from './def/network-queue'; 3 | -------------------------------------------------------------------------------- /src/form/def/models.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Form 3 | } from '@project-sunbird/client-services/models/form'; 4 | -------------------------------------------------------------------------------- /dist/course/def/course.d.ts: -------------------------------------------------------------------------------- 1 | export { Course, CourseCertificate } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /dist/db/util/unique-id.d.ts: -------------------------------------------------------------------------------- 1 | export declare class UniqueId { 2 | static generateUniqueId(): any; 3 | } 4 | -------------------------------------------------------------------------------- /dist/group/def/get-all-group-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllGroupRequest { 2 | uid: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/notification/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/requests'; 2 | export * from './def/notification-service'; 3 | -------------------------------------------------------------------------------- /dist/player/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/player-service'; 2 | export * from './impl/player-service-impl'; 3 | -------------------------------------------------------------------------------- /dist/profile/def/get-all-group-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllGroupRequest { 2 | uid?: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/profile/def/tenant-info-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface TenantInfoRequest { 2 | slug: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/course/def/course.ts: -------------------------------------------------------------------------------- 1 | export {Course, CourseCertificate} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/notification/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/requests'; 2 | export * from './def/notification-service'; 3 | -------------------------------------------------------------------------------- /src/player/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/player-service'; 2 | export * from './impl/player-service-impl'; 3 | -------------------------------------------------------------------------------- /src/profile/def/get-all-group-request.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllGroupRequest { 2 | uid?: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/profile/def/tenant-info-request.ts: -------------------------------------------------------------------------------- 1 | export interface TenantInfoRequest { 2 | slug: string; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /src/util/list/comparator.ts: -------------------------------------------------------------------------------- 1 | export interface Comparator { 2 | 3 | isEqual(v: V): boolean; 4 | 5 | } 6 | -------------------------------------------------------------------------------- /dist/events-bus/config/events-bus-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface EventsBusConfig { 2 | debugMode: boolean; 3 | } 4 | -------------------------------------------------------------------------------- /dist/page/def/page-assemble.d.ts: -------------------------------------------------------------------------------- 1 | export { PageAssemble, PageSections } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /dist/system-settings/def/request-types.d.ts: -------------------------------------------------------------------------------- 1 | export interface GetSystemSettingsRequest { 2 | id: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/util/network/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/network-info-service'; 2 | export * from './def/network-status'; 3 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/config/shared-prefernces-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface SharedPreferencesConfig { 2 | } 3 | -------------------------------------------------------------------------------- /src/course/config/course-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface CourseServiceConfig { 2 | apiPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/events-bus/config/events-bus-config.ts: -------------------------------------------------------------------------------- 1 | export interface EventsBusConfig { 2 | debugMode: boolean; 3 | } 4 | -------------------------------------------------------------------------------- /src/faq/config/faq-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface FaqServiceConfig { 2 | faqConfigDirPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/system-settings/def/request-types.ts: -------------------------------------------------------------------------------- 1 | export interface GetSystemSettingsRequest { 2 | id: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/util/network/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/network-info-service'; 2 | export * from './def/network-status'; 3 | -------------------------------------------------------------------------------- /dist/course/config/course-service-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface CourseServiceConfig { 2 | apiPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/faq/config/faq-service-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface FaqServiceConfig { 2 | faqConfigDirPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/profile/def/profile-exists-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExistsResponse { 2 | response: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/profile/def/server-profile.d.ts: -------------------------------------------------------------------------------- 1 | export { User as ServerProfile, RootOrg } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /src/error/config/error-logger-config.ts: -------------------------------------------------------------------------------- 1 | export interface ErrorLoggerConfig { 2 | errorLoggerApiPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/events-bus/def/emit-request.ts: -------------------------------------------------------------------------------- 1 | export interface EmitRequest { 2 | namespace: string; 3 | event: T; 4 | } 5 | -------------------------------------------------------------------------------- /src/faq/def/get-faq-request.ts: -------------------------------------------------------------------------------- 1 | export interface GetFaqRequest { 2 | language: string; 3 | faqUrl: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/framework/def/organization.ts: -------------------------------------------------------------------------------- 1 | export {Organisation as Organization} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/profile/def/profile-exists-response.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExistsResponse { 2 | response: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/profile/def/profile-import-request.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileImportRequest { 2 | sourceFilePath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/util/search-history/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/search-entry'; 2 | export * from './def/search-history-service'; 3 | -------------------------------------------------------------------------------- /dist/error/config/error-logger-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface ErrorLoggerConfig { 2 | errorLoggerApiPath: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/events-bus/def/emit-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface EmitRequest { 2 | namespace: string; 3 | event: T; 4 | } 5 | -------------------------------------------------------------------------------- /dist/faq/def/get-faq-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface GetFaqRequest { 2 | language: string; 3 | faqUrl: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/profile-import-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileImportRequest { 2 | sourceFilePath: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/util/encoders/encoder.d.ts: -------------------------------------------------------------------------------- 1 | export interface Encoder { 2 | encode(arg: E): D; 3 | decode(arg: D): E; 4 | } 5 | -------------------------------------------------------------------------------- /dist/util/search-history/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/search-entry'; 2 | export * from './def/search-history-service'; 3 | -------------------------------------------------------------------------------- /src/course/def/download-certificate-response.ts: -------------------------------------------------------------------------------- 1 | export interface DownloadCertificateResponse { 2 | path: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/events-bus/def/events-bus-event.ts: -------------------------------------------------------------------------------- 1 | export interface EventsBusEvent { 2 | type: string; 3 | payload: any; 4 | } 5 | -------------------------------------------------------------------------------- /src/profile/def/profile-export-response.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExportResponse { 2 | exportedFilePath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/profile/def/server-profile.ts: -------------------------------------------------------------------------------- 1 | export {User as ServerProfile, RootOrg} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/util/file/config/file-config.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:no-empty-interface 2 | export interface FileConfig { 3 | } 4 | -------------------------------------------------------------------------------- /dist/course/def/download-certificate-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface DownloadCertificateResponse { 2 | path: string; 3 | } 4 | -------------------------------------------------------------------------------- /dist/events-bus/def/events-bus-event.d.ts: -------------------------------------------------------------------------------- 1 | export interface EventsBusEvent { 2 | type: string; 3 | payload: any; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/profile-export-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExportResponse { 2 | exportedFilePath: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/util/encoders/encoder.ts: -------------------------------------------------------------------------------- 1 | export interface Encoder { 2 | encode(arg: E): D; 3 | 4 | decode(arg: D): E; 5 | } 6 | -------------------------------------------------------------------------------- /src/util/network/def/network-status.ts: -------------------------------------------------------------------------------- 1 | export enum NetworkStatus { 2 | ONLINE = 'ONLINE', 3 | OFFLINE = 'OFFLINE' 4 | } 5 | -------------------------------------------------------------------------------- /dist/framework/def/Organization.d.ts: -------------------------------------------------------------------------------- 1 | export interface Organization { 2 | count: number; 3 | content: (keyof T)[]; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/accept-terms-condition-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface AcceptTermsConditionRequest { 2 | version: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/codepush-experiment/handler/codepush-experiment-handler.ts: -------------------------------------------------------------------------------- 1 | export class GetSystemSettingsHandler { 2 | constructor() {} 3 | } 4 | -------------------------------------------------------------------------------- /src/content/def/content-delete-listener.ts: -------------------------------------------------------------------------------- 1 | export interface ContentDeleteListener { 2 | onContentDelete(identifier: string); 3 | } 4 | -------------------------------------------------------------------------------- /src/profile/def/location-search-result.ts: -------------------------------------------------------------------------------- 1 | export {Location as LocationSearchResult} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/telemetry/def/telemetry-sync-preprocessor.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetrySyncPreprocessor { 2 | process(input: any): any; 3 | } 4 | -------------------------------------------------------------------------------- /src/util/shared-preferences/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/shared-preferences'; 2 | export * from './config/shared-prefernces-config'; 3 | -------------------------------------------------------------------------------- /dist/telemetry/def/telemetry-sync-preprocessor.d.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetrySyncPreprocessor { 2 | process(input: any): any; 3 | } 4 | -------------------------------------------------------------------------------- /dist/util/network/def/network-status.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum NetworkStatus { 2 | ONLINE = "ONLINE", 3 | OFFLINE = "OFFLINE" 4 | } 5 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/shared-preferences'; 2 | export * from './config/shared-prefernces-config'; 3 | -------------------------------------------------------------------------------- /src/group-deprecated/def/get-all-group-request-deprecated.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllGroupRequestDeprecated { 2 | uid: string; 3 | } 4 | -------------------------------------------------------------------------------- /src/profile/def/profile-import-response.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileImportResponse { 2 | imported: number; 3 | failed: number; 4 | } 5 | -------------------------------------------------------------------------------- /dist/codepush-experiment/handler/codepush-experiment-handler.d.ts: -------------------------------------------------------------------------------- 1 | export declare class GetSystemSettingsHandler { 2 | constructor(); 3 | } 4 | -------------------------------------------------------------------------------- /dist/form/config/form-service-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface FormServiceConfig { 2 | apiPath: string; 3 | formConfigDirPath: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/profile-import-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileImportResponse { 2 | imported: number; 3 | failed: number; 4 | } 5 | -------------------------------------------------------------------------------- /dist/telemetry/def/telemetry-stat.d.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetryStat { 2 | unSyncedEventCount: number; 3 | lastSyncTime: number; 4 | } 5 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-device.d.ts: -------------------------------------------------------------------------------- 1 | interface Window { 2 | device: { 3 | uuid: string; 4 | platform: string; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /src/codepush-experiment/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/codepush-experiment-service'; 2 | export * from './impl/codepush-experiment-service-impl'; 3 | -------------------------------------------------------------------------------- /src/form/config/form-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface FormServiceConfig { 2 | apiPath: string; 3 | formConfigDirPath: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/telemetry/def/telemetry-stat.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetryStat { 2 | unSyncedEventCount: number; 3 | lastSyncTime: number; 4 | } 5 | -------------------------------------------------------------------------------- /dist/codepush-experiment/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/codepush-experiment-service'; 2 | export * from './impl/codepush-experiment-service-impl'; 3 | -------------------------------------------------------------------------------- /dist/form/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/form-request'; 2 | export * from './def/form-service'; 3 | export * from './config/form-service-config'; 4 | -------------------------------------------------------------------------------- /dist/framework/def/framework.d.ts: -------------------------------------------------------------------------------- 1 | export { Framework, FrameworkCategory, CategoryTerm, CategoryAssociation } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /dist/profile/def/verify-otp-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface VerifyOtpRequest { 2 | key: string; 3 | type: string; 4 | otp: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/auth/def/auth-end-points.ts: -------------------------------------------------------------------------------- 1 | export enum AuthEndPoints { 2 | LOGIN = '/auth', 3 | LOGOUT = '/logout', 4 | REFRESH = '/token' 5 | } 6 | -------------------------------------------------------------------------------- /src/profile/def/is-profile-already-in-use-request.ts: -------------------------------------------------------------------------------- 1 | export interface IsProfileAlreadyInUseRequest { 2 | key: string; 3 | type: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/profile/def/profiles-to-group-request.ts: -------------------------------------------------------------------------------- 1 | export interface ProfilesToGroupRequest { 2 | groupId: string; 3 | uidList: Array; 4 | } 5 | -------------------------------------------------------------------------------- /src/system-settings/def/system-settings.ts: -------------------------------------------------------------------------------- 1 | export interface SystemSettings { 2 | id: string; 3 | field: string; 4 | value: string; 5 | } 6 | -------------------------------------------------------------------------------- /dist/device-register/config/device-register-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface DeviceRegisterConfig { 2 | apiPath: string; 3 | fcmToken?: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/framework/def/framework-category-code.d.ts: -------------------------------------------------------------------------------- 1 | export { FrameworkCategoryCode, FrameworkCategoryCodesGroup } from '@project-sunbird/client-services'; 2 | -------------------------------------------------------------------------------- /dist/group/def/profiles-to-group-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfilesToGroupRequest { 2 | groupId: string; 3 | uidList: Array; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/content-access-filter-criteria.d.ts: -------------------------------------------------------------------------------- 1 | export interface ContentAccessFilterCriteria { 2 | contentId: string; 3 | uid: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/is-profile-already-in-use-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface IsProfileAlreadyInUseRequest { 2 | key: string; 3 | type: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/profiles-to-group-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfilesToGroupRequest { 2 | groupId: string; 3 | uidList: Array; 4 | } 5 | -------------------------------------------------------------------------------- /dist/system-settings/def/system-settings.d.ts: -------------------------------------------------------------------------------- 1 | export interface SystemSettings { 2 | id: string; 3 | field: string; 4 | value: string; 5 | } 6 | -------------------------------------------------------------------------------- /dist/util/search-history/def/search-entry.d.ts: -------------------------------------------------------------------------------- 1 | export interface SearchEntry { 2 | uid: string; 3 | query: string; 4 | timestamp: number; 5 | } 6 | -------------------------------------------------------------------------------- /package-dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@project-sunbird/sunbird-sdk", 3 | "version": "0.0.0", 4 | "main": "index.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/device-register/config/device-register-config.ts: -------------------------------------------------------------------------------- 1 | export interface DeviceRegisterConfig { 2 | apiPath: string; 3 | fcmToken?: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/error/def/error-stack.ts: -------------------------------------------------------------------------------- 1 | export interface ErrorStack { 2 | appver: string; 3 | pageid: string; 4 | ts: number; 5 | log: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/framework/def/framework.ts: -------------------------------------------------------------------------------- 1 | export {Framework, FrameworkCategory, CategoryTerm, CategoryAssociation} from '@project-sunbird/client-services/models'; 2 | -------------------------------------------------------------------------------- /src/profile/def/content-access-filter-criteria.ts: -------------------------------------------------------------------------------- 1 | export interface ContentAccessFilterCriteria { 2 | contentId: string; 3 | uid: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/util/search-history/def/search-entry.ts: -------------------------------------------------------------------------------- 1 | export interface SearchEntry { 2 | uid: string; 3 | query: string; 4 | timestamp: number; 5 | } 6 | -------------------------------------------------------------------------------- /dist/auth/def/auth-end-points.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum AuthEndPoints { 2 | LOGIN = "/auth", 3 | LOGOUT = "/logout", 4 | REFRESH = "/token" 5 | } 6 | -------------------------------------------------------------------------------- /dist/auth/def/o-auth-session.d.ts: -------------------------------------------------------------------------------- 1 | export interface OAuthSession { 2 | access_token: string; 3 | refresh_token: string; 4 | userToken: string; 5 | } 6 | -------------------------------------------------------------------------------- /dist/error/def/error-stack.d.ts: -------------------------------------------------------------------------------- 1 | export interface ErrorStack { 2 | appver: string; 3 | pageid: string; 4 | ts: number; 5 | log: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/key-value-store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/key-value-store'; 2 | export * from './def/cached-item-store'; 3 | export * from './def/cached-item-request'; 4 | -------------------------------------------------------------------------------- /dist/course/def/download-certificate-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface DownloadCertificateRequest { 2 | courseId: string; 3 | certificateToken: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/course/def/unenrollCourseRequest.d.ts: -------------------------------------------------------------------------------- 1 | export interface UnenrollCourseRequest { 2 | userId: string; 3 | courseId: string; 4 | batchId: string; 5 | } 6 | -------------------------------------------------------------------------------- /dist/key-value-store/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/key-value-store'; 2 | export * from './def/cached-item-store'; 3 | export * from './def/cached-item-request'; 4 | -------------------------------------------------------------------------------- /dist/util/list/list-node.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ListNode { 2 | private _next; 3 | private _value; 4 | next: ListNode; 5 | value: T; 6 | } 7 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-app-version.d.ts: -------------------------------------------------------------------------------- 1 | interface Cordova { 2 | getAppVersion: { 3 | getAppName: (cb: (name: string) => void) => void; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /src/course/def/download-certificate-request.ts: -------------------------------------------------------------------------------- 1 | export interface DownloadCertificateRequest { 2 | fileName: string; 3 | mimeType: string; 4 | blob: Blob; 5 | } 6 | -------------------------------------------------------------------------------- /src/course/def/unenrollCourseRequest.ts: -------------------------------------------------------------------------------- 1 | export interface UnenrollCourseRequest { 2 | userId: string; 3 | courseId: string; 4 | batchId: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/util/shared-preferences/config/shared-prefernces-config.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:no-empty-interface 2 | export interface SharedPreferencesConfig { 3 | } 4 | -------------------------------------------------------------------------------- /dist/profile/def/get-all-profile-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllProfileRequest { 2 | local?: boolean; 3 | server?: boolean; 4 | groupId?: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/debugging/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/debugging-service'; 2 | export * from './handler/debugging-duration-handler'; 3 | export * from './impl/debuggin-service-impl'; -------------------------------------------------------------------------------- /src/profile/def/get-all-profile-request.ts: -------------------------------------------------------------------------------- 1 | export interface GetAllProfileRequest { 2 | local?: boolean; 3 | server?: boolean; 4 | groupId?: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/profile/def/verify-otp-request.ts: -------------------------------------------------------------------------------- 1 | export interface VerifyOtpRequest { 2 | key: string; 3 | type: string; 4 | otp: string; 5 | userId: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/auth/def/session-provider.d.ts: -------------------------------------------------------------------------------- 1 | import { OAuthSession } from './o-auth-session'; 2 | export interface SessionProvider { 3 | provide(): Promise; 4 | } 5 | -------------------------------------------------------------------------------- /src/auth/def/session-provider.ts: -------------------------------------------------------------------------------- 1 | import {OAuthSession} from './o-auth-session'; 2 | 3 | export interface SessionProvider { 4 | provide(): Promise; 5 | } 6 | -------------------------------------------------------------------------------- /src/course/def/course-batches-response.ts: -------------------------------------------------------------------------------- 1 | import {Batch} from './batch'; 2 | 3 | export class CourseBatchesResponse { 4 | count: number; 5 | content: Batch[]; 6 | } 7 | -------------------------------------------------------------------------------- /src/profile/def/check-user-exists-response.ts: -------------------------------------------------------------------------------- 1 | export {CheckUserExistsResponse as CheckUserExistsResponse} from '@project-sunbird/client-services/services/user/interface'; 2 | -------------------------------------------------------------------------------- /src/storage/def/storage-destination.ts: -------------------------------------------------------------------------------- 1 | export enum StorageDestination { 2 | INTERNAL_STORAGE = 'INTERNAL_STORAGE', 3 | EXTERNAL_STORAGE = 'EXTERNAL_STORAGE' 4 | } 5 | -------------------------------------------------------------------------------- /dist/api/def/api-request-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface ApiRequestHandler { 3 | handle(request: Req): Observable; 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/location-search-result.d.ts: -------------------------------------------------------------------------------- 1 | export interface LocationSearchResult { 2 | code: string; 3 | name: string; 4 | id: string; 5 | type: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/summarizer/def/request.d.ts: -------------------------------------------------------------------------------- 1 | export interface SummaryRequest { 2 | qId: string; 3 | uids: string[]; 4 | contentId: string; 5 | hierarchyData: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/system-settings/config/system-settings-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface SystemSettingsConfig { 2 | systemSettingsApiPath: string; 3 | systemSettingsDirPath: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/telemetry/util/telemetry-logger.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetryService } from '..'; 2 | export declare class TelemetryLogger { 3 | static readonly log: TelemetryService; 4 | } 5 | -------------------------------------------------------------------------------- /src/api/def/api-request-handler.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface ApiRequestHandler { 4 | handle(request: Req): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /src/certificate/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/certificate-service-config'; 2 | export * from './impl/certificate-service-impl'; 3 | export * from './def/certificate-service'; 4 | -------------------------------------------------------------------------------- /src/form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/form-request'; 2 | export * from './def/form-service'; 3 | export * from './config/form-service-config'; 4 | export * from './def/models'; 5 | -------------------------------------------------------------------------------- /src/group-deprecated/def/profiles-to-group-request-deprecated.ts: -------------------------------------------------------------------------------- 1 | export interface ProfilesToGroupRequestDeprecated { 2 | groupId: string; 3 | uidList: Array; 4 | } 5 | -------------------------------------------------------------------------------- /src/profile/def/accept-terms-condition-request.ts: -------------------------------------------------------------------------------- 1 | export interface AcceptTermsConditionRequest { 2 | version: string; 3 | userId?: string; 4 | tncType?: string 5 | } 6 | -------------------------------------------------------------------------------- /src/summarizer/def/request.ts: -------------------------------------------------------------------------------- 1 | export interface SummaryRequest { 2 | qId: string; 3 | uids: string[]; 4 | contentId: string; 5 | hierarchyData: string; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/system-settings/config/system-settings-config.ts: -------------------------------------------------------------------------------- 1 | export interface SystemSettingsConfig { 2 | systemSettingsApiPath: string; 3 | systemSettingsDirPath: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/telemetry/util/telemetry-auto-sync-modes.ts: -------------------------------------------------------------------------------- 1 | export enum TelemetryAutoSyncModes { 2 | OFF = 'OFF', 3 | OVER_WIFI = 'OVER_WIFI', 4 | ALWAYS_ON = 'ALWAYS_ON' 5 | } 6 | -------------------------------------------------------------------------------- /dist/course/def/course-batches-response.d.ts: -------------------------------------------------------------------------------- 1 | import { Batch } from './batch'; 2 | export declare class CourseBatchesResponse { 3 | count: number; 4 | content: Batch[]; 5 | } 6 | -------------------------------------------------------------------------------- /dist/profile/def/generate-otp-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface GenerateOtpRequest { 2 | userId?: string; 3 | templateId?: string; 4 | key: string; 5 | type: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/storage/def/storage-destination.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum StorageDestination { 2 | INTERNAL_STORAGE = "INTERNAL_STORAGE", 3 | EXTERNAL_STORAGE = "EXTERNAL_STORAGE" 4 | } 5 | -------------------------------------------------------------------------------- /dist/summarizer/assesment-analyzer.d.ts: -------------------------------------------------------------------------------- 1 | import { SummarizerService } from '..'; 2 | export declare class AssesmentAnalyzer { 3 | static readonly analyze: SummarizerService; 4 | } 5 | -------------------------------------------------------------------------------- /src/certificate/config/certificate-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface CertificateServiceConfig { 2 | apiPath: string; 3 | apiPathLegacy: string; 4 | rcApiPath: string; 5 | } -------------------------------------------------------------------------------- /src/course/def/update-content-state-response.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CsUpdateContentStateResponse as UpdateContentStateResponse 3 | } from '@project-sunbird/client-services/services/course'; 4 | -------------------------------------------------------------------------------- /src/framework/def/suggested-framework.ts: -------------------------------------------------------------------------------- 1 | export interface SuggestedFramework { 2 | identifier: string; 3 | name: string; 4 | code: string; 5 | objectType: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/profile/def/check-user-exists-request.ts: -------------------------------------------------------------------------------- 1 | export interface CheckUserExistsRequest { 2 | matching: { key: string, value: string }; 3 | captchaResponseToken?: string; 4 | } 5 | -------------------------------------------------------------------------------- /src/profile/def/generate-otp-request.ts: -------------------------------------------------------------------------------- 1 | export interface GenerateOtpRequest { 2 | userId?: string; 3 | templateId?: string; 4 | key: string; 5 | type: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/profile/def/update-server-profile-response.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CsProfileUpdateResponse as UpdateServerProfileResponse 3 | } from '@project-sunbird/client-services/services/user'; 4 | -------------------------------------------------------------------------------- /dist/framework/def/suggested-framework.d.ts: -------------------------------------------------------------------------------- 1 | export interface SuggestedFramework { 2 | identifier: string; 3 | name: string; 4 | code: string; 5 | objectType: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/telemetry/util/telemetry-auto-sync-modes.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum TelemetryAutoSyncModes { 2 | OFF = "OFF", 3 | OVER_WIFI = "OVER_WIFI", 4 | ALWAYS_ON = "ALWAYS_ON" 5 | } 6 | -------------------------------------------------------------------------------- /src/db/util/unique-id.ts: -------------------------------------------------------------------------------- 1 | import * as uuidv4 from 'uuid/v4'; 2 | 3 | export class UniqueId { 4 | 5 | public static generateUniqueId() { 6 | return uuidv4(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/page/index.ts: -------------------------------------------------------------------------------- 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'; 5 | -------------------------------------------------------------------------------- /dist/api/errors/network-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NetworkError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/auth/errors/sign-in-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class SignInError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/events-bus/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/event-namespace'; 2 | export * from './def/events-bus-service'; 3 | export * from './def/events-bus-event'; 4 | export * from './def/error-event'; 5 | -------------------------------------------------------------------------------- /dist/page/index.d.ts: -------------------------------------------------------------------------------- 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'; 5 | -------------------------------------------------------------------------------- /dist/profile/def/tenant-info.d.ts: -------------------------------------------------------------------------------- 1 | export interface TenantInfo { 2 | title?: string; 3 | logo?: string; 4 | poster?: string; 5 | favicon?: string; 6 | appLogo?: string; 7 | } 8 | -------------------------------------------------------------------------------- /dist/sdk-service-on-init-delegate.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface SdkServiceOnInitDelegate { 3 | /** @internal */ 4 | onInit(): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/util/download/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/download-event'; 2 | export * from './def/download-service'; 3 | export * from './def/download-status'; 4 | export * from './def/requests'; 5 | -------------------------------------------------------------------------------- /src/course/def/update-course-content-state-request.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CsUpdateContentStateRequest as UpdateCourseContentStateRequest 3 | } from '@project-sunbird/client-services/services/course'; 4 | -------------------------------------------------------------------------------- /src/events-bus/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/event-namespace'; 2 | export * from './def/events-bus-service'; 3 | export * from './def/events-bus-event'; 4 | export * from './def/error-event'; 5 | -------------------------------------------------------------------------------- /src/group/def/models.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Group, GroupMember, GroupMembershipType, GroupActivity, GroupMemberRole, GroupEntityStatus 3 | } from '@project-sunbird/client-services/models/group'; 4 | -------------------------------------------------------------------------------- /src/profile/def/tenant-info.ts: -------------------------------------------------------------------------------- 1 | export interface TenantInfo { 2 | title?: string; 3 | logo?: string; 4 | poster?: string; 5 | favicon?: string; 6 | appLogo?: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/profile/def/update-server-profile-info-request.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CsProfileUpdateRequest as UpdateServerProfileInfoRequest 3 | } from '@project-sunbird/client-services/services/user'; 4 | 5 | -------------------------------------------------------------------------------- /src/sdk-service-on-init-delegate.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface SdkServiceOnInitDelegate { 4 | /** @internal */ 5 | onInit(): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/auth/errors/processing-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class ProcessingError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/sdk-service-pre-init-delegate.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface SdkServicePreInitDelegate { 3 | /** @internal */ 4 | preInit(): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/storage/def/scan-requests.d.ts: -------------------------------------------------------------------------------- 1 | export interface ScanContentContext { 2 | currentStoragePath: string; 3 | newlyAddedIdentifiers?: string[]; 4 | deletedIdentifiers?: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /dist/telemetry/def/telemetry-sync-stat.d.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetrySyncStat { 2 | syncedEventCount: number; 3 | syncTime: number; 4 | syncedFileSize: number; 5 | error?: any; 6 | } 7 | -------------------------------------------------------------------------------- /dist/telemetry/impl/process-event.d.ts: -------------------------------------------------------------------------------- 1 | export declare class EventProcessor { 2 | process(eventJsonArray: Array): void; 3 | private getParams; 4 | private formatCurrentDate; 5 | } 6 | -------------------------------------------------------------------------------- /dist/util/number-util.d.ts: -------------------------------------------------------------------------------- 1 | export declare class NumberUtil { 2 | static toFixed(input: any): number; 3 | static parseInt(input: any): number; 4 | static round(input: any): number; 5 | } 6 | -------------------------------------------------------------------------------- /src/db/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/db-constants'; 2 | export * from './config/db-config'; 3 | export * from './def/migration'; 4 | export * from './def/query'; 5 | export * from './def/db-service'; 6 | -------------------------------------------------------------------------------- /src/sdk-service-pre-init-delegate.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface SdkServicePreInitDelegate { 4 | /** @internal */ 5 | preInit(): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/storage/def/scan-requests.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface ScanContentContext { 3 | currentStoragePath: string; 4 | newlyAddedIdentifiers?: string[]; 5 | deletedIdentifiers?: string[]; 6 | } 7 | -------------------------------------------------------------------------------- /src/telemetry/def/telemetry-sync-stat.ts: -------------------------------------------------------------------------------- 1 | export interface TelemetrySyncStat { 2 | syncedEventCount: number; 3 | syncTime: number; 4 | syncedFileSize: number; 5 | error?: any; 6 | } 7 | -------------------------------------------------------------------------------- /dist/api/errors/request-build-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class RequestBuildError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/db/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/db-constants'; 2 | export * from './config/db-config'; 3 | export * from './def/migration'; 4 | export * from './def/query'; 5 | export * from './def/db-service'; 6 | -------------------------------------------------------------------------------- /dist/group/error/no-group-found-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoGroupFoundError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/storage/errors/low-memory-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class LowMemoryError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/util/file/errors/no-file-found.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../../sunbird-error'; 2 | export declare class NoFileFoundError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /src/util/download/def/response.ts: -------------------------------------------------------------------------------- 1 | import {DownloadRequest} from './requests'; 2 | 3 | export interface DownloadTracking { 4 | completed: DownloadRequest[]; 5 | queued: DownloadRequest[]; 6 | } 7 | -------------------------------------------------------------------------------- /dist/course/errors/no-certificate-found.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoCertificateFound extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/page/config/page-service-config.d.ts: -------------------------------------------------------------------------------- 1 | import { OpenRapConfigurable } from '../../open-rap-configurable'; 2 | export interface PageServiceConfig extends OpenRapConfigurable { 3 | apiPath: string; 4 | } 5 | -------------------------------------------------------------------------------- /dist/storage/errors/cancellation-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class CancellationError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /src/page/config/page-service-config.ts: -------------------------------------------------------------------------------- 1 | import {OpenRapConfigurable} from '../../open-rap-configurable'; 2 | 3 | export interface PageServiceConfig extends OpenRapConfigurable { 4 | apiPath: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/profile/def/delete-user-feed-request.ts: -------------------------------------------------------------------------------- 1 | import {UserFeedCategory} from './profile'; 2 | 3 | export interface DeleteUserFeedRequest { 4 | feedEntryId: string; 5 | category: UserFeedCategory; 6 | } 7 | -------------------------------------------------------------------------------- /dist/auth/errors/auth-token-refresh-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class AuthTokenRefreshError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/auth/errors/in-app-browser-exit-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class InAppBrowserExitError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/errors/invalid-profile-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class InvalidProfileError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/errors/no-active-session-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoActiveSessionError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/errors/no-profile-found-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoProfileFoundError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/storage/errors/duplicate-content-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class DuplicateContentError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/sunbird-error.d.ts: -------------------------------------------------------------------------------- 1 | export declare abstract class SunbirdError extends Error { 2 | private readonly _code; 3 | protected constructor(message: string, code: string); 4 | readonly code: string; 5 | } 6 | -------------------------------------------------------------------------------- /src/api/config/app-config.ts: -------------------------------------------------------------------------------- 1 | export interface AppConfig { 2 | maxCompatibilityLevel: number; 3 | minCompatibilityLevel: number; 4 | deepLinkBasePath?: string; 5 | buildConfigPackage?: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/framework/def/responses.ts: -------------------------------------------------------------------------------- 1 | import {Organization} from './organization'; 2 | 3 | export interface OrganizationSearchResponse> { 4 | count: number; 5 | content: T[]; 6 | } 7 | -------------------------------------------------------------------------------- /src/group/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/group-service'; 2 | export * from './def/group-activity-service'; 3 | export * from './def/requests'; 4 | export * from './def/responses'; 5 | export * from './def/models'; 6 | -------------------------------------------------------------------------------- /src/profile/def/update-server-profile-declarations-response.ts: -------------------------------------------------------------------------------- 1 | export { 2 | CsUpdateUserDeclarationsResponse as UpdateServerProfileDeclarationsResponse 3 | } from '@project-sunbird/client-services/services/user'; 4 | -------------------------------------------------------------------------------- /dist/api/config/app-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface AppConfig { 2 | maxCompatibilityLevel: number; 3 | minCompatibilityLevel: number; 4 | deepLinkBasePath?: string; 5 | buildConfigPackage?: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/faq/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/faq-service-config'; 2 | export * from './impl/faq-service-impl'; 3 | export * from './def/faq-service'; 4 | export * from './def/faq'; 5 | export * from './def/get-faq-request'; 6 | -------------------------------------------------------------------------------- /src/profile/def/import-profile-context.ts: -------------------------------------------------------------------------------- 1 | export interface ImportProfileContext { 2 | sourceDBFilePath: string; 3 | metadata?: { [key: string]: any }; 4 | imported?: number; 5 | failed?: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/profile/def/update-server-profile-declarations-request.ts: -------------------------------------------------------------------------------- 1 | import {UserDeclaration} from './profile'; 2 | 3 | export interface UpdateServerProfileDeclarationsRequest { 4 | declarations: UserDeclaration[]; 5 | } 6 | -------------------------------------------------------------------------------- /dist/faq/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './config/faq-service-config'; 2 | export * from './impl/faq-service-impl'; 3 | export * from './def/faq-service'; 4 | export * from './def/faq'; 5 | export * from './def/get-faq-request'; 6 | -------------------------------------------------------------------------------- /dist/group/error/no-active-group-session-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoActiveGroupSessionError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/util/file/util/path.d.ts: -------------------------------------------------------------------------------- 1 | export declare class Path { 2 | static ASSETS_PATH: string; 3 | static dirPathFromFilePath(filePath: string): string; 4 | static fileNameFromFilePath(filePath: string): string; 5 | } 6 | -------------------------------------------------------------------------------- /src/profile/def/user-migrate-request.ts: -------------------------------------------------------------------------------- 1 | export interface UserMigrateRequest { 2 | userId: string; 3 | userExtId?: string; 4 | channel?: string; 5 | action: 'reject' | 'accept'; 6 | feedId?: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/util/download/index.ts: -------------------------------------------------------------------------------- 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'; 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=Sunbird-Ed_sunbird-mobile-sdk&metric=alert_status)](https://sonarcloud.io/dashboard?id=Sunbird-Ed_sunbird-mobile-sdk) 2 | # sunbird-mobile-sdk -------------------------------------------------------------------------------- /dist/api/def/request-interceptor.d.ts: -------------------------------------------------------------------------------- 1 | import { Request } from './request'; 2 | import { Observable } from 'rxjs'; 3 | export interface RequestInterceptor { 4 | interceptRequest(request: Request): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/framework/errors/no-active-channel-found-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class NoActiveChannelFoundError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/profile/def/user-migrate-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface UserMigrateRequest { 2 | userId: string; 3 | userExtId?: string; 4 | channel?: string; 5 | action: 'reject' | 'accept'; 6 | feedId?: string; 7 | } 8 | -------------------------------------------------------------------------------- /dist/util/download/def/download-status.d.ts: -------------------------------------------------------------------------------- 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 | } 8 | -------------------------------------------------------------------------------- /src/auth/def/o-auth-session.ts: -------------------------------------------------------------------------------- 1 | export interface OAuthSession { 2 | access_token: string; 3 | refresh_token: string; 4 | userToken: string; 5 | accessTokenExpiresOn?: number; 6 | managed_access_token?: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/form/def/form-service.ts: -------------------------------------------------------------------------------- 1 | import {FormRequest} from './form-request'; 2 | import {Observable} from 'rxjs'; 3 | 4 | export interface FormService { 5 | getForm(formRequest: FormRequest): Observable<{ [key: string]: any }>; 6 | } 7 | -------------------------------------------------------------------------------- /src/util/network/def/network-info-service.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {NetworkStatus} from './network-status'; 3 | 4 | export interface NetworkInfoService { 5 | networkStatus$: Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/archive/export/def/telemetry-archive-package-meta.d.ts: -------------------------------------------------------------------------------- 1 | import { ArchivePackageMeta } from '../..'; 2 | export interface TelemetryArchivePackageMeta extends ArchivePackageMeta { 3 | mid: string; 4 | eventsCount: number; 5 | } 6 | -------------------------------------------------------------------------------- /dist/archive/export/error/invalid-request-error.d.ts: -------------------------------------------------------------------------------- 1 | import { ExportAssertionError } from './export-assertion-error'; 2 | export declare class InvalidRequestError extends ExportAssertionError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/archive/export/error/object-not-found-error.d.ts: -------------------------------------------------------------------------------- 1 | import { ExportAssertionError } from './export-assertion-error'; 2 | export declare class ObjectNotFoundError extends ExportAssertionError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/archive/import/error/invalid-archive-error.d.ts: -------------------------------------------------------------------------------- 1 | import { ImportAssertionError } from './import-assertion-error'; 2 | export declare class InvalidArchiveError extends ImportAssertionError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/archive/import/error/unknown-object-error.d.ts: -------------------------------------------------------------------------------- 1 | import { ImportAssertionError } from './import-assertion-error'; 2 | export declare class UnknownObjectError extends ImportAssertionError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/archive/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-service'; 2 | export * from './export/error/export-assertion-error'; 3 | export * from './export/error/invalid-request-error'; 4 | export * from './export/error/object-not-found-error'; 5 | -------------------------------------------------------------------------------- /dist/util/encoders/utf8-to-b64-encoder.d.ts: -------------------------------------------------------------------------------- 1 | import { Encoder } from './encoder'; 2 | export declare class Utf8ToB64Encoder implements Encoder { 3 | decode(arg: string): string; 4 | encode(arg: string): string; 5 | } 6 | -------------------------------------------------------------------------------- /dist/util/network/def/network-info-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { NetworkStatus } from './network-status'; 3 | export interface NetworkInfoService { 4 | networkStatus$: Observable; 5 | } 6 | -------------------------------------------------------------------------------- /src/archive/export/def/telemetry-archive-package-meta.ts: -------------------------------------------------------------------------------- 1 | import {ArchivePackageMeta} from '../..'; 2 | 3 | export interface TelemetryArchivePackageMeta extends ArchivePackageMeta { 4 | mid: string; 5 | eventsCount: number; 6 | } 7 | -------------------------------------------------------------------------------- /src/archive/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/archive-service'; 2 | export * from './export/error/export-assertion-error'; 3 | export * from './export/error/invalid-request-error'; 4 | export * from './export/error/object-not-found-error'; 5 | -------------------------------------------------------------------------------- /src/profile/def/get-managed-server-profiles-request.ts: -------------------------------------------------------------------------------- 1 | import {CachedItemRequest} from '../../key-value-store'; 2 | 3 | export interface GetManagedServerProfilesRequest extends CachedItemRequest { 4 | requiredFields: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /dist/api/def/connection.d.ts: -------------------------------------------------------------------------------- 1 | import { Request } from './request'; 2 | import { Response } from './response'; 3 | import { Observable } from 'rxjs'; 4 | export interface Connection { 5 | invoke(request: Request): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/auth/util/webview-session-provider/errors/interrupt-error.d.ts: -------------------------------------------------------------------------------- 1 | import { WebviewRunnerError } from './webview-runner-error'; 2 | export declare class InterruptError extends WebviewRunnerError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/db/util/query-builder.d.ts: -------------------------------------------------------------------------------- 1 | export declare class QueryBuilder { 2 | private static ConstraintDecorator; 3 | private static WhereDecorator; 4 | private query; 5 | where(condition: string): any; 6 | build(): string; 7 | } 8 | -------------------------------------------------------------------------------- /dist/profile/def/import-profile-context.d.ts: -------------------------------------------------------------------------------- 1 | export interface ImportProfileContext { 2 | sourceDBFilePath: string; 3 | metadata?: { 4 | [key: string]: any; 5 | }; 6 | imported?: number; 7 | failed?: number; 8 | } 9 | -------------------------------------------------------------------------------- /dist/storage/errors/transfer-failed-duplicate-content-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class TransferFailedDuplicateContentError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/util/app/def/app-info.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface AppInfo { 3 | init(): any; 4 | getAppName(): string; 5 | getVersionName(): string; 6 | getFirstAccessTimestamp(): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /src/events-bus/def/event-namespace.ts: -------------------------------------------------------------------------------- 1 | export enum EventNamespace { 2 | AUTH = 'AUTH', 3 | TELEMETRY = 'TELEMETRY', 4 | DOWNLOADS = 'DOWNLOADS', 5 | CONTENT = 'CONTENT', 6 | ERROR = 'ERROR', 7 | STORAGE = 'STORAGE' 8 | } 9 | -------------------------------------------------------------------------------- /src/key-value-store/def/cached-item-request.ts: -------------------------------------------------------------------------------- 1 | export enum CachedItemRequestSourceFrom { 2 | SERVER = 'server', 3 | CACHE = 'cache' 4 | } 5 | 6 | export interface CachedItemRequest { 7 | from?: CachedItemRequestSourceFrom; 8 | } 9 | -------------------------------------------------------------------------------- /dist/api/def/authenticator.d.ts: -------------------------------------------------------------------------------- 1 | import { RequestInterceptor } from './request-interceptor'; 2 | import { ResponseInterceptor } from './response-interceptor'; 3 | export interface Authenticator extends RequestInterceptor, ResponseInterceptor { 4 | } 5 | -------------------------------------------------------------------------------- /dist/key-value-store/def/cached-item-request.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum CachedItemRequestSourceFrom { 2 | SERVER = "server", 3 | CACHE = "cache" 4 | } 5 | export interface CachedItemRequest { 6 | from?: CachedItemRequestSourceFrom; 7 | } 8 | -------------------------------------------------------------------------------- /dist/telemetry/errors/invalid-input-for-sync-preprocessor-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class InvalidInputForSyncPreprocessorError extends SunbirdError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /src/events-bus/def/event-observer.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {EventsBusEvent} from './events-bus-event'; 3 | 4 | export interface EventObserver { 5 | onEvent(event: T): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/system-settings/def/system-settings-org-ids.ts: -------------------------------------------------------------------------------- 1 | export enum SystemSettingsOrgIds { 2 | CUSTODIAN_ORG_ID = 'custodianOrgId', 3 | COURSE_FRAMEWORK_ID = 'courseFrameworkId', 4 | ERROR_LOG_SYNC_SETTINGS = 'errorLogSyncSettings', 5 | } 6 | -------------------------------------------------------------------------------- /dist/archive/export/error/export-assertion-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../../sunbird-error'; 2 | export declare abstract class ExportAssertionError extends SunbirdError { 3 | protected constructor(message: string, code: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/archive/import/error/import-assertion-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../../sunbird-error'; 2 | export declare abstract class ImportAssertionError extends SunbirdError { 3 | protected constructor(message: string, code: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/events-bus/def/event-namespace.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum EventNamespace { 2 | AUTH = "AUTH", 3 | TELEMETRY = "TELEMETRY", 4 | DOWNLOADS = "DOWNLOADS", 5 | CONTENT = "CONTENT", 6 | ERROR = "ERROR", 7 | STORAGE = "STORAGE" 8 | } 9 | -------------------------------------------------------------------------------- /dist/events-bus/def/event-observer.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { EventsBusEvent } from './events-bus-event'; 3 | export interface EventObserver { 4 | onEvent(event: T): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/faq/def/faq-service.d.ts: -------------------------------------------------------------------------------- 1 | import { GetFaqRequest } from './get-faq-request'; 2 | import { Faq } from '..'; 3 | import { Observable } from 'rxjs'; 4 | export interface FaqService { 5 | getFaqDetails(request: GetFaqRequest): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/key-value-store/def/key-value-store.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface KeyValueStore { 3 | setValue(key: string, value: string): Observable; 4 | getValue(key: string): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/profile/def/server-profile-details-request.d.ts: -------------------------------------------------------------------------------- 1 | import { CachedItemRequest } from '../../key-value-store'; 2 | export interface ServerProfileDetailsRequest extends CachedItemRequest { 3 | userId: string; 4 | requiredFields: string[]; 5 | } 6 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-file-transfer.d.ts: -------------------------------------------------------------------------------- 1 | declare class FileTransfer { 2 | download( 3 | source: string, 4 | target: string, 5 | successCallback: (entry: any) => void, 6 | errorCallBack: (err: any) => void 7 | ); 8 | } -------------------------------------------------------------------------------- /src/profile/def/server-profile-details-request.ts: -------------------------------------------------------------------------------- 1 | import {CachedItemRequest} from '../../key-value-store'; 2 | 3 | export interface ServerProfileDetailsRequest extends CachedItemRequest { 4 | userId: string; 5 | requiredFields: string[]; 6 | } 7 | -------------------------------------------------------------------------------- /dist/auth/util/webview-session-provider/errors/param-not-captured-error.d.ts: -------------------------------------------------------------------------------- 1 | import { WebviewRunnerError } from './webview-runner-error'; 2 | export declare class ParamNotCapturedError extends WebviewRunnerError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/device-register/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './config/device-register-config'; 2 | export * from './def/device-register-service'; 3 | export * from './def/request'; 4 | export * from './def/response'; 5 | export * from './impl/device-register-service-impl'; 6 | -------------------------------------------------------------------------------- /dist/form/def/form-service.d.ts: -------------------------------------------------------------------------------- 1 | import { FormRequest } from './form-request'; 2 | import { Observable } from 'rxjs'; 3 | export interface FormService { 4 | getForm(formRequest: FormRequest): Observable<{ 5 | [key: string]: {}; 6 | }>; 7 | } 8 | -------------------------------------------------------------------------------- /dist/system-settings/def/system-settings-org-ids.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum SystemSettingsOrgIds { 2 | CUSTODIAN_ORG_ID = "custodianOrgId", 3 | COURSE_FRAMEWORK_ID = "courseFrameworkId", 4 | ERROR_LOG_SYNC_SETTINGS = "errorLogSyncSettings" 5 | } 6 | -------------------------------------------------------------------------------- /dist/telemetry/impl/string-to-gzipped-string.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetrySyncPreprocessor } from '../def/telemetry-sync-preprocessor'; 2 | export declare class StringToGzippedString implements TelemetrySyncPreprocessor { 3 | process(input: any): any; 4 | } 5 | -------------------------------------------------------------------------------- /scripts/pre-commit.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Running pre-commit hook" 4 | ./scripts/run-tests.bash 5 | 6 | # $? stores exit value of the last command 7 | if [ $? -ne 0 ]; then 8 | echo "Tests must pass before commit!" 9 | exit 1 10 | fi -------------------------------------------------------------------------------- /src/device-register/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/device-register-config'; 2 | export * from './def/device-register-service'; 3 | export * from './def/request'; 4 | export * from './def/response'; 5 | export * from './impl/device-register-service-impl'; 6 | -------------------------------------------------------------------------------- /src/key-value-store/def/key-value-store.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface KeyValueStore { 4 | setValue(key: string, value: string): Observable; 5 | 6 | getValue(key: string): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /dist/util/search-history/def/requests.d.ts: -------------------------------------------------------------------------------- 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 | } 10 | -------------------------------------------------------------------------------- /scripts/install-hooks.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GIT_DIR=$(git rev-parse --git-dir) 4 | 5 | echo "Installing hooks..." 6 | # this command creates symlink to our pre-commit script 7 | ln -s ../../scripts/pre-commit.bash $GIT_DIR/hooks/pre-commit 8 | echo "Done!" -------------------------------------------------------------------------------- /src/device-register/def/response.ts: -------------------------------------------------------------------------------- 1 | export {Profile as DeviceProfileResponse} from '@project-sunbird/client-services/models'; 2 | 3 | export interface DeviceRegisterResponse { 4 | ts: string; 5 | result: { 6 | actions: Array; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /src/faq/def/faq-service.ts: -------------------------------------------------------------------------------- 1 | import { GetFaqRequest } from './get-faq-request'; 2 | import { Faq } from '..'; 3 | import { Observable } from 'rxjs'; 4 | 5 | 6 | export interface FaqService { 7 | getFaqDetails(request: GetFaqRequest): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /src/profile/def/merge-server-profiles-request.ts: -------------------------------------------------------------------------------- 1 | export interface MergeServerProfilesRequest { 2 | from: { 3 | userId: string; 4 | accessToken: string; 5 | }; 6 | to: { 7 | userId: string; 8 | accessToken: string; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/util/download/def/download-status.ts: -------------------------------------------------------------------------------- 1 | export enum DownloadStatus { 2 | STATUS_FAILED = 0x00000010, 3 | STATUS_PAUSED = 0x00000004, 4 | STATUS_PENDING = 0x00000001, 5 | STATUS_RUNNING = 0x00000002, 6 | STATUS_SUCCESSFUL = 0x00000008 7 | } 8 | -------------------------------------------------------------------------------- /dist/db/migrations/initial-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class InitialMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/storage/errors/transfer-failed-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | export declare class TransferFailedError extends SunbirdError { 3 | readonly directory: string; 4 | constructor(message: string, directory: string); 5 | } 6 | -------------------------------------------------------------------------------- /src/course/def/get-enrolled-course-response.ts: -------------------------------------------------------------------------------- 1 | import {Course} from './course'; 2 | 3 | export interface GetEnrolledCourseResponse { 4 | id: string; 5 | params: { resmsgid: string }; 6 | result: { 7 | courses: Course[], 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /src/system-settings/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/system-settings-service'; 2 | export * from './def/system-settings'; 3 | export * from './def/request-types'; 4 | export * from './config/system-settings-config'; 5 | export * from './impl/system-settings-service-impl'; 6 | -------------------------------------------------------------------------------- /src/util/app/def/app-info.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface AppInfo { 4 | init(); 5 | 6 | getAppName(): string; 7 | 8 | getVersionName(): string; 9 | 10 | getFirstAccessTimestamp(): Observable; 11 | } 12 | -------------------------------------------------------------------------------- /src/util/search-history/def/requests.ts: -------------------------------------------------------------------------------- 1 | export interface AddEntryRequest { 2 | query: string; 3 | namespace: string; 4 | } 5 | 6 | export interface GetEntriesRequest { 7 | namespace: string; 8 | like?: string; 9 | limit: number; 10 | } 11 | -------------------------------------------------------------------------------- /dist/auth/util/webview-session-provider/errors/webview-runner-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../../../sunbird-error'; 2 | export declare abstract class WebviewRunnerError extends SunbirdError { 3 | protected constructor(message: string, code: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/db/migrations/error-stack-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class ErrorStackMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/system-settings/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/system-settings-service'; 2 | export * from './def/system-settings'; 3 | export * from './def/request-types'; 4 | export * from './config/system-settings-config'; 5 | export * from './impl/system-settings-service-impl'; 6 | -------------------------------------------------------------------------------- /dist/telemetry/impl/string-to-byte-array-preprocessor.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetrySyncPreprocessor } from '../def/telemetry-sync-preprocessor'; 2 | export declare class StringToByteArrayPreprocessor implements TelemetrySyncPreprocessor { 3 | process(input: any): any; 4 | } 5 | -------------------------------------------------------------------------------- /src/error/impl/error-logger-service-impl.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {SdkConfig} from '../../sdk-config'; 2 | 3 | export const mockSdkConfigWithErrorLoggerConfig: Partial = { 4 | errorLoggerConfig: { 5 | errorLoggerApiPath: 'sample_api_path' 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /dist/api/util/jwt.util.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum JWTokenType { 2 | HS256 = "HS256" 3 | } 4 | export declare class JWTUtil { 5 | static createJWToken(subject: any, secretKey: string, tokenType?: JWTokenType): string; 6 | static getJWTPayload(token: string): any; 7 | } 8 | -------------------------------------------------------------------------------- /dist/db/migrations/content-marker-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class ContentMarkerMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/db/migrations/search-history-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class SearchHistoryMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/util/object-util.d.ts: -------------------------------------------------------------------------------- 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 | } 7 | -------------------------------------------------------------------------------- /src/util/download/def/download-complete-delegate.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {DownloadRequest} from './requests'; 3 | 4 | export interface DownloadCompleteDelegate { 5 | onDownloadCompletion(downloadRequest: DownloadRequest): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/content/config/content-config.d.ts: -------------------------------------------------------------------------------- 1 | import { OpenRapConfigurable } from '../../open-rap-configurable'; 2 | export interface ContentServiceConfig extends OpenRapConfigurable { 3 | apiPath: string; 4 | searchApiPath: string; 5 | contentHeirarchyAPIPath: string; 6 | } 7 | -------------------------------------------------------------------------------- /dist/db/migrations/profile-syllabus-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class ProfileSyllabusMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/db/migrations/recently-viewed-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class RecentlyViewedMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/events-bus/def/register-observer-request.d.ts: -------------------------------------------------------------------------------- 1 | import { EventNamespace } from './event-namespace'; 2 | import { EventObserver } from './event-observer'; 3 | export interface RegisterObserverRequest { 4 | namespace: EventNamespace; 5 | observer: EventObserver; 6 | } 7 | -------------------------------------------------------------------------------- /dist/form/def/form-request.d.ts: -------------------------------------------------------------------------------- 1 | import { CachedItemRequest } from '../../key-value-store'; 2 | export interface FormRequest extends CachedItemRequest { 3 | type: string; 4 | subType: string; 5 | action: string; 6 | rootOrgId?: string; 7 | framework?: string; 8 | } 9 | -------------------------------------------------------------------------------- /dist/profile/def/server-profile-search-criteria.d.ts: -------------------------------------------------------------------------------- 1 | export interface ServerProfileSearchCriteria { 2 | query?: string; 3 | filters: { 4 | identifier?: Set; 5 | }; 6 | fields?: string[]; 7 | offset?: number; 8 | limit?: number; 9 | } 10 | -------------------------------------------------------------------------------- /dist/util/array-util.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ArrayUtil { 2 | static joinPreservingQuotes(array: string[]): string; 3 | static isEmpty(array: T[]): boolean; 4 | static contains(array: string[], item: string): boolean; 5 | static deDupe(array: any): string[]; 6 | } 7 | -------------------------------------------------------------------------------- /dist/util/download/def/download-complete-delegate.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { DownloadRequest } from './requests'; 3 | export interface DownloadCompleteDelegate { 4 | onDownloadCompletion(downloadRequest: DownloadRequest): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /plugins/jjdltc-cordova-plugin-zip.d.ts: -------------------------------------------------------------------------------- 1 | declare var JJzip: { 2 | unzip(sourceZip: string, option, successCallback, errorCallback); 3 | 4 | zip(directoryPath: string, option, directoriesToBeSkipped: string[], filesToBeSkipped: string[], successCallback, errorCallback); 5 | }; 6 | -------------------------------------------------------------------------------- /src/events-bus/def/register-observer-request.ts: -------------------------------------------------------------------------------- 1 | import {EventNamespace} from './event-namespace'; 2 | import {EventObserver} from './event-observer'; 3 | 4 | export interface RegisterObserverRequest { 5 | namespace: EventNamespace; 6 | observer: EventObserver; 7 | } 8 | -------------------------------------------------------------------------------- /src/profile/def/export-profile-context.ts: -------------------------------------------------------------------------------- 1 | export interface ExportProfileContext { 2 | userIds: string[]; 3 | groupIds: string[]; 4 | destinationFolder?: string; 5 | destinationDBFilePath?: string; 6 | metadata?: { [key: string]: any }; 7 | size?: string; 8 | } 9 | -------------------------------------------------------------------------------- /src/telemetry/util/telemetry-logger.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdSdk} from '../../sdk'; 2 | import {TelemetryService} from '..'; 3 | 4 | export class TelemetryLogger { 5 | public static get log(): TelemetryService { 6 | return SunbirdSdk.instance.telemetryService; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/deletete-temp-dir.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { ExportContentContext } from '../..'; 3 | export declare class DeleteTempDir { 4 | constructor(); 5 | execute(exportContext: ExportContentContext): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/course/def/get-enrolled-course-response.d.ts: -------------------------------------------------------------------------------- 1 | import { Course } from './course'; 2 | export interface GetEnrolledCourseResponse { 3 | id: string; 4 | params: { 5 | resmsgid: string; 6 | }; 7 | result: { 8 | courses: Course[]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /dist/db/migrations/course-assessment-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class CourseAssessmentMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/def/merge-server-profiles-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface MergeServerProfilesRequest { 2 | from: { 3 | userId: string; 4 | accessToken: string; 5 | }; 6 | to: { 7 | userId: string; 8 | accessToken: string; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /dist/telemetry/impl/telemetry-entries-to-string-preprocessor.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetrySyncPreprocessor } from '../def/telemetry-sync-preprocessor'; 2 | export declare class TelemetryEntriesToStringPreprocessor implements TelemetrySyncPreprocessor { 3 | process(input: any): any; 4 | } 5 | -------------------------------------------------------------------------------- /dist/api/def/response-interceptor.d.ts: -------------------------------------------------------------------------------- 1 | import { Request } from './request'; 2 | import { Response } from './response'; 3 | import { Observable } from 'rxjs'; 4 | export interface ResponseInterceptor { 5 | interceptResponse(request: Request, response: Response): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/api/errors/http-client-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | import { Response } from '..'; 3 | export declare class HttpClientError extends SunbirdError { 4 | readonly response: Response; 5 | constructor(message: string, response: Response); 6 | } 7 | -------------------------------------------------------------------------------- /dist/api/errors/http-server-error.d.ts: -------------------------------------------------------------------------------- 1 | import { SunbirdError } from '../../sunbird-error'; 2 | import { Response } from '..'; 3 | export declare class HttpServerError extends SunbirdError { 4 | readonly response: Response; 5 | constructor(message: string, response: Response); 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/config/profile-service-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileServiceConfig { 2 | profileApiPath: string; 3 | profileApiPath_V5: string; 4 | tenantApiPath: string; 5 | otpApiPath: string; 6 | searchLocationApiPath: string; 7 | locationDirPath: string; 8 | } 9 | -------------------------------------------------------------------------------- /dist/profile/handler/profile-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ContentAccessEntry } from '../../content/db/schema'; 2 | import { ContentAccess } from '..'; 3 | export declare class ProfileHandler { 4 | static mapDBEntryToContenetAccess(contentAccess: ContentAccessEntry.SchemaMap): ContentAccess; 5 | } 6 | -------------------------------------------------------------------------------- /dist/auth/util/webview-session-provider/errors/no-inappbrowser-session-assertion-fail-error.d.ts: -------------------------------------------------------------------------------- 1 | import { WebviewRunnerError } from './webview-runner-error'; 2 | export declare class NoInappbrowserSessionAssertionFailError extends WebviewRunnerError { 3 | constructor(message: string); 4 | } 5 | -------------------------------------------------------------------------------- /dist/content/util/stack.d.ts: -------------------------------------------------------------------------------- 1 | export declare class Stack { 2 | private _stack; 3 | constructor(stack?: T[]); 4 | readonly count: number; 5 | push(item: T): void; 6 | pop(): T; 7 | clear(): void; 8 | isEmpty(): boolean; 9 | addAll(item: T[]): void; 10 | } 11 | -------------------------------------------------------------------------------- /dist/db/migrations/milliseconds-to-seconds-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class MillisecondsToSecondsMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/db/migrations/offline-search-textbook-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class OfflineSearchTextbookMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | } 7 | -------------------------------------------------------------------------------- /dist/system-settings/def/system-settings-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { GetSystemSettingsRequest, SystemSettings } from '..'; 3 | export interface SystemSettingsService { 4 | getSystemSettings(request: GetSystemSettingsRequest): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /src/util/zip/def/zip-service.ts: -------------------------------------------------------------------------------- 1 | export interface ZipService { 2 | 3 | unzip(sourceZip: string, option, successCallback?, errorCallback?); 4 | 5 | zip(sourceFolderPath: string, option, directoriesToBeSkipped?: string[], filesToBeSkipped?: string[], successCallback?, errorCallback?); 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/def/location-search-criteria.d.ts: -------------------------------------------------------------------------------- 1 | export interface LocationSearchCriteria { 2 | filters: { 3 | query?: string; 4 | type: string; 5 | parentId?: string; 6 | code?: string; 7 | limit?: number; 8 | offset?: string; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/form/impl/form-service-impl.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {SdkConfig} from '../../sdk-config'; 2 | 3 | export const mockSdkConfigWithFormServiceConfig: Partial = { 4 | formServiceConfig: { 5 | apiPath: 'sample_api_path', 6 | formConfigDirPath: 'sample_dir_path' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /src/summarizer/assesment-analyzer.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdSdk} from '../sdk'; 2 | import {SummarizerService, TelemetryService} from '..'; 3 | 4 | export class AssesmentAnalyzer { 5 | public static get analyze(): SummarizerService { 6 | return SunbirdSdk.instance.summarizerService; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/page/def/page-assemble.ts: -------------------------------------------------------------------------------- 1 | export {PageSection as PageSections} from '@project-sunbird/client-services/models'; 2 | import {Page as PageAssembleModel} from '@project-sunbird/client-services/models'; 3 | 4 | export interface PageAssemble extends PageAssembleModel { 5 | ssoSectionId?: string; 6 | } 7 | -------------------------------------------------------------------------------- /src/profile/def/add-managed-profile-request.ts: -------------------------------------------------------------------------------- 1 | export interface AddManagedProfileRequest { 2 | firstName: string; 3 | lastName?: string; 4 | managedBy: string; 5 | framework?: any; 6 | profileLocation?: { 7 | code: string; 8 | type: string; 9 | }[]; 10 | } 11 | -------------------------------------------------------------------------------- /dist/content/handlers/content-feedback-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ContentFeedback } from '..'; 2 | import { ContentFeedbackEntry } from '../db/schema'; 3 | export declare class ContentFeedbackHandler { 4 | static mapFeedbackDBEntrytoResponseFeedback(feedback: ContentFeedbackEntry.SchemaMap): ContentFeedback; 5 | } 6 | -------------------------------------------------------------------------------- /dist/db/migrations/group-profile-migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService, Migration } from '..'; 2 | export declare class GroupProfileMigration extends Migration { 3 | constructor(); 4 | apply(dbService: DbService): Promise; 5 | queries(): Array; 6 | private updateProfileTable; 7 | } 8 | -------------------------------------------------------------------------------- /dist/page/def/page-assemble-service.d.ts: -------------------------------------------------------------------------------- 1 | import { PageAssembleCriteria } from './requests'; 2 | import { Observable } from 'rxjs'; 3 | import { PageAssemble } from './page-assemble'; 4 | export interface PageAssembleService { 5 | getPageAssemble(criteria: PageAssembleCriteria): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/db/util/unique-id.spec.ts: -------------------------------------------------------------------------------- 1 | import {UniqueId} from './unique-id'; 2 | 3 | describe.only('UniqueId', () => { 4 | // const uniqueId: UniqueId; 5 | it('should generate UniqueId', () => { 6 | // arrange 7 | // act 8 | // uniqueId 9 | // assert 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/storage/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/storage-destination'; 2 | export * from './def/storage-service'; 3 | export * from './def/storage-event'; 4 | export * from './def/storage-requests'; 5 | export * from './errors/transfer-failed-duplicate-content-error'; 6 | export * from './errors/transfer-failed-error'; 7 | -------------------------------------------------------------------------------- /dist/course/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './config/course-service-config'; 2 | export * from './impl/course-service-impl'; 3 | export * from './def/batch'; 4 | export * from './def/course'; 5 | export * from './def/course-service'; 6 | export * from './def/request-types'; 7 | export * from './def/unenrollCourseRequest'; 8 | -------------------------------------------------------------------------------- /dist/group/def/group-session.d.ts: -------------------------------------------------------------------------------- 1 | export declare class GroupSession { 2 | private readonly _gid; 3 | private readonly _sid; 4 | private readonly _createdTime; 5 | constructor(gid: string); 6 | readonly gid: string; 7 | readonly sid: string; 8 | readonly createdTime: number; 9 | } 10 | -------------------------------------------------------------------------------- /dist/group/util/group-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { GroupEntry } from '../../group/db/schema'; 2 | import { Group } from '..'; 3 | export declare class GroupMapper { 4 | static mapGroupDBEntryToGroup(groupEntry: GroupEntry.SchemaMap): Group; 5 | static mapGroupToGroupDBEntry(group: Group): GroupEntry.SchemaMap; 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/def/export-profile-context.d.ts: -------------------------------------------------------------------------------- 1 | export interface ExportProfileContext { 2 | userIds: string[]; 3 | groupIds: string[]; 4 | destinationFolder?: string; 5 | destinationDBFilePath?: string; 6 | metadata?: { 7 | [key: string]: any; 8 | }; 9 | size?: string; 10 | } 11 | -------------------------------------------------------------------------------- /dist/profile/def/user-migrate-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface UserMigrateResponse { 2 | params: { 3 | resmsgid: string; 4 | msgid: string; 5 | err: string; 6 | status: string; 7 | errmsg: string; 8 | }; 9 | responseCode: string; 10 | response: {}; 11 | } 12 | -------------------------------------------------------------------------------- /dist/storage/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/storage-destination'; 2 | export * from './def/storage-service'; 3 | export * from './def/storage-event'; 4 | export * from './def/storage-requests'; 5 | export * from './errors/transfer-failed-duplicate-content-error'; 6 | export * from './errors/transfer-failed-error'; 7 | -------------------------------------------------------------------------------- /dist/telemetry/decorators/generate-error-telemetry-decorators.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetryErrorRequest } from '..'; 2 | export declare const GenerateErrorTelemetryAfterMethodThrows: (telemetryErrorRequest: TelemetryErrorRequest) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor; 3 | -------------------------------------------------------------------------------- /dist/telemetry/def/telemetry-error.d.ts: -------------------------------------------------------------------------------- 1 | import { ErrorType, TelemetryErrorCode } from './telemetry-constants'; 2 | export declare class TelemetryError extends Error { 3 | errorCode: TelemetryErrorCode; 4 | errorType: ErrorType; 5 | constructor(errorCode: TelemetryErrorCode, errorType: ErrorType); 6 | } 7 | -------------------------------------------------------------------------------- /dist/util/search-history/util/search-history-db-entry-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { SearchEntry } from '..'; 2 | import { SearchHistoryEntry } from '../db/schema'; 3 | export declare class SearchHistoryDbEntryMapper { 4 | static mapSearchHistoryDbEntryToSearchEntry(dbEntry: SearchHistoryEntry.SchemaMap): SearchEntry; 5 | } 6 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectName=sunbird-mobile-sdk 2 | sonar.language=ts 3 | sonar.sources=src 4 | sonar.typescript.lcov.reportPaths=coverage/lcov.info 5 | sonar.projectKey=Sunbird-Ed_sunbird-mobile-sdk 6 | sonar.host.url=https://sonarcloud.io 7 | sonar.organization=sunbird-ed 8 | sonar.projectVersion=1.0 9 | -------------------------------------------------------------------------------- /src/auth/errors/sign-in-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class SignInError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'SIGN_IN_ERROR'); 6 | 7 | Object.setPrototypeOf(this, SignInError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/def/user-migrate-response.ts: -------------------------------------------------------------------------------- 1 | export interface UserMigrateResponse { 2 | params: { 3 | resmsgid: string, 4 | msgid: string, 5 | err: string, 6 | status: string, 7 | errmsg: string 8 | }; 9 | responseCode: string; 10 | response: {}; 11 | } 12 | -------------------------------------------------------------------------------- /dist/auth/def/auth-event.d.ts: -------------------------------------------------------------------------------- 1 | import { EventsBusEvent } from '../../events-bus'; 2 | export interface AuthEvent extends EventsBusEvent { 3 | type: AuthEventType; 4 | } 5 | export declare enum AuthEventType { 6 | AUTO_MIGRATE_SUCCESS = "AUTO_MIGRATE_SUCCESS", 7 | AUTO_MIGRATE_FAIL = "AUTO_MIGRATE_FAIL" 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/copy-to-destination.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { ContentExportRequest } from '../..'; 3 | export declare class CopyToDestination { 4 | constructor(); 5 | execute(exportResponse: Response, contentExportRequest: ContentExportRequest): Promise; 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/def/profile-session.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ProfileSession { 2 | private readonly _uid; 3 | private readonly _sid; 4 | private readonly _createdTime; 5 | constructor(uid: string); 6 | readonly uid: string; 7 | readonly sid: string; 8 | readonly createdTime: number; 9 | } 10 | -------------------------------------------------------------------------------- /src/errors/validation-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../sunbird-error'; 2 | 3 | export class ValidationError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'VALIDATION_ERROR'); 6 | 7 | Object.setPrototypeOf(this, ValidationError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/form/def/form-request.ts: -------------------------------------------------------------------------------- 1 | import {CachedItemRequest} from '../../key-value-store'; 2 | 3 | export interface FormRequest extends CachedItemRequest { 4 | type: string; 5 | subType: string; 6 | action: string; 7 | component?: string; 8 | rootOrgId?: string; 9 | framework?: string; 10 | } 11 | -------------------------------------------------------------------------------- /dist/player/def/player-service.d.ts: -------------------------------------------------------------------------------- 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; 8 | } 9 | -------------------------------------------------------------------------------- /src/auth/def/auth-event.ts: -------------------------------------------------------------------------------- 1 | import {EventsBusEvent} from '../../events-bus'; 2 | 3 | export interface AuthEvent extends EventsBusEvent { 4 | type: AuthEventType; 5 | } 6 | 7 | export enum AuthEventType { 8 | AUTO_MIGRATE_SUCCESS = 'AUTO_MIGRATE_SUCCESS', 9 | AUTO_MIGRATE_FAIL = 'AUTO_MIGRATE_FAIL', 10 | } 11 | -------------------------------------------------------------------------------- /src/storage/errors/low-memory-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class LowMemoryError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'LOW_MEMORY'); 6 | 7 | Object.setPrototypeOf(this, LowMemoryError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/telemetry/config/telemetry-config.d.ts: -------------------------------------------------------------------------------- 1 | import { OpenRapConfigurable } from '../../open-rap-configurable'; 2 | export interface TelemetryConfig extends OpenRapConfigurable { 3 | apiPath: string; 4 | telemetrySyncBandwidth: number; 5 | telemetrySyncThreshold: number; 6 | telemetryLogMinAllowedOffset: number; 7 | } 8 | -------------------------------------------------------------------------------- /dist/util/zip/def/zip-service.d.ts: -------------------------------------------------------------------------------- 1 | export interface ZipService { 2 | unzip(sourceZip: string, option: any, successCallback?: any, errorCallback?: any): any; 3 | zip(sourceFolderPath: string, option: any, directoriesToBeSkipped?: string[], filesToBeSkipped?: string[], successCallback?: any, errorCallback?: any): any; 4 | } 5 | -------------------------------------------------------------------------------- /src/auth/errors/processing-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class ProcessingError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'PROCESSING_ERROR'); 6 | 7 | Object.setPrototypeOf(this, ProcessingError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/storage/errors/cancellation-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class CancellationError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'CANCELLED'); 6 | 7 | Object.setPrototypeOf(this, CancellationError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/framework/config/framework-service-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface FrameworkServiceConfig { 2 | channelApiPath: string; 3 | frameworkApiPath: string; 4 | frameworkConfigDirPath: string; 5 | channelConfigDirPath: string; 6 | searchOrganizationApiPath: string; 7 | systemSettingsDefaultChannelIdKey: string; 8 | } 9 | -------------------------------------------------------------------------------- /dist/storage/handler/transfer/delete-destination-folder.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { TransferContentContext } from '../transfer-content-handler'; 3 | export declare class DeleteDestinationFolder { 4 | constructor(); 5 | execute(context: TransferContentContext): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/course/errors/no-certificate-found.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoCertificateFound extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_CERTIFICATE_FOUND'); 6 | 7 | Object.setPrototypeOf(this, NoCertificateFound.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/config/profile-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileServiceConfig { 2 | profileApiPath: string; 3 | profileApiPath_V2: string; 4 | profileApiPath_V5: string; 5 | tenantApiPath: string; 6 | otpApiPath: string; 7 | searchLocationApiPath: string; 8 | locationDirPath: string; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/system-settings/def/system-settings-service.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import { 3 | GetSystemSettingsRequest, 4 | SystemSettings 5 | } from '..'; 6 | 7 | export interface SystemSettingsService { 8 | 9 | getSystemSettings(request: GetSystemSettingsRequest): Observable; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/util/file/errors/no-file-found.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../../sunbird-error'; 2 | 3 | export class NoFileFoundError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_FILE_FOUND'); 6 | 7 | Object.setPrototypeOf(this, NoFileFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/group/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/group'; 2 | export * from './def/group-service'; 3 | export * from './def/group-session'; 4 | export * from './def/get-all-group-request'; 5 | export * from './def/profiles-to-group-request'; 6 | export * from './error/no-group-found-error'; 7 | export * from './error/no-active-group-session-error'; 8 | -------------------------------------------------------------------------------- /src/profile/def/update-user-feed-request.ts: -------------------------------------------------------------------------------- 1 | import {CsUpdateUserFeedRequest} from '@project-sunbird/client-services/services/user'; 2 | import {UserFeedCategory} from './profile'; 3 | 4 | export interface UpdateUserFeedRequest { 5 | feedEntryId: string; 6 | category: UserFeedCategory; 7 | request: CsUpdateUserFeedRequest; 8 | } 9 | -------------------------------------------------------------------------------- /src/telemetry/config/telemetry-config.ts: -------------------------------------------------------------------------------- 1 | import {OpenRapConfigurable} from '../../open-rap-configurable'; 2 | 3 | export interface TelemetryConfig extends OpenRapConfigurable { 4 | apiPath: string; 5 | telemetrySyncBandwidth: number; 6 | telemetrySyncThreshold: number; 7 | telemetryLogMinAllowedOffset: number; // in ms 8 | } 9 | -------------------------------------------------------------------------------- /dist/util/network/impl/network-info-service-impl.d.ts: -------------------------------------------------------------------------------- 1 | import { NetworkInfoService, NetworkStatus } from '..'; 2 | import { Observable } from 'rxjs'; 3 | export declare class NetworkInfoServiceImpl implements NetworkInfoService { 4 | networkStatus$: Observable; 5 | private networkStatusSource; 6 | constructor(); 7 | } 8 | -------------------------------------------------------------------------------- /dist/util/queue/queue.d.ts: -------------------------------------------------------------------------------- 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> extends LinkedList { 5 | constructor(); 6 | enque(value: T): void; 7 | deque(): ListNode; 8 | } 9 | -------------------------------------------------------------------------------- /src/group-deprecated/error/no-group-found-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoGroupFoundError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_GROUP_FOUND'); 6 | 7 | Object.setPrototypeOf(this, NoGroupFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/errors/no-profile-found-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoProfileFoundError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_PROFILE_FOUND'); 6 | 7 | Object.setPrototypeOf(this, NoProfileFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/summarizer/index.ts: -------------------------------------------------------------------------------- 1 | export * from './impl/summarizer-service-impl'; 2 | export * from './def/request'; 3 | export * from './def/response'; 4 | export * from './def/summarizer-service'; 5 | export * from './handler/summarizer-handler'; 6 | export * from './handler/summarizer-queries'; 7 | export * from './handler/summary-telemetry-event-handler'; -------------------------------------------------------------------------------- /dist/content/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './def/content'; 2 | export * from './def/response'; 3 | export * from './def/content-service'; 4 | export * from './def/requests'; 5 | export * from './config/content-config'; 6 | export * from './def/content-feedback-service'; 7 | export * from './util/content-constants'; 8 | export * from './def/content-event'; 9 | -------------------------------------------------------------------------------- /dist/profile/util/profile-db-entry-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { ProfileEntry } from '../db/schema'; 2 | import { Profile } from '..'; 3 | export declare class ProfileDbEntryMapper { 4 | static mapProfileDBEntryToProfile(profileEntry: ProfileEntry.SchemaMap): Profile; 5 | static mapProfileToProfileDBEntry(profile: Profile): ProfileEntry.SchemaMap; 6 | } 7 | -------------------------------------------------------------------------------- /dist/summarizer/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './impl/summarizer-service-impl'; 2 | export * from './def/request'; 3 | export * from './def/response'; 4 | export * from './def/summarizer-service'; 5 | export * from './handler/summarizer-handler'; 6 | export * from './handler/summarizer-queries'; 7 | export * from './handler/summary-telemetry-event-handler'; 8 | -------------------------------------------------------------------------------- /src/profile/errors/invalid-profile-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class InvalidProfileError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'INVALID_PROFILE_ERROR'); 6 | 7 | Object.setPrototypeOf(this, InvalidProfileError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/errors/no-active-session-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoActiveSessionError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_ACTIVE_SESSION'); 6 | 7 | Object.setPrototypeOf(this, NoActiveSessionError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/system-settings/impl/system-settings-service-impl.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {SdkConfig} from '../../sdk-config'; 2 | 3 | export const mockSdkConfigWithSystemSettingsConfig: Partial = { 4 | systemSettingsConfig: { 5 | systemSettingsApiPath: 'SAMPLE_API_PATH', 6 | systemSettingsDirPath: 'SAMPLE_DIR_PATH' 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /src/archive/export/error/invalid-request-error.ts: -------------------------------------------------------------------------------- 1 | import {ExportAssertionError} from './export-assertion-error'; 2 | 3 | export class InvalidRequestError extends ExportAssertionError { 4 | constructor(message: string) { 5 | super(message, 'INVALID_REQUEST'); 6 | Object.setPrototypeOf(this, InvalidRequestError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/archive/import/error/invalid-archive-error.ts: -------------------------------------------------------------------------------- 1 | import {ImportAssertionError} from './import-assertion-error'; 2 | 3 | export class InvalidArchiveError extends ImportAssertionError { 4 | constructor(message: string) { 5 | super(message, 'INVALID_ARCHIVE'); 6 | Object.setPrototypeOf(this, InvalidArchiveError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/storage/errors/duplicate-content-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class DuplicateContentError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'DUPLICATE_CONTENT'); 6 | 7 | Object.setPrototypeOf(this, DuplicateContentError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/archive/export/error/object-not-found-error.ts: -------------------------------------------------------------------------------- 1 | import {ExportAssertionError} from './export-assertion-error'; 2 | 3 | export class ObjectNotFoundError extends ExportAssertionError { 4 | constructor(message: string) { 5 | super(message, 'OBJECT_NOT_FOUND'); 6 | Object.setPrototypeOf(this, ObjectNotFoundError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/archive/import/error/unknown-object-error.ts: -------------------------------------------------------------------------------- 1 | import {ImportAssertionError} from './import-assertion-error'; 2 | 3 | export class UnknownObjectError extends ImportAssertionError { 4 | constructor(message: string) { 5 | super(message, 'UNKNOWN_OBJECT_ERROR'); 6 | Object.setPrototypeOf(this, UnknownObjectError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/auth/errors/auth-token-refresh-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class AuthTokenRefreshError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'AUTH_TOKEN_REFRESH_ERROR'); 6 | 7 | Object.setPrototypeOf(this, AuthTokenRefreshError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/auth/errors/in-app-browser-exit-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class InAppBrowserExitError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'IN_APP_BROWSER_EXIT_ERROR'); 6 | 7 | Object.setPrototypeOf(this, InAppBrowserExitError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/__test__/mocks.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiService } from '../api'; 2 | import { SharedPreferences } from '../util/shared-preferences'; 3 | import { EventsBusService } from '../events-bus'; 4 | export declare const MockApiService: ApiService; 5 | export declare const MockSharedPreferences: SharedPreferences; 6 | export declare const MockEventsBusService: EventsBusService; 7 | -------------------------------------------------------------------------------- /src/content/config/content-config.ts: -------------------------------------------------------------------------------- 1 | import {OpenRapConfigurable} from '../../open-rap-configurable'; 2 | 3 | export interface ContentServiceConfig extends OpenRapConfigurable { 4 | apiPath: string; 5 | searchApiPath: string; 6 | contentHeirarchyAPIPath: string; 7 | questionSetReadApiPath: string; 8 | questionReadApiPath: string; 9 | } 10 | -------------------------------------------------------------------------------- /dist/error/def/error-logger-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { TelemetryErrorRequest } from '../../telemetry'; 3 | import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate'; 4 | export interface ErrorLoggerService extends SdkServiceOnInitDelegate { 5 | logError(request: TelemetryErrorRequest): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/error/def/error-logger-service.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {TelemetryErrorRequest} from '../../telemetry'; 3 | import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate'; 4 | 5 | export interface ErrorLoggerService extends SdkServiceOnInitDelegate { 6 | logError(request: TelemetryErrorRequest): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /src/segmentation/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/segmentation-service'; 2 | export * from './handler/fetch-segmentation-tags-handler'; 3 | export * from './handler/fetch-segmentation-command-handler'; 4 | export * from './handler/store-segmentation-tag-handler'; 5 | export * from './handler/store-segmentation-command-handler'; 6 | export * from './impl/segmentaion-service-impl'; -------------------------------------------------------------------------------- /src/auth/util/webview-session-provider/errors/interrupt-error.ts: -------------------------------------------------------------------------------- 1 | import {WebviewRunnerError} from './webview-runner-error'; 2 | 3 | export class InterruptError extends WebviewRunnerError { 4 | constructor(message: string) { 5 | super(message, 'INTERRUPT_ERROR'); 6 | 7 | Object.setPrototypeOf(this, WebviewRunnerError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/group-deprecated/error/no-active-group-session-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoActiveGroupSessionError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_ACTIVE_SESSION'); 6 | 7 | Object.setPrototypeOf(this, NoActiveGroupSessionError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/handler/accept-term-condition-handler.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {ProfileServiceConfig} from '..'; 2 | 3 | export const mockProfileServiceConfig: Partial = { 4 | profileApiPath: '', 5 | profileApiPath_V5: '', 6 | tenantApiPath: '', 7 | otpApiPath: '', 8 | searchLocationApiPath: '', 9 | locationDirPath: '' 10 | }; 11 | -------------------------------------------------------------------------------- /src/framework/errors/no-active-channel-found-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class NoActiveChannelFoundError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'NO_ACTIVE_CHANNEL_FOUND_ERROR'); 6 | 7 | Object.setPrototypeOf(this, NoActiveChannelFoundError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/partner/db/schema.d.ts: -------------------------------------------------------------------------------- 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 | } 10 | -------------------------------------------------------------------------------- /plugins/cordova-plugin-network-information.d.ts: -------------------------------------------------------------------------------- 1 | interface Navigator { 2 | connection: { 3 | type: string 4 | }; 5 | } 6 | 7 | declare var Connection: { 8 | CELL: 'cellular', 9 | CELL_2G: '2g', 10 | CELL_3G: '3g', 11 | CELL_4G: '4g', 12 | ETHERNET: 'ethernet', 13 | NONE: 'none', 14 | UNKNOWN: 'unknown', 15 | WIFI: 'wifi' 16 | }; 17 | -------------------------------------------------------------------------------- /src/archive/export/def/archive-export-delegate.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {ArchiveExportRequest, ArchivePackageExportContext, ArchiveObjectExportProgress} from '../..'; 3 | 4 | export interface ArchiveExportDelegate { 5 | export(request: Pick, context: ArchivePackageExportContext): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /src/archive/export/error/export-assertion-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../../sunbird-error'; 2 | 3 | export abstract class ExportAssertionError extends SunbirdError { 4 | protected constructor(message: string, code: string) { 5 | super(message, `ASSERTION_ERROR_${code}`); 6 | Object.setPrototypeOf(this, ExportAssertionError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/archive/import/error/import-assertion-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../../sunbird-error'; 2 | 3 | export abstract class ImportAssertionError extends SunbirdError { 4 | protected constructor(message: string, code: string) { 5 | super(message, `ASSERTION_ERROR_${code}`); 6 | Object.setPrototypeOf(this, ImportAssertionError.prototype); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/framework/config/framework-service-config.ts: -------------------------------------------------------------------------------- 1 | export interface FrameworkServiceConfig { 2 | channelApiPath: string; 3 | frameworkApiPath: string; 4 | frameworkConfigDirPath: string; 5 | channelConfigDirPath: string; 6 | searchOrganizationApiPath: string; 7 | systemSettingsDefaultChannelIdKey: string; 8 | overriddenDefaultChannelId?: string; 9 | } 10 | -------------------------------------------------------------------------------- /src/storage/errors/transfer-failed-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class TransferFailedError extends SunbirdError { 4 | constructor(message: string, public readonly directory: string) { 5 | super(message, 'TRANSFER_FAILED_ERROR'); 6 | 7 | Object.setPrototypeOf(this, TransferFailedError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/archive/export/def/archive-export-delegate.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { ArchiveExportRequest, ArchivePackageExportContext, ArchiveObjectExportProgress } from '../..'; 3 | export interface ArchiveExportDelegate { 4 | export(request: Pick, context: ArchivePackageExportContext): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /dist/error/util/error-stack-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { ErrorStackEntry } from '../db/schema'; 2 | import { ErrorStack } from '../def/error-stack'; 3 | export declare class ErrorStackMapper { 4 | static mapErrorSatckDBEntryToErrorStack(errorStackEntry: ErrorStackEntry.SchemaMap): ErrorStack; 5 | static mapErrorStackToErrorStackDBEntry(errorStack: ErrorStack): ErrorStackEntry.SchemaMap; 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/def/profile-export-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExportRequest { 2 | userIds: string[]; 3 | groupIds?: string[]; 4 | destinationFolder: string; 5 | } 6 | export interface ExportProfileContext { 7 | userIds: string[]; 8 | groupIds: string[]; 9 | destinationFolder: string; 10 | destinationDBFilePath: string; 11 | metadata: any; 12 | } 13 | -------------------------------------------------------------------------------- /dist/profile/handler/export/copy-database.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { DbService } from '../../../db'; 3 | import { ExportProfileContext } from '../../def/export-profile-context'; 4 | export declare class CopyDatabase { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(exportContext: ExportProfileContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/def/shared-preferences.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface SharedPreferences { 3 | getString(key: string): Observable; 4 | putString(key: string, value: string): Observable; 5 | putBoolean(key: string, value: boolean): Observable; 6 | getBoolean(key: string): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /src/auth/util/webview-session-provider/errors/param-not-captured-error.ts: -------------------------------------------------------------------------------- 1 | import {WebviewRunnerError} from './webview-runner-error'; 2 | 3 | export class ParamNotCapturedError extends WebviewRunnerError { 4 | constructor(message: string) { 5 | super(message, 'PARAM_NOT_CAPTURED'); 6 | 7 | Object.setPrototypeOf(this, ParamNotCapturedError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/auth/util/webview-session-provider/errors/webview-runner-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../../../sunbird-error'; 2 | 3 | export abstract class WebviewRunnerError extends SunbirdError { 4 | protected constructor(message: string, code: string) { 5 | super(message, code); 6 | 7 | Object.setPrototypeOf(this, WebviewRunnerError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/profile/def/location-search-criteria.ts: -------------------------------------------------------------------------------- 1 | import {CachedItemRequest} from '../../key-value-store'; 2 | 3 | export interface LocationSearchCriteria extends CachedItemRequest { 4 | filters: { 5 | query?: string; 6 | type: string; 7 | parentId?: string; 8 | code?: string; 9 | limit?: number; 10 | offset?: string; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /src/profile/def/profile-export-request.ts: -------------------------------------------------------------------------------- 1 | export interface ProfileExportRequest { 2 | userIds: string[]; 3 | groupIds?: string[]; 4 | destinationFolder: string; 5 | } 6 | 7 | export interface ExportProfileContext { 8 | userIds: string[]; 9 | groupIds: string[]; 10 | destinationFolder: string; 11 | destinationDBFilePath: string; 12 | metadata: any; 13 | } 14 | -------------------------------------------------------------------------------- /src/telemetry/impl/telemetry-service-impl.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {SdkConfig} from '../../sdk-config'; 2 | 3 | export const mockSdkConfigWithtelemetryServiceConfig: Partial = { 4 | telemetryConfig: { 5 | apiPath: 'sample_api_path', 6 | telemetrySyncBandwidth: 1, 7 | telemetrySyncThreshold: 1, 8 | telemetryLogMinAllowedOffset: 1 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /dist/group/def/group.d.ts: -------------------------------------------------------------------------------- 1 | export interface Group { 2 | gid: string; 3 | name: string; 4 | syllabus: string[]; 5 | createdAt: number; 6 | grade: string[]; 7 | gradeValue: { 8 | [key: string]: any; 9 | }; 10 | updatedAt: number; 11 | profilesCount?: number; 12 | } 13 | export interface GroupProfile { 14 | gid: string; 15 | uid: string; 16 | } 17 | -------------------------------------------------------------------------------- /dist/group/util/group-profile-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { GroupProfileEntry } from '../../profile/db/schema'; 2 | import { GroupProfile } from '..'; 3 | export declare class GroupProfileMapper { 4 | static mapGroupProfileDBEntryToGroupProfile(groupProfileEntry: GroupProfileEntry.SchemaMap): GroupProfile; 5 | static mapGroupToGroupDBEntry(groupProfile: GroupProfile): GroupProfileEntry.SchemaMap; 6 | } 7 | -------------------------------------------------------------------------------- /dist/util/search-history/def/search-history-service.d.ts: -------------------------------------------------------------------------------- 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; 6 | getEntries(request: GetEntriesRequest): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /src/content/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/content'; 2 | export * from './def/response'; 3 | export * from './def/content-service'; 4 | export * from './def/requests'; 5 | export * from './config/content-config'; 6 | export * from './def/content-feedback-service'; 7 | export * from './util/content-constants'; 8 | export * from './def/content-event'; 9 | export * from './util/content-mapper'; 10 | -------------------------------------------------------------------------------- /src/course/def/get-certificate-request.ts: -------------------------------------------------------------------------------- 1 | import { CertificateType } from '@project-sunbird/client-services/services/certificate'; 2 | import {CourseCertificate} from './course'; 3 | 4 | export { CertificateType } from '@project-sunbird/client-services/services/certificate'; 5 | 6 | export interface GetCertificateRequest { 7 | courseId: string; 8 | certificate: CourseCertificate; 9 | } 10 | -------------------------------------------------------------------------------- /src/storage/handler/transfer/delete-destination-folder.ts: -------------------------------------------------------------------------------- 1 | import {Observable, of} from 'rxjs'; 2 | import {TransferContentContext} from '../transfer-content-handler'; 3 | 4 | export class DeleteDestinationFolder { 5 | constructor() { 6 | } 7 | 8 | execute(context: TransferContentContext): Observable { 9 | return of(context); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/util/encoders/utf8-to-b64-encoder.ts: -------------------------------------------------------------------------------- 1 | import {Encoder} from './encoder'; 2 | 3 | export class Utf8ToB64Encoder implements Encoder { 4 | decode(arg: string): string { 5 | return decodeURIComponent(escape(window.atob(arg))); 6 | } 7 | 8 | encode(arg: string): string { 9 | return window.btoa(unescape(encodeURIComponent(arg))); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /dist/content/handlers/export/clean-temp-loc.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { Response } from '../../../api'; 3 | import { ExportContentContext } from '../..'; 4 | export declare class CleanTempLoc { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContext: ExportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/create-temp-loc.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ExportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class CreateTempLoc { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContext: ExportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/import/ecar-cleanup.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ImportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class EcarCleanup { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(importContentContext: ImportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /src/course/impl/course-service-impl.spec.data.ts: -------------------------------------------------------------------------------- 1 | import {SdkConfig} from '../../sdk-config'; 2 | import {ApiConfig} from '../../api'; 3 | 4 | export const mockSdkConfigWithCourseConfig: Partial = { 5 | apiConfig: { 6 | host: 'SAMPLE_HOST', 7 | } as Partial as ApiConfig, 8 | courseServiceConfig: { 9 | apiPath: 'SAMPLE_API_PATH' 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /src/group-deprecated/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/groupDeprecated'; 2 | export * from './def/group-service-deprecated'; 3 | export * from './def/group-session-deprecated'; 4 | export * from './def/get-all-group-request-deprecated'; 5 | export * from './def/profiles-to-group-request-deprecated'; 6 | export * from './error/no-group-found-error'; 7 | export * from './error/no-active-group-session-error'; 8 | -------------------------------------------------------------------------------- /dist/content/handlers/export/compress-content.d.ts: -------------------------------------------------------------------------------- 1 | import { ZipService } from '../../../util/zip/def/zip-service'; 2 | import { ExportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class CompressContent { 5 | private zipService; 6 | constructor(zipService: ZipService); 7 | execute(exportContentContext: ExportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/util/download/def/requests.d.ts: -------------------------------------------------------------------------------- 1 | export interface DownloadRequest { 2 | withPriority?: number; 3 | downloadId?: string; 4 | identifier: string; 5 | downloadUrl: string; 6 | mimeType: string; 7 | destinationFolder: string; 8 | filename: string; 9 | downloadedFilePath?: string; 10 | } 11 | export interface DownloadCancelRequest { 12 | identifier: string; 13 | } 14 | -------------------------------------------------------------------------------- /src/sunbird-error.ts: -------------------------------------------------------------------------------- 1 | export abstract class SunbirdError extends Error { 2 | private readonly _code: string; 3 | 4 | protected constructor(message: string, code: string) { 5 | super(message); 6 | this._code = code; 7 | 8 | Object.setPrototypeOf(this, SunbirdError.prototype); 9 | } 10 | 11 | get code(): string { 12 | return this._code; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/util/search-history/def/search-history-service.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {AddEntryRequest, GetEntriesRequest} from './requests'; 3 | import {SearchEntry} from './search-entry'; 4 | 5 | export interface SearchHistoryService { 6 | addEntry(request: AddEntryRequest): Observable; 7 | 8 | getEntries(request: GetEntriesRequest): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /dist/api/def/response.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum ResponseCode { 2 | HTTP_UNAUTHORISED = 401, 3 | HTTP_FORBIDDEN = 403, 4 | HTTP_SUCCESS = 200, 5 | HTTP_BAD_REQUEST = 400 6 | } 7 | export declare class Response { 8 | private _responseCode; 9 | private _errorMesg; 10 | private _body; 11 | responseCode: ResponseCode; 12 | errorMesg: string; 13 | body: T; 14 | } 15 | -------------------------------------------------------------------------------- /dist/content/handlers/export/delete-temp-ecar.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ExportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class DeleteTempEcar { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContentContext: ExportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/telemetry/handler/import/update-imported-telemetry-metadata.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { Response } from '../../../api'; 3 | import { ImportTelemetryContext } from '../..'; 4 | export declare class UpdateImportedTelemetryMetadata { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportTelemetryContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/util/zip/impl/zip-service-impl.d.ts: -------------------------------------------------------------------------------- 1 | import { ZipService } from '../def/zip-service'; 2 | export declare class ZipServiceImpl implements ZipService { 3 | unzip(sourceZip: string, option: any, successCallback?: any, errorCallback?: any): void; 4 | zip(sourceFolderPath: string, option: any, directoriesToBeSkipped: string[], filesToBeSkipped: string[], successCallback?: any, errorCallback?: any): void; 5 | } 6 | -------------------------------------------------------------------------------- /src/storage/errors/transfer-failed-duplicate-content-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class TransferFailedDuplicateContentError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'TRANSFER_FAILED_DUPLICATE_CONTENT_ERROR'); 6 | 7 | Object.setPrototypeOf(this, TransferFailedDuplicateContentError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/telemetry/errors/invalid-input-for-sync-preprocessor-error.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class InvalidInputForSyncPreprocessorError extends SunbirdError { 4 | constructor(message: string) { 5 | super(message, 'INVALID_INPUT_FOR_SYNC_PREPROCESSOR'); 6 | 7 | Object.setPrototypeOf(this, InvalidInputForSyncPreprocessorError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dist/device-register/def/response.d.ts: -------------------------------------------------------------------------------- 1 | export interface DeviceRegisterResponse { 2 | ts: string; 3 | result: { 4 | actions: Array; 5 | }; 6 | } 7 | export interface DeviceProfileResponse { 8 | userDeclaredLocation: { 9 | state: string; 10 | district: string; 11 | }; 12 | ipLocation: { 13 | state: string; 14 | district: string; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /dist/profile/handler/export/generate-profile-export-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { DbService } from '../../../db'; 3 | import { ImportTelemetryContext } from '../../../telemetry'; 4 | export declare class GenerateProfileExportTelemetry { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportTelemetryContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/profile/handler/import/generate-profile-import-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { DbService } from '../../../db'; 3 | import { ImportTelemetryContext } from '../../../telemetry'; 4 | export declare class GenerateProfileImportTelemetry { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportTelemetryContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /src/group-deprecated/def/groupDeprecated.ts: -------------------------------------------------------------------------------- 1 | export interface GroupDeprecated { 2 | gid: string; 3 | name: string; 4 | syllabus: string[]; 5 | createdAt: number; 6 | grade: string[]; 7 | gradeValue: { [key: string]: any }; 8 | updatedAt: number; 9 | profilesCount?: number; 10 | } 11 | 12 | export interface GroupProfileDeprecated { 13 | gid: string; 14 | uid: string; 15 | } 16 | -------------------------------------------------------------------------------- /src/util/number-util.ts: -------------------------------------------------------------------------------- 1 | export class NumberUtil { 2 | public static toFixed(input): number { 3 | return Number(input.toFixed(2)); 4 | } 5 | 6 | public static parseInt(input): number { 7 | return input ? parseInt(input, 10) : 0; 8 | } 9 | 10 | public static round(input): number { 11 | return Number(Math.round(parseFloat(input + 'e' + 4)) + 'e-' + 4); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dist/device-register/def/device-register-service.d.ts: -------------------------------------------------------------------------------- 1 | import { DeviceRegisterRequest } from './request'; 2 | import { Observable } from 'rxjs'; 3 | import { DeviceProfileResponse, DeviceRegisterResponse } from './response'; 4 | export interface DeviceRegisterService { 5 | registerDevice(request?: DeviceRegisterRequest): Observable; 6 | getDeviceProfile(): Observable; 7 | } 8 | -------------------------------------------------------------------------------- /dist/profile/handler/import/update-imported-profile-metadata.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { Response } from '../../../api'; 3 | import { ImportProfileContext } from '../../def/import-profile-context'; 4 | export declare class UpdateImportedProfileMetadata { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /src/page/def/page-assemble-service.ts: -------------------------------------------------------------------------------- 1 | import {PageAssembleCriteria, SetPageAssembleChannelRequest} from './requests'; 2 | import {Observable} from 'rxjs'; 3 | import {PageAssemble} from './page-assemble'; 4 | 5 | export interface PageAssembleService { 6 | setPageAssembleChannel(request: SetPageAssembleChannelRequest): void; 7 | 8 | getPageAssemble(criteria: PageAssembleCriteria): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /dist/profile/handler/export/get-epar-file-path.d.ts: -------------------------------------------------------------------------------- 1 | import { Response } from '../../../api'; 2 | import { FileService } from '../../../util/file/def/file-service'; 3 | import { ExportProfileContext } from '../../def/export-profile-context'; 4 | export declare class GetEparFilePath { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContext: ExportProfileContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/storage/handler/transfer/update-source-content-path-in-db.d.ts: -------------------------------------------------------------------------------- 1 | import { TransferContentContext } from '../transfer-content-handler'; 2 | import { DbService } from '../../../db'; 3 | import { Observable } from 'rxjs'; 4 | export declare class UpdateSourceContentPathInDb { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(context: TransferContentContext): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/copy-asset.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ExportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class CopyAsset { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContentContext: ExportContentContext): Promise; 8 | private copyFile; 9 | } 10 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-group.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportGroup { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private saveGroupsToDb; 9 | } 10 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-user.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportUser { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private saveUsersToDb; 9 | } 10 | -------------------------------------------------------------------------------- /src/debugging/def/debugging-service.ts: -------------------------------------------------------------------------------- 1 | import { Observable, Subject } from "rxjs"; 2 | 3 | export interface DebugWatcher { 4 | interval: any; 5 | observer: any; 6 | debugStatus: boolean; 7 | } 8 | 9 | export interface DebuggingService { 10 | deviceId: string; 11 | enableDebugging(traceID?: string): Observable; 12 | disableDebugging(): Observable; 13 | isDebugOn(): boolean; 14 | } 15 | -------------------------------------------------------------------------------- /src/device-register/def/device-register-service.ts: -------------------------------------------------------------------------------- 1 | import {DeviceRegisterRequest} from './request'; 2 | import {Observable} from 'rxjs'; 3 | import {DeviceProfileResponse, DeviceRegisterResponse} from './response'; 4 | 5 | export interface DeviceRegisterService { 6 | registerDevice(request?: DeviceRegisterRequest): Observable; 7 | 8 | getDeviceProfile(): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /src/group/def/group-activity-service.ts: -------------------------------------------------------------------------------- 1 | import {GroupActivityDataAggregationRequest} from './requests'; 2 | import {Observable} from 'rxjs'; 3 | import {GroupActivityDataAggregation} from './responses'; 4 | 5 | export interface GroupActivityService { 6 | getDataAggregation(request: GroupActivityDataAggregationRequest): Observable; 7 | getDataForDashlets(hierarchyData, aggData): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/import/generate-import-share-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { ImportContentContext } from '../..'; 2 | import { Response } from '../../../api'; 3 | import { TelemetryService } from '../../../telemetry'; 4 | export declare class GenerateImportShareTelemetry { 5 | private telemetryService; 6 | constructor(telemetryService: TelemetryService); 7 | execute(importContentContext: ImportContentContext): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/import/generate-interact-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetryService } from '../../../telemetry'; 2 | import { ImportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class GenerateInteractTelemetry { 5 | private telemetryService; 6 | constructor(telemetryService: TelemetryService); 7 | execute(importContext: ImportContentContext, subType: any): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/storage/handler/scan/perform-actoin-on-content-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ScanContentContext } from '../../def/scan-requests'; 2 | import { StorageHandler } from '../storage-handler'; 3 | import { Observable } from 'rxjs'; 4 | export declare class PerformActoinOnContentHandler { 5 | private storageHandler; 6 | constructor(storageHandler: StorageHandler); 7 | exexute(context: ScanContentContext): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /dist/telemetry/handler/import/validate-telemetry-metadata.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportTelemetryContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class ValidateTelemetryMetadata { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportTelemetryContext): Promise; 8 | private getImportTypes; 9 | } 10 | -------------------------------------------------------------------------------- /src/telemetry/index.ts: -------------------------------------------------------------------------------- 1 | export * from './def/telemetry-decorator'; 2 | export * from './def/telemetry-model'; 3 | export * from './def/telemetry-service'; 4 | export * from './def/telemetry-stat'; 5 | export * from './def/telemetry-sync-stat'; 6 | export * from './def/telemetry-constants'; 7 | export * from './def/requests'; 8 | export * from './util/telemetry-auto-sync-service'; 9 | export * from './util/telemetry-auto-sync-modes'; 10 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "typeRoots": [ 5 | "./node_modules/@types", 6 | "src/__test__" 7 | ], 8 | "types": [ 9 | "jest", "node" 10 | ] 11 | }, 12 | "include": [ 13 | "./plugins/*.d.ts", 14 | "./src/**/*" 15 | ], 16 | "exclude": [ 17 | "node_modules", 18 | "src/**/__tests__/*.ts", 19 | "dist", 20 | "tmp" 21 | ] 22 | } -------------------------------------------------------------------------------- /dist/auth/def/auth-service.d.ts: -------------------------------------------------------------------------------- 1 | import { OAuthSession } from './o-auth-session'; 2 | import { Observable } from 'rxjs'; 3 | import { SessionProvider } from './session-provider'; 4 | export interface AuthService { 5 | setSession(sessionProvider: SessionProvider): Observable; 6 | getSession(): Observable; 7 | resignSession(): Observable; 8 | refreshSession(): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /dist/db/def/migration.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from './db-service'; 2 | export declare abstract class Migration { 3 | targetDbVersion: number; 4 | migrationNumber: number; 5 | protected constructor(migrationNumber: number, targetDbVersion: number); 6 | abstract apply(dbService: DbService): Promise; 7 | abstract queries(): Array; 8 | required(oldVersion: number, newVersion: number): boolean; 9 | } 10 | -------------------------------------------------------------------------------- /dist/key-value-store/impl/key-value-store-impl.d.ts: -------------------------------------------------------------------------------- 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; 8 | setValue(key: string, value: string): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /dist/profile/def/content-access.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ContentAccess { 2 | status: ContentAccessStatus; 3 | contentId: string; 4 | contentType: string; 5 | contentLearnerState?: ContentLearnerState; 6 | } 7 | export interface ContentLearnerState { 8 | learnerState: { 9 | [key: string]: any; 10 | }; 11 | } 12 | export declare enum ContentAccessStatus { 13 | NOT_PLAYED = 0, 14 | PLAYED = 1 15 | } 16 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-profiles.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportProfiles { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private saveProfilesToDb; 9 | } 10 | -------------------------------------------------------------------------------- /src/__test__/mocks.ts: -------------------------------------------------------------------------------- 1 | import {ApiService} from '../api'; 2 | import {mock} from 'ts-mockito'; 3 | import {SharedPreferences} from '../util/shared-preferences'; 4 | import {EventsBusService} from '../events-bus'; 5 | 6 | export const MockApiService: ApiService = mock(); 7 | export const MockSharedPreferences: SharedPreferences = mock(); 8 | export const MockEventsBusService: EventsBusService = mock(); 9 | -------------------------------------------------------------------------------- /src/auth/util/webview-session-provider/errors/no-inappbrowser-session-assertion-fail-error.ts: -------------------------------------------------------------------------------- 1 | import {WebviewRunnerError} from './webview-runner-error'; 2 | 3 | export class NoInappbrowserSessionAssertionFailError extends WebviewRunnerError { 4 | constructor(message: string) { 5 | super(message, 'NO_INAPPBROWSER_SESSION_ASSERTION_FAIL'); 6 | 7 | Object.setPrototypeOf(this, WebviewRunnerError.prototype); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/util/file/util/path.spec.ts: -------------------------------------------------------------------------------- 1 | import {Path} from './path'; 2 | 3 | describe('path', () => { 4 | it('should return dirPath from filePath', () => { 5 | expect(Path.dirPathFromFilePath('var/lib/telemetry.json')).toEqual('var/lib'); 6 | }); 7 | 8 | it('should return fileName from filePath', () => { 9 | expect(Path.fileNameFromFilePath('var/lib/telemetry.json')).toEqual('telemetry.json'); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /dist/key-value-store/db/schema.d.ts: -------------------------------------------------------------------------------- 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 | } 13 | -------------------------------------------------------------------------------- /dist/util/list/linked-list.d.ts: -------------------------------------------------------------------------------- 1 | import { ListNode } from './list-node'; 2 | import { Comparator } from './comparator'; 3 | export declare class LinkedList> { 4 | protected head: ListNode; 5 | constructor(); 6 | static fromJson(json: string): LinkedList; 7 | add(value: T): void; 8 | search(value: T): ListNode | null; 9 | forEach(consumer: Function): void; 10 | toJson(): string; 11 | } 12 | -------------------------------------------------------------------------------- /src/profile/def/content-access.ts: -------------------------------------------------------------------------------- 1 | export class ContentAccess { 2 | status: ContentAccessStatus; 3 | contentId: string; 4 | contentType: string; 5 | contentLearnerState?: ContentLearnerState; 6 | primaryCategory?: string; 7 | } 8 | 9 | export interface ContentLearnerState { 10 | learnerState: { [key: string]: any }; 11 | } 12 | 13 | export enum ContentAccessStatus { 14 | NOT_PLAYED = 0, 15 | PLAYED = 1 16 | } 17 | -------------------------------------------------------------------------------- /dist/content/handlers/export/device-memory-check.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ExportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class DeviceMemoryCheck { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(exportContentContext: ExportContentContext): Promise; 8 | private getFileSize; 9 | } 10 | -------------------------------------------------------------------------------- /dist/profile/handler/import/validate-profile-metadata.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { Response } from '../../../api'; 3 | import { ImportProfileContext } from '../../def/import-profile-context'; 4 | export declare class ValidateProfileMetadata { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private getImportTypes; 9 | } 10 | -------------------------------------------------------------------------------- /dist/storage/handler/transfer/device-memory-check.d.ts: -------------------------------------------------------------------------------- 1 | import { TransferContentContext } from '../transfer-content-handler'; 2 | import { DbService } from '../../../db'; 3 | import { Observable } from 'rxjs'; 4 | export declare class DeviceMemoryCheck { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(context: TransferContentContext): Observable; 8 | private getFreeUsableSpace; 9 | } 10 | -------------------------------------------------------------------------------- /dist/telemetry/handler/import/transport-processed-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportTelemetryContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportProcessedTelemetry { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportTelemetryContext): Promise; 8 | private saveProccessedTelemetryToDB; 9 | } 10 | -------------------------------------------------------------------------------- /src/course/errors/certificate-already-downloaded.ts: -------------------------------------------------------------------------------- 1 | import {SunbirdError} from '../../sunbird-error'; 2 | 3 | export class CertificateAlreadyDownloaded extends SunbirdError { 4 | readonly filePath: string; 5 | constructor(message: string, filePath: string) { 6 | super(message, 'CERTIFICATE_ALREADY_DOWNLOADED'); 7 | this.filePath = filePath; 8 | 9 | Object.setPrototypeOf(this, CertificateAlreadyDownloaded.prototype); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /dist/profile/def/user-feed-response.d.ts: -------------------------------------------------------------------------------- 1 | export interface UserFeed { 2 | id: string; 3 | userId: string; 4 | category: string; 5 | priority: number; 6 | createdBy: string; 7 | createdOn: string; 8 | channel: string; 9 | status: string; 10 | expireOn: string; 11 | data: { 12 | prospectChannels: Array; 13 | }; 14 | } 15 | export interface UserFeedResponse { 16 | response: UserFeed[]; 17 | } 18 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-group-profile.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportGroupProfile { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private saveGroupProfilesToDb; 9 | } 10 | -------------------------------------------------------------------------------- /dist/content/handlers/content-storage-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../db'; 2 | import { ContentSpaceUsageSummaryResponse } from '..'; 3 | import { Observable } from 'rxjs'; 4 | export declare class ContentStorageHandler { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | getUsgaeSpace(path: string): Observable; 8 | getContentUsageSummary(paths: string[]): Promise; 9 | } 10 | -------------------------------------------------------------------------------- /dist/course/course-util.d.ts: -------------------------------------------------------------------------------- 1 | import { UpdateContentStateAPIRequest, UpdateContentStateRequest } from './def/request-types'; 2 | export declare class CourseUtil { 3 | static getUpdateContentStateRequest(updateContentReq: UpdateContentStateRequest): UpdateContentStateAPIRequest; 4 | static getUpdateContentStateListRequest(userId: string, updateContentReqList: UpdateContentStateRequest[]): UpdateContentStateAPIRequest; 5 | private static getRequestMap; 6 | } 7 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-framework-n-channel.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportFrameworkNChannel { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private saveNoSqlEntryToDb; 9 | } 10 | -------------------------------------------------------------------------------- /dist/telemetry/util/telemetry-auto-sync-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { TelemetryAutoSyncModes } from './telemetry-auto-sync-modes'; 3 | export interface TelemetryAutoSyncService { 4 | getSyncMode(): Observable; 5 | setSyncMode(mode: TelemetryAutoSyncModes): Observable; 6 | start(intervalTime: number): Observable; 7 | pause(): void; 8 | continue(): void; 9 | } 10 | -------------------------------------------------------------------------------- /src/util/list/list-node.ts: -------------------------------------------------------------------------------- 1 | export class ListNode { 2 | 3 | private _next: ListNode; 4 | private _value: T; 5 | 6 | 7 | get next(): ListNode { 8 | return this._next; 9 | } 10 | 11 | set next(value: ListNode) { 12 | this._next = value; 13 | } 14 | 15 | get value(): T { 16 | return this._value; 17 | } 18 | 19 | set value(value: T) { 20 | this._value = value; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /dist/framework/def/request-types.d.ts: -------------------------------------------------------------------------------- 1 | import { FrameworkCategoryCode } from './framework-category-code'; 2 | export interface ChannelDetailsRequest { 3 | channelId: string; 4 | } 5 | export interface FrameworkDetailsRequest { 6 | frameworkId?: string; 7 | requiredCategories: FrameworkCategoryCode[]; 8 | } 9 | export interface OrganizationSearchCriteria { 10 | filters: { 11 | isRootOrg: boolean; 12 | }; 13 | fields?: (keyof T)[]; 14 | } 15 | -------------------------------------------------------------------------------- /dist/notification/handler/notification-handler.d.ts: -------------------------------------------------------------------------------- 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 | } 10 | -------------------------------------------------------------------------------- /dist/telemetry/def/telemetry-event.d.ts: -------------------------------------------------------------------------------- 1 | import { EventsBusEvent } from '../../events-bus'; 2 | import { SunbirdTelemetry } from './telemetry-model'; 3 | export interface TelemetryEvent extends EventsBusEvent { 4 | type: TelemetryEventType; 5 | } 6 | export interface TelemetrySave extends TelemetryEvent { 7 | type: TelemetryEventType.SAVE; 8 | payload: SunbirdTelemetry.Telemetry; 9 | } 10 | export declare enum TelemetryEventType { 11 | SAVE = "SAVE" 12 | } 13 | -------------------------------------------------------------------------------- /src/telemetry/def/telemetry-event.ts: -------------------------------------------------------------------------------- 1 | import {EventsBusEvent} from '../../events-bus'; 2 | import {SunbirdTelemetry} from './telemetry-model'; 3 | 4 | export interface TelemetryEvent extends EventsBusEvent { 5 | type: TelemetryEventType; 6 | } 7 | 8 | export interface TelemetrySave extends TelemetryEvent { 9 | type: TelemetryEventType.SAVE; 10 | payload: SunbirdTelemetry.Telemetry; 11 | } 12 | 13 | export enum TelemetryEventType { 14 | SAVE = 'SAVE' 15 | } 16 | -------------------------------------------------------------------------------- /dist/framework/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './config/framework-service-config'; 2 | export * from './impl/framework-service-impl'; 3 | export * from './def/channel'; 4 | export * from './def/framework'; 5 | export * from './def/request-types'; 6 | export * from './def/framework-category-code'; 7 | export * from './def/framework-service'; 8 | export * from './util/framework-util-service'; 9 | export * from './util/framework-util-service-impl'; 10 | export * from './util/requests'; 11 | -------------------------------------------------------------------------------- /dist/framework/util/framework-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { Framework, FrameworkCategory } from '..'; 2 | export declare class FrameworkMapper { 3 | static prepareFrameworkCategoryAssociations(framework: Framework): Framework; 4 | static prepareFrameworkTranslations(framework: Framework, language: string): Framework; 5 | static prepareFrameworkCategoryTranslations(frameworkCategory: FrameworkCategory, language: string): FrameworkCategory; 6 | private static getTranslatedValue; 7 | } 8 | -------------------------------------------------------------------------------- /src/segmentation/def/segmentation-service.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "rxjs"; 2 | 3 | export interface SegmentationService { 4 | saveTags(tags: string, userId: string): Observable; 5 | getTags(userId: string): Observable; 6 | removeTagsForId(userid: string): Observable; 7 | clearAllTags(): Observable; 8 | saveCommandList(commandList: string, userId: string): Observable; 9 | getCommand(userId: string): Observable; 10 | } -------------------------------------------------------------------------------- /src/telemetry/util/telemetry-auto-sync-service.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {TelemetryAutoSyncModes} from './telemetry-auto-sync-modes'; 3 | 4 | export interface TelemetryAutoSyncService { 5 | getSyncMode(): Observable; 6 | 7 | setSyncMode(mode: TelemetryAutoSyncModes): Observable; 8 | 9 | start(intervalTime: number): Observable; 10 | 11 | pause(): void; 12 | 13 | continue(): void; 14 | } -------------------------------------------------------------------------------- /dist/content/util/content-mapper.d.ts: -------------------------------------------------------------------------------- 1 | import { ContentEntry } from '../db/schema'; 2 | import { Content } from '..'; 3 | export declare class ContentMapper { 4 | static mapContentDataToContentDBEntry(contentData: any, manifestVersion: string): ContentEntry.SchemaMap; 5 | static mapServerResponseToContent(contentData: any, manifestVersion?: string): Content; 6 | static mapContentDBEntryToContent(contentEntry: ContentEntry.SchemaMap, shouldConvertBasePath?: boolean): Content; 7 | } 8 | -------------------------------------------------------------------------------- /dist/db/def/db-constants.d.ts: -------------------------------------------------------------------------------- 1 | export declare class DbConstants { 2 | static DATE_TYPE: string; 3 | static TEXT_TYPE: string; 4 | static INT_TYPE: string; 5 | static REAL_TYPE: string; 6 | static COMMA_SEP: string; 7 | static SPACE: string; 8 | static MAX_NUM_OF_EVENTS: number; 9 | static MAX_NUM_OF_PROCESSED_EVENTS: number; 10 | static ERROR: string; 11 | static BLOB_TYPE: string; 12 | static NOT_NULL: string; 13 | static NULL: string; 14 | } 15 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/impl/shared-preferences-local-storage.d.ts: -------------------------------------------------------------------------------- 1 | import { SharedPreferences } from '..'; 2 | import { Observable } from 'rxjs'; 3 | export declare class SharedPreferencesLocalStorage implements SharedPreferences { 4 | getString(key: string): Observable; 5 | putString(key: string, value: string): Observable; 6 | putBoolean(key: string, value: boolean): Observable; 7 | getBoolean(key: string): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /src/db/def/db-constants.ts: -------------------------------------------------------------------------------- 1 | export class DbConstants { 2 | static DATE_TYPE = 'DATE'; 3 | static TEXT_TYPE = 'TEXT'; 4 | static INT_TYPE = 'INTEGER'; 5 | static REAL_TYPE = 'REAL'; 6 | static COMMA_SEP = ','; 7 | static SPACE = ' '; 8 | static MAX_NUM_OF_EVENTS = 1000; 9 | static MAX_NUM_OF_PROCESSED_EVENTS = 1; 10 | static ERROR = 'DB_ERROR'; 11 | static BLOB_TYPE = 'BLOB'; 12 | static NOT_NULL = 'NOT NULL'; 13 | static NULL = 'NULL'; 14 | } 15 | -------------------------------------------------------------------------------- /src/util/search-history/impl/__snapshots__/search-history-service-impl.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`SearchHistoryServiceImpl should return entries for current Profile on getEntries() 1`] = ` 4 | Array [ 5 | Object { 6 | "query": "SAMPLE_QUERY", 7 | "timestamp": 1, 8 | "uid": "SAMPLE_UID", 9 | }, 10 | Object { 11 | "query": "SAMPLE_QUERY_2", 12 | "timestamp": 2, 13 | "uid": "SAMPLE_UID_2", 14 | }, 15 | ] 16 | `; 17 | -------------------------------------------------------------------------------- /dist/telemetry/handler/import/generate-import-telemetry-share.d.ts: -------------------------------------------------------------------------------- 1 | import { ImportTelemetryContext, TelemetryService } from '../..'; 2 | import { Response } from '../../../api'; 3 | import { DbService } from '../../../db'; 4 | export declare class GenerateImportTelemetryShare { 5 | private dbService; 6 | private telemetryService; 7 | constructor(dbService: DbService, telemetryService: TelemetryService); 8 | execute(importContext: ImportTelemetryContext): Promise; 9 | } 10 | -------------------------------------------------------------------------------- /plugins/sb-cordova-plugin-customtabs.d.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | declare var customtabs: { 3 | isAvailable: (success: () => void, error: (error: string) => void) => void; 4 | launch: (url: string, success: (callbackUrl: string) => void, error: (error: string) => void) => void; 5 | launchInBrowser: (url: string, browserPackageName: string, success: (callbackUrl: string) => void, error: (error: string) => void) => void; 6 | close: (success: () => void, error: (error: string) => void) => void; 7 | }; 8 | -------------------------------------------------------------------------------- /src/api/util/jwt.util.ts: -------------------------------------------------------------------------------- 1 | import * as jwt from 'jsonwebtoken'; 2 | 3 | export enum JWTokenType { 4 | HS256 = 'HS256' 5 | } 6 | 7 | export class JWTUtil { 8 | public static createJWToken(subject: any, secretKey: string, tokenType: JWTokenType = JWTokenType.HS256): string { 9 | return jwt.sign(subject, secretKey, {algorithm: tokenType}); 10 | } 11 | 12 | public static getJWTPayload(token: string): any { 13 | return jwt.decode(token, {json: true}); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/archive/import/def/archive-import-delegate.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { ArchiveImportRequest, ArchiveObjectImportProgress, ArchivePackageImportContext } from '../..'; 3 | import { TelemetryArchivePackageMeta } from '../../export/def/telemetry-archive-package-meta'; 4 | export interface ArchiveImportDelegate { 5 | import(request: Pick, context: ArchivePackageImportContext): Observable; 6 | } 7 | -------------------------------------------------------------------------------- /dist/content/handlers/get-contents-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ContentRequest } from '..'; 2 | export declare class GetContentsHandler { 3 | getAllLocalContentQuery(request: ContentRequest): string; 4 | private getAudienceFilter; 5 | private getPragmaFilter; 6 | private getRecentlyViewedQuery; 7 | private getLocalOnlyQuery; 8 | private generateSortByQuery; 9 | private generateOrderByQuery; 10 | private generateBoardMediumGradeQuery; 11 | private generateLikeQuery; 12 | } 13 | -------------------------------------------------------------------------------- /dist/content/handlers/import/device-memory-check.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ImportContentContext } from '../..'; 3 | import { Response } from '../../../api'; 4 | export declare class DeviceMemoryCheck { 5 | private fileService; 6 | freeDiskSpace: number; 7 | constructor(fileService: FileService); 8 | execute(importContext: ImportContentContext): Promise; 9 | calculateBufferSize(ecarFileSize: number): number; 10 | } 11 | -------------------------------------------------------------------------------- /dist/notification/def/notification-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { NotificationFilterCriteria, Notification } from './requests'; 3 | export interface NotificationService { 4 | addNotification(notifiation: Notification): Observable; 5 | updateNotification(notifiation: Notification): Observable; 6 | getAllNotifications(criteria: NotificationFilterCriteria): Observable; 7 | deleteNotification(msgId?: number): Observable; 8 | } 9 | -------------------------------------------------------------------------------- /dist/telemetry/decorators/generate-log-telemetry-decorators.d.ts: -------------------------------------------------------------------------------- 1 | import { TelemetryLogRequest } from '../def/requests'; 2 | export declare const GenerateLogTelemetryBeforeMethod: (telemetryLogRequest: TelemetryLogRequest) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor; 3 | export declare const GenerateLogTelemetryAfterMethodResolves: (telemetryLogRequest: TelemetryLogRequest) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor; 4 | -------------------------------------------------------------------------------- /src/course/def/get-learner-certificate-response.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export interface LearnerCertificate { 4 | _index: string; 5 | _type: string; 6 | _id: string; 7 | _score: number; 8 | _source: { 9 | pdfUrl: string 10 | data: { 11 | badge: { 12 | name: string; 13 | issuer: { 14 | name: string; 15 | } 16 | }, 17 | issuedOn: string; 18 | } 19 | related: { 20 | courseId: string; 21 | Id: string; 22 | } 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /src/segmentation/handler/store-segmentation-tag-handler.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "rxjs"; 2 | import { KeyValueStore } from "../../key-value-store"; 3 | 4 | export class StoreSegmentationTagHandler { 5 | 6 | private TAG_KEY = 'segment-tag_'; 7 | 8 | constructor( 9 | private keyValueStore: KeyValueStore 10 | ) {} 11 | 12 | handle(tags: string, userId: string): Observable { 13 | return this.keyValueStore.setValue(this.TAG_KEY + userId, tags); 14 | } 15 | } -------------------------------------------------------------------------------- /dist/content/util/linked-list.d.ts: -------------------------------------------------------------------------------- 1 | export declare class LinkedNode { 2 | next: LinkedNode | null; 3 | private readonly _elem; 4 | constructor(elem: T); 5 | readonly elem: T; 6 | } 7 | export declare class LinkedList { 8 | private head; 9 | private len; 10 | constructor(headElement?: LinkedNode); 11 | append(elem: T): void; 12 | isEmpty(): number; 13 | addAll(list: T[]): void; 14 | remove(): LinkedNode | undefined; 15 | private removeAt; 16 | } 17 | -------------------------------------------------------------------------------- /dist/profile/def/update-server-profile-info-request.d.ts: -------------------------------------------------------------------------------- 1 | export interface UpdateServerProfileInfoRequest { 2 | userId: string; 3 | phone?: string; 4 | email?: string; 5 | phoneVerified?: boolean; 6 | emailVerified?: boolean; 7 | locationCodes?: Array; 8 | firstName?: string; 9 | lastName?: string; 10 | framework?: { 11 | [key: string]: any; 12 | }; 13 | profileSummary?: string; 14 | recoveryEmail?: string; 15 | recoveryPhone?: string; 16 | } 17 | -------------------------------------------------------------------------------- /src/player/def/player-service.ts: -------------------------------------------------------------------------------- 1 | import {Content} from '../../content'; 2 | import {Observable} from 'rxjs'; 3 | import {PlayerConfig, PlayerInput} from './response'; 4 | 5 | export interface PlayerService { 6 | getPlayerConfig(content: Content, extraInfo: { [key: string]: any }): Observable; 7 | 8 | savePlayerState(userId: string, parentId: string, identifier: string, saveState: string); 9 | 10 | deletePlayerSaveState(userId: string, parentId: string, contentId: string); 11 | } 12 | -------------------------------------------------------------------------------- /src/archive/import/def/archive-import-delegate.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | import {ArchiveImportRequest, ArchiveObjectImportProgress, ArchivePackageImportContext} from '../..'; 3 | import {TelemetryArchivePackageMeta} from '../../export/def/telemetry-archive-package-meta'; 4 | 5 | export interface ArchiveImportDelegate { 6 | import(request: Pick, context: ArchivePackageImportContext): 7 | Observable; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/generate-export-share-telemetry.d.ts: -------------------------------------------------------------------------------- 1 | import { ExportContentContext, ContentExportRequest } from '../..'; 2 | import { Response } from '../../../api'; 3 | import { TelemetryService } from '../../../telemetry'; 4 | export declare class GenerateExportShareTelemetry { 5 | private telemetryService; 6 | constructor(telemetryService: TelemetryService); 7 | execute(exportContentContext: ExportContentContext, fileName: string, contentExportRequest: ContentExportRequest): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /dist/content/handlers/export/write-manifest.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { Response } from '../../../api'; 3 | import { ExportContentContext } from '../..'; 4 | import { DeviceInfo } from '../../../util/device'; 5 | export declare class WriteManifest { 6 | private fileService; 7 | private deviceInfo; 8 | constructor(fileService: FileService, deviceInfo: DeviceInfo); 9 | execute(exportContentContext: ExportContentContext): Promise; 10 | } 11 | -------------------------------------------------------------------------------- /dist/device-register/def/request.d.ts: -------------------------------------------------------------------------------- 1 | import { DeviceSpec } from '../../util/device'; 2 | export interface UserDeclaredLocation { 3 | declaredOffline?: boolean; 4 | state: string; 5 | stateId?: string; 6 | district: string; 7 | districtId?: string; 8 | } 9 | export interface DeviceRegisterRequest { 10 | dspec?: DeviceSpec; 11 | channel?: string; 12 | fcmToken?: string; 13 | producer?: string; 14 | first_access?: number; 15 | userDeclaredLocation?: UserDeclaredLocation; 16 | } 17 | -------------------------------------------------------------------------------- /src/segmentation/handler/store-segmentation-command-handler.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from "rxjs"; 2 | import { KeyValueStore } from "../../key-value-store"; 3 | 4 | export class StoreSegmentationCommandHandler { 5 | 6 | private COMMAND_KEY = 'segment-command_'; 7 | 8 | constructor( 9 | private keyValueStore: KeyValueStore 10 | ) {} 11 | 12 | handle(commandList, userId): Observable { 13 | return this.keyValueStore.setValue(this.COMMAND_KEY + userId, commandList); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/device-register/def/request.ts: -------------------------------------------------------------------------------- 1 | import {DeviceSpec} from '../../util/device'; 2 | 3 | export interface UserDeclaredLocation { 4 | declaredOffline?: boolean, 5 | state: string; 6 | stateId?: string; 7 | district: string; 8 | districtId?: string; 9 | } 10 | 11 | export interface DeviceRegisterRequest { 12 | dspec?: DeviceSpec; 13 | channel?: string; 14 | fcmToken?: string; 15 | producer?: string; 16 | first_access?: number; 17 | userDeclaredLocation?: UserDeclaredLocation; 18 | } 19 | -------------------------------------------------------------------------------- /src/profile/def/profile-session.ts: -------------------------------------------------------------------------------- 1 | import {UniqueId} from '../../db/util/unique-id'; 2 | 3 | export class ProfileSession { 4 | readonly uid: string; 5 | readonly sid: string; 6 | readonly createdTime: number; 7 | managedSession?: ProfileSession; 8 | 9 | constructor(uid: string, managingSession?: ProfileSession) { 10 | this.uid = uid; 11 | this.sid = UniqueId.generateUniqueId(); 12 | this.createdTime = Date.now(); 13 | this.managedSession = managingSession; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dist/profile/handler/import/transport-assesments.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../../db'; 2 | import { ImportProfileContext } from '../../def/import-profile-context'; 3 | import { Response } from '../../../api'; 4 | export declare class TransportAssesments { 5 | private dbService; 6 | constructor(dbService: DbService); 7 | execute(importContext: ImportProfileContext): Promise; 8 | private deleteUnwantedAssesments; 9 | private saveLearnerAssesmentDetails; 10 | private saveLearnerSummary; 11 | } 12 | -------------------------------------------------------------------------------- /dist/util/file/util/file-util.d.ts: -------------------------------------------------------------------------------- 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 | } 10 | -------------------------------------------------------------------------------- /dist/content/handlers/content-marker-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { DbService } from '../../db'; 2 | import { ContentMarker } from '..'; 3 | import { Observable } from 'rxjs'; 4 | import { ContentMarkerEntry } from '../db/schema'; 5 | export declare class ContentMarkerHandler { 6 | private dbService; 7 | constructor(dbService: DbService); 8 | getContentMarker(identifier: string, uid: string): Observable; 9 | mapDBEntriesToContentMarkerDetails(markersInDb: ContentMarkerEntry.SchemaMap[]): ContentMarker[]; 10 | } 11 | -------------------------------------------------------------------------------- /dist/framework/util/requests.d.ts: -------------------------------------------------------------------------------- 1 | import { FrameworkCategoryCode } from '..'; 2 | export interface GetSuggestedFrameworksRequest { 3 | language: string; 4 | requiredCategories: FrameworkCategoryCode[]; 5 | ignoreActiveChannel?: boolean; 6 | } 7 | export interface GetFrameworkCategoryTermsRequest { 8 | frameworkId?: string; 9 | requiredCategories: FrameworkCategoryCode[]; 10 | currentCategoryCode: string; 11 | prevCategoryCode?: string; 12 | selectedTermsCodes?: string[]; 13 | language: string; 14 | } 15 | -------------------------------------------------------------------------------- /dist/util/device/impl/device-info-impl.d.ts: -------------------------------------------------------------------------------- 1 | import { DeviceInfo, DeviceSpec, StorageVolume } from '..'; 2 | import { Observable } from 'rxjs'; 3 | export declare class DeviceInfoImpl implements DeviceInfo { 4 | private readonly deviceId; 5 | private deviceSpec; 6 | constructor(); 7 | getDeviceID(): string; 8 | getDeviceSpec(): Observable; 9 | getAvailableInternalMemorySize(): Observable; 10 | getStorageVolumes(): Observable; 11 | isKeyboardShown(): Observable; 12 | } 13 | -------------------------------------------------------------------------------- /plugins/sb-cordova-plugin-sync.d.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | declare var sbsync: { 3 | 4 | sync: (success: 5 | (callbackUrl: any) => void, error: (error: string) => void) => void; 6 | 7 | enqueue: (data: any, request: any, shouldSync: boolean, success: 8 | (callbackUrl: any) => void, error: (error: string) => void) => void; 9 | 10 | onSyncSucces: (sucess: (data: any) => void, error?: (error: any) => void) => void; 11 | 12 | onAuthorizationError: (sucess: (data: any) => void, error?: (error: any) => void) => void; 13 | }; 14 | -------------------------------------------------------------------------------- /dist/storage/handler/transfer/validate-destination-folder.d.ts: -------------------------------------------------------------------------------- 1 | import { TransferContentContext } from '../transfer-content-handler'; 2 | import { FileService } from '../../../util/file/def/file-service'; 3 | import { Observable } from 'rxjs'; 4 | export declare class ValidateDestinationFolder { 5 | private fileService; 6 | constructor(fileService: FileService); 7 | execute(context: TransferContentContext): Observable; 8 | private validate; 9 | private createDirectory; 10 | private canWrite; 11 | } 12 | -------------------------------------------------------------------------------- /src/course/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/course-service-config'; 2 | export * from './impl/course-service-impl'; 3 | export * from './def/batch'; 4 | export * from './def/course'; 5 | export * from './def/course-service'; 6 | export * from './def/course-certificate-manager'; 7 | export * from './def/request-types'; 8 | export * from './def/unenrollCourseRequest'; 9 | export * from './errors/certificate-already-downloaded'; 10 | export * from './def/update-course-content-state-request'; 11 | export * from './def/update-content-state-response'; 12 | -------------------------------------------------------------------------------- /src/framework/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config/framework-service-config'; 2 | export * from './impl/framework-service-impl'; 3 | export * from './def/channel'; 4 | export * from './def/framework'; 5 | export * from './def/organization'; 6 | export * from './def/requests'; 7 | export * from './def/responses'; 8 | export * from './def/framework-category-code'; 9 | export * from './def/framework-service'; 10 | export * from './util/framework-util-service'; 11 | export * from './util/framework-util-service-impl'; 12 | export * from './util/requests'; 13 | -------------------------------------------------------------------------------- /dist/content/handlers/import/extract-ecar.d.ts: -------------------------------------------------------------------------------- 1 | import { ImportContentContext } from '../..'; 2 | import { Response } from '../../../api'; 3 | import { FileService } from '../../../util/file/def/file-service'; 4 | import { ZipService } from '../../../util/zip/def/zip-service'; 5 | export declare class ExtractEcar { 6 | private fileService; 7 | private zipService; 8 | private readonly FILE_SIZE; 9 | constructor(fileService: FileService, zipService: ZipService); 10 | execute(importContext: ImportContentContext): Promise; 11 | } 12 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/def/shared-preferences-set-collection.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import Set from 'typescript-collections/dist/lib/Set'; 3 | export interface SharedPreferencesSetCollection { 4 | addAll(items: T[]): Observable; 5 | add(item: T): Observable; 6 | remove(item: T): Observable; 7 | clear(): Observable; 8 | contains(item: T): Observable; 9 | asList(): Observable; 10 | asSet(): Observable>; 11 | asListChanges(): Observable; 12 | } 13 | -------------------------------------------------------------------------------- /src/util/shared-preferences/def/shared-preferences.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'rxjs'; 2 | 3 | export interface SharedPreferences { 4 | getString(key: string): Observable; 5 | 6 | putString(key: string, value: string): Observable; 7 | 8 | putBoolean(key: string, value: boolean): Observable; 9 | 10 | getBoolean(key: string): Observable; 11 | 12 | addListener(key: string, listener: (value: any) => void); 13 | 14 | removeListener(key: string, listener: (value: any) => void); 15 | } 16 | -------------------------------------------------------------------------------- /dist/api/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './config/api-config'; 2 | export * from './def/api-service'; 3 | export * from './def/response'; 4 | export * from './def/response-interceptor'; 5 | export * from './def/request-interceptor'; 6 | export * from './def/request'; 7 | export * from './def/http-client'; 8 | export * from './def/api-request-handler'; 9 | export * from './util/jwt.util'; 10 | export * from './api-service-impl'; 11 | export * from './errors/network-error'; 12 | export * from './errors/http-server-error'; 13 | export * from './errors/http-client-error'; 14 | -------------------------------------------------------------------------------- /dist/codepush-experiment/def/codepush-experiment-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | export interface CodePushExperimentService { 3 | setDefaultDeploymentKey(deploymentKey: string): Observable; 4 | getDefaultDeploymentKey(): Observable; 5 | setExperimentKey(experimentKey: string): Observable; 6 | getExperimentKey(): string | Observable; 7 | setExperimentAppVersion(appVersion: string): Observable; 8 | getExperimentAppVersion(): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /dist/content/handlers/export/ecar-bundle.d.ts: -------------------------------------------------------------------------------- 1 | import { FileService } from '../../../util/file/def/file-service'; 2 | import { ZipService } from '../../../util/zip/def/zip-service'; 3 | import { ExportContentContext } from '../..'; 4 | import { Response } from '../../../api'; 5 | export declare class EcarBundle { 6 | private fileService; 7 | private zipService; 8 | private static readonly FILE_SIZE; 9 | constructor(fileService: FileService, zipService: ZipService); 10 | execute(exportContentContext: ExportContentContext): Promise; 11 | } 12 | -------------------------------------------------------------------------------- /src/auth/def/auth-service.ts: -------------------------------------------------------------------------------- 1 | import {OAuthSession} from './o-auth-session'; 2 | import {Observable} from 'rxjs'; 3 | import {SessionProvider} from './session-provider'; 4 | import {SdkServiceOnInitDelegate} from '../../sdk-service-on-init-delegate'; 5 | 6 | export interface AuthService extends SdkServiceOnInitDelegate { 7 | setSession(sessionProvider: SessionProvider): Observable; 8 | 9 | getSession(): Observable; 10 | 11 | resignSession(): Observable; 12 | 13 | refreshSession(): Observable; 14 | } 15 | -------------------------------------------------------------------------------- /src/util/queue/queue.ts: -------------------------------------------------------------------------------- 1 | import {LinkedList} from '../list/linked-list'; 2 | import {ListNode} from '../list/list-node'; 3 | import {Comparator} from '../list/comparator'; 4 | 5 | export class Queue> extends LinkedList { 6 | 7 | constructor() { 8 | super(); 9 | } 10 | 11 | public enque(value: T): void { 12 | super.add(value); 13 | } 14 | 15 | public deque(): ListNode { 16 | const first = this.head; 17 | this.head = this.head.next; 18 | return first; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /dist/util/shared-preferences/impl/shared-preferences-android.d.ts: -------------------------------------------------------------------------------- 1 | import { SharedPreferences } from '..'; 2 | import { Observable } from 'rxjs'; 3 | export declare class SharedPreferencesAndroid implements SharedPreferences { 4 | private static readonly sharedPreferncesName; 5 | private sharedPreferences; 6 | getString(key: string): Observable; 7 | putString(key: string, value: string): Observable; 8 | putBoolean(key: string, value: boolean): Observable; 9 | getBoolean(key: string): Observable; 10 | } 11 | -------------------------------------------------------------------------------- /src/util/download/def/requests.ts: -------------------------------------------------------------------------------- 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 | 13 | export interface DownloadCancelRequest { 14 | identifier: string; 15 | } 16 | 17 | export interface TrackDownloadRequest { 18 | groupBy: { 19 | fieldPath: string, 20 | value: any 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /dist/api/def/api-service.d.ts: -------------------------------------------------------------------------------- 1 | import { Request } from './request'; 2 | import { Observable } from 'rxjs'; 3 | import { Response } from './response'; 4 | import { Authenticator } from './authenticator'; 5 | import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate'; 6 | export interface ApiService extends SdkServiceOnInitDelegate { 7 | fetch(request: Request): Observable>; 8 | setDefaultApiAuthenticators(authenticators: Authenticator[]): void; 9 | setDefaultSessionAuthenticators(authenticators: Authenticator[]): void; 10 | } 11 | -------------------------------------------------------------------------------- /src/storage/def/storage-requests.ts: -------------------------------------------------------------------------------- 1 | export enum ExistingContentAction { 2 | IGNORE = 'IGNORE', 3 | KEEP_HIGER_VERSION = 'KEEP_HIGER_VERSION', 4 | KEEP_LOWER_VERSION = 'KEEP_LOWER_VERSION', 5 | KEEP_SOURCE = 'KEEP_SOURCE', 6 | KEEP_DESTINATION = 'KEEP_DESTINATION' 7 | } 8 | 9 | export interface TransferContentsRequest { 10 | contentIds: string[]; 11 | existingContentAction: ExistingContentAction; 12 | destinationFolder: string; 13 | sourceFolder?: string; 14 | deleteDestination: boolean; 15 | shouldMergeInDestination?: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /dist/course/handlers/enroll-course-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiRequestHandler, ApiService } from '../../api'; 2 | import { CourseServiceConfig, EnrollCourseRequest } from '..'; 3 | import { Observable } from 'rxjs'; 4 | export declare class EnrollCourseHandler implements ApiRequestHandler { 5 | private apiService; 6 | private courseServiceConfig; 7 | private readonly ENROL_ENDPOINT; 8 | constructor(apiService: ApiService, courseServiceConfig: CourseServiceConfig); 9 | handle(request: EnrollCourseRequest): Observable; 10 | } 11 | -------------------------------------------------------------------------------- /dist/profile/handler/generate-otp-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiRequestHandler, ApiService } from '../../api'; 2 | import { GenerateOtpRequest, ProfileServiceConfig } from '..'; 3 | import { Observable } from 'rxjs'; 4 | export declare class GenerateOtpHandler implements ApiRequestHandler { 5 | private apiService; 6 | private otpServiceConfig; 7 | private readonly GET_GENERATE_OTP_ENDPOINT; 8 | constructor(apiService: ApiService, otpServiceConfig: ProfileServiceConfig); 9 | handle(request: GenerateOtpRequest): Observable; 10 | } 11 | -------------------------------------------------------------------------------- /dist/storage/def/storage-requests.d.ts: -------------------------------------------------------------------------------- 1 | export declare enum ExistingContentAction { 2 | IGNORE = "IGNORE", 3 | KEEP_HIGER_VERSION = "KEEP_HIGER_VERSION", 4 | KEEP_LOWER_VERSION = "KEEP_LOWER_VERSION", 5 | KEEP_SOURCE = "KEEP_SOURCE", 6 | KEEP_DESTINATION = "KEEP_DESTINATION" 7 | } 8 | export interface TransferContentsRequest { 9 | contentIds: string[]; 10 | existingContentAction: ExistingContentAction; 11 | destinationFolder: string; 12 | sourceFolder?: string; 13 | deleteDestination: boolean; 14 | shouldMergeInDestination?: boolean; 15 | } 16 | -------------------------------------------------------------------------------- /dist/storage/handler/transfer/delete-source-folder.d.ts: -------------------------------------------------------------------------------- 1 | import { TransferContentContext } from '../transfer-content-handler'; 2 | import { EventsBusService } from '../../../events-bus'; 3 | import { Observable } from 'rxjs'; 4 | export declare class DeleteSourceFolder { 5 | private eventsBusService; 6 | constructor(eventsBusService: EventsBusService); 7 | execute(context: TransferContentContext): Observable; 8 | private deleteFolder; 9 | private copyFolder; 10 | private renameFolder; 11 | private removeSourceAndDestination; 12 | } 13 | -------------------------------------------------------------------------------- /src/db/util/query-builder.spec.ts: -------------------------------------------------------------------------------- 1 | import {QueryBuilder} from './query-builder'; 2 | 3 | describe('QueryBuilder', () => { 4 | it('should build a query string', () => { 5 | const q = new QueryBuilder() 6 | .where('a = ?') 7 | .args(['A']) 8 | .and() 9 | .where('b = ?') 10 | .args([2]) 11 | .or() 12 | .where('c = ?') 13 | .args(['c']) 14 | .end() 15 | .build(); 16 | 17 | expect(q).toEqual('a = "A" AND b = 2 OR c = "c"'); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /dist/api/config/api-config.d.ts: -------------------------------------------------------------------------------- 1 | export interface ApiConfig { 2 | host: string; 3 | user_authentication: { 4 | redirectUrl: string; 5 | authUrl: string; 6 | mergeUserHost: string; 7 | autoMergeApiPath: string; 8 | }; 9 | api_authentication: { 10 | mobileAppKey: string; 11 | mobileAppSecret: string; 12 | mobileAppConsumer: string; 13 | channelId: string; 14 | producerId: string; 15 | producerUniqueId: string; 16 | }; 17 | cached_requests: { 18 | timeToLive: number; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /dist/course/handlers/get-content-state-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiService } from '../../api'; 2 | import { CourseServiceConfig, GetContentStateRequest } from '..'; 3 | import { Observable } from 'rxjs'; 4 | export declare class GetContentStateHandler { 5 | private apiService; 6 | private courseServiceConfig; 7 | private readonly GET_CONTENT_STATE_KEY_PREFIX; 8 | private readonly GET_CONTENT_STATE_ENDPOINT; 9 | constructor(apiService: ApiService, courseServiceConfig: CourseServiceConfig); 10 | handle(contentStateRequest: GetContentStateRequest): Observable; 11 | } 12 | -------------------------------------------------------------------------------- /dist/profile/handler/verify-otp-handler.d.ts: -------------------------------------------------------------------------------- 1 | import { ApiRequestHandler, ApiService } from '../../api'; 2 | import { VerifyOtpRequest } from '..'; 3 | import { ProfileServiceConfig } from '..'; 4 | import { Observable } from 'rxjs'; 5 | export declare class VerifyOtpHandler implements ApiRequestHandler { 6 | private apiService; 7 | private optServiceConfig; 8 | private readonly GET_VERIFY_OTP_ENDPOINT; 9 | constructor(apiService: ApiService, optServiceConfig: ProfileServiceConfig); 10 | handle(request: VerifyOtpRequest): Observable; 11 | } 12 | --------------------------------------------------------------------------------