@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(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=208)}({208:function(e,t){}})});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum NotificationStatus {
|
|
2
|
+
READ = "read",
|
|
3
|
+
UNREAD = "unread"
|
|
4
|
+
}
|
|
5
|
+
export declare enum NotificationType {
|
|
6
|
+
MEMBER_EXIT = "member-exit",
|
|
7
|
+
UNREAD = "unread"
|
|
8
|
+
}
|
|
9
|
+
export declare enum NotificationCategory {
|
|
10
|
+
GROUPS = "groups"
|
|
11
|
+
}
|
|
12
|
+
export interface NotificationTemplate {
|
|
13
|
+
data?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
ver?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface NotificationAction {
|
|
18
|
+
type?: NotificationType | any;
|
|
19
|
+
category?: NotificationCategory | any;
|
|
20
|
+
template?: NotificationTemplate;
|
|
21
|
+
createdBy?: any;
|
|
22
|
+
additionalInfo?: any;
|
|
23
|
+
groupRole?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface NotificationData {
|
|
26
|
+
id: string;
|
|
27
|
+
userId?: string;
|
|
28
|
+
priority?: number;
|
|
29
|
+
createdBy?: string;
|
|
30
|
+
status?: NotificationStatus | any;
|
|
31
|
+
createdOn?: number;
|
|
32
|
+
action?: NotificationAction;
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Organisation {
|
|
2
|
+
channel: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
id: string;
|
|
5
|
+
provider: string;
|
|
6
|
+
rootOrgId: string;
|
|
7
|
+
createdDate: string;
|
|
8
|
+
createdBy: string;
|
|
9
|
+
hashTagId: string;
|
|
10
|
+
parentOrgId?: string;
|
|
11
|
+
status: number;
|
|
12
|
+
slug: string;
|
|
13
|
+
isRootOrg: boolean;
|
|
14
|
+
orgCode?: string;
|
|
15
|
+
externalId: string;
|
|
16
|
+
orgName: string;
|
|
17
|
+
}
|
|
@@ -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=84)}({84:function(e,t){}})});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Content } from '../content';
|
|
2
|
+
export interface Page {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
sections: PageSection[];
|
|
6
|
+
}
|
|
7
|
+
export interface PageSection {
|
|
8
|
+
display?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
count: number;
|
|
11
|
+
description?: string;
|
|
12
|
+
index: number;
|
|
13
|
+
sectionDataType: string;
|
|
14
|
+
imgUrl?: string;
|
|
15
|
+
resmsgId: string;
|
|
16
|
+
collections?: Content[];
|
|
17
|
+
contents?: Content[];
|
|
18
|
+
searchQuery: string;
|
|
19
|
+
name: string;
|
|
20
|
+
id: string;
|
|
21
|
+
apiId: string;
|
|
22
|
+
group: number;
|
|
23
|
+
}
|
|
@@ -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=81)}({81:function(e,t){}})});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export interface User {
|
|
2
|
+
id: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName?: string;
|
|
6
|
+
rootOrg: RootOrg;
|
|
7
|
+
tncAcceptedVersion: string;
|
|
8
|
+
tncAcceptedOn: string;
|
|
9
|
+
tncLatestVersion: string;
|
|
10
|
+
promptTnC: boolean;
|
|
11
|
+
tncLatestVersionUrl: string;
|
|
12
|
+
avatar: string;
|
|
13
|
+
managedBy: string;
|
|
14
|
+
locationIds: string;
|
|
15
|
+
framework: any;
|
|
16
|
+
externalIds?: {
|
|
17
|
+
id: string;
|
|
18
|
+
operation: string;
|
|
19
|
+
idType: string;
|
|
20
|
+
provider: string;
|
|
21
|
+
}[];
|
|
22
|
+
declarations?: UserDeclaration[];
|
|
23
|
+
allTncAccepted?: {
|
|
24
|
+
[key: string]: {
|
|
25
|
+
tncAcceptedOn: string;
|
|
26
|
+
version: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
profileUserType?: {
|
|
30
|
+
type?: string;
|
|
31
|
+
subType?: string;
|
|
32
|
+
};
|
|
33
|
+
profileUserTypes?: {
|
|
34
|
+
type?: string;
|
|
35
|
+
subType?: string;
|
|
36
|
+
}[];
|
|
37
|
+
dob?: string;
|
|
38
|
+
isMinor?: boolean;
|
|
39
|
+
roles?: {
|
|
40
|
+
role?: string;
|
|
41
|
+
}[];
|
|
42
|
+
}
|
|
43
|
+
export declare enum UserDeclarationOperation {
|
|
44
|
+
EDIT = "edit",
|
|
45
|
+
ADD = "add",
|
|
46
|
+
REMOVE = "remove"
|
|
47
|
+
}
|
|
48
|
+
export declare enum UserDeclarationStatus {
|
|
49
|
+
PENDING = "PENDING",
|
|
50
|
+
VALIDATED = "VALIDATED",
|
|
51
|
+
REJECTED = "REJECTED",
|
|
52
|
+
ERROR = "ERROR"
|
|
53
|
+
}
|
|
54
|
+
export interface UserDeclaration {
|
|
55
|
+
errorType?: string;
|
|
56
|
+
status?: UserDeclarationStatus;
|
|
57
|
+
operation: UserDeclarationOperation;
|
|
58
|
+
userId: string;
|
|
59
|
+
orgId: string;
|
|
60
|
+
persona: string;
|
|
61
|
+
info: {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface RootOrg {
|
|
66
|
+
rootOrgId?: string;
|
|
67
|
+
orgName?: string;
|
|
68
|
+
slug?: string;
|
|
69
|
+
hashTagId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface Location {
|
|
72
|
+
code: string;
|
|
73
|
+
name: string;
|
|
74
|
+
id: string;
|
|
75
|
+
type: string;
|
|
76
|
+
}
|
|
77
|
+
export declare enum ConsentStatus {
|
|
78
|
+
ACTIVE = "ACTIVE",
|
|
79
|
+
REVOKED = "REVOKED"
|
|
80
|
+
}
|
|
81
|
+
export interface Consent {
|
|
82
|
+
status?: ConsentStatus;
|
|
83
|
+
userId: string;
|
|
84
|
+
consumerId: string;
|
|
85
|
+
objectId: string;
|
|
86
|
+
objectType?: string;
|
|
87
|
+
expiry?: string;
|
|
88
|
+
lastUpdatedOn?: string;
|
|
89
|
+
}
|
|
90
|
+
export declare enum UserFeedStatus {
|
|
91
|
+
READ = "read",
|
|
92
|
+
UNREAD = "unread"
|
|
93
|
+
}
|
|
94
|
+
export declare enum UserFeedCategory {
|
|
95
|
+
ORG_MIGRATION_ACTION = "OrgMigrationAction",
|
|
96
|
+
NOTIFICATION = "Notification"
|
|
97
|
+
}
|
|
98
|
+
export interface UserFeedEntry<T = any> {
|
|
99
|
+
id: string;
|
|
100
|
+
userId: string;
|
|
101
|
+
category: UserFeedCategory;
|
|
102
|
+
priority: number;
|
|
103
|
+
createdBy: string;
|
|
104
|
+
createdOn: string;
|
|
105
|
+
channel: string;
|
|
106
|
+
status: UserFeedStatus;
|
|
107
|
+
expireOn: string;
|
|
108
|
+
data: T;
|
|
109
|
+
}
|
|
@@ -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=82)}({82:function(e,t,n){"use strict";var r,o,u,i,f;n.r(t),n.d(t,"UserDeclarationOperation",function(){return r}),n.d(t,"UserDeclarationStatus",function(){return o}),n.d(t,"ConsentStatus",function(){return u}),n.d(t,"UserFeedStatus",function(){return i}),n.d(t,"UserFeedCategory",function(){return f}),function(e){e.EDIT="edit",e.ADD="add",e.REMOVE="remove"}(r||(r={})),function(e){e.PENDING="PENDING",e.VALIDATED="VALIDATED",e.REJECTED="REJECTED",e.ERROR="ERROR"}(o||(o={})),function(e){e.ACTIVE="ACTIVE",e.REVOKED="REVOKED"}(u||(u={})),function(e){e.READ="read",e.UNREAD="unread"}(i||(i={})),function(e){e.ORG_MIGRATION_ACTION="OrgMigrationAction",e.NOTIFICATION="Notification"}(f||(f={}))}})});
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jeraldj/client-services",
|
|
3
|
+
"version": "8.1.4",
|
|
4
|
+
"description": "Type definitions and models for Sunbird platform clients",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "src/index.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"test:coverage": "jest --coverage --collectCoverageFrom=src/**/*.{ts,tsx} --coverageReporters=lcov",
|
|
10
|
+
"test:ci": "jest --silent --ci --w 2 --collectCoverage=true --collectCoverageFrom=src/**/*.{ts,tsx} --coverageReporters=lcov",
|
|
11
|
+
"test:ci-json": "jest --ci --w 2 --collectCoverage=true --coverageReporters=json",
|
|
12
|
+
"build": "rm -rf dist && NODE_ENV=production webpack --verbose true --progress true --cache false",
|
|
13
|
+
"build:prod": "rm -rf dist && NODE_ENV=production webpack --verbose true --progress true --cache false && cp ./package.json ./LICENSE ./README.md ./dist",
|
|
14
|
+
"build:analyze": "webpack --verbose true --progress true --cache false --profile --json > stats.json && npx webpack-bundle-analyzer ./stats.json",
|
|
15
|
+
"build:dev": "rm -rf tmp && mkdir tmp && cp ./package-dev.json ./tmp/package.json && tsc -w --outDir ./tmp",
|
|
16
|
+
"sonar-scanner": "sonar-scanner"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@project-sunbird/telemetry-sdk": "1.3.0",
|
|
20
|
+
"crypto-ld": "3.9.0",
|
|
21
|
+
"dayjs": "1.9.8",
|
|
22
|
+
"global": "^4.4.0",
|
|
23
|
+
"inversify": "5.1.1",
|
|
24
|
+
"jsonld": "5.2.0",
|
|
25
|
+
"jsonld-signatures": "7.0.0",
|
|
26
|
+
"jszip": "3.10.1",
|
|
27
|
+
"node-fetch": "2.7.0",
|
|
28
|
+
"path-browserify": "^1.0.1",
|
|
29
|
+
"qs": "6.9.7",
|
|
30
|
+
"reflect-metadata": "0.1.13",
|
|
31
|
+
"security-context": "4.0.0",
|
|
32
|
+
"whatwg-fetch": "3.6.19"
|
|
33
|
+
},
|
|
34
|
+
"author": "",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/Sunbird-Ed/sunbird-client-services/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/Sunbird-Ed/sunbird-client-services#readme",
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"rxjs": ">=6"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/core": "^7.28.4",
|
|
45
|
+
"@babel/preset-env": "^7.28.3",
|
|
46
|
+
"@types/jest": "^25.2.3",
|
|
47
|
+
"@types/node-fetch": "^2.6.3",
|
|
48
|
+
"babel-loader": "^8.4.1",
|
|
49
|
+
"jest": "^25.5.4",
|
|
50
|
+
"rxjs": "^6.6.7",
|
|
51
|
+
"terser-webpack-plugin": "^4.1.0",
|
|
52
|
+
"ts-jest": "^25.5.1",
|
|
53
|
+
"ts-loader": "8.2.0",
|
|
54
|
+
"tslint": "^5.20.1",
|
|
55
|
+
"typescript": "3.9.10",
|
|
56
|
+
"webpack": "^4.47.0",
|
|
57
|
+
"webpack-cli": "^3.3.12"
|
|
58
|
+
},
|
|
59
|
+
"jest": {
|
|
60
|
+
"globals": {
|
|
61
|
+
"ts-jest": {
|
|
62
|
+
"tsConfig": "tsconfig.spec.json"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"browser": false,
|
|
66
|
+
"rootDir": "./",
|
|
67
|
+
"roots": [
|
|
68
|
+
"<rootDir>/src/"
|
|
69
|
+
],
|
|
70
|
+
"moduleDirectories": [
|
|
71
|
+
"node_modules"
|
|
72
|
+
],
|
|
73
|
+
"testPathIgnorePatterns": [
|
|
74
|
+
"/node_modules/"
|
|
75
|
+
],
|
|
76
|
+
"coveragePathIgnorePatterns": [],
|
|
77
|
+
"testMatch": [
|
|
78
|
+
"**/?(*.)(spec).ts"
|
|
79
|
+
],
|
|
80
|
+
"restoreMocks": true,
|
|
81
|
+
"moduleFileExtensions": [
|
|
82
|
+
"js",
|
|
83
|
+
"jsx",
|
|
84
|
+
"json",
|
|
85
|
+
"ts",
|
|
86
|
+
"tsx"
|
|
87
|
+
],
|
|
88
|
+
"setupFiles": [
|
|
89
|
+
"./src/__test__/setup.ts"
|
|
90
|
+
],
|
|
91
|
+
"transform": {
|
|
92
|
+
"^.+\\.(ts)$": "ts-jest"
|
|
93
|
+
},
|
|
94
|
+
"coverageReporters": [
|
|
95
|
+
"text",
|
|
96
|
+
"json"
|
|
97
|
+
],
|
|
98
|
+
"transformIgnorePatterns": []
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Container } from "inversify";
|
|
2
|
+
import { CsLearnerCertificate, CsLearnerCertificateV1 } from "../../../models";
|
|
3
|
+
import { CSGetLearnerCerificateRequest } from "..";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
import { CsCertificateServiceConfig } from '../../../index';
|
|
6
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
7
|
+
import { CsCertificateService, GetPublicKeyRequest, GetPublicKeyResponse, FetchCertificateResponse, FetchCertificateRequest, GetLegacyCertificateRequest, GetLegacyCertificateResponse, CsVerifyCertificateRequest, CsCertificateDetailsResponse, CsGetCertificateRequest, CsVerifyCertificateResponse, CsLearnerCertificateResponse } from "../interface";
|
|
8
|
+
import { CsSystemSettingsService } from "../../system-settings/interface/";
|
|
9
|
+
export declare class CertificateServiceImpl implements CsCertificateService {
|
|
10
|
+
private httpService;
|
|
11
|
+
private apiPath;
|
|
12
|
+
private apiPathLegacy;
|
|
13
|
+
private rcApiPath;
|
|
14
|
+
private systemSettingsService;
|
|
15
|
+
private container;
|
|
16
|
+
constructor(httpService: CsHttpService, apiPath: string, apiPathLegacy: string, rcApiPath: string, systemSettingsService: CsSystemSettingsService, container: Container);
|
|
17
|
+
fetchCertificatesV1(request: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<{
|
|
18
|
+
count: number;
|
|
19
|
+
content: CsLearnerCertificateV1[];
|
|
20
|
+
}>;
|
|
21
|
+
fetchCertificatesV2(request: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<CsLearnerCertificate[]>;
|
|
22
|
+
fetchCertificates(request: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<CsLearnerCertificateResponse>;
|
|
23
|
+
getPublicKey(request: GetPublicKeyRequest, config?: CsCertificateServiceConfig): Observable<GetPublicKeyResponse>;
|
|
24
|
+
getCerificateDownloadURI(request: FetchCertificateRequest, config?: CsCertificateServiceConfig): Observable<FetchCertificateResponse>;
|
|
25
|
+
getLegacyCerificateDownloadURI(req: GetLegacyCertificateRequest, config?: CsCertificateServiceConfig): Observable<GetLegacyCertificateResponse>;
|
|
26
|
+
getCertificateDetails(request: CsGetCertificateRequest, config?: CsCertificateServiceConfig): Observable<CsCertificateDetailsResponse>;
|
|
27
|
+
getEncodedData(encodedData: any): Promise<any>;
|
|
28
|
+
verifyCertificate(req: CsVerifyCertificateRequest, config?: CsCertificateServiceConfig): Observable<CsVerifyCertificateResponse>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CsLearnerCertificate } from "../../../models";
|
|
3
|
+
import { CsCertificateServiceConfig } from "../../../index";
|
|
4
|
+
export interface GetPublicKeyRequest {
|
|
5
|
+
osid: string;
|
|
6
|
+
alg?: String;
|
|
7
|
+
schemaName?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetPublicKeyResponse {
|
|
10
|
+
osid: string;
|
|
11
|
+
value: string;
|
|
12
|
+
alg: string;
|
|
13
|
+
osOwner: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface FetchCertificateRequest {
|
|
16
|
+
certificateId: string;
|
|
17
|
+
schemaName?: string;
|
|
18
|
+
type?: CertificateType;
|
|
19
|
+
templateUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare enum CertificateType {
|
|
22
|
+
CERTIFICATE_REGISTRY = "certificate_registry",
|
|
23
|
+
RC_CERTIFICATE_REGISTRY = "rc_certificate_registry"
|
|
24
|
+
}
|
|
25
|
+
export interface FetchCertificateResponse {
|
|
26
|
+
printUri: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetLegacyCertificateRequest {
|
|
29
|
+
pdfUrl: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetLegacyCertificateResponse {
|
|
32
|
+
signedUrl: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CSGetLearnerCerificateRequest {
|
|
35
|
+
userId: string;
|
|
36
|
+
schemaName?: string;
|
|
37
|
+
size?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface CsGetCertificateRequest {
|
|
40
|
+
certificateId: string;
|
|
41
|
+
schemaName?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CsCertificateDetailsResponse {
|
|
44
|
+
training?: string;
|
|
45
|
+
recipient?: string;
|
|
46
|
+
status: string;
|
|
47
|
+
_osSignedData?: any;
|
|
48
|
+
}
|
|
49
|
+
export interface CsVerifyCertificateRequest {
|
|
50
|
+
publicKey?: string;
|
|
51
|
+
certificateData?: any;
|
|
52
|
+
schemaName?: string;
|
|
53
|
+
certificateId: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CsVerifyCertificateResponse {
|
|
56
|
+
verified: boolean;
|
|
57
|
+
status: string;
|
|
58
|
+
certificateData: {
|
|
59
|
+
issuedTo: string;
|
|
60
|
+
issuanceDate: string;
|
|
61
|
+
issuerName: string;
|
|
62
|
+
trainingName: string;
|
|
63
|
+
trainigId: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface CsLearnerCertificateResponse {
|
|
67
|
+
certRegCount: number;
|
|
68
|
+
rcCount: number;
|
|
69
|
+
certificates: CsLearnerCertificate[];
|
|
70
|
+
}
|
|
71
|
+
export interface CsCertificateService {
|
|
72
|
+
fetchCertificatesV1(req: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<any>;
|
|
73
|
+
fetchCertificatesV2(req: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<CsLearnerCertificate[]>;
|
|
74
|
+
fetchCertificates(req: CSGetLearnerCerificateRequest, config?: CsCertificateServiceConfig): Observable<CsLearnerCertificateResponse>;
|
|
75
|
+
getPublicKey(req: GetPublicKeyRequest, config?: CsCertificateServiceConfig): Observable<GetPublicKeyResponse>;
|
|
76
|
+
getCerificateDownloadURI(req: FetchCertificateRequest, config?: CsCertificateServiceConfig): Observable<FetchCertificateResponse>;
|
|
77
|
+
getLegacyCerificateDownloadURI(req: GetLegacyCertificateRequest, config?: CsCertificateServiceConfig): Observable<GetLegacyCertificateResponse>;
|
|
78
|
+
getCertificateDetails(req: CsGetCertificateRequest, config?: CsCertificateServiceConfig): Observable<CsCertificateDetailsResponse>;
|
|
79
|
+
getEncodedData(req: string): Promise<any>;
|
|
80
|
+
verifyCertificate(req: CsVerifyCertificateRequest, config?: CsCertificateServiceConfig): Observable<CsVerifyCertificateResponse>;
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-certificate-service';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CsContentGetQuestionSetResponse, CsContentService, CsContentGetQuestionListResponse, CsContentGetQuestionSetHierarchyResponse } from '../interface';
|
|
2
|
+
import { CsContentServiceConfig } from '../../..';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { CsHttpService } from '../../../core/http-service/interface';
|
|
5
|
+
export declare class ContentServiceImpl implements CsContentService {
|
|
6
|
+
private httpService;
|
|
7
|
+
private hierarchyApiPath;
|
|
8
|
+
private questionListApiPath;
|
|
9
|
+
constructor(httpService: CsHttpService, hierarchyApiPath: string, questionListApiPath: string);
|
|
10
|
+
getQuestionSetHierarchy(contentId: string, config?: CsContentServiceConfig): Observable<CsContentGetQuestionSetHierarchyResponse>;
|
|
11
|
+
getQuestionSetRead(contentId: string, params?: any, config?: CsContentServiceConfig): Observable<CsContentGetQuestionSetResponse>;
|
|
12
|
+
getQuestionList(contentIds: string[], config?: CsContentServiceConfig): Observable<CsContentGetQuestionListResponse>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interface';
|
|
@@ -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 o=t();for(var r in o)("object"==typeof exports?exports:n)[r]=o[r]}}(window,function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},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 o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},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=209)}({1:function(e,n,t){"use strict";t.r(n);var o=t(39);t.d(n,"CsSortOrder",function(){return o.a});var r=t(40),i=t.n(r);for(var a in r)["default","CsSortOrder"].indexOf(a)<0&&function(e){t.d(n,e,function(){return r[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 E=t(43);t.d(n,"CsPrimaryCategory",function(){return E.a});var s=t(44);t.d(n,"CsResourceType",function(){return s.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)},209:function(e,n,t){"use strict";t.r(n);var o=t(1);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,function(){return o[e]})}(r)},39:function(e,n,t){"use strict";var o;t.d(n,"a",function(){return o}),function(e){e.ASC="asc",e.DESC="desc"}(o||(o={}))},40:function(e,n){},41:function(e,n,t){"use strict";var o;t.d(n,"a",function(){return o}),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"}(o||(o={}))},42:function(e,n,t){"use strict";var o;t.d(n,"a",function(){return o}),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"}(o||(o={}))},43:function(e,n,t){"use strict";var o;t.d(n,"a",function(){return o}),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"}(o||(o={}))},44:function(e,n,t){"use strict";var o;t.d(n,"a",function(){return o}),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"}(o||(o={}))},45:function(e,n){}})});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Content } from '../../../models';
|
|
2
|
+
export interface CsContentFilterCriteria extends CsFilterCriteria<Content | any> {
|
|
3
|
+
}
|
|
4
|
+
export interface CsFilterCriteria<T> {
|
|
5
|
+
filterAttribute: keyof T;
|
|
6
|
+
filterCondition: CsFilterCondition;
|
|
7
|
+
}
|
|
8
|
+
export interface CsFilterCondition {
|
|
9
|
+
operation: '==' | '<=' | '>=' | '!=';
|
|
10
|
+
value: any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum CsMimeType {
|
|
2
|
+
APK = "application/vnd.android.package-archive",
|
|
3
|
+
ECML = "application/vnd.ekstep.ecml-archive",
|
|
4
|
+
HTML = "application/vnd.ekstep.html-archive",
|
|
5
|
+
COLLECTION = "application/vnd.ekstep.content-collection",
|
|
6
|
+
H5P = "application/vnd.ekstep.h5p-archive",
|
|
7
|
+
VIDEO = "video/mp4",
|
|
8
|
+
YOUTUBE = "video/x-youtube",
|
|
9
|
+
WEBM = "video/webm",
|
|
10
|
+
PDF = "application/pdf",
|
|
11
|
+
EPUB = "application/epub",
|
|
12
|
+
ZIP = "application/zip",
|
|
13
|
+
TXT = "text/plain",
|
|
14
|
+
TXT_X_URL = "text/x-url",
|
|
15
|
+
ECAR = "application/ecar",
|
|
16
|
+
EPAR = "application/epar"
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CsContentServiceConfig } from '../../../index';
|
|
3
|
+
export interface CsContentGetQuestionSetResponse {
|
|
4
|
+
}
|
|
5
|
+
export interface CsContentGetQuestionListResponse {
|
|
6
|
+
}
|
|
7
|
+
export interface CsContentGetQuestionSetHierarchyResponse {
|
|
8
|
+
}
|
|
9
|
+
export interface CsContentService {
|
|
10
|
+
getQuestionSetHierarchy(contentId: string, config?: CsContentServiceConfig): Observable<CsContentGetQuestionSetHierarchyResponse>;
|
|
11
|
+
getQuestionSetRead(contentId: string, params?: any, config?: CsContentServiceConfig): Observable<CsContentGetQuestionSetResponse>;
|
|
12
|
+
getQuestionList(contentIds: string[], config?: CsContentServiceConfig): Observable<CsContentGetQuestionListResponse>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Content } from '../../../models';
|
|
2
|
+
declare type Primitive = string | number | boolean;
|
|
3
|
+
export interface CsContentSortCriteria extends CsSortCriteria<Content | any> {
|
|
4
|
+
}
|
|
5
|
+
export interface CsSortCriteria<T> {
|
|
6
|
+
sortAttribute: keyof T;
|
|
7
|
+
sortOrder: CsSortOrder | CsSortComprehension;
|
|
8
|
+
}
|
|
9
|
+
export interface CsSortComprehension {
|
|
10
|
+
order: CsSortOrder;
|
|
11
|
+
preference?: Primitive[];
|
|
12
|
+
}
|
|
13
|
+
export declare enum CsSortOrder {
|
|
14
|
+
ASC = "asc",
|
|
15
|
+
DESC = "desc"
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare enum CsContentType {
|
|
2
|
+
ASSET = "Asset",
|
|
3
|
+
CLASSROOM_TEACHING_VIDEO = "ClassroomTeachingVideo",
|
|
4
|
+
CONCEPT_MAP = "ConceptMap",
|
|
5
|
+
COURSE = "Course",
|
|
6
|
+
COURSE_UNIT = "CourseUnit",
|
|
7
|
+
CURIOSITY_QUESTION_SET = "CuriosityQuestionSet",
|
|
8
|
+
E_TEXTBOOK = "eTextBook",
|
|
9
|
+
EXPERIENTIAL_RESOURCE = "ExperientialResource",
|
|
10
|
+
EXPLANATION_RESOURCE = "ExplanationResource",
|
|
11
|
+
EXPLANATION_VIDEO = "Explanation Video",
|
|
12
|
+
FOCUS_SPOT = "FocusSpot",
|
|
13
|
+
LEARNING_OUTCOME_DEFINITION = "LearningOutcomeDefinition",
|
|
14
|
+
LESSON_PLAN_UNIT = "LessonPlanUnit",
|
|
15
|
+
MARKING_SCHEME_RUBRIC = "MarkingSchemeRubric",
|
|
16
|
+
ONBOARDING_RESOURCE = "OnboardingResource",
|
|
17
|
+
PEDAGOGY_FLOW = "PedagogyFlow",
|
|
18
|
+
PLUGIN = "Plugin",
|
|
19
|
+
PRACTICE_QUESTION_SET = "PracticeQuestionSet",
|
|
20
|
+
PRACTICE_RESOURCE = "PracticeResource",
|
|
21
|
+
READING_MATERIAL = "ReadingMaterial",
|
|
22
|
+
SELF_ASSESS = "SelfAssess",
|
|
23
|
+
TEACHING_METHOD = "TeachingMethod",
|
|
24
|
+
TEMPLATE = "Template",
|
|
25
|
+
TEXTBOOK = "TextBook",
|
|
26
|
+
TEXTBOOK_UNIT = "TextBookUnit",
|
|
27
|
+
COLLECTION = "Collection",
|
|
28
|
+
EXPLANATION_READING_MATERIAL = "ExplanationReadingMaterial",
|
|
29
|
+
LEARNING_ACTIVITY = "LearningActivity",
|
|
30
|
+
LESSON_PLAN = "LessonPlan",
|
|
31
|
+
LESSON_PLAN_RESOURCE = "LessonPlanResource",
|
|
32
|
+
PREVIOUS_BOARD_EXAM_PAPERS = "PreviousBoardExamPapers",
|
|
33
|
+
TV_LESSION = "TVLesson",
|
|
34
|
+
RESOURCE = "Resource"
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum CsPrimaryCategory {
|
|
2
|
+
ASSET = "Asset",
|
|
3
|
+
CONTENT_PLAYLIST = "Content PlayList",
|
|
4
|
+
COURSE = "Course",
|
|
5
|
+
COURSE_ASSESSMENT = "Course Assessment",
|
|
6
|
+
COURSE_UNIT = "Course Unit",
|
|
7
|
+
DIGITAL_TEXTBOOK = "Digital Textbook",
|
|
8
|
+
E_TEXTBOOK = "eTextbook",
|
|
9
|
+
EXPLANATION_CONTENT = "Explanation Content",
|
|
10
|
+
LEARNING_RESOURCE = "Learning Resource",
|
|
11
|
+
LESSON_PLAN_UNIT = "Lesson Plan Unit",
|
|
12
|
+
PLUGIN = "Plugin",
|
|
13
|
+
PRACTICE_QUESTION_SET = "Practice Question Set",
|
|
14
|
+
TEACHER_RESOURCE = "Teacher Resource",
|
|
15
|
+
TEMPLATE = "Template",
|
|
16
|
+
TEXTBOOK_UNIT = "Textbook Unit"
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './cs-content-sort-criteria';
|
|
2
|
+
export * from './cs-content-filter-criteria';
|
|
3
|
+
export * from './cs-content-mime-type';
|
|
4
|
+
export * from './cs-content-type';
|
|
5
|
+
export * from './cs-primary-category';
|
|
6
|
+
export * from './cs-resource-type';
|
|
7
|
+
export * from './cs-content-service';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Content } from '../../../../models';
|
|
2
|
+
import { CsContentFilterCriteria, CsContentSortCriteria, CsFilterCriteria, CsSortCriteria } from '../../interface';
|
|
3
|
+
export interface CsContentSection {
|
|
4
|
+
name: string;
|
|
5
|
+
combination?: {
|
|
6
|
+
[key in keyof Content]?: string;
|
|
7
|
+
};
|
|
8
|
+
sections: CsContentGroup[];
|
|
9
|
+
}
|
|
10
|
+
export interface CsContentGroup {
|
|
11
|
+
count?: number;
|
|
12
|
+
name?: string;
|
|
13
|
+
contents?: Content[];
|
|
14
|
+
targetedContents?: Content[];
|
|
15
|
+
totalCount?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface CsContentGroupSortCriteria extends CsSortCriteria<CsContentGroup> {
|
|
18
|
+
}
|
|
19
|
+
export interface CsContentGroupFilterCriteria extends CsFilterCriteria<CsContentGroup> {
|
|
20
|
+
}
|
|
21
|
+
export declare class CsContentsGroupGenerator {
|
|
22
|
+
static generate(config: {
|
|
23
|
+
prioritiseTargetedContents?: {
|
|
24
|
+
categories: (keyof Content)[];
|
|
25
|
+
sourceFramework: Partial<{
|
|
26
|
+
[key in keyof Content]: string[] | string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
includeSearchable?: boolean;
|
|
30
|
+
contents: Content[];
|
|
31
|
+
groupBy: keyof Content;
|
|
32
|
+
sortBy?: CsContentSortCriteria | CsContentSortCriteria[];
|
|
33
|
+
filterBy?: CsContentFilterCriteria | CsContentFilterCriteria[];
|
|
34
|
+
groupSortBy?: CsContentGroupSortCriteria | CsContentGroupSortCriteria[];
|
|
35
|
+
groupFilterBy?: CsContentGroupFilterCriteria | CsContentGroupFilterCriteria[];
|
|
36
|
+
combination?: Partial<{
|
|
37
|
+
[key in keyof Content]?: string[];
|
|
38
|
+
}>;
|
|
39
|
+
}): CsContentSection;
|
|
40
|
+
private static filterContentsByAttribute;
|
|
41
|
+
private static isMultiValueAttribute;
|
|
42
|
+
private static sortItems;
|
|
43
|
+
private static filterItems;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cs-contents-group-generator';
|