import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { CreateQuestionDtoApi } from '../model/createQuestionDto'; import { DeleteResponseApi } from '../model/deleteResponse'; import { PatchQuestionDtoApi } from '../model/patchQuestionDto'; import { QuestionDtoCreatedResponseApi } from '../model/questionDtoCreatedResponse'; import { QuestionDtoPaginatedResponseApi } from '../model/questionDtoPaginatedResponse'; import { QuestionDtoResponseApi } from '../model/questionDtoResponse'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export interface CreateQuestionRequestParams { createQuestionDtoApi: CreateQuestionDtoApi; /** The ID of the company that the user sending the request is related to. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ companyId?: string; /** The ID of the user sending the request. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. Used to set the `createdBy` property on creation of entities. */ userId?: string; } export interface DeleteQuestionRequestParams { id: string; /** The ID of the company that the user sending the request is related to. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ companyId?: string; /** The ID of the user sending the request. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. Used to set the `createdBy` property on creation of entities. */ userId?: string; } export interface GetQuestionByIdRequestParams { id: string; /** The ID of the company that the user sending the request is related to. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ companyId?: string; /** The ID of the user sending the request. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. Used to set the `createdBy` property on creation of entities. */ userId?: string; } export interface GetQuestionsRequestParams { createdBy?: string; /** The fields to sort by. The Sort by allow to sort the results by specific properties, for example to sort the results by createdAt in scending order you can use the following syntaxt : ?sortBy=createdAt:asc if you want to apply multiple sort you can do it by adding more sortBy options like this : ?sortBy=createdAt:asc,questionId:desc */ sortBy?: string; /** An array of IDs used to filter the results to only include entities with the specified IDs */ ids?: string; /** An array of tag IDs used to filter the results. If no tag IDs are provided, all questions will be returned. The filter applied is an <b>OR</b>. <b>The query will return questions that have AT LEAST one of the specified tags ID.</b> */ tagIds?: string; /** An array of program IDs used to filter the results. If no program IDs are provided, all questions will be returned. The filter applied is an <b>OR</b>. <b>The query will return questions that have AT LEAST one of the specified program ID.</b> */ programIds?: string; /** An array of team IDs used to filter the results. If no team IDs are provided, all questions will be returned. The filter applied is an <b>OR</b>. <b>The query will return questions that have AT LEAST one of the specified team ID.</b> To find the team associated with a question, we use the program\'s and program assignments teamId property of a question. */ teamIds?: Array; /** An array of program IDs used to filter the results. If no program IDs are provided, all questions will be returned. The filter applied is an <b>OR</b>. <b>The query will return questions that have AT LEAST one of the specified program ID.</b> */ programRunIds?: string; /** An array of program IDs used to filter the results. If no program IDs are provided, all questions will be returned. If one or more program IDs are provided, the query will return questions that are not associated with any of the specified program IDs. */ notInProgramIds?: string; isProgramRunQuestionDone?: boolean; sortByProgramId?: string; /** A text to search in the title of the question Current implementation does not \"weight\" the results and is a simple multi word (space separated) search to include all questions that have the words provided in the query The regular expression in the Transform decorator uses Unicode property escapes to match any character that is not a letter (\\p{L}), a digit (\\p{N}), or a whitespace character (\\s). The u flag is used to enable Unicode mode, which is necessary to correctly match Unicode characters. It also removes all 0 at the beginning of each word in order to avoid postgres text search limitation (0 is counted as a stop word) */ search?: string; /** The ID of the company that the user sending the request is related to. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ companyId?: string; /** The ID of the user sending the request. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ userId?: string; /** The page of results to retrieve. */ page?: number; /** The number of items per page to retrieve. */ itemsPerPage?: number; /** A date used to filter the results based on the createdAt field of the resources, only including resources created after this date. the operator used for this filter is >= (greater than or equal to) If the createdAfter field is provided with a date without a time, it will include resources created on the same day as the provided date, starting at midnight. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. */ createdAfter?: Date; /** A date used to filter the results based on the createdAt field of the resources, only including resources created before this date. the operator used for this filter is <= (less than or equal to) If the createdBefore field is provided with a date without a time, it will include resources created on the same day as the provided date, ending at midnight. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. */ createdBefore?: Date; } export interface PatchQuestionRequestParams { id: string; patchQuestionDtoApi: PatchQuestionDtoApi; /** The ID of the company that the user sending the request is related to. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. */ companyId?: string; /** The ID of the user sending the request. This field is required when using the API Key. It will be included in the JSON Web Token (JWT) when using Auth0 authentication. Used to set the `createdBy` property on creation of entities. */ userId?: string; } export declare class QuestionsApiService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * Create a new question * This method handles POST requests to the \'/questions\' route to create a new question using the data passed in the body. It will respond with the newly created question. The order of the answers does not matter but all the answers from the accepted answers of the question need to be provided in the guess. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\']when creating the guess associated with the question, the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] when creating the guess associated with the question, the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] when creating the guess associated with the question, the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] when creating the guess associated with the question, the guess will also be valid. * @param requestParameters * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ createQuestion(requestParameters: CreateQuestionRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; createQuestion(requestParameters: CreateQuestionRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; createQuestion(requestParameters: CreateQuestionRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Soft delete\" an existing question by ID * This method handles DELETE requests to the \'/questions/:id\' route, it \"softDelete\" a single question does not return anything. By \"soft delete\" we mean that it will just set the deletedAt and will not remove the item from the database, this is done to better manage deletions and allow us to handle different scenario like deleting in cascade etc... * @param requestParameters * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ deleteQuestion(requestParameters: DeleteQuestionRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; deleteQuestion(requestParameters: DeleteQuestionRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; deleteQuestion(requestParameters: DeleteQuestionRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get a single question by ID * This method handles GET requests to the \'/questions/{:id}\' route with `{:id}` the id of the question we want to find. If the question exists it will return it, if not we respond with an error not found. * @param requestParameters * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getQuestionById(requestParameters: GetQuestionByIdRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getQuestionById(requestParameters: GetQuestionByIdRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getQuestionById(requestParameters: GetQuestionByIdRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get Questions with filter, sort and pagination options * This method handles GET requests to the \'/questions\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated questions along with the current state of pagination . * @param requestParameters * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ getQuestions(requestParameters: GetQuestionsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getQuestions(requestParameters: GetQuestionsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getQuestions(requestParameters: GetQuestionsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Patch an existing question by ID * This method handles PATCH requests to the \'/questions/:id\' route where :id is a question ID, it updates a single question with the ID :id and return it. If the question with ID does not exists we return an error. * @param requestParameters * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ patchQuestion(requestParameters: PatchQuestionRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; patchQuestion(requestParameters: PatchQuestionRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; patchQuestion(requestParameters: PatchQuestionRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }