@uptime.app/contracts 2.0.50 → 2.0.52-UPM-7636.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/cjs/b2b-organisation/b2b-organisation-member.d.ts +6 -0
  2. package/dist/cjs/b2b-organisation/b2b-organisation-member.d.ts.map +1 -1
  3. package/dist/cjs/b2b-organisation/b2b-organisation-member.js +7 -0
  4. package/dist/cjs/b2b-organisation/b2b-organisation-member.js.map +1 -1
  5. package/dist/cjs/index.d.ts +1 -0
  6. package/dist/cjs/index.d.ts.map +1 -1
  7. package/dist/cjs/index.js +1 -0
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/learn-upon/webhook-types.d.ts +253 -0
  10. package/dist/cjs/learn-upon/webhook-types.d.ts.map +1 -0
  11. package/dist/cjs/learn-upon/webhook-types.js +3 -0
  12. package/dist/cjs/learn-upon/webhook-types.js.map +1 -0
  13. package/dist/esm/b2b-organisation/b2b-organisation-member.d.ts +6 -0
  14. package/dist/esm/b2b-organisation/b2b-organisation-member.d.ts.map +1 -1
  15. package/dist/esm/b2b-organisation/b2b-organisation-member.js +6 -1
  16. package/dist/esm/b2b-organisation/b2b-organisation-member.js.map +1 -1
  17. package/dist/esm/index.d.ts +1 -0
  18. package/dist/esm/index.d.ts.map +1 -1
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/learn-upon/webhook-types.d.ts +253 -0
  22. package/dist/esm/learn-upon/webhook-types.d.ts.map +1 -0
  23. package/dist/esm/learn-upon/webhook-types.js +2 -0
  24. package/dist/esm/learn-upon/webhook-types.js.map +1 -0
  25. package/package.json +2 -2
  26. package/src/b2b-organisation/b2b-organisation-member.ts +8 -0
  27. package/src/index.ts +3 -1
  28. package/src/learn-upon/from-lydia.ts +16 -0
  29. package/src/learn-upon/learn-upon-api-course.ts +54 -0
  30. package/src/learn-upon/learn-upon-api-enrollment.ts +46 -0
  31. package/src/learn-upon/learn-upon-api-portal.ts +19 -0
  32. package/src/learn-upon/learn-upon-api-user.ts +40 -0
  33. package/src/learn-upon/learn-upon-portal-config.ts +23 -0
  34. package/src/learn-upon/learn-upon-user-mapping.ts +11 -0
  35. package/src/learn-upon/learn-upon-webhook-course-completion.ts +53 -0
  36. package/src/learn-upon/learn-upon-webhook-course-update.ts +76 -0
  37. package/src/learn-upon/learn-upon-webhook-enrollment.ts +18 -0
  38. package/src/learn-upon/learn-upon-webhook-module-complete.ts +30 -0
  39. package/src/learn-upon/webhook-types.ts +262 -0
@@ -0,0 +1,253 @@
1
+ export interface LearnUponWebhookUser {
2
+ /** Unique numeric identifier for a user */
3
+ userId: string;
4
+ /** Email address for a user */
5
+ email: string;
6
+ /** Unique identifier for a user, for portals that require usernames */
7
+ username?: string;
8
+ }
9
+ export interface LearnUponWebhookCourseCompletion {
10
+ /** Unique numeric identifier for the LearnUpon portal */
11
+ portalId: string;
12
+ /** Unique numeric identifier for the enrollment */
13
+ enrollmentId: string;
14
+ /** Unique numeric identifier for the course */
15
+ courseId: string;
16
+ /** If you enable course reference codes on your portal, this field contains the references and data from that attribute */
17
+ courseReferenceCode?: string;
18
+ /** When you offer certificates for a course, the details appear in a listed/embedded object */
19
+ certification?: {
20
+ /** Set to a date (UTC) when the learner's certificate will expire: empty string indicates no expiry */
21
+ certExpiresAt: string;
22
+ /** If you have set up recertification policies on your course certificate, and the user was awarded a certificate, this value is set to true when the user was automatically recertified by LearnUpon on the course */
23
+ wasRecertified: boolean;
24
+ /** The name of the certificate awarded, if any */
25
+ certificationName: string;
26
+ };
27
+ /** The date and time (UTC) that the learner's access to this course expires, if set */
28
+ courseAccessExpiresAt?: string;
29
+ /** The date and time (UTC) that the learner enrolled on the course */
30
+ dateEnrolled: string;
31
+ /** The date and time (UTC) that the learner started the course */
32
+ dateStarted: string;
33
+ /** The date and time (UTC) that the learner completed the course */
34
+ dateCompleted: string;
35
+ /** Indicates the status of the learner on the course having completed it: values are completed, passed or failed */
36
+ enrollmentStatus: 'completed' | 'passed' | 'failed';
37
+ /** The percentage scored for the learner on the course: this value is the learner's average score across all modules with scores in the course */
38
+ percentage: number;
39
+ /** Indicates if the learner has more attempts on the course: this value appears if a learner reaches a failed status, but they have an exam that allows them to re-attempt the course */
40
+ hasAttemptsRemaining: boolean;
41
+ /** Indicates if the completion was marked complete manually by an authorized user */
42
+ manuallyMarkedComplete: boolean;
43
+ /** Unique numeric identifier of the person who manually marked the learner as complete */
44
+ manuallyMarkedCompleteById?: string;
45
+ /** List of unique identifiers for an individual user */
46
+ user: LearnUponWebhookUser;
47
+ /** If you issue credits for your course, the credits appear here in a listed/embedded object */
48
+ credits?: Array<{
49
+ /** The name of the credit that was awarded, like "CPD" */
50
+ name: string;
51
+ /** The number of credits that were awarded to the learner by completing the course, like 5.0 */
52
+ number: number;
53
+ }>;
54
+ /** The list of modules and related statuses in the course: for each module in your course, you get a status, a date the status was set, and scores where relevant */
55
+ modules: Array<{
56
+ /** Unique id of the module in LearnUpon */
57
+ id: string;
58
+ /** The name of the module in LearnUpon */
59
+ name: string;
60
+ /** The type of the module: values include module, page, exam, scorm, tincan, assignment, survey, checklist, training, event */
61
+ type: string;
62
+ /** The status of the module at the time the learner completed the course, with one of the following statuses: not_started, in_progress, completed, passed, failed, pending_review, attended, no_show, cancelled */
63
+ status: string;
64
+ /** The score that the learner achieved, if the module included a test, such as an exam or assignment. Normally an integer, but can be a float in some particular modules (e.g. SCORM Module) */
65
+ percentage?: number;
66
+ /** Date and time in UTC format when the user completed this module */
67
+ dateCompleted: string;
68
+ /** Date and time in UTC format when the user started this module */
69
+ dateStarted?: string;
70
+ /** The number of attempts by the learner, on the module, assuming this module is exam-based */
71
+ attempts?: number;
72
+ /** If the module is an exam, indicates if the exam was a knowledge test only (true) or formal exam (false) */
73
+ isKnowledgeCheck?: boolean;
74
+ /** Order of the modules in the course, if set */
75
+ sequence: number;
76
+ /** Indicates if the completion was marked complete manually by an authorized user. Default is false */
77
+ markedCompleted: boolean;
78
+ /** Additional data specific to module type */
79
+ additional_data: any;
80
+ }>;
81
+ /** Date and time of course completion in UTC format */
82
+ eventCreated: string;
83
+ }
84
+ export interface LearnUponWebhookModuleCompletition {
85
+ /** Unique numeric identifier for the LearnUpon portal */
86
+ portalId: string;
87
+ /** List of unique identifiers for an individual user */
88
+ user: LearnUponWebhookUser;
89
+ /** Unique numeric identifier for the enrollment */
90
+ enrollmentId: string;
91
+ /** Unique numeric identifier for the course */
92
+ courseId: string;
93
+ /** Unique numeric identifier for the module the learner completed */
94
+ moduleId: string;
95
+ /** The date and time (UTC) that the learner started the module */
96
+ dateStarted: string;
97
+ /** The date and time (UTC) that the learner completed the module */
98
+ dateCompleted: string;
99
+ /** Indicates if the completion was marked complete manually by an authorized user. Default is false */
100
+ markedCompleted: boolean;
101
+ /** Type of module the learner completed: one of module, page, exam, scorm, tincan, assignment, survey, checklist, training, event */
102
+ type: 'module' | 'page' | 'exam' | 'scorm' | 'tincan' | 'assignment' | 'survey' | 'checklist' | 'training' | 'event';
103
+ /** Refers to the order of the modules within the course */
104
+ sequence: number;
105
+ /** Indicates the status of the learner on the module having completed it: one of completed, failed, pending_review, not_started (when learner never started course, and markedCompleted=true) */
106
+ status: 'completed' | 'failed' | 'pending_review' | 'not_started' | 'passed';
107
+ /** The score of the module completed. Can be null */
108
+ percentage?: number;
109
+ /** Provides details for specific module types like exams and surveys. Can be null */
110
+ additionalData?: {
111
+ /** Unique numeric identifier of the exam in LearnUpon */
112
+ examId?: string;
113
+ /** Indicates if the exam is a knowledge test (true) only or formal exam (false) */
114
+ isKnowledgeTest?: boolean;
115
+ /** The number of attempts on this exam by the learner so far */
116
+ attemptsTaken?: number;
117
+ /** The number of attempts permitted, assuming attempts are limited (see unlimitedAttemptsAllowed attribute) */
118
+ attemptsAllowed?: number;
119
+ /** Set to true if the exam has unlimited attempts permitted: otherwise false. When set, this attribute overrides attemptsAllowed */
120
+ unlimitedAttemptsAllowed?: boolean;
121
+ /** Set to true when the exam is a timed exam */
122
+ timedExam?: boolean;
123
+ /** The number of minutes allocated to complete the exam */
124
+ timeAllowed?: number;
125
+ /** The number of seconds taken by the learner to complete the exam */
126
+ timeTaken?: number;
127
+ /** Set to true if LearnUpon automatically submitted the exam, when the allocated time (timeAllowed) elapsed in full */
128
+ wasAutoSubmitted?: boolean;
129
+ /** The number of correct answers required to pass the exam, if you do not use passPercentage attribute */
130
+ passMark?: number;
131
+ /** The passing percentage required for this exam. When set, this value overrides passMark */
132
+ passPercentage?: number;
133
+ /** Survey only: unique numeric identifier for a survey in LearnUpon */
134
+ surveyId?: string;
135
+ /** Attributes about the feedback the instructor provides, including an array for any feedback attachments */
136
+ instructorFeedback?: {
137
+ /** Unique numeric identifier of the instructor who reviews the assignment */
138
+ reviewedByUserId: string;
139
+ /** Indicates if the assignment was reviewed automatically with a pre-set score. Default is null */
140
+ wasAutocompleted: boolean;
141
+ /** Contains details of any uploaded response by the instructor */
142
+ uploads?: Array<{
143
+ /** Unique numeric identifier for the upload */
144
+ id: string;
145
+ /** URL link to the content uploaded by either the instructor or the learner */
146
+ url: string;
147
+ }>;
148
+ /** Any text entered by the instructor to acknowledge the assignment. Can be provided automatically by autocomplete */
149
+ feedback: string;
150
+ /** The date and time (UTC) that the instructor reviewed the assignment */
151
+ reviewedAt: string;
152
+ /** Numeric value assigned for the assignment. Can be provided automatically by autocomplete */
153
+ score: number;
154
+ };
155
+ /** Attributes about the answer provided by the learner, including an array for any uploaded content */
156
+ assignmentAnswer?: {
157
+ /** Unique numeric identifier for the learner's answer to this assignment */
158
+ id: string;
159
+ /** Any text entered in the UI by the learner as part of their assignment response. This attribute truncates at 3000 characters */
160
+ answer: string;
161
+ /** Indicates if the learner's answer shown in the webhook was cut short */
162
+ truncated: boolean;
163
+ /** Contains details of any uploaded content by the learner */
164
+ uploads?: Array<{
165
+ /** Unique numeric identifier for the upload */
166
+ id: string;
167
+ /** URL link to the content uploaded by either the instructor or the learner */
168
+ url: string;
169
+ }>;
170
+ /** The date and time (UTC) that the learner sent the assignment */
171
+ answerSubmittedAt: string;
172
+ };
173
+ };
174
+ /** Date and time of event completion in UTC format */
175
+ eventCreated: string;
176
+ }
177
+ export interface LearnUponWebhookCourseEnrollment {
178
+ /** Unique numeric identifier for the LearnUpon portal */
179
+ portalId: string;
180
+ /** Date of enrollment in UTC format */
181
+ eventCreated: string;
182
+ /** List of unique identifiers for an individual user */
183
+ user: LearnUponWebhookUser;
184
+ /** Unique identifier for this enrollment action */
185
+ enrollmentId: string;
186
+ /** The course due date for this enrollment */
187
+ dueDate?: string;
188
+ /** Unique identifier for the course */
189
+ courseId: string;
190
+ /** If you have set up recertification policies on your course certificate, and the user was awarded a certificate, this value is set to true when the user is automatically recertified by LearnUpon on the course. Default false */
191
+ wasRecertified: boolean;
192
+ }
193
+ export interface LearnUponWebhookCourseUnenrollment {
194
+ /** Unique numeric identifier for the LearnUpon portal */
195
+ portalId: string;
196
+ /** Unique identifier for the course */
197
+ courseId: string;
198
+ /** Unique identifier for the original enrollment action */
199
+ enrollmentId: string;
200
+ /** List of unique identifiers for an individual user */
201
+ user: LearnUponWebhookUser;
202
+ /** Date of unenrollment in UTC format */
203
+ eventCreated: string;
204
+ }
205
+ export interface LearnUponWebhookCourseUpdate {
206
+ /** Unique numeric identifier for the LearnUpon portal */
207
+ portalId: string;
208
+ /** Unique identifier numeric for the course */
209
+ courseId: string;
210
+ /** The title of the course */
211
+ courseName: string;
212
+ /** The short description, which appears on the My Courses page or the catalog */
213
+ courseDescription?: string;
214
+ /** If you have course reference codes enabled on your portal, this attribute contains the references and data from that attribute */
215
+ courseReferenceCode?: string;
216
+ /** The status of the course at the time LearnUpon sends the webhook, for courses with a status of Published, Under Revision, Archived or Deleted */
217
+ courseStatus: 'active' | 'inactive' | 'archived';
218
+ /** The type of course */
219
+ courseType: 'standard' | 'blended' | 'event' | 'microlearning';
220
+ /** The URL for the course */
221
+ courseUrl: string;
222
+ /** The date and time that the course was created in UTC format */
223
+ courseCreatedAt: string;
224
+ /** The date and time that the course was last updated in UTC format */
225
+ courseUpdatedAt: string;
226
+ /** The date and time that the course was first published, in UTC format */
227
+ coursePublishedAt?: string;
228
+ /** The date and time that the course was archived, in UTC format */
229
+ courseArchivedAt?: string;
230
+ /** The course length if specified (in minutes) */
231
+ courseDuration?: number;
232
+ /** The language of the course */
233
+ courseLanguage?: string;
234
+ /** The course category information */
235
+ courseCategory?: {
236
+ /** Unique identifier for the category */
237
+ id: string;
238
+ /** The name of the category */
239
+ name: string;
240
+ };
241
+ /** The course instructor information */
242
+ courseInstructor?: {
243
+ /** Unique identifier for the instructor */
244
+ id: string;
245
+ /** The name of the instructor */
246
+ name: string;
247
+ /** The email address of the instructor */
248
+ email: string;
249
+ };
250
+ /** Date and time of course completion in UTC format */
251
+ eventCreated: string;
252
+ }
253
+ //# sourceMappingURL=webhook-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-types.d.ts","sourceRoot":"","sources":["../../../src/learn-upon/webhook-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gCAAgC;IAC7C,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,2HAA2H;IAC3H,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,+FAA+F;IAC/F,aAAa,CAAC,EAAE;QACZ,uGAAuG;QACvG,aAAa,EAAE,MAAM,CAAC;QACtB,uNAAuN;QACvN,cAAc,EAAE,OAAO,CAAC;QACxB,kDAAkD;QAClD,iBAAiB,EAAE,MAAM,CAAC;KAC7B,CAA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AAM,CAAC;IAC1B,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,cAAc,CAAC,EAAE;QACb,yCAAyC;QACzC,EAAE,EAAE,MAAM,CAAC;QACX,+BAA+B;QAC/B,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,wCAAwC;IACxC,gBAAgB,CAAC,EAAE;QACf,2CAA2C;QAC3C,EAAE,EAAE,MAAM,CAAC;QACX,iCAAiC;QACjC,IAAI,EAAE,MAAM,CAAC;QACb,0CAA0C;QAC1C,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=webhook-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook-types.js","sourceRoot":"","sources":["../../../src/learn-upon/webhook-types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uptime.app/contracts",
3
- "version": "2.0.50",
3
+ "version": "2.0.52-UPM-7636.0",
4
4
  "license": "MIT",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "main": "./dist/cjs/index.js",
@@ -14,5 +14,5 @@
14
14
  "devDependencies": {
15
15
  "typescript": "^5.4.3"
16
16
  },
17
- "gitHead": "84705665c62b17ad6668f8a83b21012c8772f311"
17
+ "gitHead": "9a78980722ada56db5927fd0af202507dd48b42e"
18
18
  }
@@ -9,4 +9,12 @@ export interface B2BOrganisationMember {
9
9
  /** Added Nov 2024. AppRole.B2bAdmin or AppRole.B2bMember */
10
10
  role: string;
11
11
  profileId?: string;
12
+ joinedVia?: B2BOrganisationMemberJoinedVia;
13
+
14
+ }
15
+
16
+ export enum B2BOrganisationMemberJoinedVia {
17
+ INVITATION = 'INVITATION',
18
+ PUBLIC_LINK = 'PUBLIC_LINK',
19
+ SSO = 'SSO',
12
20
  }
package/src/index.ts CHANGED
@@ -179,4 +179,6 @@ export * from './message-bus/Context';
179
179
  export * from './identity-provider/identity-provider';
180
180
  export * from './identity-provider/identity-provider-events';
181
181
  export * from './identity-provider/domain-identity-provider';
182
- export * from './identity-provider/domain-identity-provider-events';
182
+ export * from './identity-provider/domain-identity-provider-events';
183
+
184
+ export * from './learn-upon/webhook-types';
@@ -0,0 +1,16 @@
1
+
2
+ // todo LearnUponApiEnrollment.modules may not be available when searching for a users enrollments
3
+
4
+ export interface APITraining {
5
+ id: string; // from LearnUponApiEnrollment.course_id | LearnUponWebhookCourseUpdate.courseId | LearnUponApiCourse.id
6
+ title: string; // from LearnUponApiCourse.name | LearnUponApiEnrollment.course_name | LearnUponWebhookCourseUpdate.courseName
7
+ dueDate: string; // from LearnUponWebhookEnrollment.dueDate | LearnUponApiEnrollment.due_date
8
+ completedModulesCount: number; // from LearnUponApiEnrollment.percentage_complete | LearnUponApiEnrollment.modules LearnUponWebhookModuleComplete
9
+ totalModulesCount: number; // from LearnUponApiEnrollment.modules | LearnUponApiCourse.number_of_modules | LearnUponWebhookCourseUpdate.modules
10
+ coverUrl: string; // from LearnUponApiCourse.thumbnail_image_url | LearnUponWebhookCourseUpdate.thumbnailImageUrl
11
+ isStarted?: boolean; // from LearnUponApiEnrollment.date_started | ModuleComplete webhook (assuming is started is 1 or more modules complete)
12
+ isCertificate?: boolean; // from LearnUponApiEnrollment.certificate_name or LearnUponWebhookCourseUpdate.certificate . Not LearnUponApiCourse ??
13
+
14
+ // not looking at this for now
15
+ isLiveSession?: boolean;
16
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * LearnUpon course representation https://docs.learnupon.com/api/#courses
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponApiCourse {
6
+ id: number; /** Unique numeric identifier for the course */
7
+ name: string; /** The title of the course */
8
+ version: number; /** The version of the course */
9
+ source_id: number; /** The source course_id for a course. When you update a course (re-version a course) the source id does not change This ID groups courses together that stem from the same root course in their version tree */
10
+ created_at: string; /** Date/time when the course was created, in UTC format */
11
+ sellable: boolean; /** If set to true, indicates the course is published to the store: default is false. */
12
+ cataloged: boolean; /** If set to true, indicates if the course is published to the catalog: default is false */
13
+ date_published: string; /** Date/time when the course was published, in UTC format */
14
+ keywords: string; /** Keywords you provide, to help users find your course in the catalog or the store */
15
+ reference_code: string; /** A customer reference code, to help you find your courses in the library in search, and use in reports: not generated by LearnUpon */
16
+ manager_can_enroll: boolean; /** If set to true, indicates the manager can enroll their group members on this course: default is false */
17
+ allow_users_rate_course: boolean; /** If set to (default)true, indicates learners can rate this course */
18
+ number_of_reviews: number; /** Number of reviews/ratings recorded for this course: use in combination with number_of_stars to calculate an average rating */
19
+ number_of_stars: number; /** Number of stars awarded to the course: use in combination with number_of_reviews to calculate an average rating */
20
+ minute_length: number; /** The course length, if specified, that appears in your store or catalog */
21
+ course_length_unit: string; /** The length unit for your course: hours or minutes */
22
+ num_enrolled: number; /** Number of learners currently enrolled */
23
+ num_not_started: number; /** Number of learners who have not started the course */
24
+ num_in_progress: number; /** Number of learners who are currently in progress */
25
+ num_completed: number; /** Number of learners who have completed the course */
26
+ num_passed: number; /** Number of learners who have passed the course */
27
+ num_failed: number; /** Number of learners who have failed the course */
28
+ num_pending_review: number; /** Number of learners who have submitted all of their assignments for their course */
29
+ number_of_modules: number; /** Number of modules in this course */
30
+ price: number; /** Price in cents for your course */
31
+ published_status_id: string; /** The current published status of the course: one of published, draft, archived or under_revision */
32
+ difficulty_level: string; /** The difficulty level set on your course: one of not_applicable, basic, intermediate or advanced */
33
+ description_html: string; /** Course description, with full HTML markup */
34
+ description_text: string; /** Course description, raw text */
35
+ objectives_html: string; /** Course objectives, with full HTML markup */
36
+ objectives_text: string; /** Course objectives, raw text */
37
+ credits_to_be_awarded: string; /** Comma-separated list of credits the learner earns by completing or passing the course. Example: "CEU:2.00,CPE:3.00" */
38
+ due_days_after_enrollment: number; /** The number of days after enrollment, when the learner is due to complete the course */
39
+ due_date_after_enrollment: string; /** The date/time, when this course is due for completion, in UTC format */
40
+ send_due_date_reminders: boolean; /** If set to true, indicates that due date reminders are enabled on this course: default is false */
41
+ due_date_reminder_days: number; /** For the first reminder LearnUpon sends: number of days before the course is due for completion */
42
+ due_date_reminder_days_2: number; /** For the second reminder LearnUpon sends: number of days before the course is due for completion */
43
+ thumbnail_image_url: string; /** Public URL of the course thumbnail image: returns null if the course has no thumbnail */
44
+ license_expires: string; /** Licensed course only: the date/time the course license expires, in UTC format, returns null if the license is open ended */
45
+ license_number_enrollments_purchased: number; /** Licensed course only: the number of enrollments purchased for the license, returns null if the license is unlimited */
46
+ license_is_open_ended: boolean; /** Licensed course only: indicates if the license is open ended (never expires), default is false */
47
+ license_has_unlimited_enrollments: boolean; /** Licensed course only: indicates if the license has an unlimited number of enrollments available, default is false */
48
+ owner_first_name: string; /** The first name of the course owner */
49
+ owner_last_name: string; /** The last name of the course owner */
50
+ owner_email: string; /** The email address of the course owner */
51
+ owner_id: number; /** Unique numeric identifier for the course owner: portal administrator, or instructor with course creation privileges */
52
+ learning_awards: any; /** Gamification only: requires query by course_id, and contains gamification related data */
53
+ customDataFieldValues /** An object containing the list of custom data field definitions. Returned only when the portal admin has defined custom course data fields */
54
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * LearnUpon enrollment representation https://docs.learnupon.com/api/#enrollments
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponApiEnrollment {
6
+ id: number; /** Unique numeric identifier for the enrollment */
7
+ percentage: number; /** The score achieved by the learner */
8
+ date_started: string; /** The date the user started the course, in UTC format */
9
+ date_completed: string; /** The date the user finished the course, in UTC format */
10
+ date_lastaccessed: string; /** The date the user last accessed the course, in UTC format */
11
+ date_enrolled: string; /** The date the user was enrolled on the course, in UTC format */
12
+ course_id: number; /** Unique numeric identifier for the course */
13
+ course_name: string; /** The exact title of the course, using the most recent published course title */
14
+ course_source_id: number; /** For re-versioned courses, provides the course_id of the source course. Example: for course version 4, this field contains the course_id for version 3 (not version 1) */
15
+ user_id: number; /** Unique numeric identifier for the user enrolled */
16
+ first_name: string; /** The first name of the user enrolled */
17
+ last_name: string; /** The last name of the user enrolled */
18
+ email: string; /** The email address of the user enrolled: LearnUpon's default identifier for users. */
19
+ username: string; /** The username of the user enrolled, visible only if you implement usernames on your portal. See Unique identifiers: email or username */
20
+ due_date: string; /** If set, the date by which the learner must complete the course, in UTC format */
21
+ status: string; /** The enrollment status of the learner, one of the following statuses: not_started, in_progress, completed, passed, failed, pending_review */
22
+ course_access_expires_at: string; /** If set, date when access to the course expires for the learner, in UTC format */
23
+ certificate_name: string; /** Name of any certificate the user receives for completion */
24
+ cert_expires_at: string; /** If set, when the the certification expires */
25
+ version: number; /** The course version */
26
+ was_recertified: boolean; /** If set to true, indicates that recertification policies on your course certificate applied on this enrollment. For users who complete a course that has automatic recertification rules enabled, when they repeat the course, they are automatically recertified by LearnUpon */
27
+ percentage_complete: number; /** The number of modules the learner has completed, as a percentage of the number of modules in the course */
28
+ unenrolled: boolean; /** Indicates if a user's completed course was unenrolled: enrollment is hidden from the learners' views, but appears in the course history report, in audit/learning history data */
29
+ from_store: boolean; /** Indicates if the enrollment came through eCommerce. Default is false */
30
+ from_catalog: boolean; /** Indicates if the enrollment came through the portal catalog. Default is false */
31
+ updated_at: string; /** Indicates when the enrollment was last updated, in UTC format */
32
+ group_id: number; /** Displays the learner's group_id, if they belong to a group */
33
+ is_overdue: boolean; /** Applicable only for courses with due dates: indicates if the course is overdue */
34
+ // TODO - check if this is supported when getting a users enrollments?!?! or do you need the enrollment id?
35
+ modules: LearnUponApiEnrollmentModule[] /** A list of module details for the given {enrollment_id} */
36
+ }
37
+
38
+ export interface LearnUponApiEnrollmentModule {
39
+ id: number; /** Unique numeric identifier for the module */
40
+ title: string; /** Name of the module that appears to learners in the interface */
41
+ sequence: number; /** Order in which the module appears in the enrollment */
42
+ date_started: string; /** The date the learner started the module, in UTC format */
43
+ date_completed: string; /** The date the learner finished the module, in UTC format */
44
+ date_lastaccessed: string; /** The date the learner last accessed the module, in UTC format */
45
+ status: string; /** Current status of the module, one of not_started, in_progress, completed, passed, failed or pending_review */
46
+ }
@@ -0,0 +1,19 @@
1
+
2
+ /**
3
+ * LearnUpon Portal https://docs.learnupon.com/api/#portals
4
+ * TODO - many of these fields may be optional
5
+ */
6
+ export interface LearnUponApiPortal {
7
+ id: number; /** Maps to LearnUpon's id field. Unique numeric identifier for the portal. (LearnUpon's id) */
8
+ title: string; /** Portal name or title. Requires URL encoding to submit the name over a QueryString. The search uses pattern matching, not exact matching. All searches are case insensitive */
9
+ subdomain: string; /** The subdomain of the portal */
10
+ created_at: string; /** Date/time for when the portal was created, in UTC format */
11
+ updated_at: string; /** Date/time for when the portal was last updated, in UTC format */
12
+ allow_course_authoring: boolean; /** Permissions: indicates if admins in a sub-portal can edit courses in that portal. Default is true, gives permissions to edit courses */
13
+ number_of_members: number; /** Number of users currently assigned to the portal */
14
+ number_licenses_purchased: number; /** For portal licensing: indicates the number of licenses purchased for a specific portal */
15
+ number_licenses_used: number; /** For portal licensing: indicates the number of licenses currently used for a specific portal */
16
+ logo_image_url: string; /** URL of the logo image of the new portal */
17
+ header_color: string; /** Hexadecimal code for the portal's header color, default (#419BBD) */
18
+ navigation_color: string; /** Hexadecimal code for the portal's tab navigation color, default (#256188) */
19
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * LearnUpon user representation https://docs.learnupon.com/api/#user-object-attributes
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponApiUser {
6
+ id: number; /** The unique numeric identifier for the user */
7
+ last_name: string; /** The last name of the user */
8
+ first_name: string; /** The first name of the user */
9
+ email: string; /** The email address of the user: see Unique identifiers: email or username */
10
+ username?: string; /** Appears only if you set up username in place of email as a unique identifier. See Unique identifiers: email or username. */
11
+ locale: string; /** The ISO language code for the user. See the appendix for a list of supported languages. If not set, then default is the portal's language. */
12
+ created_at: string; /** The date the user was created, in UTC format */
13
+ updated_at: string; /** The date of recent change to indicate the most recent change to any ofemail, first_name, last_name, username, display_name, email_disabled, or a reset password request, in UTC format */
14
+ last_sign_in_at: string; /** The date the user last signed into LearnUpon, in UTC format */
15
+ account_expires: string; /** The date you set the user's account to expire. Expired accounts cannot access LearnUpon. This attribute overrides enabled attribute. Required format is yyyy-mm-dd like 2025-04-11. The user's account expires at midnight (UTC) on the date specified, thus: midnight on 11th Apr 2025 */
16
+ sign_in_count: number; /** The number of times the user logged into LearnUpon */
17
+ enabled: boolean; /** If set to (default)true, indicates the user's account is enabled. An account can remain enabled even if the account has expired: you must check the account_expires attribute, and vice versa. account_expires overrides enabled */
18
+ timezone_id: string; /** If set, indicates a timezone for displaying dates and times of courses and sessions. This timezone can match, or be different, from the portal default */
19
+ user_type: string; /** Indicates the user type and their permissions in the portal: one of learner, instructor, manager, admin */
20
+ can_enroll: boolean; /** Manager user type only: indicates if the user can enroll learners in courses. Default is true */
21
+ can_unenroll_users: boolean; /** Manager user type only: indicates of the user can unenroll learners in courses. Default is false */
22
+ can_mark_complete: boolean; /** Manager user type only: indicates if the user can manually mark complete learners on courses. Default is false */
23
+ can_move_groups: boolean; /** Manager user type only: indicates if the manager can move users from one group to another. The manager must be assigned as manager for both groups. Default is false */
24
+ can_act_as_instructor: boolean; /** Manager user type only: indicates if the manager has instructor permissions. Default is false */
25
+ can_manage_trainings: boolean; /** Instructor user type only: indicates if the instructor can create and edit live learning events. Default is false */
26
+ can_manage_sessions: boolean; /** Instructor user type only: indicates if the instructor can create and edit sessions within live learning events. Default is false */
27
+ tutor_can_edit_their_courses: boolean; /** Instructor user type only: indicates if the user can edit the courses that they instruct. Default is true */
28
+ tutor_can_create_courses: boolean; /** Instructor user type only: indicates if the user can create their own courses. Default is false */
29
+ number_of_enrollments: number; /** Indicates the number of enrollments for the specified user */
30
+ number_of_enrollments_accessed: number; /** Indicates the number of enrollments that the user has in progress, completed, passed status */
31
+ // TODO - is CustomData correct? different casing to other properties
32
+ CustomData?: any /** Optionally defined by admins on your portal: custom data refers to any custom user data fields that you created on your portals */
33
+ membership_type?: string; /** Associations and memberships feature only. Indicates the membership type of the users. LearnUpon provides Member or Non-member options by default: add new membership types through the portal interface. Attribute options must have no spaces: use hyphens or underscores */
34
+ number_of_points?: number; /** Gamification only: total number of gamification points awarded to the user */
35
+ number_of_badges?: number; /** Gamification only: total count of gamification badges awarded to the user */
36
+ sf_contact_id?: string; /** Salesforce only: Contact ID. Returns null if user record doesn’t have a Salesforce Contact ID */
37
+ sf_user_id?: string; /** Salesforce only: Salesforce User ID. Returns null if user record doesn’t have a Salesforce user ID */
38
+ is_salesforce_contact?: boolean; /** Salesforce only: Returns null if user isn’t a Salesforce Contact */
39
+ customDataFieldValues?: any /** Optional: an object containing custom user data details */
40
+ }
@@ -0,0 +1,23 @@
1
+
2
+ /**
3
+ * Uptime's representation of the config required for a specific LearnUpon Portal
4
+ */
5
+ export interface LearnUponPortalConfig {
6
+ id: string;
7
+ v: number;
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ /** LearnUpon's id for the portal. set when the portal has been created */
11
+ portalId?: string;
12
+
13
+ // portal settings and properties https://docs.learnupon.com/api/#create-a-new-portal
14
+ subdomain: string; /** Subdomain of your portal */
15
+ title: string; /** Title of the new portal */
16
+ logo_image_url?: string; /** URL of the logo image of the new portal */
17
+ store_banner_image_url?: string; /** URL for an image, to use as store banner image of the new portal */
18
+ header_color?: string; /** Hexadecimal code for the portal's header color, default (#419BBD) */
19
+ navigation_color?: string; /** Hexadecimal code for the portal's tab navigation color, default (#256188) */
20
+ number_licenses_purchased?: number; /** For portal licensing: you can specify the number of purchased licenses for a given portal */
21
+ copy_from_parent?: boolean; /** If set to true, the new portal copies many settings from the top-level portal: includes any custom email templates, custom welcome messages, SSO settings, categories, and catalog settings. If SQSSO is set up on the top-level portal, this call generates a new SQSSO secret key, while copying other settings. This key appears in the response */
22
+ allow_course_authoring?: boolean; /** Permissions: indicates if admins in a sub-portal can edit courses in that portal. Default is true, gives permissions to edit courses */
23
+ }
@@ -0,0 +1,11 @@
1
+
2
+ export interface LearnUponUserMapping {
3
+ id: string;
4
+ v: number;
5
+ createdAt: string;
6
+ updatedAt: string;
7
+ userId: string; /** Uptime user id */
8
+ learnUponUserId: number; /** LearnUpon user id */
9
+ // todo - should we
10
+ portalId: string; /** LearnUpon portal id */
11
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * https://docs.learnupon.com/webhooks/v2/#course-completion
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponWebhookCourseCompletion {
6
+ enrollmentId: number; /** Unique numeric identifier for the enrollment */
7
+ courseId: number; /** Unique numeric identifier for the course */
8
+ courseReferenceCode: string; /** If you enable course reference codes on your portal, this field contains the references and data from that attribute */
9
+ certification: LearnUponWebhookCourseCompletionCertification; /** When you offer certificates for a course, the details appear in a listed/embedded object */
10
+ courseAccessExpiresAt: string; /** The date and time (UTC) that the learner's access to this course expires, if set */
11
+ dateEnrolled: string; /** The date and time (UTC) that the learner enrolled on the course */
12
+ dateStarted: string; /** The date and time (UTC) that the learner started the course */
13
+ dateCompleted: string; /** The date and time (UTC) that the learner completed the course */
14
+ enrollmentStatus: string; /** Indicates the status of the learner on the course having completed it: values are completed, passed or failed */
15
+ percentage: number; /** The percentage scored for the learner on the course: this value is the learner's average score across all modules with scores in the course. */
16
+ hasAttemptsRemaining: boolean; /** Indicates if the learner has more attempts on the course: this value appears if a learner reaches a failed status, but they have an exam that allows them to re-attempt the course */
17
+ manuallyMarkedComplete: boolean; /** Indicates if the completion was marked complete manually by an authorized user */
18
+ manuallyMarkedCompleteById: number; /** Unique numeric identifier of the person who manually marked the learner as complete */
19
+ user: LearnUponWebhookCourseCompletionUser /** List of unique identifiers for an individual user */
20
+ credits: LearnUponWebhookCourseCompletionCredits[]; /** If you issue credits for your course, the credits appear here in a listed/embedded object */
21
+ modules: LearnUponWebhookCourseCompletionModule[]; /** The list of modules and related statuses in the course: for each module in your course, you get a status, a date the status was set, and scores where relevant */
22
+ eventCreated: string; /** Date and time of course completion in UTC format */
23
+ }
24
+
25
+ export interface LearnUponWebhookCourseCompletionUser {
26
+ userId: number;
27
+ email : string;
28
+ username: string;
29
+ }
30
+
31
+
32
+ export interface LearnUponWebhookCourseCompletionCredits {
33
+ id: number; /** For learning path completions only: Unique numeric identifier for the credit. See Path credits data attributes */
34
+ name: string; /** The name of the credit that was awarded, like "CPD" */
35
+ number: number; /** The number of credits that were awarded to the learner by completing the course, like 5.0 */
36
+ }
37
+ export interface LearnUponWebhookCourseCompletionModule {
38
+ id: number; /** Unique id of the module in LearnUpon */
39
+ type: string; /** The type of the module: values include module, page, exam, scorm, tincan, assignment, survey, checklist, training, event */
40
+ name: string; /** The name of the module in LearnUpon */
41
+ status: string; /** The status of the module at the time the learner completed the course, with one of the following statuses: not_started, in_progress, completed, passed, failed, pending_review, attended, no_show, cancelled */
42
+ percentage: number; /** The score that the learner achieved, if the module included a test, such as an exam or assignment. Normally an integer, but can be a float in some particular modules (e.g. SCORM Module) */
43
+ dateCompleted: string; /** Date and time in UTC format when the user completed this module */
44
+ attempts: number; /** The number of attempts by the learner, on the module, assuming this module is exam-based */
45
+ isKnowledgeCheck: boolean; /** If the module is an exam, indicates if the exam was a knowledge test only (true) or formal exam (false) */
46
+ sequence: number; /** Order of the modules in the course, if set */
47
+ }
48
+ export interface LearnUponWebhookCourseCompletionCertification {
49
+ id: number; /** For learning path completions only: Unique numeric identifier for the certification. See Learning path completed user attributes */
50
+ certificationName: string; /** The name of the certificate awarded, if any */
51
+ certExpiresAt: string; /** Set to a date (UTC) when the learner's certificate will expire: empty string indicates no expiry */
52
+ wasRecertified: boolean; /** If you have set up recertification policies on your course certificate, and the user was awarded a certificate, this value is set to true when the user was automatically recertified by LearnUpon on the course */
53
+ }