import type { Assertion } from '../models/Assertion'; import type { BulkCreateAssertion } from '../models/BulkCreateAssertion'; import type { Credential } from '../models/Credential'; import type { CredentialProviderConfig } from '../models/CredentialProviderConfig'; import type { ExternalCredentialMapping } from '../models/ExternalCredentialMapping'; import type { Issuer } from '../models/Issuer'; import type { IssuerAuthority } from '../models/IssuerAuthority'; import type { OverTime } from '../models/OverTime'; import type { OvertimeWithChangeInfo } from '../models/OvertimeWithChangeInfo'; import type { PaginatedAssertionsResponse } from '../models/PaginatedAssertionsResponse'; import type { UploadedImage } from '../models/UploadedImage'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class CredentialsService { /** * Export credential information for a specific course. * * Args: * request: The HTTP request object * course_id: Course ID to export credentials for * * Returns: * Response: JSON response with credential data * @returns any No response body * @throws ApiError */ static credentialsEximCredentialsCourseExportRetrieve({ courseId, }: { courseId: string; }): CancelablePromise; /** * Import credential information for a specific course. * * Args: * request: The HTTP request object * course_id: Course ID to import credentials for * * Returns: * Response: JSON response with import results * @returns any No response body * @throws ApiError */ static credentialsEximCredentialsCourseImportCreate({ courseId, }: { courseId: string; }): CancelablePromise; /** * Get all credentials for a platform with search and pagination support. * * Query Parameters: * - platform_org: Platform org ID (takes precedence over URL org) * - page: Page number (default: 1) * - page_size: Items per page (default: 10, max: 100) * - search: Search term to filter credentials * - course: Course ID to filter credentials * - program: Program ID to filter credentials * @returns Credential * @throws ApiError */ static credentialsOrgsUsersRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * API View for managing credentials across a platform. * * This endpoint allows creating and retrieving credentials for a specific organization/tenant, * with support for filtering, searching, and pagination. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * * Query Parameters: * # Platform identification * platform_org (str, optional): Alternative platform identifier (takes precedence over URL org) * * # Pagination * page (int, optional): Page number (default: 1) * page_size (int, optional): Items per page (default: 10, max: 100) * * # Filtering and search * search (str, optional): Search term to filter credentials by name or description * course (str, optional): Course ID to filter credentials associated with a specific course * program (str, optional): Program ID to filter credentials associated with a specific program * * Methods: * GET: Retrieve credentials with filtering and pagination * POST: Create a new credential * * POST Request Body: * A JSON object containing credential details: * - name (str): Credential name * - description (str, optional): Credential description * - issuer (str): Issuer entity ID * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": { * "next": "URL to next page", * "previous": "URL to previous page", * "count": 42, * "data": [ * {credential object}, * {credential object}, * ... * ], * "num_pages": 5, * "page_number": 1, * "max_page_size": 100 * } * } * * POST: A JSON response containing: * { * "status": {"success": true, "description": "Created"}, * "result": {credential object} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the platform doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Only public credentials are returned by default * @returns Credential * @throws ApiError */ static credentialsOrgsUsersCreate({ platformKey, userId, requestBody, }: { platformKey: string; requestBody: Credential; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns Credential * @throws ApiError */ static credentialsOrgsUsersRetrieve2({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns Credential * @throws ApiError */ static credentialsOrgsUsersUpdate({ entityId, platformKey, userId, requestBody, }: { entityId: string; platformKey: string; requestBody: Credential; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns void * @throws ApiError */ static credentialsOrgsUsersDestroy({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * @returns PaginatedAssertionsResponse * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve3({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsCreate({ entityId, platformKey, userId, requestBody, }: { entityId: string; platformKey: string; requestBody: Assertion; }): CancelablePromise; /** * @returns BulkCreateAssertion * @throws ApiError */ static credentialsOrgsUsersAssertionsBulkCreate({ entityId, platformKey, userId, requestBody, }: { entityId: string; platformKey: string; requestBody: BulkCreateAssertion; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns PaginatedAssertionsResponse * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve({ platformKey, userId, course, excludeMainTenantAssertions, includeExpired, includeRevoked, page, pageSize, }: { platformKey: string; course?: string; excludeMainTenantAssertions?: boolean; includeExpired?: boolean; includeRevoked?: boolean; page?: number; pageSize?: number; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OvertimeWithChangeInfo * @throws ApiError */ static credentialsOrgsUsersAssertionsOverTimeRetrieve({ platformKey, userId, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve2({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsUpdate({ entityId, platformKey, userId, requestBody, }: { entityId: string; platformKey: string; requestBody: Assertion; }): CancelablePromise; /** * Delete a credential assignment using its entity_id. * Only platform admins and department admins can delete assignments. * @returns void * @throws ApiError */ static credentialsOrgsUsersAssignmentsDestroy({ assignmentId, platformKey, userId, }: { assignmentId: string; platformKey: string; }): CancelablePromise; /** * Get group assignments with department-aware filtering * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsGroupsRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Create group assignment with department access validation * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsGroupsCreate({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Get assignments and their corresponding assertions based on user role: * - Regular users: get only their own assignments * - Platform admins: get assignments for all users in their platform * - Department admins: get assignments for users in their department groups * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsUsersRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Create assignments with department access validation * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsUsersCreate({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OverTime * @throws ApiError */ static credentialsOrgsUsersCourseAssertionsOverTimeRetrieve({ platformKey, userId, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * DRF view mixin that routes all ORM reads to the read replica. * * Falls back to the primary database if the replica is unreachable. * * Add as the **first** base class on read-only views/viewsets:: * * class MyView(ReadReplicaViewMixin, IsPlatformAdminDRFMixin, APIView): * ... * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersCourseCredentialsList({ platformKey, userId, page, pageSize, }: { platformKey: string; /** * A page number within the paginated result set. */ page?: number; /** * Number of results to return per page. */ pageSize?: number; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OverTime * @throws ApiError */ static credentialsOrgsUsersCredentialsOverTimeRetrieve({ platformKey, userId, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * Retrieve external credential mappings for the platform. * * Query Parameters: * credential_id (str, optional): Filter by credential entity_id * provider_name (str, optional): Filter by provider name * page (int, optional): Page number * page_size (int, optional): Items per page * * Returns all mappings for the platform if the user is an admin. * @returns ExternalCredentialMapping * @throws ApiError */ static credentialsOrgsUsersExternalMappingRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Create or update an external credential mapping. * * If a mapping doesn't exist for the credential + platform + provider combination, * it will be created. If it exists, it will be updated. * * Request Body: * { * "credential_id": "credential-entity-id", // Required * "provider_name": "accredible", // Required * "external_template_id": "123456", // Optional * "metadata": {} // Optional * } * * Returns: * - 201 Created: When creating a new mapping * - 200 OK: When updating an existing mapping * @returns ExternalCredentialMapping * @throws ApiError */ static credentialsOrgsUsersExternalMappingCreate({ platformKey, userId, requestBody, }: { platformKey: string; requestBody: ExternalCredentialMapping; }): CancelablePromise; /** * Delete an external credential mapping. * * Request Body: * { * "credential_id": "credential-entity-id", // Required * "provider_name": "accredible" // Required * } * * Returns: * A JSON response confirming deletion * @returns void * @throws ApiError */ static credentialsOrgsUsersExternalMappingDestroy({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * @returns UploadedImage * @throws ApiError */ static credentialsOrgsUsersImagesRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * @returns UploadedImage * @throws ApiError */ static credentialsOrgsUsersImagesCreate({ platformKey, userId, requestBody, }: { platformKey: string; requestBody?: UploadedImage; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersRetrieve({ platformKey, q, userId, }: { platformKey: string; q: string; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersCreate({ platformKey, q, userId, requestBody, }: { platformKey: string; q: string; requestBody: Issuer; }): CancelablePromise; /** * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersRetrieve2({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersUpdate({ entityId, platformKey, userId, requestBody, }: { entityId: string; platformKey: string; requestBody: Issuer; }): CancelablePromise; /** * @returns void * @throws ApiError */ static credentialsOrgsUsersIssuersDestroy({ entityId, platformKey, userId, }: { entityId: string; platformKey: string; }): CancelablePromise; /** * @returns IssuerAuthority * @throws ApiError */ static credentialsOrgsUsersIssuersAuthorityCreate({ platformKey, userId, requestBody, }: { platformKey: string; requestBody: IssuerAuthority; }): CancelablePromise; /** * Retrieve provider configurations for the platform. * * Query Parameters: * provider_name (str, optional): Filter to a specific provider * page (int, optional): Page number * page_size (int, optional): Items per page * * Returns all configurations for the platform if the user is an admin. * @returns CredentialProviderConfig * @throws ApiError */ static credentialsOrgsUsersProviderConfigRetrieve({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Create or update a provider configuration. * * If a configuration doesn't exist for the platform and provider, it will be created. * If it exists, it will be updated. * * Request Body: * { * "provider_name": "accredible", // Required * "config": {...}, // Optional * "enabled": true // Optional * } * * Returns: * - 201 Created: When creating a new configuration * - 200 OK: When updating an existing configuration * @returns CredentialProviderConfig * @throws ApiError */ static credentialsOrgsUsersProviderConfigCreate({ platformKey, userId, requestBody, }: { platformKey: string; requestBody: CredentialProviderConfig; }): CancelablePromise; /** * Deactivate a provider configuration (sets enabled=False). * * Request Body: * { * "provider_name": "accredible" // Required * } * @returns void * @throws ApiError */ static credentialsOrgsUsersProviderConfigDestroy({ platformKey, userId, }: { platformKey: string; }): CancelablePromise; /** * Get all credentials for a platform with search and pagination support. * * Query Parameters: * - platform_org: Platform org ID (takes precedence over URL org) * - page: Page number (default: 1) * - page_size: Items per page (default: 10, max: 100) * - search: Search term to filter credentials * - course: Course ID to filter credentials * - program: Program ID to filter credentials * @returns Credential * @throws ApiError */ static credentialsOrgsUsersRetrieve3({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * API View for managing credentials across a platform. * * This endpoint allows creating and retrieving credentials for a specific organization/tenant, * with support for filtering, searching, and pagination. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * * Query Parameters: * # Platform identification * platform_org (str, optional): Alternative platform identifier (takes precedence over URL org) * * # Pagination * page (int, optional): Page number (default: 1) * page_size (int, optional): Items per page (default: 10, max: 100) * * # Filtering and search * search (str, optional): Search term to filter credentials by name or description * course (str, optional): Course ID to filter credentials associated with a specific course * program (str, optional): Program ID to filter credentials associated with a specific program * * Methods: * GET: Retrieve credentials with filtering and pagination * POST: Create a new credential * * POST Request Body: * A JSON object containing credential details: * - name (str): Credential name * - description (str, optional): Credential description * - issuer (str): Issuer entity ID * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": { * "next": "URL to next page", * "previous": "URL to previous page", * "count": 42, * "data": [ * {credential object}, * {credential object}, * ... * ], * "num_pages": 5, * "page_number": 1, * "max_page_size": 100 * } * } * * POST: A JSON response containing: * { * "status": {"success": true, "description": "Created"}, * "result": {credential object} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the platform doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Only public credentials are returned by default * @returns Credential * @throws ApiError */ static credentialsOrgsUsersCreate2({ platformKey, username, requestBody, }: { platformKey: string; username: string; requestBody: Credential; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns Credential * @throws ApiError */ static credentialsOrgsUsersRetrieve4({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns Credential * @throws ApiError */ static credentialsOrgsUsersUpdate2({ entityId, platformKey, username, requestBody, }: { entityId: string; platformKey: string; username: string; requestBody: Credential; }): CancelablePromise; /** * API View for managing individual credentials. * * This endpoint allows retrieving, updating, and deleting specific credentials * identified by their entity_id. * * Path Parameters: * org (str): The organization/tenant identifier * user_id (str): The user ID making the request * entity_id (str): The credential entity ID * * Methods: * GET: Retrieve a specific credential * PUT: Update a specific credential * DELETE: Delete a specific credential * * PUT Request Body: * A JSON object containing credential details to update: * - name (str, optional): Credential name * - description (str, optional): Credential description * - credential_type (str, optional): Type of credential * - html_template (str, optional): HTML template for credential rendering * - css_template (str, optional): CSS template for credential styling * - icon_image (str, optional): URL to credential icon * - background_image (str, optional): URL to credential background * - thumbnail_image (str, optional): URL to credential thumbnail * - criteria_url (str, optional): URL to credential criteria * - criteria_text (str, optional): Text description of credential criteria * - issuing_signal (str, optional): Signal that triggers credential issuance * * Returns: * GET: A JSON response containing: * { * "status": {"success": true, "description": "Ok"}, * "result": {credential object} * } * * PUT: A JSON response containing: * { * "status": {"success": true, "description": "Updated"}, * "result": {credential object} * } * * DELETE: A JSON response indicating success: * { * "status": {"success": true, "description": "Deleted"} * } * * Error Responses: * 400 Bad Request: If the request data is invalid * 401 Unauthorized: If the user is not authenticated * 403 Forbidden: If the user does not have permission to access this resource * 404 Not Found: If the credential doesn't exist * 500 Internal Server Error: If an unexpected error occurs * * Access Control: * - Requires CredentialAssignmentPermission * - Users can only manage credentials they have permission to access * @returns void * @throws ApiError */ static credentialsOrgsUsersDestroy2({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * @returns PaginatedAssertionsResponse * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve6({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsCreate2({ entityId, platformKey, username, requestBody, }: { entityId: string; platformKey: string; username: string; requestBody: Assertion; }): CancelablePromise; /** * @returns BulkCreateAssertion * @throws ApiError */ static credentialsOrgsUsersAssertionsBulkCreate2({ entityId, platformKey, username, requestBody, }: { entityId: string; platformKey: string; username: string; requestBody: BulkCreateAssertion; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns PaginatedAssertionsResponse * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve4({ platformKey, username, course, excludeMainTenantAssertions, includeExpired, includeRevoked, page, pageSize, }: { platformKey: string; username: string; course?: string; excludeMainTenantAssertions?: boolean; includeExpired?: boolean; includeRevoked?: boolean; page?: number; pageSize?: number; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OvertimeWithChangeInfo * @throws ApiError */ static credentialsOrgsUsersAssertionsOverTimeRetrieve2({ platformKey, username, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; username: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsRetrieve5({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * @returns Assertion * @throws ApiError */ static credentialsOrgsUsersAssertionsUpdate2({ entityId, platformKey, username, requestBody, }: { entityId: string; platformKey: string; username: string; requestBody: Assertion; }): CancelablePromise; /** * Delete a credential assignment using its entity_id. * Only platform admins and department admins can delete assignments. * @returns void * @throws ApiError */ static credentialsOrgsUsersAssignmentsDestroy2({ assignmentId, platformKey, username, }: { assignmentId: string; platformKey: string; username: string; }): CancelablePromise; /** * Get group assignments with department-aware filtering * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsGroupsRetrieve2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Create group assignment with department access validation * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsGroupsCreate2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Get assignments and their corresponding assertions based on user role: * - Regular users: get only their own assignments * - Platform admins: get assignments for all users in their platform * - Department admins: get assignments for users in their department groups * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsUsersRetrieve2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Create assignments with department access validation * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersAssignmentsUsersCreate2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OverTime * @throws ApiError */ static credentialsOrgsUsersCourseAssertionsOverTimeRetrieve2({ platformKey, username, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; username: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * DRF view mixin that routes all ORM reads to the read replica. * * Falls back to the primary database if the replica is unreachable. * * Add as the **first** base class on read-only views/viewsets:: * * class MyView(ReadReplicaViewMixin, IsPlatformAdminDRFMixin, APIView): * ... * @returns any No response body * @throws ApiError */ static credentialsOrgsUsersCourseCredentialsList2({ platformKey, username, page, pageSize, }: { platformKey: string; username: string; /** * A page number within the paginated result set. */ page?: number; /** * Number of results to return per page. */ pageSize?: number; }): CancelablePromise; /** * Get all credentials of a given tenant * @returns OverTime * @throws ApiError */ static credentialsOrgsUsersCredentialsOverTimeRetrieve2({ platformKey, username, departmentId, endDate, format, includeMainPlatform, startDate, }: { platformKey: string; username: string; /** * When `department_mode=1` is passed, it allows to filter data for only user content groups for the specified department */ departmentId?: number; /** * end date. ISO 8601 */ endDate?: string; /** * Format * * * `json` - json */ format?: 'json'; /** * Include main platform data */ includeMainPlatform?: boolean; /** * start date. ISO 8601 */ startDate?: string; }): CancelablePromise; /** * Retrieve external credential mappings for the platform. * * Query Parameters: * credential_id (str, optional): Filter by credential entity_id * provider_name (str, optional): Filter by provider name * page (int, optional): Page number * page_size (int, optional): Items per page * * Returns all mappings for the platform if the user is an admin. * @returns ExternalCredentialMapping * @throws ApiError */ static credentialsOrgsUsersExternalMappingRetrieve2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Create or update an external credential mapping. * * If a mapping doesn't exist for the credential + platform + provider combination, * it will be created. If it exists, it will be updated. * * Request Body: * { * "credential_id": "credential-entity-id", // Required * "provider_name": "accredible", // Required * "external_template_id": "123456", // Optional * "metadata": {} // Optional * } * * Returns: * - 201 Created: When creating a new mapping * - 200 OK: When updating an existing mapping * @returns ExternalCredentialMapping * @throws ApiError */ static credentialsOrgsUsersExternalMappingCreate2({ platformKey, username, requestBody, }: { platformKey: string; username: string; requestBody: ExternalCredentialMapping; }): CancelablePromise; /** * Delete an external credential mapping. * * Request Body: * { * "credential_id": "credential-entity-id", // Required * "provider_name": "accredible" // Required * } * * Returns: * A JSON response confirming deletion * @returns void * @throws ApiError */ static credentialsOrgsUsersExternalMappingDestroy2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * @returns UploadedImage * @throws ApiError */ static credentialsOrgsUsersImagesRetrieve2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * @returns UploadedImage * @throws ApiError */ static credentialsOrgsUsersImagesCreate2({ platformKey, username, requestBody, }: { platformKey: string; username: string; requestBody?: UploadedImage; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersRetrieve3({ platformKey, q, username, }: { platformKey: string; q: string; username: string; }): CancelablePromise; /** * A GET View that validates QueryParams and returns results to a serializer * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersCreate2({ platformKey, q, username, requestBody, }: { platformKey: string; q: string; username: string; requestBody: Issuer; }): CancelablePromise; /** * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersRetrieve4({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * @returns Issuer * @throws ApiError */ static credentialsOrgsUsersIssuersUpdate2({ entityId, platformKey, username, requestBody, }: { entityId: string; platformKey: string; username: string; requestBody: Issuer; }): CancelablePromise; /** * @returns void * @throws ApiError */ static credentialsOrgsUsersIssuersDestroy2({ entityId, platformKey, username, }: { entityId: string; platformKey: string; username: string; }): CancelablePromise; /** * @returns IssuerAuthority * @throws ApiError */ static credentialsOrgsUsersIssuersAuthorityCreate2({ platformKey, username, requestBody, }: { platformKey: string; username: string; requestBody: IssuerAuthority; }): CancelablePromise; /** * Retrieve provider configurations for the platform. * * Query Parameters: * provider_name (str, optional): Filter to a specific provider * page (int, optional): Page number * page_size (int, optional): Items per page * * Returns all configurations for the platform if the user is an admin. * @returns CredentialProviderConfig * @throws ApiError */ static credentialsOrgsUsersProviderConfigRetrieve2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Create or update a provider configuration. * * If a configuration doesn't exist for the platform and provider, it will be created. * If it exists, it will be updated. * * Request Body: * { * "provider_name": "accredible", // Required * "config": {...}, // Optional * "enabled": true // Optional * } * * Returns: * - 201 Created: When creating a new configuration * - 200 OK: When updating an existing configuration * @returns CredentialProviderConfig * @throws ApiError */ static credentialsOrgsUsersProviderConfigCreate2({ platformKey, username, requestBody, }: { platformKey: string; username: string; requestBody: CredentialProviderConfig; }): CancelablePromise; /** * Deactivate a provider configuration (sets enabled=False). * * Request Body: * { * "provider_name": "accredible" // Required * } * @returns void * @throws ApiError */ static credentialsOrgsUsersProviderConfigDestroy2({ platformKey, username, }: { platformKey: string; username: string; }): CancelablePromise; /** * Get list of enabled credential providers with pagination. * @returns any No response body * @throws ApiError */ static credentialsProvidersRetrieve(): CancelablePromise; /** * Public endpoint to retrieve a specific credential assertion by its entity ID. * * This endpoint allows public access to view a specific credential assertion * without authentication. * * Path Parameters: * entity_id (str): The assertion entity ID * * Returns: * A JSON response containing the assertion details using the AssertionSerializer format * * Error Responses: * 404 Not Found: * - If the assertion doesn't exist: Empty response with 404 status * - If the assertion has been revoked: JSON with error detail and revocation reason * 500 Internal Server Error: If an unexpected error occurs * @returns Assertion * @throws ApiError */ static credentialsPublicAssertionsRetrieve({ entityId, }: { entityId: string; }): CancelablePromise; }