/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CeleryHeartbeat } from '../models/CeleryHeartbeat'; import type { DemographicsFieldDefinition } from '../models/DemographicsFieldDefinition'; import type { DemographicsFieldDefinitionWrite } from '../models/DemographicsFieldDefinitionWrite'; import type { DesiredRole } from '../models/DesiredRole'; import type { EdxSignalReceiverRequest } from '../models/EdxSignalReceiverRequest'; import type { FieldDefinitionImport } from '../models/FieldDefinitionImport'; import type { GroupList } from '../models/GroupList'; import type { ImageUpload } from '../models/ImageUpload'; import type { LauncherViewPostRequest } from '../models/LauncherViewPostRequest'; import type { LtiKey } from '../models/LtiKey'; import type { LtiMentor } from '../models/LtiMentor'; import type { LtiTool } from '../models/LtiTool'; import type { MentorPolicy } from '../models/MentorPolicy'; import type { PaginatedAccessibleUserList } from '../models/PaginatedAccessibleUserList'; import type { PaginatedAuditLogEntryList } from '../models/PaginatedAuditLogEntryList'; import type { PaginatedPlatformApiKeyList } from '../models/PaginatedPlatformApiKeyList'; import type { PaginatedRbacGroupList } from '../models/PaginatedRbacGroupList'; import type { PaginatedRbacPolicyList } from '../models/PaginatedRbacPolicyList'; import type { PaginatedRbacRoleList } from '../models/PaginatedRbacRoleList'; import type { PaginatedUserGroupList } from '../models/PaginatedUserGroupList'; import type { PaginatedWatchedGroupListList } from '../models/PaginatedWatchedGroupListList'; import type { PaginatedWatchedUserReadList } from '../models/PaginatedWatchedUserReadList'; import type { PaginatedWatcherReadList } from '../models/PaginatedWatcherReadList'; import type { PatchedDemographicsFieldDefinitionWrite } from '../models/PatchedDemographicsFieldDefinitionWrite'; import type { PatchedPlatformApiKey } from '../models/PatchedPlatformApiKey'; import type { PatchedPlatformPublicImageAsset } from '../models/PatchedPlatformPublicImageAsset'; import type { PatchedPlatformPublicMetadata } from '../models/PatchedPlatformPublicMetadata'; import type { PatchedRbacGroup } from '../models/PatchedRbacGroup'; import type { PatchedRbacPolicy } from '../models/PatchedRbacPolicy'; import type { PatchedRbacRole } from '../models/PatchedRbacRole'; import type { PatchedUserGroup } from '../models/PatchedUserGroup'; import type { PatchedUserPlatformMetadataUpdate } from '../models/PatchedUserPlatformMetadataUpdate'; import type { PatchedWatchedGroupUpdate } from '../models/PatchedWatchedGroupUpdate'; import type { PatchedWatcherUpdate } from '../models/PatchedWatcherUpdate'; import type { PermissionCheckRequest } from '../models/PermissionCheckRequest'; import type { PlatformApiKey } from '../models/PlatformApiKey'; import type { PlatformApiTokenFieldPermissions } from '../models/PlatformApiTokenFieldPermissions'; import type { PlatformConfigurationList } from '../models/PlatformConfigurationList'; import type { PlatformConfigurationSet } from '../models/PlatformConfigurationSet'; import type { PlatformConfigurationSetResponse } from '../models/PlatformConfigurationSetResponse'; import type { PlatformList } from '../models/PlatformList'; import type { PlatformMembershipConfig } from '../models/PlatformMembershipConfig'; import type { PlatformMembershipConfigPostRequest } from '../models/PlatformMembershipConfigPostRequest'; import type { PlatformMembershipConfigPublicResponse } from '../models/PlatformMembershipConfigPublicResponse'; import type { PlatformPublicImageAsset } from '../models/PlatformPublicImageAsset'; import type { PlatformPublicMetadata } from '../models/PlatformPublicMetadata'; import type { PlatformUpdatePostRequest } from '../models/PlatformUpdatePostRequest'; import type { RbacGroup } from '../models/RbacGroup'; import type { RbacPolicy } from '../models/RbacPolicy'; import type { RbacRole } from '../models/RbacRole'; import type { RedirectTokenRequest } from '../models/RedirectTokenRequest'; import type { RedirectTokenResponse } from '../models/RedirectTokenResponse'; import type { ReportedRole } from '../models/ReportedRole'; import type { SetStudentLLMAccess } from '../models/SetStudentLLMAccess'; import type { SetStudentMentorCreationPermission } from '../models/SetStudentMentorCreationPermission'; import type { StudentLLMAccessResponse } from '../models/StudentLLMAccessResponse'; import type { StudentMentorCreationPermissionResponse } from '../models/StudentMentorCreationPermissionResponse'; import type { TokenProvisionInput } from '../models/TokenProvisionInput'; import type { TokenProxyInput } from '../models/TokenProxyInput'; import type { TokenProxyOutput } from '../models/TokenProxyOutput'; import type { UserDefaultPlatformGetResponse } from '../models/UserDefaultPlatformGetResponse'; import type { UserDefaultPlatformPostRequest } from '../models/UserDefaultPlatformPostRequest'; import type { UserDefaultPlatformPostResponse } from '../models/UserDefaultPlatformPostResponse'; import type { UserDeleteAPIRequest } from '../models/UserDeleteAPIRequest'; import type { UserDeleteAPIResponse } from '../models/UserDeleteAPIResponse'; import type { UserDemographicsResponse } from '../models/UserDemographicsResponse'; import type { UserDemographicsWrite } from '../models/UserDemographicsWrite'; import type { UserGroup } from '../models/UserGroup'; import type { UserGroupAccess } from '../models/UserGroupAccess'; import type { UserGroupPolicy } from '../models/UserGroupPolicy'; import type { UserPlatformLink } from '../models/UserPlatformLink'; import type { UserPlatformManagementListViewGetResponse } from '../models/UserPlatformManagementListViewGetResponse'; import type { UserPlatformMetadata } from '../models/UserPlatformMetadata'; import type { UserPlatformMetadataReplace } from '../models/UserPlatformMetadataReplace'; import type { UserPlatformSelfLinkRequest } from '../models/UserPlatformSelfLinkRequest'; import type { UserPlatformSelfLinkResponse } from '../models/UserPlatformSelfLinkResponse'; import type { UserPlatformViewPostRequest } from '../models/UserPlatformViewPostRequest'; import type { UserPolicyUpdate } from '../models/UserPolicyUpdate'; import type { UserPolicyUpdateResponse } from '../models/UserPolicyUpdateResponse'; import type { UserProxyBulkRequest } from '../models/UserProxyBulkRequest'; import type { UserProxyGetResponse } from '../models/UserProxyGetResponse'; import type { UserProxyPostRequest } from '../models/UserProxyPostRequest'; import type { UserProxyPostResponse } from '../models/UserProxyPostResponse'; import type { UserSearchViewGetResponse } from '../models/UserSearchViewGetResponse'; import type { WatchedGroupCreate } from '../models/WatchedGroupCreate'; import type { WatchedGroupDetail } from '../models/WatchedGroupDetail'; import type { WatchedGroupUpdate } from '../models/WatchedGroupUpdate'; import type { WatchedUserRead } from '../models/WatchedUserRead'; import type { WatchedUserWrite } from '../models/WatchedUserWrite'; import type { WatcherRead } from '../models/WatcherRead'; import type { WatcherUpdate } from '../models/WatcherUpdate'; import type { WatcherWrite } from '../models/WatcherWrite'; import type { WhitelistedDomain } from '../models/WhitelistedDomain'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class CoreService { /** * Resolve-or-provision a user, then mint DM + AXD tokens. * * Params: * - username: str (required) * - email: str (required) * - name: str (optional) * - platform_key: str (required) * @returns TokenProxyOutput * @throws ApiError */ public static coreConsolidatedTokenProvisionCreate({ requestBody, }: { requestBody: TokenProvisionInput, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/consolidated-token/provision/', body: requestBody, mediaType: 'application/json', }); } /** * Create DM and AXD Tokens for user and platform_key * * Params: * - Any of user_id, username, or email (choose one only, required) * - platform_key: str (required) * @returns TokenProxyOutput * @throws ApiError */ public static coreConsolidatedTokenProxyCreate({ requestBody, }: { requestBody: TokenProxyInput, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/consolidated-token/proxy/', body: requestBody, mediaType: 'application/json', }); } /** * Show (active) departments associated with a platform * @returns any No response body * @throws ApiError */ public static coreDepartmentsRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/departments/', }); } /** * Create/update a department * @returns any No response body * @throws ApiError */ public static coreDepartmentsCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/departments/', }); } /** * Delete department * @returns void * @throws ApiError */ public static coreDepartmentsDestroy(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/departments/', }); } /** * Show active users in department (paginated) * @returns any No response body * @throws ApiError */ public static coreDepartmentsMembersRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/departments/members/', }); } /** * Add single user to department, or update status * @returns any No response body * @throws ApiError */ public static coreDepartmentsMembersCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/departments/members/', }); } /** * Delete department member * @returns void * @throws ApiError */ public static coreDepartmentsMembersDestroy(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/departments/members/', }); } /** * Add users to department, or update status * @returns any No response body * @throws ApiError */ public static coreDepartmentsMembersBulkCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/departments/members/bulk/', }); } /** * Get department member admin info of requesting user * @returns any No response body * @throws ApiError */ public static coreDepartmentsMembersCheckRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/departments/members/check/', }); } /** * Check if a domain is whitelisted * @returns any No response body * @throws ApiError */ public static coreDomainsWhitelistRetrieve({ url, isActive, }: { url: string, isActive?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/domains/whitelist/', query: { 'is_active': isActive, 'url': url, }, }); } /** * Add a new domain to whitelist * @returns WhitelistedDomain * @throws ApiError */ public static coreDomainsWhitelistCreate({ requestBody, }: { requestBody: WhitelistedDomain, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/domains/whitelist/', body: requestBody, mediaType: 'application/json', }); } /** * **Use Case** * * Celery heartbeat endpoint. * * **Example Request** * * GET /api/core/heartbeat/celery/ * * **Response Values** * * * 200 on success. * * 500 on failure. * @returns any No response body * @throws ApiError */ public static coreHeartbeatCeleryRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/heartbeat/celery/', }); } /** * **Use Case** * * Celery Beat heartbeat endpoint. * * **Example Request** * * GET /api/core/heartbeat/celery-beat/ * * **Response Values** * * * 200 on success. * * 500 on failure. * @returns CeleryHeartbeat * @throws ApiError */ public static coreHeartbeatCeleryBeatRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/heartbeat/celery-beat/', }); } /** * GET Launch status * * Params: * key * user_id: Optional * @returns PlatformList * @throws ApiError */ public static coreLauncherRetrieve({ key, userId, }: { key: string, userId?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/launcher/', query: { 'key': key, 'user_id': userId, }, }); } /** * POST: Launch a new edX platform * * Params: * user_id: The ID of the requesting user (required) * key: The Deep LMS subdomain (required) * name: The edX platform name ("optional") * org: The edX organization ("optional") * lms_url: LMS URL ("optional") * cms_url: CMS URL ("optional") * portal_url: Portal URL ("optional") * use_default_hosts: Use Django settings for LMS/CMS hosts ("optional") * @returns PlatformList * @throws ApiError */ public static coreLauncherCreate({ requestBody, }: { requestBody: LauncherViewPostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/launcher/', body: requestBody, mediaType: 'application/json', }); } /** * List your LTI Mentor's * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiAgentsList({ platformKey, mentorId, }: { /** * Platform Key */ platformKey: string, /** * The mentor's unique_id to filter for */ mentorId?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-agents/', query: { 'mentor_id': mentorId, 'platform_key': platformKey, }, }); } /** * Create a new LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiAgentsCreate({ requestBody, }: { requestBody: LtiMentor, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/lti/1p3/provider/lti-agents/', body: requestBody, mediaType: 'application/json', }); } /** * Get details about a specific LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiAgentsRetrieve({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-agents/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * Update an LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiAgentsUpdate({ id, requestBody, }: { id: string, requestBody: LtiMentor, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/lti/1p3/provider/lti-agents/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete an LTI Mentor * @returns void * @throws ApiError */ public static coreLti1P3ProviderLtiAgentsDestroy({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/lti/1p3/provider/lti-agents/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * List your LTI Provider Key's * @returns LtiKey * @throws ApiError */ public static coreLti1P3ProviderLtiKeysList({ platformKey, }: { /** * Platform Key */ platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-keys/', query: { 'platform_key': platformKey, }, }); } /** * Create a new LTI Provider Key * @returns LtiKey * @throws ApiError */ public static coreLti1P3ProviderLtiKeysCreate({ requestBody, }: { requestBody: LtiKey, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/lti/1p3/provider/lti-keys/', body: requestBody, mediaType: 'application/json', }); } /** * Get details about a specific LTI Provider Key * @returns LtiKey * @throws ApiError */ public static coreLti1P3ProviderLtiKeysRetrieve({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-keys/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * Update an LTI Provider Key * @returns LtiKey * @throws ApiError */ public static coreLti1P3ProviderLtiKeysUpdate({ id, requestBody, }: { id: string, requestBody: LtiKey, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/lti/1p3/provider/lti-keys/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete an LTI Provider Key * @returns void * @throws ApiError */ public static coreLti1P3ProviderLtiKeysDestroy({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/lti/1p3/provider/lti-keys/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * @deprecated * **Deprecated — use `/api/core/lti/1p3/provider/lti-agents/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/lti/1p3/provider/lti-agents/` (`mentor` → `agent`) and will be removed in a future release. * * List your LTI Mentor's * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiMentorsList({ platformKey, mentorId, }: { /** * Platform Key */ platformKey: string, /** * The mentor's unique_id to filter for */ mentorId?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-mentors/', query: { 'mentor_id': mentorId, 'platform_key': platformKey, }, }); } /** * @deprecated * **Deprecated — use `/api/core/lti/1p3/provider/lti-agents/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/lti/1p3/provider/lti-agents/` (`mentor` → `agent`) and will be removed in a future release. * * Create a new LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiMentorsCreate({ requestBody, }: { requestBody: LtiMentor, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/lti/1p3/provider/lti-mentors/', body: requestBody, mediaType: 'application/json', }); } /** * @deprecated * **Deprecated — use `/api/core/lti/1p3/provider/lti-agents/{id}/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/lti/1p3/provider/lti-agents/{id}/` (`mentor` → `agent`) and will be removed in a future release. * * Get details about a specific LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiMentorsRetrieve({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-mentors/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * @deprecated * **Deprecated — use `/api/core/lti/1p3/provider/lti-agents/{id}/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/lti/1p3/provider/lti-agents/{id}/` (`mentor` → `agent`) and will be removed in a future release. * * Update an LTI Mentor * @returns LtiMentor * @throws ApiError */ public static coreLti1P3ProviderLtiMentorsUpdate({ id, requestBody, }: { id: string, requestBody: LtiMentor, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/lti/1p3/provider/lti-mentors/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', }); } /** * @deprecated * **Deprecated — use `/api/core/lti/1p3/provider/lti-agents/{id}/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/lti/1p3/provider/lti-agents/{id}/` (`mentor` → `agent`) and will be removed in a future release. * * Delete an LTI Mentor * @returns void * @throws ApiError */ public static coreLti1P3ProviderLtiMentorsDestroy({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/lti/1p3/provider/lti-mentors/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * List your LTI Tool's * @returns LtiTool * @throws ApiError */ public static coreLti1P3ProviderLtiToolsList({ platformKey, }: { /** * Platform Key */ platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-tools/', query: { 'platform_key': platformKey, }, }); } /** * Create a new LTI Tool * @returns LtiTool * @throws ApiError */ public static coreLti1P3ProviderLtiToolsCreate({ requestBody, }: { requestBody: LtiTool, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/lti/1p3/provider/lti-tools/', body: requestBody, mediaType: 'application/json', }); } /** * Get details about a specific LTI Tool * @returns LtiTool * @throws ApiError */ public static coreLti1P3ProviderLtiToolsRetrieve({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/lti/1p3/provider/lti-tools/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * Update an LTI Tool * @returns LtiTool * @throws ApiError */ public static coreLti1P3ProviderLtiToolsUpdate({ id, requestBody, }: { id: string, requestBody: LtiTool, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/lti/1p3/provider/lti-tools/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete an LTI Tool * @returns void * @throws ApiError */ public static coreLti1P3ProviderLtiToolsDestroy({ id, platformKey, }: { id: string, /** * Platform Key */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/lti/1p3/provider/lti-tools/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, }); } /** * Get platform logo * @returns any * @throws ApiError */ public static coreOrgsDarkModeLogoRetrieve({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/dark-mode-logo/', path: { 'org': org, }, }); } /** * Upload a new platform logo * @returns ImageUpload * @throws ApiError */ public static coreOrgsDarkModeLogoCreateCreate({ org, requestBody, }: { org: string, requestBody: ImageUpload, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/orgs/{org}/dark-mode-logo/create/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Get platform logo * @returns any * @throws ApiError */ public static coreOrgsFaviconRetrieve({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/favicon/', path: { 'org': org, }, }); } /** * Upload a new platform logo * @returns ImageUpload * @throws ApiError */ public static coreOrgsFaviconCreateCreate({ org, requestBody, }: { org: string, requestBody: ImageUpload, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/orgs/{org}/favicon/create/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Get platform logo * @returns any * @throws ApiError */ public static coreOrgsLogoRetrieve({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/logo/', path: { 'org': org, }, }); } /** * Upload a new platform logo * @returns ImageUpload * @throws ApiError */ public static coreOrgsLogoCreateCreate({ org, requestBody, }: { org: string, requestBody: ImageUpload, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/orgs/{org}/logo/create/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * @returns PlatformPublicMetadata * @throws ApiError */ public static coreOrgsMetadataRetrieve({ org, }: { org: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/metadata/', path: { 'org': org, }, }); } /** * @returns PlatformPublicMetadata * @throws ApiError */ public static coreOrgsMetadataUpdate({ org, requestBody, }: { org: string, requestBody?: PlatformPublicMetadata, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/orgs/{org}/metadata/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * @returns PlatformPublicMetadata * @throws ApiError */ public static coreOrgsMetadataPartialUpdate({ org, requestBody, }: { org: string, requestBody?: PatchedPlatformPublicMetadata, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/orgs/{org}/metadata/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Creates redirect tokens for a URL specified by for a platform * @returns RedirectTokenResponse * @throws ApiError */ public static coreOrgsRedirectTokensCreate({ org, requestBody, }: { org: string, requestBody: RedirectTokenRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/orgs/{org}/redirect-tokens/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Returns Redirect URL for the token specified. * * ``` * Requires user to be a member of the platform with the token passed * ``` * @returns RedirectTokenResponse * @throws ApiError */ public static coreOrgsRedirectTokensRetrieve({ org, redirectToken, }: { org: string, redirectToken: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/redirect-tokens/{redirect_token}/', path: { 'org': org, 'redirect_token': redirectToken, }, }); } /** * Delete specific token * @returns void * @throws ApiError */ public static coreOrgsRedirectTokensDeleteDestroy({ org, redirectToken, mentorUniqueId, }: { org: string, redirectToken: string, /** * Optional mentor unique ID for RBAC ownership check */ mentorUniqueId?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/orgs/{org}/redirect-tokens/{redirect_token}/delete', path: { 'org': org, 'redirect_token': redirectToken, }, query: { 'mentor_unique_id': mentorUniqueId, }, }); } /** * Get platform logo * @returns any * @throws ApiError */ public static coreOrgsThumbnailRetrieve({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/orgs/{org}/thumbnail/', path: { 'org': org, }, }); } /** * Upload a new platform logo * @returns ImageUpload * @throws ApiError */ public static coreOrgsThumbnailCreateCreate({ org, requestBody, }: { org: string, requestBody: ImageUpload, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/orgs/{org}/thumbnail/create/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * GET /api/core/platform/ * Get main platform info. * * POST /api/core/platform/ * Save main platform settings. * * Params: * user_id (optional) * key * field_key (POST) * value (POST) * @returns PlatformList * @throws ApiError */ public static corePlatformRetrieve({ key, userId, }: { key: string, userId?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/', query: { 'key': key, 'user_id': userId, }, }); } /** * Update platform object * * Params: * user_id * * key * new_key (If changing platform key) * name * * Advanced Params (Don't expose these to users) * lms_url * cms_url * portal_url * @returns PlatformList * @throws ApiError */ public static corePlatformCreate({ requestBody, }: { requestBody: PlatformUpdatePostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platform/', body: requestBody, mediaType: 'application/json', }); } /** * List Platform API Key's belonging to the target platform * @returns PaginatedPlatformApiKeyList * @throws ApiError */ public static corePlatformApiTokensList({ platformKey, page, pageSize, }: { /** * Platform key of target platform */ platformKey: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/api-tokens/', query: { 'page': page, 'page_size': pageSize, 'platform_key': platformKey, }, }); } /** * Create a new Platform Api Key for the target platform * @returns PlatformApiKey * @throws ApiError */ public static corePlatformApiTokensCreate({ requestBody, }: { requestBody: PlatformApiKey, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platform/api-tokens/', body: requestBody, mediaType: 'application/json', }); } /** * Retrieve a single Platform Api Key by name, including the policies and groups currently associated with it * @returns PlatformApiKey * @throws ApiError */ public static corePlatformApiTokensRetrieve({ name, platformKey, }: { name: string, /** * Platform key of target platform */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/api-tokens/{name}', path: { 'name': name, }, query: { 'platform_key': platformKey, }, }); } /** * Update a Platform Api Key's mode and associated policies/groups in the target platform * @returns PlatformApiKey * @throws ApiError */ public static corePlatformApiTokensPartialUpdate({ name, platformKey, requestBody, }: { name: string, /** * Platform key of target platform */ platformKey: string, requestBody?: PatchedPlatformApiKey, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/platform/api-tokens/{name}', path: { 'name': name, }, query: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete Platform Api Key by name in the target platform * @returns void * @throws ApiError */ public static corePlatformApiTokensDestroy({ name, platformKey, }: { name: string, /** * Platform key of target platform */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/platform/api-tokens/{name}', path: { 'name': name, }, query: { 'platform_key': platformKey, }, }); } /** * Per-field write permissions for the create form, as {field: {"write": bool}}. Gated on create access like the create endpoint. * @returns PlatformApiTokenFieldPermissions * @throws ApiError */ public static corePlatformApiTokensFieldPermissionsRetrieve({ platformKey, }: { /** * Platform key of target platform */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/api-tokens/field-permissions/', query: { 'platform_key': platformKey, }, }); } /** * GET /site * Get site settings. * * POST /site * Save site settings. * * Params: * user_id * key * field_key (POST) * value (POST) * @returns any * @throws ApiError */ public static corePlatformConfigSiteRetrieve({ key, userId, }: { key: string, userId?: number, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/config/site/', query: { 'key': key, 'user_id': userId, }, }); } /** * GET /site * Get site settings. * * POST /site * Save site settings. * * Params: * user_id * key * field_key (POST) * value (POST) * @returns any * @throws ApiError */ public static corePlatformConfigSiteCreate({ requestBody, }: { requestBody?: Record, }): CancelablePromise> { return __request(OpenAPI, { method: 'POST', url: '/api/core/platform/config/site/', body: requestBody, mediaType: 'application/json', }); } /** * List Platform Configurations * Get all configuration values for a platform with proper type casting. * @returns PlatformConfigurationList * @throws ApiError */ public static corePlatformConfigurationsList({ platformKey, }: { /** * Platform key to get/set configurations for */ platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/configurations/', query: { 'platform_key': platformKey, }, }); } /** * Set Platform Configurations * Set or update multiple platform configuration values.Values will be automatically normalized for storage and cast appropriately on retrieval. * @returns PlatformConfigurationSetResponse * @throws ApiError */ public static corePlatformConfigurationsCreate({ requestBody, }: { requestBody: PlatformConfigurationSet, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platform/configurations/', body: requestBody, mediaType: 'application/json', }); } /** * Get all available settings that can be configured with current platform values * @returns PlatformConfigurationList * @throws ApiError */ public static corePlatformConfigurationsAvailableSettingsRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/configurations/available-settings/', }); } /** * Delete a specific platform configuration * * Query Parameters: * - platform_key: Platform key * - key: Configuration key to delete * @returns void * @throws ApiError */ public static corePlatformConfigurationsDeleteConfigDestroy(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/platform/configurations/delete-config/', }); } /** * Get public platform configurations for platform members * * Query Parameters: * - platform_key: Platform key to get public configurations for * * Returns: * - platform_key: The platform key * - configurations: Dictionary of public config key-value pairs * - count: Number of public configurations returned * @returns PlatformConfigurationList * @throws ApiError */ public static corePlatformConfigurationsPublicRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/configurations/public/', }); } /** * Retrieve users associated with platform and optionally their policies when return_policies is set * @returns UserPlatformManagementListViewGetResponse * @throws ApiError */ public static corePlatformUsersRetrieve({ page, pageSize, platformKey, platformOrg, query, returnPolicies, sort, }: { page?: number, pageSize?: number, platformKey?: string, platformOrg?: string, query?: string, returnPolicies?: string, sort?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platform/users/', query: { 'page': page, 'page_size': pageSize, 'platform_key': platformKey, 'platform_org': platformOrg, 'query': query, 'return_policies': returnPolicies, 'sort': sort, }, }); } /** * Bulk update user policies on a platform. Requires Ibl.Core/UserPolicies/write permission. * * Policy removals are processed before policy additions. * @returns UserPolicyUpdateResponse * @throws ApiError */ public static corePlatformUsersPoliciesUpdate({ requestBody, }: { requestBody: Array, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/platform/users/policies/', body: requestBody, mediaType: 'application/json', }); } /** * Retrieve demographics for a user. Self-access or platform admin required. * @returns UserDemographicsResponse * @throws ApiError */ public static corePlatformsDemographicsRetrieve({ platformKey, username, }: { platformKey: string, username: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/{username}/demographics/', path: { 'platform_key': platformKey, 'username': username, }, }); } /** * Create or update demographics for a user. Self-access or platform admin required. * @returns UserDemographicsResponse * @throws ApiError */ public static corePlatformsDemographicsUpdate({ platformKey, username, requestBody, }: { platformKey: string, username: string, requestBody?: UserDemographicsWrite, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/platforms/{platform_key}/{username}/demographics/', path: { 'platform_key': platformKey, 'username': username, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete demographics for a user. Self-access or platform admin required. * @returns void * @throws ApiError */ public static corePlatformsDemographicsDestroy({ platformKey, username, }: { platformKey: string, username: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/platforms/{platform_key}/{username}/demographics/', path: { 'platform_key': platformKey, 'username': username, }, }); } /** * List platform audit logs * Retrieve audit log entries scoped to a platform. Includes both model changes (RBAC roles/policies/groups, user-platform links, global configuration) and manual events (login, export, download). Supports filtering by event type, action, actor, and date range. * @returns PaginatedAuditLogEntryList * @throws ApiError */ public static corePlatformsAuditLogsList({ platformKey, action, actorEmail, actorUsername, eventType, fromDate, limit, offset, toDate, }: { platformKey: string, /** * Filter by action: 0=create, 1=update, 2=delete, 3=access. */ action?: 0 | 1 | 2 | 3, /** * Filter by actor's email. */ actorEmail?: string, /** * Filter by actor's username. */ actorUsername?: string, /** * Filter by manual event type (e.g. login, export). */ eventType?: string, /** * Inclusive lower bound on timestamp (ISO8601 date). */ fromDate?: string, /** * Number of results to return per page. */ limit?: number, /** * The initial index from which to return the results. */ offset?: number, /** * Inclusive upper bound on timestamp (ISO8601 date). */ toDate?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/audit-logs/', path: { 'platform_key': platformKey, }, query: { 'action': action, 'actor_email': actorEmail, 'actor_username': actorUsername, 'event_type': eventType, 'from_date': fromDate, 'limit': limit, 'offset': offset, 'to_date': toDate, }, errors: { 401: `Authentication required`, 403: `Not permitted to read these audit logs`, }, }); } /** * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsList({ platformKey, }: { platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/demographics/fields/', path: { 'platform_key': platformKey, }, }); } /** * Create a custom demographics field definition for the platform. * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsCreate({ platformKey, requestBody, }: { platformKey: string, requestBody: DemographicsFieldDefinitionWrite, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platforms/{platform_key}/demographics/fields/', path: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsRetrieve({ platformKey, slug, }: { platformKey: string, slug: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/demographics/fields/{slug}/', path: { 'platform_key': platformKey, 'slug': slug, }, }); } /** * Update a custom demographics field definition. * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsUpdate({ platformKey, slug, requestBody, }: { platformKey: string, slug: string, requestBody: DemographicsFieldDefinitionWrite, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/platforms/{platform_key}/demographics/fields/{slug}/', path: { 'platform_key': platformKey, 'slug': slug, }, body: requestBody, mediaType: 'application/json', }); } /** * Partially update a custom demographics field definition. * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsPartialUpdate({ platformKey, slug, requestBody, }: { platformKey: string, slug: string, requestBody?: PatchedDemographicsFieldDefinitionWrite, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/platforms/{platform_key}/demographics/fields/{slug}/', path: { 'platform_key': platformKey, 'slug': slug, }, body: requestBody, mediaType: 'application/json', }); } /** * @returns void * @throws ApiError */ public static corePlatformsDemographicsFieldsDestroy({ platformKey, slug, }: { platformKey: string, slug: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/platforms/{platform_key}/demographics/fields/{slug}/', path: { 'platform_key': platformKey, 'slug': slug, }, }); } /** * Export all field definitions for the platform as JSON or CSV. * @returns DemographicsFieldDefinition * @throws ApiError */ public static corePlatformsDemographicsFieldsExportList({ platformKey, exportFormat = 'json', }: { platformKey: string, /** * Export format: json or csv */ exportFormat?: 'csv' | 'json', }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/demographics/fields/export/', path: { 'platform_key': platformKey, }, query: { 'export_format': exportFormat, }, }); } /** * Import field definitions from JSON or CSV file. Returns 207 on partial success. * @returns any No response body * @throws ApiError */ public static corePlatformsDemographicsFieldsImportCreate({ platformKey, requestBody, }: { platformKey: string, requestBody?: FieldDefinitionImport, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platforms/{platform_key}/demographics/fields/import/', path: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * Shared functionality for platform public image asset views. * @returns PlatformPublicImageAsset * @throws ApiError */ public static corePlatformsPublicImageAssetsList({ platformKey, }: { platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/public-image-assets/', path: { 'platform_key': platformKey, }, }); } /** * Shared functionality for platform public image asset views. * @returns PlatformPublicImageAsset * @throws ApiError */ public static corePlatformsPublicImageAssetsCreate({ platformKey, requestBody, }: { platformKey: string, requestBody: PlatformPublicImageAsset, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/platforms/{platform_key}/public-image-assets/', path: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * Shared functionality for platform public image asset views. * @returns PlatformPublicImageAsset * @throws ApiError */ public static corePlatformsPublicImageAssetsRetrieve({ assetId, platformKey, }: { assetId: number, platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/public-image-assets/{asset_id}/', path: { 'asset_id': assetId, 'platform_key': platformKey, }, }); } /** * Shared functionality for platform public image asset views. * @returns PlatformPublicImageAsset * @throws ApiError */ public static corePlatformsPublicImageAssetsUpdate({ assetId, platformKey, requestBody, }: { assetId: number, platformKey: string, requestBody: PlatformPublicImageAsset, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/platforms/{platform_key}/public-image-assets/{asset_id}/', path: { 'asset_id': assetId, 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * Shared functionality for platform public image asset views. * @returns PlatformPublicImageAsset * @throws ApiError */ public static corePlatformsPublicImageAssetsPartialUpdate({ assetId, platformKey, requestBody, }: { assetId: number, platformKey: string, requestBody?: PatchedPlatformPublicImageAsset, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/platforms/{platform_key}/public-image-assets/{asset_id}/', path: { 'asset_id': assetId, 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', }); } /** * Shared functionality for platform public image asset views. * @returns void * @throws ApiError */ public static corePlatformsPublicImageAssetsDestroy({ assetId, platformKey, }: { assetId: number, platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/platforms/{platform_key}/public-image-assets/{asset_id}/', path: { 'asset_id': assetId, 'platform_key': platformKey, }, }); } /** * Shared functionality for platform public image asset views. * @returns any * @throws ApiError */ public static corePlatformsPublicImageAssetsFileRetrieve({ assetId, platformKey, }: { assetId: number, platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/platforms/{platform_key}/public-image-assets/{asset_id}/file/', path: { 'asset_id': assetId, 'platform_key': platformKey, }, }); } /** * Get RBAC action definitions * Returns a flat dictionary of all available RBAC actions with descriptions and assignable resource paths. Assignable resources are returned relative to the requestors platform. * @returns any Action definitions * @throws ApiError */ public static coreRbacActionsDefinitionsRetrieve(): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/actions/definitions/', }); } /** * Get RBAC action tree * Returns a hierarchical tree of all available RBAC actions * @returns any Action tree * @throws ApiError */ public static coreRbacActionsTreeRetrieve(): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/actions/tree/', }); } /** * Get mentor access status * Retrieve current access information for a specific mentor, including all groups and users that have access with their respective roles. * @returns MentorPolicy * @throws ApiError */ public static coreRbacAgentAccessList({ mentorId, platformKey, }: { /** * ID of the mentor to get access information for */ mentorId: number, /** * Platform key where the mentor belongs */ platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/agent-access/', query: { 'mentor_id': mentorId, 'platform_key': platformKey, }, errors: { 400: `Missing or invalid query parameters`, 403: `Permission denied - ShareMentor permission required`, 404: `Platform not found`, 500: `Internal server error`, }, }); } /** * Control which RbacGroups and/or Users have access to a mentor and with what Role * Create or update RBAC policies to manage group and user access to specific mentors. Creates role-specific policies and handles adding/removing groups and users. * @returns MentorPolicy * @throws ApiError */ public static coreRbacAgentAccessCreate({ requestBody, }: { requestBody: MentorPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/agent-access/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data or validation errors`, 403: `Permission denied - ShareMentor permission required`, 404: `Platform or mentor not found`, }, }); } /** * List RBAC groups * Retrieve a list of RBAC groups. Can be filtered by platform_key, owner, name, username, or email. Use include_users to control response payload. * @returns PaginatedRbacGroupList * @throws ApiError */ public static coreRbacGroupsList({ email, includeUsers = true, name, owner, page, pageSize, platformKey, username, }: { /** * Filter groups by email (exact match, case-insensitive) */ email?: string, /** * Include user information in response (default: true) */ includeUsers?: boolean, /** * Filter groups by name (case-insensitive partial match) */ name?: string, /** * Filter groups by owner username */ owner?: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, /** * Filter groups by platform key */ platformKey?: string, /** * Filter groups by username (exact match, case-insensitive) */ username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/groups/', query: { 'email': email, 'include_users': includeUsers, 'name': name, 'owner': owner, 'page': page, 'page_size': pageSize, 'platform_key': platformKey, 'username': username, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Create RBAC group * Create a new RBAC group for a platform. Users can be assigned during creation. * @returns RbacGroup * @throws ApiError */ public static coreRbacGroupsCreate({ requestBody, }: { requestBody: RbacGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/groups/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Retrieve RBAC group * Retrieve details of a specific RBAC group including assigned users. * @returns RbacGroup * @throws ApiError */ public static coreRbacGroupsRetrieve({ id, }: { /** * A unique integer value identifying this RBAC Group. */ id: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/groups/{id}/', path: { 'id': id, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, 404: `Group not found`, }, }); } /** * Update RBAC group * Update an existing RBAC group. Platform validation applies for user assignments. Cannot update internal system groups. * @returns RbacGroup * @throws ApiError */ public static coreRbacGroupsUpdate({ id, requestBody, }: { /** * A unique integer value identifying this RBAC Group. */ id: number, requestBody: RbacGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/rbac/groups/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, 403: `Permission denied - insufficient RBAC permissions or attempting to edit internal system group`, 404: `Group not found`, }, }); } /** * Partially update RBAC group * Partially update an existing RBAC group. Platform validation applies for user assignments. Cannot update internal system groups. * @returns RbacGroup * @throws ApiError */ public static coreRbacGroupsPartialUpdate({ id, requestBody, }: { /** * A unique integer value identifying this RBAC Group. */ id: number, requestBody?: PatchedRbacGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/rbac/groups/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, 403: `Permission denied - insufficient RBAC permissions or attempting to edit internal system group`, 404: `Group not found`, }, }); } /** * Delete RBAC group * Delete an RBAC group and all associated group role assignments. Cannot delete internal system groups. * @returns void * @throws ApiError */ public static coreRbacGroupsDestroy({ id, platformKey, }: { /** * A unique integer value identifying this RBAC Group. */ id: number, /** * platform key for authorization check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/rbac/groups/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied - insufficient RBAC permissions or attempting to delete internal system group`, 404: `Group not found`, }, }); } /** * @deprecated * Get mentor access status * **Deprecated — use `/api/core/rbac/agent-access/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/rbac/agent-access/` (`mentor` → `agent`) and will be removed in a future release. * * Retrieve current access information for a specific mentor, including all groups and users that have access with their respective roles. * @returns MentorPolicy * @throws ApiError */ public static coreRbacMentorAccessList({ mentorId, platformKey, }: { /** * ID of the mentor to get access information for */ mentorId: number, /** * Platform key where the mentor belongs */ platformKey: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/mentor-access/', query: { 'mentor_id': mentorId, 'platform_key': platformKey, }, errors: { 400: `Missing or invalid query parameters`, 403: `Permission denied - ShareMentor permission required`, 404: `Platform not found`, 500: `Internal server error`, }, }); } /** * @deprecated * Control which RbacGroups and/or Users have access to a mentor and with what Role * **Deprecated — use `/api/core/rbac/agent-access/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/rbac/agent-access/` (`mentor` → `agent`) and will be removed in a future release. * * Create or update RBAC policies to manage group and user access to specific mentors. Creates role-specific policies and handles adding/removing groups and users. * @returns MentorPolicy * @throws ApiError */ public static coreRbacMentorAccessCreate({ requestBody, }: { requestBody: MentorPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/mentor-access/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data or validation errors`, 403: `Permission denied - ShareMentor permission required`, 404: `Platform or mentor not found`, }, }); } /** * Check user permissions * Check user permissions for specified resources * @returns any No response body * @throws ApiError */ public static coreRbacPermissionsCheckCreate({ requestBody, }: { requestBody: PermissionCheckRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/permissions/check/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data`, 401: `Authentication required`, 403: `Permission denied`, }, }); } /** * List RBAC policies * Retrieve a list of RBAC policies. Can be filtered by platform_key, role_id, name, username, email, or group. Use include_users and include_groups to control response payload. * @returns PaginatedRbacPolicyList * @throws ApiError */ public static coreRbacPoliciesList({ email, group, includeGroups = true, includeUsers = true, name, page, pageSize, platformKey, roleId, username, }: { /** * Filter policies by email (exact match, case-insensitive) - includes users in policy or in policy's groups */ email?: string, /** * Filter policies by group name (exact match, case-insensitive) */ group?: string, /** * Include group information in response (default: true) */ includeGroups?: boolean, /** * Include user information in response (default: true) */ includeUsers?: boolean, /** * Filter policies by name (case-insensitive partial match) */ name?: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, /** * Filter policies by platform key */ platformKey?: string, /** * Filter policies by role ID */ roleId?: number, /** * Filter policies by username (exact match, case-insensitive) - includes users in policy or in policy's groups */ username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/policies/', query: { 'email': email, 'group': group, 'include_groups': includeGroups, 'include_users': includeUsers, 'name': name, 'page': page, 'page_size': pageSize, 'platform_key': platformKey, 'role_id': roleId, 'username': username, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Create RBAC policy * Create a new RBAC policy that defines resource access for a role. Resource paths are relative to your platform (e.g., '/mentors/' or '/usergroups/5/'); the '/platforms/{pk}/' prefix is added server-side. Service-account callers must include `platform_key` in the body; non-SA callers' platform comes from the auth token. * @returns RbacPolicy * @throws ApiError */ public static coreRbacPoliciesCreate({ requestBody, }: { requestBody: RbacPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/policies/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: invalid user/group IDs, users/groups not belonging to the platform, or invalid resource paths.`, 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Retrieve RBAC policy * Retrieve details of a specific RBAC policy, including role, platform, resources, users, and groups. * @returns RbacPolicy * @throws ApiError */ public static coreRbacPoliciesRetrieve({ id, platformKey, }: { id: string, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/policies/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, 404: `Policy not found`, }, }); } /** * Update RBAC policy * Update an existing RBAC policy. Service-account callers must include `platform_key` in the body; non-SA callers' platform comes from the auth token. * @returns RbacPolicy * @throws ApiError */ public static coreRbacPoliciesUpdate({ id, requestBody, }: { id: string, requestBody: RbacPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/rbac/policies/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: invalid user/group IDs, users/groups not belonging to the platform, or invalid resource paths.`, 403: `Permission denied - insufficient RBAC permissions`, 404: `Policy not found`, }, }); } /** * Partially update RBAC policy * Partially update an existing RBAC policy. Only provided fields will be updated. Service-account callers must include `platform_key` in the body; non-SA callers' platform comes from the auth token. * @returns RbacPolicy * @throws ApiError */ public static coreRbacPoliciesPartialUpdate({ id, requestBody, }: { id: string, requestBody?: PatchedRbacPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/rbac/policies/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: invalid user/group IDs, users/groups not belonging to the platform, or invalid resource paths.`, 403: `Permission denied - insufficient RBAC permissions`, 404: `Policy not found`, }, }); } /** * Delete RBAC policy * Delete an RBAC policy. * @returns void * @throws ApiError */ public static coreRbacPoliciesDestroy({ id, platformKey, }: { id: string, /** * platform key for authorization check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/rbac/policies/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, 404: `Policy not found`, }, }); } /** * Discover resources for policy building * GET the resource tree node at `path`. * * Platform comes from the request token (service accounts pass platform_key). * @returns any An entity node (child collections) or a collection node (list_url + search_qps + result_fields). * @throws ApiError */ public static coreRbacResourcesRetrieve({ path = '/', }: { /** * Discovery path, e.g. '/', '/mentors/', '/mentors/5/'. */ path?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/resources/', query: { 'path': path, }, errors: { 400: `Invalid path or unknown platform`, 403: `Missing resource-discovery access`, }, }); } /** * List RBAC roles * Retrieve a list of RBAC roles. Can be filtered by platform_key and name. * @returns PaginatedRbacRoleList * @throws ApiError */ public static coreRbacRolesList({ includeGlobalRoles = false, name, page, pageSize, platformKey, }: { /** * Include global roles */ includeGlobalRoles?: boolean, /** * Filter roles by name (case-insensitive partial match) */ name?: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, /** * Filter roles by platform key */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/roles/', query: { 'include_global_roles': includeGlobalRoles, 'name': name, 'page': page, 'page_size': pageSize, 'platform_key': platformKey, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Create RBAC role * Create a new RBAC role for a platform. * @returns RbacRole * @throws ApiError */ public static coreRbacRolesCreate({ requestBody, }: { requestBody: RbacRole, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/roles/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data`, 403: `Permission denied - insufficient RBAC permissions`, }, }); } /** * Retrieve RBAC role * Retrieve details of a specific RBAC role. * @returns RbacRole * @throws ApiError */ public static coreRbacRolesRetrieve({ id, }: { id: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/roles/{id}/', path: { 'id': id, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, 404: `Role not found`, }, }); } /** * Update RBAC role * Update an existing RBAC role. * @returns RbacRole * @throws ApiError */ public static coreRbacRolesUpdate({ id, requestBody, }: { id: string, requestBody: RbacRole, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/rbac/roles/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data`, 403: `Permission denied - insufficient RBAC permissions`, 404: `Role not found`, }, }); } /** * Partially update RBAC role * Partially update an existing RBAC role. * @returns RbacRole * @throws ApiError */ public static coreRbacRolesPartialUpdate({ id, requestBody, }: { id: string, requestBody?: PatchedRbacRole, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/rbac/roles/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data`, 403: `Permission denied - insufficient RBAC permissions`, 404: `Role not found`, }, }); } /** * Delete RBAC role * Delete an RBAC role. WARNING: Deleting a role will remove all policies referencing it. * @returns void * @throws ApiError */ public static coreRbacRolesDestroy({ id, platformKey, }: { id: string, /** * platform key for authorization check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/rbac/roles/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied - insufficient RBAC permissions`, 404: `Role not found`, }, }); } /** * Set student mentor creation permission * Enable or disable the ability for students to create mentors on a platform * @returns StudentMentorCreationPermissionResponse * @throws ApiError */ public static coreRbacStudentAgentCreationSetCreate({ requestBody, }: { requestBody: SetStudentMentorCreationPermission, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/student-agent-creation/set/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform, students group, or mentor creators policy not found`, }, }); } /** * Get student mentor creation permission status * Check whether students are currently allowed to create mentors on a platform * @returns StudentMentorCreationPermissionResponse * @throws ApiError */ public static coreRbacStudentAgentCreationStatusRetrieve({ platformKey, }: { /** * The platform key to check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/student-agent-creation/status/', query: { 'platform_key': platformKey, }, errors: { 400: `Missing platform_key parameter`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform not found`, }, }); } /** * Set student LLM access permissions * Configure which LLM resources students can access on a platform by replacing the LLM Users policy resources * @returns StudentLLMAccessResponse * @throws ApiError */ public static coreRbacStudentLlmAccessSetCreate({ requestBody, }: { requestBody: SetStudentLLMAccess, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/student-llm-access/set/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform or LLM Users policy not found`, }, }); } /** * Get student LLM access permissions * Check which LLM resources students are currently allowed to access on a platform * @returns StudentLLMAccessResponse * @throws ApiError */ public static coreRbacStudentLlmAccessStatusRetrieve({ platformKey, }: { /** * The platform key to check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/student-llm-access/status/', query: { 'platform_key': platformKey, }, errors: { 400: `Missing platform_key parameter`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform not found`, }, }); } /** * @deprecated * Set student mentor creation permission * **Deprecated — use `/api/core/rbac/student-agent-creation/set/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/rbac/student-agent-creation/set/` (`mentor` → `agent`) and will be removed in a future release. * * Enable or disable the ability for students to create mentors on a platform * @returns StudentMentorCreationPermissionResponse * @throws ApiError */ public static coreRbacStudentMentorCreationSetCreate({ requestBody, }: { requestBody: SetStudentMentorCreationPermission, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/student-mentor-creation/set/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform, students group, or mentor creators policy not found`, }, }); } /** * @deprecated * Get student mentor creation permission status * **Deprecated — use `/api/core/rbac/student-agent-creation/status/` instead.** This `mentor`-spelled path is an alias kept for backward compatibility; it is equivalent to `/api/core/rbac/student-agent-creation/status/` (`mentor` → `agent`) and will be removed in a future release. * * Check whether students are currently allowed to create mentors on a platform * @returns StudentMentorCreationPermissionResponse * @throws ApiError */ public static coreRbacStudentMentorCreationStatusRetrieve({ platformKey, }: { /** * The platform key to check */ platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/student-mentor-creation/status/', query: { 'platform_key': platformKey, }, errors: { 400: `Missing platform_key parameter`, 403: `Permission denied - Tenant Admin access required`, 404: `Platform not found`, }, }); } /** * Get usergroup access status * Retrieve current access information for a specific usergroup, including all groups and users that have access with their respective roles. * @returns UserGroupPolicy * @throws ApiError */ public static coreRbacTeamsAccessList({ platformKey, usergroupId, }: { /** * Platform key where the usergroup belongs */ platformKey: string, /** * ID of the usergroup to get access information for */ usergroupId: number, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/teams/access/', query: { 'platform_key': platformKey, 'usergroup_id': usergroupId, }, errors: { 400: `Missing or invalid query parameters`, 403: `Permission denied - ShareUserGroups permission required`, 404: `Platform not found`, 500: `Internal server error`, }, }); } /** * Control which RbacGroups and/or Users have access to a UserGroup (team) and with what Role * Create or update RBAC policies to manage group and user access to specific UserGroups (teams). Creates role-specific policies and handles adding/removing groups and users. Automatically adds users/groups to appropriate secondary policies as needed. * @returns UserGroupPolicy * @throws ApiError */ public static coreRbacTeamsAccessCreate({ requestBody, }: { requestBody: UserGroupPolicy, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/teams/access/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data or validation errors`, 403: `Permission denied - ShareUserGroups permission required`, 404: `Platform or usergroup not found`, }, }); } /** * Get user group access status * Retrieve current group access information for a specific user, including all groups the user has access to and whether they have mentor management permissions. * @returns UserGroupAccess * @throws ApiError */ public static coreRbacUserGroupAccessRetrieve({ platformKey, userId, }: { /** * Platform key where the groups exist */ platformKey: string, /** * ID of the user to check group access for */ userId: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/rbac/user-group-access/', query: { 'platform_key': platformKey, 'user_id': userId, }, errors: { 400: `Missing or invalid query parameters`, 404: `Platform or user not found`, 500: `Internal server error`, }, }); } /** * Manage user access to groups * Create or update user access to groups by adding/removing group access. Creates one policy per user with GROUP_MENTOR_MANAGER role for managing mentor access. * @returns UserGroupAccess * @throws ApiError */ public static coreRbacUserGroupAccessCreate({ requestBody, }: { requestBody: UserGroupAccess, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/rbac/user-group-access/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request data or validation errors`, 404: `Platform or user not found`, 500: `Internal server error`, }, }); } /** * Invalidate all tokens for the authenticated user * @returns any No response body * @throws ApiError */ public static coreSessionLogoutCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/session/logout/', }); } /** * POST signals/edx/ * @returns any No response body * @throws ApiError */ public static coreSignalsEdxCreate({ requestBody, }: { requestBody: EdxSignalReceiverRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/signals/edx/', body: requestBody, mediaType: 'application/json', }); } /** * Param: * Any of user_id/username/email * @returns any No response body * @throws ApiError */ public static coreTokenProxyCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/token/proxy/', }); } /** * Check token user * @returns any No response body * @throws ApiError */ public static coreTokenVerifyRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/token/verify/', }); } /** * List UserGroups * Retrieve a list of UserGroups. Can be filtered by platform_key, name, and include_users. * @returns PaginatedUserGroupList * @throws ApiError */ public static coreUserGroupsList({ includeUsers = false, name, page, pageSize, platformKey, requiredAction = 'Ibl.Core/UserGroups/read', withPermissions = false, }: { /** * Include user information in response (default: false for performance) */ includeUsers?: boolean, /** * Fuzzy search by group name */ name?: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, /** * Filter groups by platform key */ platformKey?: string, /** * Return user groups (teams) you have this action on */ requiredAction?: string, /** * Include object-level permissions in response */ withPermissions?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/user-groups/', query: { 'include_users': includeUsers, 'name': name, 'page': page, 'page_size': pageSize, 'platform_key': platformKey, 'required_action': requiredAction, 'with_permissions': withPermissions, }, }); } /** * Create UserGroup * Create a new UserGroup for a platform. Users can be assigned during creation. * @returns UserGroup * @throws ApiError */ public static coreUserGroupsCreate({ requestBody, }: { requestBody: UserGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/user-groups/', body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, }, }); } /** * Retrieve UserGroup * Retrieve details of a specific UserGroup including assigned users. * @returns UserGroup * @throws ApiError */ public static coreUserGroupsRetrieve({ id, }: { /** * A unique integer value identifying this User Group. */ id: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/user-groups/{id}/', path: { 'id': id, }, errors: { 404: `UserGroup not found`, }, }); } /** * Update UserGroup * Update an existing UserGroup. Platform validation applies for user assignments. * @returns UserGroup * @throws ApiError */ public static coreUserGroupsUpdate({ id, requestBody, }: { /** * A unique integer value identifying this User Group. */ id: number, requestBody: UserGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/user-groups/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, 404: `UserGroup not found`, }, }); } /** * Partially update UserGroup * Partially update an existing UserGroup. Platform validation applies for user assignments. * @returns UserGroup * @throws ApiError */ public static coreUserGroupsPartialUpdate({ id, requestBody, }: { /** * A unique integer value identifying this User Group. */ id: number, requestBody?: PatchedUserGroup, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/user-groups/{id}/', path: { 'id': id, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid input data. Common errors include: - Users do not belong to the specified platform - Invalid user IDs provided`, 404: `UserGroup not found`, }, }); } /** * Delete UserGroup * Delete a UserGroup and all associated user group links. * @returns void * @throws ApiError */ public static coreUserGroupsDestroy({ id, }: { /** * A unique integer value identifying this User Group. */ id: number, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/user-groups/{id}/', path: { 'id': id, }, errors: { 404: `UserGroup not found`, }, }); } /** * Show (active) user groups associated with a platform * @returns any No response body * @throws ApiError */ public static coreUserGroupsRetrieve2(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/user_groups/', }); } /** * Create/update a user group * @returns any No response body * @throws ApiError */ public static coreUserGroupsCreate2(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/user_groups/', }); } /** * Delete user group * @returns void * @throws ApiError */ public static coreUserGroupsDestroy2(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/user_groups/', }); } /** * Show active users in user group (paginated) * * group_id is numeric ID of group * @returns any No response body * @throws ApiError */ public static coreUserGroupsLinkRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/user_groups/link/', }); } /** * Add single user to user group, or update status * @returns any No response body * @throws ApiError */ public static coreUserGroupsLinkCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/user_groups/link/', }); } /** * Delete user group link * @returns void * @throws ApiError */ public static coreUserGroupsLinkDestroy(): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/user_groups/link/', }); } /** * Add users to user group, or update status * @returns any No response body * @throws ApiError */ public static coreUserGroupsLinkBulkCreate(): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/user_groups/link/bulk/', }); } /** * List users you can act on * Users on the caller's platform that they hold `required_action` on. A grant covering the whole users collection also requires `Ibl.Core/AccessibleUsers/list`. * @returns PaginatedAccessibleUserList * @throws ApiError */ public static coreUsersAccessibleList({ email, name, page, pageSize, requiredAction = 'Ibl.Core/Users/read', sort = 'name', username, }: { email?: string, name?: string, /** * A page number within the paginated result set. */ page?: number, /** * Number of results to return per page. */ pageSize?: number, /** * RBAC action the caller must hold on a user to see them, e.g. 'Ibl.Mentor/Memory/read'. */ requiredAction?: string, /** * * `email` - email * * `name` - name * * `username` - username * * `-email` - -email * * `-name` - -name * * `-username` - -username */ sort?: 'email' | 'name' | 'username' | '-email' | '-name' | '-username', username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/accessible/', query: { 'email': email, 'name': name, 'page': page, 'page_size': pageSize, 'required_action': requiredAction, 'sort': sort, 'username': username, }, errors: { 400: `Invalid query parameters`, 403: `Permission denied — including a collection-wide grant without \`Ibl.Core/AccessibleUsers/list\``, }, }); } /** * Initiates the account deletion process for the authenticated user or specified username. * @returns UserDeleteAPIResponse * @throws ApiError */ public static coreUsersDeleteCreate({ requestBody, }: { requestBody?: UserDeleteAPIRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/delete/', body: requestBody, mediaType: 'application/json', }); } /** * Get detailed user information. * * Make permission check for platform admins here, * then proxy request to edx. * @returns any No response body * @throws ApiError */ public static coreUsersMetadataProxyRetrieve({ email, userId, username, }: { email?: string, userId?: number, username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/metadata/proxy/', query: { 'email': email, 'user_id': userId, 'username': username, }, }); } /** * Retrieve user platform metadata. * @returns UserPlatformMetadata * @throws ApiError */ public static coreUsersPlatformMetadataRetrieve({ platformKey, username, }: { /** * Platform identifier */ platformKey: string, /** * Target user (admin only, defaults to self) */ username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/platform-metadata/', query: { 'platform_key': platformKey, 'username': username, }, }); } /** * Replace all user platform metadata. * @returns UserPlatformMetadata * @throws ApiError */ public static coreUsersPlatformMetadataUpdate({ platformKey, requestBody, username, }: { /** * Platform identifier */ platformKey: string, requestBody: UserPlatformMetadataReplace, /** * Target user (admin only, defaults to self) */ username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/users/platform-metadata/', query: { 'platform_key': platformKey, 'username': username, }, body: requestBody, mediaType: 'application/json', }); } /** * Partial update of user platform metadata (merge keys, delete keys). * @returns UserPlatformMetadata * @throws ApiError */ public static coreUsersPlatformMetadataPartialUpdate({ platformKey, username, requestBody, }: { /** * Platform identifier */ platformKey: string, /** * Target user (admin only, defaults to self) */ username?: string, requestBody?: PatchedUserPlatformMetadataUpdate, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/users/platform-metadata/', query: { 'platform_key': platformKey, 'username': username, }, body: requestBody, mediaType: 'application/json', }); } /** * Clear all user platform metadata. * @returns void * @throws ApiError */ public static coreUsersPlatformMetadataDestroy({ platformKey, username, }: { /** * Platform identifier */ platformKey: string, /** * Target user (admin only, defaults to self) */ username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/users/platform-metadata/', query: { 'platform_key': platformKey, 'username': username, }, }); } /** * Retrieve platforms associated with user_id * * Params: * user_id * username * email * @returns UserPlatformLink * @throws ApiError */ public static coreUsersPlatformsList({ email, userId, username, }: { email?: string, userId?: number, username?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/platforms/', query: { 'email': email, 'user_id': userId, 'username': username, }, }); } /** * Explicitly link platform to user_id * * Params: * user_id * platform_key * added_on (optional) * expired_on (optional) * is_admin (optional) * active (optional) * @returns any No response body * @throws ApiError */ public static coreUsersPlatformsCreate({ requestBody, }: { requestBody: UserPlatformViewPostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/platforms/', body: requestBody, mediaType: 'application/json', }); } /** * Get platform self-linking configuration * * Params: * platform_key: The key of the platform to get configuration for * @returns PlatformMembershipConfig * @throws ApiError */ public static coreUsersPlatformsConfigRetrieve({ platformKey, }: { platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/platforms/config/', query: { 'platform_key': platformKey, }, }); } /** * Set platform self-linking configuration * * Params: * platform_key: The key of the platform to configure * allow_self_linking: Whether to allow self-linking for this platform * @returns PlatformMembershipConfig * @throws ApiError */ public static coreUsersPlatformsConfigCreate({ requestBody, }: { requestBody: PlatformMembershipConfigPostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/platforms/config/', body: requestBody, mediaType: 'application/json', }); } /** * Anonymous read of public per-platform membership config. * * Query params: * platform_key: The key of the platform to look up. * @returns PlatformMembershipConfigPublicResponse * @throws ApiError */ public static coreUsersPlatformsConfigPublicRetrieve({ platformKey, }: { platformKey: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/platforms/config/public/', query: { 'platform_key': platformKey, }, }); } /** * Return the authenticated user's default platform (or nulls). * @returns UserDefaultPlatformGetResponse * @throws ApiError */ public static coreUsersPlatformsDefaultRetrieve(): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/platforms/default/', }); } /** * Set (upsert) the authenticated user's default platform. * * A user may only set *their own* default, and only to a platform they * are actively linked to. * * Params: * platform_key: The key of the platform to make the default * @returns UserDefaultPlatformPostResponse * @throws ApiError */ public static coreUsersPlatformsDefaultCreate({ requestBody, }: { requestBody: UserDefaultPlatformPostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/platforms/default/', body: requestBody, mediaType: 'application/json', }); } /** * Allow authenticated users to self-link to platforms that have self-linking enabled * * Params: * platform_key: The key of the platform to link to * @returns UserPlatformSelfLinkResponse * @throws ApiError */ public static coreUsersPlatformsSelfLinkCreate({ requestBody, }: { requestBody: UserPlatformSelfLinkRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/platforms/self-link/', body: requestBody, mediaType: 'application/json', }); } /** * Retrieve proxy user information by user_id * @returns UserProxyGetResponse * @throws ApiError */ public static coreUsersProxyRetrieve({ email, userId, username, }: { email?: string, userId?: number, username?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/proxy/', query: { 'email': email, 'user_id': userId, 'username': username, }, }); } /** * Add proxy user * * Params: * user_id * username * email * edx_data * data * @returns UserProxyPostResponse * @throws ApiError */ public static coreUsersProxyCreate({ requestBody, }: { requestBody: UserProxyPostRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/proxy/', body: requestBody, mediaType: 'application/json', }); } /** * Add proxy users by bulk * * Params: * users: list of user objects * ``` * [ * {"user_id": 1, ...}, * {"user_id": 2, ...} * ] * ``` * @returns string * @throws ApiError */ public static coreUsersProxyBulkCreate({ requestBody, }: { requestBody: UserProxyBulkRequest, }): CancelablePromise>> { return __request(OpenAPI, { method: 'POST', url: '/api/core/users/proxy/bulk/', body: requestBody, mediaType: 'application/json', }); } /** * Retrieve users based on query * Not intended for public use with multitenant platforms * * Params: * query * sort * @returns UserSearchViewGetResponse * @throws ApiError */ public static coreUsersSearchRetrieve({ page, pageSize, query, sort, }: { page?: number, pageSize?: number, query?: string, sort?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/users/search/', query: { 'page': page, 'page_size': pageSize, 'query': query, 'sort': sort, }, }); } /** * List watched groups visible to the caller * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns PaginatedWatchedGroupListList * @throws ApiError */ public static coreWatchedGroupsList({ limit, offset, platformKey, }: { /** * Number of results to return per page. */ limit?: number, /** * The initial index from which to return the results. */ offset?: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/', query: { 'limit': limit, 'offset': offset, 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Platform not found`, }, }); } /** * Create a watched group * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns WatchedGroupDetail * @throws ApiError */ public static coreWatchedGroupsCreate({ requestBody, platformKey, watchedUserLimit, watcherLimit, }: { requestBody: WatchedGroupCreate, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, /** * Inline up to N watched users in the response (0 = none, max 100). Use the nested /watched-users/ endpoint for paginated walks. */ watchedUserLimit?: number, /** * Inline up to N watchers in the response (0 = none, max 100). Use the nested /watchers/ endpoint for paginated walks. */ watcherLimit?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/watched-groups/', query: { 'platform_key': platformKey, 'watched_user_limit': watchedUserLimit, 'watcher_limit': watcherLimit, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request`, 403: `Permission denied`, }, }); } /** * Retrieve a watched group * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns WatchedGroupDetail * @throws ApiError */ public static coreWatchedGroupsRetrieve({ id, platformKey, watchedUserLimit, watcherLimit, }: { /** * A unique integer value identifying this Watched Group. */ id: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, /** * Inline up to N watched users in the response (0 = none, max 100). Use the nested /watched-users/ endpoint for paginated walks. */ watchedUserLimit?: number, /** * Inline up to N watchers in the response (0 = none, max 100). Use the nested /watchers/ endpoint for paginated walks. */ watcherLimit?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, 'watched_user_limit': watchedUserLimit, 'watcher_limit': watcherLimit, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * Update a watched group's name * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns WatchedGroupDetail * @throws ApiError */ public static coreWatchedGroupsUpdate({ id, platformKey, watchedUserLimit, watcherLimit, requestBody, }: { /** * A unique integer value identifying this Watched Group. */ id: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, /** * Inline up to N watched users in the response (0 = none, max 100). Use the nested /watched-users/ endpoint for paginated walks. */ watchedUserLimit?: number, /** * Inline up to N watchers in the response (0 = none, max 100). Use the nested /watchers/ endpoint for paginated walks. */ watcherLimit?: number, requestBody?: WatchedGroupUpdate, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/watched-groups/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, 'watched_user_limit': watchedUserLimit, 'watcher_limit': watcherLimit, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request`, 403: `Permission denied`, 404: `Not found`, }, }); } /** * Partially update a watched group's name * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns WatchedGroupDetail * @throws ApiError */ public static coreWatchedGroupsPartialUpdate({ id, platformKey, watchedUserLimit, watcherLimit, requestBody, }: { /** * A unique integer value identifying this Watched Group. */ id: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, /** * Inline up to N watched users in the response (0 = none, max 100). Use the nested /watched-users/ endpoint for paginated walks. */ watchedUserLimit?: number, /** * Inline up to N watchers in the response (0 = none, max 100). Use the nested /watchers/ endpoint for paginated walks. */ watcherLimit?: number, requestBody?: PatchedWatchedGroupUpdate, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/watched-groups/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, 'watched_user_limit': watchedUserLimit, 'watcher_limit': watcherLimit, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid request`, 403: `Permission denied`, 404: `Not found`, }, }); } /** * Delete a watched group * CRUD for WatchedGroup. Watcher mutations live on the nested /watchers/ endpoint; * POST here accepts an optional `watchers` array as a create-time convenience. * @returns void * @throws ApiError */ public static coreWatchedGroupsDestroy({ id, platformKey, }: { /** * A unique integer value identifying this Watched Group. */ id: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/watched-groups/{id}/', path: { 'id': id, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * List watched users in a watched group (paginated) * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for * this feature. Add via POST, remove via DELETE. * @returns PaginatedWatchedUserReadList * @throws ApiError */ public static coreWatchedGroupsWatchedUsersList({ watchedGroupPk, limit, offset, platformKey, }: { watchedGroupPk: number, /** * Number of results to return per page. */ limit?: number, /** * The initial index from which to return the results. */ offset?: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/{watched_group_pk}/watched-users/', path: { 'watched_group_pk': watchedGroupPk, }, query: { 'limit': limit, 'offset': offset, 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `WatchedGroup not found`, }, }); } /** * Add a user to the watched group * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for * this feature. Add via POST, remove via DELETE. * @returns WatchedUserRead * @throws ApiError */ public static coreWatchedGroupsWatchedUsersCreate({ watchedGroupPk, requestBody, platformKey, }: { watchedGroupPk: number, requestBody: WatchedUserWrite, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/watched-groups/{watched_group_pk}/watched-users/', path: { 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid payload`, 403: `Permission denied`, 404: `WatchedGroup not found`, }, }); } /** * Retrieve a single watched-user link * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for * this feature. Add via POST, remove via DELETE. * @returns WatchedUserRead * @throws ApiError */ public static coreWatchedGroupsWatchedUsersRetrieve({ id, watchedGroupPk, platformKey, }: { id: number, watchedGroupPk: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * Remove a user from the watched group * CRUD-minus-update for watched users (UserGroupLink rows) under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchedusers/{link_id}/ * No PATCH/PUT — there's nothing meaningful to update on a UserGroupLink for * this feature. Add via POST, remove via DELETE. * @returns void * @throws ApiError */ public static coreWatchedGroupsWatchedUsersDestroy({ id, watchedGroupPk, platformKey, }: { id: number, watchedGroupPk: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/watched-groups/{watched_group_pk}/watched-users/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * List watchers of a watched group (paginated) * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns PaginatedWatcherReadList * @throws ApiError */ public static coreWatchedGroupsWatchersList({ watchedGroupPk, limit, offset, platformKey, }: { watchedGroupPk: number, /** * Number of results to return per page. */ limit?: number, /** * The initial index from which to return the results. */ offset?: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/{watched_group_pk}/watchers/', path: { 'watched_group_pk': watchedGroupPk, }, query: { 'limit': limit, 'offset': offset, 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `WatchedGroup not found`, }, }); } /** * Add a watcher to a watched group * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns WatcherRead * @throws ApiError */ public static coreWatchedGroupsWatchersCreate({ watchedGroupPk, requestBody, platformKey, }: { watchedGroupPk: number, requestBody: WatcherWrite, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/core/watched-groups/{watched_group_pk}/watchers/', path: { 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid payload`, 403: `Permission denied`, 404: `WatchedGroup not found`, }, }); } /** * Retrieve a single watcher * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns WatcherRead * @throws ApiError */ public static coreWatchedGroupsWatchersRetrieve({ id, watchedGroupPk, platformKey, }: { id: number, watchedGroupPk: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * Replace a watcher's events * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns WatcherRead * @throws ApiError */ public static coreWatchedGroupsWatchersUpdate({ id, watchedGroupPk, requestBody, platformKey, }: { id: number, watchedGroupPk: number, requestBody: WatcherUpdate, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid payload`, 403: `Permission denied`, 404: `Not found`, }, }); } /** * Update a watcher's events * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns WatcherRead * @throws ApiError */ public static coreWatchedGroupsWatchersPartialUpdate({ id, watchedGroupPk, platformKey, requestBody, }: { id: number, watchedGroupPk: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, requestBody?: PatchedWatcherUpdate, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid payload`, 403: `Permission denied`, 404: `Not found`, }, }); } /** * Remove (or unsubscribe) a watcher from a watched group * CRUD for watchers nested under a WatchedGroup. * * Resource path: /platforms/{pk}/watchedgroups/{wg_id}/watchers/{watcher_id}/ * `is_owner` here covers two cases that both deserve owner-level perms on a * watcher row: * - the watcher themselves (WATCHER_OWNER well-known role) * - the parent WatchedGroup's owner (WATCHED_GROUP_OWNER role grants * `Ibl.Core/Watchers*`) * @returns void * @throws ApiError */ public static coreWatchedGroupsWatchersDestroy({ id, watchedGroupPk, platformKey, }: { id: number, watchedGroupPk: number, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/core/watched-groups/{watched_group_pk}/watchers/{id}/', path: { 'id': id, 'watched_group_pk': watchedGroupPk, }, query: { 'platform_key': platformKey, }, errors: { 403: `Permission denied`, 404: `Not found`, }, }); } /** * List WatcherEvent choices as {value: label} * Return the WatcherEvent choices as `{value: human_readable_label}`. * * Platform-scoped lookup with no per-watched-group context. Gated by * `Ibl.Core/WatchedGroups/list` on `/platforms/{pk}/watchedgroups/` — the * same per-platform grant `add_watcher` attaches to every watcher, so any * watcher (in addition to admins) can fetch the enum. * @returns string Mapping of event value to human-readable label * @throws ApiError */ public static coreWatchedGroupsWatcherEventChoicesRetrieve({ name, platformKey, }: { /** * Case-insensitive substring filter against the human-readable label. Omit to return all choices. */ name?: string, /** * Service-account only: target platform key. Non-SA callers' platform is sourced from the auth token and this is ignored. */ platformKey?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/core/watched-groups/watcher-event-choices/', query: { 'name': name, 'platform_key': platformKey, }, errors: { 400: `Invalid query parameters`, 403: `Permission denied`, 404: `Platform not found`, }, }); } /** * Get a list of departments with metrics and filtering options. * * This endpoint provides a paginated list of departments with aggregated metrics * about learner performance, course completions, and skill acquisition. * * Query Parameters: * page (int, optional): Page number for pagination * length (int, optional): Number of items per page * program (str, optional): Filter by program * pathway (str, optional): Filter by pathway * departments (list, optional): Filter by department ids * department_id (str, optional): Filter by department id * location (str, optional): Filter by location * is_enrolled (bool, optional): Filter for departments with enrolled users * start_date (date, optional): Filter by learner join date (start range) * end_date (date, optional): Filter by learner join date (end range) * * Returns: * A paginated list of departments with comprehensive metrics. * @returns GroupList * @throws ApiError */ public static departmentsOrgsRetrieve({ org, departmentId, departments, endDate, format = 'json', includeMainPlatform = true, isEnrolled, length, location, page, pathway, program, startDate, }: { org: string, /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number, /** * Departments search string. Single string or list of strings. e.g 'sample_department' or `['department', 'another department']` */ departments?: Array, /** * Filter by learners date_joined. Start date. ISO 8601 */ endDate?: string, /** * Format * * * `json` - json */ format?: 'json', /** * Include main platform data */ includeMainPlatform?: boolean, /** * Filter for users who have at least an enro;lment */ isEnrolled?: boolean | null, /** * Size of data to return */ length?: number, /** * Location search string */ location?: string, /** * Page offset */ page?: number, /** * Pathway string */ pathway?: string, /** * Program search string */ program?: string, /** * Filter by learners date_joined. Start date. ISO 8601 */ startDate?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/departments/orgs/{org}/', path: { 'org': org, }, query: { 'department_id': departmentId, 'departments': departments, 'end_date': endDate, 'format': format, 'include_main_platform': includeMainPlatform, 'is_enrolled': isEnrolled, 'length': length, 'location': location, 'page': page, 'pathway': pathway, 'program': program, 'start_date': startDate, }, }); } /** * Retrieve a user's desired role information. * * This endpoint returns the role and skills that a user has indicated * they want to develop or acquire. This represents the user's career * goals and learning objectives. * * Path Parameters: * org (str): The platform/organization identifier * username (str): The username of the user to retrieve role information for * * Returns: * The user's desired role information including: * - Target role title * - Skills needed for the role * - Current progress toward skill acquisition * * Error Responses: * 400 Bad Request: If the user doesn't exist in the platform or has no desired role * 404 Not Found: If the specified platform doesn't exist * @returns DesiredRole * @throws ApiError */ public static rolesPlatformOrgsRolesUsersDesiredRolesRetrieve({ org, username, }: { org: string, username: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/roles/platform/orgs/{org}/roles/users/{username}/desired-roles/', path: { 'org': org, 'username': username, }, }); } /** * Retrieve a user's reported role information. * * This endpoint returns the role and skills that a user has reported * having in their profile. This represents the user's current skills * and professional role. * * Path Parameters: * org (str): The platform/organization identifier * username (str): The username of the user to retrieve role information for * * Returns: * The user's reported role information including: * - Role title * - Skills associated with the role * - Experience level * * Error Responses: * 400 Bad Request: If the user doesn't exist in the platform or has no reported role * 404 Not Found: If the specified platform doesn't exist * @returns ReportedRole * @throws ApiError */ public static rolesPlatformOrgsRolesUsersReportedRolesRetrieve({ org, username, }: { org: string, username: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/roles/platform/orgs/{org}/roles/users/{username}/reported-roles/', path: { 'org': org, 'username': username, }, }); } /** * Get a list of user groups with metrics and filtering options. * * This endpoint provides a paginated list of user groups with aggregated metrics * about learner performance, course completions, and skill acquisition. * * This endpoint uses DM token authentication and respects department-based * access controls. * * Query Parameters: * page (int, optional): Page number for pagination * length (int, optional): Number of items per page * program (str, optional): Filter by program * pathway (str, optional): Filter by pathway * groups (list, optional): Filter by group names * location (str, optional): Filter by location * is_enrolled (bool, optional): Filter for groups with enrolled users * start_date (date, optional): Filter by learner join date (start range) * end_date (date, optional): Filter by learner join date (end range) * * Returns: * A paginated list of user groups with comprehensive metrics. * * Access Control: * - Platform admins can see all groups * - Department admins can only see groups in their departments * @returns GroupList * @throws ApiError */ public static userGroupsOrgsRetrieve({ key, departmentId, endDate, format = 'json', groups, includeMainPlatform = true, isEnrolled, length, location, page, pathway, program, startDate, }: { key: string, /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number, /** * Filter by learners date_joined. Start date. ISO 8601 */ endDate?: string, /** * Format * * * `json` - json */ format?: 'json', /** * Groups search string. Single string or list of strings. e.g 'sample_group' or `['group', 'another group']` */ groups?: Array, /** * Include main platform data */ includeMainPlatform?: boolean, /** * Filter for users who have at least an enrollment */ isEnrolled?: boolean | null, /** * Size of data to return */ length?: number, /** * Location search string */ location?: string, /** * Page offset */ page?: number, /** * Pathway string */ pathway?: string, /** * Program search string */ program?: string, /** * Filter by learners date_joined. Start date. ISO 8601 */ startDate?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/user-groups/orgs/{key}/', path: { 'key': key, }, query: { 'department_id': departmentId, 'end_date': endDate, 'format': format, 'groups': groups, 'include_main_platform': includeMainPlatform, 'is_enrolled': isEnrolled, 'length': length, 'location': location, 'page': page, 'pathway': pathway, 'program': program, 'start_date': startDate, }, }); } }