@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/sdk_schema.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ibl-data-manager
4
- version: 4.251.0-core
4
+ version: 4.252.0-core
5
5
  description: API for iblai
6
6
  paths:
7
7
  /access-check/{item_type}/{item_id}/:
@@ -20566,6 +20566,859 @@ paths:
20566
20566
  name: Stu Five
20567
20567
  summary: Example response
20568
20568
  description: ''
20569
+ /api/core/watched-groups/:
20570
+ get:
20571
+ operationId: core_watched_groups_list
20572
+ description: |-
20573
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20574
+ POST here accepts an optional `watchers` array as a create-time convenience.
20575
+ summary: List watched groups visible to the caller
20576
+ parameters:
20577
+ - name: limit
20578
+ required: false
20579
+ in: query
20580
+ description: Number of results to return per page.
20581
+ schema:
20582
+ type: integer
20583
+ - name: offset
20584
+ required: false
20585
+ in: query
20586
+ description: The initial index from which to return the results.
20587
+ schema:
20588
+ type: integer
20589
+ - in: query
20590
+ name: platform_key
20591
+ schema:
20592
+ type: string
20593
+ minLength: 1
20594
+ description: 'Service-account only: target platform key. Non-SA callers''
20595
+ platform is sourced from the auth token and this is ignored.'
20596
+ tags:
20597
+ - core
20598
+ security:
20599
+ - PlatformApiKeyAuthentication: []
20600
+ responses:
20601
+ '200':
20602
+ content:
20603
+ application/json:
20604
+ schema:
20605
+ $ref: '#/components/schemas/PaginatedWatchedGroupListList'
20606
+ description: ''
20607
+ '403':
20608
+ description: Permission denied
20609
+ '404':
20610
+ description: Platform not found
20611
+ post:
20612
+ operationId: core_watched_groups_create
20613
+ description: |-
20614
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20615
+ POST here accepts an optional `watchers` array as a create-time convenience.
20616
+ summary: Create a watched group
20617
+ parameters:
20618
+ - in: query
20619
+ name: platform_key
20620
+ schema:
20621
+ type: string
20622
+ minLength: 1
20623
+ description: 'Service-account only: target platform key. Non-SA callers''
20624
+ platform is sourced from the auth token and this is ignored.'
20625
+ - in: query
20626
+ name: watched_user_limit
20627
+ schema:
20628
+ type: integer
20629
+ maximum: 100
20630
+ minimum: 0
20631
+ default: 0
20632
+ description: Inline up to N watched users in the response (0 = none, max 100).
20633
+ Use the nested /watched-users/ endpoint for paginated walks.
20634
+ - in: query
20635
+ name: watcher_limit
20636
+ schema:
20637
+ type: integer
20638
+ maximum: 100
20639
+ minimum: 0
20640
+ default: 0
20641
+ description: Inline up to N watchers in the response (0 = none, max 100).
20642
+ Use the nested /watchers/ endpoint for paginated walks.
20643
+ tags:
20644
+ - core
20645
+ requestBody:
20646
+ content:
20647
+ application/json:
20648
+ schema:
20649
+ $ref: '#/components/schemas/WatchedGroupCreate'
20650
+ application/scim+json:
20651
+ schema:
20652
+ $ref: '#/components/schemas/WatchedGroupCreate'
20653
+ application/x-www-form-urlencoded:
20654
+ schema:
20655
+ $ref: '#/components/schemas/WatchedGroupCreate'
20656
+ multipart/form-data:
20657
+ schema:
20658
+ $ref: '#/components/schemas/WatchedGroupCreate'
20659
+ '*/*':
20660
+ schema:
20661
+ $ref: '#/components/schemas/WatchedGroupCreate'
20662
+ required: true
20663
+ security:
20664
+ - PlatformApiKeyAuthentication: []
20665
+ responses:
20666
+ '201':
20667
+ content:
20668
+ application/json:
20669
+ schema:
20670
+ $ref: '#/components/schemas/WatchedGroupDetail'
20671
+ description: ''
20672
+ '400':
20673
+ description: Invalid request
20674
+ '403':
20675
+ description: Permission denied
20676
+ /api/core/watched-groups/{id}/:
20677
+ get:
20678
+ operationId: core_watched_groups_retrieve
20679
+ description: |-
20680
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20681
+ POST here accepts an optional `watchers` array as a create-time convenience.
20682
+ summary: Retrieve a watched group
20683
+ parameters:
20684
+ - in: path
20685
+ name: id
20686
+ schema:
20687
+ type: integer
20688
+ description: A unique integer value identifying this Watched Group.
20689
+ required: true
20690
+ - in: query
20691
+ name: platform_key
20692
+ schema:
20693
+ type: string
20694
+ minLength: 1
20695
+ description: 'Service-account only: target platform key. Non-SA callers''
20696
+ platform is sourced from the auth token and this is ignored.'
20697
+ - in: query
20698
+ name: watched_user_limit
20699
+ schema:
20700
+ type: integer
20701
+ maximum: 100
20702
+ minimum: 0
20703
+ default: 0
20704
+ description: Inline up to N watched users in the response (0 = none, max 100).
20705
+ Use the nested /watched-users/ endpoint for paginated walks.
20706
+ - in: query
20707
+ name: watcher_limit
20708
+ schema:
20709
+ type: integer
20710
+ maximum: 100
20711
+ minimum: 0
20712
+ default: 0
20713
+ description: Inline up to N watchers in the response (0 = none, max 100).
20714
+ Use the nested /watchers/ endpoint for paginated walks.
20715
+ tags:
20716
+ - core
20717
+ security:
20718
+ - PlatformApiKeyAuthentication: []
20719
+ responses:
20720
+ '200':
20721
+ content:
20722
+ application/json:
20723
+ schema:
20724
+ $ref: '#/components/schemas/WatchedGroupDetail'
20725
+ description: ''
20726
+ '403':
20727
+ description: Permission denied
20728
+ '404':
20729
+ description: Not found
20730
+ put:
20731
+ operationId: core_watched_groups_update
20732
+ description: |-
20733
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20734
+ POST here accepts an optional `watchers` array as a create-time convenience.
20735
+ summary: Update a watched group's name
20736
+ parameters:
20737
+ - in: path
20738
+ name: id
20739
+ schema:
20740
+ type: integer
20741
+ description: A unique integer value identifying this Watched Group.
20742
+ required: true
20743
+ - in: query
20744
+ name: platform_key
20745
+ schema:
20746
+ type: string
20747
+ minLength: 1
20748
+ description: 'Service-account only: target platform key. Non-SA callers''
20749
+ platform is sourced from the auth token and this is ignored.'
20750
+ - in: query
20751
+ name: watched_user_limit
20752
+ schema:
20753
+ type: integer
20754
+ maximum: 100
20755
+ minimum: 0
20756
+ default: 0
20757
+ description: Inline up to N watched users in the response (0 = none, max 100).
20758
+ Use the nested /watched-users/ endpoint for paginated walks.
20759
+ - in: query
20760
+ name: watcher_limit
20761
+ schema:
20762
+ type: integer
20763
+ maximum: 100
20764
+ minimum: 0
20765
+ default: 0
20766
+ description: Inline up to N watchers in the response (0 = none, max 100).
20767
+ Use the nested /watchers/ endpoint for paginated walks.
20768
+ tags:
20769
+ - core
20770
+ requestBody:
20771
+ content:
20772
+ application/json:
20773
+ schema:
20774
+ $ref: '#/components/schemas/WatchedGroupUpdate'
20775
+ application/scim+json:
20776
+ schema:
20777
+ $ref: '#/components/schemas/WatchedGroupUpdate'
20778
+ application/x-www-form-urlencoded:
20779
+ schema:
20780
+ $ref: '#/components/schemas/WatchedGroupUpdate'
20781
+ multipart/form-data:
20782
+ schema:
20783
+ $ref: '#/components/schemas/WatchedGroupUpdate'
20784
+ '*/*':
20785
+ schema:
20786
+ $ref: '#/components/schemas/WatchedGroupUpdate'
20787
+ security:
20788
+ - PlatformApiKeyAuthentication: []
20789
+ responses:
20790
+ '200':
20791
+ content:
20792
+ application/json:
20793
+ schema:
20794
+ $ref: '#/components/schemas/WatchedGroupDetail'
20795
+ description: ''
20796
+ '400':
20797
+ description: Invalid request
20798
+ '403':
20799
+ description: Permission denied
20800
+ '404':
20801
+ description: Not found
20802
+ patch:
20803
+ operationId: core_watched_groups_partial_update
20804
+ description: |-
20805
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20806
+ POST here accepts an optional `watchers` array as a create-time convenience.
20807
+ summary: Partially update a watched group's name
20808
+ parameters:
20809
+ - in: path
20810
+ name: id
20811
+ schema:
20812
+ type: integer
20813
+ description: A unique integer value identifying this Watched Group.
20814
+ required: true
20815
+ - in: query
20816
+ name: platform_key
20817
+ schema:
20818
+ type: string
20819
+ minLength: 1
20820
+ description: 'Service-account only: target platform key. Non-SA callers''
20821
+ platform is sourced from the auth token and this is ignored.'
20822
+ - in: query
20823
+ name: watched_user_limit
20824
+ schema:
20825
+ type: integer
20826
+ maximum: 100
20827
+ minimum: 0
20828
+ default: 0
20829
+ description: Inline up to N watched users in the response (0 = none, max 100).
20830
+ Use the nested /watched-users/ endpoint for paginated walks.
20831
+ - in: query
20832
+ name: watcher_limit
20833
+ schema:
20834
+ type: integer
20835
+ maximum: 100
20836
+ minimum: 0
20837
+ default: 0
20838
+ description: Inline up to N watchers in the response (0 = none, max 100).
20839
+ Use the nested /watchers/ endpoint for paginated walks.
20840
+ tags:
20841
+ - core
20842
+ requestBody:
20843
+ content:
20844
+ application/json:
20845
+ schema:
20846
+ $ref: '#/components/schemas/PatchedWatchedGroupUpdate'
20847
+ application/scim+json:
20848
+ schema:
20849
+ $ref: '#/components/schemas/PatchedWatchedGroupUpdate'
20850
+ application/x-www-form-urlencoded:
20851
+ schema:
20852
+ $ref: '#/components/schemas/PatchedWatchedGroupUpdate'
20853
+ multipart/form-data:
20854
+ schema:
20855
+ $ref: '#/components/schemas/PatchedWatchedGroupUpdate'
20856
+ '*/*':
20857
+ schema:
20858
+ $ref: '#/components/schemas/PatchedWatchedGroupUpdate'
20859
+ security:
20860
+ - PlatformApiKeyAuthentication: []
20861
+ responses:
20862
+ '200':
20863
+ content:
20864
+ application/json:
20865
+ schema:
20866
+ $ref: '#/components/schemas/WatchedGroupDetail'
20867
+ description: ''
20868
+ '400':
20869
+ description: Invalid request
20870
+ '403':
20871
+ description: Permission denied
20872
+ '404':
20873
+ description: Not found
20874
+ delete:
20875
+ operationId: core_watched_groups_destroy
20876
+ description: |-
20877
+ CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint;
20878
+ POST here accepts an optional `watchers` array as a create-time convenience.
20879
+ summary: Delete a watched group
20880
+ parameters:
20881
+ - in: path
20882
+ name: id
20883
+ schema:
20884
+ type: integer
20885
+ description: A unique integer value identifying this Watched Group.
20886
+ required: true
20887
+ - in: query
20888
+ name: platform_key
20889
+ schema:
20890
+ type: string
20891
+ minLength: 1
20892
+ description: 'Service-account only: target platform key. Non-SA callers''
20893
+ platform is sourced from the auth token and this is ignored.'
20894
+ tags:
20895
+ - core
20896
+ security:
20897
+ - PlatformApiKeyAuthentication: []
20898
+ responses:
20899
+ '204':
20900
+ description: Deleted
20901
+ '403':
20902
+ description: Permission denied
20903
+ '404':
20904
+ description: Not found
20905
+ /api/core/watched-groups/{watched_group_pk}/watched-users/:
20906
+ get:
20907
+ operationId: core_watched_groups_watched_users_list
20908
+ description: |-
20909
+ CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
20910
+
20911
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
20912
+ No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
20913
+ this feature. Add via POST, remove via DELETE.
20914
+ summary: List watched users in a watched group (paginated)
20915
+ parameters:
20916
+ - name: limit
20917
+ required: false
20918
+ in: query
20919
+ description: Number of results to return per page.
20920
+ schema:
20921
+ type: integer
20922
+ - name: offset
20923
+ required: false
20924
+ in: query
20925
+ description: The initial index from which to return the results.
20926
+ schema:
20927
+ type: integer
20928
+ - in: query
20929
+ name: platform_key
20930
+ schema:
20931
+ type: string
20932
+ minLength: 1
20933
+ description: 'Service-account only: target platform key. Non-SA callers''
20934
+ platform is sourced from the auth token and this is ignored.'
20935
+ - in: path
20936
+ name: watched_group_pk
20937
+ schema:
20938
+ type: integer
20939
+ required: true
20940
+ tags:
20941
+ - core
20942
+ security:
20943
+ - PlatformApiKeyAuthentication: []
20944
+ responses:
20945
+ '200':
20946
+ content:
20947
+ application/json:
20948
+ schema:
20949
+ $ref: '#/components/schemas/PaginatedWatchedUserReadList'
20950
+ description: ''
20951
+ '403':
20952
+ description: Permission denied
20953
+ '404':
20954
+ description: WatchedGroup not found
20955
+ post:
20956
+ operationId: core_watched_groups_watched_users_create
20957
+ description: |-
20958
+ CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
20959
+
20960
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
20961
+ No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
20962
+ this feature. Add via POST, remove via DELETE.
20963
+ summary: Add a user to the watched group
20964
+ parameters:
20965
+ - in: query
20966
+ name: platform_key
20967
+ schema:
20968
+ type: string
20969
+ minLength: 1
20970
+ description: 'Service-account only: target platform key. Non-SA callers''
20971
+ platform is sourced from the auth token and this is ignored.'
20972
+ - in: path
20973
+ name: watched_group_pk
20974
+ schema:
20975
+ type: integer
20976
+ required: true
20977
+ tags:
20978
+ - core
20979
+ requestBody:
20980
+ content:
20981
+ application/json:
20982
+ schema:
20983
+ $ref: '#/components/schemas/WatchedUserWrite'
20984
+ application/scim+json:
20985
+ schema:
20986
+ $ref: '#/components/schemas/WatchedUserWrite'
20987
+ application/x-www-form-urlencoded:
20988
+ schema:
20989
+ $ref: '#/components/schemas/WatchedUserWrite'
20990
+ multipart/form-data:
20991
+ schema:
20992
+ $ref: '#/components/schemas/WatchedUserWrite'
20993
+ '*/*':
20994
+ schema:
20995
+ $ref: '#/components/schemas/WatchedUserWrite'
20996
+ required: true
20997
+ security:
20998
+ - PlatformApiKeyAuthentication: []
20999
+ responses:
21000
+ '201':
21001
+ content:
21002
+ application/json:
21003
+ schema:
21004
+ $ref: '#/components/schemas/WatchedUserRead'
21005
+ description: ''
21006
+ '400':
21007
+ description: Invalid payload
21008
+ '403':
21009
+ description: Permission denied
21010
+ '404':
21011
+ description: WatchedGroup not found
21012
+ /api/core/watched-groups/{watched_group_pk}/watched-users/{id}/:
21013
+ get:
21014
+ operationId: core_watched_groups_watched_users_retrieve
21015
+ description: |-
21016
+ CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
21017
+
21018
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
21019
+ No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
21020
+ this feature. Add via POST, remove via DELETE.
21021
+ summary: Retrieve a single watched-user link
21022
+ parameters:
21023
+ - in: path
21024
+ name: id
21025
+ schema:
21026
+ type: integer
21027
+ required: true
21028
+ - in: query
21029
+ name: platform_key
21030
+ schema:
21031
+ type: string
21032
+ minLength: 1
21033
+ description: 'Service-account only: target platform key. Non-SA callers''
21034
+ platform is sourced from the auth token and this is ignored.'
21035
+ - in: path
21036
+ name: watched_group_pk
21037
+ schema:
21038
+ type: integer
21039
+ required: true
21040
+ tags:
21041
+ - core
21042
+ security:
21043
+ - PlatformApiKeyAuthentication: []
21044
+ responses:
21045
+ '200':
21046
+ content:
21047
+ application/json:
21048
+ schema:
21049
+ $ref: '#/components/schemas/WatchedUserRead'
21050
+ description: ''
21051
+ '403':
21052
+ description: Permission denied
21053
+ '404':
21054
+ description: Not found
21055
+ delete:
21056
+ operationId: core_watched_groups_watched_users_destroy
21057
+ description: |-
21058
+ CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup.
21059
+
21060
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/
21061
+ No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for
21062
+ this feature. Add via POST, remove via DELETE.
21063
+ summary: Remove a user from the watched group
21064
+ parameters:
21065
+ - in: path
21066
+ name: id
21067
+ schema:
21068
+ type: integer
21069
+ required: true
21070
+ - in: query
21071
+ name: platform_key
21072
+ schema:
21073
+ type: string
21074
+ minLength: 1
21075
+ description: 'Service-account only: target platform key. Non-SA callers''
21076
+ platform is sourced from the auth token and this is ignored.'
21077
+ - in: path
21078
+ name: watched_group_pk
21079
+ schema:
21080
+ type: integer
21081
+ required: true
21082
+ tags:
21083
+ - core
21084
+ security:
21085
+ - PlatformApiKeyAuthentication: []
21086
+ responses:
21087
+ '204':
21088
+ description: Removed
21089
+ '403':
21090
+ description: Permission denied
21091
+ '404':
21092
+ description: Not found
21093
+ /api/core/watched-groups/{watched_group_pk}/watchers/:
21094
+ get:
21095
+ operationId: core_watched_groups_watchers_list
21096
+ description: |-
21097
+ CRUD for watchers nested under a WatchedGroup.
21098
+
21099
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21100
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21101
+ watcher row:
21102
+ - the watcher themselves (WATCHER_OWNER well-known role)
21103
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21104
+ `Ibl.Core/Watchers/*`)
21105
+ summary: List watchers of a watched group (paginated)
21106
+ parameters:
21107
+ - name: limit
21108
+ required: false
21109
+ in: query
21110
+ description: Number of results to return per page.
21111
+ schema:
21112
+ type: integer
21113
+ - name: offset
21114
+ required: false
21115
+ in: query
21116
+ description: The initial index from which to return the results.
21117
+ schema:
21118
+ type: integer
21119
+ - in: query
21120
+ name: platform_key
21121
+ schema:
21122
+ type: string
21123
+ minLength: 1
21124
+ description: 'Service-account only: target platform key. Non-SA callers''
21125
+ platform is sourced from the auth token and this is ignored.'
21126
+ - in: path
21127
+ name: watched_group_pk
21128
+ schema:
21129
+ type: integer
21130
+ required: true
21131
+ tags:
21132
+ - core
21133
+ security:
21134
+ - PlatformApiKeyAuthentication: []
21135
+ responses:
21136
+ '200':
21137
+ content:
21138
+ application/json:
21139
+ schema:
21140
+ $ref: '#/components/schemas/PaginatedWatcherReadList'
21141
+ description: ''
21142
+ '403':
21143
+ description: Permission denied
21144
+ '404':
21145
+ description: WatchedGroup not found
21146
+ post:
21147
+ operationId: core_watched_groups_watchers_create
21148
+ description: |-
21149
+ CRUD for watchers nested under a WatchedGroup.
21150
+
21151
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21152
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21153
+ watcher row:
21154
+ - the watcher themselves (WATCHER_OWNER well-known role)
21155
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21156
+ `Ibl.Core/Watchers/*`)
21157
+ summary: Add a watcher to a watched group
21158
+ parameters:
21159
+ - in: query
21160
+ name: platform_key
21161
+ schema:
21162
+ type: string
21163
+ minLength: 1
21164
+ description: 'Service-account only: target platform key. Non-SA callers''
21165
+ platform is sourced from the auth token and this is ignored.'
21166
+ - in: path
21167
+ name: watched_group_pk
21168
+ schema:
21169
+ type: integer
21170
+ required: true
21171
+ tags:
21172
+ - core
21173
+ requestBody:
21174
+ content:
21175
+ application/json:
21176
+ schema:
21177
+ $ref: '#/components/schemas/WatcherWrite'
21178
+ application/scim+json:
21179
+ schema:
21180
+ $ref: '#/components/schemas/WatcherWrite'
21181
+ application/x-www-form-urlencoded:
21182
+ schema:
21183
+ $ref: '#/components/schemas/WatcherWrite'
21184
+ multipart/form-data:
21185
+ schema:
21186
+ $ref: '#/components/schemas/WatcherWrite'
21187
+ '*/*':
21188
+ schema:
21189
+ $ref: '#/components/schemas/WatcherWrite'
21190
+ required: true
21191
+ security:
21192
+ - PlatformApiKeyAuthentication: []
21193
+ responses:
21194
+ '201':
21195
+ content:
21196
+ application/json:
21197
+ schema:
21198
+ $ref: '#/components/schemas/WatcherRead'
21199
+ description: ''
21200
+ '400':
21201
+ description: Invalid payload
21202
+ '403':
21203
+ description: Permission denied
21204
+ '404':
21205
+ description: WatchedGroup not found
21206
+ /api/core/watched-groups/{watched_group_pk}/watchers/{id}/:
21207
+ get:
21208
+ operationId: core_watched_groups_watchers_retrieve
21209
+ description: |-
21210
+ CRUD for watchers nested under a WatchedGroup.
21211
+
21212
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21213
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21214
+ watcher row:
21215
+ - the watcher themselves (WATCHER_OWNER well-known role)
21216
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21217
+ `Ibl.Core/Watchers/*`)
21218
+ summary: Retrieve a single watcher
21219
+ parameters:
21220
+ - in: path
21221
+ name: id
21222
+ schema:
21223
+ type: integer
21224
+ required: true
21225
+ - in: query
21226
+ name: platform_key
21227
+ schema:
21228
+ type: string
21229
+ minLength: 1
21230
+ description: 'Service-account only: target platform key. Non-SA callers''
21231
+ platform is sourced from the auth token and this is ignored.'
21232
+ - in: path
21233
+ name: watched_group_pk
21234
+ schema:
21235
+ type: integer
21236
+ required: true
21237
+ tags:
21238
+ - core
21239
+ security:
21240
+ - PlatformApiKeyAuthentication: []
21241
+ responses:
21242
+ '200':
21243
+ content:
21244
+ application/json:
21245
+ schema:
21246
+ $ref: '#/components/schemas/WatcherRead'
21247
+ description: ''
21248
+ '403':
21249
+ description: Permission denied
21250
+ '404':
21251
+ description: Not found
21252
+ put:
21253
+ operationId: core_watched_groups_watchers_update
21254
+ description: |-
21255
+ CRUD for watchers nested under a WatchedGroup.
21256
+
21257
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21258
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21259
+ watcher row:
21260
+ - the watcher themselves (WATCHER_OWNER well-known role)
21261
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21262
+ `Ibl.Core/Watchers/*`)
21263
+ summary: Replace a watcher's events
21264
+ parameters:
21265
+ - in: path
21266
+ name: id
21267
+ schema:
21268
+ type: integer
21269
+ required: true
21270
+ - in: query
21271
+ name: platform_key
21272
+ schema:
21273
+ type: string
21274
+ minLength: 1
21275
+ description: 'Service-account only: target platform key. Non-SA callers''
21276
+ platform is sourced from the auth token and this is ignored.'
21277
+ - in: path
21278
+ name: watched_group_pk
21279
+ schema:
21280
+ type: integer
21281
+ required: true
21282
+ tags:
21283
+ - core
21284
+ requestBody:
21285
+ content:
21286
+ application/json:
21287
+ schema:
21288
+ $ref: '#/components/schemas/WatcherUpdate'
21289
+ application/scim+json:
21290
+ schema:
21291
+ $ref: '#/components/schemas/WatcherUpdate'
21292
+ application/x-www-form-urlencoded:
21293
+ schema:
21294
+ $ref: '#/components/schemas/WatcherUpdate'
21295
+ multipart/form-data:
21296
+ schema:
21297
+ $ref: '#/components/schemas/WatcherUpdate'
21298
+ '*/*':
21299
+ schema:
21300
+ $ref: '#/components/schemas/WatcherUpdate'
21301
+ required: true
21302
+ security:
21303
+ - PlatformApiKeyAuthentication: []
21304
+ responses:
21305
+ '200':
21306
+ content:
21307
+ application/json:
21308
+ schema:
21309
+ $ref: '#/components/schemas/WatcherRead'
21310
+ description: ''
21311
+ '400':
21312
+ description: Invalid payload
21313
+ '403':
21314
+ description: Permission denied
21315
+ '404':
21316
+ description: Not found
21317
+ patch:
21318
+ operationId: core_watched_groups_watchers_partial_update
21319
+ description: |-
21320
+ CRUD for watchers nested under a WatchedGroup.
21321
+
21322
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21323
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21324
+ watcher row:
21325
+ - the watcher themselves (WATCHER_OWNER well-known role)
21326
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21327
+ `Ibl.Core/Watchers/*`)
21328
+ summary: Update a watcher's events
21329
+ parameters:
21330
+ - in: path
21331
+ name: id
21332
+ schema:
21333
+ type: integer
21334
+ required: true
21335
+ - in: query
21336
+ name: platform_key
21337
+ schema:
21338
+ type: string
21339
+ minLength: 1
21340
+ description: 'Service-account only: target platform key. Non-SA callers''
21341
+ platform is sourced from the auth token and this is ignored.'
21342
+ - in: path
21343
+ name: watched_group_pk
21344
+ schema:
21345
+ type: integer
21346
+ required: true
21347
+ tags:
21348
+ - core
21349
+ requestBody:
21350
+ content:
21351
+ application/json:
21352
+ schema:
21353
+ $ref: '#/components/schemas/PatchedWatcherUpdate'
21354
+ application/scim+json:
21355
+ schema:
21356
+ $ref: '#/components/schemas/PatchedWatcherUpdate'
21357
+ application/x-www-form-urlencoded:
21358
+ schema:
21359
+ $ref: '#/components/schemas/PatchedWatcherUpdate'
21360
+ multipart/form-data:
21361
+ schema:
21362
+ $ref: '#/components/schemas/PatchedWatcherUpdate'
21363
+ '*/*':
21364
+ schema:
21365
+ $ref: '#/components/schemas/PatchedWatcherUpdate'
21366
+ security:
21367
+ - PlatformApiKeyAuthentication: []
21368
+ responses:
21369
+ '200':
21370
+ content:
21371
+ application/json:
21372
+ schema:
21373
+ $ref: '#/components/schemas/WatcherRead'
21374
+ description: ''
21375
+ '400':
21376
+ description: Invalid payload
21377
+ '403':
21378
+ description: Permission denied
21379
+ '404':
21380
+ description: Not found
21381
+ delete:
21382
+ operationId: core_watched_groups_watchers_destroy
21383
+ description: |-
21384
+ CRUD for watchers nested under a WatchedGroup.
21385
+
21386
+ Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/
21387
+ `is_owner` here covers two cases that both deserve owner-level perms on a
21388
+ watcher row:
21389
+ - the watcher themselves (WATCHER_OWNER well-known role)
21390
+ - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants
21391
+ `Ibl.Core/Watchers/*`)
21392
+ summary: Remove (or unsubscribe) a watcher from a watched group
21393
+ parameters:
21394
+ - in: path
21395
+ name: id
21396
+ schema:
21397
+ type: integer
21398
+ required: true
21399
+ - in: query
21400
+ name: platform_key
21401
+ schema:
21402
+ type: string
21403
+ minLength: 1
21404
+ description: 'Service-account only: target platform key. Non-SA callers''
21405
+ platform is sourced from the auth token and this is ignored.'
21406
+ - in: path
21407
+ name: watched_group_pk
21408
+ schema:
21409
+ type: integer
21410
+ required: true
21411
+ tags:
21412
+ - core
21413
+ security:
21414
+ - PlatformApiKeyAuthentication: []
21415
+ responses:
21416
+ '204':
21417
+ description: Removed
21418
+ '403':
21419
+ description: Permission denied
21420
+ '404':
21421
+ description: Not found
20569
21422
  /api/credentials/exim/credentials/course/{course_id}/export/:
20570
21423
  get:
20571
21424
  operationId: credentials_exim_credentials_course_export_retrieve
@@ -39915,6 +40768,40 @@ components:
39915
40768
  * `two_or_more` - Two or more races
39916
40769
  * `prefer_not_to_say` - Prefer not to say
39917
40770
  * `other` - Other
40771
+ EventsEnum:
40772
+ enum:
40773
+ - USER_NOTIF_COURSE_ENROLLMENT
40774
+ - ADMIN_NOTIF_COURSE_ENROLLMENT
40775
+ - USER_NOTIF_USER_INACTIVITY
40776
+ - USER_NOTIF_COURSE_COMPLETION
40777
+ - USER_NOTIF_CREDENTIALS
40778
+ - USER_NOTIF_LEARNER_PROGRESS
40779
+ - PROACTIVE_LEARNER_NOTIFICATION
40780
+ - ACTIVITY_NEW_CONTENT
40781
+ - ACTIVITY_COURSE_MILESTONE
40782
+ - SKILL_MASTERY_CHANGE
40783
+ - PROGRAM_ENROLLMENT_CONFIRMATION
40784
+ - PATHWAY_ENROLLMENT_CONFIRMATION
40785
+ - COURSE_SCHEDULE_CHANGE
40786
+ - COURSES_PROGRESS_SUMMARY
40787
+ - SUBSECTION_GRADE_UPDATE
40788
+ type: string
40789
+ description: |-
40790
+ * `USER_NOTIF_COURSE_ENROLLMENT` - Course Enrollment
40791
+ * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin: Course Enrollment
40792
+ * `USER_NOTIF_USER_INACTIVITY` - User Inactivity
40793
+ * `USER_NOTIF_COURSE_COMPLETION` - Course Completion
40794
+ * `USER_NOTIF_CREDENTIALS` - Credentials Issued
40795
+ * `USER_NOTIF_LEARNER_PROGRESS` - Learner Progress
40796
+ * `PROACTIVE_LEARNER_NOTIFICATION` - Proactive Learner Notification
40797
+ * `ACTIVITY_NEW_CONTENT` - New Activity Content
40798
+ * `ACTIVITY_COURSE_MILESTONE` - Course Milestone Reached
40799
+ * `SKILL_MASTERY_CHANGE` - Skill Mastery Change
40800
+ * `PROGRAM_ENROLLMENT_CONFIRMATION` - Program Enrollment Confirmed
40801
+ * `PATHWAY_ENROLLMENT_CONFIRMATION` - Pathway Enrollment Confirmed
40802
+ * `COURSE_SCHEDULE_CHANGE` - Course Schedule Change
40803
+ * `COURSES_PROGRESS_SUMMARY` - Courses Progress Summary
40804
+ * `SUBSECTION_GRADE_UPDATE` - Subsection Grade Update
39918
40805
  Experience:
39919
40806
  type: object
39920
40807
  properties:
@@ -43301,74 +44188,202 @@ components:
43301
44188
  results:
43302
44189
  type: array
43303
44190
  items:
43304
- $ref: '#/components/schemas/RbacGroup'
43305
- PaginatedRbacPolicyList:
44191
+ $ref: '#/components/schemas/RbacGroup'
44192
+ PaginatedRbacPolicyList:
44193
+ type: object
44194
+ required:
44195
+ - count
44196
+ - results
44197
+ properties:
44198
+ count:
44199
+ type: integer
44200
+ example: 123
44201
+ next:
44202
+ type: string
44203
+ nullable: true
44204
+ format: uri
44205
+ example: http://api.example.org/accounts/?page=4
44206
+ previous:
44207
+ type: string
44208
+ nullable: true
44209
+ format: uri
44210
+ example: http://api.example.org/accounts/?page=2
44211
+ results:
44212
+ type: array
44213
+ items:
44214
+ $ref: '#/components/schemas/RbacPolicy'
44215
+ PaginatedRbacRoleList:
44216
+ type: object
44217
+ required:
44218
+ - count
44219
+ - results
44220
+ properties:
44221
+ count:
44222
+ type: integer
44223
+ example: 123
44224
+ next:
44225
+ type: string
44226
+ nullable: true
44227
+ format: uri
44228
+ example: http://api.example.org/accounts/?page=4
44229
+ previous:
44230
+ type: string
44231
+ nullable: true
44232
+ format: uri
44233
+ example: http://api.example.org/accounts/?page=2
44234
+ results:
44235
+ type: array
44236
+ items:
44237
+ $ref: '#/components/schemas/RbacRole'
44238
+ PaginatedSkill:
44239
+ type: object
44240
+ properties:
44241
+ next_page:
44242
+ type: string
44243
+ previous_page:
44244
+ type: string
44245
+ results:
44246
+ type: array
44247
+ items:
44248
+ $ref: '#/components/schemas/Skill'
44249
+ readOnly: true
44250
+ count:
44251
+ type: integer
44252
+ readOnly: true
44253
+ required:
44254
+ - count
44255
+ - next_page
44256
+ - previous_page
44257
+ - results
44258
+ PaginatedUserAppList:
44259
+ type: object
44260
+ required:
44261
+ - count
44262
+ - results
44263
+ properties:
44264
+ count:
44265
+ type: integer
44266
+ example: 123
44267
+ next:
44268
+ type: string
44269
+ nullable: true
44270
+ format: uri
44271
+ example: http://api.example.org/accounts/?page=4
44272
+ previous:
44273
+ type: string
44274
+ nullable: true
44275
+ format: uri
44276
+ example: http://api.example.org/accounts/?page=2
44277
+ results:
44278
+ type: array
44279
+ items:
44280
+ $ref: '#/components/schemas/UserApp'
44281
+ PaginatedUserGroupList:
44282
+ type: object
44283
+ required:
44284
+ - count
44285
+ - results
44286
+ properties:
44287
+ count:
44288
+ type: integer
44289
+ example: 123
44290
+ next:
44291
+ type: string
44292
+ nullable: true
44293
+ format: uri
44294
+ example: http://api.example.org/accounts/?page=4
44295
+ previous:
44296
+ type: string
44297
+ nullable: true
44298
+ format: uri
44299
+ example: http://api.example.org/accounts/?page=2
44300
+ results:
44301
+ type: array
44302
+ items:
44303
+ $ref: '#/components/schemas/UserGroup'
44304
+ PaginatedUserLicense:
43306
44305
  type: object
43307
- required:
43308
- - count
43309
- - results
44306
+ description: Response serializer for paginated user license list
43310
44307
  properties:
43311
44308
  count:
43312
44309
  type: integer
43313
- example: 123
43314
- next:
44310
+ description: Total number of results
44311
+ next_page:
43315
44312
  type: string
43316
- nullable: true
43317
44313
  format: uri
43318
- example: http://api.example.org/accounts/?page=4
43319
- previous:
43320
- type: string
43321
44314
  nullable: true
44315
+ description: URL for next page of results
44316
+ previous_page:
44317
+ type: string
43322
44318
  format: uri
43323
- example: http://api.example.org/accounts/?page=2
44319
+ nullable: true
44320
+ description: URL for previous page of results
43324
44321
  results:
43325
44322
  type: array
43326
44323
  items:
43327
- $ref: '#/components/schemas/RbacPolicy'
43328
- PaginatedRbacRoleList:
43329
- type: object
44324
+ $ref: '#/components/schemas/UserLicenseDetail'
44325
+ description: List of user licenses
43330
44326
  required:
43331
44327
  - count
44328
+ - next_page
44329
+ - previous_page
43332
44330
  - results
44331
+ PaginatedUserLicenseAssignment:
44332
+ type: object
44333
+ description: Response serializer for paginated user license assignment list
43333
44334
  properties:
43334
44335
  count:
43335
44336
  type: integer
43336
- example: 123
43337
- next:
44337
+ description: Total number of results
44338
+ next_page:
43338
44339
  type: string
43339
- nullable: true
43340
44340
  format: uri
43341
- example: http://api.example.org/accounts/?page=4
43342
- previous:
43343
- type: string
43344
44341
  nullable: true
44342
+ description: URL for next page of results
44343
+ previous_page:
44344
+ type: string
43345
44345
  format: uri
43346
- example: http://api.example.org/accounts/?page=2
44346
+ nullable: true
44347
+ description: URL for previous page of results
43347
44348
  results:
43348
44349
  type: array
43349
44350
  items:
43350
- $ref: '#/components/schemas/RbacRole'
43351
- PaginatedSkill:
44351
+ $ref: '#/components/schemas/UserLicenseAssignmentDetail'
44352
+ description: List of user license assignments
44353
+ required:
44354
+ - count
44355
+ - next_page
44356
+ - previous_page
44357
+ - results
44358
+ PaginatedUserLicenseGroupAssignment:
43352
44359
  type: object
44360
+ description: Response serializer for paginated user license group assignment
44361
+ list
43353
44362
  properties:
44363
+ count:
44364
+ type: integer
44365
+ description: Total number of results
43354
44366
  next_page:
43355
44367
  type: string
44368
+ format: uri
44369
+ nullable: true
44370
+ description: URL for next page of results
43356
44371
  previous_page:
43357
44372
  type: string
44373
+ format: uri
44374
+ nullable: true
44375
+ description: URL for previous page of results
43358
44376
  results:
43359
44377
  type: array
43360
44378
  items:
43361
- $ref: '#/components/schemas/Skill'
43362
- readOnly: true
43363
- count:
43364
- type: integer
43365
- readOnly: true
44379
+ $ref: '#/components/schemas/UserLicenseGroupAssignmentDetail'
44380
+ description: List of user license group assignments
43366
44381
  required:
43367
44382
  - count
43368
44383
  - next_page
43369
44384
  - previous_page
43370
44385
  - results
43371
- PaginatedUserAppList:
44386
+ PaginatedWatchedGroupListList:
43372
44387
  type: object
43373
44388
  required:
43374
44389
  - count
@@ -43381,17 +44396,17 @@ components:
43381
44396
  type: string
43382
44397
  nullable: true
43383
44398
  format: uri
43384
- example: http://api.example.org/accounts/?page=4
44399
+ example: http://api.example.org/accounts/?offset=400&limit=100
43385
44400
  previous:
43386
44401
  type: string
43387
44402
  nullable: true
43388
44403
  format: uri
43389
- example: http://api.example.org/accounts/?page=2
44404
+ example: http://api.example.org/accounts/?offset=200&limit=100
43390
44405
  results:
43391
44406
  type: array
43392
44407
  items:
43393
- $ref: '#/components/schemas/UserApp'
43394
- PaginatedUserGroupList:
44408
+ $ref: '#/components/schemas/WatchedGroupList'
44409
+ PaginatedWatchedUserReadList:
43395
44410
  type: object
43396
44411
  required:
43397
44412
  - count
@@ -43404,98 +44419,39 @@ components:
43404
44419
  type: string
43405
44420
  nullable: true
43406
44421
  format: uri
43407
- example: http://api.example.org/accounts/?page=4
44422
+ example: http://api.example.org/accounts/?offset=400&limit=100
43408
44423
  previous:
43409
44424
  type: string
43410
44425
  nullable: true
43411
44426
  format: uri
43412
- example: http://api.example.org/accounts/?page=2
44427
+ example: http://api.example.org/accounts/?offset=200&limit=100
43413
44428
  results:
43414
44429
  type: array
43415
44430
  items:
43416
- $ref: '#/components/schemas/UserGroup'
43417
- PaginatedUserLicense:
44431
+ $ref: '#/components/schemas/WatchedUserRead'
44432
+ PaginatedWatcherReadList:
43418
44433
  type: object
43419
- description: Response serializer for paginated user license list
43420
- properties:
43421
- count:
43422
- type: integer
43423
- description: Total number of results
43424
- next_page:
43425
- type: string
43426
- format: uri
43427
- nullable: true
43428
- description: URL for next page of results
43429
- previous_page:
43430
- type: string
43431
- format: uri
43432
- nullable: true
43433
- description: URL for previous page of results
43434
- results:
43435
- type: array
43436
- items:
43437
- $ref: '#/components/schemas/UserLicenseDetail'
43438
- description: List of user licenses
43439
44434
  required:
43440
44435
  - count
43441
- - next_page
43442
- - previous_page
43443
44436
  - results
43444
- PaginatedUserLicenseAssignment:
43445
- type: object
43446
- description: Response serializer for paginated user license assignment list
43447
44437
  properties:
43448
44438
  count:
43449
44439
  type: integer
43450
- description: Total number of results
43451
- next_page:
44440
+ example: 123
44441
+ next:
43452
44442
  type: string
43453
- format: uri
43454
44443
  nullable: true
43455
- description: URL for next page of results
43456
- previous_page:
43457
- type: string
43458
44444
  format: uri
43459
- nullable: true
43460
- description: URL for previous page of results
43461
- results:
43462
- type: array
43463
- items:
43464
- $ref: '#/components/schemas/UserLicenseAssignmentDetail'
43465
- description: List of user license assignments
43466
- required:
43467
- - count
43468
- - next_page
43469
- - previous_page
43470
- - results
43471
- PaginatedUserLicenseGroupAssignment:
43472
- type: object
43473
- description: Response serializer for paginated user license group assignment
43474
- list
43475
- properties:
43476
- count:
43477
- type: integer
43478
- description: Total number of results
43479
- next_page:
44445
+ example: http://api.example.org/accounts/?offset=400&limit=100
44446
+ previous:
43480
44447
  type: string
43481
- format: uri
43482
44448
  nullable: true
43483
- description: URL for next page of results
43484
- previous_page:
43485
- type: string
43486
44449
  format: uri
43487
- nullable: true
43488
- description: URL for previous page of results
44450
+ example: http://api.example.org/accounts/?offset=200&limit=100
43489
44451
  results:
43490
44452
  type: array
43491
44453
  items:
43492
- $ref: '#/components/schemas/UserLicenseGroupAssignmentDetail'
43493
- description: List of user license group assignments
43494
- required:
43495
- - count
43496
- - next_page
43497
- - previous_page
43498
- - results
44454
+ $ref: '#/components/schemas/WatcherRead'
43499
44455
  Pagination:
43500
44456
  type: object
43501
44457
  description: Serializer for pagination metadata.
@@ -45039,6 +45995,24 @@ components:
45039
45995
  type: array
45040
45996
  items:
45041
45997
  type: string
45998
+ PatchedWatchedGroupUpdate:
45999
+ type: object
46000
+ description: |-
46001
+ Payload for PATCH /watched-groups/{pk}/ — name only.
46002
+
46003
+ Watchers are managed via /watchers/; watched users via /watched-users/.
46004
+ properties:
46005
+ name:
46006
+ type: string
46007
+ PatchedWatcherUpdate:
46008
+ type: object
46009
+ description: Payload for PATCH /watched-groups/{wg_pk}/watchers/{pk}/ — events
46010
+ only.
46011
+ properties:
46012
+ events:
46013
+ type: array
46014
+ items:
46015
+ $ref: '#/components/schemas/EventsEnum'
45042
46016
  Pathway:
45043
46017
  type: object
45044
46018
  properties:
@@ -53922,6 +54896,135 @@ components:
53922
54896
  - display_name
53923
54897
  - id
53924
54898
  - total_watch
54899
+ WatchedGroupCreate:
54900
+ type: object
54901
+ description: |-
54902
+ Payload for POST /watched-groups/.
54903
+
54904
+ Platform is resolved by the view (auth token for normal callers, query
54905
+ param or body `platform_key` for service accounts) and passed via
54906
+ `context["platform"]`. The body `platform_key` field is consumed by the
54907
+ view, not the serializer.
54908
+
54909
+ `owner_id` is reserved for service-account callers. Platform users are
54910
+ implicitly the owner; specifying `owner_id` from a platform user yields 400.
54911
+ properties:
54912
+ watched_users:
54913
+ type: array
54914
+ items:
54915
+ type: integer
54916
+ description: edX user ID
54917
+ name:
54918
+ type: string
54919
+ watchers:
54920
+ type: array
54921
+ items:
54922
+ $ref: '#/components/schemas/WatcherEntry'
54923
+ owner_id:
54924
+ type: integer
54925
+ description: edX user ID
54926
+ writeOnly: true
54927
+ nullable: true
54928
+ required:
54929
+ - name
54930
+ WatchedGroupDetail:
54931
+ type: object
54932
+ description: |-
54933
+ Detail shape — counts plus opt-in inline collections.
54934
+
54935
+ `watchers` honors `watcher_limit` from context (default 0).
54936
+ `watched_users` honors `watched_user_limit` from context (default 0).
54937
+ Use the dedicated sub-resources for paginated walks.
54938
+ properties:
54939
+ id:
54940
+ type: integer
54941
+ readOnly: true
54942
+ name:
54943
+ type: string
54944
+ readOnly: true
54945
+ platform_key:
54946
+ type: string
54947
+ readOnly: true
54948
+ watcher_count:
54949
+ type: integer
54950
+ readOnly: true
54951
+ watchers:
54952
+ type: array
54953
+ items: {}
54954
+ readOnly: true
54955
+ watched_user_count:
54956
+ type: integer
54957
+ readOnly: true
54958
+ watched_users:
54959
+ type: array
54960
+ items: {}
54961
+ readOnly: true
54962
+ required:
54963
+ - id
54964
+ - name
54965
+ - platform_key
54966
+ - watched_user_count
54967
+ - watched_users
54968
+ - watcher_count
54969
+ - watchers
54970
+ WatchedGroupList:
54971
+ type: object
54972
+ description: Lean shape for list responses — no watchers, no watched_users,
54973
+ no counts.
54974
+ properties:
54975
+ id:
54976
+ type: integer
54977
+ readOnly: true
54978
+ name:
54979
+ type: string
54980
+ readOnly: true
54981
+ platform_key:
54982
+ type: string
54983
+ readOnly: true
54984
+ required:
54985
+ - id
54986
+ - name
54987
+ - platform_key
54988
+ WatchedGroupUpdate:
54989
+ type: object
54990
+ description: |-
54991
+ Payload for PATCH /watched-groups/{pk}/ — name only.
54992
+
54993
+ Watchers are managed via /watchers/; watched users via /watched-users/.
54994
+ properties:
54995
+ name:
54996
+ type: string
54997
+ WatchedUserRead:
54998
+ type: object
54999
+ description: |-
55000
+ Output for a single user inside a WatchedGroup.
55001
+
55002
+ The entity is the user — `id` is the user's id (matching the URL pk). The
55003
+ underlying `UserGroupLink.id` is a routing artifact and isn't surfaced.
55004
+ properties:
55005
+ id:
55006
+ type: integer
55007
+ readOnly: true
55008
+ username:
55009
+ type: string
55010
+ readOnly: true
55011
+ email:
55012
+ type: string
55013
+ format: email
55014
+ readOnly: true
55015
+ required:
55016
+ - email
55017
+ - id
55018
+ - username
55019
+ WatchedUserWrite:
55020
+ type: object
55021
+ description: Payload for POST /watched-groups/{wg_pk}/watched-users/.
55022
+ properties:
55023
+ user_id:
55024
+ type: integer
55025
+ description: edX user ID
55026
+ required:
55027
+ - user_id
53925
55028
  WatchedVideosPerCourse:
53926
55029
  type: object
53927
55030
  properties:
@@ -53984,6 +55087,68 @@ components:
53984
55087
  - full_name
53985
55088
  - percentage
53986
55089
  - username
55090
+ WatcherEntry:
55091
+ type: object
55092
+ description: 'A single watcher entry in the create payload: who watches and
55093
+ which events.'
55094
+ properties:
55095
+ watcher_id:
55096
+ type: integer
55097
+ events:
55098
+ type: array
55099
+ items:
55100
+ $ref: '#/components/schemas/EventsEnum'
55101
+ required:
55102
+ - watcher_id
55103
+ WatcherRead:
55104
+ type: object
55105
+ description: |-
55106
+ Output for a watcher (a user watching a WatchedGroup).
55107
+
55108
+ The entity is the user — `id` is the watcher's user id (matching the URL
55109
+ pk). The underlying `WatcherToWatchedGroup.id` is a routing artifact and
55110
+ isn't surfaced.
55111
+ properties:
55112
+ id:
55113
+ type: integer
55114
+ readOnly: true
55115
+ username:
55116
+ type: string
55117
+ readOnly: true
55118
+ email:
55119
+ type: string
55120
+ format: email
55121
+ readOnly: true
55122
+ events:
55123
+ description: List of events the watcher is subscribed to for this group
55124
+ required:
55125
+ - email
55126
+ - id
55127
+ - username
55128
+ WatcherUpdate:
55129
+ type: object
55130
+ description: Payload for PATCH /watched-groups/{wg_pk}/watchers/{pk}/ — events
55131
+ only.
55132
+ properties:
55133
+ events:
55134
+ type: array
55135
+ items:
55136
+ $ref: '#/components/schemas/EventsEnum'
55137
+ required:
55138
+ - events
55139
+ WatcherWrite:
55140
+ type: object
55141
+ description: Payload for POST /watched-groups/{wg_pk}/watchers/.
55142
+ properties:
55143
+ watcher_id:
55144
+ type: integer
55145
+ description: edX user ID
55146
+ events:
55147
+ type: array
55148
+ items:
55149
+ $ref: '#/components/schemas/EventsEnum'
55150
+ required:
55151
+ - watcher_id
53987
55152
  WhitelistedDomain:
53988
55153
  type: object
53989
55154
  properties: