@jeraldj/client-services 8.1.4
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 +330 -0
- package/__test__/setup.d.ts +2 -0
- package/blocs/group-addable/cs-group-addable-bloc.d.ts +20 -0
- package/blocs/index.d.ts +1 -0
- package/blocs/index.js +2 -0
- package/blocs/index.js.LICENSE.txt +14 -0
- package/core/cs-client-storage.d.ts +5 -0
- package/core/cs-error.d.ts +5 -0
- package/core/http-service/errors/cs-http-client-error.d.ts +8 -0
- package/core/http-service/errors/cs-http-server-error.d.ts +8 -0
- package/core/http-service/errors/cs-network-error.d.ts +6 -0
- package/core/http-service/errors/cs-request-builder-error.d.ts +4 -0
- package/core/http-service/errors/index.d.ts +5 -0
- package/core/http-service/implementation/http-client-adapters/http-client-browser-adapter.d.ts +20 -0
- package/core/http-service/implementation/http-client-adapters/http-client-cordova-adapter.d.ts +21 -0
- package/core/http-service/implementation/http-client-adapters/http-client.d.ts +14 -0
- package/core/http-service/implementation/http-service-impl.d.ts +36 -0
- package/core/http-service/implementation/interceptors/bearer-token-inject-request-interceptor.d.ts +8 -0
- package/core/http-service/implementation/interceptors/user-token-inject-request-interceptor.d.ts +8 -0
- package/core/http-service/index.d.ts +2 -0
- package/core/http-service/index.js +1 -0
- package/core/http-service/interface/cs-http-interceptor.d.ts +4 -0
- package/core/http-service/interface/cs-http-service.d.ts +11 -0
- package/core/http-service/interface/cs-request-interceptor.d.ts +5 -0
- package/core/http-service/interface/cs-request.d.ts +77 -0
- package/core/http-service/interface/cs-response-interceptor.d.ts +6 -0
- package/core/http-service/interface/cs-response.d.ts +23 -0
- package/core/http-service/interface/index.d.ts +6 -0
- package/core/http-service/utilities/interceptors/cs-request-logger-interceptor.d.ts +6 -0
- package/core/http-service/utilities/interceptors/cs-response-logger-Interceptor.d.ts +7 -0
- package/core/http-service/utilities/interceptors/index.d.ts +2 -0
- package/core/http-service/utilities/interceptors/index.js +2 -0
- package/core/http-service/utilities/interceptors/index.js.LICENSE.txt +14 -0
- package/core/index.d.ts +2 -0
- package/core/index.js +1 -0
- package/cs-module.d.ts +124 -0
- package/index.d.ts +3 -0
- package/index.js +2 -0
- package/index.js.LICENSE.txt +60 -0
- package/injection-tokens.d.ts +76 -0
- package/models/certificate/index.d.ts +68 -0
- package/models/channel/index.d.ts +57 -0
- package/models/channel/index.js +1 -0
- package/models/content/index.d.ts +122 -0
- package/models/content/index.js +1 -0
- package/models/course/index.d.ts +68 -0
- package/models/course/index.js +1 -0
- package/models/device/index.d.ts +10 -0
- package/models/device/index.js +1 -0
- package/models/faq/index.d.ts +7 -0
- package/models/faq/index.js +1 -0
- package/models/form/index.d.ts +15 -0
- package/models/form/index.js +1 -0
- package/models/group/index.d.ts +96 -0
- package/models/group/index.js +1 -0
- package/models/index.d.ts +12 -0
- package/models/index.js +1 -0
- package/models/location/index.d.ts +6 -0
- package/models/location/index.js +1 -0
- package/models/notification/index.d.ts +33 -0
- package/models/organisation/index.d.ts +17 -0
- package/models/organisation/index.js +1 -0
- package/models/page/index.d.ts +23 -0
- package/models/page/index.js +1 -0
- package/models/user/index.d.ts +109 -0
- package/models/user/index.js +1 -0
- package/package.json +100 -0
- package/services/certificate/implementation/certificate-service-impl.d.ts +29 -0
- package/services/certificate/index.d.ts +1 -0
- package/services/certificate/interface/cs-certificate-service.d.ts +81 -0
- package/services/certificate/interface/index.d.ts +1 -0
- package/services/content/implementation/content-service-impl.d.ts +13 -0
- package/services/content/index.d.ts +1 -0
- package/services/content/index.js +1 -0
- package/services/content/interface/cs-content-filter-criteria.d.ts +11 -0
- package/services/content/interface/cs-content-mime-type.d.ts +17 -0
- package/services/content/interface/cs-content-service.d.ts +13 -0
- package/services/content/interface/cs-content-sort-criteria.d.ts +17 -0
- package/services/content/interface/cs-content-type.d.ts +35 -0
- package/services/content/interface/cs-primary-category.d.ts +17 -0
- package/services/content/interface/cs-resource-type.d.ts +10 -0
- package/services/content/interface/index.d.ts +7 -0
- package/services/content/utilities/content-group-generator/cs-contents-group-generator.d.ts +44 -0
- package/services/content/utilities/content-group-generator/index.d.ts +1 -0
- package/services/content/utilities/content-group-generator/index.js +1 -0
- package/services/content/utilities/content-progress-calculator/cs-content-progress-calculator.d.ts +8 -0
- package/services/content/utilities/content-progress-calculator/index.d.ts +1 -0
- package/services/content/utilities/content-progress-calculator/index.js +1 -0
- package/services/content/utilities/mime-type-facet-to-mime-type-category-aggregator/cs-mime-type-facet-to-mime-type-category-aggregator.d.ts +15 -0
- package/services/content/utilities/mime-type-facet-to-mime-type-category-aggregator/index.d.ts +1 -0
- package/services/content/utilities/mime-type-facet-to-mime-type-category-aggregator/index.js +1 -0
- package/services/content/utilities/primary-category-mapper/cs-primary-category-mapper.d.ts +5 -0
- package/services/content/utilities/primary-category-mapper/index.d.ts +1 -0
- package/services/content/utilities/primary-category-mapper/index.js +1 -0
- package/services/course/implementation/course-service-impl.d.ts +15 -0
- package/services/course/index.d.ts +1 -0
- package/services/course/index.js +1 -0
- package/services/course/interface/cs-course-service.d.ts +68 -0
- package/services/course/interface/index.d.ts +1 -0
- package/services/discussion/implementation/discussion-service-impl.d.ts +108 -0
- package/services/discussion/index.d.ts +1 -0
- package/services/discussion/interface/cs-discussion-service.d.ts +82 -0
- package/services/discussion/interface/index.d.ts +1 -0
- package/services/form/implementation/form-service-impl.d.ts +11 -0
- package/services/form/index.d.ts +0 -0
- package/services/form/interface/cs-form-service.d.ts +14 -0
- package/services/framework/implementation/cs-framework-config-bloc.d.ts +11 -0
- package/services/framework/implementation/framework-service-impl.d.ts +21 -0
- package/services/framework/index.d.ts +1 -0
- package/services/framework/index.js +1 -0
- package/services/framework/interface/cs-framework-service.d.ts +21 -0
- package/services/framework/interface/index.d.ts +1 -0
- package/services/group/activity/implementation/group-activity-service-impl.d.ts +16 -0
- package/services/group/activity/index.d.ts +1 -0
- package/services/group/activity/index.js +1 -0
- package/services/group/activity/interface/cs-group-activity-service.d.ts +38 -0
- package/services/group/activity/interface/index.d.ts +1 -0
- package/services/group/implementation/group-service-impl.d.ts +43 -0
- package/services/group/index.d.ts +1 -0
- package/services/group/index.js +1 -0
- package/services/group/interface/cs-group-service.d.ts +175 -0
- package/services/group/interface/index.d.ts +1 -0
- package/services/location/implementation/location-service-impl.d.ts +11 -0
- package/services/location/index.d.ts +1 -0
- package/services/location/index.js +1 -0
- package/services/location/interface/cs-location-service.d.ts +16 -0
- package/services/location/interface/index.d.ts +1 -0
- package/services/notification/implementation/notification-service-impl.d.ts +12 -0
- package/services/notification/index.d.ts +1 -0
- package/services/notification/interface/cs-notification-service.d.ts +22 -0
- package/services/notification/interface/index.d.ts +1 -0
- package/services/system-settings/implementation/system-settings-service-impl.d.ts +10 -0
- package/services/system-settings/index.d.ts +1 -0
- package/services/system-settings/index.js +1 -0
- package/services/system-settings/interface/cs-system-settings-service.d.ts +5 -0
- package/services/system-settings/interface/index.d.ts +1 -0
- package/services/user/implementation/user-service-impl.d.ts +25 -0
- package/services/user/index.d.ts +1 -0
- package/services/user/index.js +1 -0
- package/services/user/interface/cs-user-service.d.ts +83 -0
- package/services/user/interface/index.d.ts +1 -0
- package/telemetry/cs-telemetry-module.d.ts +30 -0
- package/telemetry/errors/cs-telemetry-validation-error.d.ts +6 -0
- package/telemetry/errors/index.d.ts +1 -0
- package/telemetry/implementation/pdf-player-telemetry-service-impl.d.ts +6 -0
- package/telemetry/implementation/player-telemetry-service-impl.d.ts +9 -0
- package/telemetry/implementation/telemetry-service-Impl.d.ts +38 -0
- package/telemetry/index.d.ts +4 -0
- package/telemetry/index.js +2 -0
- package/telemetry/index.js.LICENSE.txt +14 -0
- package/telemetry/injection-tokens.d.ts +9 -0
- package/telemetry/interface/cs-player-telemetry-service.d.ts +6 -0
- package/telemetry/interface/cs-telemetry-request.d.ts +69 -0
- package/telemetry/interface/cs-telemetry-service.d.ts +27 -0
- package/telemetry/interface/index.d.ts +3 -0
- package/utilities/aggregator/aggregator.d.ts +23 -0
- package/utilities/aggregator/index.d.ts +1 -0
- package/utilities/aggregator/index.js +1 -0
- package/utilities/certificate/certificate-verifier.d.ts +11 -0
- package/utilities/certificate/credentials.d.ts +343 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(r,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:r)[o]=n[o]}}(window,function(){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function r(){return e.default}:function r(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=221)}({221:function(e,r,t){"use strict";t.r(r),t.d(r,"CsContentsGroupGenerator",function(){return i});var n=t(71),o=function(){return o=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},o.apply(this,arguments)},i=function(){function e(){}return e.generate=function(r){var t=r.contents,n=r.groupBy,i=r.groupSortBy,u=void 0===i?[]:i,f=r.groupFilterBy,a=void 0===f?[]:f,c=r.sortBy,s=void 0===c?[]:c,l=r.filterBy,p=void 0===l?[]:l,d=r.combination,g=r.includeSearchable,v=r.prioritiseTargetedContents,y;if(t=e.filterItems(t,Array.isArray(p)?p:[p]),t=e.sortItems(t,Array.isArray(s)?s:[s]),d){y={};for(var b=0,h=Object.keys(d);b<h.length;b++){var O=h[b];if(d[O])for(var m=0,A=d[O]||[];m<A.length;m++){var C=A[m];if(!y[O]){var x=t.length,j=e.filterContentsByAttribute(t,O,C),w=j.length;w&&w<=x&&(y[O]=C,t=j)}}}}var M=[];if(v){var S=v.sourceFramework,B=v.categories;M=t.filter(function(r){return Object.keys(S).filter(function(e){return!B||B.indexOf(e)>-1}).some(function(t){if(!S[t]||!S[t].length)return!1;var n=function(){var r=S[t];return r?e.isMultiValueAttribute(S,t)?r:[r]:[]}(),o;return!(e.isMultiValueAttribute(r,t)?r[t]:[r[t]]).some(function(e){return n.indexOf(e)>-1})})}),M&&M.length&&(t=t.sort(function(e,r){return e===r?0:M.indexOf(e)>1&&-1===M.indexOf(r)?-1:1}))}var I=Array.from(t.reduce(function(r,t){var o=n,i="se_"+n+"s";if(g&&i in t&&t[i]&&(o=i),e.isMultiValueAttribute(t,o))t[o].forEach(function(e){var n=r.get(e)||[];n.push(t),r.set(e,n)});else{var u=String(t[o]||"Other"),f=r.get(u)||[];f.push(t),r.set(u,f)}return r},new Map).entries()).map(function(e){var r=e[0],t=e[1],n=t.filter(function(e){return M.indexOf(e)>-1});return o({name:r,count:t.length,contents:t},n&&n.length?{targetedContents:n}:{})});return I=e.filterItems(I,Array.isArray(a)?a:[a]),I=e.sortItems(I,Array.isArray(u)?u:[u]),v&&(I=I.sort(function(e,r){return!e.targetedContents||!e.targetedContents.length||r.targetedContents&&r.targetedContents.length?e.targetedContents&&e.targetedContents.length||!r.targetedContents||!r.targetedContents.length?0:1:-1})),{name:n,sections:I,combination:y}},e.filterContentsByAttribute=function(r,t,n){return r.filter(function(r){return e.isMultiValueAttribute(r,t)?r[t].map(function(e){return(e||"").toLowerCase()}).includes((n||"").toLowerCase()):(n||"").toLowerCase()===(r[t]||"").toLowerCase()})},e.sortItems=function(e,r){return n.Aggregator.sorted(e,r.map(function(e){var r;return(r={})[e.sortAttribute]=e.sortOrder,r}))},e.filterItems=function(e,r){return n.Aggregator.filtered(e,r.map(function(e){var r;return(r={})[e.filterAttribute]={operation:e.filterCondition.operation,value:e.filterCondition.value},r}))},e.isMultiValueAttribute=function(e,r){return Array.isArray(e[r])},e}()},71:function(e,r,t){"use strict";t.r(r),t.d(r,"Aggregator",function(){return i});var n=function(){return n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},n.apply(this,arguments)},o=function(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var n=Array(e),o=0,r=0;r<t;r++)for(var i=arguments[r],u=0,f=i.length;u<f;u++,o++)n[o]=i[u];return n},i=function(){function e(){}return e.groupByIntoMap=function(r,t){return r.reduce(function(r,i){var u,f=String(e.deepGet(i,String(t).split(".")));return n(n({},r),((u={})[f]=o(r[f]||[],[i]),u))},{})},e.groupByIntoPairList=function(r,t){var n=e.groupByIntoMap(r,t);return Object.keys(n).map(function(e){return[e,n[e]]})},e.sorted=function(r,t,n){return r.sort(function(r,o){for(var i=0,u=0,f=t;u<f.length;u++){var a=f[u];for(var c in a)if(c in a){var s=e.deepGet(r,c.split(".")).toLowerCase(),l=e.deepGet(o,c.split(".")).toLowerCase();if(i=n?n(s,l):String(s).localeCompare(l),"asc"===a[c]||"desc"===a[c])i="asc"===a[c]?i:-i;else{var p=a[c];if(p.preference){for(var d=0;d<p.preference.length;d++)"string"==typeof p.preference[d]&&(p.preference[d]=p.preference[d].toLowerCase());p.preference.indexOf(s)>-1&&p.preference.indexOf(l)>-1?i=p.preference.indexOf(s)-p.preference.indexOf(l):p.preference.indexOf(s)>-1&&-1===p.preference.indexOf(l)?i=-1:p.preference.indexOf(l)>-1&&-1===p.preference.indexOf(s)&&(i=1)}i="asc"===p.order?i:-i}}if(0!==i)break}return i})},e.filtered=function(r,t){return r.filter(function(r){for(var n=!0,o=0,i=t;o<i.length;o++){var u=i[o];if(!n)break;for(var f in u)if(f in u){var a=e.deepGet(r,f.split(".")),c=u[f],s=c.operation,l=c.value;switch(s){case"==":n=a===l;break;case"<=":case">=":n=a<=l;break;case"!=":n=a!==l}}}return n})},e.deepGet=function(e,r){return r.reduce(function(e,r){return e&&e[r]?e[r]:null},e)},e}()}})});
|
package/services/content/utilities/content-progress-calculator/cs-content-progress-calculator.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CsMimeType } from '../../interface';
|
|
2
|
+
export declare class CsContentProgressCalculator {
|
|
3
|
+
private static PLAYBACK_MIME_TYPES;
|
|
4
|
+
private static OTHER_MIME_TYPES;
|
|
5
|
+
static calculate(summary: any[], mimeType: CsMimeType): number;
|
|
6
|
+
private static calculatePlaybackProgress;
|
|
7
|
+
private static absoluteProgress;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-content-progress-calculator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:n)[o]=r[o]}}(window,function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function n(){return e.default}:function n(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=222)}({1:function(e,n,t){"use strict";t.r(n);var r=t(39);t.d(n,"CsSortOrder",function(){return r.a});var o=t(40),i=t.n(o);for(var a in o)["default","CsSortOrder"].indexOf(a)<0&&function(e){t.d(n,e,function(){return o[e]})}(a);var u=t(41);t.d(n,"CsMimeType",function(){return u.a});var c=t(42);t.d(n,"CsContentType",function(){return c.a});var s=t(43);t.d(n,"CsPrimaryCategory",function(){return s.a});var E=t(44);t.d(n,"CsResourceType",function(){return E.a});var T=t(45),f=t.n(T);for(var a in T)["default","CsSortOrder","CsMimeType","CsContentType","CsPrimaryCategory","CsResourceType"].indexOf(a)<0&&function(e){t.d(n,e,function(){return T[e]})}(a)},222:function(e,n,t){"use strict";t.r(n),t.d(n,"CsContentProgressCalculator",function(){return o});var r=t(1),o=function(){function e(){}return e.calculate=function(n,t){var r=n.reduce(function(e,n){return Object.keys(n).forEach(function(t){e[t]=n[t]}),e},{});return r.progress?e.PLAYBACK_MIME_TYPES.indexOf(t)>-1?e.calculatePlaybackProgress(r.progress||0,r.visitedlength||0,r.totallength||0,r.endpageseen||!1,r.visitedcontentend||!1):e.OTHER_MIME_TYPES.indexOf(t)>-1?e.absoluteProgress(r.progress,0):e.absoluteProgress(r.progress,100):0},e.calculatePlaybackProgress=function(e,n,t,r,o){var i;return i=r||o||(t&&100*n/t)>20?100:e},e.absoluteProgress=function(e,n){return e>=n?100:0},e.PLAYBACK_MIME_TYPES=[r.CsMimeType.YOUTUBE,r.CsMimeType.VIDEO,r.CsMimeType.WEBM,r.CsMimeType.PDF,r.CsMimeType.EPUB],e.OTHER_MIME_TYPES=[r.CsMimeType.H5P,r.CsMimeType.HTML],e}()},39:function(e,n,t){"use strict";var r;t.d(n,"a",function(){return r}),function(e){e.ASC="asc",e.DESC="desc"}(r||(r={}))},40:function(e,n){},41:function(e,n,t){"use strict";var r;t.d(n,"a",function(){return r}),function(e){e.APK="application/vnd.android.package-archive",e.ECML="application/vnd.ekstep.ecml-archive",e.HTML="application/vnd.ekstep.html-archive",e.COLLECTION="application/vnd.ekstep.content-collection",e.H5P="application/vnd.ekstep.h5p-archive",e.VIDEO="video/mp4",e.YOUTUBE="video/x-youtube",e.WEBM="video/webm",e.PDF="application/pdf",e.EPUB="application/epub",e.ZIP="application/zip",e.TXT="text/plain",e.TXT_X_URL="text/x-url",e.ECAR="application/ecar",e.EPAR="application/epar"}(r||(r={}))},42:function(e,n,t){"use strict";var r;t.d(n,"a",function(){return r}),function(e){e.ASSET="Asset",e.CLASSROOM_TEACHING_VIDEO="ClassroomTeachingVideo",e.CONCEPT_MAP="ConceptMap",e.COURSE="Course",e.COURSE_UNIT="CourseUnit",e.CURIOSITY_QUESTION_SET="CuriosityQuestionSet",e.E_TEXTBOOK="eTextBook",e.EXPERIENTIAL_RESOURCE="ExperientialResource",e.EXPLANATION_RESOURCE="ExplanationResource",e.EXPLANATION_VIDEO="Explanation Video",e.FOCUS_SPOT="FocusSpot",e.LEARNING_OUTCOME_DEFINITION="LearningOutcomeDefinition",e.LESSON_PLAN_UNIT="LessonPlanUnit",e.MARKING_SCHEME_RUBRIC="MarkingSchemeRubric",e.ONBOARDING_RESOURCE="OnboardingResource",e.PEDAGOGY_FLOW="PedagogyFlow",e.PLUGIN="Plugin",e.PRACTICE_QUESTION_SET="PracticeQuestionSet",e.PRACTICE_RESOURCE="PracticeResource",e.READING_MATERIAL="ReadingMaterial",e.SELF_ASSESS="SelfAssess",e.TEACHING_METHOD="TeachingMethod",e.TEMPLATE="Template",e.TEXTBOOK="TextBook",e.TEXTBOOK_UNIT="TextBookUnit",e.COLLECTION="Collection",e.EXPLANATION_READING_MATERIAL="ExplanationReadingMaterial",e.LEARNING_ACTIVITY="LearningActivity",e.LESSON_PLAN="LessonPlan",e.LESSON_PLAN_RESOURCE="LessonPlanResource",e.PREVIOUS_BOARD_EXAM_PAPERS="PreviousBoardExamPapers",e.TV_LESSION="TVLesson",e.RESOURCE="Resource"}(r||(r={}))},43:function(e,n,t){"use strict";var r;t.d(n,"a",function(){return r}),function(e){e.ASSET="Asset",e.CONTENT_PLAYLIST="Content PlayList",e.COURSE="Course",e.COURSE_ASSESSMENT="Course Assessment",e.COURSE_UNIT="Course Unit",e.DIGITAL_TEXTBOOK="Digital Textbook",e.E_TEXTBOOK="eTextbook",e.EXPLANATION_CONTENT="Explanation Content",e.LEARNING_RESOURCE="Learning Resource",e.LESSON_PLAN_UNIT="Lesson Plan Unit",e.PLUGIN="Plugin",e.PRACTICE_QUESTION_SET="Practice Question Set",e.TEACHER_RESOURCE="Teacher Resource",e.TEMPLATE="Template",e.TEXTBOOK_UNIT="Textbook Unit"}(r||(r={}))},44:function(e,n,t){"use strict";var r;t.d(n,"a",function(){return r}),function(e){e.EXPERIMENT="Experiment",e.LESSON_PLAN="LessonPlan",e.LEARN="Learn",e.PLAY="Play",e.PRACTICE="Practice",e.READ="Read",e.TEACH="Teach",e.TEST="Test"}(r||(r={}))},45:function(e,n){}})});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContentMimeType, MimeTypeCategory } from '../../../../models/content';
|
|
2
|
+
export interface MimeTypeFacet {
|
|
3
|
+
name: ContentMimeType;
|
|
4
|
+
count: number;
|
|
5
|
+
apply?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MimeTypeCategoryAggregation {
|
|
8
|
+
name: MimeTypeCategory;
|
|
9
|
+
count: number;
|
|
10
|
+
values: MimeTypeFacet[];
|
|
11
|
+
apply?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class CsMimeTypeFacetToMimeTypeCategoryAggregator {
|
|
14
|
+
static aggregate(mimeTypeFacets: MimeTypeFacet[], exclude?: MimeTypeCategory[]): MimeTypeCategoryAggregation[];
|
|
15
|
+
}
|
package/services/content/utilities/mime-type-facet-to-mime-type-category-aggregator/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-mime-type-facet-to-mime-type-category-aggregator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var i=n();for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(window,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=223)}({223:function(e,t,n){"use strict";n.r(t),n.d(t,"CsMimeTypeFacetToMimeTypeCategoryAggregator",function(){return a});var i=n(38),o=function(){return o=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},a=function(){function e(){}return e.aggregate=function(e,t){void 0===t&&(t=[]);var n=e.reduce(function(e,n){for(var o in i.MimeTypeCategory)!(o in i.MimeTypeCategory)||t.indexOf(o)>=0||(i.MimeTypeCategoryMapping[o]||[]).includes(n.name)&&(e[o]?(e[o].count=e[o].count+n.count,e[o].values=e[o].values.concat(n),void 0!==n.apply&&(void 0!==e[o].apply?e[o].apply=e[o].apply||n.apply:e[o].apply=n.apply)):void 0!==n.apply?e[o]={count:n.count,values:[n],apply:n.apply}:e[o]={count:n.count,values:[n]});return e},{});return Object.keys(n).map(function(e){return o({name:e},n[e])})},e}()},38:function(e,t,n){"use strict";var i,o,a,p;n.r(t),n.d(t,"TrackingEnabled",function(){return i}),n.d(t,"AutoBatch",function(){return o}),n.d(t,"UserConsent",function(){return a}),n.d(t,"MimeTypeCategory",function(){return p}),n.d(t,"MimeTypeCategoryMapping",function(){return r}),function(e){e.YES="Yes",e.NO="No"}(i||(i={})),function(e){e.YES="Yes",e.NO="No"}(o||(o={})),function(e){e.YES="Yes",e.NO="No"}(a||(a={})),function(e){e.VIDEO="VIDEO",e.AUDIO="AUDIO",e.INTERACTION="INTERACTION",e.DOC="DOC",e.ALL="ALL"}(p||(p={}));var r=function(){function e(){}var t,n,i,o,a;return t=p.VIDEO,n=p.AUDIO,i=p.INTERACTION,o=p.DOC,a=p.ALL,e[t]=["video/avi","video/mpeg","video/quicktime","video/3gpp","video/mpeg","video/mp4","video/ogg","video/webm","video/x-youtube"],e[n]=["audio/mp3","audio/mp4","audio/mpeg","audio/ogg","audio/webm","audio/x-wav","audio/wav"],e[i]=["application/vnd.ekstep.ecml-archive","application/vnd.ekstep.html-archive","application/vnd.ekstep.content-archive","application/vnd.ekstep.h5p-archive"],e[o]=["application/pdf","application/epub","application/msword"],e[a]=["application/vnd.ekstep.ecml-archive","application/vnd.ekstep.html-archive","application/vnd.android.package-archive","application/vnd.ekstep.content-archive","application/vnd.ekstep.content-collection","application/vnd.ekstep.plugin-archive","application/vnd.ekstep.h5p-archive","application/epub","text/x-url","video/x-youtube","application/octet-stream","application/msword","application/pdf","image/jpeg","image/jpg","image/png","image/tiff","image/bmp","image/gif","image/svg+xml","video/avi","video/mpeg","video/quicktime","video/3gpp","video/mpeg","video/mp4","video/ogg","video/webm","audio/mp3","audio/mp4","audio/mpeg","audio/ogg","audio/webm","audio/x-wav","audio/wav"],e}()}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-primary-category-mapper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var C=r();for(var o in C)("object"==typeof exports?exports:t)[o]=C[o]}}(window,function(){return function(e){var t={};function r(C){if(t[C])return t[C].exports;var o=t[C]={i:C,l:!1,exports:{}};return e[C].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,C){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:C})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var C=Object.create(null);if(r.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(C,o,function(t){return e[t]}.bind(null,o));return C},r.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=224)}({1:function(e,t,r){"use strict";r.r(t);var C=r(39);r.d(t,"CsSortOrder",function(){return C.a});var o=r(40),n=r.n(o);for(var E in o)["default","CsSortOrder"].indexOf(E)<0&&function(e){r.d(t,e,function(){return o[e]})}(E);var a=r(41);r.d(t,"CsMimeType",function(){return a.a});var s=r(42);r.d(t,"CsContentType",function(){return s.a});var T=r(43);r.d(t,"CsPrimaryCategory",function(){return T.a});var i=r(44);r.d(t,"CsResourceType",function(){return i.a});var R=r(45),O=r.n(R);for(var E in R)["default","CsSortOrder","CsMimeType","CsContentType","CsPrimaryCategory","CsResourceType"].indexOf(E)<0&&function(e){r.d(t,e,function(){return R[e]})}(E)},224:function(e,t,r){"use strict";r.r(t),r.d(t,"CsPrimaryCategoryMapper",function(){return n});var C=r(1),o,n=function(){function e(){}return e.getPrimaryCategory=function(t,r,o){if(t&&t.toLowerCase()===C.CsContentType.RESOURCE.toLowerCase())switch(r){case C.CsMimeType.VIDEO:case C.CsMimeType.YOUTUBE:case C.CsMimeType.WEBM:return C.CsPrimaryCategory.EXPLANATION_CONTENT;case C.CsMimeType.H5P:case C.CsMimeType.HTML:case C.CsMimeType.APK:return C.CsPrimaryCategory.LEARNING_RESOURCE;case C.CsMimeType.EPUB:case C.CsMimeType.PDF:case C.CsMimeType.ECML:case C.CsMimeType.TXT_X_URL:return e.getResourcePrimaryCategory(o);default:return C.CsPrimaryCategory.LEARNING_RESOURCE}return e.CATEGORY_MAP[t]||t},e.getResourcePrimaryCategory=function(e){switch(e){case C.CsResourceType.EXPERIMENT:case C.CsResourceType.LEARN:case C.CsResourceType.PLAY:case C.CsResourceType.PRACTICE:case C.CsResourceType.READ:case C.CsResourceType.TEST:return C.CsPrimaryCategory.LEARNING_RESOURCE;case C.CsResourceType.LESSON_PLAN:case C.CsResourceType.TEACH:return C.CsPrimaryCategory.TEACHER_RESOURCE;default:return C.CsPrimaryCategory.LEARNING_RESOURCE}},e.CATEGORY_MAP=((o={})[C.CsContentType.ASSET.toLowerCase()]=C.CsPrimaryCategory.ASSET,o[C.CsContentType.CLASSROOM_TEACHING_VIDEO.toLowerCase()]=C.CsPrimaryCategory.EXPLANATION_CONTENT,o[C.CsContentType.CONCEPT_MAP.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.COURSE.toLowerCase()]=C.CsPrimaryCategory.COURSE,o[C.CsContentType.COURSE_UNIT.toLowerCase()]=C.CsPrimaryCategory.COURSE_UNIT,o[C.CsContentType.CURIOSITY_QUESTION_SET.toLowerCase()]=C.CsPrimaryCategory.PRACTICE_QUESTION_SET,o[C.CsContentType.E_TEXTBOOK.toLowerCase()]=C.CsPrimaryCategory.E_TEXTBOOK,o[C.CsContentType.EXPERIENTIAL_RESOURCE.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.EXPLANATION_RESOURCE.toLowerCase()]=C.CsPrimaryCategory.EXPLANATION_CONTENT,o[C.CsContentType.EXPLANATION_VIDEO.toLowerCase()]=C.CsPrimaryCategory.EXPLANATION_CONTENT,o[C.CsContentType.FOCUS_SPOT.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.LEARNING_OUTCOME_DEFINITION.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.MARKING_SCHEME_RUBRIC.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.ONBOARDING_RESOURCE.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.PEDAGOGY_FLOW.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.PRACTICE_QUESTION_SET.toLowerCase()]=C.CsPrimaryCategory.PRACTICE_QUESTION_SET,o[C.CsContentType.PRACTICE_RESOURCE.toLowerCase()]=C.CsPrimaryCategory.PRACTICE_QUESTION_SET,o[C.CsContentType.READING_MATERIAL.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.SELF_ASSESS.toLowerCase()]=C.CsPrimaryCategory.COURSE_ASSESSMENT,o[C.CsContentType.TEACHING_METHOD.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.PLUGIN.toLowerCase()]=C.CsPrimaryCategory.PLUGIN,o[C.CsContentType.TEXTBOOK.toLowerCase()]=C.CsPrimaryCategory.DIGITAL_TEXTBOOK,o[C.CsContentType.TEXTBOOK_UNIT.toLowerCase()]=C.CsPrimaryCategory.TEXTBOOK_UNIT,o[C.CsContentType.TEMPLATE.toLowerCase()]=C.CsPrimaryCategory.TEMPLATE,o[C.CsContentType.COLLECTION.toLowerCase()]=C.CsPrimaryCategory.CONTENT_PLAYLIST,o[C.CsContentType.EXPLANATION_READING_MATERIAL.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.LEARNING_ACTIVITY.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.LESSON_PLAN.toLowerCase()]=C.CsPrimaryCategory.CONTENT_PLAYLIST,o[C.CsContentType.LESSON_PLAN_RESOURCE.toLowerCase()]=C.CsPrimaryCategory.TEACHER_RESOURCE,o[C.CsContentType.LESSON_PLAN_UNIT.toLowerCase()]=C.CsPrimaryCategory.LESSON_PLAN_UNIT,o[C.CsContentType.PREVIOUS_BOARD_EXAM_PAPERS.toLowerCase()]=C.CsPrimaryCategory.LEARNING_RESOURCE,o[C.CsContentType.TV_LESSION.toLowerCase()]=C.CsPrimaryCategory.EXPLANATION_CONTENT,o),e}()},39:function(e,t,r){"use strict";var C;r.d(t,"a",function(){return C}),function(e){e.ASC="asc",e.DESC="desc"}(C||(C={}))},40:function(e,t){},41:function(e,t,r){"use strict";var C;r.d(t,"a",function(){return C}),function(e){e.APK="application/vnd.android.package-archive",e.ECML="application/vnd.ekstep.ecml-archive",e.HTML="application/vnd.ekstep.html-archive",e.COLLECTION="application/vnd.ekstep.content-collection",e.H5P="application/vnd.ekstep.h5p-archive",e.VIDEO="video/mp4",e.YOUTUBE="video/x-youtube",e.WEBM="video/webm",e.PDF="application/pdf",e.EPUB="application/epub",e.ZIP="application/zip",e.TXT="text/plain",e.TXT_X_URL="text/x-url",e.ECAR="application/ecar",e.EPAR="application/epar"}(C||(C={}))},42:function(e,t,r){"use strict";var C;r.d(t,"a",function(){return C}),function(e){e.ASSET="Asset",e.CLASSROOM_TEACHING_VIDEO="ClassroomTeachingVideo",e.CONCEPT_MAP="ConceptMap",e.COURSE="Course",e.COURSE_UNIT="CourseUnit",e.CURIOSITY_QUESTION_SET="CuriosityQuestionSet",e.E_TEXTBOOK="eTextBook",e.EXPERIENTIAL_RESOURCE="ExperientialResource",e.EXPLANATION_RESOURCE="ExplanationResource",e.EXPLANATION_VIDEO="Explanation Video",e.FOCUS_SPOT="FocusSpot",e.LEARNING_OUTCOME_DEFINITION="LearningOutcomeDefinition",e.LESSON_PLAN_UNIT="LessonPlanUnit",e.MARKING_SCHEME_RUBRIC="MarkingSchemeRubric",e.ONBOARDING_RESOURCE="OnboardingResource",e.PEDAGOGY_FLOW="PedagogyFlow",e.PLUGIN="Plugin",e.PRACTICE_QUESTION_SET="PracticeQuestionSet",e.PRACTICE_RESOURCE="PracticeResource",e.READING_MATERIAL="ReadingMaterial",e.SELF_ASSESS="SelfAssess",e.TEACHING_METHOD="TeachingMethod",e.TEMPLATE="Template",e.TEXTBOOK="TextBook",e.TEXTBOOK_UNIT="TextBookUnit",e.COLLECTION="Collection",e.EXPLANATION_READING_MATERIAL="ExplanationReadingMaterial",e.LEARNING_ACTIVITY="LearningActivity",e.LESSON_PLAN="LessonPlan",e.LESSON_PLAN_RESOURCE="LessonPlanResource",e.PREVIOUS_BOARD_EXAM_PAPERS="PreviousBoardExamPapers",e.TV_LESSION="TVLesson",e.RESOURCE="Resource"}(C||(C={}))},43:function(e,t,r){"use strict";var C;r.d(t,"a",function(){return C}),function(e){e.ASSET="Asset",e.CONTENT_PLAYLIST="Content PlayList",e.COURSE="Course",e.COURSE_ASSESSMENT="Course Assessment",e.COURSE_UNIT="Course Unit",e.DIGITAL_TEXTBOOK="Digital Textbook",e.E_TEXTBOOK="eTextbook",e.EXPLANATION_CONTENT="Explanation Content",e.LEARNING_RESOURCE="Learning Resource",e.LESSON_PLAN_UNIT="Lesson Plan Unit",e.PLUGIN="Plugin",e.PRACTICE_QUESTION_SET="Practice Question Set",e.TEACHER_RESOURCE="Teacher Resource",e.TEMPLATE="Template",e.TEXTBOOK_UNIT="Textbook Unit"}(C||(C={}))},44:function(e,t,r){"use strict";var C;r.d(t,"a",function(){return C}),function(e){e.EXPERIMENT="Experiment",e.LESSON_PLAN="LessonPlan",e.LEARN="Learn",e.PLAY="Play",e.PRACTICE="Practice",e.READ="Read",e.TEACH="Teach",e.TEST="Test"}(C||(C={}))},45:function(e,t){}})});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CertificateUrlResponse, ContentState, CsCourseService, GetContentStateRequest, GetUserEnrolledCoursesRequest, CsUpdateContentStateRequest, CsUpdateContentStateResponse } from '../interface';
|
|
2
|
+
import { Course } from '../../../models/course';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { CsCourseServiceConfig } from '../../../index';
|
|
5
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
6
|
+
export declare class CourseServiceImpl implements CsCourseService {
|
|
7
|
+
private httpService;
|
|
8
|
+
private apiPath;
|
|
9
|
+
private certRegistrationApiPath?;
|
|
10
|
+
constructor(httpService: CsHttpService, apiPath: string, certRegistrationApiPath?: string | undefined);
|
|
11
|
+
getUserEnrolledCourses(request: GetUserEnrolledCoursesRequest, additionalParams?: {}, config?: CsCourseServiceConfig): Observable<Course[]>;
|
|
12
|
+
getSignedCourseCertificate(certificateId: string, config?: CsCourseServiceConfig): Observable<CertificateUrlResponse>;
|
|
13
|
+
getContentState(request: GetContentStateRequest, config?: CsCourseServiceConfig): Observable<ContentState[]>;
|
|
14
|
+
updateContentState(request: CsUpdateContentStateRequest, config?: CsCourseServiceConfig): Observable<CsUpdateContentStateResponse>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r=n();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=220)}({220:function(e,t,n){"use strict";var r;n.r(t),n.d(t,"ContentStateStatus",function(){return r}),function(e){e[e.IN_PROGRESS=1]="IN_PROGRESS",e[e.COMPLETED=2]="COMPLETED"}(r||(r={}))}})});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Course } from '../../../models/course';
|
|
3
|
+
import { CsCourseServiceConfig } from '../../../index';
|
|
4
|
+
export interface GetUserEnrolledCoursesRequest {
|
|
5
|
+
userId: string;
|
|
6
|
+
filters?: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface CertificateUrlResponse {
|
|
11
|
+
printUri: string;
|
|
12
|
+
}
|
|
13
|
+
declare type ContentStateRequestFields = 'progress' | 'score';
|
|
14
|
+
export interface GetContentStateRequest {
|
|
15
|
+
userId: string;
|
|
16
|
+
courseId: string;
|
|
17
|
+
batchId: string;
|
|
18
|
+
contentIds?: string[];
|
|
19
|
+
fields?: ContentStateRequestFields[];
|
|
20
|
+
}
|
|
21
|
+
export declare enum ContentStateStatus {
|
|
22
|
+
IN_PROGRESS = 1,
|
|
23
|
+
COMPLETED = 2
|
|
24
|
+
}
|
|
25
|
+
export interface ContentStateScore {
|
|
26
|
+
attemptId: string;
|
|
27
|
+
lastAttemptedOn: string;
|
|
28
|
+
totalMaxScore: number;
|
|
29
|
+
totalScore: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ContentState {
|
|
32
|
+
id?: string;
|
|
33
|
+
userId?: string;
|
|
34
|
+
contentId?: string;
|
|
35
|
+
batchId?: string;
|
|
36
|
+
courseId?: string;
|
|
37
|
+
lastAccessTime?: string;
|
|
38
|
+
viewCount?: number;
|
|
39
|
+
completedCount?: number;
|
|
40
|
+
collectionId?: string;
|
|
41
|
+
lastCompletedTime?: string;
|
|
42
|
+
status?: ContentStateStatus;
|
|
43
|
+
contentVersion?: string;
|
|
44
|
+
grade?: string;
|
|
45
|
+
result?: string;
|
|
46
|
+
progress?: number;
|
|
47
|
+
score?: ContentStateScore[];
|
|
48
|
+
bestScore?: ContentStateScore;
|
|
49
|
+
}
|
|
50
|
+
export interface CsUpdateContentStateRequest {
|
|
51
|
+
userId: string;
|
|
52
|
+
batchId: string;
|
|
53
|
+
courseId: string;
|
|
54
|
+
contentId?: string;
|
|
55
|
+
status?: ContentStateStatus;
|
|
56
|
+
}
|
|
57
|
+
export interface CsUpdateContentStateResponse {
|
|
58
|
+
response: string;
|
|
59
|
+
}
|
|
60
|
+
export interface CsCourseService {
|
|
61
|
+
getUserEnrolledCourses(request: GetUserEnrolledCoursesRequest, additionalParams?: {
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
}, config?: CsCourseServiceConfig): Observable<Course[]>;
|
|
64
|
+
getSignedCourseCertificate(certificateId: string, config?: CsCourseServiceConfig): Observable<CertificateUrlResponse>;
|
|
65
|
+
getContentState(request: GetContentStateRequest, config?: CsCourseServiceConfig): Observable<ContentState[]>;
|
|
66
|
+
updateContentState(request: CsUpdateContentStateRequest, config?: CsCourseServiceConfig): Observable<CsUpdateContentStateResponse>;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-course-service';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Container } from 'inversify';
|
|
2
|
+
import { CsDiscussionServiceConfig } from '../../..';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
5
|
+
import { CsAttachForumRequest, CsAttachForumResponse, CsDiscussionService, CsGetContextBasedDiscussionRequest, CsGetContextBasedTagDiscussionRequest, CsGetContextBasedTagDiscussionResponse, CsGetContextBasedTagRequest, CsGetContextBasedTagResponse, CsRemoveForumRequest, CsRemoveForumResponse } from '../interface/cs-discussion-service';
|
|
6
|
+
import { CsFormService } from 'src/services/form/interface/cs-form-service';
|
|
7
|
+
export declare class DiscussionServiceImpl implements CsDiscussionService {
|
|
8
|
+
private httpService;
|
|
9
|
+
private apiPath;
|
|
10
|
+
private container;
|
|
11
|
+
private formService;
|
|
12
|
+
constructor(httpService: CsHttpService, apiPath: string, container: Container, formService: CsFormService);
|
|
13
|
+
fetchAllTags(config?: any): Observable<{
|
|
14
|
+
result: {};
|
|
15
|
+
}>;
|
|
16
|
+
createPost(data: any, config?: any): Observable<{
|
|
17
|
+
result: {};
|
|
18
|
+
}>;
|
|
19
|
+
fetchAllCategories(config?: CsDiscussionServiceConfig): Observable<{
|
|
20
|
+
result: {};
|
|
21
|
+
}>;
|
|
22
|
+
fetchSingleCategoryDetails(cid: any, config?: any): Observable<{
|
|
23
|
+
result: {};
|
|
24
|
+
}>;
|
|
25
|
+
votePost(pid: number, data: any, config?: any): Observable<{
|
|
26
|
+
result: {};
|
|
27
|
+
}>;
|
|
28
|
+
deleteVotePost(pid: number, config?: any): Observable<{
|
|
29
|
+
result: {};
|
|
30
|
+
}>;
|
|
31
|
+
bookmarkPost(pid: number, config?: any): Observable<{
|
|
32
|
+
result: {};
|
|
33
|
+
}>;
|
|
34
|
+
deleteBookmarkPost(pid: number, config?: any): Observable<{
|
|
35
|
+
result: {};
|
|
36
|
+
}>;
|
|
37
|
+
replyPost(tid: number, data: any, config?: any): Observable<{
|
|
38
|
+
result: {};
|
|
39
|
+
}>;
|
|
40
|
+
fetchRecentD(page?: any, config?: any): Observable<{
|
|
41
|
+
result: {};
|
|
42
|
+
}>;
|
|
43
|
+
fetchTopicById(topicId: number, slug?: any, page?: any, config?: any): Observable<{
|
|
44
|
+
result: {};
|
|
45
|
+
}>;
|
|
46
|
+
fetchTopicByIdSort(topicId: number, sort: any, page?: any, config?: any): Observable<{
|
|
47
|
+
result: {};
|
|
48
|
+
}>;
|
|
49
|
+
fetchUnreadCOunt(config?: any): Observable<{
|
|
50
|
+
result: {};
|
|
51
|
+
}>;
|
|
52
|
+
fetchProfileInfo(slug: string, config?: any): Observable<{
|
|
53
|
+
result: {};
|
|
54
|
+
}>;
|
|
55
|
+
fetchUpvoted(slug: any, pageId?: number, config?: any): Observable<{
|
|
56
|
+
result: {};
|
|
57
|
+
}>;
|
|
58
|
+
fetchDownvoted(slug: any, pageId?: number, config?: any): Observable<{
|
|
59
|
+
result: {};
|
|
60
|
+
}>;
|
|
61
|
+
fetchSaved(slug: any, pageId?: number, config?: any): Observable<{
|
|
62
|
+
result: {};
|
|
63
|
+
}>;
|
|
64
|
+
fetchNetworkProfile(slug: any, config?: any): Observable<{
|
|
65
|
+
result: {};
|
|
66
|
+
}>;
|
|
67
|
+
getContextBasedTopic(slug: string, pageId: number, config?: any): Observable<{
|
|
68
|
+
result: {};
|
|
69
|
+
}>;
|
|
70
|
+
createUser(data: any, config?: any): Observable<{
|
|
71
|
+
result: {};
|
|
72
|
+
}>;
|
|
73
|
+
getForumIds(data: any, config?: any): Observable<{
|
|
74
|
+
result: {};
|
|
75
|
+
}>;
|
|
76
|
+
getUserDetails(userId: any, config?: any): Observable<{
|
|
77
|
+
result: {};
|
|
78
|
+
}>;
|
|
79
|
+
editPost(pid: number, data: any, config?: any): Observable<{
|
|
80
|
+
result: {};
|
|
81
|
+
}>;
|
|
82
|
+
deletePost(pid: number, uid: number, config?: any): Observable<{
|
|
83
|
+
result: {};
|
|
84
|
+
}>;
|
|
85
|
+
removeForum(data: CsRemoveForumRequest, config?: CsDiscussionServiceConfig): Observable<CsRemoveForumResponse>;
|
|
86
|
+
createForum(data: any, config?: CsDiscussionServiceConfig): Observable<CsAttachForumResponse>;
|
|
87
|
+
attachForum(request: CsAttachForumRequest): Observable<CsAttachForumResponse>;
|
|
88
|
+
deleteTopic(tid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
89
|
+
editTopic(tid: number, data: any, config?: CsDiscussionServiceConfig): Observable<CsAttachForumResponse>;
|
|
90
|
+
getContextBasedDiscussion(data: CsGetContextBasedDiscussionRequest, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
91
|
+
getContextBasedTagDiscussion(data: CsGetContextBasedTagDiscussionRequest, config?: CsDiscussionServiceConfig): Observable<CsGetContextBasedTagDiscussionResponse>;
|
|
92
|
+
recentPost(userSlug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<{
|
|
93
|
+
result: {};
|
|
94
|
+
}>;
|
|
95
|
+
fetchBestPost(userSlug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<{
|
|
96
|
+
result: {};
|
|
97
|
+
}>;
|
|
98
|
+
popularPost(config?: CsDiscussionServiceConfig): Observable<{
|
|
99
|
+
result: {};
|
|
100
|
+
}>;
|
|
101
|
+
getSingleCategoryDetails(cid: number, config?: CsDiscussionServiceConfig): Observable<{
|
|
102
|
+
result: {};
|
|
103
|
+
}>;
|
|
104
|
+
contextBasedTags(data: CsGetContextBasedTagRequest, config?: CsDiscussionServiceConfig): Observable<CsGetContextBasedTagResponse>;
|
|
105
|
+
getTagBasedDiscussion(tag: string, config?: CsDiscussionServiceConfig): Observable<{
|
|
106
|
+
result: {};
|
|
107
|
+
}>;
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CsDiscussionServiceConfig } from '../../../index';
|
|
3
|
+
export interface CsGetForumIdsRequest {
|
|
4
|
+
}
|
|
5
|
+
export interface CsGetForumIdsResponse {
|
|
6
|
+
result: any;
|
|
7
|
+
}
|
|
8
|
+
export interface CsCreateUserRequest {
|
|
9
|
+
}
|
|
10
|
+
export interface CsCreateUserResponse {
|
|
11
|
+
result: any;
|
|
12
|
+
}
|
|
13
|
+
export interface CsAttachForumRequest {
|
|
14
|
+
context: {
|
|
15
|
+
type: string;
|
|
16
|
+
identifier: string;
|
|
17
|
+
};
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CsAttachForumResponse {
|
|
21
|
+
}
|
|
22
|
+
export interface CsRemoveForumRequest {
|
|
23
|
+
sbType: string;
|
|
24
|
+
sbIdentifier: string;
|
|
25
|
+
cid: number;
|
|
26
|
+
}
|
|
27
|
+
export interface CsRemoveForumResponse {
|
|
28
|
+
}
|
|
29
|
+
export interface CsGetContextBasedDiscussionRequest {
|
|
30
|
+
cids: any[];
|
|
31
|
+
}
|
|
32
|
+
export interface CsGetContextBasedDiscussionResponse {
|
|
33
|
+
cids: any[];
|
|
34
|
+
tag: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CsGetContextBasedTagDiscussionRequest {
|
|
37
|
+
}
|
|
38
|
+
export interface CsGetContextBasedTagRequest {
|
|
39
|
+
}
|
|
40
|
+
export interface CsGetContextBasedTagDiscussionResponse {
|
|
41
|
+
}
|
|
42
|
+
export interface CsGetContextBasedTagResponse {
|
|
43
|
+
}
|
|
44
|
+
export interface CsDiscussionService {
|
|
45
|
+
fetchAllTags(config?: CsDiscussionServiceConfig): Observable<any>;
|
|
46
|
+
createPost(data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
47
|
+
fetchAllCategories(config?: CsDiscussionServiceConfig): Observable<any>;
|
|
48
|
+
fetchSingleCategoryDetails(cid: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
49
|
+
votePost(pid: number, data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
50
|
+
deleteVotePost(pid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
51
|
+
bookmarkPost(pid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
52
|
+
deleteBookmarkPost(pid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
53
|
+
replyPost(tid: number, data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
54
|
+
fetchRecentD(page?: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
55
|
+
fetchTopicById(topicId: number, slug?: any, page?: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
56
|
+
fetchTopicByIdSort(topicId: number, sort: any, page?: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
57
|
+
fetchUnreadCOunt(config?: CsDiscussionServiceConfig): Observable<any>;
|
|
58
|
+
fetchProfileInfo(slug: string, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
59
|
+
fetchUpvoted(slug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
60
|
+
fetchDownvoted(slug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
61
|
+
fetchSaved(slug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
62
|
+
fetchNetworkProfile(slug: string, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
63
|
+
createUser(data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
64
|
+
getForumIds(data: CsGetForumIdsRequest, config?: CsDiscussionServiceConfig): Observable<CsGetForumIdsResponse>;
|
|
65
|
+
getUserDetails(data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
66
|
+
getContextBasedTopic(uid: string, pageId: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
67
|
+
editPost(pid: number, data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
68
|
+
deletePost(pid: number, uid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
69
|
+
attachForum(data: CsAttachForumRequest): Observable<CsAttachForumResponse>;
|
|
70
|
+
removeForum(data: CsRemoveForumRequest, config?: CsDiscussionServiceConfig): Observable<CsRemoveForumResponse>;
|
|
71
|
+
createForum(data: any, config?: CsDiscussionServiceConfig): Observable<CsAttachForumResponse>;
|
|
72
|
+
deleteTopic(tid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
73
|
+
editTopic(tid: number, data: any, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
74
|
+
getContextBasedDiscussion(data: CsGetContextBasedDiscussionRequest, config?: CsDiscussionServiceConfig): Observable<CsGetContextBasedDiscussionResponse>;
|
|
75
|
+
getContextBasedTagDiscussion(data: CsGetContextBasedTagDiscussionRequest, config?: CsDiscussionServiceConfig): Observable<CsGetContextBasedTagDiscussionResponse>;
|
|
76
|
+
contextBasedTags(data: CsGetContextBasedTagRequest, config?: CsDiscussionServiceConfig): Observable<CsGetContextBasedTagResponse>;
|
|
77
|
+
recentPost(userSlug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
78
|
+
fetchBestPost(userSlug: string, pageId?: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
79
|
+
popularPost(config?: CsDiscussionServiceConfig): Observable<any>;
|
|
80
|
+
getSingleCategoryDetails(cid: number, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
81
|
+
getTagBasedDiscussion(tag: string, config?: CsDiscussionServiceConfig): Observable<any>;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-discussion-service';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CsFormService, FormParams } from '../interface/cs-form-service';
|
|
2
|
+
import { CsFormServiceConfig } from '../../../cs-module';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { Form } from '../../../models/form';
|
|
5
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
6
|
+
export declare class FormServiceImpl implements CsFormService {
|
|
7
|
+
private httpService;
|
|
8
|
+
private apiPath;
|
|
9
|
+
constructor(httpService: CsHttpService, apiPath: string);
|
|
10
|
+
getForm<Field>(params: FormParams, config?: CsFormServiceConfig): Observable<Form<Field>>;
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Form } from '../../../models/form';
|
|
3
|
+
import { CsFormServiceConfig } from '../../../cs-module';
|
|
4
|
+
export interface FormParams {
|
|
5
|
+
type: string;
|
|
6
|
+
subType: string;
|
|
7
|
+
action: string;
|
|
8
|
+
component?: string;
|
|
9
|
+
rootOrgId?: string;
|
|
10
|
+
framework?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CsFormService {
|
|
13
|
+
getForm<Field>(params: FormParams, config?: CsFormServiceConfig): Observable<Form<Field>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FrameworkConfig } from '../interface';
|
|
2
|
+
export declare class CsFrameworkConfigBloc {
|
|
3
|
+
private static _instance;
|
|
4
|
+
static get instance(): CsFrameworkConfigBloc;
|
|
5
|
+
private categoryConfig;
|
|
6
|
+
get config(): {
|
|
7
|
+
[frameworkId: string]: FrameworkConfig[];
|
|
8
|
+
};
|
|
9
|
+
updateState(frameWorkId: string, config: Array<FrameworkConfig>): void;
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CsFrameworkService, GetFrameworkOptions, FrameworkConfig } from '../interface';
|
|
2
|
+
import { CsFormService } from '../../form/interface/cs-form-service';
|
|
3
|
+
import { CsFormConfig, CsFrameworkConfig, CsFrameworkServiceConfig } from '../../../index';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { Framework, FrameworkCategory } from '../../../models/channel';
|
|
6
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
7
|
+
export declare class FrameworkServiceImpl implements CsFrameworkService {
|
|
8
|
+
private httpService;
|
|
9
|
+
private apiPath;
|
|
10
|
+
private formService;
|
|
11
|
+
constructor(httpService: CsHttpService, apiPath: string, formService: CsFormService);
|
|
12
|
+
getFramework(id: string, options?: GetFrameworkOptions, config?: CsFrameworkServiceConfig): Observable<Framework>;
|
|
13
|
+
getFrameworkConfig(frameworkId: string, frameworkConfig?: CsFrameworkConfig, formConfig?: CsFormConfig): Observable<Array<FrameworkConfig> | Array<any>>;
|
|
14
|
+
getFrameworkConfigMap(frameworkId: string, frameworkConfig?: CsFrameworkConfig, formConfig?: CsFormConfig): Observable<{
|
|
15
|
+
[frameworkId: string]: any;
|
|
16
|
+
}>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
transformFramework(frameworkId: string, apiPath: string): Observable<FrameworkConfig[]>;
|
|
19
|
+
/** @internal */
|
|
20
|
+
transformCategoriesToConfig(categories: FrameworkCategory[]): FrameworkConfig[];
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r=n();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=213)}({159:function(e,t,n){"use strict";n.r(t);var r=n(160),o=n.n(r);for(var u in r)["default"].indexOf(u)<0&&function(e){n.d(t,e,function(){return r[e]})}(u)},160:function(e,t){},213:function(e,t,n){"use strict";n.r(t);var r=n(159);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,function(){return r[e]})}(o)}})});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CsFormConfig, CsFrameworkConfig, CsFrameworkServiceConfig } from '../../../index';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Framework } from '../../../models/channel';
|
|
4
|
+
export interface GetFrameworkOptions {
|
|
5
|
+
requiredCategories: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface FrameworkConfig {
|
|
8
|
+
code: string;
|
|
9
|
+
identifier: string;
|
|
10
|
+
label: string;
|
|
11
|
+
index: number;
|
|
12
|
+
placeHolder: string;
|
|
13
|
+
translations?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CsFrameworkService {
|
|
16
|
+
getFramework(id: string, options?: GetFrameworkOptions, config?: CsFrameworkServiceConfig): Observable<Framework>;
|
|
17
|
+
getFrameworkConfig(frameworkId: string, frameworkConfig?: CsFrameworkConfig, formConfig?: CsFormConfig): Observable<FrameworkConfig[] | Array<any>>;
|
|
18
|
+
getFrameworkConfigMap(frameworkId: string, frameworkConfig?: CsFrameworkConfig, formConfig?: CsFormConfig): Observable<{
|
|
19
|
+
[frameworkId: string]: any;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-framework-service';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CsGroupActivityDataAggregation, CsGroupActivityService } from '../interface';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CsHttpService } from '../../../../core/http-service/interface';
|
|
4
|
+
import { CsGroupServiceConfig } from '../../../../cs-module';
|
|
5
|
+
import { Group, GroupActivity } from '../../../../models/group';
|
|
6
|
+
export declare class GroupActivityServiceImpl implements CsGroupActivityService {
|
|
7
|
+
private httpService;
|
|
8
|
+
private dataApiPath;
|
|
9
|
+
constructor(httpService: CsHttpService, dataApiPath: string);
|
|
10
|
+
getDataAggregation(groupId: string, activity: Pick<GroupActivity, 'id' | 'type'>, mergeGroup?: Group, leafNodesCount?: number, config?: CsGroupServiceConfig): Observable<CsGroupActivityDataAggregation>;
|
|
11
|
+
getDataForDashlets(hierarchyData: any, aggData: any): Observable<{
|
|
12
|
+
rows: any;
|
|
13
|
+
columns: any;
|
|
14
|
+
}>;
|
|
15
|
+
getAssessments(contents: any, nameIdMap: any): any;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r=n();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=211)}({211:function(e,t,n){"use strict";n.r(t);var r=n(27);n.d(t,"CsGroupActivityAggregationMetric",function(){return r.a})},27:function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e.ENROLMENT_COUNT="enrolmentCount",e.COMPLETED_COUNT="completedCount",e.LEAF_NODES_COUNT="leafNodesCount",e.PROGRESS="progress"}(r||(r={}))}})});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CsGroupServiceConfig } from '../../../../cs-module';
|
|
3
|
+
import { Group, GroupActivity, GroupEntityStatus, GroupMemberRole } from '../../../../models/group';
|
|
4
|
+
export declare enum CsGroupActivityAggregationMetric {
|
|
5
|
+
ENROLMENT_COUNT = "enrolmentCount",
|
|
6
|
+
COMPLETED_COUNT = "completedCount",
|
|
7
|
+
LEAF_NODES_COUNT = "leafNodesCount",
|
|
8
|
+
PROGRESS = "progress"
|
|
9
|
+
}
|
|
10
|
+
export interface CsGroupActivityDataAggregation {
|
|
11
|
+
groupId: string;
|
|
12
|
+
activity: {
|
|
13
|
+
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
agg: {
|
|
16
|
+
metric: CsGroupActivityAggregationMetric.ENROLMENT_COUNT | CsGroupActivityAggregationMetric.LEAF_NODES_COUNT;
|
|
17
|
+
lastUpdatedOn: number;
|
|
18
|
+
value: number;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
members: {
|
|
22
|
+
role: GroupMemberRole;
|
|
23
|
+
createdBy: string;
|
|
24
|
+
name: string;
|
|
25
|
+
userId: string;
|
|
26
|
+
status: GroupEntityStatus;
|
|
27
|
+
agg: {
|
|
28
|
+
metric: CsGroupActivityAggregationMetric.COMPLETED_COUNT | CsGroupActivityAggregationMetric.PROGRESS;
|
|
29
|
+
lastUpdatedOn: number;
|
|
30
|
+
value: number;
|
|
31
|
+
}[];
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
export interface CsGroupActivityService {
|
|
35
|
+
getDataAggregation(groupId: string, activity: Pick<GroupActivity, 'id' | 'type'>, mergeGroup?: Group, leafNodesCount?: number, config?: CsGroupServiceConfig): Observable<CsGroupActivityDataAggregation>;
|
|
36
|
+
getAssessments(hierarchyData: any, map: any): any;
|
|
37
|
+
getDataForDashlets(hierarchyData: any, map: any): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-group-activity-service';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CsGroupSuspendResponse, CsGroupReactivateResponse, CsGroupUpdateGroupGuidelinesResponse, CsGroupUpdateGroupGuidelinesRequest } from './../interface/cs-group-service';
|
|
2
|
+
import { CsGroup } from './../../../models/group/index';
|
|
3
|
+
import { Container } from 'inversify';
|
|
4
|
+
import { CsGroupAddActivitiesRequest, CsGroupAddActivitiesResponse, CsGroupAddMembersRequest, CsGroupAddMembersResponse, CsGroupCreateRequest, CsGroupCreateResponse, CsGroupDeleteResponse, CsGroupRemoveActivitiesRequest, CsGroupRemoveActivitiesResponse, CsGroupRemoveMembersRequest, CsGroupRemoveMembersResponse, CsGroupSearchCriteria, CsGroupSearchResponse, CsGroupService, CsGroupSupportedActivitiesFormField, CsGroupUpdateActivitiesRequest, CsGroupUpdateActivitiesResponse, CsGroupUpdateMembersRequest, CsGroupUpdateMembersResponse, CsGroupUpdateRequest, CsGroupUpdateResponse } from '../interface';
|
|
5
|
+
import { CsGroupServiceConfig } from '../../..';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
8
|
+
import { CsGroupActivityService } from '../activity/interface';
|
|
9
|
+
import { CsFormService } from '../../form/interface/cs-form-service';
|
|
10
|
+
import { Form } from '../../../models/form';
|
|
11
|
+
export declare class GroupServiceImpl implements CsGroupService {
|
|
12
|
+
private httpService;
|
|
13
|
+
private apiPath;
|
|
14
|
+
private container;
|
|
15
|
+
private formService;
|
|
16
|
+
private updateGroupGuidelinesApiPath;
|
|
17
|
+
constructor(httpService: CsHttpService, apiPath: string, container: Container, formService: CsFormService, updateGroupGuidelinesApiPath: string);
|
|
18
|
+
private _activityService?;
|
|
19
|
+
get activityService(): CsGroupActivityService;
|
|
20
|
+
create(createRequest: CsGroupCreateRequest, config?: CsGroupServiceConfig): Observable<CsGroupCreateResponse>;
|
|
21
|
+
updateById(id: string, updateRequest: CsGroupUpdateRequest, config?: CsGroupServiceConfig): Observable<CsGroupUpdateResponse>;
|
|
22
|
+
addMembers(groupId: string, addMembersRequest: CsGroupAddMembersRequest, config?: CsGroupServiceConfig): Observable<CsGroupAddMembersResponse>;
|
|
23
|
+
removeMembers(groupId: string, removeMembersRequest: CsGroupRemoveMembersRequest, config?: CsGroupServiceConfig): Observable<CsGroupRemoveMembersResponse>;
|
|
24
|
+
updateMembers(groupId: string, updateMembersRequest: CsGroupUpdateMembersRequest, config?: CsGroupServiceConfig): Observable<CsGroupUpdateMembersResponse>;
|
|
25
|
+
addActivities(groupId: string, addActivitiesRequest: CsGroupAddActivitiesRequest, config?: CsGroupServiceConfig): Observable<CsGroupAddActivitiesResponse>;
|
|
26
|
+
updateActivities(groupId: string, updateActivitiesRequest: CsGroupUpdateActivitiesRequest, config?: CsGroupServiceConfig): Observable<CsGroupUpdateActivitiesResponse>;
|
|
27
|
+
removeActivities(groupId: string, removeActivitiesRequest: CsGroupRemoveActivitiesRequest, config?: CsGroupServiceConfig): Observable<CsGroupRemoveActivitiesResponse>;
|
|
28
|
+
getById(id: string, options?: {
|
|
29
|
+
includeMembers?: boolean;
|
|
30
|
+
includeActivities?: boolean;
|
|
31
|
+
groupActivities?: boolean;
|
|
32
|
+
}, config?: CsGroupServiceConfig): Observable<CsGroup>;
|
|
33
|
+
search(searchCriteria: CsGroupSearchCriteria, config?: CsGroupServiceConfig): Observable<CsGroupSearchResponse[]>;
|
|
34
|
+
deleteById(id: string, config?: CsGroupServiceConfig): Observable<CsGroupDeleteResponse>;
|
|
35
|
+
suspendById(id: string, config?: CsGroupServiceConfig): Observable<CsGroupSuspendResponse>;
|
|
36
|
+
reactivateById(id: string, config?: CsGroupServiceConfig): Observable<CsGroupReactivateResponse>;
|
|
37
|
+
getSupportedActivities(config?: CsGroupServiceConfig): Observable<Form<CsGroupSupportedActivitiesFormField>>;
|
|
38
|
+
updateGroupGuidelines(request: CsGroupUpdateGroupGuidelinesRequest, config?: CsGroupServiceConfig): Observable<CsGroupUpdateGroupGuidelinesResponse>;
|
|
39
|
+
getActivityDataById(groupData: any, activity: any): never[];
|
|
40
|
+
groupContentsByActivityType(activitiesGrouped: any): {
|
|
41
|
+
activities: any;
|
|
42
|
+
};
|
|
43
|
+
}
|