@iblai/iblai-api 4.251.0-ai → 4.252.0-ai

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 (49) hide show
  1. package/dist/index.cjs.js +711 -8
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +712 -9
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +711 -8
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +16 -0
  8. package/dist/types/models/EventsEnum.d.ts +34 -0
  9. package/dist/types/models/PaginatedWatchedGroupListList.d.ts +7 -0
  10. package/dist/types/models/PaginatedWatchedUserReadList.d.ts +7 -0
  11. package/dist/types/models/PaginatedWatcherReadList.d.ts +7 -0
  12. package/dist/types/models/PatchedWatchedGroupUpdate.d.ts +8 -0
  13. package/dist/types/models/PatchedWatcherUpdate.d.ts +7 -0
  14. package/dist/types/models/WatchedGroupCreate.d.ts +21 -0
  15. package/dist/types/models/WatchedGroupDetail.d.ts +16 -0
  16. package/dist/types/models/WatchedGroupList.d.ts +8 -0
  17. package/dist/types/models/WatchedGroupUpdate.d.ts +8 -0
  18. package/dist/types/models/WatchedUserRead.d.ts +11 -0
  19. package/dist/types/models/WatchedUserWrite.d.ts +9 -0
  20. package/dist/types/models/WatcherEntry.d.ts +8 -0
  21. package/dist/types/models/WatcherRead.d.ts +16 -0
  22. package/dist/types/models/WatcherUpdate.d.ts +7 -0
  23. package/dist/types/models/WatcherWrite.d.ts +11 -0
  24. package/dist/types/services/AiAccountService.d.ts +84 -4
  25. package/dist/types/services/AiMentorService.d.ts +63 -3
  26. package/dist/types/services/CoreService.d.ts +364 -0
  27. package/package.json +1 -1
  28. package/sdk_schema.yml +1427 -115
  29. package/src/core/OpenAPI.ts +1 -1
  30. package/src/index.ts +16 -0
  31. package/src/models/EventsEnum.ts +38 -0
  32. package/src/models/PaginatedWatchedGroupListList.ts +12 -0
  33. package/src/models/PaginatedWatchedUserReadList.ts +12 -0
  34. package/src/models/PaginatedWatcherReadList.ts +12 -0
  35. package/src/models/PatchedWatchedGroupUpdate.ts +13 -0
  36. package/src/models/PatchedWatcherUpdate.ts +12 -0
  37. package/src/models/WatchedGroupCreate.ts +26 -0
  38. package/src/models/WatchedGroupDetail.ts +21 -0
  39. package/src/models/WatchedGroupList.ts +13 -0
  40. package/src/models/WatchedGroupUpdate.ts +13 -0
  41. package/src/models/WatchedUserRead.ts +16 -0
  42. package/src/models/WatchedUserWrite.ts +14 -0
  43. package/src/models/WatcherEntry.ts +13 -0
  44. package/src/models/WatcherRead.ts +21 -0
  45. package/src/models/WatcherUpdate.ts +12 -0
  46. package/src/models/WatcherWrite.ts +16 -0
  47. package/src/services/AiAccountService.ts +84 -4
  48. package/src/services/AiMentorService.ts +63 -3
  49. package/src/services/CoreService.ts +711 -0
package/dist/index.cjs.js CHANGED
@@ -110,7 +110,7 @@ class CancelablePromise {
110
110
 
111
111
  const OpenAPI = {
112
112
  BASE: 'https://base.manager.iblai.app',
113
- VERSION: '4.251.0-ai-plus',
113
+ VERSION: '4.252.0-ai-plus',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -499,6 +499,46 @@ exports.EthnicityEnum = void 0;
499
499
  EthnicityEnum["OTHER"] = "other";
500
500
  })(exports.EthnicityEnum || (exports.EthnicityEnum = {}));
501
501
 
502
+ /* generated using openapi-typescript-codegen -- do not edit */
503
+ /* istanbul ignore file */
504
+ /* tslint:disable */
505
+ /* eslint-disable */
506
+ /**
507
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - Course Enrollment
508
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin: Course Enrollment
509
+ * * `USER_NOTIF_USER_INACTIVITY` - User Inactivity
510
+ * * `USER_NOTIF_COURSE_COMPLETION` - Course Completion
511
+ * * `USER_NOTIF_CREDENTIALS` - Credentials Issued
512
+ * * `USER_NOTIF_LEARNER_PROGRESS` - Learner Progress
513
+ * * `PROACTIVE_LEARNER_NOTIFICATION` - Proactive Learner Notification
514
+ * * `ACTIVITY_NEW_CONTENT` - New Activity Content
515
+ * * `ACTIVITY_COURSE_MILESTONE` - Course Milestone Reached
516
+ * * `SKILL_MASTERY_CHANGE` - Skill Mastery Change
517
+ * * `PROGRAM_ENROLLMENT_CONFIRMATION` - Program Enrollment Confirmed
518
+ * * `PATHWAY_ENROLLMENT_CONFIRMATION` - Pathway Enrollment Confirmed
519
+ * * `COURSE_SCHEDULE_CHANGE` - Course Schedule Change
520
+ * * `COURSES_PROGRESS_SUMMARY` - Courses Progress Summary
521
+ * * `SUBSECTION_GRADE_UPDATE` - Subsection Grade Update
522
+ */
523
+ exports.EventsEnum = void 0;
524
+ (function (EventsEnum) {
525
+ EventsEnum["USER_NOTIF_COURSE_ENROLLMENT"] = "USER_NOTIF_COURSE_ENROLLMENT";
526
+ EventsEnum["ADMIN_NOTIF_COURSE_ENROLLMENT"] = "ADMIN_NOTIF_COURSE_ENROLLMENT";
527
+ EventsEnum["USER_NOTIF_USER_INACTIVITY"] = "USER_NOTIF_USER_INACTIVITY";
528
+ EventsEnum["USER_NOTIF_COURSE_COMPLETION"] = "USER_NOTIF_COURSE_COMPLETION";
529
+ EventsEnum["USER_NOTIF_CREDENTIALS"] = "USER_NOTIF_CREDENTIALS";
530
+ EventsEnum["USER_NOTIF_LEARNER_PROGRESS"] = "USER_NOTIF_LEARNER_PROGRESS";
531
+ EventsEnum["PROACTIVE_LEARNER_NOTIFICATION"] = "PROACTIVE_LEARNER_NOTIFICATION";
532
+ EventsEnum["ACTIVITY_NEW_CONTENT"] = "ACTIVITY_NEW_CONTENT";
533
+ EventsEnum["ACTIVITY_COURSE_MILESTONE"] = "ACTIVITY_COURSE_MILESTONE";
534
+ EventsEnum["SKILL_MASTERY_CHANGE"] = "SKILL_MASTERY_CHANGE";
535
+ EventsEnum["PROGRAM_ENROLLMENT_CONFIRMATION"] = "PROGRAM_ENROLLMENT_CONFIRMATION";
536
+ EventsEnum["PATHWAY_ENROLLMENT_CONFIRMATION"] = "PATHWAY_ENROLLMENT_CONFIRMATION";
537
+ EventsEnum["COURSE_SCHEDULE_CHANGE"] = "COURSE_SCHEDULE_CHANGE";
538
+ EventsEnum["COURSES_PROGRESS_SUMMARY"] = "COURSES_PROGRESS_SUMMARY";
539
+ EventsEnum["SUBSECTION_GRADE_UPDATE"] = "SUBSECTION_GRADE_UPDATE";
540
+ })(exports.EventsEnum || (exports.EventsEnum = {}));
541
+
502
542
  /* generated using openapi-typescript-codegen -- do not edit */
503
543
  /* istanbul ignore file */
504
544
  /* tslint:disable */
@@ -3096,7 +3136,27 @@ class AiAccountService {
3096
3136
  });
3097
3137
  }
3098
3138
  /**
3099
- * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent
3139
+ * Wires RBAC into a DRF view.
3140
+ *
3141
+ * Two responsibilities:
3142
+ *
3143
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
3144
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
3145
+ *
3146
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
3147
+ * Server-to-server tokens authenticate as Django auth users with no
3148
+ * relationship to a platform EdxUser. The convention is "we trust this
3149
+ * caller — bypass RBAC and serve the request."
3150
+ *
3151
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
3152
+ * the early exit skips all RBAC prep work:
3153
+ *
3154
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
3155
+ * return
3156
+ *
3157
+ * Use `is_service_account` at any other touch points where caller
3158
+ * identity matters (queryset ownership filters, owner attribution on
3159
+ * create, serializer context, etc.).
3100
3160
  * @returns ConnectedService
3101
3161
  * @throws ApiError
3102
3162
  */
@@ -3124,7 +3184,27 @@ class AiAccountService {
3124
3184
  });
3125
3185
  }
3126
3186
  /**
3127
- * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent
3187
+ * Wires RBAC into a DRF view.
3188
+ *
3189
+ * Two responsibilities:
3190
+ *
3191
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
3192
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
3193
+ *
3194
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
3195
+ * Server-to-server tokens authenticate as Django auth users with no
3196
+ * relationship to a platform EdxUser. The convention is "we trust this
3197
+ * caller — bypass RBAC and serve the request."
3198
+ *
3199
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
3200
+ * the early exit skips all RBAC prep work:
3201
+ *
3202
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
3203
+ * return
3204
+ *
3205
+ * Use `is_service_account` at any other touch points where caller
3206
+ * identity matters (queryset ownership filters, owner attribution on
3207
+ * create, serializer context, etc.).
3128
3208
  * @returns ConnectedService
3129
3209
  * @throws ApiError
3130
3210
  */
@@ -3144,7 +3224,27 @@ class AiAccountService {
3144
3224
  });
3145
3225
  }
3146
3226
  /**
3147
- * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent
3227
+ * Wires RBAC into a DRF view.
3228
+ *
3229
+ * Two responsibilities:
3230
+ *
3231
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
3232
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
3233
+ *
3234
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
3235
+ * Server-to-server tokens authenticate as Django auth users with no
3236
+ * relationship to a platform EdxUser. The convention is "we trust this
3237
+ * caller — bypass RBAC and serve the request."
3238
+ *
3239
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
3240
+ * the early exit skips all RBAC prep work:
3241
+ *
3242
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
3243
+ * return
3244
+ *
3245
+ * Use `is_service_account` at any other touch points where caller
3246
+ * identity matters (queryset ownership filters, owner attribution on
3247
+ * create, serializer context, etc.).
3148
3248
  * @returns void
3149
3249
  * @throws ApiError
3150
3250
  */
@@ -3164,7 +3264,27 @@ class AiAccountService {
3164
3264
  });
3165
3265
  }
3166
3266
  /**
3167
- * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent
3267
+ * Wires RBAC into a DRF view.
3268
+ *
3269
+ * Two responsibilities:
3270
+ *
3271
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
3272
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
3273
+ *
3274
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
3275
+ * Server-to-server tokens authenticate as Django auth users with no
3276
+ * relationship to a platform EdxUser. The convention is "we trust this
3277
+ * caller — bypass RBAC and serve the request."
3278
+ *
3279
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
3280
+ * the early exit skips all RBAC prep work:
3281
+ *
3282
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
3283
+ * return
3284
+ *
3285
+ * Use `is_service_account` at any other touch points where caller
3286
+ * identity matters (queryset ownership filters, owner attribution on
3287
+ * create, serializer context, etc.).
3168
3288
  * @returns OAuthStartResponse Starts the OAuth flow for the given provider and service
3169
3289
  * @throws ApiError
3170
3290
  */
@@ -21455,7 +21575,27 @@ class AiMentorService {
21455
21575
  });
21456
21576
  }
21457
21577
  /**
21458
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
21578
+ * Wires RBAC into a DRF view.
21579
+ *
21580
+ * Two responsibilities:
21581
+ *
21582
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
21583
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
21584
+ *
21585
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
21586
+ * Server-to-server tokens authenticate as Django auth users with no
21587
+ * relationship to a platform EdxUser. The convention is "we trust this
21588
+ * caller — bypass RBAC and serve the request."
21589
+ *
21590
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
21591
+ * the early exit skips all RBAC prep work:
21592
+ *
21593
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
21594
+ * return
21595
+ *
21596
+ * Use `is_service_account` at any other touch points where caller
21597
+ * identity matters (queryset ownership filters, owner attribution on
21598
+ * create, serializer context, etc.).
21459
21599
  * @returns PaginatedGoogleAgentDetailList
21460
21600
  * @throws ApiError
21461
21601
  */
@@ -21503,7 +21643,27 @@ class AiMentorService {
21503
21643
  });
21504
21644
  }
21505
21645
  /**
21506
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
21646
+ * Wires RBAC into a DRF view.
21647
+ *
21648
+ * Two responsibilities:
21649
+ *
21650
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
21651
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
21652
+ *
21653
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
21654
+ * Server-to-server tokens authenticate as Django auth users with no
21655
+ * relationship to a platform EdxUser. The convention is "we trust this
21656
+ * caller — bypass RBAC and serve the request."
21657
+ *
21658
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
21659
+ * the early exit skips all RBAC prep work:
21660
+ *
21661
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
21662
+ * return
21663
+ *
21664
+ * Use `is_service_account` at any other touch points where caller
21665
+ * identity matters (queryset ownership filters, owner attribution on
21666
+ * create, serializer context, etc.).
21507
21667
  * @returns GoogleAgentDetail
21508
21668
  * @throws ApiError
21509
21669
  */
@@ -21557,7 +21717,27 @@ class AiMentorService {
21557
21717
  });
21558
21718
  }
21559
21719
  /**
21560
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
21720
+ * Wires RBAC into a DRF view.
21721
+ *
21722
+ * Two responsibilities:
21723
+ *
21724
+ * 1. When RBAC is enabled, replace the view's `permission_classes` with
21725
+ * `IsEdxAuthenticated` (the gate the RBAC layer assumes).
21726
+ *
21727
+ * 2. Detect server-to-server (Django auth) callers via `is_service_account`.
21728
+ * Server-to-server tokens authenticate as Django auth users with no
21729
+ * relationship to a platform EdxUser. The convention is "we trust this
21730
+ * caller — bypass RBAC and serve the request."
21731
+ *
21732
+ * Combine it with the RBAC-disabled check at the top of `initial()` so
21733
+ * the early exit skips all RBAC prep work:
21734
+ *
21735
+ * if not ConfigFlags.rbac_enabled() or self.is_service_account:
21736
+ * return
21737
+ *
21738
+ * Use `is_service_account` at any other touch points where caller
21739
+ * identity matters (queryset ownership filters, owner attribution on
21740
+ * create, serializer context, etc.).
21561
21741
  * @returns void
21562
21742
  * @throws ApiError
21563
21743
  */
@@ -42191,6 +42371,529 @@ class CoreService {
42191
42371
  }
42192
42372
  });
42193
42373
  }
42374
+ /**
42375
+ * List watched groups visible to the caller
42376
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42377
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42378
+ * @returns PaginatedWatchedGroupListList
42379
+ * @throws ApiError
42380
+ */
42381
+ static coreWatchedGroupsList({
42382
+ limit,
42383
+ offset,
42384
+ platformKey
42385
+ }) {
42386
+ return request(OpenAPI, {
42387
+ method: 'GET',
42388
+ url: '/api/core/watched-groups/',
42389
+ query: {
42390
+ 'limit': limit,
42391
+ 'offset': offset,
42392
+ 'platform_key': platformKey
42393
+ },
42394
+ errors: {
42395
+ 403: `Permission denied`,
42396
+ 404: `Platform not found`
42397
+ }
42398
+ });
42399
+ }
42400
+ /**
42401
+ * Create a watched group
42402
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42403
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42404
+ * @returns WatchedGroupDetail
42405
+ * @throws ApiError
42406
+ */
42407
+ static coreWatchedGroupsCreate({
42408
+ requestBody,
42409
+ platformKey,
42410
+ watchedUserLimit,
42411
+ watcherLimit
42412
+ }) {
42413
+ return request(OpenAPI, {
42414
+ method: 'POST',
42415
+ url: '/api/core/watched-groups/',
42416
+ query: {
42417
+ 'platform_key': platformKey,
42418
+ 'watched_user_limit': watchedUserLimit,
42419
+ 'watcher_limit': watcherLimit
42420
+ },
42421
+ body: requestBody,
42422
+ mediaType: 'application/json',
42423
+ errors: {
42424
+ 400: `Invalid request`,
42425
+ 403: `Permission denied`
42426
+ }
42427
+ });
42428
+ }
42429
+ /**
42430
+ * Retrieve a watched group
42431
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42432
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42433
+ * @returns WatchedGroupDetail
42434
+ * @throws ApiError
42435
+ */
42436
+ static coreWatchedGroupsRetrieve({
42437
+ id,
42438
+ platformKey,
42439
+ watchedUserLimit,
42440
+ watcherLimit
42441
+ }) {
42442
+ return request(OpenAPI, {
42443
+ method: 'GET',
42444
+ url: '/api/core/watched-groups/{id}/',
42445
+ path: {
42446
+ 'id': id
42447
+ },
42448
+ query: {
42449
+ 'platform_key': platformKey,
42450
+ 'watched_user_limit': watchedUserLimit,
42451
+ 'watcher_limit': watcherLimit
42452
+ },
42453
+ errors: {
42454
+ 403: `Permission denied`,
42455
+ 404: `Not found`
42456
+ }
42457
+ });
42458
+ }
42459
+ /**
42460
+ * Update a watched group's name
42461
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42462
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42463
+ * @returns WatchedGroupDetail
42464
+ * @throws ApiError
42465
+ */
42466
+ static coreWatchedGroupsUpdate({
42467
+ id,
42468
+ platformKey,
42469
+ watchedUserLimit,
42470
+ watcherLimit,
42471
+ requestBody
42472
+ }) {
42473
+ return request(OpenAPI, {
42474
+ method: 'PUT',
42475
+ url: '/api/core/watched-groups/{id}/',
42476
+ path: {
42477
+ 'id': id
42478
+ },
42479
+ query: {
42480
+ 'platform_key': platformKey,
42481
+ 'watched_user_limit': watchedUserLimit,
42482
+ 'watcher_limit': watcherLimit
42483
+ },
42484
+ body: requestBody,
42485
+ mediaType: 'application/json',
42486
+ errors: {
42487
+ 400: `Invalid request`,
42488
+ 403: `Permission denied`,
42489
+ 404: `Not found`
42490
+ }
42491
+ });
42492
+ }
42493
+ /**
42494
+ * Partially update a watched group's name
42495
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42496
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42497
+ * @returns WatchedGroupDetail
42498
+ * @throws ApiError
42499
+ */
42500
+ static coreWatchedGroupsPartialUpdate({
42501
+ id,
42502
+ platformKey,
42503
+ watchedUserLimit,
42504
+ watcherLimit,
42505
+ requestBody
42506
+ }) {
42507
+ return request(OpenAPI, {
42508
+ method: 'PATCH',
42509
+ url: '/api/core/watched-groups/{id}/',
42510
+ path: {
42511
+ 'id': id
42512
+ },
42513
+ query: {
42514
+ 'platform_key': platformKey,
42515
+ 'watched_user_limit': watchedUserLimit,
42516
+ 'watcher_limit': watcherLimit
42517
+ },
42518
+ body: requestBody,
42519
+ mediaType: 'application/json',
42520
+ errors: {
42521
+ 400: `Invalid request`,
42522
+ 403: `Permission denied`,
42523
+ 404: `Not found`
42524
+ }
42525
+ });
42526
+ }
42527
+ /**
42528
+ * Delete a watched group
42529
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
42530
+ * POST here accepts an optional `watchers` array as a create-time convenience.
42531
+ * @returns void
42532
+ * @throws ApiError
42533
+ */
42534
+ static coreWatchedGroupsDestroy({
42535
+ id,
42536
+ platformKey
42537
+ }) {
42538
+ return request(OpenAPI, {
42539
+ method: 'DELETE',
42540
+ url: '/api/core/watched-groups/{id}/',
42541
+ path: {
42542
+ 'id': id
42543
+ },
42544
+ query: {
42545
+ 'platform_key': platformKey
42546
+ },
42547
+ errors: {
42548
+ 403: `Permission denied`,
42549
+ 404: `Not found`
42550
+ }
42551
+ });
42552
+ }
42553
+ /**
42554
+ * List watched users in a watched group (paginated)
42555
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
42556
+ *
42557
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
42558
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
42559
+ * this feature. Add via POST, remove via DELETE.
42560
+ * @returns PaginatedWatchedUserReadList
42561
+ * @throws ApiError
42562
+ */
42563
+ static coreWatchedGroupsWatchedUsersList({
42564
+ watchedGroupPk,
42565
+ limit,
42566
+ offset,
42567
+ platformKey
42568
+ }) {
42569
+ return request(OpenAPI, {
42570
+ method: 'GET',
42571
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/',
42572
+ path: {
42573
+ 'watched_group_pk': watchedGroupPk
42574
+ },
42575
+ query: {
42576
+ 'limit': limit,
42577
+ 'offset': offset,
42578
+ 'platform_key': platformKey
42579
+ },
42580
+ errors: {
42581
+ 403: `Permission denied`,
42582
+ 404: `WatchedGroup not found`
42583
+ }
42584
+ });
42585
+ }
42586
+ /**
42587
+ * Add a user to the watched group
42588
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
42589
+ *
42590
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
42591
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
42592
+ * this feature. Add via POST, remove via DELETE.
42593
+ * @returns WatchedUserRead
42594
+ * @throws ApiError
42595
+ */
42596
+ static coreWatchedGroupsWatchedUsersCreate({
42597
+ watchedGroupPk,
42598
+ requestBody,
42599
+ platformKey
42600
+ }) {
42601
+ return request(OpenAPI, {
42602
+ method: 'POST',
42603
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/',
42604
+ path: {
42605
+ 'watched_group_pk': watchedGroupPk
42606
+ },
42607
+ query: {
42608
+ 'platform_key': platformKey
42609
+ },
42610
+ body: requestBody,
42611
+ mediaType: 'application/json',
42612
+ errors: {
42613
+ 400: `Invalid payload`,
42614
+ 403: `Permission denied`,
42615
+ 404: `WatchedGroup not found`
42616
+ }
42617
+ });
42618
+ }
42619
+ /**
42620
+ * Retrieve a single watched-user link
42621
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
42622
+ *
42623
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
42624
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
42625
+ * this feature. Add via POST, remove via DELETE.
42626
+ * @returns WatchedUserRead
42627
+ * @throws ApiError
42628
+ */
42629
+ static coreWatchedGroupsWatchedUsersRetrieve({
42630
+ id,
42631
+ watchedGroupPk,
42632
+ platformKey
42633
+ }) {
42634
+ return request(OpenAPI, {
42635
+ method: 'GET',
42636
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/',
42637
+ path: {
42638
+ 'id': id,
42639
+ 'watched_group_pk': watchedGroupPk
42640
+ },
42641
+ query: {
42642
+ 'platform_key': platformKey
42643
+ },
42644
+ errors: {
42645
+ 403: `Permission denied`,
42646
+ 404: `Not found`
42647
+ }
42648
+ });
42649
+ }
42650
+ /**
42651
+ * Remove a user from the watched group
42652
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
42653
+ *
42654
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
42655
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
42656
+ * this feature. Add via POST, remove via DELETE.
42657
+ * @returns void
42658
+ * @throws ApiError
42659
+ */
42660
+ static coreWatchedGroupsWatchedUsersDestroy({
42661
+ id,
42662
+ watchedGroupPk,
42663
+ platformKey
42664
+ }) {
42665
+ return request(OpenAPI, {
42666
+ method: 'DELETE',
42667
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/',
42668
+ path: {
42669
+ 'id': id,
42670
+ 'watched_group_pk': watchedGroupPk
42671
+ },
42672
+ query: {
42673
+ 'platform_key': platformKey
42674
+ },
42675
+ errors: {
42676
+ 403: `Permission denied`,
42677
+ 404: `Not found`
42678
+ }
42679
+ });
42680
+ }
42681
+ /**
42682
+ * List watchers of a watched group (paginated)
42683
+ * CRUD for watchers nested under a WatchedGroup.
42684
+ *
42685
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42686
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42687
+ * watcher row:
42688
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42689
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42690
+ * `Ibl.Core/Watchers*`)
42691
+ * @returns PaginatedWatcherReadList
42692
+ * @throws ApiError
42693
+ */
42694
+ static coreWatchedGroupsWatchersList({
42695
+ watchedGroupPk,
42696
+ limit,
42697
+ offset,
42698
+ platformKey
42699
+ }) {
42700
+ return request(OpenAPI, {
42701
+ method: 'GET',
42702
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/',
42703
+ path: {
42704
+ 'watched_group_pk': watchedGroupPk
42705
+ },
42706
+ query: {
42707
+ 'limit': limit,
42708
+ 'offset': offset,
42709
+ 'platform_key': platformKey
42710
+ },
42711
+ errors: {
42712
+ 403: `Permission denied`,
42713
+ 404: `WatchedGroup not found`
42714
+ }
42715
+ });
42716
+ }
42717
+ /**
42718
+ * Add a watcher to a watched group
42719
+ * CRUD for watchers nested under a WatchedGroup.
42720
+ *
42721
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42722
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42723
+ * watcher row:
42724
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42725
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42726
+ * `Ibl.Core/Watchers*`)
42727
+ * @returns WatcherRead
42728
+ * @throws ApiError
42729
+ */
42730
+ static coreWatchedGroupsWatchersCreate({
42731
+ watchedGroupPk,
42732
+ requestBody,
42733
+ platformKey
42734
+ }) {
42735
+ return request(OpenAPI, {
42736
+ method: 'POST',
42737
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/',
42738
+ path: {
42739
+ 'watched_group_pk': watchedGroupPk
42740
+ },
42741
+ query: {
42742
+ 'platform_key': platformKey
42743
+ },
42744
+ body: requestBody,
42745
+ mediaType: 'application/json',
42746
+ errors: {
42747
+ 400: `Invalid payload`,
42748
+ 403: `Permission denied`,
42749
+ 404: `WatchedGroup not found`
42750
+ }
42751
+ });
42752
+ }
42753
+ /**
42754
+ * Retrieve a single watcher
42755
+ * CRUD for watchers nested under a WatchedGroup.
42756
+ *
42757
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42758
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42759
+ * watcher row:
42760
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42761
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42762
+ * `Ibl.Core/Watchers*`)
42763
+ * @returns WatcherRead
42764
+ * @throws ApiError
42765
+ */
42766
+ static coreWatchedGroupsWatchersRetrieve({
42767
+ id,
42768
+ watchedGroupPk,
42769
+ platformKey
42770
+ }) {
42771
+ return request(OpenAPI, {
42772
+ method: 'GET',
42773
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
42774
+ path: {
42775
+ 'id': id,
42776
+ 'watched_group_pk': watchedGroupPk
42777
+ },
42778
+ query: {
42779
+ 'platform_key': platformKey
42780
+ },
42781
+ errors: {
42782
+ 403: `Permission denied`,
42783
+ 404: `Not found`
42784
+ }
42785
+ });
42786
+ }
42787
+ /**
42788
+ * Replace a watcher's events
42789
+ * CRUD for watchers nested under a WatchedGroup.
42790
+ *
42791
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42792
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42793
+ * watcher row:
42794
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42795
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42796
+ * `Ibl.Core/Watchers*`)
42797
+ * @returns WatcherRead
42798
+ * @throws ApiError
42799
+ */
42800
+ static coreWatchedGroupsWatchersUpdate({
42801
+ id,
42802
+ watchedGroupPk,
42803
+ requestBody,
42804
+ platformKey
42805
+ }) {
42806
+ return request(OpenAPI, {
42807
+ method: 'PUT',
42808
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
42809
+ path: {
42810
+ 'id': id,
42811
+ 'watched_group_pk': watchedGroupPk
42812
+ },
42813
+ query: {
42814
+ 'platform_key': platformKey
42815
+ },
42816
+ body: requestBody,
42817
+ mediaType: 'application/json',
42818
+ errors: {
42819
+ 400: `Invalid payload`,
42820
+ 403: `Permission denied`,
42821
+ 404: `Not found`
42822
+ }
42823
+ });
42824
+ }
42825
+ /**
42826
+ * Update a watcher's events
42827
+ * CRUD for watchers nested under a WatchedGroup.
42828
+ *
42829
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42830
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42831
+ * watcher row:
42832
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42833
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42834
+ * `Ibl.Core/Watchers*`)
42835
+ * @returns WatcherRead
42836
+ * @throws ApiError
42837
+ */
42838
+ static coreWatchedGroupsWatchersPartialUpdate({
42839
+ id,
42840
+ watchedGroupPk,
42841
+ platformKey,
42842
+ requestBody
42843
+ }) {
42844
+ return request(OpenAPI, {
42845
+ method: 'PATCH',
42846
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
42847
+ path: {
42848
+ 'id': id,
42849
+ 'watched_group_pk': watchedGroupPk
42850
+ },
42851
+ query: {
42852
+ 'platform_key': platformKey
42853
+ },
42854
+ body: requestBody,
42855
+ mediaType: 'application/json',
42856
+ errors: {
42857
+ 400: `Invalid payload`,
42858
+ 403: `Permission denied`,
42859
+ 404: `Not found`
42860
+ }
42861
+ });
42862
+ }
42863
+ /**
42864
+ * Remove (or unsubscribe) a watcher from a watched group
42865
+ * CRUD for watchers nested under a WatchedGroup.
42866
+ *
42867
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
42868
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
42869
+ * watcher row:
42870
+ * - the watcher themselves (WATCHER_OWNER well-known role)
42871
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
42872
+ * `Ibl.Core/Watchers*`)
42873
+ * @returns void
42874
+ * @throws ApiError
42875
+ */
42876
+ static coreWatchedGroupsWatchersDestroy({
42877
+ id,
42878
+ watchedGroupPk,
42879
+ platformKey
42880
+ }) {
42881
+ return request(OpenAPI, {
42882
+ method: 'DELETE',
42883
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
42884
+ path: {
42885
+ 'id': id,
42886
+ 'watched_group_pk': watchedGroupPk
42887
+ },
42888
+ query: {
42889
+ 'platform_key': platformKey
42890
+ },
42891
+ errors: {
42892
+ 403: `Permission denied`,
42893
+ 404: `Not found`
42894
+ }
42895
+ });
42896
+ }
42194
42897
  /**
42195
42898
  * Get a list of departments with metrics and filtering options.
42196
42899
  *