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

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 (45) hide show
  1. package/dist/index.cjs.js +564 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +565 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +564 -1
  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/CoreService.d.ts +364 -0
  25. package/package.json +1 -1
  26. package/sdk_schema.yml +1269 -104
  27. package/src/core/OpenAPI.ts +1 -1
  28. package/src/index.ts +16 -0
  29. package/src/models/EventsEnum.ts +38 -0
  30. package/src/models/PaginatedWatchedGroupListList.ts +12 -0
  31. package/src/models/PaginatedWatchedUserReadList.ts +12 -0
  32. package/src/models/PaginatedWatcherReadList.ts +12 -0
  33. package/src/models/PatchedWatchedGroupUpdate.ts +13 -0
  34. package/src/models/PatchedWatcherUpdate.ts +12 -0
  35. package/src/models/WatchedGroupCreate.ts +26 -0
  36. package/src/models/WatchedGroupDetail.ts +21 -0
  37. package/src/models/WatchedGroupList.ts +13 -0
  38. package/src/models/WatchedGroupUpdate.ts +13 -0
  39. package/src/models/WatchedUserRead.ts +16 -0
  40. package/src/models/WatchedUserWrite.ts +14 -0
  41. package/src/models/WatcherEntry.ts +13 -0
  42. package/src/models/WatcherRead.ts +21 -0
  43. package/src/models/WatcherUpdate.ts +12 -0
  44. package/src/models/WatcherWrite.ts +16 -0
  45. package/src/services/CoreService.ts +711 -0
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '4.251.0-core',
117
+ VERSION: '4.252.0-core',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -279,6 +279,46 @@
279
279
  EthnicityEnum["OTHER"] = "other";
280
280
  })(exports.EthnicityEnum || (exports.EthnicityEnum = {}));
281
281
 
282
+ /* generated using openapi-typescript-codegen -- do not edit */
283
+ /* istanbul ignore file */
284
+ /* tslint:disable */
285
+ /* eslint-disable */
286
+ /**
287
+ * * `USER_NOTIF_COURSE_ENROLLMENT` - Course Enrollment
288
+ * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin: Course Enrollment
289
+ * * `USER_NOTIF_USER_INACTIVITY` - User Inactivity
290
+ * * `USER_NOTIF_COURSE_COMPLETION` - Course Completion
291
+ * * `USER_NOTIF_CREDENTIALS` - Credentials Issued
292
+ * * `USER_NOTIF_LEARNER_PROGRESS` - Learner Progress
293
+ * * `PROACTIVE_LEARNER_NOTIFICATION` - Proactive Learner Notification
294
+ * * `ACTIVITY_NEW_CONTENT` - New Activity Content
295
+ * * `ACTIVITY_COURSE_MILESTONE` - Course Milestone Reached
296
+ * * `SKILL_MASTERY_CHANGE` - Skill Mastery Change
297
+ * * `PROGRAM_ENROLLMENT_CONFIRMATION` - Program Enrollment Confirmed
298
+ * * `PATHWAY_ENROLLMENT_CONFIRMATION` - Pathway Enrollment Confirmed
299
+ * * `COURSE_SCHEDULE_CHANGE` - Course Schedule Change
300
+ * * `COURSES_PROGRESS_SUMMARY` - Courses Progress Summary
301
+ * * `SUBSECTION_GRADE_UPDATE` - Subsection Grade Update
302
+ */
303
+ exports.EventsEnum = void 0;
304
+ (function (EventsEnum) {
305
+ EventsEnum["USER_NOTIF_COURSE_ENROLLMENT"] = "USER_NOTIF_COURSE_ENROLLMENT";
306
+ EventsEnum["ADMIN_NOTIF_COURSE_ENROLLMENT"] = "ADMIN_NOTIF_COURSE_ENROLLMENT";
307
+ EventsEnum["USER_NOTIF_USER_INACTIVITY"] = "USER_NOTIF_USER_INACTIVITY";
308
+ EventsEnum["USER_NOTIF_COURSE_COMPLETION"] = "USER_NOTIF_COURSE_COMPLETION";
309
+ EventsEnum["USER_NOTIF_CREDENTIALS"] = "USER_NOTIF_CREDENTIALS";
310
+ EventsEnum["USER_NOTIF_LEARNER_PROGRESS"] = "USER_NOTIF_LEARNER_PROGRESS";
311
+ EventsEnum["PROACTIVE_LEARNER_NOTIFICATION"] = "PROACTIVE_LEARNER_NOTIFICATION";
312
+ EventsEnum["ACTIVITY_NEW_CONTENT"] = "ACTIVITY_NEW_CONTENT";
313
+ EventsEnum["ACTIVITY_COURSE_MILESTONE"] = "ACTIVITY_COURSE_MILESTONE";
314
+ EventsEnum["SKILL_MASTERY_CHANGE"] = "SKILL_MASTERY_CHANGE";
315
+ EventsEnum["PROGRAM_ENROLLMENT_CONFIRMATION"] = "PROGRAM_ENROLLMENT_CONFIRMATION";
316
+ EventsEnum["PATHWAY_ENROLLMENT_CONFIRMATION"] = "PATHWAY_ENROLLMENT_CONFIRMATION";
317
+ EventsEnum["COURSE_SCHEDULE_CHANGE"] = "COURSE_SCHEDULE_CHANGE";
318
+ EventsEnum["COURSES_PROGRESS_SUMMARY"] = "COURSES_PROGRESS_SUMMARY";
319
+ EventsEnum["SUBSECTION_GRADE_UPDATE"] = "SUBSECTION_GRADE_UPDATE";
320
+ })(exports.EventsEnum || (exports.EventsEnum = {}));
321
+
282
322
  /* generated using openapi-typescript-codegen -- do not edit */
283
323
  /* istanbul ignore file */
284
324
  /* tslint:disable */
@@ -17894,6 +17934,529 @@
17894
17934
  }
17895
17935
  });
17896
17936
  }
17937
+ /**
17938
+ * List watched groups visible to the caller
17939
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
17940
+ * POST here accepts an optional `watchers` array as a create-time convenience.
17941
+ * @returns PaginatedWatchedGroupListList
17942
+ * @throws ApiError
17943
+ */
17944
+ static coreWatchedGroupsList({
17945
+ limit,
17946
+ offset,
17947
+ platformKey
17948
+ }) {
17949
+ return request(OpenAPI, {
17950
+ method: 'GET',
17951
+ url: '/api/core/watched-groups/',
17952
+ query: {
17953
+ 'limit': limit,
17954
+ 'offset': offset,
17955
+ 'platform_key': platformKey
17956
+ },
17957
+ errors: {
17958
+ 403: `Permission denied`,
17959
+ 404: `Platform not found`
17960
+ }
17961
+ });
17962
+ }
17963
+ /**
17964
+ * Create a watched group
17965
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
17966
+ * POST here accepts an optional `watchers` array as a create-time convenience.
17967
+ * @returns WatchedGroupDetail
17968
+ * @throws ApiError
17969
+ */
17970
+ static coreWatchedGroupsCreate({
17971
+ requestBody,
17972
+ platformKey,
17973
+ watchedUserLimit,
17974
+ watcherLimit
17975
+ }) {
17976
+ return request(OpenAPI, {
17977
+ method: 'POST',
17978
+ url: '/api/core/watched-groups/',
17979
+ query: {
17980
+ 'platform_key': platformKey,
17981
+ 'watched_user_limit': watchedUserLimit,
17982
+ 'watcher_limit': watcherLimit
17983
+ },
17984
+ body: requestBody,
17985
+ mediaType: 'application/json',
17986
+ errors: {
17987
+ 400: `Invalid request`,
17988
+ 403: `Permission denied`
17989
+ }
17990
+ });
17991
+ }
17992
+ /**
17993
+ * Retrieve a watched group
17994
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
17995
+ * POST here accepts an optional `watchers` array as a create-time convenience.
17996
+ * @returns WatchedGroupDetail
17997
+ * @throws ApiError
17998
+ */
17999
+ static coreWatchedGroupsRetrieve({
18000
+ id,
18001
+ platformKey,
18002
+ watchedUserLimit,
18003
+ watcherLimit
18004
+ }) {
18005
+ return request(OpenAPI, {
18006
+ method: 'GET',
18007
+ url: '/api/core/watched-groups/{id}/',
18008
+ path: {
18009
+ 'id': id
18010
+ },
18011
+ query: {
18012
+ 'platform_key': platformKey,
18013
+ 'watched_user_limit': watchedUserLimit,
18014
+ 'watcher_limit': watcherLimit
18015
+ },
18016
+ errors: {
18017
+ 403: `Permission denied`,
18018
+ 404: `Not found`
18019
+ }
18020
+ });
18021
+ }
18022
+ /**
18023
+ * Update a watched group's name
18024
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
18025
+ * POST here accepts an optional `watchers` array as a create-time convenience.
18026
+ * @returns WatchedGroupDetail
18027
+ * @throws ApiError
18028
+ */
18029
+ static coreWatchedGroupsUpdate({
18030
+ id,
18031
+ platformKey,
18032
+ watchedUserLimit,
18033
+ watcherLimit,
18034
+ requestBody
18035
+ }) {
18036
+ return request(OpenAPI, {
18037
+ method: 'PUT',
18038
+ url: '/api/core/watched-groups/{id}/',
18039
+ path: {
18040
+ 'id': id
18041
+ },
18042
+ query: {
18043
+ 'platform_key': platformKey,
18044
+ 'watched_user_limit': watchedUserLimit,
18045
+ 'watcher_limit': watcherLimit
18046
+ },
18047
+ body: requestBody,
18048
+ mediaType: 'application/json',
18049
+ errors: {
18050
+ 400: `Invalid request`,
18051
+ 403: `Permission denied`,
18052
+ 404: `Not found`
18053
+ }
18054
+ });
18055
+ }
18056
+ /**
18057
+ * Partially update a watched group's name
18058
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
18059
+ * POST here accepts an optional `watchers` array as a create-time convenience.
18060
+ * @returns WatchedGroupDetail
18061
+ * @throws ApiError
18062
+ */
18063
+ static coreWatchedGroupsPartialUpdate({
18064
+ id,
18065
+ platformKey,
18066
+ watchedUserLimit,
18067
+ watcherLimit,
18068
+ requestBody
18069
+ }) {
18070
+ return request(OpenAPI, {
18071
+ method: 'PATCH',
18072
+ url: '/api/core/watched-groups/{id}/',
18073
+ path: {
18074
+ 'id': id
18075
+ },
18076
+ query: {
18077
+ 'platform_key': platformKey,
18078
+ 'watched_user_limit': watchedUserLimit,
18079
+ 'watcher_limit': watcherLimit
18080
+ },
18081
+ body: requestBody,
18082
+ mediaType: 'application/json',
18083
+ errors: {
18084
+ 400: `Invalid request`,
18085
+ 403: `Permission denied`,
18086
+ 404: `Not found`
18087
+ }
18088
+ });
18089
+ }
18090
+ /**
18091
+ * Delete a watched group
18092
+ * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
18093
+ * POST here accepts an optional `watchers` array as a create-time convenience.
18094
+ * @returns void
18095
+ * @throws ApiError
18096
+ */
18097
+ static coreWatchedGroupsDestroy({
18098
+ id,
18099
+ platformKey
18100
+ }) {
18101
+ return request(OpenAPI, {
18102
+ method: 'DELETE',
18103
+ url: '/api/core/watched-groups/{id}/',
18104
+ path: {
18105
+ 'id': id
18106
+ },
18107
+ query: {
18108
+ 'platform_key': platformKey
18109
+ },
18110
+ errors: {
18111
+ 403: `Permission denied`,
18112
+ 404: `Not found`
18113
+ }
18114
+ });
18115
+ }
18116
+ /**
18117
+ * List watched users in a watched group (paginated)
18118
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
18119
+ *
18120
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
18121
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
18122
+ * this feature. Add via POST, remove via DELETE.
18123
+ * @returns PaginatedWatchedUserReadList
18124
+ * @throws ApiError
18125
+ */
18126
+ static coreWatchedGroupsWatchedUsersList({
18127
+ watchedGroupPk,
18128
+ limit,
18129
+ offset,
18130
+ platformKey
18131
+ }) {
18132
+ return request(OpenAPI, {
18133
+ method: 'GET',
18134
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/',
18135
+ path: {
18136
+ 'watched_group_pk': watchedGroupPk
18137
+ },
18138
+ query: {
18139
+ 'limit': limit,
18140
+ 'offset': offset,
18141
+ 'platform_key': platformKey
18142
+ },
18143
+ errors: {
18144
+ 403: `Permission denied`,
18145
+ 404: `WatchedGroup not found`
18146
+ }
18147
+ });
18148
+ }
18149
+ /**
18150
+ * Add a user to the watched group
18151
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
18152
+ *
18153
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
18154
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
18155
+ * this feature. Add via POST, remove via DELETE.
18156
+ * @returns WatchedUserRead
18157
+ * @throws ApiError
18158
+ */
18159
+ static coreWatchedGroupsWatchedUsersCreate({
18160
+ watchedGroupPk,
18161
+ requestBody,
18162
+ platformKey
18163
+ }) {
18164
+ return request(OpenAPI, {
18165
+ method: 'POST',
18166
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/',
18167
+ path: {
18168
+ 'watched_group_pk': watchedGroupPk
18169
+ },
18170
+ query: {
18171
+ 'platform_key': platformKey
18172
+ },
18173
+ body: requestBody,
18174
+ mediaType: 'application/json',
18175
+ errors: {
18176
+ 400: `Invalid payload`,
18177
+ 403: `Permission denied`,
18178
+ 404: `WatchedGroup not found`
18179
+ }
18180
+ });
18181
+ }
18182
+ /**
18183
+ * Retrieve a single watched-user link
18184
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
18185
+ *
18186
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
18187
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
18188
+ * this feature. Add via POST, remove via DELETE.
18189
+ * @returns WatchedUserRead
18190
+ * @throws ApiError
18191
+ */
18192
+ static coreWatchedGroupsWatchedUsersRetrieve({
18193
+ id,
18194
+ watchedGroupPk,
18195
+ platformKey
18196
+ }) {
18197
+ return request(OpenAPI, {
18198
+ method: 'GET',
18199
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/',
18200
+ path: {
18201
+ 'id': id,
18202
+ 'watched_group_pk': watchedGroupPk
18203
+ },
18204
+ query: {
18205
+ 'platform_key': platformKey
18206
+ },
18207
+ errors: {
18208
+ 403: `Permission denied`,
18209
+ 404: `Not found`
18210
+ }
18211
+ });
18212
+ }
18213
+ /**
18214
+ * Remove a user from the watched group
18215
+ * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
18216
+ *
18217
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
18218
+ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
18219
+ * this feature. Add via POST, remove via DELETE.
18220
+ * @returns void
18221
+ * @throws ApiError
18222
+ */
18223
+ static coreWatchedGroupsWatchedUsersDestroy({
18224
+ id,
18225
+ watchedGroupPk,
18226
+ platformKey
18227
+ }) {
18228
+ return request(OpenAPI, {
18229
+ method: 'DELETE',
18230
+ url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/',
18231
+ path: {
18232
+ 'id': id,
18233
+ 'watched_group_pk': watchedGroupPk
18234
+ },
18235
+ query: {
18236
+ 'platform_key': platformKey
18237
+ },
18238
+ errors: {
18239
+ 403: `Permission denied`,
18240
+ 404: `Not found`
18241
+ }
18242
+ });
18243
+ }
18244
+ /**
18245
+ * List watchers of a watched group (paginated)
18246
+ * CRUD for watchers nested under a WatchedGroup.
18247
+ *
18248
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18249
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18250
+ * watcher row:
18251
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18252
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18253
+ * `Ibl.Core/Watchers*`)
18254
+ * @returns PaginatedWatcherReadList
18255
+ * @throws ApiError
18256
+ */
18257
+ static coreWatchedGroupsWatchersList({
18258
+ watchedGroupPk,
18259
+ limit,
18260
+ offset,
18261
+ platformKey
18262
+ }) {
18263
+ return request(OpenAPI, {
18264
+ method: 'GET',
18265
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/',
18266
+ path: {
18267
+ 'watched_group_pk': watchedGroupPk
18268
+ },
18269
+ query: {
18270
+ 'limit': limit,
18271
+ 'offset': offset,
18272
+ 'platform_key': platformKey
18273
+ },
18274
+ errors: {
18275
+ 403: `Permission denied`,
18276
+ 404: `WatchedGroup not found`
18277
+ }
18278
+ });
18279
+ }
18280
+ /**
18281
+ * Add a watcher to a watched group
18282
+ * CRUD for watchers nested under a WatchedGroup.
18283
+ *
18284
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18285
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18286
+ * watcher row:
18287
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18288
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18289
+ * `Ibl.Core/Watchers*`)
18290
+ * @returns WatcherRead
18291
+ * @throws ApiError
18292
+ */
18293
+ static coreWatchedGroupsWatchersCreate({
18294
+ watchedGroupPk,
18295
+ requestBody,
18296
+ platformKey
18297
+ }) {
18298
+ return request(OpenAPI, {
18299
+ method: 'POST',
18300
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/',
18301
+ path: {
18302
+ 'watched_group_pk': watchedGroupPk
18303
+ },
18304
+ query: {
18305
+ 'platform_key': platformKey
18306
+ },
18307
+ body: requestBody,
18308
+ mediaType: 'application/json',
18309
+ errors: {
18310
+ 400: `Invalid payload`,
18311
+ 403: `Permission denied`,
18312
+ 404: `WatchedGroup not found`
18313
+ }
18314
+ });
18315
+ }
18316
+ /**
18317
+ * Retrieve a single watcher
18318
+ * CRUD for watchers nested under a WatchedGroup.
18319
+ *
18320
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18321
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18322
+ * watcher row:
18323
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18324
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18325
+ * `Ibl.Core/Watchers*`)
18326
+ * @returns WatcherRead
18327
+ * @throws ApiError
18328
+ */
18329
+ static coreWatchedGroupsWatchersRetrieve({
18330
+ id,
18331
+ watchedGroupPk,
18332
+ platformKey
18333
+ }) {
18334
+ return request(OpenAPI, {
18335
+ method: 'GET',
18336
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
18337
+ path: {
18338
+ 'id': id,
18339
+ 'watched_group_pk': watchedGroupPk
18340
+ },
18341
+ query: {
18342
+ 'platform_key': platformKey
18343
+ },
18344
+ errors: {
18345
+ 403: `Permission denied`,
18346
+ 404: `Not found`
18347
+ }
18348
+ });
18349
+ }
18350
+ /**
18351
+ * Replace a watcher's events
18352
+ * CRUD for watchers nested under a WatchedGroup.
18353
+ *
18354
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18355
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18356
+ * watcher row:
18357
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18358
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18359
+ * `Ibl.Core/Watchers*`)
18360
+ * @returns WatcherRead
18361
+ * @throws ApiError
18362
+ */
18363
+ static coreWatchedGroupsWatchersUpdate({
18364
+ id,
18365
+ watchedGroupPk,
18366
+ requestBody,
18367
+ platformKey
18368
+ }) {
18369
+ return request(OpenAPI, {
18370
+ method: 'PUT',
18371
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
18372
+ path: {
18373
+ 'id': id,
18374
+ 'watched_group_pk': watchedGroupPk
18375
+ },
18376
+ query: {
18377
+ 'platform_key': platformKey
18378
+ },
18379
+ body: requestBody,
18380
+ mediaType: 'application/json',
18381
+ errors: {
18382
+ 400: `Invalid payload`,
18383
+ 403: `Permission denied`,
18384
+ 404: `Not found`
18385
+ }
18386
+ });
18387
+ }
18388
+ /**
18389
+ * Update a watcher's events
18390
+ * CRUD for watchers nested under a WatchedGroup.
18391
+ *
18392
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18393
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18394
+ * watcher row:
18395
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18396
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18397
+ * `Ibl.Core/Watchers*`)
18398
+ * @returns WatcherRead
18399
+ * @throws ApiError
18400
+ */
18401
+ static coreWatchedGroupsWatchersPartialUpdate({
18402
+ id,
18403
+ watchedGroupPk,
18404
+ platformKey,
18405
+ requestBody
18406
+ }) {
18407
+ return request(OpenAPI, {
18408
+ method: 'PATCH',
18409
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
18410
+ path: {
18411
+ 'id': id,
18412
+ 'watched_group_pk': watchedGroupPk
18413
+ },
18414
+ query: {
18415
+ 'platform_key': platformKey
18416
+ },
18417
+ body: requestBody,
18418
+ mediaType: 'application/json',
18419
+ errors: {
18420
+ 400: `Invalid payload`,
18421
+ 403: `Permission denied`,
18422
+ 404: `Not found`
18423
+ }
18424
+ });
18425
+ }
18426
+ /**
18427
+ * Remove (or unsubscribe) a watcher from a watched group
18428
+ * CRUD for watchers nested under a WatchedGroup.
18429
+ *
18430
+ * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
18431
+ * `is_owner` here covers two cases that both deserve owner-level perms on a
18432
+ * watcher row:
18433
+ * - the watcher themselves (WATCHER_OWNER well-known role)
18434
+ * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
18435
+ * `Ibl.Core/Watchers*`)
18436
+ * @returns void
18437
+ * @throws ApiError
18438
+ */
18439
+ static coreWatchedGroupsWatchersDestroy({
18440
+ id,
18441
+ watchedGroupPk,
18442
+ platformKey
18443
+ }) {
18444
+ return request(OpenAPI, {
18445
+ method: 'DELETE',
18446
+ url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/',
18447
+ path: {
18448
+ 'id': id,
18449
+ 'watched_group_pk': watchedGroupPk
18450
+ },
18451
+ query: {
18452
+ 'platform_key': platformKey
18453
+ },
18454
+ errors: {
18455
+ 403: `Permission denied`,
18456
+ 404: `Not found`
18457
+ }
18458
+ });
18459
+ }
17897
18460
  /**
17898
18461
  * Get a list of departments with metrics and filtering options.
17899
18462
  *