/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { DesiredSkill } from '../models/DesiredSkill'; import type { PatchedSkillThreshold } from '../models/PatchedSkillThreshold'; import type { PointsPercentile } from '../models/PointsPercentile'; import type { ReportedSkill } from '../models/ReportedSkill'; import type { SkillDetail } from '../models/SkillDetail'; import type { SkillInfo } from '../models/SkillInfo'; import type { SkillThreshold } from '../models/SkillThreshold'; import type { UserSkill } from '../models/UserSkill'; import type { UserSkillPointsPercentile } from '../models/UserSkillPointsPercentile'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class SkillsService { /** * List all available skills on the platform. * * This endpoint returns information about all skills that can be * acquired on the platform. * * Path Parameters: * org (str): The platform/organization identifier * * Returns: * A list of all skills with basic information about each skill. * * Access Control: * - Platform admins can access this information * - All authenticated users can access this information * @returns SkillInfo * @throws ApiError */ public static skillsOrgsSkillsList({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills', path: { 'org': org, }, }); } /** * Retrieve percentile distribution for a specific skill. * * This endpoint returns the percentile distribution of points earned * by users for a specific skill. * * Path Parameters: * skill_id (int): The ID of the skill to retrieve percentile information for * org (str, optional): The platform/organization identifier to filter results * * Returns: * A list of percentile breakpoints for the specified skill. * * Error Responses: * 404 Not Found: If the specified skill doesn't exist * * Access Control: * - Platform admins can access this information * - All authenticated users can access this information * @returns PointsPercentile * @throws ApiError */ public static skillsOrgsSkillsPercentileRetrieve({ org, skillId, }: { org: string, skillId: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/{skill_id}/percentile/', path: { 'org': org, 'skill_id': skillId, }, }); } /** * Retrieve detailed information about a specific skill. * * This endpoint returns comprehensive information about a specific skill, * including its description, categories, and related courses. * * Path Parameters: * org (str): The platform/organization identifier * skill_name (str): The name of the skill to retrieve details for * * Returns: * Detailed information about the specified skill. * * Error Responses: * 404 Not Found: If the specified skill doesn't exist * * Access Control: * - Platform admins can access this information * - All authenticated users can access this information * @returns SkillDetail * @throws ApiError */ public static skillsOrgsSkillsRetrieve({ org, skillName, }: { org: string, skillName: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/{skill_name}/', path: { 'org': org, 'skill_name': skillName, }, }); } /** * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent * @returns PointsPercentile * @throws ApiError */ public static skillsOrgsSkillsPercentileList({ org, }: { org: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/percentile/', path: { 'org': org, }, }); } /** * Manage skill thresholds for a platform. * * This endpoint allows platform administrators to view, create, update, and delete * skill thresholds. Skill thresholds define the minimum points required to consider * a skill as acquired or mastered. * * Path Parameters: * org (str): The platform/organization identifier * * Methods: * GET: Retrieve all skill thresholds for the platform * POST: Create a new skill threshold * PATCH: Update an existing skill threshold * DELETE: Delete all skill thresholds for the platform * * Request Body (POST): * name (str, required): The name of the threshold level (e.g., "Beginner", "Intermediate") * threshold (int, required): The minimum points required to reach this threshold * * Request Body (PATCH): * name (str, required): The name of the existing threshold to update * threshold (int, required): The new minimum points value for this threshold * * Returns: * GET: A list of all skill thresholds for the platform * POST/PATCH: The created or updated skill threshold with format: * { * "name": "threshold_name", * "threshold": threshold_value * } * DELETE: No content (204) * * Error Responses: * 400 Bad Request: If the request data is invalid or missing required fields * 404 Not Found: If the specified platform doesn't exist or the threshold * to update cannot be found * * Access Control: * - Only platform administrators can access this endpoint * @returns SkillThreshold * @throws ApiError */ public static skillsOrgsSkillsThresholdsRetrieve({ org, }: { org: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/thresholds/', path: { 'org': org, }, }); } /** * Manage skill thresholds for a platform. * * This endpoint allows platform administrators to view, create, update, and delete * skill thresholds. Skill thresholds define the minimum points required to consider * a skill as acquired or mastered. * * Path Parameters: * org (str): The platform/organization identifier * * Methods: * GET: Retrieve all skill thresholds for the platform * POST: Create a new skill threshold * PATCH: Update an existing skill threshold * DELETE: Delete all skill thresholds for the platform * * Request Body (POST): * name (str, required): The name of the threshold level (e.g., "Beginner", "Intermediate") * threshold (int, required): The minimum points required to reach this threshold * * Request Body (PATCH): * name (str, required): The name of the existing threshold to update * threshold (int, required): The new minimum points value for this threshold * * Returns: * GET: A list of all skill thresholds for the platform * POST/PATCH: The created or updated skill threshold with format: * { * "name": "threshold_name", * "threshold": threshold_value * } * DELETE: No content (204) * * Error Responses: * 400 Bad Request: If the request data is invalid or missing required fields * 404 Not Found: If the specified platform doesn't exist or the threshold * to update cannot be found * * Access Control: * - Only platform administrators can access this endpoint * @returns SkillThreshold * @throws ApiError */ public static skillsOrgsSkillsThresholdsCreate({ org, requestBody, }: { org: string, requestBody: SkillThreshold, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/skills/orgs/{org}/skills/thresholds/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Manage skill thresholds for a platform. * * This endpoint allows platform administrators to view, create, update, and delete * skill thresholds. Skill thresholds define the minimum points required to consider * a skill as acquired or mastered. * * Path Parameters: * org (str): The platform/organization identifier * * Methods: * GET: Retrieve all skill thresholds for the platform * POST: Create a new skill threshold * PATCH: Update an existing skill threshold * DELETE: Delete all skill thresholds for the platform * * Request Body (POST): * name (str, required): The name of the threshold level (e.g., "Beginner", "Intermediate") * threshold (int, required): The minimum points required to reach this threshold * * Request Body (PATCH): * name (str, required): The name of the existing threshold to update * threshold (int, required): The new minimum points value for this threshold * * Returns: * GET: A list of all skill thresholds for the platform * POST/PATCH: The created or updated skill threshold with format: * { * "name": "threshold_name", * "threshold": threshold_value * } * DELETE: No content (204) * * Error Responses: * 400 Bad Request: If the request data is invalid or missing required fields * 404 Not Found: If the specified platform doesn't exist or the threshold * to update cannot be found * * Access Control: * - Only platform administrators can access this endpoint * @returns SkillThreshold * @throws ApiError */ public static skillsOrgsSkillsThresholdsPartialUpdate({ org, requestBody, }: { org: string, requestBody?: PatchedSkillThreshold, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/skills/orgs/{org}/skills/thresholds/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', }); } /** * Manage skill thresholds for a platform. * * This endpoint allows platform administrators to view, create, update, and delete * skill thresholds. Skill thresholds define the minimum points required to consider * a skill as acquired or mastered. * * Path Parameters: * org (str): The platform/organization identifier * * Methods: * GET: Retrieve all skill thresholds for the platform * POST: Create a new skill threshold * PATCH: Update an existing skill threshold * DELETE: Delete all skill thresholds for the platform * * Request Body (POST): * name (str, required): The name of the threshold level (e.g., "Beginner", "Intermediate") * threshold (int, required): The minimum points required to reach this threshold * * Request Body (PATCH): * name (str, required): The name of the existing threshold to update * threshold (int, required): The new minimum points value for this threshold * * Returns: * GET: A list of all skill thresholds for the platform * POST/PATCH: The created or updated skill threshold with format: * { * "name": "threshold_name", * "threshold": threshold_value * } * DELETE: No content (204) * * Error Responses: * 400 Bad Request: If the request data is invalid or missing required fields * 404 Not Found: If the specified platform doesn't exist or the threshold * to update cannot be found * * Access Control: * - Only platform administrators can access this endpoint * @returns void * @throws ApiError */ public static skillsOrgsSkillsThresholdsDestroy({ org, }: { org: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/skills/orgs/{org}/skills/thresholds/', path: { 'org': org, }, }); } /** * Retrieve a user's skill information. * * This endpoint returns information about skills that a user has acquired * through the platform. It can return all skills or filter by a specific skill. * * Path Parameters: * org (str): The platform/organization identifier * user_id (str): The username of the user to retrieve skill information for * * Query Parameters: * skill_name (str, optional): Filter results to a specific skill * * Returns: * When skill_name is provided: * Details about the specific skill including points earned and percentile ranking * * When skill_name is not provided: * A list of all skills the user has acquired with their points * * Access Control: * - Platform admins can access any user's skill information * - Users can access their own skill information * @returns UserSkill * @throws ApiError */ public static skillsOrgsSkillsUsersRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/users/{user_id}/', path: { 'org': org, 'user_id': userId, }, }); } /** * Retrieve a user's desired skills. * * This endpoint returns the skills that a user has indicated they want * to develop or acquire through the platform. * * Path Parameters: * org (str): The platform/organization identifier * user_id (str): The username of the user to retrieve skill information for * * Returns: * The user's desired skills information. * * Error Responses: * 400 Bad Request: If the user doesn't exist in the platform or has no desired skills * 404 Not Found: If the specified platform doesn't exist * * Access Control: * - Platform admins can access any user's information * - Users can access their own information * @returns DesiredSkill * @throws ApiError */ public static skillsOrgsSkillsUsersDesiredSkillsRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/users/{user_id}/desired-skills/', path: { 'org': org, 'user_id': userId, }, }); } /** * Retrieve a user's total skill points and percentile ranking. * * This endpoint returns the total skill points a user has earned across * all skills and their percentile ranking compared to other users on the platform. * * Path Parameters: * org (str): The platform/organization identifier * user_id (str): The username of the user to retrieve information for * * Returns: * The user's total skill points and percentile ranking information: * - Username * - Total points earned across all skills * - Percentile ranking compared to other users * * Access Control: * - Platform admins can access any user's information * - Users can access their own information * @returns UserSkillPointsPercentile * @throws ApiError */ public static skillsOrgsSkillsUsersPointPercentileRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/users/{user_id}/point-percentile/', path: { 'org': org, 'user_id': userId, }, }); } /** * Retrieve a user's self-reported skills. * * This endpoint returns the skills that a user has reported having * prior to or outside of the platform learning experience. * * Path Parameters: * org (str): The platform/organization identifier * user_id (str): The username of the user to retrieve skill information for * * Returns: * The user's self-reported skills information. When the user is not * linked to the platform or has no reported skills, an empty * ``{"skills": []}`` payload is returned with a 200 status so callers * can distinguish "no data" from a request error. * * Error Responses: * 404 Not Found: If the specified platform doesn't exist * * Access Control: * - Platform admins can access any user's information * - Users can access their own information * @returns ReportedSkill * @throws ApiError */ public static skillsOrgsSkillsUsersReportedSkillsRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/skills/orgs/{org}/skills/users/{user_id}/reported-skills/', path: { 'org': org, 'user_id': userId, }, }); } }