import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http'; import { Observable } from 'rxjs'; import { AltoBaseIdsDtoApi } from '../model/altoBaseIdsDto'; import { CreateProgramDtoApi } from '../model/createProgramDto'; import { DeleteResponseApi } from '../model/deleteResponse'; import { PatchProgramDtoApi } from '../model/patchProgramDto'; import { ProgramAssignmentDtoPaginatedResponseApi } from '../model/programAssignmentDtoPaginatedResponse'; import { ProgramDtoCreatedResponseApi } from '../model/programDtoCreatedResponse'; import { ProgramDtoPaginatedResponseApi } from '../model/programDtoPaginatedResponse'; import { ProgramDtoResponseApi } from '../model/programDtoResponse'; import { Configuration } from '../configuration'; import * as i0 from "@angular/core"; export interface AddQuestionsToProgramRequestParams { id: string; altoBaseIdsDtoApi: AltoBaseIdsDtoApi; /** 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 CreateProgramRequestParams { createProgramDtoApi: CreateProgramDtoApi; /** 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 DeleteProgramRequestParams { 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 GetAllAssignmentsProgramRequestParams { 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 program IDs used to filter the results. If no program IDs are provided, all assignments will be returned. The filter applied is an <b>OR</b>. <b>The query will return assignments that have AT LEAST one of the specified programs ID.</b> */ programIds?: string; /** An array of team IDs used to filter the results. If no team IDs are provided, all assignments will be returned. The filter applied is an <b>OR</b>. <b>The query will return assignments that have AT LEAST one of the specified teams ID.</b> */ teamIds?: 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 GetProgramByIdRequestParams { 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 GetProgramsRequestParams { 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 question IDs used to filter the results. If no question IDs are provided, all programs will be returned. The filter applied is an <b>OR</b>. <b>The query will return programs that have AT LEAST one of the specified questions ID.</b> */ questionIds?: string; /** An array of team IDs used to filter the results. If no team IDs are provided, all programs will be returned. The filter applied is an <b>OR</b>. <b>The query will return programs that have AT LEAST one of the specified teams ID.</b> */ teamIds?: string; isActive?: boolean; /** 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 PatchProgramRequestParams { id: string; patchProgramDtoApi: PatchProgramDtoApi; /** 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 RemoveQuestionsFromProgramRequestParams { id: string; altoBaseIdsDtoApi: AltoBaseIdsDtoApi; /** 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 ProgramsApiService { protected httpClient: HttpClient; protected basePath: string; defaultHeaders: HttpHeaders; configuration: Configuration; encoder: HttpParameterCodec; constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration); private addToHttpParams; private addToHttpParamsRecursive; /** * Adds questions to a program with the given ID * Adds questions to a program with the given ID. * @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. */ addQuestionsToProgram(requestParameters: AddQuestionsToProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; addQuestionsToProgram(requestParameters: AddQuestionsToProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; addQuestionsToProgram(requestParameters: AddQuestionsToProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Create a new program * This method handles POST requests to the \'/programs\' route to create a new program using the data passed in the body. It will respond with the newly created program. * @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. */ createProgram(requestParameters: CreateProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; createProgram(requestParameters: CreateProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; createProgram(requestParameters: CreateProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * \"Soft delete\" an existing program by ID * This method handles DELETE requests to the \'/programs/:id\' route, it \"softDelete\" a single program 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. */ deleteProgram(requestParameters: DeleteProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; deleteProgram(requestParameters: DeleteProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; deleteProgram(requestParameters: DeleteProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get Programs with filter, sort and pagination options * TODO: To remove after stats migration. This method handles GET requests to the \'/programs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated programs 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. */ getAllAssignmentsProgram(requestParameters: GetAllAssignmentsProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getAllAssignmentsProgram(requestParameters: GetAllAssignmentsProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getAllAssignmentsProgram(requestParameters: GetAllAssignmentsProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get a single program by ID * This method handles GET requests to the \'/programs/{:id}\' route with `{:id}` the id of the program we want to find. If the program 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. */ getProgramById(requestParameters: GetProgramByIdRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getProgramById(requestParameters: GetProgramByIdRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getProgramById(requestParameters: GetProgramByIdRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Get Programs with filter, sort and pagination options * This method handles GET requests to the \'/programs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated programs 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. */ getPrograms(requestParameters: GetProgramsRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; getPrograms(requestParameters: GetProgramsRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; getPrograms(requestParameters: GetProgramsRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Patch an existing program by ID * This method handles PATCH requests to the \'/programs/:id\' route where :id is a program ID, it updates a single program with the ID :id and return it. If the program 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. */ patchProgram(requestParameters: PatchProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; patchProgram(requestParameters: PatchProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; patchProgram(requestParameters: PatchProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; /** * Removes questions from a program with the given ID * Removes questions from a program with the given ID. * @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. */ removeQuestionsFromProgram(requestParameters: RemoveQuestionsFromProgramRequestParams, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable; removeQuestionsFromProgram(requestParameters: RemoveQuestionsFromProgramRequestParams, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; removeQuestionsFromProgram(requestParameters: RemoveQuestionsFromProgramRequestParams, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; }): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }