@aastrika_npmjs/sunbird-sdk 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/__test__/mocks.d.ts +6 -0
- package/__test__/setup.d.ts +2 -0
- package/api/api-service-impl.d.ts +32 -0
- package/api/config/api-config.d.ts +21 -0
- package/api/config/app-config.d.ts +6 -0
- package/api/def/api-request-handler.d.ts +4 -0
- package/api/def/api-service.d.ts +8 -0
- package/api/handlers/api-token-handler.d.ts +17 -0
- package/api/index.d.ts +7 -0
- package/api/network-queue/db/schema.d.ts +28 -0
- package/api/network-queue/def/network-queue.d.ts +20 -0
- package/api/network-queue/handlers/network-request-handler.d.ts +7 -0
- package/api/network-queue/impl/network-queue-impl.d.ts +16 -0
- package/api/network-queue/index.d.ts +2 -0
- package/api/util/authenticators/bearer-token-refresh-interceptor.d.ts +14 -0
- package/api/util/authenticators/user-token-refresh-interceptor.d.ts +11 -0
- package/api/util/jwt.util.d.ts +7 -0
- package/archive/def/archive-service.d.ts +60 -0
- package/archive/export/def/archive-export-delegate.d.ts +5 -0
- package/archive/export/def/telemetry-archive-package-meta.d.ts +5 -0
- package/archive/export/error/export-assertion-error.d.ts +4 -0
- package/archive/export/error/invalid-request-error.d.ts +4 -0
- package/archive/export/error/object-not-found-error.d.ts +4 -0
- package/archive/export/impl/telemetry-export-delegate.d.ts +18 -0
- package/archive/export/index.d.ts +1 -0
- package/archive/impl/archive-service-impl.d.ts +31 -0
- package/archive/import/def/archive-import-delegate.d.ts +6 -0
- package/archive/import/error/import-assertion-error.d.ts +4 -0
- package/archive/import/error/invalid-archive-error.d.ts +4 -0
- package/archive/import/error/unknown-object-error.d.ts +4 -0
- package/archive/import/impl/telemetry-import-delegate.d.ts +19 -0
- package/archive/import/index.d.ts +1 -0
- package/archive/index.d.ts +4 -0
- package/auth/def/auth-end-points.d.ts +5 -0
- package/auth/def/auth-event.d.ts +8 -0
- package/auth/def/auth-service.d.ts +10 -0
- package/auth/def/o-auth-session.d.ts +7 -0
- package/auth/def/session-provider.d.ts +4 -0
- package/auth/errors/auth-token-refresh-error.d.ts +4 -0
- package/auth/errors/in-app-browser-exit-error.d.ts +4 -0
- package/auth/errors/processing-error.d.ts +4 -0
- package/auth/errors/sign-in-error.d.ts +4 -0
- package/auth/impl/auth-service-impl.d.ts +22 -0
- package/auth/index.d.ts +20 -0
- package/auth/util/auth-util.d.ts +15 -0
- package/auth/util/native-apple-session-provider/impl/native-apple-session-provider.d.ts +27 -0
- package/auth/util/native-custombrowser-session-provider/impl/native-custombrowser-session-provider.d.ts +19 -0
- package/auth/util/native-google-session-provider/impl/native-google-session-provider.d.ts +15 -0
- package/auth/util/native-keycloak-session-provider/impl/native-keycloak-session-provider.d.ts +18 -0
- package/auth/util/webview-session-provider/def/webview-register-session-provider-config.d.ts +22 -0
- package/auth/util/webview-session-provider/def/webview-runner.d.ts +49 -0
- package/auth/util/webview-session-provider/def/webview-session-provider-config.d.ts +22 -0
- package/auth/util/webview-session-provider/def/webview-state-session-provider-config.d.ts +22 -0
- package/auth/util/webview-session-provider/errors/interrupt-error.d.ts +4 -0
- package/auth/util/webview-session-provider/errors/no-inappbrowser-session-assertion-fail-error.d.ts +4 -0
- package/auth/util/webview-session-provider/errors/param-not-captured-error.d.ts +4 -0
- package/auth/util/webview-session-provider/errors/webview-runner-error.d.ts +4 -0
- package/auth/util/webview-session-provider/impl/webview-auto-merge-session-provider.d.ts +15 -0
- package/auth/util/webview-session-provider/impl/webview-base-session-provider.d.ts +23 -0
- package/auth/util/webview-session-provider/impl/webview-login-session-provider.d.ts +14 -0
- package/auth/util/webview-session-provider/impl/webview-manual-merge-session-provider.d.ts +11 -0
- package/auth/util/webview-session-provider/impl/webview-runner-impl.d.ts +56 -0
- package/auth/util/webview-session-provider/impl/webview-state-session-provider.d.ts +14 -0
- package/certificate/config/certificate-service-config.d.ts +5 -0
- package/certificate/db/schema.d.ts +18 -0
- package/certificate/def/certificate-service.d.ts +17 -0
- package/certificate/handlers/get-public-key-handler.d.ts +18 -0
- package/certificate/impl/certificate-service-impl.d.ts +32 -0
- package/certificate/index.d.ts +3 -0
- package/codepush-experiment/def/codepush-experiment-service.d.ts +9 -0
- package/codepush-experiment/handler/codepush-experiment-handler.d.ts +3 -0
- package/codepush-experiment/impl/codepush-experiment-service-impl.d.ts +14 -0
- package/codepush-experiment/index.d.ts +2 -0
- package/content/config/content-config.d.ts +8 -0
- package/content/db/schema.d.ts +124 -0
- package/content/def/content-delete-listener.d.ts +3 -0
- package/content/def/content-event.d.ts +33 -0
- package/content/def/content-feedback-service.d.ts +21 -0
- package/content/def/content-service.d.ts +46 -0
- package/content/def/content.d.ts +43 -0
- package/content/def/requests.d.ts +219 -0
- package/content/def/response.d.ts +93 -0
- package/content/def/search-request.d.ts +37 -0
- package/content/handlers/content-aggregator.d.ts +166 -0
- package/content/handlers/content-feedback-handler.d.ts +5 -0
- package/content/handlers/content-marker-handler.d.ts +10 -0
- package/content/handlers/content-storage-handler.d.ts +9 -0
- package/content/handlers/delete-content-handler.d.ts +18 -0
- package/content/handlers/export/clean-temp-loc.d.ts +8 -0
- package/content/handlers/export/compress-content.d.ts +8 -0
- package/content/handlers/export/copy-asset.d.ts +8 -0
- package/content/handlers/export/copy-to-destination.d.ts +6 -0
- package/content/handlers/export/create-content-export-manifest.d.ts +12 -0
- package/content/handlers/export/create-temp-loc.d.ts +8 -0
- package/content/handlers/export/delete-temp-ecar.d.ts +8 -0
- package/content/handlers/export/deletete-temp-dir.d.ts +6 -0
- package/content/handlers/export/device-memory-check.d.ts +9 -0
- package/content/handlers/export/ecar-bundle.d.ts +11 -0
- package/content/handlers/export/generate-export-share-telemetry.d.ts +8 -0
- package/content/handlers/export/write-manifest.d.ts +10 -0
- package/content/handlers/get-child-contents-handler.d.ts +21 -0
- package/content/handlers/get-child-question-set-handler.d.ts +16 -0
- package/content/handlers/get-content-details-handler.d.ts +30 -0
- package/content/handlers/get-content-heirarchy-handler.d.ts +10 -0
- package/content/handlers/get-contents-handler.d.ts +12 -0
- package/content/handlers/import/content-search-api-handler.d.ts +13 -0
- package/content/handlers/import/create-content-import-manifest.d.ts +15 -0
- package/content/handlers/import/create-hierarchy.d.ts +18 -0
- package/content/handlers/import/device-memory-check.d.ts +10 -0
- package/content/handlers/import/ecar-cleanup.d.ts +8 -0
- package/content/handlers/import/extract-ecar.d.ts +11 -0
- package/content/handlers/import/extract-payloads.d.ts +53 -0
- package/content/handlers/import/generate-import-share-telemetry.d.ts +8 -0
- package/content/handlers/import/generate-interact-telemetry.d.ts +8 -0
- package/content/handlers/import/hierarchy-manifest-conversion.d.ts +11 -0
- package/content/handlers/import/update-size-on-device.d.ts +18 -0
- package/content/handlers/import/validate-ecar.d.ts +18 -0
- package/content/handlers/import-n-export-handler.d.ts +25 -0
- package/content/handlers/question-set-file-read-handler.d.ts +11 -0
- package/content/handlers/search-content-handler.d.ts +33 -0
- package/content/impl/content-feedback-service-impl.d.ts +13 -0
- package/content/impl/content-service-impl.d.ts +100 -0
- package/content/index.d.ts +9 -0
- package/content/util/content-constants.d.ts +93 -0
- package/content/util/content-mapper.d.ts +7 -0
- package/content/util/content-util.d.ts +94 -0
- package/content/util/linked-list.d.ts +16 -0
- package/content/util/stack.d.ts +10 -0
- package/course/config/course-service-config.d.ts +3 -0
- package/course/course-util.d.ts +6 -0
- package/course/def/batch.d.ts +1 -0
- package/course/def/course-batches-response.d.ts +5 -0
- package/course/def/course-certificate-manager.d.ts +9 -0
- package/course/def/course-service.d.ts +51 -0
- package/course/def/course.d.ts +1 -0
- package/course/def/download-certificate-request.d.ts +5 -0
- package/course/def/download-certificate-response.d.ts +3 -0
- package/course/def/get-certificate-request.d.ts +6 -0
- package/course/def/get-enrolled-course-response.d.ts +10 -0
- package/course/def/get-learner-certificate-response.d.ts +22 -0
- package/course/def/request-types.d.ts +83 -0
- package/course/def/unenrollCourseRequest.d.ts +5 -0
- package/course/def/update-content-state-response.d.ts +1 -0
- package/course/def/update-course-content-state-request.d.ts +1 -0
- package/course/errors/certificate-already-downloaded.d.ts +5 -0
- package/course/errors/no-certificate-found.d.ts +4 -0
- package/course/handlers/enroll-course-handler.d.ts +11 -0
- package/course/handlers/get-batch-details-handler.d.ts +10 -0
- package/course/handlers/get-content-state-handler.d.ts +16 -0
- package/course/handlers/get-course-batches-handler.d.ts +10 -0
- package/course/handlers/get-enrolled-course-handler.d.ts +21 -0
- package/course/handlers/get-learner-certificate-handler.d.ts +20 -0
- package/course/handlers/offline-content-state-handler.d.ts +12 -0
- package/course/handlers/offline-course-cache-handler.d.ts +15 -0
- package/course/handlers/sync-assessment-events-handler.d.ts +22 -0
- package/course/handlers/unenroll-course-handler.d.ts +10 -0
- package/course/handlers/update-content-state-api-handler.d.ts +16 -0
- package/course/handlers/update-enrolled-courses-handler.d.ts +11 -0
- package/course/impl/course-certificate-manager-impl.d.ts +21 -0
- package/course/impl/course-service-impl.d.ts +84 -0
- package/course/impl/offline-assessment-score-processor.d.ts +12 -0
- package/course/index.d.ts +11 -0
- package/db/config/db-config.d.ts +3 -0
- package/db/db-constants.d.ts +0 -0
- package/db/def/db-constants.d.ts +14 -0
- package/db/def/db-service.d.ts +14 -0
- package/db/def/migration.d.ts +10 -0
- package/db/def/query.d.ts +26 -0
- package/db/impl/db-cordova-service.d.ts +23 -0
- package/db/impl/db-web-sql-service.d.ts +0 -0
- package/db/index.d.ts +5 -0
- package/db/migrations/certificate-public-key-migration.d.ts +6 -0
- package/db/migrations/content-dialcode-migration.d.ts +9 -0
- package/db/migrations/content-generalization-migration.d.ts +8 -0
- package/db/migrations/content-marker-migration.d.ts +6 -0
- package/db/migrations/course-assessment-migration.d.ts +6 -0
- package/db/migrations/error-stack-migration.d.ts +6 -0
- package/db/migrations/group-profile-migration.d.ts +7 -0
- package/db/migrations/initial-migration.d.ts +6 -0
- package/db/migrations/milliseconds-to-seconds-migration.d.ts +6 -0
- package/db/migrations/network-queue-migration.d.ts +10 -0
- package/db/migrations/offline-search-textbook-migration.d.ts +6 -0
- package/db/migrations/player-config-data-migrations.d.ts +7 -0
- package/db/migrations/profile-syllabus-migration.d.ts +6 -0
- package/db/migrations/recently-viewed-migration.d.ts +6 -0
- package/db/migrations/search-history-migration.d.ts +6 -0
- package/db/util/query-builder.d.ts +7 -0
- package/db/util/unique-id.d.ts +3 -0
- package/debugging/def/debugging-service.d.ts +12 -0
- package/debugging/handler/debugging-duration-handler.d.ts +9 -0
- package/debugging/impl/debuggin-service-impl.d.ts +17 -0
- package/debugging/index.d.ts +3 -0
- package/device-register/config/device-register-config.d.ts +4 -0
- package/device-register/def/device-register-service.d.ts +7 -0
- package/device-register/def/request.d.ts +16 -0
- package/device-register/def/response.d.ts +7 -0
- package/device-register/handler/device-register-handler.d.ts +24 -0
- package/device-register/handler/get-device-profile-handler.d.ts +16 -0
- package/device-register/impl/device-register-service-impl.d.ts +21 -0
- package/device-register/index.d.ts +5 -0
- package/discussion/def/discussion-service.d.ts +10 -0
- package/discussion/impl/discussion-service.impl.d.ts +15 -0
- package/discussion/index.d.ts +1 -0
- package/error/config/error-logger-config.d.ts +3 -0
- package/error/db/schema.d.ts +17 -0
- package/error/def/error-logger-service.d.ts +6 -0
- package/error/def/error-stack.d.ts +6 -0
- package/error/handlers/error-stack-sync-handler.d.ts +19 -0
- package/error/handlers/error-stack-sync-request-decorator.d.ts +23 -0
- package/error/impl/error-logger-service-impl.d.ts +31 -0
- package/error/index.d.ts +1 -0
- package/error/util/error-stack-mapper.d.ts +6 -0
- package/errors/index.d.ts +1 -0
- package/errors/validation-error.d.ts +4 -0
- package/events-bus/config/events-bus-config.d.ts +3 -0
- package/events-bus/def/emit-request.d.ts +4 -0
- package/events-bus/def/error-event.d.ts +24 -0
- package/events-bus/def/event-namespace.d.ts +8 -0
- package/events-bus/def/event-observer.d.ts +5 -0
- package/events-bus/def/events-bus-event.d.ts +4 -0
- package/events-bus/def/events-bus-service.d.ts +11 -0
- package/events-bus/def/register-observer-request.d.ts +6 -0
- package/events-bus/impl/events-bus-service-impl.d.ts +16 -0
- package/events-bus/index.d.ts +4 -0
- package/faq/config/faq-service-config.d.ts +3 -0
- package/faq/def/faq-service.d.ts +6 -0
- package/faq/def/faq.d.ts +1 -0
- package/faq/def/get-faq-request.d.ts +4 -0
- package/faq/handler/get-faq-details-handler.d.ts +18 -0
- package/faq/impl/faq-service-impl.d.ts +15 -0
- package/faq/index.d.ts +5 -0
- package/form/config/form-service-config.d.ts +4 -0
- package/form/def/form-request.d.ts +9 -0
- package/form/def/form-service.d.ts +7 -0
- package/form/def/models.d.ts +1 -0
- package/form/handle/get-form-handler.d.ts +23 -0
- package/form/impl/form-service-impl.d.ts +17 -0
- package/form/index.d.ts +4 -0
- package/framework/config/framework-service-config.d.ts +9 -0
- package/framework/def/channel.d.ts +1 -0
- package/framework/def/framework-category-code.d.ts +12 -0
- package/framework/def/framework-service.d.ts +18 -0
- package/framework/def/framework.d.ts +1 -0
- package/framework/def/organization.d.ts +1 -0
- package/framework/def/requests.d.ts +20 -0
- package/framework/def/responses.d.ts +5 -0
- package/framework/def/suggested-framework.d.ts +6 -0
- package/framework/errors/no-active-channel-found-error.d.ts +4 -0
- package/framework/handler/get-channel-detail-handler.d.ts +18 -0
- package/framework/handler/get-framework-category-terms-handler.d.ts +16 -0
- package/framework/handler/get-framework-detail-handler.d.ts +19 -0
- package/framework/impl/framework-service-impl.d.ts +32 -0
- package/framework/index.d.ts +12 -0
- package/framework/util/framework-mapper.d.ts +7 -0
- package/framework/util/framework-util-service-impl.d.ts +15 -0
- package/framework/util/framework-util-service.d.ts +13 -0
- package/framework/util/requests.d.ts +19 -0
- package/group/def/group-activity-service.d.ts +7 -0
- package/group/def/group-service.d.ts +25 -0
- package/group/def/models.d.ts +1 -0
- package/group/def/requests.d.ts +56 -0
- package/group/def/responses.d.ts +2 -0
- package/group/impl/group-activity-service-impl.d.ts +12 -0
- package/group/impl/group-service-impl.d.ts +34 -0
- package/group/index.d.ts +5 -0
- package/group-deprecated/db/schema.d.ts +35 -0
- package/group-deprecated/def/get-all-group-request-deprecated.d.ts +3 -0
- package/group-deprecated/def/group-service-deprecated.d.ts +16 -0
- package/group-deprecated/def/group-session-deprecated.d.ts +9 -0
- package/group-deprecated/def/groupDeprecated.d.ts +16 -0
- package/group-deprecated/def/profiles-to-group-request-deprecated.d.ts +4 -0
- package/group-deprecated/error/no-active-group-session-error.d.ts +4 -0
- package/group-deprecated/error/no-group-found-error.d.ts +4 -0
- package/group-deprecated/impl/group-service-deprecated-impl.d.ts +24 -0
- package/group-deprecated/index.d.ts +7 -0
- package/group-deprecated/util/group-mapper.d.ts +6 -0
- package/group-deprecated/util/group-profile-mapper.d.ts +6 -0
- package/index.d.ts +38 -0
- package/index.js +14 -0
- package/injection-tokens.d.ts +60 -0
- package/key-value-store/db/schema.d.ts +12 -0
- package/key-value-store/def/cached-item-request.d.ts +7 -0
- package/key-value-store/def/cached-item-store.d.ts +14 -0
- package/key-value-store/def/key-value-store.d.ts +5 -0
- package/key-value-store/impl/cached-item-store-impl.d.ts +19 -0
- package/key-value-store/impl/key-value-store-impl.d.ts +9 -0
- package/key-value-store/index.d.ts +3 -0
- package/notification/db/schema.d.ts +21 -0
- package/notification/def/notification-service.d.ts +11 -0
- package/notification/def/requests.d.ts +32 -0
- package/notification/handler/notification-handler.d.ts +9 -0
- package/notification/impl/notification-service-impl.d.ts +26 -0
- package/notification/index.d.ts +2 -0
- package/notification-v2/def/notification-service-v2.d.ts +8 -0
- package/notification-v2/impl/notification-service-v2-impl.d.ts +14 -0
- package/notification-v2/index.d.ts +1 -0
- package/open-rap-configurable.d.ts +3 -0
- package/package.json +114 -0
- package/page/config/page-service-config.d.ts +4 -0
- package/page/def/page-assemble-service.d.ts +7 -0
- package/page/def/page-assemble.d.ts +5 -0
- package/page/def/requests.d.ts +41 -0
- package/page/handle/delegates/course-request-delegate.d.ts +18 -0
- package/page/handle/delegates/default-request-delegate.d.ts +28 -0
- package/page/handle/delegates/dialcode-request-delegate.d.ts +15 -0
- package/page/handle/page-assembler-factory.d.ts +27 -0
- package/page/impl/page-assemble-service-impl.d.ts +28 -0
- package/page/index.d.ts +4 -0
- package/partner/db/schema.d.ts +9 -0
- package/player/db/schema.d.ts +27 -0
- package/player/def/player-service.d.ts +10 -0
- package/player/def/response.d.ts +42 -0
- package/player/impl/player-service-impl.d.ts +27 -0
- package/player/index.d.ts +2 -0
- package/preference-keys.d.ts +54 -0
- package/profile/config/profile-service-config.d.ts +9 -0
- package/profile/db/schema.d.ts +190 -0
- package/profile/def/accept-terms-condition-request.d.ts +5 -0
- package/profile/def/add-managed-profile-request.d.ts +10 -0
- package/profile/def/check-user-exists-request.d.ts +7 -0
- package/profile/def/check-user-exists-response.d.ts +1 -0
- package/profile/def/content-access-filter-criteria.d.ts +4 -0
- package/profile/def/content-access.d.ts +16 -0
- package/profile/def/delete-user-feed-request.d.ts +5 -0
- package/profile/def/export-profile-context.d.ts +10 -0
- package/profile/def/generate-otp-request.d.ts +6 -0
- package/profile/def/get-all-group-request.d.ts +3 -0
- package/profile/def/get-all-profile-request.d.ts +5 -0
- package/profile/def/get-managed-server-profiles-request.d.ts +4 -0
- package/profile/def/import-profile-context.d.ts +8 -0
- package/profile/def/is-profile-already-in-use-request.d.ts +4 -0
- package/profile/def/location-search-criteria.d.ts +11 -0
- package/profile/def/location-search-result.d.ts +1 -0
- package/profile/def/merge-server-profiles-request.d.ts +10 -0
- package/profile/def/profile-exists-response.d.ts +3 -0
- package/profile/def/profile-export-request.d.ts +12 -0
- package/profile/def/profile-export-response.d.ts +3 -0
- package/profile/def/profile-import-request.d.ts +3 -0
- package/profile/def/profile-import-response.d.ts +4 -0
- package/profile/def/profile-service.d.ts +70 -0
- package/profile/def/profile-session.d.ts +7 -0
- package/profile/def/profile.d.ts +30 -0
- package/profile/def/profiles-to-group-request.d.ts +4 -0
- package/profile/def/server-profile-details-request.d.ts +5 -0
- package/profile/def/server-profile.d.ts +1 -0
- package/profile/def/tenant-info-request.d.ts +3 -0
- package/profile/def/tenant-info.d.ts +7 -0
- package/profile/def/update-server-profile-declarations-request.d.ts +4 -0
- package/profile/def/update-server-profile-declarations-response.d.ts +1 -0
- package/profile/def/update-server-profile-info-request.d.ts +1 -0
- package/profile/def/update-server-profile-response.d.ts +1 -0
- package/profile/def/update-user-feed-request.d.ts +7 -0
- package/profile/def/user-migrate-request.d.ts +7 -0
- package/profile/def/user-migrate-response.d.ts +11 -0
- package/profile/def/verify-otp-request.d.ts +6 -0
- package/profile/errors/invalid-profile-error.d.ts +4 -0
- package/profile/errors/no-active-session-error.d.ts +4 -0
- package/profile/errors/no-profile-found-error.d.ts +4 -0
- package/profile/handler/accept-term-condition-handler.d.ts +10 -0
- package/profile/handler/export/clean-up-exported-file.d.ts +20 -0
- package/profile/handler/export/copy-database.d.ts +8 -0
- package/profile/handler/export/create-metadata.d.ts +14 -0
- package/profile/handler/export/generate-profile-export-telemetry.d.ts +8 -0
- package/profile/handler/export/get-epar-file-path.d.ts +8 -0
- package/profile/handler/generate-otp-handler.d.ts +10 -0
- package/profile/handler/get-server-profile-details-handler.d.ts +20 -0
- package/profile/handler/import/generate-profile-import-telemetry.d.ts +8 -0
- package/profile/handler/import/transport-assesments.d.ts +11 -0
- package/profile/handler/import/transport-framework-n-channel.d.ts +9 -0
- package/profile/handler/import/transport-group-profile.d.ts +9 -0
- package/profile/handler/import/transport-group.d.ts +9 -0
- package/profile/handler/import/transport-profiles.d.ts +9 -0
- package/profile/handler/import/transport-user.d.ts +9 -0
- package/profile/handler/import/update-imported-profile-metadata.d.ts +8 -0
- package/profile/handler/import/validate-profile-metadata.d.ts +9 -0
- package/profile/handler/is-profile-already-in-use-handler.d.ts +11 -0
- package/profile/handler/managed-profile-manager.d.ts +34 -0
- package/profile/handler/profile-handler.d.ts +5 -0
- package/profile/handler/search-location-handler.d.ts +19 -0
- package/profile/handler/tenant-info-handler.d.ts +12 -0
- package/profile/handler/user-migrate-handler.d.ts +15 -0
- package/profile/handler/verify-otp-handler.d.ts +10 -0
- package/profile/impl/profile-service-impl.d.ts +83 -0
- package/profile/index.d.ts +25 -0
- package/profile/util/profile-db-entry-mapper.d.ts +6 -0
- package/sdk-config.d.ts +41 -0
- package/sdk-service-on-init-delegate.d.ts +5 -0
- package/sdk-service-pre-init-delegate.d.ts +5 -0
- package/sdk.d.ts +91 -0
- package/segmentation/def/segmentation-service.d.ts +9 -0
- package/segmentation/handler/fetch-segmentation-command-handler.d.ts +8 -0
- package/segmentation/handler/fetch-segmentation-tags-handler.d.ts +8 -0
- package/segmentation/handler/store-segmentation-command-handler.d.ts +8 -0
- package/segmentation/handler/store-segmentation-tag-handler.d.ts +8 -0
- package/segmentation/impl/segmentaion-service-impl.d.ts +13 -0
- package/segmentation/index.d.ts +6 -0
- package/storage/def/scan-requests.d.ts +5 -0
- package/storage/def/storage-destination.d.ts +4 -0
- package/storage/def/storage-event.d.ts +36 -0
- package/storage/def/storage-requests.d.ts +15 -0
- package/storage/def/storage-service.d.ts +16 -0
- package/storage/errors/cancellation-error.d.ts +4 -0
- package/storage/errors/duplicate-content-error.d.ts +4 -0
- package/storage/errors/low-memory-error.d.ts +4 -0
- package/storage/errors/transfer-failed-duplicate-content-error.d.ts +4 -0
- package/storage/errors/transfer-failed-error.d.ts +5 -0
- package/storage/handler/scan/get-modified-content-handler.d.ts +15 -0
- package/storage/handler/scan/perform-actoin-on-content-handler.d.ts +8 -0
- package/storage/handler/storage-handler.d.ts +14 -0
- package/storage/handler/transfer/copy-content-from-source-to-destination.d.ts +15 -0
- package/storage/handler/transfer/delete-destination-folder.d.ts +6 -0
- package/storage/handler/transfer/delete-source-folder.d.ts +12 -0
- package/storage/handler/transfer/device-memory-check.d.ts +9 -0
- package/storage/handler/transfer/duplicate-content-check.d.ts +13 -0
- package/storage/handler/transfer/store-destination-content-in-db.d.ts +17 -0
- package/storage/handler/transfer/update-source-content-path-in-db.d.ts +8 -0
- package/storage/handler/transfer/validate-destination-content.d.ts +13 -0
- package/storage/handler/transfer/validate-destination-folder.d.ts +11 -0
- package/storage/handler/transfer-content-handler.d.ts +51 -0
- package/storage/impl/storage-service-impl.d.ts +35 -0
- package/storage/index.d.ts +6 -0
- package/summarizer/assesment-analyzer.d.ts +4 -0
- package/summarizer/db/schema.d.ts +21 -0
- package/summarizer/def/request.d.ts +6 -0
- package/summarizer/def/response.d.ts +77 -0
- package/summarizer/def/summarizer-service.d.ts +22 -0
- package/summarizer/handler/summarizer-handler.d.ts +22 -0
- package/summarizer/handler/summarizer-queries.d.ts +12 -0
- package/summarizer/handler/summary-telemetry-event-handler.d.ts +40 -0
- package/summarizer/impl/summarizer-service-impl.d.ts +40 -0
- package/summarizer/index.d.ts +7 -0
- package/sunbird-error.d.ts +5 -0
- package/system-settings/config/system-settings-config.d.ts +4 -0
- package/system-settings/def/request-types.d.ts +3 -0
- package/system-settings/def/system-settings-org-ids.d.ts +5 -0
- package/system-settings/def/system-settings-service.d.ts +5 -0
- package/system-settings/def/system-settings.d.ts +5 -0
- package/system-settings/handlers/get-system-settings-handler.d.ts +18 -0
- package/system-settings/impl/system-settings-service-impl.d.ts +15 -0
- package/system-settings/index.d.ts +5 -0
- package/telemetry/config/telemetry-config.d.ts +7 -0
- package/telemetry/db/schema.d.ts +66 -0
- package/telemetry/def/requests.d.ts +171 -0
- package/telemetry/def/telemetry-constants.d.ts +64 -0
- package/telemetry/def/telemetry-decorator.d.ts +13 -0
- package/telemetry/def/telemetry-event.d.ts +12 -0
- package/telemetry/def/telemetry-model.d.ts +193 -0
- package/telemetry/def/telemetry-service.d.ts +31 -0
- package/telemetry/def/telemetry-stat.d.ts +4 -0
- package/telemetry/def/telemetry-sync-preprocessor.d.ts +3 -0
- package/telemetry/def/telemetry-sync-stat.d.ts +6 -0
- package/telemetry/errors/invalid-input-for-sync-preprocessor-error.d.ts +4 -0
- package/telemetry/handler/import/generate-import-telemetry-share.d.ts +9 -0
- package/telemetry/handler/import/transport-processed-telemetry.d.ts +9 -0
- package/telemetry/handler/import/update-imported-telemetry-metadata.d.ts +8 -0
- package/telemetry/handler/import/validate-telemetry-metadata.d.ts +9 -0
- package/telemetry/handler/telemetry-sync-handler.d.ts +41 -0
- package/telemetry/impl/decorator-impl.d.ts +26 -0
- package/telemetry/impl/process-event.d.ts +5 -0
- package/telemetry/impl/string-to-byte-array-preprocessor.d.ts +4 -0
- package/telemetry/impl/string-to-gzipped-string.d.ts +4 -0
- package/telemetry/impl/telemetry-entries-to-string-preprocessor.d.ts +4 -0
- package/telemetry/impl/telemetry-service-impl.d.ts +74 -0
- package/telemetry/index.d.ts +9 -0
- package/telemetry/util/telemetry-auto-sync-modes.d.ts +5 -0
- package/telemetry/util/telemetry-auto-sync-service-impl.d.ts +17 -0
- package/telemetry/util/telemetry-auto-sync-service.d.ts +9 -0
- package/telemetry/util/telemetry-logger.d.ts +4 -0
- package/util/app/def/app-info.d.ts +7 -0
- package/util/app/impl/app-info-impl.d.ts +19 -0
- package/util/app/index.d.ts +1 -0
- package/util/array-util.d.ts +6 -0
- package/util/device/def/device-info.d.ts +33 -0
- package/util/device/impl/device-info-impl.d.ts +12 -0
- package/util/device/index.d.ts +1 -0
- package/util/download/def/download-complete-delegate.d.ts +5 -0
- package/util/download/def/download-event.d.ts +20 -0
- package/util/download/def/download-service.d.ts +14 -0
- package/util/download/def/download-status.d.ts +7 -0
- package/util/download/def/requests.d.ts +20 -0
- package/util/download/def/response.d.ts +5 -0
- package/util/download/impl/download-service-impl.d.ts +38 -0
- package/util/download/index.d.ts +5 -0
- package/util/encoders/encoder.d.ts +4 -0
- package/util/encoders/utf8-to-b64-encoder.d.ts +5 -0
- package/util/file/config/file-config.d.ts +2 -0
- package/util/file/def/file-service.d.ts +21 -0
- package/util/file/errors/no-file-found.d.ts +4 -0
- package/util/file/impl/file-service-impl.d.ts +98 -0
- package/util/file/index.d.ts +271 -0
- package/util/file/util/file-util.d.ts +9 -0
- package/util/file/util/path.d.ts +6 -0
- package/util/list/comparator.d.ts +3 -0
- package/util/list/linked-list.d.ts +11 -0
- package/util/list/list-node.d.ts +6 -0
- package/util/network/def/network-info-service.d.ts +5 -0
- package/util/network/def/network-status.d.ts +4 -0
- package/util/network/impl/network-info-service-impl.d.ts +7 -0
- package/util/network/index.d.ts +2 -0
- package/util/number-util.d.ts +5 -0
- package/util/object-util.d.ts +7 -0
- package/util/queue/queue.d.ts +8 -0
- package/util/search-history/db/schema.d.ts +17 -0
- package/util/search-history/def/requests.d.ts +9 -0
- package/util/search-history/def/search-entry.d.ts +5 -0
- package/util/search-history/def/search-history-service.d.ts +7 -0
- package/util/search-history/impl/search-history-service-impl.d.ts +13 -0
- package/util/search-history/index.d.ts +2 -0
- package/util/search-history/util/search-history-db-entry-mapper.d.ts +5 -0
- package/util/shared-preferences/config/shared-prefernces-config.d.ts +2 -0
- package/util/shared-preferences/def/shared-preferences-set-collection.d.ts +12 -0
- package/util/shared-preferences/def/shared-preferences.d.ts +9 -0
- package/util/shared-preferences/impl/shared-preferences-android.d.ts +13 -0
- package/util/shared-preferences/impl/shared-preferences-local-storage.d.ts +11 -0
- package/util/shared-preferences/impl/shared-preferences-set-collection-impl.d.ts +19 -0
- package/util/shared-preferences/index.d.ts +2 -0
- package/util/zip/def/zip-service.d.ts +4 -0
- package/util/zip/impl/zip-service-impl.d.ts +5 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const CsInjectionTokens: {
|
|
2
|
+
HTTP_SERVICE: symbol;
|
|
3
|
+
GROUP_SERVICE: symbol;
|
|
4
|
+
COURSE_SERVICE: symbol;
|
|
5
|
+
USER_SERVICE: symbol;
|
|
6
|
+
DISCUSSION_SERVICE: symbol;
|
|
7
|
+
CONTENT_SERVICE: symbol;
|
|
8
|
+
NOTIFICATION_SERVICE_V2: symbol;
|
|
9
|
+
CERTIFICATE_SERVICE: symbol;
|
|
10
|
+
};
|
|
11
|
+
export declare const InjectionTokens: {
|
|
12
|
+
CONTAINER: symbol;
|
|
13
|
+
DB_VERSION: symbol;
|
|
14
|
+
DB_MIGRATION_LIST: symbol;
|
|
15
|
+
SDK_CONFIG: symbol;
|
|
16
|
+
DEVICE_INFO: symbol;
|
|
17
|
+
SHARED_PREFERENCES: symbol;
|
|
18
|
+
EVENTS_BUS_SERVICE: symbol;
|
|
19
|
+
DB_SERVICE: symbol;
|
|
20
|
+
APP_INFO: symbol;
|
|
21
|
+
API_SERVICE: symbol;
|
|
22
|
+
AUTH_SERVICE: symbol;
|
|
23
|
+
FILE_SERVICE: symbol;
|
|
24
|
+
SYSTEM_SETTINGS_SERVICE: symbol;
|
|
25
|
+
FRAMEWORK_SERVICE: symbol;
|
|
26
|
+
PROFILE_SERVICE: symbol;
|
|
27
|
+
GROUP_SERVICE: symbol;
|
|
28
|
+
GROUP_SERVICE_DEPRECATED: symbol;
|
|
29
|
+
ZIP_SERVICE: symbol;
|
|
30
|
+
TELEMETRY_SERVICE: symbol;
|
|
31
|
+
CONTENT_FEEDBACK_SERVICE: symbol;
|
|
32
|
+
FORM_SERVICE: symbol;
|
|
33
|
+
PAGE_ASSEMBLE_SERVICE: symbol;
|
|
34
|
+
FRAMEWORK_UTIL_SERVICE: symbol;
|
|
35
|
+
DOWNLOAD_SERVICE: symbol;
|
|
36
|
+
CONTENT_SERVICE: symbol;
|
|
37
|
+
COURSE_SERVICE: symbol;
|
|
38
|
+
SUMMARIZER_SERVICE: symbol;
|
|
39
|
+
PLAYER_SERVICE: symbol;
|
|
40
|
+
CACHED_ITEM_STORE: symbol;
|
|
41
|
+
KEY_VALUE_STORE: symbol;
|
|
42
|
+
TELEMETRY_DECORATOR: symbol;
|
|
43
|
+
STORAGE_SERVICE: symbol;
|
|
44
|
+
NOTIFICATION_SERVICE: symbol;
|
|
45
|
+
ERROR_LOGGER_SERVICE: symbol;
|
|
46
|
+
NETWORKINFO_SERVICE: symbol;
|
|
47
|
+
SEARCH_HISTORY_SERVICE: symbol;
|
|
48
|
+
CODEPUSH_EXPERIMENT_SERVICE: symbol;
|
|
49
|
+
FAQ_SERVICE: symbol;
|
|
50
|
+
DEVICE_REGISTER_SERVICE: symbol;
|
|
51
|
+
CONTENT_RATING_SERVICE: symbol;
|
|
52
|
+
ARCHIVE_SERVICE: symbol;
|
|
53
|
+
NETWORK_QUEUE: symbol;
|
|
54
|
+
CLASS_ROOM_SERVICE: symbol;
|
|
55
|
+
DISCUSSION_SERVICE: symbol;
|
|
56
|
+
SEGMENTATION_SERVICE: symbol;
|
|
57
|
+
DEBUGGING_SERVICE: symbol;
|
|
58
|
+
NOTIFICATION_SERVICE_V2: symbol;
|
|
59
|
+
CERTIFICATE_SERVICE: symbol;
|
|
60
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare namespace KeyValueStoreEntry {
|
|
2
|
+
const _ID = "_id";
|
|
3
|
+
const TABLE_NAME = "no_sql";
|
|
4
|
+
const COLUMN_NAME_KEY = "key";
|
|
5
|
+
const COLUMN_NAME_VALUE = "value";
|
|
6
|
+
const getCreateEntry: (() => string);
|
|
7
|
+
const getDeleteEntry: (() => string);
|
|
8
|
+
interface SchemaMap {
|
|
9
|
+
[COLUMN_NAME_KEY]: string;
|
|
10
|
+
[COLUMN_NAME_VALUE]: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface CachedItemStore {
|
|
3
|
+
/**
|
|
4
|
+
* @param id: identifier of the cached item
|
|
5
|
+
* @param noSqlkey: prefix for noSQL store
|
|
6
|
+
* @param timeToLiveKey: prefix for preferences store
|
|
7
|
+
* @param fromServer: function returning server-request-observable for the item
|
|
8
|
+
* @param initial?: optional function returning initial-source-observable for the item; typically a file
|
|
9
|
+
* @param timeToLive?: optional timeToLive override in milliseconds
|
|
10
|
+
* @param emptyCondition?: optional emptyCondition predicate - when true, item won't be cached
|
|
11
|
+
* */
|
|
12
|
+
getCached<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
|
|
13
|
+
get<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CachedItemStore, KeyValueStore } from '..';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { SharedPreferences } from '../../util/shared-preferences';
|
|
4
|
+
import { SdkConfig } from '../../sdk-config';
|
|
5
|
+
export declare class CachedItemStoreImpl implements CachedItemStore {
|
|
6
|
+
private sdkConfig;
|
|
7
|
+
private keyValueStore;
|
|
8
|
+
private sharedPreferences;
|
|
9
|
+
private apiConfig;
|
|
10
|
+
constructor(sdkConfig: SdkConfig, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences);
|
|
11
|
+
private static isItemEmpty;
|
|
12
|
+
get<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
|
|
13
|
+
getCached<T>(id: string, noSqlkey: string, timeToLiveKey: string, fromServer: () => Observable<T>, initial?: () => Observable<T>, timeToLive?: number, emptyCondition?: (item: T) => boolean): Observable<T>;
|
|
14
|
+
private isItemCachedInDb;
|
|
15
|
+
private isItemTTLExpired;
|
|
16
|
+
private saveItem;
|
|
17
|
+
private saveItemTTL;
|
|
18
|
+
private saveItemToDb;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyValueStore } from '..';
|
|
2
|
+
import { DbService } from '../../db';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare class KeyValueStoreImpl implements KeyValueStore {
|
|
5
|
+
private dbService;
|
|
6
|
+
constructor(dbService: DbService);
|
|
7
|
+
getValue(key: string): Observable<string | undefined>;
|
|
8
|
+
setValue(key: string, value: string): Observable<boolean>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare namespace NotificationEntry {
|
|
2
|
+
const _ID = "_id";
|
|
3
|
+
const TABLE_NAME = "notifications";
|
|
4
|
+
const COLUMN_NAME_MESSAGE_ID = "message_id";
|
|
5
|
+
const COLUMN_NAME_EXPIRY_TIME = "expiry_time";
|
|
6
|
+
const COLUMN_NAME_NOTIFICATION_DISPLAY_TIME = "display_time";
|
|
7
|
+
const COLUMN_NAME_NOTIFICATION_RECEIVED_AT = "received_at";
|
|
8
|
+
const COLUMN_NAME_NOTIFICATION_JSON = "notification_json";
|
|
9
|
+
const COLUMN_NAME_IS_READ = "is_read";
|
|
10
|
+
interface SchemaMap {
|
|
11
|
+
[COLUMN_NAME_MESSAGE_ID]: number;
|
|
12
|
+
[COLUMN_NAME_EXPIRY_TIME]: number;
|
|
13
|
+
[COLUMN_NAME_EXPIRY_TIME]: number;
|
|
14
|
+
[COLUMN_NAME_NOTIFICATION_DISPLAY_TIME]: number;
|
|
15
|
+
[COLUMN_NAME_NOTIFICATION_RECEIVED_AT]?: number;
|
|
16
|
+
[COLUMN_NAME_NOTIFICATION_JSON]?: string;
|
|
17
|
+
[COLUMN_NAME_IS_READ]?: number;
|
|
18
|
+
}
|
|
19
|
+
const getCreateEntry: (() => string);
|
|
20
|
+
const deleteTable: (() => string);
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Notification, NotificationFilterCriteria } from './requests';
|
|
3
|
+
import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate';
|
|
4
|
+
export interface NotificationService extends SdkServiceOnInitDelegate {
|
|
5
|
+
notifications$: Observable<Notification[]>;
|
|
6
|
+
addNotification(notification: Notification): Observable<boolean>;
|
|
7
|
+
updateNotification(notification: Notification): Observable<boolean>;
|
|
8
|
+
getAllNotifications(criteria: NotificationFilterCriteria): Observable<Notification[]>;
|
|
9
|
+
deleteNotification(notification: Notification): Observable<boolean>;
|
|
10
|
+
deleteAllNotifications(): Observable<boolean>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface NotificationFilterCriteria {
|
|
2
|
+
notificationStatus: NotificationStatus;
|
|
3
|
+
}
|
|
4
|
+
export declare enum NotificationType {
|
|
5
|
+
ACTIONABLE_NOTIFICATION = 1,
|
|
6
|
+
NOTIFY = 2,
|
|
7
|
+
CONFIG = 3
|
|
8
|
+
}
|
|
9
|
+
export interface Notification {
|
|
10
|
+
id: number | string;
|
|
11
|
+
source?: 'FCM' | 'USER_FEED';
|
|
12
|
+
type: NotificationType;
|
|
13
|
+
displayTime: number;
|
|
14
|
+
expiry: number;
|
|
15
|
+
isRead: number;
|
|
16
|
+
actionData: ActionData;
|
|
17
|
+
}
|
|
18
|
+
export interface ActionData {
|
|
19
|
+
actionType: string;
|
|
20
|
+
title: string;
|
|
21
|
+
identifier: string;
|
|
22
|
+
ctaText: string;
|
|
23
|
+
deepLink: string;
|
|
24
|
+
thumbnail: string;
|
|
25
|
+
banner: string;
|
|
26
|
+
deploymentKey: string;
|
|
27
|
+
}
|
|
28
|
+
export declare enum NotificationStatus {
|
|
29
|
+
READ = "read",
|
|
30
|
+
UNREAD = "unread",
|
|
31
|
+
ALL = "all"
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Notification, NotificationFilterCriteria } from '..';
|
|
2
|
+
import { NotificationEntry } from '../db/schema';
|
|
3
|
+
export declare class NotificationHandler {
|
|
4
|
+
static constructNotificationDBModel(notification: Notification): NotificationEntry.SchemaMap;
|
|
5
|
+
static getFilterForNotification(criteria: NotificationFilterCriteria): {
|
|
6
|
+
table: string;
|
|
7
|
+
orderBy: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Notification, NotificationFilterCriteria, NotificationService } from '..';
|
|
2
|
+
import { DbService } from '../../db';
|
|
3
|
+
import { SharedPreferences } from '../../util/shared-preferences';
|
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
|
5
|
+
import { ProfileService } from '../../profile';
|
|
6
|
+
import { SdkServiceOnInitDelegate } from '../../sdk-service-on-init-delegate';
|
|
7
|
+
import { KeyValueStore } from '../../key-value-store';
|
|
8
|
+
export declare class NotificationServiceImpl implements NotificationService, SdkServiceOnInitDelegate {
|
|
9
|
+
private dbService;
|
|
10
|
+
private sharedPreferences;
|
|
11
|
+
private profileService;
|
|
12
|
+
private keyValueStore;
|
|
13
|
+
private static readonly USER_NOTIFICATION_FEED_KEY;
|
|
14
|
+
constructor(dbService: DbService, sharedPreferences: SharedPreferences, profileService: ProfileService, keyValueStore: KeyValueStore);
|
|
15
|
+
private _notifications$;
|
|
16
|
+
private _notificationTrigger$;
|
|
17
|
+
readonly notifications$: Subject<Notification[]>;
|
|
18
|
+
onInit(): Observable<undefined>;
|
|
19
|
+
addNotification(notification: Notification): Observable<boolean>;
|
|
20
|
+
deleteNotification(notification: Notification): Observable<boolean>;
|
|
21
|
+
getAllNotifications(criteria: NotificationFilterCriteria): Observable<Notification[]>;
|
|
22
|
+
updateNotification(notification: Notification): Observable<boolean>;
|
|
23
|
+
deleteAllNotifications(): Observable<boolean>;
|
|
24
|
+
private fetchNotificationAndUserFeed;
|
|
25
|
+
private triggerNotificationChange;
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CsNotificationServiceConfig } from "@project-sunbird/client-services";
|
|
2
|
+
import { CsNotificationDeleteReq, CsNotificationReadResponse, CsNotificationUpdateReq } from "@project-sunbird/client-services/services/notification/interface/cs-notification-service";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
export interface NotificationServiceV2 {
|
|
5
|
+
notificationRead(uid: string, config?: CsNotificationServiceConfig): Observable<CsNotificationReadResponse>;
|
|
6
|
+
notificationUpdate(req: CsNotificationUpdateReq, config?: CsNotificationServiceConfig): Observable<any>;
|
|
7
|
+
notificationDelete(req: CsNotificationDeleteReq, config?: CsNotificationServiceConfig): Observable<any>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CsAttachForumResponse } from "@project-sunbird/client-services/services/discussion";
|
|
2
|
+
import { Container } from "inversify";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import { CsCreateUserResponse } from "@project-sunbird/client-services/services/discussion";
|
|
5
|
+
import { CsNotificationDeleteReq, CsNotificationReadResponse, CsNotificationUpdateReq } from "@project-sunbird/client-services/services/notification/interface/cs-notification-service";
|
|
6
|
+
import { NotificationServiceV2 } from "../def/notification-service-v2";
|
|
7
|
+
export declare class NotificationServiceV2Impl implements NotificationServiceV2 {
|
|
8
|
+
private container;
|
|
9
|
+
constructor(container: Container);
|
|
10
|
+
private readonly NotificationServiceV2Delegate;
|
|
11
|
+
notificationRead(uid: string): Observable<CsNotificationReadResponse>;
|
|
12
|
+
notificationUpdate(request: CsNotificationUpdateReq): Observable<CsCreateUserResponse>;
|
|
13
|
+
notificationDelete(request: CsNotificationDeleteReq): Observable<CsAttachForumResponse>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './def/notification-service-v2';
|
package/package.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aastrika_npmjs/sunbird-sdk",
|
|
3
|
+
"version": "5.1.1",
|
|
4
|
+
"description": "Heart of the sunbird mobile app.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"lint": "tslint --config ./tslint.json --project ./tsconfig.json",
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"test:coverage": "jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx}",
|
|
10
|
+
"test:ci": "jest --silent --ci --w 2 --collectCoverage=true --coverageReporters=lcov",
|
|
11
|
+
"test:ci-json": "jest --ci --w 2 --collectCoverage=true --coverageReporters=json",
|
|
12
|
+
"build:prod": "rm -rf dist && NODE_ENV=production webpack --verbose true --progress true --cache false --output-file index.js && cp ./package.json ./LICENSE ./README.md ./dist",
|
|
13
|
+
"build:analyze": "webpack --verbose true --progress true --cache false --profile --json > stats.json && npx webpack-bundle-analyzer ./stats.json",
|
|
14
|
+
"build:dev": "rm -rf tmp && mkdir tmp && cp ./package-dev.json ./tmp/package.json && tsc -w --outDir ./tmp"
|
|
15
|
+
},
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"crypto-js": "3.1.9-1",
|
|
20
|
+
"dayjs": "^1.8.20",
|
|
21
|
+
"inversify": "^5.1.1",
|
|
22
|
+
"jsonwebtoken": "^8.5.1",
|
|
23
|
+
"node-fetch": "2.6.7",
|
|
24
|
+
"pako": "^1.0.11",
|
|
25
|
+
"qs": "^6.9.7",
|
|
26
|
+
"reflect-metadata": "^0.1.13",
|
|
27
|
+
"typescript-collections": "^1.3.3",
|
|
28
|
+
"uuid": "^3.4.0",
|
|
29
|
+
"whatwg-fetch": "^3.6.2"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@project-sunbird/client-services": "3.6.x",
|
|
33
|
+
"rxjs": ">=6",
|
|
34
|
+
"cordova-plugin-advanced-http": "^2.0.2",
|
|
35
|
+
"cordova-plugin-file": "^6.0.1",
|
|
36
|
+
"cordova-plugin-awesome-shared-preferences": "^0.1.0",
|
|
37
|
+
"cordova-plugin-inappbrowser": "3.0.0",
|
|
38
|
+
"sb-cordova-plugin-customtabs": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs.git",
|
|
39
|
+
"sb-cordova-plugin-db": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git",
|
|
40
|
+
"jjdltc-cordova-plugin-zip": "git+https://github.com/swayangjit/jjdltc-cordova-plugin-zip.git",
|
|
41
|
+
"cordova-plugin-android-downloadmanager": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git",
|
|
42
|
+
"sb-cordova-plugin-utility": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@project-sunbird/client-services": "5.1.0",
|
|
46
|
+
"@types/jest": "^25.2.3",
|
|
47
|
+
"@types/node": "12.0.2",
|
|
48
|
+
"@types/node-fetch": "2.5.4",
|
|
49
|
+
"@types/pako": "^1.0.4",
|
|
50
|
+
"@types/websql": "0.0.27",
|
|
51
|
+
"cordova-plugin-android-downloadmanager": "git+https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git",
|
|
52
|
+
"jest": "^25.5.4",
|
|
53
|
+
"rxjs": "^6.6.7",
|
|
54
|
+
"ts-jest": "^25.5.1",
|
|
55
|
+
"ts-loader": "^8.2.0",
|
|
56
|
+
"ts-mockito": "^2.6.1",
|
|
57
|
+
"tsickle": "^0.27.2",
|
|
58
|
+
"tslib": "^1.14.1",
|
|
59
|
+
"tslint": "^5.20.1",
|
|
60
|
+
"typescript": "2.9.1",
|
|
61
|
+
"webpack": "^4.46.0",
|
|
62
|
+
"webpack-cli": "^3.3.12"
|
|
63
|
+
},
|
|
64
|
+
"browser": {
|
|
65
|
+
"crypto": false
|
|
66
|
+
},
|
|
67
|
+
"jest": {
|
|
68
|
+
"globals": {
|
|
69
|
+
"ts-jest": {
|
|
70
|
+
"tsConfig": "tsconfig.spec.json"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"browser": false,
|
|
74
|
+
"rootDir": "./",
|
|
75
|
+
"roots": [
|
|
76
|
+
"<rootDir>/src/"
|
|
77
|
+
],
|
|
78
|
+
"moduleDirectories": [
|
|
79
|
+
"node_modules"
|
|
80
|
+
],
|
|
81
|
+
"testPathIgnorePatterns": [
|
|
82
|
+
"/node_modules/"
|
|
83
|
+
],
|
|
84
|
+
"coveragePathIgnorePatterns": [
|
|
85
|
+
"<rootDir>/src/util/file/impl",
|
|
86
|
+
"<rootDir>/src/codepush-experiment",
|
|
87
|
+
"<rootDir>/src/util/shared-preferences/impl/shared-preferences-local-storage",
|
|
88
|
+
"<rootDir>/src/group-deprecated"
|
|
89
|
+
],
|
|
90
|
+
"testMatch": [
|
|
91
|
+
"**/?(*.)(spec).ts"
|
|
92
|
+
],
|
|
93
|
+
"restoreMocks": true,
|
|
94
|
+
"moduleFileExtensions": [
|
|
95
|
+
"js",
|
|
96
|
+
"jsx",
|
|
97
|
+
"json",
|
|
98
|
+
"ts",
|
|
99
|
+
"tsx"
|
|
100
|
+
],
|
|
101
|
+
"setupFiles": [
|
|
102
|
+
"./src/__test__/setup.ts",
|
|
103
|
+
"./src/__test__/cordova-mocks.js"
|
|
104
|
+
],
|
|
105
|
+
"transform": {
|
|
106
|
+
"^.+\\.(ts)$": "ts-jest"
|
|
107
|
+
},
|
|
108
|
+
"coverageReporters": [
|
|
109
|
+
"text",
|
|
110
|
+
"json"
|
|
111
|
+
],
|
|
112
|
+
"transformIgnorePatterns": []
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PageAssembleCriteria, SetPageAssembleChannelRequest } from './requests';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { PageAssemble } from './page-assemble';
|
|
4
|
+
export interface PageAssembleService {
|
|
5
|
+
setPageAssembleChannel(request: SetPageAssembleChannelRequest): void;
|
|
6
|
+
getPageAssemble(criteria: PageAssembleCriteria): Observable<PageAssemble>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CachedItemRequest } from '../../key-value-store';
|
|
2
|
+
export interface PageAssembleFilter {
|
|
3
|
+
subject?: Array<string>;
|
|
4
|
+
board?: Array<string>;
|
|
5
|
+
domain?: Array<string>;
|
|
6
|
+
medium?: Array<string>;
|
|
7
|
+
gradeLevel?: Array<string>;
|
|
8
|
+
language?: Array<string>;
|
|
9
|
+
concepts?: Array<string>;
|
|
10
|
+
contentType?: Array<string>;
|
|
11
|
+
primaryCategory?: Array<string>;
|
|
12
|
+
ageGroup?: Array<string>;
|
|
13
|
+
ownership?: Array<string>;
|
|
14
|
+
dialcodes?: string;
|
|
15
|
+
'batches.createdFor'?: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface PageAssembleProfile {
|
|
18
|
+
board: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface SetPageAssembleChannelRequest {
|
|
21
|
+
channelId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PageAssembleCriteria extends CachedItemRequest {
|
|
24
|
+
organisationId?: string;
|
|
25
|
+
name: PageName;
|
|
26
|
+
source?: 'app' | 'web';
|
|
27
|
+
mode?: 'soft' | 'hard';
|
|
28
|
+
filters?: PageAssembleFilter;
|
|
29
|
+
userProfile?: PageAssembleProfile;
|
|
30
|
+
sections?: {
|
|
31
|
+
[sectionId: string]: {
|
|
32
|
+
filters?: PageAssembleFilter;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export declare enum PageName {
|
|
37
|
+
RESOURCE = "Resource",
|
|
38
|
+
COURSE = "Course",
|
|
39
|
+
ANONYMOUS_COURSE = "AnonymousCourse",
|
|
40
|
+
DIAL_CODE = "DIAL Code Consumption"
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiRequestHandler } from '../../../api';
|
|
2
|
+
import { PageAssembleCriteria } from '../..';
|
|
3
|
+
import { PageAssemble } from '../..';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { DefaultRequestDelegate } from './default-request-delegate';
|
|
6
|
+
import { AuthService } from '../../../auth';
|
|
7
|
+
import { FrameworkService } from '../../../framework';
|
|
8
|
+
import { SystemSettingsService } from '../../../system-settings';
|
|
9
|
+
export declare class CourseRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
|
|
10
|
+
private defaultDelegate;
|
|
11
|
+
private authService;
|
|
12
|
+
private frameworkService;
|
|
13
|
+
private systemSettingsService;
|
|
14
|
+
private static readonly SSO_COURSE_SECTION_ID;
|
|
15
|
+
private ssoSectionIdMap;
|
|
16
|
+
constructor(defaultDelegate: DefaultRequestDelegate, authService: AuthService, frameworkService: FrameworkService, systemSettingsService: SystemSettingsService);
|
|
17
|
+
handle(request: PageAssembleCriteria): Observable<PageAssemble>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ApiRequestHandler, ApiService } from '../../../api';
|
|
2
|
+
import { PageAssembleCriteria, PageServiceConfig } from '../..';
|
|
3
|
+
import { PageAssemble } from '../../index';
|
|
4
|
+
import { CachedItemStore, KeyValueStore } from '../../../key-value-store';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { SharedPreferences } from '../../../util/shared-preferences';
|
|
7
|
+
import { AuthService } from '../../../auth';
|
|
8
|
+
import { ProfileService } from '../../../profile';
|
|
9
|
+
import { SystemSettingsService } from '../../../system-settings';
|
|
10
|
+
export declare class DefaultRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
|
|
11
|
+
private apiService;
|
|
12
|
+
private pageApiServiceConfig;
|
|
13
|
+
private sharedPreferences;
|
|
14
|
+
private cachedItemStore;
|
|
15
|
+
private keyValueStore;
|
|
16
|
+
private authService;
|
|
17
|
+
private profileService;
|
|
18
|
+
private systemSettingsService;
|
|
19
|
+
private readonly PAGE_ASSEMBLE_LOCAL_KEY;
|
|
20
|
+
private readonly PAGE_ASSEMBLE_ENDPOINT;
|
|
21
|
+
private readonly DIALCODE_ASSEMBLE_ENDPOINT;
|
|
22
|
+
private static readonly SYSTEM_SETTINGS_TENANT_COURSE_PAGE_ID;
|
|
23
|
+
private static getIdForDb;
|
|
24
|
+
constructor(apiService: ApiService, pageApiServiceConfig: PageServiceConfig, sharedPreferences: SharedPreferences, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, authService: AuthService, profileService: ProfileService, systemSettingsService: SystemSettingsService);
|
|
25
|
+
handle(request: PageAssembleCriteria): Observable<PageAssemble>;
|
|
26
|
+
private fetchFromServer;
|
|
27
|
+
private fetchFromCache;
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiRequestHandler } from '../../../api';
|
|
2
|
+
import { PageAssembleCriteria } from '../..';
|
|
3
|
+
import { PageAssemble } from '../..';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { DefaultRequestDelegate } from './default-request-delegate';
|
|
6
|
+
import { DbService } from '../../../db';
|
|
7
|
+
export declare class DialcodeRequestDelegate implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
|
|
8
|
+
private defaultDelegate;
|
|
9
|
+
private dbService;
|
|
10
|
+
constructor(defaultDelegate: DefaultRequestDelegate, dbService: DbService);
|
|
11
|
+
handle(request: PageAssembleCriteria): Observable<PageAssemble>;
|
|
12
|
+
private buildPageAssembleWithLocalContents;
|
|
13
|
+
private mergePageAssembleWithLocalContents;
|
|
14
|
+
private mergePageAssembleWithLocalCollections;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApiRequestHandler, ApiService } from '../../api';
|
|
2
|
+
import { PageAssemble, PageAssembleCriteria, PageServiceConfig } from '..';
|
|
3
|
+
import { CachedItemStore, KeyValueStore } from '../../key-value-store';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { SharedPreferences } from '../../util/shared-preferences';
|
|
6
|
+
import { AuthService } from '../../auth';
|
|
7
|
+
import { FrameworkService } from '../../framework';
|
|
8
|
+
import { SystemSettingsService } from '../../system-settings';
|
|
9
|
+
import { DbService } from '../../db';
|
|
10
|
+
import { ProfileService } from '../../profile';
|
|
11
|
+
export declare class PageAssemblerFactory implements ApiRequestHandler<PageAssembleCriteria, PageAssemble> {
|
|
12
|
+
private apiService;
|
|
13
|
+
private pageApiServiceConfig;
|
|
14
|
+
private cachedItemStore;
|
|
15
|
+
private keyValueStore;
|
|
16
|
+
private sharedPreferences;
|
|
17
|
+
private frameworkService;
|
|
18
|
+
private authService;
|
|
19
|
+
private systemSettingsService;
|
|
20
|
+
private dbService;
|
|
21
|
+
private profileService;
|
|
22
|
+
private readonly defaultRequestDelegate;
|
|
23
|
+
private readonly dialcodeRequestDelegate;
|
|
24
|
+
private readonly courseRequestDelegate;
|
|
25
|
+
constructor(apiService: ApiService, pageApiServiceConfig: PageServiceConfig, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences, frameworkService: FrameworkService, authService: AuthService, systemSettingsService: SystemSettingsService, dbService: DbService, profileService: ProfileService);
|
|
26
|
+
handle(request: PageAssembleCriteria): Observable<PageAssemble>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PageAssembleCriteria, PageAssembleService, SetPageAssembleChannelRequest } from '..';
|
|
2
|
+
import { PageAssemble } from '..';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { ApiService } from '../../api';
|
|
5
|
+
import { CachedItemStore, KeyValueStore } from '../../key-value-store';
|
|
6
|
+
import { SharedPreferences } from '../../util/shared-preferences';
|
|
7
|
+
import { SdkConfig } from '../../sdk-config';
|
|
8
|
+
import { FrameworkService } from '../../framework';
|
|
9
|
+
import { AuthService } from '../../auth';
|
|
10
|
+
import { ProfileService } from '../../profile';
|
|
11
|
+
import { SystemSettingsService } from '../../system-settings';
|
|
12
|
+
import { DbService } from '../../db';
|
|
13
|
+
export declare class PageAssembleServiceImpl implements PageAssembleService {
|
|
14
|
+
private apiService;
|
|
15
|
+
private sdkConfig;
|
|
16
|
+
private cachedItemStore;
|
|
17
|
+
private keyValueStore;
|
|
18
|
+
private sharedPreferences;
|
|
19
|
+
private frameworkService;
|
|
20
|
+
private authService;
|
|
21
|
+
private systemSettingsService;
|
|
22
|
+
private dbService;
|
|
23
|
+
private profileService;
|
|
24
|
+
private pageAssembleServiceConfig;
|
|
25
|
+
constructor(apiService: ApiService, sdkConfig: SdkConfig, cachedItemStore: CachedItemStore, keyValueStore: KeyValueStore, sharedPreferences: SharedPreferences, frameworkService: FrameworkService, authService: AuthService, systemSettingsService: SystemSettingsService, dbService: DbService, profileService: ProfileService);
|
|
26
|
+
setPageAssembleChannel(request: SetPageAssembleChannelRequest): void;
|
|
27
|
+
getPageAssemble(criteria: PageAssembleCriteria): Observable<PageAssemble>;
|
|
28
|
+
}
|
package/page/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare namespace PartnerEntry {
|
|
2
|
+
const _ID = "_id";
|
|
3
|
+
const TABLE_NAME = "partners";
|
|
4
|
+
const COLUMN_NAME_PARTNER_ID = "partnerID";
|
|
5
|
+
const COLUMN_NAME_KEY = "publicKey";
|
|
6
|
+
const COLUMN_NAME_KEY_ID = "publicKeyID";
|
|
7
|
+
const getCreateEntry: (() => string);
|
|
8
|
+
const getDeleteEntry: (() => string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare namespace PlayerConfigEntry {
|
|
2
|
+
const TABLE_NAME = "player_data";
|
|
3
|
+
const _ID = "_id";
|
|
4
|
+
const COLUMN_NAME_USER_ID = "user_id";
|
|
5
|
+
const COLUMN_PARENT_IDENTIFIER = "parent_identifier";
|
|
6
|
+
const COLUMN_IDENTIFIER = "identifier";
|
|
7
|
+
const COLUMN_PLAYER_CONFIG = "player_config";
|
|
8
|
+
interface SchemaMap {
|
|
9
|
+
[COLUMN_NAME_USER_ID]: string;
|
|
10
|
+
[COLUMN_PARENT_IDENTIFIER]: string;
|
|
11
|
+
[COLUMN_IDENTIFIER]: string;
|
|
12
|
+
[COLUMN_PLAYER_CONFIG]: string;
|
|
13
|
+
}
|
|
14
|
+
const getCreateEntry: (() => string);
|
|
15
|
+
const deleteTable: (() => string);
|
|
16
|
+
const getAlterEntryForPlayerConfig: (() => string);
|
|
17
|
+
}
|
|
18
|
+
export interface PlayerSaveState {
|
|
19
|
+
userId: string;
|
|
20
|
+
parentId: string;
|
|
21
|
+
contentId: string;
|
|
22
|
+
saveState: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class PlayerDbEntryMapper {
|
|
25
|
+
static mapPlayerDbEntryToPlayer(playerEntry: PlayerConfigEntry.SchemaMap): PlayerSaveState;
|
|
26
|
+
static mapPlayerStateToPlayerDbEntry(userId: string, parentId: string, contentId: string, saveState: string): PlayerConfigEntry.SchemaMap;
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Content } from '../../content';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { PlayerInput } from './response';
|
|
4
|
+
export interface PlayerService {
|
|
5
|
+
getPlayerConfig(content: Content, extraInfo: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}): Observable<PlayerInput>;
|
|
8
|
+
savePlayerState(userId: string, parentId: string, identifier: string, saveState: string): any;
|
|
9
|
+
deletePlayerSaveState(userId: string, parentId: string, contentId: string): any;
|
|
10
|
+
}
|