/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { GuidedPromptsResponse } from '../models/GuidedPromptsResponse'; import type { LanguagesView } from '../models/LanguagesView'; import type { MemoryStatusRequestView } from '../models/MemoryStatusRequestView'; import type { MemoryStatusView } from '../models/MemoryStatusView'; import type { Metadata } from '../models/Metadata'; import type { PatchedPrompt } from '../models/PatchedPrompt'; import type { Prompt } from '../models/Prompt'; import type { PromptCategory } from '../models/PromptCategory'; import type { StylesView } from '../models/StylesView'; import type { TagsView } from '../models/TagsView'; import type { TonesView } from '../models/TonesView'; import type { UserAllChatMemoryView } from '../models/UserAllChatMemoryView'; import type { UserCatalogItemMemoryView } from '../models/UserCatalogItemMemoryView'; import type { UserChatMemoryStatusRequestView } from '../models/UserChatMemoryStatusRequestView'; import type { UserChatMemoryStatusView } from '../models/UserChatMemoryStatusView'; import type { UserChatMemoryUpdateView } from '../models/UserChatMemoryUpdateView'; import type { UserMemoryContextRequest } from '../models/UserMemoryContextRequest'; import type { UserMemoryContextResponse } from '../models/UserMemoryContextResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class AiPromptService { /** * Create or update metadata for a prompt. * * Args: * request: The HTTP request containing the metadata. * org: The organization/tenant identifier. * * Returns: * Response: The created or updated prompt metadata. * * Raises: * BadRequest: If the provided data is invalid. * @returns Metadata * @throws ApiError */ public static aiPromptOrgsMetadataCreate({ org, requestBody, }: { org: string, requestBody: Metadata, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/metadata/', path: { 'org': org, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Retrieve chat memory for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to retrieve chat memory for. * * Returns: * Response: The user's chat memory entries. * * Raises: * NotFound: If no chat memory exists for the user. * @returns UserAllChatMemoryView * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Create a new chat memory entry for a user. * * Args: * request: The HTTP request containing the chat memory data. * org: The organization/tenant identifier. * user_id: The ID of the user to create chat memory for. * * Returns: * Response: The created chat memory entry. * * Raises: * BadRequest: If the provided data is invalid. * @returns UserAllChatMemoryView * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: UserAllChatMemoryView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Update chat memory for a specific user. * * Args: * request: The HTTP request containing the updated chat memory data. * org: The organization/tenant identifier. * user_id: The ID of the user to update chat memory for. * * Returns: * Response: A confirmation of the scheduled update task. * * Raises: * BadRequest: If the provided data is invalid. * NotFound: If no chat memory exists for the user. * @returns UserChatMemoryUpdateView * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryUpdate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: UserAllChatMemoryView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, 404: `Memory not found`, }, }); } /** * Delete all chat memory for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to delete chat memory for. * * Returns: * Response: A success message if the memory was deleted. * * Raises: * NotFound: If no chat memory exists for the user. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryDestroy({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Update a specific chat memory entry. * * Args: * request: The HTTP request containing the updated chat memory data. * org: The organization/tenant identifier. * user_id: The ID of the user who owns the memory. * memory_id: The ID of the specific memory entry to update. * * Returns: * Response: The updated chat memory entry. * * Raises: * BadRequest: If the provided data is invalid. * NotFound: If the specified memory entry does not exist. * @returns UserAllChatMemoryView * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryUpdate2({ memoryId, org, userId, requestBody, }: { memoryId: number, org: string, userId: string, requestBody: UserAllChatMemoryView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/{memory_id}/', path: { 'memory_id': memoryId, 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, 404: `Memory not found`, }, }); } /** * Delete a specific chat memory entry. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user who owns the memory. * memory_id: The ID of the specific memory entry to delete. * * Returns: * Response: A success message if the memory was deleted. * * Raises: * NotFound: If the specified memory entry does not exist. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersAllChatsMemoryDestroy2({ memoryId, org, userId, }: { memoryId: number, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/all-chats-memory/{memory_id}/', path: { 'memory_id': memoryId, 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Retrieve the chat memory status for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to retrieve memory status for. * * Returns: * Response: The user's chat memory status. * * Raises: * NotFound: If no memory status exists for the user. * @returns UserChatMemoryStatusView * @throws ApiError */ public static aiPromptOrgsUsersChatMemoryStatusRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/chat-memory-status/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory status not found`, }, }); } /** * Update the chat memory status for a specific user. * * Args: * request: The HTTP request containing the updated status. * org: The organization/tenant identifier. * user_id: The ID of the user to update memory status for. * * Returns: * Response: The updated chat memory status. * * Raises: * BadRequest: If the provided data is invalid. * @returns UserChatMemoryStatusView * @throws ApiError */ public static aiPromptOrgsUsersChatMemoryStatusUpdate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: UserChatMemoryStatusRequestView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/chat-memory-status/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Retrieve all available prompt languages. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user making the request. * * Returns: * Response: A list of available prompt languages. * @returns LanguagesView * @throws ApiError */ public static aiPromptOrgsUsersLanguagesRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/languages/', path: { 'org': org, 'user_id': userId, }, }); } /** * Create a new prompt language. * * Args: * request: The HTTP request containing the language data. * org: The organization/tenant identifier. * user_id: The ID of the user creating the language. * * Returns: * Response: The created prompt language. * * Raises: * BadRequest: If the provided data is invalid. * @returns LanguagesView * @throws ApiError */ public static aiPromptOrgsUsersLanguagesCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: LanguagesView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/languages/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Update a specific prompt language. * * Args: * request: The HTTP request containing the updated language data. * org: The organization/tenant identifier. * user_id: The ID of the user making the request. * language_id: The ID of the language to update. * * Returns: * Response: The updated prompt language. * * Raises: * BadRequest: If the provided data is invalid. * NotFound: If the specified language does not exist. * @returns LanguagesView * @throws ApiError */ public static aiPromptOrgsUsersLanguagesUpdate({ languageId, org, userId, requestBody, }: { languageId: number, org: string, userId: string, requestBody: LanguagesView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/languages/{language_id}/', path: { 'language_id': languageId, 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, 404: `Language not found`, }, }); } /** * Delete a specific prompt language. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user making the request. * language_id: The ID of the language to delete. * * Returns: * Response: A success message if the language was deleted. * * Raises: * NotFound: If the specified language does not exist. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersLanguagesDestroy({ languageId, org, userId, }: { languageId: number, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/languages/{language_id}/', path: { 'language_id': languageId, 'org': org, 'user_id': userId, }, errors: { 404: `Language not found`, }, }); } /** * Retrieve catalog item memory for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to retrieve catalog item memory for. * * Returns: * Response: The user's catalog item memory entries. * * Raises: * NotFound: If no catalog item memory exists for the user. * @returns UserCatalogItemMemoryView * @throws ApiError */ public static aiPromptOrgsUsersMemoryRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Create a new catalog item memory entry for a user. * * Args: * request: The HTTP request containing the catalog item memory data. * org: The organization/tenant identifier. * user_id: The ID of the user to create catalog item memory for. * * Returns: * Response: The created catalog item memory entry. * * Raises: * BadRequest: If the provided data is invalid. * @returns UserCatalogItemMemoryView * @throws ApiError */ public static aiPromptOrgsUsersMemoryCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: UserCatalogItemMemoryView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Delete all catalog item memory for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to delete catalog item memory for. * * Returns: * Response: A success message if the memory was deleted. * * Raises: * NotFound: If no catalog item memory exists for the user. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersMemoryDestroy({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Retrieve a user's memory context settings. * @returns UserMemoryContextResponse * @throws ApiError */ public static aiPromptOrgsUsersMemoryContextRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory-context/', path: { 'org': org, 'user_id': userId, }, }); } /** * Updates the user's memory context settings. * * Returns: * * 200: list of user memory context data. * @returns UserMemoryContextResponse * @throws ApiError */ public static aiPromptOrgsUsersMemoryContextUpdate({ org, userId, requestBody, }: { org: string, userId: string, requestBody?: UserMemoryContextRequest, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory-context/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Retrieve the memory status for a specific user. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user to retrieve memory status for. * * Returns: * Response: The user's memory status. * * Raises: * NotFound: If no memory status exists for the user. * @returns MemoryStatusView * @throws ApiError */ public static aiPromptOrgsUsersMemoryStatusRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory-status/', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Memory status not found`, }, }); } /** * Update the memory status for a specific user. * * Args: * request: The HTTP request containing the updated status. * org: The organization/tenant identifier. * user_id: The ID of the user to update memory status for. * * Returns: * Response: The updated memory status. * * Raises: * BadRequest: If the provided data is invalid. * @returns MemoryStatusView * @throws ApiError */ public static aiPromptOrgsUsersMemoryStatusUpdate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: MemoryStatusRequestView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory-status/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, }, }); } /** * Update a specific catalog item memory entry. * * Args: * request: The HTTP request containing the updated catalog item memory data. * org: The organization/tenant identifier. * user_id: The ID of the user who owns the memory. * memory_id: The ID of the specific memory entry to update. * * Returns: * Response: The updated catalog item memory entry. * * Raises: * BadRequest: If the provided data is invalid. * NotFound: If the specified memory entry does not exist. * @returns UserCatalogItemMemoryView * @throws ApiError */ public static aiPromptOrgsUsersMemoryUpdate({ memoryId, org, userId, requestBody, }: { memoryId: number, org: string, userId: string, requestBody: UserCatalogItemMemoryView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory/{memory_id}/', path: { 'memory_id': memoryId, 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', errors: { 400: `Invalid data`, 404: `Memory not found`, }, }); } /** * Delete a specific catalog item memory entry. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user who owns the memory. * memory_id: The ID of the specific memory entry to delete. * * Returns: * Response: A success message if the memory was deleted. * * Raises: * NotFound: If the specified memory entry does not exist. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersMemoryDestroy2({ memoryId, org, userId, }: { memoryId: number, org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/memory/{memory_id}/', path: { 'memory_id': memoryId, 'org': org, 'user_id': userId, }, errors: { 404: `Memory not found`, }, }); } /** * Retrieve metadata for a prompt. * * Args: * request: The HTTP request. * org: The organization/tenant identifier. * user_id: The ID of the user making the request. * * Returns: * Response: The prompt metadata. * * Raises: * NotFound: If no metadata exists for the specific prompt * @returns Metadata * @throws ApiError */ public static aiPromptOrgsUsersMetadataRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/metadata', path: { 'org': org, 'user_id': userId, }, errors: { 404: `Metadata not found`, }, }); } /** * API viewset for managing prompts. * * This view allows tenant admins and students to create, retrieve, update, * and filter prompts based on various parameters. * * Permissions: * - Accessible to both tenant administrators and students * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptList({ org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/', path: { 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, }); } /** * Create a new prompt. * * Args: * request: HTTP request containing prompt data. * * Returns: * Response with created prompt details. * * Raises: * ValidationError: If the input data is invalid. * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptCreate({ org, userId, requestBody, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { org: string, userId: string, requestBody: Prompt, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/', path: { 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, body: requestBody, mediaType: 'application/json', }); } /** * API viewset for managing prompts. * * This view allows tenant admins and students to create, retrieve, update, * and filter prompts based on various parameters. * * Permissions: * - Accessible to both tenant administrators and students * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptRetrieve({ id, org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { /** * A unique integer value identifying this prompt. */ id: number, org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/{id}/', path: { 'id': id, 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, }); } /** * Update an existing prompt. * * Args: * request: HTTP request containing updated prompt data. * * Returns: * Response with updated prompt details. * * Raises: * ValidationError: If the input data is invalid. * PermissionDenied: If the prompt is system-generated and cannot be edited. * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptUpdate({ id, org, userId, requestBody, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { /** * A unique integer value identifying this prompt. */ id: number, org: string, userId: string, requestBody: Prompt, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/{id}/', path: { 'id': id, 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, body: requestBody, mediaType: 'application/json', }); } /** * API viewset for managing prompts. * * This view allows tenant admins and students to create, retrieve, update, * and filter prompts based on various parameters. * * Permissions: * - Accessible to both tenant administrators and students * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptPartialUpdate({ id, org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, requestBody, }: { /** * A unique integer value identifying this prompt. */ id: number, org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, requestBody?: PatchedPrompt, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/{id}/', path: { 'id': id, 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, body: requestBody, mediaType: 'application/json', }); } /** * API viewset for managing prompts. * * This view allows tenant admins and students to create, retrieve, update, * and filter prompts based on various parameters. * * Permissions: * - Accessible to both tenant administrators and students * @returns void * @throws ApiError */ public static aiPromptOrgsUsersPromptDestroy({ id, org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { /** * A unique integer value identifying this prompt. */ id: number, org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompt/{id}/', path: { 'id': id, 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, }); } /** * Retrieve a list of prompt categories. * * Query Parameters: * - filter_by (optional): Sorts categories by name if set to "name". * * Args: * request: The HTTP request. * org: Organization key identifier. * * Returns: * - 200: List of prompt categories. * - 400: If query parameters are invalid. * @returns PromptCategory * @throws ApiError */ public static aiPromptOrgsUsersPromptsCategoryRetrieve({ org, userId, filterBy, }: { org: string, userId: string, /** * Filter options include, date, name, default is date */ filterBy?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompts/category/', path: { 'org': org, 'user_id': userId, }, query: { 'filter_by': filterBy, }, }); } /** * Create a new prompt category. * * Args: * request: The HTTP request containing category information. * org: Organization key identifier. * user_id: User performing the request. * * Returns: * - 201: Created prompt category. * - 401: If the user is not a tenant admin. * - 400: If request data is invalid. * @returns PromptCategory Created prompt category * @throws ApiError */ public static aiPromptOrgsUsersPromptsCategoryCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: PromptCategory, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompts/category/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Delete a prompt category. * * Args: * request: The HTTP request containing the category to delete. * org: Organization key identifier. * user_id: User performing the request. * * Returns: * - 204: No Content (successful deletion). * - 401: If the user is not a tenant admin. * - 400: If request data is invalid. * - 404: If the category does not exist. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersPromptsCategoryDestroy({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompts/category/', path: { 'org': org, 'user_id': userId, }, errors: { 400: `Invalid request data.`, 404: `Prompt category not found.`, }, }); } /** * API viewset for managing prompts. * * This view allows anyone to retrieve, * and filter prompts based on various parameters. * * Permissions: * - Accessible to anyone * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptsPublicList({ org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise> { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompts/public/', path: { 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, }); } /** * API viewset for managing prompts. * * This view allows anyone to retrieve, * and filter prompts based on various parameters. * * Permissions: * - Accessible to anyone * @returns Prompt * @throws ApiError */ public static aiPromptOrgsUsersPromptsPublicRetrieve({ id, org, userId, category, createdBy, filterBy, mentorUniqueId, tag, visibility, }: { /** * A unique integer value identifying this prompt. */ id: number, org: string, userId: string, /** * Category of the prompt */ category?: number, /** * Option to filter by username of the prompt creators. */ createdBy?: string, /** * Filter options include, date, prompt, default is date */ filterBy?: string, /** * Mentor unique id of the prompt */ mentorUniqueId?: string, /** * Tag of the prompt */ tag?: number, /** * Visibility trype the mentor of the prompt */ visibility?: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/prompts/public/{id}/', path: { 'id': id, 'org': org, 'user_id': userId, }, query: { 'category': category, 'created_by': createdBy, 'filter_by': filterBy, 'mentor_unique_id': mentorUniqueId, 'tag': tag, 'visibility': visibility, }, }); } /** * Retrieve guided prompts for a chat session * Fetches AI-generated guided prompts for a given session and organization. * @returns GuidedPromptsResponse * @throws ApiError */ public static aiPromptOrgsUsersSessionsGuidedPromptsRetrieve({ org, sessionId, userId, count = 5, }: { org: string, sessionId: string, userId: string, count?: number, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/sessions/{session_id}/guided-prompts/', path: { 'org': org, 'session_id': sessionId, 'user_id': userId, }, query: { 'count': count, }, }); } /** * Endpoint for getting prompt styles. * * Accessible to tenant admins and students. * * Returns: * * 200: List of styles. * @returns StylesView * @throws ApiError */ public static aiPromptOrgsUsersStylesRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/styles/', path: { 'org': org, 'user_id': userId, }, }); } /** * Endpoint for Adding prompt style. * * Accessible to tenant admins only. * * Returns: * * 201: style Object. * * 400: When data is not valid. * @returns StylesView * @throws ApiError */ public static aiPromptOrgsUsersStylesCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: StylesView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/styles/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for Adding prompt style. * * Accessible to tenant admins only. * * Returns: * * 200: style Object. * * 400: When data is not valid. * @returns StylesView * @throws ApiError */ public static aiPromptOrgsUsersStylesUpdate({ org, styleId, userId, requestBody, }: { org: string, styleId: number, userId: string, requestBody: StylesView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/styles/{style_id}/', path: { 'org': org, 'style_id': styleId, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for deleting prompt style. * * Accessible to tenant admins and students. * * Returns: * * 204: No response data. * * 400: When data is not valid. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersStylesDestroy({ org, styleId, userId, }: { org: string, styleId: number, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/styles/{style_id}/', path: { 'org': org, 'style_id': styleId, 'user_id': userId, }, }); } /** * Endpoint for getting prompt tags. * * Accessible to tenant admins and students. * * Returns: * * 200: List of tags. * @returns TagsView * @throws ApiError */ public static aiPromptOrgsUsersTagsRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tags/', path: { 'org': org, 'user_id': userId, }, }); } /** * Endpoint for Adding prompt tag. * * Accessible to tenant admins and students. * * Returns: * * 201: tag Object. * * 400: When data is not valid. * * * * Example: * * POST: /api/ai-prompt/orgs/main/users/johndoe/tags/ * * Request: Response: { * "name": "Programming", * "description": "tags for programing prompts" * } * * Response: { * "id": 1, * "name": "Programming", * "description": "tags for programing prompts" * } * @returns TagsView * @throws ApiError */ public static aiPromptOrgsUsersTagsCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody: TagsView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tags/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for updating prompt tag. * * Accessible to tenant admins and students. * * Returns: * * 200: tag Object. * * 400: When data is not valid. * @returns TagsView * @throws ApiError */ public static aiPromptOrgsUsersTagsUpdate({ org, tagId, userId, requestBody, }: { org: string, tagId: number, userId: string, requestBody: TagsView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tags/{tag_id}/', path: { 'org': org, 'tag_id': tagId, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for deleting prompt tag. * * Accessible to tenant admins and students. * * Returns: * * 204: No response data. * * 400: When data is not valid. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersTagsDestroy({ org, tagId, userId, }: { org: string, tagId: number, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tags/{tag_id}/', path: { 'org': org, 'tag_id': tagId, 'user_id': userId, }, }); } /** * Endpoint for getting prompt tones. * * Accessible to tenant admins and students. * * Returns: * * 200: List of tones. * @returns TonesView * @throws ApiError */ public static aiPromptOrgsUsersTonesRetrieve({ org, userId, }: { org: string, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tones/', path: { 'org': org, 'user_id': userId, }, }); } /** * Endpoint for Adding prompt tone. * * Accessible to tenant admins only. * * Returns: * * 201: tone Object. * * 400: When data is not valid. * @returns TonesView * @throws ApiError */ public static aiPromptOrgsUsersTonesCreate({ org, userId, requestBody, }: { org: string, userId: string, requestBody?: TonesView, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tones/', path: { 'org': org, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for updating prompt tone. * * Accessible to tenant admins only. * * Returns: * * 200: tone Object. * * 400: When data is not valid. * @returns TonesView * @throws ApiError */ public static aiPromptOrgsUsersTonesUpdate({ org, toneId, userId, requestBody, }: { org: string, toneId: number, userId: string, requestBody?: TonesView, }): CancelablePromise { return __request(OpenAPI, { method: 'PUT', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tones/{tone_id}/', path: { 'org': org, 'tone_id': toneId, 'user_id': userId, }, body: requestBody, mediaType: 'application/json', }); } /** * Endpoint for deleting prompt tone. * * Accessible to tenant admins and students. * * Returns: * * 204: No response data. * * 400: When data is not valid. * @returns void * @throws ApiError */ public static aiPromptOrgsUsersTonesDestroy({ org, toneId, userId, }: { org: string, toneId: number, userId: string, }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', url: '/api/ai-prompt/orgs/{org}/users/{user_id}/tones/{tone_id}/', path: { 'org': org, 'tone_id': toneId, 'user_id': userId, }, }); } }