@uptime.app/contracts 2.0.55 → 2.0.57-rc.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 (169) hide show
  1. package/dist/cjs/b2b-organisation/b2b-organisation.d.ts +2 -0
  2. package/dist/cjs/b2b-organisation/b2b-organisation.d.ts.map +1 -1
  3. package/dist/cjs/text-to-speech/supported-voices.js +6 -6
  4. package/dist/cjs/text-to-speech/supported-voices.js.map +1 -1
  5. package/dist/esm/b2b-organisation/b2b-organisation.d.ts +2 -0
  6. package/dist/esm/b2b-organisation/b2b-organisation.d.ts.map +1 -1
  7. package/dist/esm/text-to-speech/supported-voices.js +6 -6
  8. package/dist/esm/text-to-speech/supported-voices.js.map +1 -1
  9. package/package.json +2 -2
  10. package/src/access-control/collection-access-control.ts +28 -28
  11. package/src/access-control/hack-access-control.ts +32 -32
  12. package/src/access-control/profile-access-control.ts +27 -27
  13. package/src/app-hack/app-full-hack.ts +9 -9
  14. package/src/app-hack/app-hack-metadata.ts +61 -61
  15. package/src/app-hack/app-restricted-hack.ts +22 -22
  16. package/src/b2b-content-access/b2b-content-access.ts +57 -57
  17. package/src/b2b-organisation/b2b-carousel.ts +33 -33
  18. package/src/b2b-organisation/b2b-org-idp-mapping.ts +27 -27
  19. package/src/b2b-organisation/b2b-organisation-events.ts +21 -21
  20. package/src/b2b-organisation/b2b-organisation-invitation.ts +45 -45
  21. package/src/b2b-organisation/b2b-organisation-member-events.ts +21 -21
  22. package/src/b2b-organisation/b2b-organisation-member.ts +19 -19
  23. package/src/b2b-organisation/b2b-organisation.ts +35 -33
  24. package/src/brand/brand-events.ts +21 -21
  25. package/src/brand/brand.ts +27 -27
  26. package/src/catalogue/catalogue.ts +147 -147
  27. package/src/cms-hack/cms-searchable-hack.ts +44 -44
  28. package/src/collection/collection-events.ts +21 -21
  29. package/src/collection/collection.ts +57 -57
  30. package/src/collection/enriched-collection-events.ts +18 -18
  31. package/src/collection/enriched-collection.ts +61 -61
  32. package/src/course/course-events.ts +20 -20
  33. package/src/course/course.ts +16 -16
  34. package/src/course-enrollment/course-enrollment-events.ts +21 -21
  35. package/src/course-enrollment/course-enrollment.ts +21 -21
  36. package/src/creator/creator-events.ts +32 -32
  37. package/src/creator/creator.ts +7 -7
  38. package/src/distribution/collection-distribution.ts +17 -17
  39. package/src/distribution/distribution-events.ts +61 -61
  40. package/src/distribution/hack-distribution.ts +18 -18
  41. package/src/draft-hack/draft-hack-events.ts +21 -21
  42. package/src/draft-hack/draft-hack.ts +190 -190
  43. package/src/draft-hack-generation/draft-hack-generation-commands.ts +10 -10
  44. package/src/draft-hack-generation/draft-hack-generation-events.ts +52 -52
  45. package/src/draft-hack-generation/draft-hack-generation.ts +39 -39
  46. package/src/enriched-b2b-organisation/enriched-b2b-organisation-events.ts +21 -21
  47. package/src/enriched-b2b-organisation/enriched-b2b-organisation.ts +33 -33
  48. package/src/enriched-hack/enriched-hack-events.ts +21 -21
  49. package/src/enriched-hack/enriched-hack.ts +109 -109
  50. package/src/enrichment-asset/hack-enrichment-video-events.ts +55 -55
  51. package/src/enrichment-asset/hack-enrichment-video.ts +40 -40
  52. package/src/entitlement/user-entitlements-commands.ts +54 -54
  53. package/src/entitlement/user-entitlements-events.ts +29 -29
  54. package/src/entitlement/user-entitlements.ts +18 -18
  55. package/src/flashcard/flashcard-events.ts +85 -85
  56. package/src/flashcard/flashcard.ts +138 -138
  57. package/src/hack/extracted-subject.ts +31 -31
  58. package/src/hack/hack-events.ts +21 -21
  59. package/src/hack/hack-published.ts +21 -21
  60. package/src/hack/hack-with-voice-events.ts +20 -20
  61. package/src/hack/hack-with-voice.ts +33 -33
  62. package/src/hack/hack.ts +117 -117
  63. package/src/hack/publish-hack-command.ts +20 -20
  64. package/src/hack-mapping/access-helper.ts +6 -6
  65. package/src/hack-mapping/app-full-hack.test.ts +12 -12
  66. package/src/hack-mapping/app-full-hack.ts +14 -14
  67. package/src/hack-mapping/app-hack-metadata.test.ts +22 -22
  68. package/src/hack-mapping/app-hack-metadata.ts +82 -82
  69. package/src/hack-mapping/app-restricted-hack.test.ts +11 -11
  70. package/src/hack-mapping/app-restricted-hack.ts +21 -21
  71. package/src/hack-mapping/remove-undefined-fields.ts +9 -9
  72. package/src/hack-mapping/test-data/enriched-hack.json +2576 -2576
  73. package/src/hack-mapping/test-data/expected-app-full-hack.json +2509 -2509
  74. package/src/hack-mapping/test-data/expected-app-hack-metadata.json +93 -93
  75. package/src/hack-mapping/test-data/expected-app-restricted-hack.json +799 -799
  76. package/src/hack-metadata/hack-metadata-events.ts +21 -21
  77. package/src/hack-metadata/hack-metadata.ts +17 -17
  78. package/src/hack-of-the-day/hack-of-the-day-events.ts +21 -21
  79. package/src/hack-of-the-day/hack-of-the-day.ts +13 -13
  80. package/src/hack-statistics/hack-statistics-events.ts +21 -21
  81. package/src/hack-statistics/hack-statistics.ts +9 -9
  82. package/src/hackbot/hack-generation-commands.ts +44 -44
  83. package/src/hackbot/hack-generation-trigger-events.ts +21 -21
  84. package/src/hackbot/hack-generation-trigger.ts +56 -56
  85. package/src/history/history-events.ts +21 -21
  86. package/src/history/history.ts +46 -46
  87. package/src/identity-provider/domain-identity-provider-events.ts +20 -20
  88. package/src/identity-provider/domain-identity-provider.ts +10 -10
  89. package/src/identity-provider/identity-provider-events.ts +20 -20
  90. package/src/identity-provider/identity-provider.ts +31 -31
  91. package/src/index.ts +190 -190
  92. package/src/interest/interest-events.ts +21 -21
  93. package/src/interest/interest.ts +15 -15
  94. package/src/knowledge-source/knowledge-source-events.ts +21 -21
  95. package/src/knowledge-source/knowledge-source.ts +43 -43
  96. package/src/knowledge-source-parsing/knowledge-source-metadata.ts +52 -52
  97. package/src/knowledge-source-parsing/knowledge-source-parsing-commands.ts +41 -41
  98. package/src/knowledge-source-parsing/knowledge-source-parsing-events.ts +30 -30
  99. package/src/knowledge-source-parsing/podcast-metadata.ts +44 -44
  100. package/src/knowledge-source-parsing/podcast-parsing-events.ts +28 -28
  101. package/src/knowledge-source-parsing/user-hack-generation-options.ts +7 -7
  102. package/src/learn-upon/from-lydia.ts +15 -15
  103. package/src/learn-upon/learn-upon-api-course.ts +53 -53
  104. package/src/learn-upon/learn-upon-api-enrollment.ts +45 -45
  105. package/src/learn-upon/learn-upon-api-portal.ts +18 -18
  106. package/src/learn-upon/learn-upon-api-user.ts +39 -39
  107. package/src/learn-upon/learn-upon-portal-config.ts +22 -22
  108. package/src/learn-upon/learn-upon-user-mapping.ts +10 -10
  109. package/src/learn-upon/learn-upon-webhook-course-completion.ts +52 -52
  110. package/src/learn-upon/learn-upon-webhook-course-update.ts +75 -75
  111. package/src/learn-upon/learn-upon-webhook-enrollment.ts +17 -17
  112. package/src/learn-upon/learn-upon-webhook-events.ts +40 -40
  113. package/src/learn-upon/learn-upon-webhook-module-complete.ts +29 -29
  114. package/src/learn-upon/learn-upon-webhook-types.ts +338 -338
  115. package/src/localisation/live-locales.ts +45 -45
  116. package/src/localisation/locale-language.ts +4 -4
  117. package/src/localisation/supported-languages.ts +11 -11
  118. package/src/localisation/supported-locales.ts +67 -67
  119. package/src/message-bus/Context.ts +7 -7
  120. package/src/moderation/hack-moderation-result-events.ts +18 -18
  121. package/src/moderation/hack-moderation-result.ts +27 -27
  122. package/src/partner/partner-events.ts +21 -21
  123. package/src/partner/partner.ts +7 -7
  124. package/src/pending-hack/pending-hack-events.ts +20 -20
  125. package/src/pending-hack/pending-hack-with-voice-events.ts +20 -20
  126. package/src/pending-hack/pending-hack-with-voice.ts +25 -25
  127. package/src/pending-hack/pending-hack.ts +78 -78
  128. package/src/preferences/preferences-events.ts +15 -15
  129. package/src/preferences/preferences.ts +35 -35
  130. package/src/profile/profile-events.ts +41 -41
  131. package/src/profile/profile.ts +36 -36
  132. package/src/profile/translated-profile.ts +13 -13
  133. package/src/referral/referral-events.ts +41 -41
  134. package/src/referral/referral.ts +76 -76
  135. package/src/saved/saved-collection-events.ts +19 -19
  136. package/src/saved/saved-collection.ts +8 -8
  137. package/src/segment/segment-commands.ts +75 -75
  138. package/src/segment/segment-events.ts +42 -42
  139. package/src/segment/segment-with-voice.ts +8 -8
  140. package/src/segment/segment.ts +82 -82
  141. package/src/skin/skin-events.ts +21 -21
  142. package/src/skin/skin.ts +6 -6
  143. package/src/spark/spark-board-read-model.ts +17 -17
  144. package/src/spark/spark-board.ts +12 -12
  145. package/src/spark/spark-events.ts +42 -42
  146. package/src/spark/spark.ts +75 -75
  147. package/src/text-to-speech/create-speech-commands.ts +22 -22
  148. package/src/text-to-speech/speech-created-events.ts +10 -10
  149. package/src/text-to-speech/supported-voices.ts +183 -183
  150. package/src/text-to-speech/text-segment.ts +29 -29
  151. package/src/theme/theme-events.ts +21 -21
  152. package/src/theme/theme.ts +68 -68
  153. package/src/translation/translation-events.ts +73 -73
  154. package/src/translation/translation.ts +25 -25
  155. package/src/trending/trending-events.ts +21 -21
  156. package/src/trending/trending-hacks.ts +8 -8
  157. package/src/user/cognito-user-authentication-log.ts +7 -7
  158. package/src/user/get-user.ts +60 -60
  159. package/src/user/user-events.ts +30 -30
  160. package/src/user-context/user-context-events.ts +21 -21
  161. package/src/user-context/user-context.ts +15 -15
  162. package/src/user-notification-context/user-notification-context-events.ts +21 -21
  163. package/src/user-notification-context/user-notification-context.ts +9 -9
  164. package/src/user-statistics/user-statistics-events.ts +97 -97
  165. package/src/user-statistics/user-statistics.ts +82 -82
  166. package/src/video-cropping/video-cropping-events.ts +43 -43
  167. package/src/video-cropping/video-metadata.ts +12 -12
  168. package/tsconfig.cjs.json +7 -7
  169. package/tsconfig.npm.json +22 -22
@@ -1,46 +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 */
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
46
  }
@@ -1,19 +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) */
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
19
  }
@@ -1,40 +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 */
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
40
  }
@@ -1,23 +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 */
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
23
  }
@@ -1,11 +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 */
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
11
  }
@@ -1,53 +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 */
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
53
  }
@@ -1,76 +1,76 @@
1
- /**
2
- * https://docs.learnupon.com/webhooks/v2/#course-update
3
- * TODO - many of these fields may be optional
4
- */
5
- export interface LearnUponWebhookCourseUpdate {
6
- courseId: number; /** Unique identifier numeric for the course */
7
- courseName: string; /** The title of the course */
8
- courseReferenceCode: string; /** If you have course reference codes enabled on your portal, this attribute contains the references and data from that attribute */
9
- courseKeywords: string; /** If you have keywords added to your course, they appear here */
10
- courseShortDescription: string; /** The short description, which appears on the My Courses page or the catalog */
11
- datePublished: string; /** The date and time that the course was first published, in UTC format */
12
- courseVersion: number; /** The version of the course */
13
- courseSourceId: number; /** This is the source course_id for each version of a course. For example: for 3 courses, A, B, C (versions 1, 2, 3 respectively) each of these courses use the same courseSourceId value, the id of the first course. This attribute lets you group together courses that stem from the same root course, in their version tree */
14
- courseStatus: string; /** The status of the course at the time LearnUpon sends the webhook, for courses with a status of Published, Under Revision, Archived or Deleted */
15
- thumbnailImageUrl: string; /** The main thumbnail image URL for the course */
16
- cataloged: boolean; /** Indicates if the course is available in the internal catalog (true). Default value is false */
17
- modules: LearnUponWebhookCourseModule[]; /** The list of modules and module types in the course */
18
- courseIsSellable: boolean; /** Notes if the course is available on the storefront. Default value is false, for not sellable */
19
- price: number; /** The price of the course */
20
- membershipPricing: LearnUponWebhookCourseUpdateMembershipPricing[]; /** If you use associations in your portal, the pricing for each type of member is in a listed/embedded object */
21
- dueDate: LearnUponWebhookCourseUpdateDueDate; /** The course due date, or set number of days to complete the course after an enrollment for a learner */
22
- accessExpires: LearnUponWebhookCourseAccessExpires; /** The course expiry date, or set number of days before an enrollment expires after an enrollment for a learner */
23
- difficulty: string; /** Indicates the difficulty level on your course */
24
- courseLength: number; /** The course length if specified */
25
- courseLengthUnit: string; /** Indicates the length unit for your course, hours or minutes */
26
- certificate: LearnUponWebhookCourseUpdateCertificate; /** If learners can get a certificate on this course, this attribute contains the information */
27
- credits: LearnUponWebhookCourseUpdateCredits[]; /** If you issue credits for your course, the credits appear here in a listed/embedded object */
28
- badges: LearnUponWebhookCourseUpdateBadges[]; /** Describes the badges learners can receive, in a listed/embedded object */
29
- eventCreated: string; /** Date and time of course completion in UTC format */
30
- }
31
-
32
- export interface LearnUponWebhookCourseUpdateCertificate {
33
- certificateName: string; /** The name of the certificate awarded to a learner, on successful completion of the course */
34
- certExpiresNumDaysAfterAward: number; /** The set number of days before a certificate expires after awarding */
35
- autoReenroll: boolean; /** */
36
- autoReenrollNumDaysBeforeCertExpires: number; /** If the learner is expected to renew their certificate before it expires, this attribute lists the number of days before the expiry, to auto re-enroll the learner */
37
- }
38
-
39
- export interface LearnUponWebhookCourseUpdateDueDate {
40
- numOfDaysAfterEnrollment: number; /** The number of days after enrollment on this course, for completing the course */
41
- setDate: string; /** The date and time when this course is due for completion in UTC format */
42
- }
43
-
44
- export interface LearnUponWebhookCourseAccessExpires {
45
- numOfDaysAfterEnrollment: number; /** The number of days learners can access this course before it expires */
46
- setDate: string; /** The set expiry date for this course in UTC format. If set, learners cannot access after this date */
47
- }
48
-
49
-
50
- export interface LearnUponWebhookCourseModule {
51
- id: number; /** Unique id of the module in LearnUpon */
52
- type: string; /** The type of the module: values include module, page, exam, scorm, tincan, assignment, survey, checklist, training, event */
53
- isKnowledgeCheck: boolean; /** If the module is an exam, indicates if the exam was a knowledge test only (true) or formal exam (false) */
54
- startAt: string; /** Legacy ILTs only: start date and time that the ILT session is scheduled, in UTC format */
55
- endAt: string; /** Legacy ILTs only: end date and time that the ILT session is scheduled to complete, in UTC format */
56
- maxCapacity: number; /** Legacy ILTs only: the maximum number of learners allowed to attend the ILT session */
57
- }
58
-
59
-
60
- export interface LearnUponWebhookCourseUpdateMembershipPricing {
61
- name: string; /** The name provided as the membership type in your portal */
62
- price: number; /** The course price for the specific membership type */
63
- }
64
-
65
-
66
- export interface LearnUponWebhookCourseUpdateCredits {
67
- name: string; /** The name of the credit that was awarded, like "CPD" */
68
- number: number; /** The number of credits that were awarded to the learner by completing the course, like 5.0 */
69
- }
70
-
71
- export interface LearnUponWebhookCourseUpdateBadges {
72
- name: string; /** The name of the badge */
73
- type: string; /** The type of badge */
74
- points: number; /** The number of points awarded */
75
- achieved: string; /** Notes when learner will receive the badge: for example, on completion of the course */
1
+ /**
2
+ * https://docs.learnupon.com/webhooks/v2/#course-update
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponWebhookCourseUpdate {
6
+ courseId: number; /** Unique identifier numeric for the course */
7
+ courseName: string; /** The title of the course */
8
+ courseReferenceCode: string; /** If you have course reference codes enabled on your portal, this attribute contains the references and data from that attribute */
9
+ courseKeywords: string; /** If you have keywords added to your course, they appear here */
10
+ courseShortDescription: string; /** The short description, which appears on the My Courses page or the catalog */
11
+ datePublished: string; /** The date and time that the course was first published, in UTC format */
12
+ courseVersion: number; /** The version of the course */
13
+ courseSourceId: number; /** This is the source course_id for each version of a course. For example: for 3 courses, A, B, C (versions 1, 2, 3 respectively) each of these courses use the same courseSourceId value, the id of the first course. This attribute lets you group together courses that stem from the same root course, in their version tree */
14
+ courseStatus: string; /** The status of the course at the time LearnUpon sends the webhook, for courses with a status of Published, Under Revision, Archived or Deleted */
15
+ thumbnailImageUrl: string; /** The main thumbnail image URL for the course */
16
+ cataloged: boolean; /** Indicates if the course is available in the internal catalog (true). Default value is false */
17
+ modules: LearnUponWebhookCourseModule[]; /** The list of modules and module types in the course */
18
+ courseIsSellable: boolean; /** Notes if the course is available on the storefront. Default value is false, for not sellable */
19
+ price: number; /** The price of the course */
20
+ membershipPricing: LearnUponWebhookCourseUpdateMembershipPricing[]; /** If you use associations in your portal, the pricing for each type of member is in a listed/embedded object */
21
+ dueDate: LearnUponWebhookCourseUpdateDueDate; /** The course due date, or set number of days to complete the course after an enrollment for a learner */
22
+ accessExpires: LearnUponWebhookCourseAccessExpires; /** The course expiry date, or set number of days before an enrollment expires after an enrollment for a learner */
23
+ difficulty: string; /** Indicates the difficulty level on your course */
24
+ courseLength: number; /** The course length if specified */
25
+ courseLengthUnit: string; /** Indicates the length unit for your course, hours or minutes */
26
+ certificate: LearnUponWebhookCourseUpdateCertificate; /** If learners can get a certificate on this course, this attribute contains the information */
27
+ credits: LearnUponWebhookCourseUpdateCredits[]; /** If you issue credits for your course, the credits appear here in a listed/embedded object */
28
+ badges: LearnUponWebhookCourseUpdateBadges[]; /** Describes the badges learners can receive, in a listed/embedded object */
29
+ eventCreated: string; /** Date and time of course completion in UTC format */
30
+ }
31
+
32
+ export interface LearnUponWebhookCourseUpdateCertificate {
33
+ certificateName: string; /** The name of the certificate awarded to a learner, on successful completion of the course */
34
+ certExpiresNumDaysAfterAward: number; /** The set number of days before a certificate expires after awarding */
35
+ autoReenroll: boolean; /** */
36
+ autoReenrollNumDaysBeforeCertExpires: number; /** If the learner is expected to renew their certificate before it expires, this attribute lists the number of days before the expiry, to auto re-enroll the learner */
37
+ }
38
+
39
+ export interface LearnUponWebhookCourseUpdateDueDate {
40
+ numOfDaysAfterEnrollment: number; /** The number of days after enrollment on this course, for completing the course */
41
+ setDate: string; /** The date and time when this course is due for completion in UTC format */
42
+ }
43
+
44
+ export interface LearnUponWebhookCourseAccessExpires {
45
+ numOfDaysAfterEnrollment: number; /** The number of days learners can access this course before it expires */
46
+ setDate: string; /** The set expiry date for this course in UTC format. If set, learners cannot access after this date */
47
+ }
48
+
49
+
50
+ export interface LearnUponWebhookCourseModule {
51
+ id: number; /** Unique id of the module in LearnUpon */
52
+ type: string; /** The type of the module: values include module, page, exam, scorm, tincan, assignment, survey, checklist, training, event */
53
+ isKnowledgeCheck: boolean; /** If the module is an exam, indicates if the exam was a knowledge test only (true) or formal exam (false) */
54
+ startAt: string; /** Legacy ILTs only: start date and time that the ILT session is scheduled, in UTC format */
55
+ endAt: string; /** Legacy ILTs only: end date and time that the ILT session is scheduled to complete, in UTC format */
56
+ maxCapacity: number; /** Legacy ILTs only: the maximum number of learners allowed to attend the ILT session */
57
+ }
58
+
59
+
60
+ export interface LearnUponWebhookCourseUpdateMembershipPricing {
61
+ name: string; /** The name provided as the membership type in your portal */
62
+ price: number; /** The course price for the specific membership type */
63
+ }
64
+
65
+
66
+ export interface LearnUponWebhookCourseUpdateCredits {
67
+ name: string; /** The name of the credit that was awarded, like "CPD" */
68
+ number: number; /** The number of credits that were awarded to the learner by completing the course, like 5.0 */
69
+ }
70
+
71
+ export interface LearnUponWebhookCourseUpdateBadges {
72
+ name: string; /** The name of the badge */
73
+ type: string; /** The type of badge */
74
+ points: number; /** The number of points awarded */
75
+ achieved: string; /** Notes when learner will receive the badge: for example, on completion of the course */
76
76
  }
@@ -1,18 +1,18 @@
1
- /**
2
- * LearnUpon enrollment representation https://docs.learnupon.com/webhooks/v2/#course-enrollment
3
- * TODO - many of these fields may be optional
4
- */
5
- export interface LearnUponWebhookEnrollment {
6
- eventCreated: string; /** Date of enrollment in UTC format */
7
- user: LearnUponWebhookEnrollmentUser /** List of unique identifiers for an individual user */
8
- enrollmentId: number; /** Unique identifier for this enrollment action */
9
- dueDate: string; /** The course due date for this enrollment */
10
- courseId: number; /** Unique identifier for the course */
11
- 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 is automatically recertified by LearnUpon on the course. Default false */
12
- }
13
-
14
- export interface LearnUponWebhookEnrollmentUser {
15
- userId: number;
16
- email : string;
17
- username: string;
1
+ /**
2
+ * LearnUpon enrollment representation https://docs.learnupon.com/webhooks/v2/#course-enrollment
3
+ * TODO - many of these fields may be optional
4
+ */
5
+ export interface LearnUponWebhookEnrollment {
6
+ eventCreated: string; /** Date of enrollment in UTC format */
7
+ user: LearnUponWebhookEnrollmentUser /** List of unique identifiers for an individual user */
8
+ enrollmentId: number; /** Unique identifier for this enrollment action */
9
+ dueDate: string; /** The course due date for this enrollment */
10
+ courseId: number; /** Unique identifier for the course */
11
+ 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 is automatically recertified by LearnUpon on the course. Default false */
12
+ }
13
+
14
+ export interface LearnUponWebhookEnrollmentUser {
15
+ userId: number;
16
+ email : string;
17
+ username: string;
18
18
  }