/* tslint:disable */ /* eslint-disable */ /** * TrainX API * ### The TrainX API documentation In order to use the Swagger, please retrieve your JWT at the following link: [https://trainx.getcockpit.io/jwt](https://trainx.getcockpit.io/jwt) and add it to the bearer field in the authorization section. * * The version of the OpenAPI document: v1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * * @export * @interface AltoBaseIdsDto */ export interface AltoBaseIdsDto { /** * Array of entity IDs. Must have a minimum length of 0 and be an array. * @type {Array} * @memberof AltoBaseIdsDto */ 'ids': Array; } /** * * @export * @interface AltoBaseResponseDto */ export interface AltoBaseResponseDto { /** * The HTTP status code of the response. * @type {number} * @memberof AltoBaseResponseDto */ 'statusCode': number; /** * The data returned by the endpoint. * @type {object} * @memberof AltoBaseResponseDto */ 'data'?: object; } /** * * @export * @interface AltoBaseResponsePaginatedDto */ export interface AltoBaseResponsePaginatedDto { /** * The HTTP status code of the response. * @type {number} * @memberof AltoBaseResponsePaginatedDto */ 'statusCode': number; /** * The data returned by the endpoint. * @type {object} * @memberof AltoBaseResponsePaginatedDto */ 'data'?: object; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof AltoBaseResponsePaginatedDto */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface AltoBaseResponsePaginatedMetaDto */ export interface AltoBaseResponsePaginatedMetaDto { /** * The number of items sent per page. * @type {number} * @memberof AltoBaseResponsePaginatedMetaDto */ 'itemsPerPage': number; /** * The total number of items retrieved by the database query. * @type {number} * @memberof AltoBaseResponsePaginatedMetaDto */ 'totalItems': number; /** * The current page of the paginated response. * @type {number} * @memberof AltoBaseResponsePaginatedMetaDto */ 'currentPage': number; /** * The total number of pages in the paginated response. This property is calculated from itemPerPage and totalItems. * @type {number} * @memberof AltoBaseResponsePaginatedMetaDto */ 'totalPage': number; /** * The current url * @type {string} * @memberof AltoBaseResponsePaginatedMetaDto */ 'currentUrl': string; /** * The pagination previous url * @type {string} * @memberof AltoBaseResponsePaginatedMetaDto */ 'previousUrl'?: string; /** * The pagination next url * @type {string} * @memberof AltoBaseResponsePaginatedMetaDto */ 'nextUrl'?: string; } /** * * @export * @enum {string} */ export const AltoConnectorEnum = { Web: 'web', Slack: 'slack', Teams: 'teams', GoogleChat: 'google-chat', Unknown: 'unknown' } as const; export type AltoConnectorEnum = typeof AltoConnectorEnum[keyof typeof AltoConnectorEnum]; /** * * @export * @enum {string} */ export const AnswerFormatTypeEnum = { Text: 'text', Number: 'number', Date: 'date' } as const; export type AnswerFormatTypeEnum = typeof AnswerFormatTypeEnum[keyof typeof AnswerFormatTypeEnum]; /** * * @export * @interface Coach */ export interface Coach { /** * * @type {string} * @memberof Coach */ 'id': string; /** * * @type {string} * @memberof Coach */ 'createdBy': string; /** * * @type {string} * @memberof Coach */ 'createdAt': string; /** * * @type {string} * @memberof Coach */ 'updatedAt': string; /** * * @type {string} * @memberof Coach */ 'deletedAt': string; /** * * @type {string} * @memberof Coach */ 'name': string; /** * * @type {string} * @memberof Coach */ 'pictureUrl'?: string; } /** * * @export * @interface CoachDto */ export interface CoachDto { /** * * @type {string} * @memberof CoachDto */ 'name': string; /** * * @type {string} * @memberof CoachDto */ 'pictureUrl'?: string; /** * * @type {string} * @memberof CoachDto */ 'id': string; /** * * @type {string} * @memberof CoachDto */ 'createdAt': string; /** * * @type {string} * @memberof CoachDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof CoachDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof CoachDto */ 'updatedAt': string; /** * * @type {string} * @memberof CoachDto */ 'deletedAt'?: string; } /** * * @export * @interface CoachDtoCreatedResponse */ export interface CoachDtoCreatedResponse { /** * * @type {number} * @memberof CoachDtoCreatedResponse */ 'statusCode': number; /** * * @type {CoachDto} * @memberof CoachDtoCreatedResponse */ 'data'?: CoachDto; } /** * * @export * @interface CoachDtoPaginatedResponse */ export interface CoachDtoPaginatedResponse { /** * * @type {number} * @memberof CoachDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof CoachDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof CoachDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface CoachDtoResponse */ export interface CoachDtoResponse { /** * * @type {number} * @memberof CoachDtoResponse */ 'statusCode': number; /** * * @type {CoachDto} * @memberof CoachDtoResponse */ 'data'?: CoachDto; } /** * * @export * @interface Comment */ export interface Comment { /** * * @type {string} * @memberof Comment */ 'id': string; /** * * @type {string} * @memberof Comment */ 'createdBy': string; /** * * @type {string} * @memberof Comment */ 'createdAt': string; /** * * @type {string} * @memberof Comment */ 'updatedAt': string; /** * * @type {string} * @memberof Comment */ 'deletedAt': string; /** * * @type {Question} * @memberof Comment */ 'question': Question; /** * The id of the question related to this comment. * @type {string} * @memberof Comment */ 'questionId': string; /** * String that represents the text (the content) of the comment. * @type {string} * @memberof Comment */ 'text': string; /** * Optional string that represents an image associated with the comment * @type {string} * @memberof Comment */ 'image'?: string; /** * Boolean that specify whether or not the comment has been read. * @type {boolean} * @memberof Comment */ 'isRead': boolean; /** * Optional string that represents the response to the comment. * @type {string} * @memberof Comment */ 'response'?: string; /** * Optional string that represents the uuid of the user that responded to the comment. * @type {string} * @memberof Comment */ 'updatedBy'?: string; /** * * @type {User} * @memberof Comment */ 'updatedByUser'?: User; } /** * * @export * @interface CommentDto */ export interface CommentDto { /** * * @type {QuestionLightDto} * @memberof CommentDto */ 'question': QuestionLightDto; /** * * @type {string} * @memberof CommentDto */ 'questionId': string; /** * * @type {string} * @memberof CommentDto */ 'text': string; /** * * @type {string} * @memberof CommentDto */ 'image'?: string; /** * * @type {boolean} * @memberof CommentDto */ 'isRead': boolean; /** * * @type {string} * @memberof CommentDto */ 'response'?: string; /** * * @type {string} * @memberof CommentDto */ 'updatedBy'?: string; /** * * @type {UserLightDto} * @memberof CommentDto */ 'updatedByUser'?: UserLightDto; /** * * @type {UserLightDto} * @memberof CommentDto */ 'author'?: UserLightDto; /** * * @type {CompanyLightDto} * @memberof CommentDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof CommentDto */ 'companyId': string; /** * * @type {string} * @memberof CommentDto */ 'id': string; /** * * @type {string} * @memberof CommentDto */ 'createdAt': string; /** * * @type {string} * @memberof CommentDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof CommentDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof CommentDto */ 'updatedAt': string; /** * * @type {string} * @memberof CommentDto */ 'deletedAt'?: string; } /** * * @export * @interface CommentDtoCreatedResponse */ export interface CommentDtoCreatedResponse { /** * * @type {number} * @memberof CommentDtoCreatedResponse */ 'statusCode': number; /** * * @type {CommentDto} * @memberof CommentDtoCreatedResponse */ 'data'?: CommentDto; } /** * * @export * @interface CommentDtoPaginatedResponse */ export interface CommentDtoPaginatedResponse { /** * * @type {number} * @memberof CommentDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof CommentDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof CommentDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface CommentDtoResponse */ export interface CommentDtoResponse { /** * * @type {number} * @memberof CommentDtoResponse */ 'statusCode': number; /** * * @type {CommentDto} * @memberof CommentDtoResponse */ 'data'?: CommentDto; } /** * * @export * @interface CommentLightDto */ export interface CommentLightDto { /** * * @type {string} * @memberof CommentLightDto */ 'id': string; /** * String that represents the text (the content) of the comment. * @type {string} * @memberof CommentLightDto */ 'text': string; } /** * * @export * @interface Company */ export interface Company { /** * * @type {string} * @memberof Company */ 'id': string; /** * * @type {string} * @memberof Company */ 'createdBy': string; /** * * @type {string} * @memberof Company */ 'createdAt': string; /** * * @type {string} * @memberof Company */ 'updatedAt': string; /** * * @type {string} * @memberof Company */ 'deletedAt': string; /** * * @type {AltoConnectorEnum} * @memberof Company */ 'connector'?: AltoConnectorEnum; /** * List of days on which trainX will send questions to the connector * @type {Array} * @memberof Company */ 'connectorDays'?: Array; /** * List of times on which trainX will send questions to the connector formated HhMM (e.g. 10h, 8h30) * @type {Array} * @memberof Company */ 'connectorTimes'?: Array; /** * The id of the company in the office database * @type {string} * @memberof Company */ 'theOfficeId'?: string; /** * The domain (email ending) of a company * @type {string} * @memberof Company */ 'domain'?: string; /** * The name of the company * @type {string} * @memberof Company */ 'name': string; /** * Status of the connector integration True if the connector is active for this company False is slack is NOT active for this company * @type {boolean} * @memberof Company */ 'isConnectorActive'?: boolean; /** * Status of the connector integration True if connectors are enabled for this company * @type {boolean} * @memberof Company */ 'isIntegrationEnabled'?: boolean; /** * Number of questions to send per quiz to the connector * @type {number} * @memberof Company */ 'connectorQuestionsPerQuiz'?: number; /** * The users related to this company * @type {Array} * @memberof Company */ 'users'?: Array; /** * To know if the users of this company have access to the web app * @type {boolean} * @memberof Company */ 'usersHaveWebAccess': boolean; /** * * @type {number} * @memberof Company */ 'licenseCount': number; } /** * * @export * @interface CompanyDto */ export interface CompanyDto { /** * * @type {string} * @memberof CompanyDto */ 'domain'?: string; /** * * @type {string} * @memberof CompanyDto */ 'name': string; /** * * @type {string} * @memberof CompanyDto */ 'connector'?: CompanyDtoConnectorEnum; /** * * @type {boolean} * @memberof CompanyDto */ 'isConnectorActive'?: boolean; /** * * @type {boolean} * @memberof CompanyDto */ 'isIntegrationEnabled'?: boolean; /** * * @type {Array} * @memberof CompanyDto */ 'connectorDays'?: Array; /** * * @type {number} * @memberof CompanyDto */ 'connectorQuestionsPerQuiz'?: number; /** * * @type {Array} * @memberof CompanyDto */ 'connectorTimes'?: Array; /** * * @type {Array} * @memberof CompanyDto */ 'admins'?: Array; /** * * @type {boolean} * @memberof CompanyDto */ 'usersHaveWebAccess': boolean; /** * * @type {string} * @memberof CompanyDto */ 'theOfficeId': string; /** * * @type {number} * @memberof CompanyDto */ 'licenseCount': number; /** * * @type {string} * @memberof CompanyDto */ 'id': string; /** * * @type {string} * @memberof CompanyDto */ 'createdAt': string; /** * * @type {string} * @memberof CompanyDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof CompanyDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof CompanyDto */ 'updatedAt': string; /** * * @type {string} * @memberof CompanyDto */ 'deletedAt'?: string; } export const CompanyDtoConnectorEnum = { Web: 'web', Slack: 'slack', Teams: 'teams', GoogleChat: 'google-chat', Unknown: 'unknown' } as const; export type CompanyDtoConnectorEnum = typeof CompanyDtoConnectorEnum[keyof typeof CompanyDtoConnectorEnum]; export const CompanyDtoConnectorDaysEnum = { Monday: 'Monday', Tuesday: 'Tuesday', Wednesday: 'Wednesday', Thursday: 'Thursday', Friday: 'Friday' } as const; export type CompanyDtoConnectorDaysEnum = typeof CompanyDtoConnectorDaysEnum[keyof typeof CompanyDtoConnectorDaysEnum]; export const CompanyDtoConnectorTimesEnum = { _10h: '10h', _13h30: '13h30', _17h: '17h' } as const; export type CompanyDtoConnectorTimesEnum = typeof CompanyDtoConnectorTimesEnum[keyof typeof CompanyDtoConnectorTimesEnum]; /** * * @export * @interface CompanyDtoPaginatedResponse */ export interface CompanyDtoPaginatedResponse { /** * * @type {number} * @memberof CompanyDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof CompanyDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof CompanyDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface CompanyDtoResponse */ export interface CompanyDtoResponse { /** * * @type {number} * @memberof CompanyDtoResponse */ 'statusCode': number; /** * * @type {CompanyDto} * @memberof CompanyDtoResponse */ 'data'?: CompanyDto; } /** * * @export * @interface CompanyLightDto */ export interface CompanyLightDto { /** * * @type {string} * @memberof CompanyLightDto */ 'id': string; /** * * @type {AltoConnectorEnum} * @memberof CompanyLightDto */ 'connector'?: AltoConnectorEnum; /** * The name of the company * @type {string} * @memberof CompanyLightDto */ 'name': string; /** * Status of the connector integration True if the connector is active for this company False is slack is NOT active for this company * @type {boolean} * @memberof CompanyLightDto */ 'isConnectorActive'?: boolean; /** * Status of the connector integration True if connectors are enabled for this company * @type {boolean} * @memberof CompanyLightDto */ 'isIntegrationEnabled'?: boolean; /** * To know if the users of this company have access to the web app * @type {boolean} * @memberof CompanyLightDto */ 'usersHaveWebAccess': boolean; /** * The id of the company in the office database * @type {string} * @memberof CompanyLightDto */ 'theOfficeId'?: string; } /** * * @export * @interface CompanyStatsDto */ export interface CompanyStatsDto { /** * * @type {string} * @memberof CompanyStatsDto */ 'from': string; /** * * @type {string} * @memberof CompanyStatsDto */ 'to': string; /** * * @type {number} * @memberof CompanyStatsDto */ 'totalGuessesCount': number; /** * * @type {number} * @memberof CompanyStatsDto */ 'commentsCreatedCount': number; /** * * @type {number} * @memberof CompanyStatsDto */ 'questionsSubmittedCount': number; /** * * @type {number} * @memberof CompanyStatsDto */ 'averageScore': number; /** * * @type {Array} * @memberof CompanyStatsDto */ 'rankedTags': Array; /** * * @type {Array} * @memberof CompanyStatsDto */ 'rankedUsers': Array; /** * * @type {Array} * @memberof CompanyStatsDto */ 'rankedTeams': Array; } /** * * @export * @interface CompanyStatsDtoResponse */ export interface CompanyStatsDtoResponse { /** * * @type {number} * @memberof CompanyStatsDtoResponse */ 'statusCode': number; /** * * @type {CompanyStatsDto} * @memberof CompanyStatsDtoResponse */ 'data'?: CompanyStatsDto; } /** * * @export * @enum {string} */ export const ConnectorTimeEnum = { _10h: '10h', _13h30: '13h30', _17h: '17h' } as const; export type ConnectorTimeEnum = typeof ConnectorTimeEnum[keyof typeof ConnectorTimeEnum]; /** * * @export * @interface CreateCoachDto */ export interface CreateCoachDto { /** * * @type {string} * @memberof CreateCoachDto */ 'name': string; /** * * @type {string} * @memberof CreateCoachDto */ 'pictureUrl'?: string; } /** * * @export * @interface CreateCommentDto */ export interface CreateCommentDto { /** * * @type {string} * @memberof CreateCommentDto */ 'companyId'?: string; /** * The text (content) of the comment * @type {string} * @memberof CreateCommentDto */ 'text': string; /** * The path of an optional image associated with the comment * @type {string} * @memberof CreateCommentDto */ 'image': string; /** * Optional boolean used to specify whether or not the comment has been read. If not provided, the default value is false. * @type {boolean} * @memberof CreateCommentDto */ 'isRead': boolean; /** * The id of the question related to this comment. * @type {string} * @memberof CreateCommentDto */ 'questionId': string; } /** * * @export * @interface CreateGuessDto */ export interface CreateGuessDto { /** * * @type {string} * @memberof CreateGuessDto */ 'companyId'?: string; /** * * @type {GuessSourceEnum} * @memberof CreateGuessDto */ 'source'?: GuessSourceEnum; /** * Specifies the question. Required. * @type {string} * @memberof CreateGuessDto */ 'questionId': string; /** * The answer to the question. Optional. This field is deprecated. Use answers instead. * @type {string} * @memberof CreateGuessDto * @deprecated */ 'answer'?: string; /** * The answers to the question. Optional. If not provided, the answer property will be used instead. if the answer property is not provided, the guess will be invalid. and the guess will have no answers. (meaning the user did not know the answer) All the answers from the accepted answers of the question need to be provided. if not, the guess will be invalid, the order does not matter. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] the guess will also be valid. * @type {Array} * @memberof CreateGuessDto */ 'answers'?: Array; /** * Check if the guess is valid. Optional. The backend will determine if the guess is valid or not. * @type {boolean} * @memberof CreateGuessDto * @deprecated */ 'isValid'?: boolean; /** * Check if the guess is timed out. Optional. This field is calculated on the front end. * @type {boolean} * @memberof CreateGuessDto */ 'isTimedOut': boolean; /** * The user did not know the answer. Optional. This field should be set to true if the user did not know the answer (clicked the I don\'t know button) If this field is set to true, the answers field will be ignored and the guess will be invalid. If this field is set to false, the answers field will be used to determine if the guess is valid or not. If this field is not provided, the answers field will be used to determine if the guess is valid or not. * @type {boolean} * @memberof CreateGuessDto */ 'isUnknownSelected'?: boolean; } /** * * @export * @interface CreateProgramDto */ export interface CreateProgramDto { /** * * @type {string} * @memberof CreateProgramDto */ 'companyId'?: string; /** * Specifies the expected score. Default is 75. Optional. * @type {number} * @memberof CreateProgramDto */ 'expectation'?: number; /** * * @type {PriorityEnum} * @memberof CreateProgramDto */ 'priority'?: PriorityEnum; /** * Specifies the tag Ids associated with the program. Optional. * @type {Array} * @memberof CreateProgramDto */ 'tagIds'?: Array; /** * Specifies the team Ids associated with the program. Optional. * @type {Array} * @memberof CreateProgramDto */ 'teamIds'?: Array; /** * Specifies whether the program is an accelerated program or not. Optional. * @type {boolean} * @memberof CreateProgramDto */ 'isAccelerated'?: boolean; /** * Specifies whether the program is active or not. Optional. * @type {boolean} * @memberof CreateProgramDto */ 'isActive'?: boolean; /** * Specifies the name of the program. Required. * @type {string} * @memberof CreateProgramDto */ 'name': string; /** * Specifies the description of the program. Optional. * @type {string} * @memberof CreateProgramDto */ 'description'?: string; /** * Specifies whether the program should display a timer or not. Optional. * @type {boolean} * @memberof CreateProgramDto */ 'showTimer'?: boolean; /** * * @type {string} * @memberof CreateProgramDto */ 'coachId'?: string; } /** * * @export * @interface CreateProgramRunDto */ export interface CreateProgramRunDto { /** * * @type {string} * @memberof CreateProgramRunDto */ 'companyId'?: string; /** * Specifies the the program. Required. * @type {string} * @memberof CreateProgramRunDto */ 'programId': string; } /** * * @export * @interface CreateQuestionDto */ export interface CreateQuestionDto { /** * * @type {string} * @memberof CreateQuestionDto */ 'companyId'?: string; /** * * @type {QuestionTypeEnum} * @memberof CreateQuestionDto */ 'type': QuestionTypeEnum; /** * The tags associated with the question. Id only. Optional. * @type {Array} * @memberof CreateQuestionDto */ 'tagIds'?: Array; /** * The programs associated with the question. Id only. Optional. * @type {Array} * @memberof CreateQuestionDto */ 'programIds'?: Array; /** * * @type {AnswerFormatTypeEnum} * @memberof CreateQuestionDto */ 'answerType': AnswerFormatTypeEnum; /** * The title of the question. * @type {string} * @memberof CreateQuestionDto */ 'title': string; /** * The array of accepted answers for the question. Must have at least one answer. Empty strings are forbidden. Each string in the array will be trimmed of leading and trailing whitespace. 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. * @type {Array} * @memberof CreateQuestionDto */ 'answersAccepted': Array; /** * The array of wrong answers for the question. Must have at least one answer. Empty strings are forbidden. Each string in the array will be trimmed of leading and trailing whitespace. * @type {Array} * @memberof CreateQuestionDto */ 'answersWrong': Array; /** * An optional explanation for the question. * @type {string} * @memberof CreateQuestionDto */ 'explanation'?: string; /** * An optional link for the question. * @type {string} * @memberof CreateQuestionDto */ 'link'?: string; /** * * @type {string} * @memberof CreateQuestionDto */ 'coachId'?: string; } /** * * @export * @interface CreateQuestionSubmittedDto */ export interface CreateQuestionSubmittedDto { /** * * @type {string} * @memberof CreateQuestionSubmittedDto */ 'companyId'?: string; /** * The title of the question-submitted. It\'s the actual question written by the user. * @type {string} * @memberof CreateQuestionSubmittedDto */ 'title': string; /** * The status of the question-submitted. * @type {string} * @memberof CreateQuestionSubmittedDto */ 'status': CreateQuestionSubmittedDtoStatusEnum; } export const CreateQuestionSubmittedDtoStatusEnum = { Submitted: 'submitted', Accepted: 'accepted', Declined: 'declined' } as const; export type CreateQuestionSubmittedDtoStatusEnum = typeof CreateQuestionSubmittedDtoStatusEnum[keyof typeof CreateQuestionSubmittedDtoStatusEnum]; /** * * @export * @interface CreateTagDto */ export interface CreateTagDto { /** * * @type {string} * @memberof CreateTagDto */ 'companyId'?: string; /** * * @type {Array} * @memberof CreateTagDto */ 'questions'?: Array; /** * * @type {string} * @memberof CreateTagDto */ 'name': string; /** * * @type {string} * @memberof CreateTagDto */ 'description'?: string; } /** * * @export * @interface CreateTeamDto */ export interface CreateTeamDto { /** * * @type {string} * @memberof CreateTeamDto */ 'companyId'?: string; /** * The long name of the team. * @type {string} * @memberof CreateTeamDto */ 'name': string; } /** * * @export * @interface CreateUserDto */ export interface CreateUserDto { /** * * @type {string} * @memberof CreateUserDto */ 'companyId'?: string; /** * * @type {Array} * @memberof CreateUserDto */ 'roles'?: Array; /** * * @type {string} * @memberof CreateUserDto */ 'email': string; /** * * @type {string} * @memberof CreateUserDto */ 'teamId'?: string; /** * * @type {object} * @memberof CreateUserDto */ 'pref'?: object; /** * * @type {string} * @memberof CreateUserDto */ 'firstname': string; /** * * @type {string} * @memberof CreateUserDto */ 'lastname': string; /** * * @type {string} * @memberof CreateUserDto */ 'timezone'?: string; /** * * @type {string} * @memberof CreateUserDto */ 'country'?: string; /** * * @type {string} * @memberof CreateUserDto */ 'pictureUrl'?: string; /** * * @type {boolean} * @memberof CreateUserDto */ 'isConnectorActive'?: boolean; /** * * @type {boolean} * @memberof CreateUserDto */ 'hasLicense'?: boolean; } /** * * @export * @interface DeleteResponse */ export interface DeleteResponse { /** * * @type {number} * @memberof DeleteResponse */ 'statusCode'?: number; } /** * * @export * @interface Guess */ export interface Guess { /** * * @type {string} * @memberof Guess */ 'id': string; /** * * @type {string} * @memberof Guess */ 'createdBy': string; /** * * @type {string} * @memberof Guess */ 'createdAt': string; /** * * @type {string} * @memberof Guess */ 'updatedAt': string; /** * * @type {string} * @memberof Guess */ 'deletedAt': string; /** * * @type {GuessSourceEnum} * @memberof Guess */ 'source': GuessSourceEnum; /** * * @type {Question} * @memberof Guess */ 'question': Question; /** * * @type {string} * @memberof Guess */ 'questionId'?: string; /** * * @type {Array} * @memberof Guess */ 'programRuns': Array; /** * * @type {Array} * @memberof Guess */ 'programRunQuestions': Array; /** * * @type {Array} * @memberof Guess */ 'answers': Array; /** * * @type {boolean} * @memberof Guess */ 'isValid': boolean; /** * * @type {boolean} * @memberof Guess */ 'isTimedOut': boolean; /** * The team ID of the guess creator (if any) * @type {string} * @memberof Guess */ 'teamId'?: string; /** * * @type {boolean} * @memberof Guess */ 'isUnknownSelected': boolean; } /** * * @export * @interface GuessDto */ export interface GuessDto { /** * * @type {string} * @memberof GuessDto */ 'questionId'?: string; /** * * @type {QuestionLightDto} * @memberof GuessDto */ 'question'?: QuestionLightDto; /** * * @type {Array} * @memberof GuessDto */ 'programRuns'?: Array; /** * * @type {Array} * @memberof GuessDto */ 'programRunIds'?: Array; /** * * @type {Array} * @memberof GuessDto */ 'answers'?: Array; /** * * @type {boolean} * @memberof GuessDto */ 'isValid': boolean; /** * * @type {boolean} * @memberof GuessDto */ 'isTimedOut': boolean; /** * * @type {TeamLightDto} * @memberof GuessDto */ 'team'?: TeamLightDto; /** * * @type {string} * @memberof GuessDto */ 'teamId'?: string; /** * * @type {string} * @memberof GuessDto */ 'source': GuessDtoSourceEnum; /** * * @type {UserLightDto} * @memberof GuessDto */ 'author'?: UserLightDto; /** * * @type {CompanyLightDto} * @memberof GuessDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof GuessDto */ 'companyId': string; /** * * @type {string} * @memberof GuessDto */ 'id': string; /** * * @type {string} * @memberof GuessDto */ 'createdAt': string; /** * * @type {string} * @memberof GuessDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof GuessDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof GuessDto */ 'updatedAt': string; /** * * @type {string} * @memberof GuessDto */ 'deletedAt'?: string; } export const GuessDtoSourceEnum = { Web: 'web', Slack: 'slack', GoogleChat: 'google-chat', Teams: 'teams', Unknown: 'unknown' } as const; export type GuessDtoSourceEnum = typeof GuessDtoSourceEnum[keyof typeof GuessDtoSourceEnum]; /** * * @export * @interface GuessDtoCreatedResponse */ export interface GuessDtoCreatedResponse { /** * * @type {number} * @memberof GuessDtoCreatedResponse */ 'statusCode': number; /** * * @type {GuessDto} * @memberof GuessDtoCreatedResponse */ 'data'?: GuessDto; } /** * * @export * @interface GuessDtoPaginatedResponse */ export interface GuessDtoPaginatedResponse { /** * * @type {number} * @memberof GuessDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof GuessDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof GuessDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface GuessDtoResponse */ export interface GuessDtoResponse { /** * * @type {number} * @memberof GuessDtoResponse */ 'statusCode': number; /** * * @type {GuessDto} * @memberof GuessDtoResponse */ 'data'?: GuessDto; } /** * * @export * @enum {string} */ export const GuessSourceEnum = { Web: 'web', Slack: 'slack', GoogleChat: 'google-chat', Teams: 'teams', Unknown: 'unknown' } as const; export type GuessSourceEnum = typeof GuessSourceEnum[keyof typeof GuessSourceEnum]; /** * * @export * @interface IdDto */ export interface IdDto { /** * * @type {string} * @memberof IdDto */ 'id': string; } /** * * @export * @interface NextQuestionDto */ export interface NextQuestionDto { /** * * @type {boolean} * @memberof NextQuestionDto */ 'pushAndNoGuess': boolean; /** * * @type {string} * @memberof NextQuestionDto */ 'title': string; /** * * @type {string} * @memberof NextQuestionDto */ 'type': NextQuestionDtoTypeEnum; /** * * @type {Array} * @memberof NextQuestionDto */ 'tags'?: Array; /** * * @type {Array} * @memberof NextQuestionDto */ 'programs'?: Array; /** * * @type {string} * @memberof NextQuestionDto */ 'answerType': NextQuestionDtoAnswerTypeEnum; /** * * @type {Array} * @memberof NextQuestionDto */ 'answersAccepted': Array; /** * * @type {Array} * @memberof NextQuestionDto */ 'answersWrong': Array; /** * * @type {string} * @memberof NextQuestionDto */ 'explanation'?: string; /** * * @type {string} * @memberof NextQuestionDto */ 'link'?: string; /** * * @type {Array} * @memberof NextQuestionDto */ 'comments'?: Array; /** * * @type {string} * @memberof NextQuestionDto */ 'coachId'?: string; /** * * @type {CompanyLightDto} * @memberof NextQuestionDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof NextQuestionDto */ 'companyId': string; /** * * @type {string} * @memberof NextQuestionDto */ 'id': string; /** * * @type {string} * @memberof NextQuestionDto */ 'createdAt': string; /** * * @type {string} * @memberof NextQuestionDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof NextQuestionDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof NextQuestionDto */ 'updatedAt': string; /** * * @type {string} * @memberof NextQuestionDto */ 'deletedAt'?: string; } export const NextQuestionDtoTypeEnum = { MultipleChoice: 'multiple_choice', FreeText: 'free_text', NumberRange: 'number_range' } as const; export type NextQuestionDtoTypeEnum = typeof NextQuestionDtoTypeEnum[keyof typeof NextQuestionDtoTypeEnum]; export const NextQuestionDtoAnswerTypeEnum = { Text: 'text', Number: 'number', Date: 'date' } as const; export type NextQuestionDtoAnswerTypeEnum = typeof NextQuestionDtoAnswerTypeEnum[keyof typeof NextQuestionDtoAnswerTypeEnum]; /** * * @export * @interface NextQuestionDtoPaginatedResponse */ export interface NextQuestionDtoPaginatedResponse { /** * * @type {number} * @memberof NextQuestionDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof NextQuestionDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof NextQuestionDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface NextQuestionsQueryDto */ export interface NextQuestionsQueryDto { /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof NextQuestionsQueryDto */ 'ids'?: 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. * @type {string} * @memberof NextQuestionsQueryDto */ 'userId'?: string; /** * The page of results to retrieve. * @type {number} * @memberof NextQuestionsQueryDto */ 'page'?: number; /** * The number of items per page to retrieve. * @type {number} * @memberof NextQuestionsQueryDto */ 'itemsPerPage'?: number; /** * 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. * @type {string} * @memberof NextQuestionsQueryDto */ 'companyId'?: string; } /** * * @export * @interface PatchCoachDto */ export interface PatchCoachDto { /** * * @type {string} * @memberof PatchCoachDto */ 'name'?: string; /** * * @type {string} * @memberof PatchCoachDto */ 'pictureUrl'?: string; } /** * * @export * @interface PatchCommentDto */ export interface PatchCommentDto { /** * String that represents the response to the comment. * @type {string} * @memberof PatchCommentDto */ 'response'?: string; /** * String that represents the id of the user that updated the comment. This property is optional because it is only used when override is necessary. * @type {string} * @memberof PatchCommentDto */ 'updatedBy'?: string; /** * The text (content) of the comment * @type {string} * @memberof PatchCommentDto */ 'text'?: string; /** * The path of an optional image associated with the comment * @type {string} * @memberof PatchCommentDto */ 'image'?: string; /** * Optional boolean used to specify whether or not the comment has been read. If not provided, the default value is false. * @type {boolean} * @memberof PatchCommentDto */ 'isRead'?: boolean; } /** * * @export * @interface PatchCompanyDto */ export interface PatchCompanyDto { /** * The domain (email ending) of a company The regular expression will match any string that starts with one or more domain labels, each separated by a period (e.g., \"sub.subdomain.com\"), the domain labels can include letters, numbers, and hyphens, but cannot start or end with a hyphen. The final label must be at least 2 characters long and can only contain letters. builded with the help of this post : https://stackoverflow.com/questions/7930751/regexp-for-subdomain * @type {string} * @memberof PatchCompanyDto */ 'domain'?: string; /** * * @type {AltoConnectorEnum} * @memberof PatchCompanyDto */ 'connector'?: AltoConnectorEnum; /** * Status of the connector integration True if connector is active for this company False is connector is NOT active for this company * @type {boolean} * @memberof PatchCompanyDto */ 'isConnectorActive'?: boolean; /** * Status of the connector integration True if connectors are enabled for this company * @type {boolean} * @memberof PatchCompanyDto */ 'isIntegrationEnabled'?: boolean; /** * List of days on which connector will send questions * @type {Array} * @memberof PatchCompanyDto */ 'connectorDays'?: Array; /** * Number of questions to send per quiz * @type {number} * @memberof PatchCompanyDto */ 'connectorQuestionsPerQuiz'?: number; /** * List of times on which trainX will send questions to the connector formated HhMM (e.g. 10h, 8h30) * @type {Array} * @memberof PatchCompanyDto */ 'connectorTimes'?: Array; /** * * @type {boolean} * @memberof PatchCompanyDto */ 'usersHaveWebAccess'?: boolean; /** * The name of the company * @type {string} * @memberof PatchCompanyDto */ 'name'?: string; } /** * * @export * @interface PatchProgramDto */ export interface PatchProgramDto { /** * Specifies the expected score. Default is 75. Optional. * @type {number} * @memberof PatchProgramDto */ 'expectation'?: number; /** * * @type {PriorityEnum} * @memberof PatchProgramDto */ 'priority'?: PriorityEnum; /** * Specifies the team Ids associated with the program. Optional. * @type {Array} * @memberof PatchProgramDto */ 'teamIds'?: Array; /** * Specifies whether the program is active or not. Optional. * @type {boolean} * @memberof PatchProgramDto */ 'isActive'?: boolean; /** * Specifies the name of the program. Required. * @type {string} * @memberof PatchProgramDto */ 'name'?: string; /** * Specifies the description of the program. Optional. * @type {string} * @memberof PatchProgramDto */ 'description'?: string; /** * Specifies whether the program should display a timer or not. Optional. * @type {boolean} * @memberof PatchProgramDto */ 'showTimer'?: boolean; /** * * @type {string} * @memberof PatchProgramDto */ 'coachId'?: string; } /** * * @export * @interface PatchQuestionDto */ export interface PatchQuestionDto { /** * * @type {QuestionTypeEnum} * @memberof PatchQuestionDto */ 'type'?: QuestionTypeEnum; /** * The tags associated with the question. Id only. Optional. * @type {Array} * @memberof PatchQuestionDto */ 'tagIds'?: Array; /** * The programs associated with the question. Id only. Optional. * @type {Array} * @memberof PatchQuestionDto */ 'programIds'?: Array; /** * * @type {AnswerFormatTypeEnum} * @memberof PatchQuestionDto */ 'answerType'?: AnswerFormatTypeEnum; /** * The title of the question. * @type {string} * @memberof PatchQuestionDto */ 'title'?: string; /** * The array of accepted answers for the question. Must have at least one answer. Empty strings are forbidden. Each string in the array will be trimmed of leading and trailing whitespace. 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. * @type {Array} * @memberof PatchQuestionDto */ 'answersAccepted'?: Array; /** * The array of wrong answers for the question. Must have at least one answer. Empty strings are forbidden. Each string in the array will be trimmed of leading and trailing whitespace. * @type {Array} * @memberof PatchQuestionDto */ 'answersWrong'?: Array; /** * An optional explanation for the question. * @type {string} * @memberof PatchQuestionDto */ 'explanation'?: string; /** * An optional link for the question. * @type {string} * @memberof PatchQuestionDto */ 'link'?: string; /** * * @type {string} * @memberof PatchQuestionDto */ 'coachId'?: string; } /** * * @export * @interface PatchQuestionSubmittedDto */ export interface PatchQuestionSubmittedDto { /** * Optional string that represents the response to the submitted question. * @type {string} * @memberof PatchQuestionSubmittedDto */ 'response'?: string; /** * Optional string that represents the uuid of the user that responded to the submitted question. * @type {string} * @memberof PatchQuestionSubmittedDto */ 'updatedBy'?: string; /** * Optional string that represents the uuid of the question created from this submitted question. * @type {string} * @memberof PatchQuestionSubmittedDto */ 'questionId'?: string; /** * The title of the question-submitted. It\'s the actual question written by the user. * @type {string} * @memberof PatchQuestionSubmittedDto */ 'title'?: string; /** * The status of the question-submitted. * @type {string} * @memberof PatchQuestionSubmittedDto */ 'status'?: PatchQuestionSubmittedDtoStatusEnum; } export const PatchQuestionSubmittedDtoStatusEnum = { Submitted: 'submitted', Accepted: 'accepted', Declined: 'declined' } as const; export type PatchQuestionSubmittedDtoStatusEnum = typeof PatchQuestionSubmittedDtoStatusEnum[keyof typeof PatchQuestionSubmittedDtoStatusEnum]; /** * * @export * @interface PatchTagDto */ export interface PatchTagDto { /** * * @type {string} * @memberof PatchTagDto */ 'name'?: string; /** * * @type {string} * @memberof PatchTagDto */ 'description'?: string; } /** * * @export * @interface PatchTeamDto */ export interface PatchTeamDto { /** * The long name of the team. * @type {string} * @memberof PatchTeamDto */ 'name'?: string; } /** * * @export * @interface PatchUserDto */ export interface PatchUserDto { /** * * @type {Array} * @memberof PatchUserDto */ 'roles'?: Array; /** * * @type {string} * @memberof PatchUserDto */ 'teamId'?: string; /** * * @type {object} * @memberof PatchUserDto */ 'pref'?: object; /** * * @type {string} * @memberof PatchUserDto */ 'firstname'?: string; /** * * @type {string} * @memberof PatchUserDto */ 'lastname'?: string; /** * * @type {string} * @memberof PatchUserDto */ 'timezone'?: string; /** * * @type {string} * @memberof PatchUserDto */ 'country'?: string; /** * * @type {string} * @memberof PatchUserDto */ 'pictureUrl'?: string; /** * * @type {boolean} * @memberof PatchUserDto */ 'isConnectorActive'?: boolean; /** * * @type {boolean} * @memberof PatchUserDto */ 'hasLicense'?: boolean; } /** * * @export * @enum {string} */ export const PriorityEnum = { High: 'High', Low: 'Low', Medium: 'Medium' } as const; export type PriorityEnum = typeof PriorityEnum[keyof typeof PriorityEnum]; /** * * @export * @interface Program */ export interface Program { /** * * @type {string} * @memberof Program */ 'id': string; /** * * @type {string} * @memberof Program */ 'createdBy': string; /** * * @type {string} * @memberof Program */ 'createdAt': string; /** * * @type {string} * @memberof Program */ 'updatedAt': string; /** * * @type {string} * @memberof Program */ 'deletedAt': string; /** * * @type {PriorityEnum} * @memberof Program */ 'priority': PriorityEnum; /** * * @type {boolean} * @memberof Program */ 'isAccelerated': boolean; /** * * @type {boolean} * @memberof Program */ 'isActive': boolean; /** * * @type {string} * @memberof Program */ 'name': string; /** * * @type {string} * @memberof Program */ 'description'?: string; /** * * @type {number} * @memberof Program */ 'expectation': number; /** * * @type {string} * @memberof Program */ 'startDate'?: string; /** * * @type {boolean} * @memberof Program */ 'showTimer': boolean; /** * * @type {Array} * @memberof Program */ 'questions'?: Array; /** * * @type {Array} * @memberof Program */ 'teams': Array; /** * * @type {Array} * @memberof Program */ 'assignments': Array; /** * * @type {Array} * @memberof Program */ 'runs': Array; /** * * @type {Coach} * @memberof Program */ 'coach'?: Coach; /** * * @type {string} * @memberof Program */ 'coachId'?: string; } /** * * @export * @interface ProgramAssignment */ export interface ProgramAssignment { /** * * @type {string} * @memberof ProgramAssignment */ 'id': string; /** * * @type {string} * @memberof ProgramAssignment */ 'createdBy': string; /** * * @type {string} * @memberof ProgramAssignment */ 'createdAt': string; /** * * @type {string} * @memberof ProgramAssignment */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramAssignment */ 'deletedAt': string; /** * * @type {string} * @memberof ProgramAssignment */ 'archivedAt': string; /** * * @type {string} * @memberof ProgramAssignment */ 'programId': string; /** * * @type {string} * @memberof ProgramAssignment */ 'teamId': string; /** * * @type {Program} * @memberof ProgramAssignment */ 'program': Program; /** * * @type {Team} * @memberof ProgramAssignment */ 'team': Team; } /** * * @export * @interface ProgramAssignmentDto */ export interface ProgramAssignmentDto { /** * * @type {string} * @memberof ProgramAssignmentDto */ 'archivedAt': string; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'programId': string; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'teamId': string; /** * * @type {ProgramLightDto} * @memberof ProgramAssignmentDto */ 'program': ProgramLightDto; /** * * @type {TeamLightDto} * @memberof ProgramAssignmentDto */ 'team': TeamLightDto; /** * * @type {CompanyLightDto} * @memberof ProgramAssignmentDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'companyId': string; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'id': string; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'createdAt': string; /** * * @type {string} * @memberof ProgramAssignmentDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof ProgramAssignmentDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramAssignmentDto */ 'deletedAt'?: string; } /** * * @export * @interface ProgramAssignmentDtoPaginatedResponse */ export interface ProgramAssignmentDtoPaginatedResponse { /** * * @type {number} * @memberof ProgramAssignmentDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof ProgramAssignmentDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof ProgramAssignmentDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface ProgramDto */ export interface ProgramDto { /** * * @type {boolean} * @memberof ProgramDto */ 'isAccelerated': boolean; /** * * @type {string} * @memberof ProgramDto */ 'startDate'?: string; /** * * @type {boolean} * @memberof ProgramDto */ 'isActive': boolean; /** * * @type {string} * @memberof ProgramDto */ 'name': string; /** * * @type {string} * @memberof ProgramDto */ 'description'?: string; /** * * @type {number} * @memberof ProgramDto */ 'expectation': number; /** * * @type {string} * @memberof ProgramDto */ 'priority': ProgramDtoPriorityEnum; /** * * @type {boolean} * @memberof ProgramDto */ 'showTimer': boolean; /** * * @type {Array} * @memberof ProgramDto */ 'teams': Array; /** * * @type {number} * @memberof ProgramDto */ 'questionsCount': number; /** * * @type {UserLightDto} * @memberof ProgramDto */ 'owner'?: UserLightDto; /** * * @type {string} * @memberof ProgramDto */ 'coachId'?: string; /** * * @type {CompanyLightDto} * @memberof ProgramDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof ProgramDto */ 'companyId': string; /** * * @type {string} * @memberof ProgramDto */ 'id': string; /** * * @type {string} * @memberof ProgramDto */ 'createdAt': string; /** * * @type {string} * @memberof ProgramDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof ProgramDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof ProgramDto */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramDto */ 'deletedAt'?: string; } export const ProgramDtoPriorityEnum = { High: 'High', Low: 'Low', Medium: 'Medium' } as const; export type ProgramDtoPriorityEnum = typeof ProgramDtoPriorityEnum[keyof typeof ProgramDtoPriorityEnum]; /** * * @export * @interface ProgramDtoCreatedResponse */ export interface ProgramDtoCreatedResponse { /** * * @type {number} * @memberof ProgramDtoCreatedResponse */ 'statusCode': number; /** * * @type {ProgramDto} * @memberof ProgramDtoCreatedResponse */ 'data'?: ProgramDto; } /** * * @export * @interface ProgramDtoPaginatedResponse */ export interface ProgramDtoPaginatedResponse { /** * * @type {number} * @memberof ProgramDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof ProgramDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof ProgramDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface ProgramDtoResponse */ export interface ProgramDtoResponse { /** * * @type {number} * @memberof ProgramDtoResponse */ 'statusCode': number; /** * * @type {ProgramDto} * @memberof ProgramDtoResponse */ 'data'?: ProgramDto; } /** * * @export * @interface ProgramLightDto */ export interface ProgramLightDto { /** * * @type {string} * @memberof ProgramLightDto */ 'id': string; /** * * @type {string} * @memberof ProgramLightDto */ 'name': string; } /** * * @export * @interface ProgramRun */ export interface ProgramRun { /** * * @type {string} * @memberof ProgramRun */ 'id': string; /** * * @type {string} * @memberof ProgramRun */ 'createdBy': string; /** * * @type {string} * @memberof ProgramRun */ 'createdAt': string; /** * * @type {string} * @memberof ProgramRun */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramRun */ 'deletedAt': string; /** * * @type {string} * @memberof ProgramRun */ 'finishedAt': string; /** * * @type {string} * @memberof ProgramRun */ 'lastLaunchDate': string; /** * * @type {Program} * @memberof ProgramRun */ 'program': Program; /** * * @type {string} * @memberof ProgramRun */ 'programId': string; /** * * @type {number} * @memberof ProgramRun */ 'programExpectation': number; /** * * @type {Array} * @memberof ProgramRun */ 'questions': Array; /** * * @type {Array} * @memberof ProgramRun */ 'guesses'?: Array; /** * * @type {number} * @memberof ProgramRun */ 'questionsCount': number; /** * * @type {number} * @memberof ProgramRun */ 'goodGuessesCount': number; /** * * @type {number} * @memberof ProgramRun */ 'guessesCount': number; /** * * @type {boolean} * @memberof ProgramRun */ 'isValid'?: boolean; } /** * * @export * @interface ProgramRunDto */ export interface ProgramRunDto { /** * * @type {string} * @memberof ProgramRunDto */ 'finishedAt'?: string; /** * * @type {string} * @memberof ProgramRunDto */ 'lastLaunchDate': string; /** * * @type {string} * @memberof ProgramRunDto */ 'programId': string; /** * * @type {number} * @memberof ProgramRunDto */ 'programExpectation': number; /** * * @type {number} * @memberof ProgramRunDto */ 'questionsCount': number; /** * * @type {number} * @memberof ProgramRunDto */ 'goodGuessesCount': number; /** * * @type {number} * @memberof ProgramRunDto */ 'guessesCount': number; /** * * @type {boolean} * @memberof ProgramRunDto */ 'isValid'?: boolean; /** * * @type {UserLightDto} * @memberof ProgramRunDto */ 'author'?: UserLightDto; /** * * @type {CompanyLightDto} * @memberof ProgramRunDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof ProgramRunDto */ 'companyId': string; /** * * @type {string} * @memberof ProgramRunDto */ 'id': string; /** * * @type {string} * @memberof ProgramRunDto */ 'createdAt': string; /** * * @type {string} * @memberof ProgramRunDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof ProgramRunDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof ProgramRunDto */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramRunDto */ 'deletedAt'?: string; } /** * * @export * @interface ProgramRunDtoCreatedResponse */ export interface ProgramRunDtoCreatedResponse { /** * * @type {number} * @memberof ProgramRunDtoCreatedResponse */ 'statusCode': number; /** * * @type {ProgramRunDto} * @memberof ProgramRunDtoCreatedResponse */ 'data'?: ProgramRunDto; } /** * * @export * @interface ProgramRunDtoPaginatedResponse */ export interface ProgramRunDtoPaginatedResponse { /** * * @type {number} * @memberof ProgramRunDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof ProgramRunDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof ProgramRunDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface ProgramRunDtoResponse */ export interface ProgramRunDtoResponse { /** * * @type {number} * @memberof ProgramRunDtoResponse */ 'statusCode': number; /** * * @type {ProgramRunDto} * @memberof ProgramRunDtoResponse */ 'data'?: ProgramRunDto; } /** * * @export * @interface ProgramRunLightDto */ export interface ProgramRunLightDto { /** * * @type {string} * @memberof ProgramRunLightDto */ 'id': string; /** * * @type {string} * @memberof ProgramRunLightDto */ 'programId': string; } /** * * @export * @interface ProgramRunQuestion */ export interface ProgramRunQuestion { /** * * @type {string} * @memberof ProgramRunQuestion */ 'id': string; /** * * @type {string} * @memberof ProgramRunQuestion */ 'createdBy': string; /** * * @type {string} * @memberof ProgramRunQuestion */ 'createdAt': string; /** * * @type {string} * @memberof ProgramRunQuestion */ 'updatedAt': string; /** * * @type {string} * @memberof ProgramRunQuestion */ 'deletedAt': string; /** * * @type {ProgramRun} * @memberof ProgramRunQuestion */ 'programRun': ProgramRun; /** * * @type {string} * @memberof ProgramRunQuestion */ 'programRunId': string; /** * * @type {Question} * @memberof ProgramRunQuestion */ 'question': Question; /** * * @type {string} * @memberof ProgramRunQuestion */ 'questionId': string; /** * * @type {Guess} * @memberof ProgramRunQuestion */ 'guess': Guess; } /** * * @export * @interface ProgramStatsDto */ export interface ProgramStatsDto { /** * * @type {ProgramDto} * @memberof ProgramStatsDto */ 'program': ProgramDto; /** * The stats for each teams within the program stats. * @type {Array} * @memberof ProgramStatsDto */ 'teams': Array; /** * The participation of the program (number of users that have at least started the program / number of users in the program) * @type {number} * @memberof ProgramStatsDto */ 'participation': number; /** * The score of the program (average live score of the users that have at least started the program) * @type {number} * @memberof ProgramStatsDto */ 'score': number; /** * The progress of the program (average progress of the users that have at least started the program) * @type {number} * @memberof ProgramStatsDto */ 'progress': number; /** * The number of user of the team. (number of users that are assigned to the program) * @type {number} * @memberof ProgramStatsDto */ 'totalUsersCount': number; /** * The number of user that have responded to the program. (number of users that have at least started the program) * @type {number} * @memberof ProgramStatsDto */ 'userParticipationCount': number; /** * The number of user that have completed the program. (number of users that have completed the program) * @type {number} * @memberof ProgramStatsDto */ 'userCompletedProgramCount': number; /** * The number of user that have validated the program. (number of users that have completed and validated the program) * @type {number} * @memberof ProgramStatsDto */ 'userValidatedProgramCount': number; } /** * * @export * @interface ProgramStatsDtoPaginatedResponse */ export interface ProgramStatsDtoPaginatedResponse { /** * * @type {number} * @memberof ProgramStatsDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof ProgramStatsDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof ProgramStatsDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface ProgramStatsLightDto */ export interface ProgramStatsLightDto { /** * This field is deprecated * @type {string} * @memberof ProgramStatsLightDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof ProgramStatsLightDto * @deprecated */ 'label': string; /** * * @type {ProgramLightDto} * @memberof ProgramStatsLightDto */ 'program': ProgramLightDto; /** * The total number of guesses sent by the user. * @type {number} * @memberof ProgramStatsLightDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof ProgramStatsLightDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof ProgramStatsLightDto */ 'score'?: number; } /** * * @export * @interface ProgramStatsTeamDto */ export interface ProgramStatsTeamDto { /** * * @type {TeamLightDto} * @memberof ProgramStatsTeamDto */ 'team': TeamLightDto; /** * The stats for each users within the team stats. * @type {Array} * @memberof ProgramStatsTeamDto */ 'users': Array; /** * The participation of the program (number of users that have at least started the program / number of users in the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'participation': number; /** * The score of the program (average live score of the users that have at least started the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'score': number; /** * The progress of the program (average progress of the users that have at least started the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'progress': number; /** * The number of user of the team. (number of users that are assigned to the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'totalUsersCount': number; /** * The number of user that have responded to the program. (number of users that have at least started the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'userParticipationCount': number; /** * The number of user that have completed the program. (number of users that have completed the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'userCompletedProgramCount': number; /** * The number of user that have validated the program. (number of users that have completed and validated the program) * @type {number} * @memberof ProgramStatsTeamDto */ 'userValidatedProgramCount': number; } /** * * @export * @interface ProgramStatsTeamUserDto */ export interface ProgramStatsTeamUserDto { /** * * @type {UserLightDto} * @memberof ProgramStatsTeamUserDto */ 'user': UserLightDto; /** * The progress of the user within the program. * @type {number} * @memberof ProgramStatsTeamUserDto */ 'progress'?: number; /** * The score of the user within the program. * @type {number} * @memberof ProgramStatsTeamUserDto */ 'score'?: number; /** * The date at which the user has completed the program. * @type {string} * @memberof ProgramStatsTeamUserDto */ 'completedAt'?: string; /** * True if the user has completed and validated the program. * @type {boolean} * @memberof ProgramStatsTeamUserDto */ 'validatedProgram': boolean; /** * Number of questions answered by the user. * @type {number} * @memberof ProgramStatsTeamUserDto */ 'answeredQuestionsCount': number; /** * Date of the last launch of the program. * @type {string} * @memberof ProgramStatsTeamUserDto */ 'lastLaunchedAt'?: string; } /** * * @export * @interface Question */ export interface Question { /** * * @type {string} * @memberof Question */ 'id': string; /** * * @type {string} * @memberof Question */ 'createdBy': string; /** * * @type {string} * @memberof Question */ 'createdAt': string; /** * * @type {string} * @memberof Question */ 'updatedAt': string; /** * * @type {string} * @memberof Question */ 'deletedAt': string; /** * * @type {QuestionTypeEnum} * @memberof Question */ 'type': QuestionTypeEnum; /** * * @type {AnswerFormatTypeEnum} * @memberof Question */ 'answerType': AnswerFormatTypeEnum; /** * The title of the question. * @type {string} * @memberof Question */ 'title': string; /** * The tags associated with the question. Optional. * @type {Array} * @memberof Question */ 'tags'?: Array; /** * The programs associated with the question. Optional. * @type {Array} * @memberof Question */ 'programs'?: Array; /** * The array of accepted answers for the question. Must have at least one answer. * @type {Array} * @memberof Question */ 'answersAccepted': Array; /** * The array of wrong answers for the question. Must have at least one answer. * @type {Array} * @memberof Question */ 'answersWrong': Array; /** * An optional explanation for the question. * @type {string} * @memberof Question */ 'explanation'?: string; /** * An optional link for the question. * @type {string} * @memberof Question */ 'link'?: string; /** * The comments associated with the question. Optional. * @type {Array} * @memberof Question */ 'comments'?: Array; /** * * @type {Array} * @memberof Question */ 'programRunQuestions': Array; /** * * @type {Array} * @memberof Question */ 'guesses': Array; /** * * @type {Array} * @memberof Question */ 'pushedToUsers'?: Array; /** * * @type {QuestionSubmitted} * @memberof Question */ 'submittedQuestion'?: QuestionSubmitted; /** * * @type {Coach} * @memberof Question */ 'coach'?: Coach; /** * * @type {string} * @memberof Question */ 'coachId'?: string; } /** * * @export * @interface QuestionDto */ export interface QuestionDto { /** * * @type {string} * @memberof QuestionDto */ 'title': string; /** * * @type {string} * @memberof QuestionDto */ 'type': QuestionDtoTypeEnum; /** * * @type {Array} * @memberof QuestionDto */ 'tags'?: Array; /** * * @type {Array} * @memberof QuestionDto */ 'programs'?: Array; /** * * @type {string} * @memberof QuestionDto */ 'answerType': QuestionDtoAnswerTypeEnum; /** * * @type {Array} * @memberof QuestionDto */ 'answersAccepted': Array; /** * * @type {Array} * @memberof QuestionDto */ 'answersWrong': Array; /** * * @type {string} * @memberof QuestionDto */ 'explanation'?: string; /** * * @type {string} * @memberof QuestionDto */ 'link'?: string; /** * * @type {Array} * @memberof QuestionDto */ 'comments'?: Array; /** * * @type {string} * @memberof QuestionDto */ 'coachId'?: string; /** * * @type {CompanyLightDto} * @memberof QuestionDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof QuestionDto */ 'companyId': string; /** * * @type {string} * @memberof QuestionDto */ 'id': string; /** * * @type {string} * @memberof QuestionDto */ 'createdAt': string; /** * * @type {string} * @memberof QuestionDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof QuestionDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof QuestionDto */ 'updatedAt': string; /** * * @type {string} * @memberof QuestionDto */ 'deletedAt'?: string; } export const QuestionDtoTypeEnum = { MultipleChoice: 'multiple_choice', FreeText: 'free_text', NumberRange: 'number_range' } as const; export type QuestionDtoTypeEnum = typeof QuestionDtoTypeEnum[keyof typeof QuestionDtoTypeEnum]; export const QuestionDtoAnswerTypeEnum = { Text: 'text', Number: 'number', Date: 'date' } as const; export type QuestionDtoAnswerTypeEnum = typeof QuestionDtoAnswerTypeEnum[keyof typeof QuestionDtoAnswerTypeEnum]; /** * * @export * @interface QuestionDtoCreatedResponse */ export interface QuestionDtoCreatedResponse { /** * * @type {number} * @memberof QuestionDtoCreatedResponse */ 'statusCode': number; /** * * @type {QuestionDto} * @memberof QuestionDtoCreatedResponse */ 'data'?: QuestionDto; } /** * * @export * @interface QuestionDtoPaginatedResponse */ export interface QuestionDtoPaginatedResponse { /** * * @type {number} * @memberof QuestionDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof QuestionDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof QuestionDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface QuestionDtoResponse */ export interface QuestionDtoResponse { /** * * @type {number} * @memberof QuestionDtoResponse */ 'statusCode': number; /** * * @type {QuestionDto} * @memberof QuestionDtoResponse */ 'data'?: QuestionDto; } /** * * @export * @interface QuestionIdDto */ export interface QuestionIdDto { /** * * @type {string} * @memberof QuestionIdDto */ 'id': string; } /** * * @export * @interface QuestionLightDto */ export interface QuestionLightDto { /** * * @type {string} * @memberof QuestionLightDto */ 'id': string; /** * The title of the question. * @type {string} * @memberof QuestionLightDto */ 'title': string; } /** * * @export * @interface QuestionStatsDto */ export interface QuestionStatsDto { /** * This field is deprecated * @type {string} * @memberof QuestionStatsDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof QuestionStatsDto * @deprecated */ 'label': string; /** * * @type {QuestionDto} * @memberof QuestionStatsDto */ 'question': QuestionDto; /** * The number of users who have answered the question. * @type {number} * @memberof QuestionStatsDto */ 'usersCount': number; /** * The total number of users who have been asked to answer the question. * @type {number} * @memberof QuestionStatsDto */ 'totalUsersCount': number; /** * The stats for each programs within the question stats. * @type {Array} * @memberof QuestionStatsDto */ 'programs'?: Array; /** * The stats for each teams within the question stats. * @type {Array} * @memberof QuestionStatsDto */ 'teams'?: Array; /** * * @type {Array} * @memberof QuestionStatsDto * @deprecated */ 'tags'?: Array; /** * The total number of guesses sent by the user. * @type {number} * @memberof QuestionStatsDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof QuestionStatsDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof QuestionStatsDto */ 'score'?: number; } /** * * @export * @interface QuestionStatsDtoPaginatedResponse */ export interface QuestionStatsDtoPaginatedResponse { /** * * @type {number} * @memberof QuestionStatsDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof QuestionStatsDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof QuestionStatsDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface QuestionStatsProgramDto */ export interface QuestionStatsProgramDto { /** * This field is deprecated * @type {string} * @memberof QuestionStatsProgramDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof QuestionStatsProgramDto * @deprecated */ 'label': string; /** * * @type {ProgramLightDto} * @memberof QuestionStatsProgramDto */ 'program': ProgramLightDto; /** * The total number of guesses sent by the user. * @type {number} * @memberof QuestionStatsProgramDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof QuestionStatsProgramDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof QuestionStatsProgramDto */ 'score'?: number; } /** * * @export * @interface QuestionStatsTeamDto */ export interface QuestionStatsTeamDto { /** * This field is deprecated * @type {string} * @memberof QuestionStatsTeamDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof QuestionStatsTeamDto * @deprecated */ 'label': string; /** * * @type {TeamLightDto} * @memberof QuestionStatsTeamDto */ 'team': TeamLightDto; /** * * @type {number} * @memberof QuestionStatsTeamDto */ 'totalUsersCount': number; /** * The total number of guesses sent by the user. * @type {number} * @memberof QuestionStatsTeamDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof QuestionStatsTeamDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof QuestionStatsTeamDto */ 'score'?: number; } /** * * @export * @interface QuestionSubmitted */ export interface QuestionSubmitted { /** * * @type {string} * @memberof QuestionSubmitted */ 'id': string; /** * * @type {string} * @memberof QuestionSubmitted */ 'createdBy': string; /** * * @type {string} * @memberof QuestionSubmitted */ 'createdAt': string; /** * * @type {string} * @memberof QuestionSubmitted */ 'updatedAt': string; /** * * @type {string} * @memberof QuestionSubmitted */ 'deletedAt': string; /** * * @type {QuestionSubmittedStatusEnum} * @memberof QuestionSubmitted */ 'status': QuestionSubmittedStatusEnum; /** * The title of the question-submitted. It\'s the actual question written by the user. * @type {string} * @memberof QuestionSubmitted */ 'title': string; /** * Optional string that represents the response to the submitted question. * @type {string} * @memberof QuestionSubmitted */ 'response'?: string; /** * Optional string that represents the uuid of the user that responded to the submitted question. * @type {string} * @memberof QuestionSubmitted */ 'updatedBy'?: string; /** * * @type {User} * @memberof QuestionSubmitted */ 'updatedByUser'?: User; /** * Optional string that represents the uuid of the question created from this submitted question. * @type {string} * @memberof QuestionSubmitted */ 'questionId'?: string; /** * * @type {Question} * @memberof QuestionSubmitted */ 'question'?: Question; } /** * * @export * @interface QuestionSubmittedDto */ export interface QuestionSubmittedDto { /** * * @type {string} * @memberof QuestionSubmittedDto */ 'title': string; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'status': QuestionSubmittedDtoStatusEnum; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'response'?: string; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'updatedBy'?: string; /** * * @type {UserLightDto} * @memberof QuestionSubmittedDto */ 'updatedByUser'?: UserLightDto; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'questionId'?: string; /** * * @type {QuestionLightDto} * @memberof QuestionSubmittedDto */ 'question'?: QuestionLightDto; /** * * @type {UserLightDto} * @memberof QuestionSubmittedDto */ 'author'?: UserLightDto; /** * * @type {CompanyLightDto} * @memberof QuestionSubmittedDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'companyId': string; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'id': string; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'createdAt': string; /** * * @type {string} * @memberof QuestionSubmittedDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof QuestionSubmittedDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'updatedAt': string; /** * * @type {string} * @memberof QuestionSubmittedDto */ 'deletedAt'?: string; } export const QuestionSubmittedDtoStatusEnum = { Submitted: 'submitted', Accepted: 'accepted', Declined: 'declined' } as const; export type QuestionSubmittedDtoStatusEnum = typeof QuestionSubmittedDtoStatusEnum[keyof typeof QuestionSubmittedDtoStatusEnum]; /** * * @export * @interface QuestionSubmittedDtoCreatedResponse */ export interface QuestionSubmittedDtoCreatedResponse { /** * * @type {number} * @memberof QuestionSubmittedDtoCreatedResponse */ 'statusCode': number; /** * * @type {QuestionSubmittedDto} * @memberof QuestionSubmittedDtoCreatedResponse */ 'data'?: QuestionSubmittedDto; } /** * * @export * @interface QuestionSubmittedDtoPaginatedResponse */ export interface QuestionSubmittedDtoPaginatedResponse { /** * * @type {number} * @memberof QuestionSubmittedDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof QuestionSubmittedDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof QuestionSubmittedDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface QuestionSubmittedDtoResponse */ export interface QuestionSubmittedDtoResponse { /** * * @type {number} * @memberof QuestionSubmittedDtoResponse */ 'statusCode': number; /** * * @type {QuestionSubmittedDto} * @memberof QuestionSubmittedDtoResponse */ 'data'?: QuestionSubmittedDto; } /** * * @export * @enum {string} */ export const QuestionSubmittedStatusEnum = { Submitted: 'submitted', Accepted: 'accepted', Declined: 'declined' } as const; export type QuestionSubmittedStatusEnum = typeof QuestionSubmittedStatusEnum[keyof typeof QuestionSubmittedStatusEnum]; /** * * @export * @enum {string} */ export const QuestionTypeEnum = { MultipleChoice: 'multiple_choice', FreeText: 'free_text', NumberRange: 'number_range' } as const; export type QuestionTypeEnum = typeof QuestionTypeEnum[keyof typeof QuestionTypeEnum]; /** * * @export * @interface RankedEntityDto */ export interface RankedEntityDto { /** * * @type {string} * @memberof RankedEntityDto */ 'id': string; /** * * @type {string} * @memberof RankedEntityDto */ 'label': string; /** * * @type {number} * @memberof RankedEntityDto */ 'score': number; /** * * @type {number} * @memberof RankedEntityDto */ 'rank': number; } /** * * @export * @enum {string} */ export const RoleEnum = { AltoAdmin: 'alto-admin', CompanyAdmin: 'company-admin', CompanyUser: 'company-user' } as const; export type RoleEnum = typeof RoleEnum[keyof typeof RoleEnum]; /** * * @export * @enum {string} */ export const ScoreByTypeEnum = { Tag: 'tag', Program: 'program', Team: 'team', Question: 'question', User: 'user' } as const; export type ScoreByTypeEnum = typeof ScoreByTypeEnum[keyof typeof ScoreByTypeEnum]; /** * * @export * @interface ScoreDto */ export interface ScoreDto { /** * An array of average scores, where each element corresponds to a timeframe. For example, if the timeframe is \"week\", each element in this array will represent the average score for a week. * @type {Array} * @memberof ScoreDto */ 'averages': Array; /** * An array of total scores, where each element corresponds to a timeframe. For example, if the timeframe is \"week\", each element in this array will represent the total guesses for a week. * @type {Array} * @memberof ScoreDto */ 'counts': Array; /** * An array of valid scores, where each element corresponds to a timeframe. For example, if the timeframe is \"week\", each element in this array will represent the number of valid guesses for a week. * @type {Array} * @memberof ScoreDto */ 'valids': Array; /** * An array of dates, where each element corresponds to a timeframe. For example, if the timeframe is \"week\", each element in this array will represent the start date of the week. * @type {Array} * @memberof ScoreDto */ 'dates': Array; /** * The label for the score, which can be a tag name for example on scores with a Type Tag. * @type {string} * @memberof ScoreDto */ 'label': string; /** * The unique identifier for the score type element. The tag.id for example on scores with a type Tag. * @type {string} * @memberof ScoreDto */ 'id': string; } /** * * @export * @enum {string} */ export const ScoreFillValuesEnum = { _0: '0', Null: 'null', False: 'false' } as const; export type ScoreFillValuesEnum = typeof ScoreFillValuesEnum[keyof typeof ScoreFillValuesEnum]; /** * * @export * @enum {string} */ export const ScoreTimeframeEnum = { Day: 'day', Week: 'week', Month: 'month', Year: 'year' } as const; export type ScoreTimeframeEnum = typeof ScoreTimeframeEnum[keyof typeof ScoreTimeframeEnum]; /** * * @export * @enum {string} */ export const ScoreTypeEnum = { Tag: 'tag', User: 'user', Program: 'program', Team: 'team', Question: 'question', QuestionSubmitted: 'questionSubmitted', Comment: 'comment', Guess: 'guess' } as const; export type ScoreTypeEnum = typeof ScoreTypeEnum[keyof typeof ScoreTypeEnum]; /** * * @export * @interface ScoresResponseDto */ export interface ScoresResponseDto { /** * * @type {ScoreTypeEnum} * @memberof ScoresResponseDto */ 'type': ScoreTypeEnum; /** * * @type {ScoreTimeframeEnum} * @memberof ScoresResponseDto */ 'timeframe': ScoreTimeframeEnum; /** * * @type {ScoreByTypeEnum} * @memberof ScoresResponseDto */ 'scoredBy'?: ScoreByTypeEnum; /** * Company ID. Must be a UUID string. * @type {string} * @memberof ScoresResponseDto */ 'companyId': string; /** * An array of score objects. * @type {Array} * @memberof ScoresResponseDto */ 'scores': Array; /** * The ID for the type to filter by * @type {string} * @memberof ScoresResponseDto */ 'scoredById'?: string; /** * The minimum number of total counts. * @type {number} * @memberof ScoresResponseDto */ 'countGreaterThan'?: number; /** * The earliest date to include in the score. * @type {string} * @memberof ScoresResponseDto */ 'dateAfter'?: string; /** * The latest date to include in the score. * @type {string} * @memberof ScoresResponseDto */ 'dateBefore'?: string; } /** * * @export * @interface ScoresResponseDtoResponse */ export interface ScoresResponseDtoResponse { /** * * @type {number} * @memberof ScoresResponseDtoResponse */ 'statusCode': number; /** * * @type {ScoresResponseDto} * @memberof ScoresResponseDtoResponse */ 'data'?: ScoresResponseDto; } /** * * @export * @interface StreakDto */ export interface StreakDto { /** * The start date of the streak * @type {string} * @memberof StreakDto */ 'startDate': string; /** * The count of days in the streak * @type {number} * @memberof StreakDto */ 'count': number; } /** * * @export * @interface Tag */ export interface Tag { /** * * @type {string} * @memberof Tag */ 'id': string; /** * * @type {string} * @memberof Tag */ 'createdBy': string; /** * * @type {string} * @memberof Tag */ 'createdAt': string; /** * * @type {string} * @memberof Tag */ 'updatedAt': string; /** * * @type {string} * @memberof Tag */ 'deletedAt': string; /** * * @type {string} * @memberof Tag */ 'name': string; /** * * @type {string} * @memberof Tag */ 'description'?: string; /** * * @type {Array} * @memberof Tag */ 'questions': Array; } /** * * @export * @interface TagDto */ export interface TagDto { /** * * @type {string} * @memberof TagDto */ 'name': string; /** * * @type {string} * @memberof TagDto */ 'description': string; /** * * @type {Array} * @memberof TagDto */ 'programs': Array; /** * * @type {number} * @memberof TagDto */ 'questionsCount': number; /** * * @type {CompanyLightDto} * @memberof TagDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof TagDto */ 'companyId': string; /** * * @type {string} * @memberof TagDto */ 'id': string; /** * * @type {string} * @memberof TagDto */ 'createdAt': string; /** * * @type {string} * @memberof TagDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof TagDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof TagDto */ 'updatedAt': string; /** * * @type {string} * @memberof TagDto */ 'deletedAt'?: string; } /** * * @export * @interface TagDtoCreatedResponse */ export interface TagDtoCreatedResponse { /** * * @type {number} * @memberof TagDtoCreatedResponse */ 'statusCode': number; /** * * @type {TagDto} * @memberof TagDtoCreatedResponse */ 'data'?: TagDto; } /** * * @export * @interface TagDtoPaginatedResponse */ export interface TagDtoPaginatedResponse { /** * * @type {number} * @memberof TagDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof TagDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof TagDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface TagDtoResponse */ export interface TagDtoResponse { /** * * @type {number} * @memberof TagDtoResponse */ 'statusCode': number; /** * * @type {TagDto} * @memberof TagDtoResponse */ 'data'?: TagDto; } /** * * @export * @interface TagLightDto */ export interface TagLightDto { /** * * @type {string} * @memberof TagLightDto */ 'id': string; /** * * @type {string} * @memberof TagLightDto */ 'name': string; } /** * * @export * @interface TagStatsDto */ export interface TagStatsDto { /** * This field is deprecated * @type {string} * @memberof TagStatsDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof TagStatsDto * @deprecated */ 'label': string; /** * * @type {TagDto} * @memberof TagStatsDto */ 'tag': TagDto; /** * The total number of guesses sent by the user. * @type {number} * @memberof TagStatsDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof TagStatsDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof TagStatsDto */ 'score'?: number; } /** * * @export * @interface TagStatsDtoPaginatedResponse */ export interface TagStatsDtoPaginatedResponse { /** * * @type {number} * @memberof TagStatsDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof TagStatsDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof TagStatsDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface TagStatsLightDto */ export interface TagStatsLightDto { /** * This field is deprecated * @type {string} * @memberof TagStatsLightDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof TagStatsLightDto * @deprecated */ 'label': string; /** * * @type {TagLightDto} * @memberof TagStatsLightDto */ 'tag': TagLightDto; /** * The total number of guesses sent by the user. * @type {number} * @memberof TagStatsLightDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof TagStatsLightDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof TagStatsLightDto */ 'score'?: number; } /** * * @export * @interface Team */ export interface Team { /** * * @type {string} * @memberof Team */ 'id': string; /** * * @type {string} * @memberof Team */ 'createdBy': string; /** * * @type {string} * @memberof Team */ 'createdAt': string; /** * * @type {string} * @memberof Team */ 'updatedAt': string; /** * * @type {string} * @memberof Team */ 'deletedAt': string; /** * The name of the team. * @type {string} * @memberof Team */ 'name': string; /** * * @type {Array} * @memberof Team */ 'programAssignments': Array; /** * * @type {Array} * @memberof Team */ 'programs': Array; /** * Array of program UUIDs representing the parcour for this team. Stores the ordered list of programs that the team should complete. * @type {Array} * @memberof Team */ 'parcour': Array; } /** * * @export * @interface TeamDto */ export interface TeamDto { /** * * @type {string} * @memberof TeamDto */ 'name': string; /** * * @type {Array} * @memberof TeamDto */ 'programs': Array; /** * * @type {Array} * @memberof TeamDto */ 'parcour': Array; /** * * @type {CompanyLightDto} * @memberof TeamDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof TeamDto */ 'companyId': string; /** * * @type {string} * @memberof TeamDto */ 'id': string; /** * * @type {string} * @memberof TeamDto */ 'createdAt': string; /** * * @type {string} * @memberof TeamDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof TeamDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof TeamDto */ 'updatedAt': string; /** * * @type {string} * @memberof TeamDto */ 'deletedAt'?: string; } /** * * @export * @interface TeamDtoCreatedResponse */ export interface TeamDtoCreatedResponse { /** * * @type {number} * @memberof TeamDtoCreatedResponse */ 'statusCode': number; /** * * @type {TeamDto} * @memberof TeamDtoCreatedResponse */ 'data'?: TeamDto; } /** * * @export * @interface TeamDtoPaginatedResponse */ export interface TeamDtoPaginatedResponse { /** * * @type {number} * @memberof TeamDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof TeamDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof TeamDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface TeamDtoResponse */ export interface TeamDtoResponse { /** * * @type {number} * @memberof TeamDtoResponse */ 'statusCode': number; /** * * @type {TeamDto} * @memberof TeamDtoResponse */ 'data'?: TeamDto; } /** * * @export * @interface TeamLightDto */ export interface TeamLightDto { /** * * @type {string} * @memberof TeamLightDto */ 'id': string; /** * The name of the team. * @type {string} * @memberof TeamLightDto */ 'name': string; } /** * * @export * @interface TeamStatsDto */ export interface TeamStatsDto { /** * This field is deprecated * @type {string} * @memberof TeamStatsDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof TeamStatsDto * @deprecated */ 'label': string; /** * * @type {TeamDto} * @memberof TeamStatsDto */ 'team': TeamDto; /** * the total number of questions pushed to the team. * @type {number} * @memberof TeamStatsDto */ 'questionsPushedCount'?: number; /** * the total number of comments made by the team. * @type {number} * @memberof TeamStatsDto */ 'commentsCount'?: number; /** * the total number of questions submitted by the team. * @type {number} * @memberof TeamStatsDto */ 'questionsSubmittedCount'?: number; /** * the tags stats associated to the questions pushed to the team. * @type {Array} * @memberof TeamStatsDto */ 'tags'?: Array; /** * the programs stats associated to the team. * @type {Array} * @memberof TeamStatsDto */ 'programs'?: Array; /** * The total number of guesses sent by the user. * @type {number} * @memberof TeamStatsDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof TeamStatsDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof TeamStatsDto */ 'score'?: number; } /** * * @export * @interface TeamStatsDtoPaginatedResponse */ export interface TeamStatsDtoPaginatedResponse { /** * * @type {number} * @memberof TeamStatsDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof TeamStatsDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof TeamStatsDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface UpdateParcourDto */ export interface UpdateParcourDto { /** * * @type {Array} * @memberof UpdateParcourDto */ 'parcour': Array; } /** * * @export * @interface User */ export interface User { /** * * @type {string} * @memberof User */ 'id': string; /** * * @type {string} * @memberof User */ 'createdBy': string; /** * * @type {string} * @memberof User */ 'createdAt': string; /** * * @type {string} * @memberof User */ 'updatedAt': string; /** * * @type {string} * @memberof User */ 'deletedAt': string; /** * * @type {Array} * @memberof User */ 'roles': Array; /** * The id of the company in the office database * @type {string} * @memberof User */ 'theOfficeId'?: string; /** * * @type {Company} * @memberof User */ 'company'?: Company; /** * The company ID (to have the companyId string in our entity) * @type {string} * @memberof User */ 'companyId'?: string; /** * * @type {string} * @memberof User */ 'email': string; /** * * @type {string} * @memberof User */ 'teamId'?: string; /** * * @type {object} * @memberof User */ 'pref'?: object; /** * * @type {string} * @memberof User */ 'pictureUrl'?: string; /** * * @type {string} * @memberof User */ 'firstname': string; /** * * @type {string} * @memberof User */ 'lastname': string; /** * * @type {string} * @memberof User */ 'timezone'?: string; /** * * @type {string} * @memberof User */ 'country'?: string; /** * Status of the connector integration True if the user has connected his connector (Slack, Google Chat, Teams, etc.) False if the user has not connected or has disconnected his connector * @type {boolean} * @memberof User */ 'isConnectorActive'?: boolean; /** * * @type {Array} * @memberof User */ 'questionsPushed'?: Array; /** * * @type {object} * @memberof User */ 'longestStreak': object; /** * * @type {object} * @memberof User */ 'currentStreak': object; /** * * @type {boolean} * @memberof User */ 'hasLicense': boolean; } /** * * @export * @interface UserDto */ export interface UserDto { /** * * @type {string} * @memberof UserDto */ 'email': string; /** * * @type {TeamLightDto} * @memberof UserDto */ 'team'?: TeamLightDto; /** * * @type {string} * @memberof UserDto */ 'teamId'?: string; /** * * @type {Array} * @memberof UserDto */ 'roles': Array; /** * * @type {object} * @memberof UserDto */ 'pref'?: object; /** * * @type {string} * @memberof UserDto */ 'pictureUrl'?: string; /** * * @type {string} * @memberof UserDto */ 'firstname': string; /** * * @type {string} * @memberof UserDto */ 'lastname': string; /** * * @type {string} * @memberof UserDto */ 'timezone'?: string; /** * * @type {string} * @memberof UserDto */ 'country'?: string; /** * * @type {boolean} * @memberof UserDto */ 'isConnectorActive'?: boolean; /** * * @type {StreakDto} * @memberof UserDto */ 'longestStreak': StreakDto; /** * * @type {StreakDto} * @memberof UserDto */ 'currentStreak': StreakDto; /** * * @type {boolean} * @memberof UserDto */ 'hasLicense': boolean; /** * * @type {CompanyLightDto} * @memberof UserDto */ 'company': CompanyLightDto; /** * * @type {string} * @memberof UserDto */ 'companyId': string; /** * * @type {string} * @memberof UserDto */ 'id': string; /** * * @type {string} * @memberof UserDto */ 'createdAt': string; /** * * @type {string} * @memberof UserDto * @deprecated */ 'createdBy'?: string; /** * * @type {UserLightDto} * @memberof UserDto */ 'createdByUser'?: UserLightDto; /** * * @type {string} * @memberof UserDto */ 'updatedAt': string; /** * * @type {string} * @memberof UserDto */ 'deletedAt'?: string; } export const UserDtoRolesEnum = { AltoAdmin: 'alto-admin', CompanyAdmin: 'company-admin', CompanyUser: 'company-user' } as const; export type UserDtoRolesEnum = typeof UserDtoRolesEnum[keyof typeof UserDtoRolesEnum]; /** * * @export * @interface UserDtoCreatedResponse */ export interface UserDtoCreatedResponse { /** * * @type {number} * @memberof UserDtoCreatedResponse */ 'statusCode': number; /** * * @type {UserDto} * @memberof UserDtoCreatedResponse */ 'data'?: UserDto; } /** * * @export * @interface UserDtoPaginatedResponse */ export interface UserDtoPaginatedResponse { /** * * @type {number} * @memberof UserDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof UserDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof UserDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface UserDtoResponse */ export interface UserDtoResponse { /** * * @type {number} * @memberof UserDtoResponse */ 'statusCode': number; /** * * @type {UserDto} * @memberof UserDtoResponse */ 'data'?: UserDto; } /** * * @export * @interface UserLightDto */ export interface UserLightDto { /** * * @type {string} * @memberof UserLightDto */ 'id': string; /** * * @type {string} * @memberof UserLightDto */ 'email': string; /** * * @type {string} * @memberof UserLightDto */ 'pictureUrl'?: string; /** * * @type {string} * @memberof UserLightDto */ 'firstname': string; /** * * @type {string} * @memberof UserLightDto */ 'lastname': string; /** * Status of the connector integration True if the user has connected his connector (Slack, Google Chat, Teams, etc.) False if the user has not connected or has disconnected his connector * @type {boolean} * @memberof UserLightDto */ 'isConnectorActive'?: boolean; } /** * * @export * @interface UserQuestionPushed */ export interface UserQuestionPushed { /** * * @type {string} * @memberof UserQuestionPushed */ 'id': string; /** * * @type {string} * @memberof UserQuestionPushed */ 'createdBy': string; /** * * @type {string} * @memberof UserQuestionPushed */ 'createdAt': string; /** * * @type {string} * @memberof UserQuestionPushed */ 'updatedAt': string; /** * * @type {string} * @memberof UserQuestionPushed */ 'deletedAt': string; /** * * @type {string} * @memberof UserQuestionPushed */ 'questionId': string; /** * * @type {Question} * @memberof UserQuestionPushed */ 'question': Question; } /** * * @export * @interface UserStatsDto */ export interface UserStatsDto { /** * This field is deprecated * @type {string} * @memberof UserStatsDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof UserStatsDto * @deprecated */ 'label': string; /** * The start of period for which the stats are calculated. * @type {string} * @memberof UserStatsDto */ 'from': string; /** * The end of the period for which the stats are calculated. * @type {string} * @memberof UserStatsDto */ 'to': string; /** * * @type {string} * @memberof UserStatsDto * @deprecated */ 'createdAt': string; /** * * @type {string} * @memberof UserStatsDto * @deprecated */ 'teamId': string; /** * * @type {UserDto} * @memberof UserStatsDto */ 'user': UserDto; /** * The stats for each tag within the user stats. * @type {Array} * @memberof UserStatsDto */ 'tags': Array; /** * The number of days the user has been active. * @type {number} * @memberof UserStatsDto */ 'nbDays': number; /** * Indicates if the user responds regularly to the questions. Regularly means that the user has sent at least 6 responses per week. (by default) Or it\'s calculated with the `respondsRegularlyThreshold` query param and the number of guesses per day. * @type {boolean} * @memberof UserStatsDto */ 'respondsRegularly': boolean; /** * The number of comments sent by the user. * @type {number} * @memberof UserStatsDto */ 'commentsCount': number; /** * The number of questions submitted by the user. * @type {number} * @memberof UserStatsDto */ 'questionsSubmittedCount': number; /** * The number of contributions the user has made. This is calculated by adding the number of comments and the number of questions submitted. * @type {number} * @memberof UserStatsDto */ 'contributions': number; /** * The total number of guesses sent by the user per day. This is calculated by dividing the total number of guesses by the number of days the user has been active. * @type {number} * @memberof UserStatsDto */ 'totalGuessesCountPerDay': number; /** * the total number of questions pushed to the user. * @type {number} * @memberof UserStatsDto */ 'questionsPushedCount'?: number; /** * The rank of the user within the company. * @type {number} * @memberof UserStatsDto */ 'companyRank'?: number; /** * The rank of the user within the team. * @type {number} * @memberof UserStatsDto */ 'teamRank'?: number; /** * The total number of guesses sent by the user. * @type {number} * @memberof UserStatsDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof UserStatsDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof UserStatsDto */ 'score'?: number; } /** * * @export * @interface UserStatsDtoPaginatedResponse */ export interface UserStatsDtoPaginatedResponse { /** * * @type {number} * @memberof UserStatsDtoPaginatedResponse */ 'statusCode': number; /** * * @type {Array} * @memberof UserStatsDtoPaginatedResponse */ 'data'?: Array; /** * * @type {AltoBaseResponsePaginatedMetaDto} * @memberof UserStatsDtoPaginatedResponse */ 'meta': AltoBaseResponsePaginatedMetaDto; } /** * * @export * @interface UserStatsTagDto */ export interface UserStatsTagDto { /** * This field is deprecated * @type {string} * @memberof UserStatsTagDto * @deprecated */ 'id': string; /** * This field is deprecated * @type {string} * @memberof UserStatsTagDto * @deprecated */ 'label': string; /** * * @type {TagLightDto} * @memberof UserStatsTagDto */ 'tag': TagLightDto; /** * The total number of guesses sent by the user. * @type {number} * @memberof UserStatsTagDto */ 'totalGuessesCount'?: number; /** * The number of guesses sent by the user that are valid. * @type {number} * @memberof UserStatsTagDto */ 'validGuessesCount'?: number; /** * The \"score\" of the user. (number of valid guesses / total number of guesses) * @type {number} * @memberof UserStatsTagDto */ 'score'?: number; } /** * * @export * @enum {string} */ export const WeekDayEnum = { Monday: 'Monday', Tuesday: 'Tuesday', Wednesday: 'Wednesday', Thursday: 'Thursday', Friday: 'Friday' } as const; export type WeekDayEnum = typeof WeekDayEnum[keyof typeof WeekDayEnum]; /** * AdminApi - axios parameter creator * @export */ export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles GET requests to the \'/admins/companies\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated companies along with the current state of pagination. * @summary Admin Route to get all Companies (not tenanted) with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [domains] * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adminGetCompanies: async (createdBy?: string, sortBy?: string, ids?: string, domains?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/admin/companies`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (domains !== undefined) { localVarQueryParameter['domains'] = domains; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Admin Route to get all Users (not tenanted) with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {string} [companyIds] Filter by companies If companies is provided, we only want to return users that are part of the companies If email is not provided, we return all users * @param {string} [theOfficeCompanyId] * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adminGetUsers: async (createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, companyIds?: string, theOfficeCompanyId?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/admin/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (emails !== undefined) { localVarQueryParameter['emails'] = emails; } if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (theOfficeCompanyId !== undefined) { localVarQueryParameter['theOfficeCompanyId'] = theOfficeCompanyId; } if (isCompanyAdmin !== undefined) { localVarQueryParameter['isCompanyAdmin'] = isCompanyAdmin; } if (isActive !== undefined) { localVarQueryParameter['isActive'] = isActive; } if (includeSoftDeleted !== undefined) { localVarQueryParameter['includeSoftDeleted'] = includeSoftDeleted; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users/:theOfficeCompanyId\' route to get the users for TheOffice. * @summary Get users from the office company id * @param {string} theOfficeCompanyId * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsersFromTheOfficeCompanyId: async (theOfficeCompanyId: string, createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'theOfficeCompanyId' is not null or undefined assertParamExists('getUsersFromTheOfficeCompanyId', 'theOfficeCompanyId', theOfficeCompanyId) const localVarPath = `/v1/admin/theOfficeCompanyId/{theOfficeCompanyId}` .replace(`{${"theOfficeCompanyId"}}`, encodeURIComponent(String(theOfficeCompanyId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (emails !== undefined) { localVarQueryParameter['emails'] = emails; } if (isCompanyAdmin !== undefined) { localVarQueryParameter['isCompanyAdmin'] = isCompanyAdmin; } if (isActive !== undefined) { localVarQueryParameter['isActive'] = isActive; } if (includeSoftDeleted !== undefined) { localVarQueryParameter['includeSoftDeleted'] = includeSoftDeleted; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AdminApi - functional programming interface * @export */ export const AdminApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) return { /** * This method handles GET requests to the \'/admins/companies\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated companies along with the current state of pagination. * @summary Admin Route to get all Companies (not tenanted) with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [domains] * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async adminGetCompanies(createdBy?: string, sortBy?: string, ids?: string, domains?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetCompanies(createdBy, sortBy, ids, domains, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Admin Route to get all Users (not tenanted) with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {string} [companyIds] Filter by companies If companies is provided, we only want to return users that are part of the companies If email is not provided, we return all users * @param {string} [theOfficeCompanyId] * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async adminGetUsers(createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, companyIds?: string, theOfficeCompanyId?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.adminGetUsers(createdBy, sortBy, ids, teamIds, emails, companyIds, theOfficeCompanyId, isCompanyAdmin, isActive, includeSoftDeleted, search, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users/:theOfficeCompanyId\' route to get the users for TheOffice. * @summary Get users from the office company id * @param {string} theOfficeCompanyId * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getUsersFromTheOfficeCompanyId(theOfficeCompanyId: string, createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUsersFromTheOfficeCompanyId(theOfficeCompanyId, createdBy, sortBy, ids, teamIds, emails, isCompanyAdmin, isActive, includeSoftDeleted, search, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * AdminApi - factory interface * @export */ export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AdminApiFp(configuration) return { /** * This method handles GET requests to the \'/admins/companies\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated companies along with the current state of pagination. * @summary Admin Route to get all Companies (not tenanted) with filter, sort and pagination options * @param {AdminApiAdminGetCompaniesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adminGetCompanies(requestParameters: AdminApiAdminGetCompaniesRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.adminGetCompanies(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.domains, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Admin Route to get all Users (not tenanted) with filter, sort and pagination options * @param {AdminApiAdminGetUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ adminGetUsers(requestParameters: AdminApiAdminGetUsersRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.adminGetUsers(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.companyIds, requestParameters.theOfficeCompanyId, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users/:theOfficeCompanyId\' route to get the users for TheOffice. * @summary Get users from the office company id * @param {AdminApiGetUsersFromTheOfficeCompanyIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsersFromTheOfficeCompanyId(requestParameters: AdminApiGetUsersFromTheOfficeCompanyIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getUsersFromTheOfficeCompanyId(requestParameters.theOfficeCompanyId, requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for adminGetCompanies operation in AdminApi. * @export * @interface AdminApiAdminGetCompaniesRequest */ export interface AdminApiAdminGetCompaniesRequest { /** * * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly 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 * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly ids?: string /** * * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly domains?: 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. * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof AdminApiAdminGetCompanies */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof AdminApiAdminGetCompanies */ readonly 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. * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof AdminApiAdminGetCompanies */ readonly createdBefore?: string } /** * Request parameters for adminGetUsers operation in AdminApi. * @export * @interface AdminApiAdminGetUsersRequest */ export interface AdminApiAdminGetUsersRequest { /** * * @type {string} * @memberof AdminApiAdminGetUsers */ readonly 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 * @type {string} * @memberof AdminApiAdminGetUsers */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof AdminApiAdminGetUsers */ readonly ids?: string /** * An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @type {string} * @memberof AdminApiAdminGetUsers */ readonly teamIds?: string /** * Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @type {string} * @memberof AdminApiAdminGetUsers */ readonly emails?: string /** * Filter by companies If companies is provided, we only want to return users that are part of the companies If email is not provided, we return all users * @type {string} * @memberof AdminApiAdminGetUsers */ readonly companyIds?: string /** * * @type {string} * @memberof AdminApiAdminGetUsers */ readonly theOfficeCompanyId?: string /** * Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @type {boolean} * @memberof AdminApiAdminGetUsers */ readonly isCompanyAdmin?: boolean /** * Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @type {boolean} * @memberof AdminApiAdminGetUsers */ readonly isActive?: boolean /** * Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @type {boolean} * @memberof AdminApiAdminGetUsers */ readonly includeSoftDeleted?: boolean /** * Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @type {string} * @memberof AdminApiAdminGetUsers */ readonly 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. * @type {string} * @memberof AdminApiAdminGetUsers */ readonly 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. * @type {string} * @memberof AdminApiAdminGetUsers */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof AdminApiAdminGetUsers */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof AdminApiAdminGetUsers */ readonly 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. * @type {string} * @memberof AdminApiAdminGetUsers */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof AdminApiAdminGetUsers */ readonly createdBefore?: string } /** * Request parameters for getUsersFromTheOfficeCompanyId operation in AdminApi. * @export * @interface AdminApiGetUsersFromTheOfficeCompanyIdRequest */ export interface AdminApiGetUsersFromTheOfficeCompanyIdRequest { /** * * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly theOfficeCompanyId: string /** * * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly 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 * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly ids?: string /** * An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly teamIds?: string /** * Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly emails?: string /** * Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @type {boolean} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly isCompanyAdmin?: boolean /** * Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @type {boolean} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly isActive?: boolean /** * Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @type {boolean} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly includeSoftDeleted?: boolean /** * Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly 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. * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly 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. * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly 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. * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof AdminApiGetUsersFromTheOfficeCompanyId */ readonly createdBefore?: string } /** * AdminApi - object-oriented interface * @export * @class AdminApi * @extends {BaseAPI} */ export class AdminApi extends BaseAPI { /** * This method handles GET requests to the \'/admins/companies\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated companies along with the current state of pagination. * @summary Admin Route to get all Companies (not tenanted) with filter, sort and pagination options * @param {AdminApiAdminGetCompaniesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public adminGetCompanies(requestParameters: AdminApiAdminGetCompaniesRequest = {}, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).adminGetCompanies(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.domains, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Admin Route to get all Users (not tenanted) with filter, sort and pagination options * @param {AdminApiAdminGetUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public adminGetUsers(requestParameters: AdminApiAdminGetUsersRequest = {}, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).adminGetUsers(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.companyIds, requestParameters.theOfficeCompanyId, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users/:theOfficeCompanyId\' route to get the users for TheOffice. * @summary Get users from the office company id * @param {AdminApiGetUsersFromTheOfficeCompanyIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AdminApi */ public getUsersFromTheOfficeCompanyId(requestParameters: AdminApiGetUsersFromTheOfficeCompanyIdRequest, options?: AxiosRequestConfig) { return AdminApiFp(this.configuration).getUsersFromTheOfficeCompanyId(requestParameters.theOfficeCompanyId, requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } } /** * CoachsApi - axios parameter creator * @export */ export const CoachsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/coachs\' route to create a new coach using the data passed in the body. It will respond with the newly created coach. * @summary Create a new coach * @param {CreateCoachDto} createCoachDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCoach: async (createCoachDto: CreateCoachDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createCoachDto' is not null or undefined assertParamExists('createCoach', 'createCoachDto', createCoachDto) const localVarPath = `/v1/coachs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCoachDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/coachs/:id\' route, it \"softDelete\" a single coach 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... * @summary Soft delete\" an existing coach by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCoach: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteCoach', 'id', id) const localVarPath = `/v1/coachs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/coachs/{:id}\' route with `{:id}` the id of the coach we want to find. If the coach exists it will return it, if not we respond with an error not found. * @summary Get a single coach by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCoachById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCoachById', 'id', id) const localVarPath = `/v1/coachs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/coachs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated coachs along with the current state of pagination . * @summary Get Coachs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCoachs: async (createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/coachs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/coachs/:id\' route where :id is a coach ID, it updates a single coach with the ID :id and return it. If the coach with ID does not exists we return an error. * @summary Patch an existing coach by ID * @param {string} id * @param {PatchCoachDto} patchCoachDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCoach: async (id: string, patchCoachDto: PatchCoachDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchCoach', 'id', id) // verify required parameter 'patchCoachDto' is not null or undefined assertParamExists('patchCoach', 'patchCoachDto', patchCoachDto) const localVarPath = `/v1/coachs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchCoachDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CoachsApi - functional programming interface * @export */ export const CoachsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CoachsApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/coachs\' route to create a new coach using the data passed in the body. It will respond with the newly created coach. * @summary Create a new coach * @param {CreateCoachDto} createCoachDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createCoach(createCoachDto: CreateCoachDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createCoach(createCoachDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/coachs/:id\' route, it \"softDelete\" a single coach 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... * @summary Soft delete\" an existing coach by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteCoach(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCoach(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/coachs/{:id}\' route with `{:id}` the id of the coach we want to find. If the coach exists it will return it, if not we respond with an error not found. * @summary Get a single coach by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCoachById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCoachById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/coachs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated coachs along with the current state of pagination . * @summary Get Coachs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCoachs(createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCoachs(createdBy, sortBy, ids, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/coachs/:id\' route where :id is a coach ID, it updates a single coach with the ID :id and return it. If the coach with ID does not exists we return an error. * @summary Patch an existing coach by ID * @param {string} id * @param {PatchCoachDto} patchCoachDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchCoach(id: string, patchCoachDto: PatchCoachDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchCoach(id, patchCoachDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * CoachsApi - factory interface * @export */ export const CoachsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CoachsApiFp(configuration) return { /** * This method handles POST requests to the \'/coachs\' route to create a new coach using the data passed in the body. It will respond with the newly created coach. * @summary Create a new coach * @param {CoachsApiCreateCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createCoach(requestParameters: CoachsApiCreateCoachRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createCoach(requestParameters.createCoachDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/coachs/:id\' route, it \"softDelete\" a single coach 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... * @summary Soft delete\" an existing coach by ID * @param {CoachsApiDeleteCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteCoach(requestParameters: CoachsApiDeleteCoachRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteCoach(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/coachs/{:id}\' route with `{:id}` the id of the coach we want to find. If the coach exists it will return it, if not we respond with an error not found. * @summary Get a single coach by ID * @param {CoachsApiGetCoachByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCoachById(requestParameters: CoachsApiGetCoachByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getCoachById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/coachs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated coachs along with the current state of pagination . * @summary Get Coachs with filter, sort and pagination options * @param {CoachsApiGetCoachsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCoachs(requestParameters: CoachsApiGetCoachsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getCoachs(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/coachs/:id\' route where :id is a coach ID, it updates a single coach with the ID :id and return it. If the coach with ID does not exists we return an error. * @summary Patch an existing coach by ID * @param {CoachsApiPatchCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCoach(requestParameters: CoachsApiPatchCoachRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchCoach(requestParameters.id, requestParameters.patchCoachDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createCoach operation in CoachsApi. * @export * @interface CoachsApiCreateCoachRequest */ export interface CoachsApiCreateCoachRequest { /** * * @type {CreateCoachDto} * @memberof CoachsApiCreateCoach */ readonly createCoachDto: CreateCoachDto /** * 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. * @type {string} * @memberof CoachsApiCreateCoach */ readonly 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. * @type {string} * @memberof CoachsApiCreateCoach */ readonly userId?: string } /** * Request parameters for deleteCoach operation in CoachsApi. * @export * @interface CoachsApiDeleteCoachRequest */ export interface CoachsApiDeleteCoachRequest { /** * * @type {string} * @memberof CoachsApiDeleteCoach */ readonly 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. * @type {string} * @memberof CoachsApiDeleteCoach */ readonly 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. * @type {string} * @memberof CoachsApiDeleteCoach */ readonly userId?: string } /** * Request parameters for getCoachById operation in CoachsApi. * @export * @interface CoachsApiGetCoachByIdRequest */ export interface CoachsApiGetCoachByIdRequest { /** * * @type {string} * @memberof CoachsApiGetCoachById */ readonly 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. * @type {string} * @memberof CoachsApiGetCoachById */ readonly 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. * @type {string} * @memberof CoachsApiGetCoachById */ readonly userId?: string } /** * Request parameters for getCoachs operation in CoachsApi. * @export * @interface CoachsApiGetCoachsRequest */ export interface CoachsApiGetCoachsRequest { /** * * @type {string} * @memberof CoachsApiGetCoachs */ readonly 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 * @type {string} * @memberof CoachsApiGetCoachs */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof CoachsApiGetCoachs */ readonly ids?: 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. * @type {string} * @memberof CoachsApiGetCoachs */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof CoachsApiGetCoachs */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof CoachsApiGetCoachs */ readonly 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. * @type {string} * @memberof CoachsApiGetCoachs */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof CoachsApiGetCoachs */ readonly createdBefore?: string } /** * Request parameters for patchCoach operation in CoachsApi. * @export * @interface CoachsApiPatchCoachRequest */ export interface CoachsApiPatchCoachRequest { /** * * @type {string} * @memberof CoachsApiPatchCoach */ readonly id: string /** * * @type {PatchCoachDto} * @memberof CoachsApiPatchCoach */ readonly patchCoachDto: PatchCoachDto /** * 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. * @type {string} * @memberof CoachsApiPatchCoach */ readonly 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. * @type {string} * @memberof CoachsApiPatchCoach */ readonly userId?: string } /** * CoachsApi - object-oriented interface * @export * @class CoachsApi * @extends {BaseAPI} */ export class CoachsApi extends BaseAPI { /** * This method handles POST requests to the \'/coachs\' route to create a new coach using the data passed in the body. It will respond with the newly created coach. * @summary Create a new coach * @param {CoachsApiCreateCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoachsApi */ public createCoach(requestParameters: CoachsApiCreateCoachRequest, options?: AxiosRequestConfig) { return CoachsApiFp(this.configuration).createCoach(requestParameters.createCoachDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/coachs/:id\' route, it \"softDelete\" a single coach 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... * @summary Soft delete\" an existing coach by ID * @param {CoachsApiDeleteCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoachsApi */ public deleteCoach(requestParameters: CoachsApiDeleteCoachRequest, options?: AxiosRequestConfig) { return CoachsApiFp(this.configuration).deleteCoach(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/coachs/{:id}\' route with `{:id}` the id of the coach we want to find. If the coach exists it will return it, if not we respond with an error not found. * @summary Get a single coach by ID * @param {CoachsApiGetCoachByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoachsApi */ public getCoachById(requestParameters: CoachsApiGetCoachByIdRequest, options?: AxiosRequestConfig) { return CoachsApiFp(this.configuration).getCoachById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/coachs\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated coachs along with the current state of pagination . * @summary Get Coachs with filter, sort and pagination options * @param {CoachsApiGetCoachsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoachsApi */ public getCoachs(requestParameters: CoachsApiGetCoachsRequest = {}, options?: AxiosRequestConfig) { return CoachsApiFp(this.configuration).getCoachs(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/coachs/:id\' route where :id is a coach ID, it updates a single coach with the ID :id and return it. If the coach with ID does not exists we return an error. * @summary Patch an existing coach by ID * @param {CoachsApiPatchCoachRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CoachsApi */ public patchCoach(requestParameters: CoachsApiPatchCoachRequest, options?: AxiosRequestConfig) { return CoachsApiFp(this.configuration).patchCoach(requestParameters.id, requestParameters.patchCoachDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * CommentsApi - axios parameter creator * @export */ export const CommentsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/comments\' route to create a new comment using the data passed in the body. It will respond with the newly created comment. * @summary Create a new comment * @param {CreateCommentDto} createCommentDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createComment: async (createCommentDto: CreateCommentDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createCommentDto' is not null or undefined assertParamExists('createComment', 'createCommentDto', createCommentDto) const localVarPath = `/v1/comments`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createCommentDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/comments/:id\' route, it \"softDelete\" a single comment 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... * @summary \"Soft delete\" an existing comment by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteComment: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteComment', 'id', id) const localVarPath = `/v1/comments/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/comments/{:id}\' route with `{:id}` the id of the comment we want to find. If the comment exists it will return it, if not we respond with an error not found. * @summary Get a single comment by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommentById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCommentById', 'id', id) const localVarPath = `/v1/comments/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/comments\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated comments along with the current state of pagination . * @summary Get comments with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [questionId] * @param {boolean} [isRead] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getComments: async (createdBy?: string, sortBy?: string, ids?: string, questionId?: string, isRead?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/comments`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (questionId !== undefined) { localVarQueryParameter['questionId'] = questionId; } if (isRead !== undefined) { localVarQueryParameter['isRead'] = isRead; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/comments/:id\' route where :id is a comment ID, it updates a single comment with the ID :id and return it. If the comment with ID does not exists we return an error. * @summary Patch an existing comment by ID * @param {string} id * @param {PatchCommentDto} patchCommentDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchComment: async (id: string, patchCommentDto: PatchCommentDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchComment', 'id', id) // verify required parameter 'patchCommentDto' is not null or undefined assertParamExists('patchComment', 'patchCommentDto', patchCommentDto) const localVarPath = `/v1/comments/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchCommentDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CommentsApi - functional programming interface * @export */ export const CommentsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CommentsApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/comments\' route to create a new comment using the data passed in the body. It will respond with the newly created comment. * @summary Create a new comment * @param {CreateCommentDto} createCommentDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createComment(createCommentDto: CreateCommentDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createComment(createCommentDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/comments/:id\' route, it \"softDelete\" a single comment 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... * @summary \"Soft delete\" an existing comment by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteComment(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteComment(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/comments/{:id}\' route with `{:id}` the id of the comment we want to find. If the comment exists it will return it, if not we respond with an error not found. * @summary Get a single comment by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCommentById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCommentById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/comments\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated comments along with the current state of pagination . * @summary Get comments with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [questionId] * @param {boolean} [isRead] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getComments(createdBy?: string, sortBy?: string, ids?: string, questionId?: string, isRead?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getComments(createdBy, sortBy, ids, questionId, isRead, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/comments/:id\' route where :id is a comment ID, it updates a single comment with the ID :id and return it. If the comment with ID does not exists we return an error. * @summary Patch an existing comment by ID * @param {string} id * @param {PatchCommentDto} patchCommentDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchComment(id: string, patchCommentDto: PatchCommentDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchComment(id, patchCommentDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * CommentsApi - factory interface * @export */ export const CommentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CommentsApiFp(configuration) return { /** * This method handles POST requests to the \'/comments\' route to create a new comment using the data passed in the body. It will respond with the newly created comment. * @summary Create a new comment * @param {CommentsApiCreateCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createComment(requestParameters: CommentsApiCreateCommentRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createComment(requestParameters.createCommentDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/comments/:id\' route, it \"softDelete\" a single comment 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... * @summary \"Soft delete\" an existing comment by ID * @param {CommentsApiDeleteCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteComment(requestParameters: CommentsApiDeleteCommentRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteComment(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/comments/{:id}\' route with `{:id}` the id of the comment we want to find. If the comment exists it will return it, if not we respond with an error not found. * @summary Get a single comment by ID * @param {CommentsApiGetCommentByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommentById(requestParameters: CommentsApiGetCommentByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getCommentById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/comments\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated comments along with the current state of pagination . * @summary Get comments with filter, sort and pagination options * @param {CommentsApiGetCommentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getComments(requestParameters: CommentsApiGetCommentsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getComments(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.questionId, requestParameters.isRead, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/comments/:id\' route where :id is a comment ID, it updates a single comment with the ID :id and return it. If the comment with ID does not exists we return an error. * @summary Patch an existing comment by ID * @param {CommentsApiPatchCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchComment(requestParameters: CommentsApiPatchCommentRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchComment(requestParameters.id, requestParameters.patchCommentDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createComment operation in CommentsApi. * @export * @interface CommentsApiCreateCommentRequest */ export interface CommentsApiCreateCommentRequest { /** * * @type {CreateCommentDto} * @memberof CommentsApiCreateComment */ readonly createCommentDto: CreateCommentDto /** * 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. * @type {string} * @memberof CommentsApiCreateComment */ readonly 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. * @type {string} * @memberof CommentsApiCreateComment */ readonly userId?: string } /** * Request parameters for deleteComment operation in CommentsApi. * @export * @interface CommentsApiDeleteCommentRequest */ export interface CommentsApiDeleteCommentRequest { /** * * @type {string} * @memberof CommentsApiDeleteComment */ readonly 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. * @type {string} * @memberof CommentsApiDeleteComment */ readonly 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. * @type {string} * @memberof CommentsApiDeleteComment */ readonly userId?: string } /** * Request parameters for getCommentById operation in CommentsApi. * @export * @interface CommentsApiGetCommentByIdRequest */ export interface CommentsApiGetCommentByIdRequest { /** * * @type {string} * @memberof CommentsApiGetCommentById */ readonly 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. * @type {string} * @memberof CommentsApiGetCommentById */ readonly 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. * @type {string} * @memberof CommentsApiGetCommentById */ readonly userId?: string } /** * Request parameters for getComments operation in CommentsApi. * @export * @interface CommentsApiGetCommentsRequest */ export interface CommentsApiGetCommentsRequest { /** * * @type {string} * @memberof CommentsApiGetComments */ readonly 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 * @type {string} * @memberof CommentsApiGetComments */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof CommentsApiGetComments */ readonly ids?: string /** * * @type {string} * @memberof CommentsApiGetComments */ readonly questionId?: string /** * * @type {boolean} * @memberof CommentsApiGetComments */ readonly isRead?: 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. * @type {string} * @memberof CommentsApiGetComments */ readonly 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. * @type {string} * @memberof CommentsApiGetComments */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof CommentsApiGetComments */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof CommentsApiGetComments */ readonly 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. * @type {string} * @memberof CommentsApiGetComments */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof CommentsApiGetComments */ readonly createdBefore?: string } /** * Request parameters for patchComment operation in CommentsApi. * @export * @interface CommentsApiPatchCommentRequest */ export interface CommentsApiPatchCommentRequest { /** * * @type {string} * @memberof CommentsApiPatchComment */ readonly id: string /** * * @type {PatchCommentDto} * @memberof CommentsApiPatchComment */ readonly patchCommentDto: PatchCommentDto /** * 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. * @type {string} * @memberof CommentsApiPatchComment */ readonly 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. * @type {string} * @memberof CommentsApiPatchComment */ readonly userId?: string } /** * CommentsApi - object-oriented interface * @export * @class CommentsApi * @extends {BaseAPI} */ export class CommentsApi extends BaseAPI { /** * This method handles POST requests to the \'/comments\' route to create a new comment using the data passed in the body. It will respond with the newly created comment. * @summary Create a new comment * @param {CommentsApiCreateCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommentsApi */ public createComment(requestParameters: CommentsApiCreateCommentRequest, options?: AxiosRequestConfig) { return CommentsApiFp(this.configuration).createComment(requestParameters.createCommentDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/comments/:id\' route, it \"softDelete\" a single comment 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... * @summary \"Soft delete\" an existing comment by ID * @param {CommentsApiDeleteCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommentsApi */ public deleteComment(requestParameters: CommentsApiDeleteCommentRequest, options?: AxiosRequestConfig) { return CommentsApiFp(this.configuration).deleteComment(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/comments/{:id}\' route with `{:id}` the id of the comment we want to find. If the comment exists it will return it, if not we respond with an error not found. * @summary Get a single comment by ID * @param {CommentsApiGetCommentByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommentsApi */ public getCommentById(requestParameters: CommentsApiGetCommentByIdRequest, options?: AxiosRequestConfig) { return CommentsApiFp(this.configuration).getCommentById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/comments\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated comments along with the current state of pagination . * @summary Get comments with filter, sort and pagination options * @param {CommentsApiGetCommentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommentsApi */ public getComments(requestParameters: CommentsApiGetCommentsRequest = {}, options?: AxiosRequestConfig) { return CommentsApiFp(this.configuration).getComments(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.questionId, requestParameters.isRead, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/comments/:id\' route where :id is a comment ID, it updates a single comment with the ID :id and return it. If the comment with ID does not exists we return an error. * @summary Patch an existing comment by ID * @param {CommentsApiPatchCommentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommentsApi */ public patchComment(requestParameters: CommentsApiPatchCommentRequest, options?: AxiosRequestConfig) { return CommentsApiFp(this.configuration).patchComment(requestParameters.id, requestParameters.patchCommentDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * CompaniesApi - axios parameter creator * @export */ export const CompaniesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles GET requests to the \'/companies/{:id}\' route with `{:id}` the id of the company we want to find. If the company exists it will return it, if not we respond with an error not found. This route is tenanted this mean we have to add companyId to the query params. Every call to this method will first get the company from TheOffice and then update it in the database if necessary to finally return it. * @summary Get a single company by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompanyById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCompanyById', 'id', id) const localVarPath = `/v1/companies/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/companies/:id\' route where :id is a company ID, it updates a single company with the ID :id and return it. If the company with ID does not exists we return an error. On every update we will also update the company in TheOffice. * @summary Patch an existing company by ID * @param {string} id * @param {PatchCompanyDto} patchCompanyDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCompany: async (id: string, patchCompanyDto: PatchCompanyDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchCompany', 'id', id) // verify required parameter 'patchCompanyDto' is not null or undefined assertParamExists('patchCompany', 'patchCompanyDto', patchCompanyDto) const localVarPath = `/v1/companies/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchCompanyDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CompaniesApi - functional programming interface * @export */ export const CompaniesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CompaniesApiAxiosParamCreator(configuration) return { /** * This method handles GET requests to the \'/companies/{:id}\' route with `{:id}` the id of the company we want to find. If the company exists it will return it, if not we respond with an error not found. This route is tenanted this mean we have to add companyId to the query params. Every call to this method will first get the company from TheOffice and then update it in the database if necessary to finally return it. * @summary Get a single company by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCompanyById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCompanyById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/companies/:id\' route where :id is a company ID, it updates a single company with the ID :id and return it. If the company with ID does not exists we return an error. On every update we will also update the company in TheOffice. * @summary Patch an existing company by ID * @param {string} id * @param {PatchCompanyDto} patchCompanyDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchCompany(id: string, patchCompanyDto: PatchCompanyDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchCompany(id, patchCompanyDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * CompaniesApi - factory interface * @export */ export const CompaniesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CompaniesApiFp(configuration) return { /** * This method handles GET requests to the \'/companies/{:id}\' route with `{:id}` the id of the company we want to find. If the company exists it will return it, if not we respond with an error not found. This route is tenanted this mean we have to add companyId to the query params. Every call to this method will first get the company from TheOffice and then update it in the database if necessary to finally return it. * @summary Get a single company by ID * @param {CompaniesApiGetCompanyByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompanyById(requestParameters: CompaniesApiGetCompanyByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getCompanyById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/companies/:id\' route where :id is a company ID, it updates a single company with the ID :id and return it. If the company with ID does not exists we return an error. On every update we will also update the company in TheOffice. * @summary Patch an existing company by ID * @param {CompaniesApiPatchCompanyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCompany(requestParameters: CompaniesApiPatchCompanyRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchCompany(requestParameters.id, requestParameters.patchCompanyDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getCompanyById operation in CompaniesApi. * @export * @interface CompaniesApiGetCompanyByIdRequest */ export interface CompaniesApiGetCompanyByIdRequest { /** * * @type {string} * @memberof CompaniesApiGetCompanyById */ readonly 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. * @type {string} * @memberof CompaniesApiGetCompanyById */ readonly 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. * @type {string} * @memberof CompaniesApiGetCompanyById */ readonly userId?: string } /** * Request parameters for patchCompany operation in CompaniesApi. * @export * @interface CompaniesApiPatchCompanyRequest */ export interface CompaniesApiPatchCompanyRequest { /** * * @type {string} * @memberof CompaniesApiPatchCompany */ readonly id: string /** * * @type {PatchCompanyDto} * @memberof CompaniesApiPatchCompany */ readonly patchCompanyDto: PatchCompanyDto /** * 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. * @type {string} * @memberof CompaniesApiPatchCompany */ readonly 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. * @type {string} * @memberof CompaniesApiPatchCompany */ readonly userId?: string } /** * CompaniesApi - object-oriented interface * @export * @class CompaniesApi * @extends {BaseAPI} */ export class CompaniesApi extends BaseAPI { /** * This method handles GET requests to the \'/companies/{:id}\' route with `{:id}` the id of the company we want to find. If the company exists it will return it, if not we respond with an error not found. This route is tenanted this mean we have to add companyId to the query params. Every call to this method will first get the company from TheOffice and then update it in the database if necessary to finally return it. * @summary Get a single company by ID * @param {CompaniesApiGetCompanyByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CompaniesApi */ public getCompanyById(requestParameters: CompaniesApiGetCompanyByIdRequest, options?: AxiosRequestConfig) { return CompaniesApiFp(this.configuration).getCompanyById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/companies/:id\' route where :id is a company ID, it updates a single company with the ID :id and return it. If the company with ID does not exists we return an error. On every update we will also update the company in TheOffice. * @summary Patch an existing company by ID * @param {CompaniesApiPatchCompanyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CompaniesApi */ public patchCompany(requestParameters: CompaniesApiPatchCompanyRequest, options?: AxiosRequestConfig) { return CompaniesApiFp(this.configuration).patchCompany(requestParameters.id, requestParameters.patchCompanyDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * ExportsApi - axios parameter creator * @export */ export const ExportsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportsControllerExportQuestions: async (companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/exports/questions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ExportsApi - functional programming interface * @export */ export const ExportsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ExportsApiAxiosParamCreator(configuration) return { /** * * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async exportsControllerExportQuestions(companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.exportsControllerExportQuestions(companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ExportsApi - factory interface * @export */ export const ExportsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ExportsApiFp(configuration) return { /** * * @param {ExportsApiExportsControllerExportQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportsControllerExportQuestions(requestParameters: ExportsApiExportsControllerExportQuestionsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.exportsControllerExportQuestions(requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for exportsControllerExportQuestions operation in ExportsApi. * @export * @interface ExportsApiExportsControllerExportQuestionsRequest */ export interface ExportsApiExportsControllerExportQuestionsRequest { /** * 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. * @type {string} * @memberof ExportsApiExportsControllerExportQuestions */ readonly 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. * @type {string} * @memberof ExportsApiExportsControllerExportQuestions */ readonly userId?: string } /** * ExportsApi - object-oriented interface * @export * @class ExportsApi * @extends {BaseAPI} */ export class ExportsApi extends BaseAPI { /** * * @param {ExportsApiExportsControllerExportQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExportsApi */ public exportsControllerExportQuestions(requestParameters: ExportsApiExportsControllerExportQuestionsRequest = {}, options?: AxiosRequestConfig) { return ExportsApiFp(this.configuration).exportsControllerExportQuestions(requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * GuessesApi - axios parameter creator * @export */ export const GuessesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/guesses\' route to create a new guess using the data passed in the body. It will respond with the newly created guess. If answers is not provided, the answer property will be used instead. if the answer property is also not provided, the answers will be empty in that case, the guess will be rejected if the isUnkownSelected property is not set to true All the answers from the accepted answers of the question need to be provided. if not, the guess will be invalid, the order does not matter. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] the guess will also be valid. * @summary Create a new guess run * @param {CreateGuessDto} createGuessDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createGuess: async (createGuessDto: CreateGuessDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createGuessDto' is not null or undefined assertParamExists('createGuess', 'createGuessDto', createGuessDto) const localVarPath = `/v1/guesses`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createGuessDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/guesses/{:id}\' route with `{:id}` the id of the guess we want to find. If the guess exists it will return it, if not we respond with an error not found. * @summary Get a single guess by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGuessById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getGuessById', 'id', id) const localVarPath = `/v1/guesses/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/guesses\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated guesses along with the current state of pagination . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programRunIds] 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> * @param {string} [questionIds] 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> * @param {string} [teamIds] * @param {boolean} [training] * @param {boolean} [isValid] * @param {boolean} [isTimedOut] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGuesses: async (createdBy?: string, sortBy?: string, ids?: string, programRunIds?: string, questionIds?: string, teamIds?: string, training?: boolean, isValid?: boolean, isTimedOut?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/guesses`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (programRunIds !== undefined) { localVarQueryParameter['programRunIds'] = programRunIds; } if (questionIds !== undefined) { localVarQueryParameter['questionIds'] = questionIds; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (training !== undefined) { localVarQueryParameter['training'] = training; } if (isValid !== undefined) { localVarQueryParameter['isValid'] = isValid; } if (isTimedOut !== undefined) { localVarQueryParameter['isTimedOut'] = isTimedOut; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * GuessesApi - functional programming interface * @export */ export const GuessesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = GuessesApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/guesses\' route to create a new guess using the data passed in the body. It will respond with the newly created guess. If answers is not provided, the answer property will be used instead. if the answer property is also not provided, the answers will be empty in that case, the guess will be rejected if the isUnkownSelected property is not set to true All the answers from the accepted answers of the question need to be provided. if not, the guess will be invalid, the order does not matter. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] the guess will also be valid. * @summary Create a new guess run * @param {CreateGuessDto} createGuessDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createGuess(createGuessDto: CreateGuessDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createGuess(createGuessDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/guesses/{:id}\' route with `{:id}` the id of the guess we want to find. If the guess exists it will return it, if not we respond with an error not found. * @summary Get a single guess by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getGuessById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getGuessById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/guesses\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated guesses along with the current state of pagination . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programRunIds] 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> * @param {string} [questionIds] 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> * @param {string} [teamIds] * @param {boolean} [training] * @param {boolean} [isValid] * @param {boolean} [isTimedOut] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getGuesses(createdBy?: string, sortBy?: string, ids?: string, programRunIds?: string, questionIds?: string, teamIds?: string, training?: boolean, isValid?: boolean, isTimedOut?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getGuesses(createdBy, sortBy, ids, programRunIds, questionIds, teamIds, training, isValid, isTimedOut, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * GuessesApi - factory interface * @export */ export const GuessesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = GuessesApiFp(configuration) return { /** * This method handles POST requests to the \'/guesses\' route to create a new guess using the data passed in the body. It will respond with the newly created guess. If answers is not provided, the answer property will be used instead. if the answer property is also not provided, the answers will be empty in that case, the guess will be rejected if the isUnkownSelected property is not set to true All the answers from the accepted answers of the question need to be provided. if not, the guess will be invalid, the order does not matter. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] the guess will also be valid. * @summary Create a new guess run * @param {GuessesApiCreateGuessRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createGuess(requestParameters: GuessesApiCreateGuessRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createGuess(requestParameters.createGuessDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/guesses/{:id}\' route with `{:id}` the id of the guess we want to find. If the guess exists it will return it, if not we respond with an error not found. * @summary Get a single guess by ID * @param {GuessesApiGetGuessByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGuessById(requestParameters: GuessesApiGetGuessByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getGuessById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/guesses\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated guesses along with the current state of pagination . * @summary Get Programs with filter, sort and pagination options * @param {GuessesApiGetGuessesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getGuesses(requestParameters: GuessesApiGetGuessesRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getGuesses(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programRunIds, requestParameters.questionIds, requestParameters.teamIds, requestParameters.training, requestParameters.isValid, requestParameters.isTimedOut, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createGuess operation in GuessesApi. * @export * @interface GuessesApiCreateGuessRequest */ export interface GuessesApiCreateGuessRequest { /** * * @type {CreateGuessDto} * @memberof GuessesApiCreateGuess */ readonly createGuessDto: CreateGuessDto /** * 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. * @type {string} * @memberof GuessesApiCreateGuess */ readonly 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. * @type {string} * @memberof GuessesApiCreateGuess */ readonly userId?: string } /** * Request parameters for getGuessById operation in GuessesApi. * @export * @interface GuessesApiGetGuessByIdRequest */ export interface GuessesApiGetGuessByIdRequest { /** * * @type {string} * @memberof GuessesApiGetGuessById */ readonly 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. * @type {string} * @memberof GuessesApiGetGuessById */ readonly 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. * @type {string} * @memberof GuessesApiGetGuessById */ readonly userId?: string } /** * Request parameters for getGuesses operation in GuessesApi. * @export * @interface GuessesApiGetGuessesRequest */ export interface GuessesApiGetGuessesRequest { /** * * @type {string} * @memberof GuessesApiGetGuesses */ readonly 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 * @type {string} * @memberof GuessesApiGetGuesses */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof GuessesApiGetGuesses */ readonly ids?: 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> * @type {string} * @memberof GuessesApiGetGuesses */ readonly programRunIds?: 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> * @type {string} * @memberof GuessesApiGetGuesses */ readonly questionIds?: string /** * * @type {string} * @memberof GuessesApiGetGuesses */ readonly teamIds?: string /** * * @type {boolean} * @memberof GuessesApiGetGuesses */ readonly training?: boolean /** * * @type {boolean} * @memberof GuessesApiGetGuesses */ readonly isValid?: boolean /** * * @type {boolean} * @memberof GuessesApiGetGuesses */ readonly isTimedOut?: 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. * @type {string} * @memberof GuessesApiGetGuesses */ readonly 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. * @type {string} * @memberof GuessesApiGetGuesses */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof GuessesApiGetGuesses */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof GuessesApiGetGuesses */ readonly 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. * @type {string} * @memberof GuessesApiGetGuesses */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof GuessesApiGetGuesses */ readonly createdBefore?: string } /** * GuessesApi - object-oriented interface * @export * @class GuessesApi * @extends {BaseAPI} */ export class GuessesApi extends BaseAPI { /** * This method handles POST requests to the \'/guesses\' route to create a new guess using the data passed in the body. It will respond with the newly created guess. If answers is not provided, the answer property will be used instead. if the answer property is also not provided, the answers will be empty in that case, the guess will be rejected if the isUnkownSelected property is not set to true All the answers from the accepted answers of the question need to be provided. if not, the guess will be invalid, the order does not matter. For example if the accepted answers are: [\'a\', \'b\', \'c\'] If the user provides: [\'a\', \'b\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\', \'d\'] the guess will be invalid. If the user provides: [\'a\', \'b\', \'c\'] the guess will be valid. If the user provides: [\'c\', \'b\', \'a\'] the guess will also be valid. * @summary Create a new guess run * @param {GuessesApiCreateGuessRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GuessesApi */ public createGuess(requestParameters: GuessesApiCreateGuessRequest, options?: AxiosRequestConfig) { return GuessesApiFp(this.configuration).createGuess(requestParameters.createGuessDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/guesses/{:id}\' route with `{:id}` the id of the guess we want to find. If the guess exists it will return it, if not we respond with an error not found. * @summary Get a single guess by ID * @param {GuessesApiGetGuessByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GuessesApi */ public getGuessById(requestParameters: GuessesApiGetGuessByIdRequest, options?: AxiosRequestConfig) { return GuessesApiFp(this.configuration).getGuessById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/guesses\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated guesses along with the current state of pagination . * @summary Get Programs with filter, sort and pagination options * @param {GuessesApiGetGuessesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof GuessesApi */ public getGuesses(requestParameters: GuessesApiGetGuessesRequest = {}, options?: AxiosRequestConfig) { return GuessesApiFp(this.configuration).getGuesses(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programRunIds, requestParameters.questionIds, requestParameters.teamIds, requestParameters.training, requestParameters.isValid, requestParameters.isTimedOut, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } } /** * ProgramRunsApi - axios parameter creator * @export */ export const ProgramRunsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * 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. * @summary Create a new program run * @param {CreateProgramRunDto} createProgramRunDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createProgramRun: async (createProgramRunDto: CreateProgramRunDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createProgramRunDto' is not null or undefined assertParamExists('createProgramRun', 'createProgramRunDto', createProgramRunDto) const localVarPath = `/v1/program-runs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createProgramRunDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} id * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programRunIds] 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> * @param {boolean} [isDone] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllProgramRunQuestionsPaginated: async (id: string, createdBy?: string, sortBy?: string, ids?: string, programRunIds?: string, isDone?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getAllProgramRunQuestionsPaginated', 'id', id) const localVarPath = `/v1/program-runs/{id}/questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (programRunIds !== undefined) { localVarQueryParameter['programRunIds'] = programRunIds; } if (isDone !== undefined) { localVarQueryParameter['isDone'] = isDone; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Get a single program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramRunById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getProgramRunById', 'id', id) const localVarPath = `/v1/program-runs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programIds] 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> * @param {string} [teamIds] * @param {string} [finishedAfter] A date used to filter the results based on the finishedAt field of the resources, only including resources finished after this date. the operator used for this filter is >= (greater than or equal to) If the finishedAfter field is provided with a date without a time, it will include resources finished 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. * @param {string} [finishedBefore] A date used to filter the results based on the finishedAt field of the resources, only including resources finished before this date. the operator used for this filter is <= (less than or equal to) If the finishedBefore field is provided with a date without a time, it will include resources finished 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. * @param {boolean} [isFinished] * @param {boolean} [isValid] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramRuns: async (createdBy?: string, sortBy?: string, ids?: string, programIds?: string, teamIds?: string, finishedAfter?: string, finishedBefore?: string, isFinished?: boolean, isValid?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/program-runs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (programIds !== undefined) { localVarQueryParameter['programIds'] = programIds; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (finishedAfter !== undefined) { localVarQueryParameter['finishedAfter'] = (finishedAfter as any instanceof Date) ? (finishedAfter as any).toISOString() : finishedAfter; } if (finishedBefore !== undefined) { localVarQueryParameter['finishedBefore'] = (finishedBefore as any instanceof Date) ? (finishedBefore as any).toISOString() : finishedBefore; } if (isFinished !== undefined) { localVarQueryParameter['isFinished'] = isFinished; } if (isValid !== undefined) { localVarQueryParameter['isValid'] = isValid; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ProgramRunsApi - functional programming interface * @export */ export const ProgramRunsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ProgramRunsApiAxiosParamCreator(configuration) return { /** * 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. * @summary Create a new program run * @param {CreateProgramRunDto} createProgramRunDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createProgramRun(createProgramRunDto: CreateProgramRunDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createProgramRun(createProgramRunDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} id * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programRunIds] 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> * @param {boolean} [isDone] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllProgramRunQuestionsPaginated(id: string, createdBy?: string, sortBy?: string, ids?: string, programRunIds?: string, isDone?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllProgramRunQuestionsPaginated(id, createdBy, sortBy, ids, programRunIds, isDone, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Get a single program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getProgramRunById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProgramRunById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programIds] 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> * @param {string} [teamIds] * @param {string} [finishedAfter] A date used to filter the results based on the finishedAt field of the resources, only including resources finished after this date. the operator used for this filter is >= (greater than or equal to) If the finishedAfter field is provided with a date without a time, it will include resources finished 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. * @param {string} [finishedBefore] A date used to filter the results based on the finishedAt field of the resources, only including resources finished before this date. the operator used for this filter is <= (less than or equal to) If the finishedBefore field is provided with a date without a time, it will include resources finished 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. * @param {boolean} [isFinished] * @param {boolean} [isValid] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getProgramRuns(createdBy?: string, sortBy?: string, ids?: string, programIds?: string, teamIds?: string, finishedAfter?: string, finishedBefore?: string, isFinished?: boolean, isValid?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProgramRuns(createdBy, sortBy, ids, programIds, teamIds, finishedAfter, finishedBefore, isFinished, isValid, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ProgramRunsApi - factory interface * @export */ export const ProgramRunsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ProgramRunsApiFp(configuration) return { /** * 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. * @summary Create a new program run * @param {ProgramRunsApiCreateProgramRunRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createProgramRun(requestParameters: ProgramRunsApiCreateProgramRunRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createProgramRun(requestParameters.createProgramRunDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllProgramRunQuestionsPaginated(requestParameters: ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getAllProgramRunQuestionsPaginated(requestParameters.id, requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programRunIds, requestParameters.isDone, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Get a single program by ID * @param {ProgramRunsApiGetProgramRunByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramRunById(requestParameters: ProgramRunsApiGetProgramRunByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getProgramRunById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramRunsApiGetProgramRunsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramRuns(requestParameters: ProgramRunsApiGetProgramRunsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getProgramRuns(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programIds, requestParameters.teamIds, requestParameters.finishedAfter, requestParameters.finishedBefore, requestParameters.isFinished, requestParameters.isValid, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createProgramRun operation in ProgramRunsApi. * @export * @interface ProgramRunsApiCreateProgramRunRequest */ export interface ProgramRunsApiCreateProgramRunRequest { /** * * @type {CreateProgramRunDto} * @memberof ProgramRunsApiCreateProgramRun */ readonly createProgramRunDto: CreateProgramRunDto /** * 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. * @type {string} * @memberof ProgramRunsApiCreateProgramRun */ readonly 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. * @type {string} * @memberof ProgramRunsApiCreateProgramRun */ readonly userId?: string } /** * Request parameters for getAllProgramRunQuestionsPaginated operation in ProgramRunsApi. * @export * @interface ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest */ export interface ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest { /** * * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly id: string /** * * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly 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 * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly ids?: 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> * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly programRunIds?: string /** * * @type {boolean} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly isDone?: 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. * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof ProgramRunsApiGetAllProgramRunQuestionsPaginated */ readonly createdBefore?: string } /** * Request parameters for getProgramRunById operation in ProgramRunsApi. * @export * @interface ProgramRunsApiGetProgramRunByIdRequest */ export interface ProgramRunsApiGetProgramRunByIdRequest { /** * * @type {string} * @memberof ProgramRunsApiGetProgramRunById */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetProgramRunById */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetProgramRunById */ readonly userId?: string } /** * Request parameters for getProgramRuns operation in ProgramRunsApi. * @export * @interface ProgramRunsApiGetProgramRunsRequest */ export interface ProgramRunsApiGetProgramRunsRequest { /** * * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly 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 * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly ids?: 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> * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly programIds?: string /** * * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly teamIds?: string /** * A date used to filter the results based on the finishedAt field of the resources, only including resources finished after this date. the operator used for this filter is >= (greater than or equal to) If the finishedAfter field is provided with a date without a time, it will include resources finished 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly finishedAfter?: string /** * A date used to filter the results based on the finishedAt field of the resources, only including resources finished before this date. the operator used for this filter is <= (less than or equal to) If the finishedBefore field is provided with a date without a time, it will include resources finished 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly finishedBefore?: string /** * * @type {boolean} * @memberof ProgramRunsApiGetProgramRuns */ readonly isFinished?: boolean /** * * @type {boolean} * @memberof ProgramRunsApiGetProgramRuns */ readonly isValid?: 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof ProgramRunsApiGetProgramRuns */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof ProgramRunsApiGetProgramRuns */ readonly 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof ProgramRunsApiGetProgramRuns */ readonly createdBefore?: string } /** * ProgramRunsApi - object-oriented interface * @export * @class ProgramRunsApi * @extends {BaseAPI} */ export class ProgramRunsApi extends BaseAPI { /** * 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. * @summary Create a new program run * @param {ProgramRunsApiCreateProgramRunRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramRunsApi */ public createProgramRun(requestParameters: ProgramRunsApiCreateProgramRunRequest, options?: AxiosRequestConfig) { return ProgramRunsApiFp(this.configuration).createProgramRun(requestParameters.createProgramRunDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramRunsApi */ public getAllProgramRunQuestionsPaginated(requestParameters: ProgramRunsApiGetAllProgramRunQuestionsPaginatedRequest, options?: AxiosRequestConfig) { return ProgramRunsApiFp(this.configuration).getAllProgramRunQuestionsPaginated(requestParameters.id, requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programRunIds, requestParameters.isDone, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Get a single program by ID * @param {ProgramRunsApiGetProgramRunByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramRunsApi */ public getProgramRunById(requestParameters: ProgramRunsApiGetProgramRunByIdRequest, options?: AxiosRequestConfig) { return ProgramRunsApiFp(this.configuration).getProgramRunById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramRunsApiGetProgramRunsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramRunsApi */ public getProgramRuns(requestParameters: ProgramRunsApiGetProgramRunsRequest = {}, options?: AxiosRequestConfig) { return ProgramRunsApiFp(this.configuration).getProgramRuns(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programIds, requestParameters.teamIds, requestParameters.finishedAfter, requestParameters.finishedBefore, requestParameters.isFinished, requestParameters.isValid, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } } /** * ProgramsApi - axios parameter creator * @export */ export const ProgramsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Adds questions to a program with the given ID. * @summary Adds questions to a program with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addQuestionsToProgram: async (id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('addQuestionsToProgram', 'id', id) // verify required parameter 'altoBaseIdsDto' is not null or undefined assertParamExists('addQuestionsToProgram', 'altoBaseIdsDto', altoBaseIdsDto) const localVarPath = `/v1/programs/{id}/questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(altoBaseIdsDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Create a new program * @param {CreateProgramDto} createProgramDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createProgram: async (createProgramDto: CreateProgramDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createProgramDto' is not null or undefined assertParamExists('createProgram', 'createProgramDto', createProgramDto) const localVarPath = `/v1/programs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createProgramDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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... * @summary \"Soft delete\" an existing program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteProgram: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteProgram', 'id', id) const localVarPath = `/v1/programs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programIds] 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> * @param {string} [teamIds] 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> * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAssignmentsProgram: async (createdBy?: string, sortBy?: string, ids?: string, programIds?: string, teamIds?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/programs/assignments`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (programIds !== undefined) { localVarQueryParameter['programIds'] = programIds; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Get a single program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getProgramById', 'id', id) const localVarPath = `/v1/programs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [questionIds] 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> * @param {string} [teamIds] 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> * @param {boolean} [isActive] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPrograms: async (createdBy?: string, sortBy?: string, ids?: string, questionIds?: string, teamIds?: string, isActive?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/programs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (questionIds !== undefined) { localVarQueryParameter['questionIds'] = questionIds; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (isActive !== undefined) { localVarQueryParameter['isActive'] = isActive; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Patch an existing program by ID * @param {string} id * @param {PatchProgramDto} patchProgramDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchProgram: async (id: string, patchProgramDto: PatchProgramDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchProgram', 'id', id) // verify required parameter 'patchProgramDto' is not null or undefined assertParamExists('patchProgram', 'patchProgramDto', patchProgramDto) const localVarPath = `/v1/programs/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchProgramDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Removes questions from a program with the given ID. * @summary Removes questions from a program with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeQuestionsFromProgram: async (id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('removeQuestionsFromProgram', 'id', id) // verify required parameter 'altoBaseIdsDto' is not null or undefined assertParamExists('removeQuestionsFromProgram', 'altoBaseIdsDto', altoBaseIdsDto) const localVarPath = `/v1/programs/{id}/questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(altoBaseIdsDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ProgramsApi - functional programming interface * @export */ export const ProgramsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ProgramsApiAxiosParamCreator(configuration) return { /** * Adds questions to a program with the given ID. * @summary Adds questions to a program with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async addQuestionsToProgram(id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addQuestionsToProgram(id, altoBaseIdsDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Create a new program * @param {CreateProgramDto} createProgramDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createProgram(createProgramDto: CreateProgramDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createProgram(createProgramDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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... * @summary \"Soft delete\" an existing program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteProgram(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProgram(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [programIds] 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> * @param {string} [teamIds] 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> * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAllAssignmentsProgram(createdBy?: string, sortBy?: string, ids?: string, programIds?: string, teamIds?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAllAssignmentsProgram(createdBy, sortBy, ids, programIds, teamIds, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Get a single program by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getProgramById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProgramById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [questionIds] 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> * @param {string} [teamIds] 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> * @param {boolean} [isActive] * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getPrograms(createdBy?: string, sortBy?: string, ids?: string, questionIds?: string, teamIds?: string, isActive?: boolean, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getPrograms(createdBy, sortBy, ids, questionIds, teamIds, isActive, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Patch an existing program by ID * @param {string} id * @param {PatchProgramDto} patchProgramDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchProgram(id: string, patchProgramDto: PatchProgramDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchProgram(id, patchProgramDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Removes questions from a program with the given ID. * @summary Removes questions from a program with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async removeQuestionsFromProgram(id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.removeQuestionsFromProgram(id, altoBaseIdsDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ProgramsApi - factory interface * @export */ export const ProgramsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ProgramsApiFp(configuration) return { /** * Adds questions to a program with the given ID. * @summary Adds questions to a program with the given ID * @param {ProgramsApiAddQuestionsToProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addQuestionsToProgram(requestParameters: ProgramsApiAddQuestionsToProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.addQuestionsToProgram(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Create a new program * @param {ProgramsApiCreateProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createProgram(requestParameters: ProgramsApiCreateProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createProgram(requestParameters.createProgramDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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... * @summary \"Soft delete\" an existing program by ID * @param {ProgramsApiDeleteProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteProgram(requestParameters: ProgramsApiDeleteProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteProgram(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramsApiGetAllAssignmentsProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAllAssignmentsProgram(requestParameters: ProgramsApiGetAllAssignmentsProgramRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getAllAssignmentsProgram(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programIds, requestParameters.teamIds, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Get a single program by ID * @param {ProgramsApiGetProgramByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramById(requestParameters: ProgramsApiGetProgramByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getProgramById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramsApiGetProgramsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPrograms(requestParameters: ProgramsApiGetProgramsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getPrograms(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.questionIds, requestParameters.teamIds, requestParameters.isActive, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Patch an existing program by ID * @param {ProgramsApiPatchProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchProgram(requestParameters: ProgramsApiPatchProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchProgram(requestParameters.id, requestParameters.patchProgramDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * Removes questions from a program with the given ID. * @summary Removes questions from a program with the given ID * @param {ProgramsApiRemoveQuestionsFromProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeQuestionsFromProgram(requestParameters: ProgramsApiRemoveQuestionsFromProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.removeQuestionsFromProgram(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for addQuestionsToProgram operation in ProgramsApi. * @export * @interface ProgramsApiAddQuestionsToProgramRequest */ export interface ProgramsApiAddQuestionsToProgramRequest { /** * * @type {string} * @memberof ProgramsApiAddQuestionsToProgram */ readonly id: string /** * * @type {AltoBaseIdsDto} * @memberof ProgramsApiAddQuestionsToProgram */ readonly altoBaseIdsDto: AltoBaseIdsDto /** * 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. * @type {string} * @memberof ProgramsApiAddQuestionsToProgram */ readonly 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. * @type {string} * @memberof ProgramsApiAddQuestionsToProgram */ readonly userId?: string } /** * Request parameters for createProgram operation in ProgramsApi. * @export * @interface ProgramsApiCreateProgramRequest */ export interface ProgramsApiCreateProgramRequest { /** * * @type {CreateProgramDto} * @memberof ProgramsApiCreateProgram */ readonly createProgramDto: CreateProgramDto /** * 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. * @type {string} * @memberof ProgramsApiCreateProgram */ readonly 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. * @type {string} * @memberof ProgramsApiCreateProgram */ readonly userId?: string } /** * Request parameters for deleteProgram operation in ProgramsApi. * @export * @interface ProgramsApiDeleteProgramRequest */ export interface ProgramsApiDeleteProgramRequest { /** * * @type {string} * @memberof ProgramsApiDeleteProgram */ readonly 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. * @type {string} * @memberof ProgramsApiDeleteProgram */ readonly 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. * @type {string} * @memberof ProgramsApiDeleteProgram */ readonly userId?: string } /** * Request parameters for getAllAssignmentsProgram operation in ProgramsApi. * @export * @interface ProgramsApiGetAllAssignmentsProgramRequest */ export interface ProgramsApiGetAllAssignmentsProgramRequest { /** * * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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 * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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> * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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> * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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. * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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. * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly 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. * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof ProgramsApiGetAllAssignmentsProgram */ readonly createdBefore?: string } /** * Request parameters for getProgramById operation in ProgramsApi. * @export * @interface ProgramsApiGetProgramByIdRequest */ export interface ProgramsApiGetProgramByIdRequest { /** * * @type {string} * @memberof ProgramsApiGetProgramById */ readonly 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. * @type {string} * @memberof ProgramsApiGetProgramById */ readonly 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. * @type {string} * @memberof ProgramsApiGetProgramById */ readonly userId?: string } /** * Request parameters for getPrograms operation in ProgramsApi. * @export * @interface ProgramsApiGetProgramsRequest */ export interface ProgramsApiGetProgramsRequest { /** * * @type {string} * @memberof ProgramsApiGetPrograms */ readonly 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 * @type {string} * @memberof ProgramsApiGetPrograms */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof ProgramsApiGetPrograms */ readonly 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> * @type {string} * @memberof ProgramsApiGetPrograms */ readonly 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> * @type {string} * @memberof ProgramsApiGetPrograms */ readonly teamIds?: string /** * * @type {boolean} * @memberof ProgramsApiGetPrograms */ readonly 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. * @type {string} * @memberof ProgramsApiGetPrograms */ readonly 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. * @type {string} * @memberof ProgramsApiGetPrograms */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof ProgramsApiGetPrograms */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof ProgramsApiGetPrograms */ readonly 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. * @type {string} * @memberof ProgramsApiGetPrograms */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof ProgramsApiGetPrograms */ readonly createdBefore?: string } /** * Request parameters for patchProgram operation in ProgramsApi. * @export * @interface ProgramsApiPatchProgramRequest */ export interface ProgramsApiPatchProgramRequest { /** * * @type {string} * @memberof ProgramsApiPatchProgram */ readonly id: string /** * * @type {PatchProgramDto} * @memberof ProgramsApiPatchProgram */ readonly patchProgramDto: PatchProgramDto /** * 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. * @type {string} * @memberof ProgramsApiPatchProgram */ readonly 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. * @type {string} * @memberof ProgramsApiPatchProgram */ readonly userId?: string } /** * Request parameters for removeQuestionsFromProgram operation in ProgramsApi. * @export * @interface ProgramsApiRemoveQuestionsFromProgramRequest */ export interface ProgramsApiRemoveQuestionsFromProgramRequest { /** * * @type {string} * @memberof ProgramsApiRemoveQuestionsFromProgram */ readonly id: string /** * * @type {AltoBaseIdsDto} * @memberof ProgramsApiRemoveQuestionsFromProgram */ readonly altoBaseIdsDto: AltoBaseIdsDto /** * 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. * @type {string} * @memberof ProgramsApiRemoveQuestionsFromProgram */ readonly 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. * @type {string} * @memberof ProgramsApiRemoveQuestionsFromProgram */ readonly userId?: string } /** * ProgramsApi - object-oriented interface * @export * @class ProgramsApi * @extends {BaseAPI} */ export class ProgramsApi extends BaseAPI { /** * Adds questions to a program with the given ID. * @summary Adds questions to a program with the given ID * @param {ProgramsApiAddQuestionsToProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public addQuestionsToProgram(requestParameters: ProgramsApiAddQuestionsToProgramRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).addQuestionsToProgram(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Create a new program * @param {ProgramsApiCreateProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public createProgram(requestParameters: ProgramsApiCreateProgramRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).createProgram(requestParameters.createProgramDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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... * @summary \"Soft delete\" an existing program by ID * @param {ProgramsApiDeleteProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public deleteProgram(requestParameters: ProgramsApiDeleteProgramRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).deleteProgram(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramsApiGetAllAssignmentsProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public getAllAssignmentsProgram(requestParameters: ProgramsApiGetAllAssignmentsProgramRequest = {}, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).getAllAssignmentsProgram(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.programIds, requestParameters.teamIds, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Get a single program by ID * @param {ProgramsApiGetProgramByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public getProgramById(requestParameters: ProgramsApiGetProgramByIdRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).getProgramById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 . * @summary Get Programs with filter, sort and pagination options * @param {ProgramsApiGetProgramsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public getPrograms(requestParameters: ProgramsApiGetProgramsRequest = {}, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).getPrograms(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.questionIds, requestParameters.teamIds, requestParameters.isActive, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Patch an existing program by ID * @param {ProgramsApiPatchProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public patchProgram(requestParameters: ProgramsApiPatchProgramRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).patchProgram(requestParameters.id, requestParameters.patchProgramDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * Removes questions from a program with the given ID. * @summary Removes questions from a program with the given ID * @param {ProgramsApiRemoveQuestionsFromProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProgramsApi */ public removeQuestionsFromProgram(requestParameters: ProgramsApiRemoveQuestionsFromProgramRequest, options?: AxiosRequestConfig) { return ProgramsApiFp(this.configuration).removeQuestionsFromProgram(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * QuestionsApi - axios parameter creator * @export */ export const QuestionsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * 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. * @summary Create a new question * @param {CreateQuestionDto} createQuestionDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuestion: async (createQuestionDto: CreateQuestionDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createQuestionDto' is not null or undefined assertParamExists('createQuestion', 'createQuestionDto', createQuestionDto) const localVarPath = `/v1/questions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createQuestionDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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... * @summary Soft delete\" an existing question by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuestion: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteQuestion', 'id', id) const localVarPath = `/v1/questions/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Get a single question by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getQuestionById', 'id', id) const localVarPath = `/v1/questions/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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 . * @summary Get Questions with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] 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> * @param {string} [programIds] 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> * @param {Array} [teamIds] 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. * @param {string} [programRunIds] 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> * @param {string} [notInProgramIds] 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. * @param {boolean} [isProgramRunQuestionDone] * @param {string} [sortByProgramId] * @param {string} [search] 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) * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestions: async (createdBy?: string, sortBy?: string, ids?: string, tagIds?: string, programIds?: string, teamIds?: Array, programRunIds?: string, notInProgramIds?: string, isProgramRunQuestionDone?: boolean, sortByProgramId?: string, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/questions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (tagIds !== undefined) { localVarQueryParameter['tagIds'] = tagIds; } if (programIds !== undefined) { localVarQueryParameter['programIds'] = programIds; } if (teamIds) { localVarQueryParameter['teamIds'] = teamIds; } if (programRunIds !== undefined) { localVarQueryParameter['programRunIds'] = programRunIds; } if (notInProgramIds !== undefined) { localVarQueryParameter['notInProgramIds'] = notInProgramIds; } if (isProgramRunQuestionDone !== undefined) { localVarQueryParameter['isProgramRunQuestionDone'] = isProgramRunQuestionDone; } if (sortByProgramId !== undefined) { localVarQueryParameter['sortByProgramId'] = sortByProgramId; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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. * @summary Patch an existing question by ID * @param {string} id * @param {PatchQuestionDto} patchQuestionDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchQuestion: async (id: string, patchQuestionDto: PatchQuestionDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchQuestion', 'id', id) // verify required parameter 'patchQuestionDto' is not null or undefined assertParamExists('patchQuestion', 'patchQuestionDto', patchQuestionDto) const localVarPath = `/v1/questions/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchQuestionDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * QuestionsApi - functional programming interface * @export */ export const QuestionsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = QuestionsApiAxiosParamCreator(configuration) return { /** * 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. * @summary Create a new question * @param {CreateQuestionDto} createQuestionDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createQuestion(createQuestionDto: CreateQuestionDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createQuestion(createQuestionDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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... * @summary Soft delete\" an existing question by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteQuestion(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteQuestion(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Get a single question by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuestionById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestionById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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 . * @summary Get Questions with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] 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> * @param {string} [programIds] 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> * @param {Array} [teamIds] 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. * @param {string} [programRunIds] 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> * @param {string} [notInProgramIds] 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. * @param {boolean} [isProgramRunQuestionDone] * @param {string} [sortByProgramId] * @param {string} [search] 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) * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuestions(createdBy?: string, sortBy?: string, ids?: string, tagIds?: string, programIds?: string, teamIds?: Array, programRunIds?: string, notInProgramIds?: string, isProgramRunQuestionDone?: boolean, sortByProgramId?: string, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestions(createdBy, sortBy, ids, tagIds, programIds, teamIds, programRunIds, notInProgramIds, isProgramRunQuestionDone, sortByProgramId, search, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. * @summary Patch an existing question by ID * @param {string} id * @param {PatchQuestionDto} patchQuestionDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchQuestion(id: string, patchQuestionDto: PatchQuestionDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchQuestion(id, patchQuestionDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * QuestionsApi - factory interface * @export */ export const QuestionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = QuestionsApiFp(configuration) return { /** * 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. * @summary Create a new question * @param {QuestionsApiCreateQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuestion(requestParameters: QuestionsApiCreateQuestionRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createQuestion(requestParameters.createQuestionDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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... * @summary Soft delete\" an existing question by ID * @param {QuestionsApiDeleteQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuestion(requestParameters: QuestionsApiDeleteQuestionRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteQuestion(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Get a single question by ID * @param {QuestionsApiGetQuestionByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionById(requestParameters: QuestionsApiGetQuestionByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getQuestionById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * 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 . * @summary Get Questions with filter, sort and pagination options * @param {QuestionsApiGetQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestions(requestParameters: QuestionsApiGetQuestionsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getQuestions(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.programIds, requestParameters.teamIds, requestParameters.programRunIds, requestParameters.notInProgramIds, requestParameters.isProgramRunQuestionDone, requestParameters.sortByProgramId, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * 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. * @summary Patch an existing question by ID * @param {QuestionsApiPatchQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchQuestion(requestParameters: QuestionsApiPatchQuestionRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchQuestion(requestParameters.id, requestParameters.patchQuestionDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createQuestion operation in QuestionsApi. * @export * @interface QuestionsApiCreateQuestionRequest */ export interface QuestionsApiCreateQuestionRequest { /** * * @type {CreateQuestionDto} * @memberof QuestionsApiCreateQuestion */ readonly createQuestionDto: CreateQuestionDto /** * 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. * @type {string} * @memberof QuestionsApiCreateQuestion */ readonly 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. * @type {string} * @memberof QuestionsApiCreateQuestion */ readonly userId?: string } /** * Request parameters for deleteQuestion operation in QuestionsApi. * @export * @interface QuestionsApiDeleteQuestionRequest */ export interface QuestionsApiDeleteQuestionRequest { /** * * @type {string} * @memberof QuestionsApiDeleteQuestion */ readonly 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. * @type {string} * @memberof QuestionsApiDeleteQuestion */ readonly 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. * @type {string} * @memberof QuestionsApiDeleteQuestion */ readonly userId?: string } /** * Request parameters for getQuestionById operation in QuestionsApi. * @export * @interface QuestionsApiGetQuestionByIdRequest */ export interface QuestionsApiGetQuestionByIdRequest { /** * * @type {string} * @memberof QuestionsApiGetQuestionById */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestionById */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestionById */ readonly userId?: string } /** * Request parameters for getQuestions operation in QuestionsApi. * @export * @interface QuestionsApiGetQuestionsRequest */ export interface QuestionsApiGetQuestionsRequest { /** * * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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 * @type {string} * @memberof QuestionsApiGetQuestions */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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> * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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> * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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. * @type {Array} * @memberof QuestionsApiGetQuestions */ readonly 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> * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestions */ readonly notInProgramIds?: string /** * * @type {boolean} * @memberof QuestionsApiGetQuestions */ readonly isProgramRunQuestionDone?: boolean /** * * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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) * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestions */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestions */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof QuestionsApiGetQuestions */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof QuestionsApiGetQuestions */ readonly 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. * @type {string} * @memberof QuestionsApiGetQuestions */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof QuestionsApiGetQuestions */ readonly createdBefore?: string } /** * Request parameters for patchQuestion operation in QuestionsApi. * @export * @interface QuestionsApiPatchQuestionRequest */ export interface QuestionsApiPatchQuestionRequest { /** * * @type {string} * @memberof QuestionsApiPatchQuestion */ readonly id: string /** * * @type {PatchQuestionDto} * @memberof QuestionsApiPatchQuestion */ readonly patchQuestionDto: PatchQuestionDto /** * 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. * @type {string} * @memberof QuestionsApiPatchQuestion */ readonly 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. * @type {string} * @memberof QuestionsApiPatchQuestion */ readonly userId?: string } /** * QuestionsApi - object-oriented interface * @export * @class QuestionsApi * @extends {BaseAPI} */ export class QuestionsApi extends BaseAPI { /** * 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. * @summary Create a new question * @param {QuestionsApiCreateQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsApi */ public createQuestion(requestParameters: QuestionsApiCreateQuestionRequest, options?: AxiosRequestConfig) { return QuestionsApiFp(this.configuration).createQuestion(requestParameters.createQuestionDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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... * @summary Soft delete\" an existing question by ID * @param {QuestionsApiDeleteQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsApi */ public deleteQuestion(requestParameters: QuestionsApiDeleteQuestionRequest, options?: AxiosRequestConfig) { return QuestionsApiFp(this.configuration).deleteQuestion(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Get a single question by ID * @param {QuestionsApiGetQuestionByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsApi */ public getQuestionById(requestParameters: QuestionsApiGetQuestionByIdRequest, options?: AxiosRequestConfig) { return QuestionsApiFp(this.configuration).getQuestionById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * 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 . * @summary Get Questions with filter, sort and pagination options * @param {QuestionsApiGetQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsApi */ public getQuestions(requestParameters: QuestionsApiGetQuestionsRequest = {}, options?: AxiosRequestConfig) { return QuestionsApiFp(this.configuration).getQuestions(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.programIds, requestParameters.teamIds, requestParameters.programRunIds, requestParameters.notInProgramIds, requestParameters.isProgramRunQuestionDone, requestParameters.sortByProgramId, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * 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. * @summary Patch an existing question by ID * @param {QuestionsApiPatchQuestionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsApi */ public patchQuestion(requestParameters: QuestionsApiPatchQuestionRequest, options?: AxiosRequestConfig) { return QuestionsApiFp(this.configuration).patchQuestion(requestParameters.id, requestParameters.patchQuestionDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * QuestionsSubmittedApi - axios parameter creator * @export */ export const QuestionsSubmittedApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/questions-submitted\' route to create a new question-submitted using the data passed in the body. It will respond with the newly created question-submitted. * @summary Create a new question-submitted * @param {CreateQuestionSubmittedDto} createQuestionSubmittedDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuestionSubmitted: async (createQuestionSubmittedDto: CreateQuestionSubmittedDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createQuestionSubmittedDto' is not null or undefined assertParamExists('createQuestionSubmitted', 'createQuestionSubmittedDto', createQuestionSubmittedDto) const localVarPath = `/v1/questions-submitted`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createQuestionSubmittedDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/questions-submitted/:id\' route, it \"softDelete\" a single question-submitted 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... * @summary Soft delete\" an existing question-submitted by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuestionSubmitted: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteQuestionSubmitted', 'id', id) const localVarPath = `/v1/questions-submitted/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/questions-submitted/{:id}\' route with `{:id}` the id of the question-submitted we want to find. If the question-submitted exists it will return it, if not we respond with an error not found. * @summary Get a single question-submitted by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionSubmittedById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getQuestionSubmittedById', 'id', id) const localVarPath = `/v1/questions-submitted/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/questions-submitted\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated questions-submitted along with the current state of pagination . * @summary Get QuestionsSubmitted with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {QuestionSubmittedStatusEnum} [status] The \'status\' property of a QuestionSubmittedQueryPaginatedDto object. This property represents the status of a submitted question and can be optionally set to a member of the \'QuestionSubmittedStatus\' enumeration. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionsSubmitted: async (createdBy?: string, sortBy?: string, ids?: string, status?: QuestionSubmittedStatusEnum, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/questions-submitted`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/questions-submitted/:id\' route where :id is a question-submitted ID, it updates a single question-submitted with the ID :id and return it. If the question-submitted with ID does not exists we return an error. * @summary Patch an existing question-submitted by ID * @param {string} id * @param {PatchQuestionSubmittedDto} patchQuestionSubmittedDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchQuestionSubmitted: async (id: string, patchQuestionSubmittedDto: PatchQuestionSubmittedDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchQuestionSubmitted', 'id', id) // verify required parameter 'patchQuestionSubmittedDto' is not null or undefined assertParamExists('patchQuestionSubmitted', 'patchQuestionSubmittedDto', patchQuestionSubmittedDto) const localVarPath = `/v1/questions-submitted/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchQuestionSubmittedDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * QuestionsSubmittedApi - functional programming interface * @export */ export const QuestionsSubmittedApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = QuestionsSubmittedApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/questions-submitted\' route to create a new question-submitted using the data passed in the body. It will respond with the newly created question-submitted. * @summary Create a new question-submitted * @param {CreateQuestionSubmittedDto} createQuestionSubmittedDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createQuestionSubmitted(createQuestionSubmittedDto: CreateQuestionSubmittedDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createQuestionSubmitted(createQuestionSubmittedDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/questions-submitted/:id\' route, it \"softDelete\" a single question-submitted 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... * @summary Soft delete\" an existing question-submitted by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteQuestionSubmitted(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteQuestionSubmitted(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/questions-submitted/{:id}\' route with `{:id}` the id of the question-submitted we want to find. If the question-submitted exists it will return it, if not we respond with an error not found. * @summary Get a single question-submitted by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuestionSubmittedById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestionSubmittedById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/questions-submitted\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated questions-submitted along with the current state of pagination . * @summary Get QuestionsSubmitted with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {QuestionSubmittedStatusEnum} [status] The \'status\' property of a QuestionSubmittedQueryPaginatedDto object. This property represents the status of a submitted question and can be optionally set to a member of the \'QuestionSubmittedStatus\' enumeration. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuestionsSubmitted(createdBy?: string, sortBy?: string, ids?: string, status?: QuestionSubmittedStatusEnum, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestionsSubmitted(createdBy, sortBy, ids, status, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/questions-submitted/:id\' route where :id is a question-submitted ID, it updates a single question-submitted with the ID :id and return it. If the question-submitted with ID does not exists we return an error. * @summary Patch an existing question-submitted by ID * @param {string} id * @param {PatchQuestionSubmittedDto} patchQuestionSubmittedDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchQuestionSubmitted(id: string, patchQuestionSubmittedDto: PatchQuestionSubmittedDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchQuestionSubmitted(id, patchQuestionSubmittedDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * QuestionsSubmittedApi - factory interface * @export */ export const QuestionsSubmittedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = QuestionsSubmittedApiFp(configuration) return { /** * This method handles POST requests to the \'/questions-submitted\' route to create a new question-submitted using the data passed in the body. It will respond with the newly created question-submitted. * @summary Create a new question-submitted * @param {QuestionsSubmittedApiCreateQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuestionSubmitted(requestParameters: QuestionsSubmittedApiCreateQuestionSubmittedRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createQuestionSubmitted(requestParameters.createQuestionSubmittedDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/questions-submitted/:id\' route, it \"softDelete\" a single question-submitted 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... * @summary Soft delete\" an existing question-submitted by ID * @param {QuestionsSubmittedApiDeleteQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuestionSubmitted(requestParameters: QuestionsSubmittedApiDeleteQuestionSubmittedRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteQuestionSubmitted(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/questions-submitted/{:id}\' route with `{:id}` the id of the question-submitted we want to find. If the question-submitted exists it will return it, if not we respond with an error not found. * @summary Get a single question-submitted by ID * @param {QuestionsSubmittedApiGetQuestionSubmittedByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionSubmittedById(requestParameters: QuestionsSubmittedApiGetQuestionSubmittedByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getQuestionSubmittedById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/questions-submitted\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated questions-submitted along with the current state of pagination . * @summary Get QuestionsSubmitted with filter, sort and pagination options * @param {QuestionsSubmittedApiGetQuestionsSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionsSubmitted(requestParameters: QuestionsSubmittedApiGetQuestionsSubmittedRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getQuestionsSubmitted(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.status, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/questions-submitted/:id\' route where :id is a question-submitted ID, it updates a single question-submitted with the ID :id and return it. If the question-submitted with ID does not exists we return an error. * @summary Patch an existing question-submitted by ID * @param {QuestionsSubmittedApiPatchQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchQuestionSubmitted(requestParameters: QuestionsSubmittedApiPatchQuestionSubmittedRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchQuestionSubmitted(requestParameters.id, requestParameters.patchQuestionSubmittedDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createQuestionSubmitted operation in QuestionsSubmittedApi. * @export * @interface QuestionsSubmittedApiCreateQuestionSubmittedRequest */ export interface QuestionsSubmittedApiCreateQuestionSubmittedRequest { /** * * @type {CreateQuestionSubmittedDto} * @memberof QuestionsSubmittedApiCreateQuestionSubmitted */ readonly createQuestionSubmittedDto: CreateQuestionSubmittedDto /** * 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. * @type {string} * @memberof QuestionsSubmittedApiCreateQuestionSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiCreateQuestionSubmitted */ readonly userId?: string } /** * Request parameters for deleteQuestionSubmitted operation in QuestionsSubmittedApi. * @export * @interface QuestionsSubmittedApiDeleteQuestionSubmittedRequest */ export interface QuestionsSubmittedApiDeleteQuestionSubmittedRequest { /** * * @type {string} * @memberof QuestionsSubmittedApiDeleteQuestionSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiDeleteQuestionSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiDeleteQuestionSubmitted */ readonly userId?: string } /** * Request parameters for getQuestionSubmittedById operation in QuestionsSubmittedApi. * @export * @interface QuestionsSubmittedApiGetQuestionSubmittedByIdRequest */ export interface QuestionsSubmittedApiGetQuestionSubmittedByIdRequest { /** * * @type {string} * @memberof QuestionsSubmittedApiGetQuestionSubmittedById */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionSubmittedById */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionSubmittedById */ readonly userId?: string } /** * Request parameters for getQuestionsSubmitted operation in QuestionsSubmittedApi. * @export * @interface QuestionsSubmittedApiGetQuestionsSubmittedRequest */ export interface QuestionsSubmittedApiGetQuestionsSubmittedRequest { /** * * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly 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 * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly ids?: string /** * The \'status\' property of a QuestionSubmittedQueryPaginatedDto object. This property represents the status of a submitted question and can be optionally set to a member of the \'QuestionSubmittedStatus\' enumeration. * @type {QuestionSubmittedStatusEnum} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly status?: QuestionSubmittedStatusEnum /** * 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof QuestionsSubmittedApiGetQuestionsSubmitted */ readonly createdBefore?: string } /** * Request parameters for patchQuestionSubmitted operation in QuestionsSubmittedApi. * @export * @interface QuestionsSubmittedApiPatchQuestionSubmittedRequest */ export interface QuestionsSubmittedApiPatchQuestionSubmittedRequest { /** * * @type {string} * @memberof QuestionsSubmittedApiPatchQuestionSubmitted */ readonly id: string /** * * @type {PatchQuestionSubmittedDto} * @memberof QuestionsSubmittedApiPatchQuestionSubmitted */ readonly patchQuestionSubmittedDto: PatchQuestionSubmittedDto /** * 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. * @type {string} * @memberof QuestionsSubmittedApiPatchQuestionSubmitted */ readonly 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. * @type {string} * @memberof QuestionsSubmittedApiPatchQuestionSubmitted */ readonly userId?: string } /** * QuestionsSubmittedApi - object-oriented interface * @export * @class QuestionsSubmittedApi * @extends {BaseAPI} */ export class QuestionsSubmittedApi extends BaseAPI { /** * This method handles POST requests to the \'/questions-submitted\' route to create a new question-submitted using the data passed in the body. It will respond with the newly created question-submitted. * @summary Create a new question-submitted * @param {QuestionsSubmittedApiCreateQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsSubmittedApi */ public createQuestionSubmitted(requestParameters: QuestionsSubmittedApiCreateQuestionSubmittedRequest, options?: AxiosRequestConfig) { return QuestionsSubmittedApiFp(this.configuration).createQuestionSubmitted(requestParameters.createQuestionSubmittedDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/questions-submitted/:id\' route, it \"softDelete\" a single question-submitted 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... * @summary Soft delete\" an existing question-submitted by ID * @param {QuestionsSubmittedApiDeleteQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsSubmittedApi */ public deleteQuestionSubmitted(requestParameters: QuestionsSubmittedApiDeleteQuestionSubmittedRequest, options?: AxiosRequestConfig) { return QuestionsSubmittedApiFp(this.configuration).deleteQuestionSubmitted(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/questions-submitted/{:id}\' route with `{:id}` the id of the question-submitted we want to find. If the question-submitted exists it will return it, if not we respond with an error not found. * @summary Get a single question-submitted by ID * @param {QuestionsSubmittedApiGetQuestionSubmittedByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsSubmittedApi */ public getQuestionSubmittedById(requestParameters: QuestionsSubmittedApiGetQuestionSubmittedByIdRequest, options?: AxiosRequestConfig) { return QuestionsSubmittedApiFp(this.configuration).getQuestionSubmittedById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/questions-submitted\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated questions-submitted along with the current state of pagination . * @summary Get QuestionsSubmitted with filter, sort and pagination options * @param {QuestionsSubmittedApiGetQuestionsSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsSubmittedApi */ public getQuestionsSubmitted(requestParameters: QuestionsSubmittedApiGetQuestionsSubmittedRequest = {}, options?: AxiosRequestConfig) { return QuestionsSubmittedApiFp(this.configuration).getQuestionsSubmitted(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.status, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/questions-submitted/:id\' route where :id is a question-submitted ID, it updates a single question-submitted with the ID :id and return it. If the question-submitted with ID does not exists we return an error. * @summary Patch an existing question-submitted by ID * @param {QuestionsSubmittedApiPatchQuestionSubmittedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof QuestionsSubmittedApi */ public patchQuestionSubmitted(requestParameters: QuestionsSubmittedApiPatchQuestionSubmittedRequest, options?: AxiosRequestConfig) { return QuestionsSubmittedApiFp(this.configuration).patchQuestionSubmitted(requestParameters.id, requestParameters.patchQuestionSubmittedDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * ScoresApi - axios parameter creator * @export */ export const ScoresApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Gets the scores for the specified query and company ID. For the scores on programs, all the program-run will be aggregated into one score. this means that if a program has 3 runs, the score will be the average of the 3 runs. the totalcount will be the sum of the 3 runs and the validcount will be the number of valid guesses within the 3 runs. * @summary Get scores by types * @param {ScoreTypeEnum} type The type of score to filter on. * @param {ScoreTimeframeEnum} timeframe The timeframe to group scores by. * @param {string} dateAfter The date to filter scores from guesses created after the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} dateBefore The date to filter scores from guesses created before the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [ids] An optional array of IDs to filter on. * @param {ScoreByTypeEnum} [scoredBy] The type of score to filter by. * @param {string} [sortBy] * @param {ScoreFillValuesEnum} [fillValues] params to choose or not to fill the gaps in scores with a value. The value can be 0 or null or false. if not provided the dates with no scores will be filled with 0. if set to false the dates with no scores will not be included. * @param {string} [companyId] Unique identifier of the company. * @param {string} [scoredById] The ID of the entity to filter by. * @param {number} [countGreaterThan] The minimum total count of scores to filter by. Example 10 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScores: async (type: ScoreTypeEnum, timeframe: ScoreTimeframeEnum, dateAfter: string, dateBefore: string, ids?: string, scoredBy?: ScoreByTypeEnum, sortBy?: string, fillValues?: ScoreFillValuesEnum, companyId?: string, scoredById?: string, countGreaterThan?: number, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'type' is not null or undefined assertParamExists('getScores', 'type', type) // verify required parameter 'timeframe' is not null or undefined assertParamExists('getScores', 'timeframe', timeframe) // verify required parameter 'dateAfter' is not null or undefined assertParamExists('getScores', 'dateAfter', dateAfter) // verify required parameter 'dateBefore' is not null or undefined assertParamExists('getScores', 'dateBefore', dateBefore) const localVarPath = `/v1/scores`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (type !== undefined) { localVarQueryParameter['type'] = type; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (scoredBy !== undefined) { localVarQueryParameter['scoredBy'] = scoredBy; } if (timeframe !== undefined) { localVarQueryParameter['timeframe'] = timeframe; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (fillValues !== undefined) { localVarQueryParameter['fillValues'] = fillValues; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (scoredById !== undefined) { localVarQueryParameter['scoredById'] = scoredById; } if (dateAfter !== undefined) { localVarQueryParameter['dateAfter'] = (dateAfter as any instanceof Date) ? (dateAfter as any).toISOString() : dateAfter; } if (dateBefore !== undefined) { localVarQueryParameter['dateBefore'] = (dateBefore as any instanceof Date) ? (dateBefore as any).toISOString() : dateBefore; } if (countGreaterThan !== undefined) { localVarQueryParameter['countGreaterThan'] = countGreaterThan; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ScoresApi - functional programming interface * @export */ export const ScoresApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ScoresApiAxiosParamCreator(configuration) return { /** * Gets the scores for the specified query and company ID. For the scores on programs, all the program-run will be aggregated into one score. this means that if a program has 3 runs, the score will be the average of the 3 runs. the totalcount will be the sum of the 3 runs and the validcount will be the number of valid guesses within the 3 runs. * @summary Get scores by types * @param {ScoreTypeEnum} type The type of score to filter on. * @param {ScoreTimeframeEnum} timeframe The timeframe to group scores by. * @param {string} dateAfter The date to filter scores from guesses created after the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} dateBefore The date to filter scores from guesses created before the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [ids] An optional array of IDs to filter on. * @param {ScoreByTypeEnum} [scoredBy] The type of score to filter by. * @param {string} [sortBy] * @param {ScoreFillValuesEnum} [fillValues] params to choose or not to fill the gaps in scores with a value. The value can be 0 or null or false. if not provided the dates with no scores will be filled with 0. if set to false the dates with no scores will not be included. * @param {string} [companyId] Unique identifier of the company. * @param {string} [scoredById] The ID of the entity to filter by. * @param {number} [countGreaterThan] The minimum total count of scores to filter by. Example 10 * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getScores(type: ScoreTypeEnum, timeframe: ScoreTimeframeEnum, dateAfter: string, dateBefore: string, ids?: string, scoredBy?: ScoreByTypeEnum, sortBy?: string, fillValues?: ScoreFillValuesEnum, companyId?: string, scoredById?: string, countGreaterThan?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getScores(type, timeframe, dateAfter, dateBefore, ids, scoredBy, sortBy, fillValues, companyId, scoredById, countGreaterThan, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ScoresApi - factory interface * @export */ export const ScoresApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ScoresApiFp(configuration) return { /** * Gets the scores for the specified query and company ID. For the scores on programs, all the program-run will be aggregated into one score. this means that if a program has 3 runs, the score will be the average of the 3 runs. the totalcount will be the sum of the 3 runs and the validcount will be the number of valid guesses within the 3 runs. * @summary Get scores by types * @param {ScoresApiGetScoresRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getScores(requestParameters: ScoresApiGetScoresRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getScores(requestParameters.type, requestParameters.timeframe, requestParameters.dateAfter, requestParameters.dateBefore, requestParameters.ids, requestParameters.scoredBy, requestParameters.sortBy, requestParameters.fillValues, requestParameters.companyId, requestParameters.scoredById, requestParameters.countGreaterThan, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getScores operation in ScoresApi. * @export * @interface ScoresApiGetScoresRequest */ export interface ScoresApiGetScoresRequest { /** * The type of score to filter on. * @type {ScoreTypeEnum} * @memberof ScoresApiGetScores */ readonly type: ScoreTypeEnum /** * The timeframe to group scores by. * @type {ScoreTimeframeEnum} * @memberof ScoresApiGetScores */ readonly timeframe: ScoreTimeframeEnum /** * The date to filter scores from guesses created after the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof ScoresApiGetScores */ readonly dateAfter: string /** * The date to filter scores from guesses created before the date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof ScoresApiGetScores */ readonly dateBefore: string /** * An optional array of IDs to filter on. * @type {string} * @memberof ScoresApiGetScores */ readonly ids?: string /** * The type of score to filter by. * @type {ScoreByTypeEnum} * @memberof ScoresApiGetScores */ readonly scoredBy?: ScoreByTypeEnum /** * * @type {string} * @memberof ScoresApiGetScores */ readonly sortBy?: string /** * params to choose or not to fill the gaps in scores with a value. The value can be 0 or null or false. if not provided the dates with no scores will be filled with 0. if set to false the dates with no scores will not be included. * @type {ScoreFillValuesEnum} * @memberof ScoresApiGetScores */ readonly fillValues?: ScoreFillValuesEnum /** * Unique identifier of the company. * @type {string} * @memberof ScoresApiGetScores */ readonly companyId?: string /** * The ID of the entity to filter by. * @type {string} * @memberof ScoresApiGetScores */ readonly scoredById?: string /** * The minimum total count of scores to filter by. Example 10 * @type {number} * @memberof ScoresApiGetScores */ readonly countGreaterThan?: number } /** * ScoresApi - object-oriented interface * @export * @class ScoresApi * @extends {BaseAPI} */ export class ScoresApi extends BaseAPI { /** * Gets the scores for the specified query and company ID. For the scores on programs, all the program-run will be aggregated into one score. this means that if a program has 3 runs, the score will be the average of the 3 runs. the totalcount will be the sum of the 3 runs and the validcount will be the number of valid guesses within the 3 runs. * @summary Get scores by types * @param {ScoresApiGetScoresRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ScoresApi */ public getScores(requestParameters: ScoresApiGetScoresRequest, options?: AxiosRequestConfig) { return ScoresApiFp(this.configuration).getScores(requestParameters.type, requestParameters.timeframe, requestParameters.dateAfter, requestParameters.dateBefore, requestParameters.ids, requestParameters.scoredBy, requestParameters.sortBy, requestParameters.fillValues, requestParameters.companyId, requestParameters.scoredById, requestParameters.countGreaterThan, options).then((request) => request(this.axios, this.basePath)); } } /** * StatsApi - axios parameter creator * @export */ export const StatsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Get company statistics * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompanyStats: async (id: string, companyId?: string, userId?: string, from?: string, to?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getCompanyStats', 'id', id) const localVarPath = `/v1/stats/company/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get programs statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include the team with the specified IDs * @param {string} [search] filter the results to only include entities with a name that contains the specified string * @param {number} [progressAboveOrEqual] filter the results to only include entities who have a progress above or equal to the specified value * @param {number} [progressBelowOrEqual] filter the results to only include entities who have a progress below or equal to the specified value * @param {boolean} [isAccelerated] filter the results to only include accelerated programs * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramsStats: async (sortBy?: string, ids?: string, teamIds?: string, search?: string, progressAboveOrEqual?: number, progressBelowOrEqual?: number, isAccelerated?: boolean, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/stats/programs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (progressAboveOrEqual !== undefined) { localVarQueryParameter['progressAboveOrEqual'] = progressAboveOrEqual; } if (progressBelowOrEqual !== undefined) { localVarQueryParameter['progressBelowOrEqual'] = progressBelowOrEqual; } if (isAccelerated !== undefined) { localVarQueryParameter['isAccelerated'] = isAccelerated; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (scoreAboveOrEqual !== undefined) { localVarQueryParameter['scoreAboveOrEqual'] = scoreAboveOrEqual; } if (scoreBelowOrEqual !== undefined) { localVarQueryParameter['scoreBelowOrEqual'] = scoreBelowOrEqual; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get questions statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] An array of tagIds used to filter the results to only include the tag with the specified IDs * @param {string} [programIds] An array of programIds used to filter the results to only include the programs with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include the teams with the specified IDs * @param {string} [search] filter the results to only include questions with title that contains the specified string * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionsStats: async (sortBy?: string, ids?: string, tagIds?: string, programIds?: string, teamIds?: string, search?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/stats/questions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (tagIds !== undefined) { localVarQueryParameter['tagIds'] = tagIds; } if (programIds !== undefined) { localVarQueryParameter['programIds'] = programIds; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (scoreAboveOrEqual !== undefined) { localVarQueryParameter['scoreAboveOrEqual'] = scoreAboveOrEqual; } if (scoreBelowOrEqual !== undefined) { localVarQueryParameter['scoreBelowOrEqual'] = scoreBelowOrEqual; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get tags statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of IDs used to filter the results to only include the teams with the specified IDs in the stats calculation * @param {string} [search] * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTagsStats: async (sortBy?: string, ids?: string, teamIds?: string, search?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/stats/tags`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (scoreAboveOrEqual !== undefined) { localVarQueryParameter['scoreAboveOrEqual'] = scoreAboveOrEqual; } if (scoreBelowOrEqual !== undefined) { localVarQueryParameter['scoreBelowOrEqual'] = scoreBelowOrEqual; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get teams statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] An array of IDs used to filter the results to only include the teams with the specified tags * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeamsStats: async (sortBy?: string, ids?: string, tagIds?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/stats/teams`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (tagIds !== undefined) { localVarQueryParameter['tagIds'] = tagIds; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (scoreAboveOrEqual !== undefined) { localVarQueryParameter['scoreAboveOrEqual'] = scoreAboveOrEqual; } if (scoreBelowOrEqual !== undefined) { localVarQueryParameter['scoreBelowOrEqual'] = scoreBelowOrEqual; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Get users statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include users in teams specified by the IDs. * @param {string} [search] filter the results to only include entities with a name that contains the specified string * @param {number} [respondsRegularlyThreshold] The threshold used to calculate the `respondsRegularly` field. This corresponds to the number of responses per day a user need to have the `respondsRegularly` field set to true. By default, the threshold is 6/7 (corresponds ~0.85 response per days, this is equivalent to 6 responses per week, the number of questions sent to the connector per week). * @param {string} [filterByUserId] The user id to filter the results by. This will filter the results by the given user id and will only return the stats for this user. TODO should be removed when n8n and the frontend will be updated to use the `ids` query param. * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsersStats: async (sortBy?: string, ids?: string, teamIds?: string, search?: string, respondsRegularlyThreshold?: number, filterByUserId?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/stats/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (respondsRegularlyThreshold !== undefined) { localVarQueryParameter['respondsRegularlyThreshold'] = respondsRegularlyThreshold; } if (filterByUserId !== undefined) { localVarQueryParameter['filterByUserId'] = filterByUserId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (scoreAboveOrEqual !== undefined) { localVarQueryParameter['scoreAboveOrEqual'] = scoreAboveOrEqual; } if (scoreBelowOrEqual !== undefined) { localVarQueryParameter['scoreBelowOrEqual'] = scoreBelowOrEqual; } if (from !== undefined) { localVarQueryParameter['from'] = (from as any instanceof Date) ? (from as any).toISOString() : from; } if (to !== undefined) { localVarQueryParameter['to'] = (to as any instanceof Date) ? (to as any).toISOString() : to; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * StatsApi - functional programming interface * @export */ export const StatsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = StatsApiAxiosParamCreator(configuration) return { /** * * @summary Get company statistics * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCompanyStats(id: string, companyId?: string, userId?: string, from?: string, to?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCompanyStats(id, companyId, userId, from, to, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get programs statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include the team with the specified IDs * @param {string} [search] filter the results to only include entities with a name that contains the specified string * @param {number} [progressAboveOrEqual] filter the results to only include entities who have a progress above or equal to the specified value * @param {number} [progressBelowOrEqual] filter the results to only include entities who have a progress below or equal to the specified value * @param {boolean} [isAccelerated] filter the results to only include accelerated programs * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getProgramsStats(sortBy?: string, ids?: string, teamIds?: string, search?: string, progressAboveOrEqual?: number, progressBelowOrEqual?: number, isAccelerated?: boolean, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getProgramsStats(sortBy, ids, teamIds, search, progressAboveOrEqual, progressBelowOrEqual, isAccelerated, page, itemsPerPage, scoreAboveOrEqual, scoreBelowOrEqual, from, to, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get questions statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] An array of tagIds used to filter the results to only include the tag with the specified IDs * @param {string} [programIds] An array of programIds used to filter the results to only include the programs with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include the teams with the specified IDs * @param {string} [search] filter the results to only include questions with title that contains the specified string * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuestionsStats(sortBy?: string, ids?: string, tagIds?: string, programIds?: string, teamIds?: string, search?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestionsStats(sortBy, ids, tagIds, programIds, teamIds, search, page, itemsPerPage, scoreAboveOrEqual, scoreBelowOrEqual, from, to, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get tags statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of IDs used to filter the results to only include the teams with the specified IDs in the stats calculation * @param {string} [search] * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTagsStats(sortBy?: string, ids?: string, teamIds?: string, search?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTagsStats(sortBy, ids, teamIds, search, page, itemsPerPage, scoreAboveOrEqual, scoreBelowOrEqual, from, to, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get teams statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [tagIds] An array of IDs used to filter the results to only include the teams with the specified tags * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTeamsStats(sortBy?: string, ids?: string, tagIds?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamsStats(sortBy, ids, tagIds, page, itemsPerPage, scoreAboveOrEqual, scoreBelowOrEqual, from, to, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @summary Get users statistics * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of teamIds used to filter the results to only include users in teams specified by the IDs. * @param {string} [search] filter the results to only include entities with a name that contains the specified string * @param {number} [respondsRegularlyThreshold] The threshold used to calculate the `respondsRegularly` field. This corresponds to the number of responses per day a user need to have the `respondsRegularly` field set to true. By default, the threshold is 6/7 (corresponds ~0.85 response per days, this is equivalent to 6 responses per week, the number of questions sent to the connector per week). * @param {string} [filterByUserId] The user id to filter the results by. This will filter the results by the given user id and will only return the stats for this user. TODO should be removed when n8n and the frontend will be updated to use the `ids` query param. * @param {number} [page] The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @param {number} [itemsPerPage] The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @param {number} [scoreAboveOrEqual] filter the results to only include entities who have a score above or equal to the specified value * @param {number} [scoreBelowOrEqual] filter the results to only include entities who have a score below or equal to the specified value * @param {string} [from] No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @param {string} [to] A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getUsersStats(sortBy?: string, ids?: string, teamIds?: string, search?: string, respondsRegularlyThreshold?: number, filterByUserId?: string, page?: number, itemsPerPage?: number, scoreAboveOrEqual?: number, scoreBelowOrEqual?: number, from?: string, to?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUsersStats(sortBy, ids, teamIds, search, respondsRegularlyThreshold, filterByUserId, page, itemsPerPage, scoreAboveOrEqual, scoreBelowOrEqual, from, to, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * StatsApi - factory interface * @export */ export const StatsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = StatsApiFp(configuration) return { /** * * @summary Get company statistics * @param {StatsApiGetCompanyStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCompanyStats(requestParameters: StatsApiGetCompanyStatsRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getCompanyStats(requestParameters.id, requestParameters.companyId, requestParameters.userId, requestParameters.from, requestParameters.to, options).then((request) => request(axios, basePath)); }, /** * * @summary Get programs statistics * @param {StatsApiGetProgramsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getProgramsStats(requestParameters: StatsApiGetProgramsStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getProgramsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.progressAboveOrEqual, requestParameters.progressBelowOrEqual, requestParameters.isAccelerated, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get questions statistics * @param {StatsApiGetQuestionsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuestionsStats(requestParameters: StatsApiGetQuestionsStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getQuestionsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.programIds, requestParameters.teamIds, requestParameters.search, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get tags statistics * @param {StatsApiGetTagsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTagsStats(requestParameters: StatsApiGetTagsStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTagsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get teams statistics * @param {StatsApiGetTeamsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeamsStats(requestParameters: StatsApiGetTeamsStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTeamsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * * @summary Get users statistics * @param {StatsApiGetUsersStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsersStats(requestParameters: StatsApiGetUsersStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getUsersStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.respondsRegularlyThreshold, requestParameters.filterByUserId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for getCompanyStats operation in StatsApi. * @export * @interface StatsApiGetCompanyStatsRequest */ export interface StatsApiGetCompanyStatsRequest { /** * * @type {string} * @memberof StatsApiGetCompanyStats */ readonly 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. * @type {string} * @memberof StatsApiGetCompanyStats */ readonly 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. * @type {string} * @memberof StatsApiGetCompanyStats */ readonly userId?: string /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetCompanyStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetCompanyStats */ readonly to?: string } /** * Request parameters for getProgramsStats operation in StatsApi. * @export * @interface StatsApiGetProgramsStatsRequest */ export interface StatsApiGetProgramsStatsRequest { /** * 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 * @type {string} * @memberof StatsApiGetProgramsStats */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof StatsApiGetProgramsStats */ readonly ids?: string /** * An array of teamIds used to filter the results to only include the team with the specified IDs * @type {string} * @memberof StatsApiGetProgramsStats */ readonly teamIds?: string /** * filter the results to only include entities with a name that contains the specified string * @type {string} * @memberof StatsApiGetProgramsStats */ readonly search?: string /** * filter the results to only include entities who have a progress above or equal to the specified value * @type {number} * @memberof StatsApiGetProgramsStats */ readonly progressAboveOrEqual?: number /** * filter the results to only include entities who have a progress below or equal to the specified value * @type {number} * @memberof StatsApiGetProgramsStats */ readonly progressBelowOrEqual?: number /** * filter the results to only include accelerated programs * @type {boolean} * @memberof StatsApiGetProgramsStats */ readonly isAccelerated?: boolean /** * The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @type {number} * @memberof StatsApiGetProgramsStats */ readonly page?: number /** * The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @type {number} * @memberof StatsApiGetProgramsStats */ readonly itemsPerPage?: number /** * filter the results to only include entities who have a score above or equal to the specified value * @type {number} * @memberof StatsApiGetProgramsStats */ readonly scoreAboveOrEqual?: number /** * filter the results to only include entities who have a score below or equal to the specified value * @type {number} * @memberof StatsApiGetProgramsStats */ readonly scoreBelowOrEqual?: number /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetProgramsStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetProgramsStats */ readonly to?: 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. * @type {string} * @memberof StatsApiGetProgramsStats */ readonly 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. * @type {string} * @memberof StatsApiGetProgramsStats */ readonly userId?: string } /** * Request parameters for getQuestionsStats operation in StatsApi. * @export * @interface StatsApiGetQuestionsStatsRequest */ export interface StatsApiGetQuestionsStatsRequest { /** * 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 * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly ids?: string /** * An array of tagIds used to filter the results to only include the tag with the specified IDs * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly tagIds?: string /** * An array of programIds used to filter the results to only include the programs with the specified IDs * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly programIds?: string /** * An array of teamIds used to filter the results to only include the teams with the specified IDs * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly teamIds?: string /** * filter the results to only include questions with title that contains the specified string * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly search?: string /** * The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @type {number} * @memberof StatsApiGetQuestionsStats */ readonly page?: number /** * The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @type {number} * @memberof StatsApiGetQuestionsStats */ readonly itemsPerPage?: number /** * filter the results to only include entities who have a score above or equal to the specified value * @type {number} * @memberof StatsApiGetQuestionsStats */ readonly scoreAboveOrEqual?: number /** * filter the results to only include entities who have a score below or equal to the specified value * @type {number} * @memberof StatsApiGetQuestionsStats */ readonly scoreBelowOrEqual?: number /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly to?: 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. * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly 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. * @type {string} * @memberof StatsApiGetQuestionsStats */ readonly userId?: string } /** * Request parameters for getTagsStats operation in StatsApi. * @export * @interface StatsApiGetTagsStatsRequest */ export interface StatsApiGetTagsStatsRequest { /** * 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 * @type {string} * @memberof StatsApiGetTagsStats */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof StatsApiGetTagsStats */ readonly ids?: string /** * An array of IDs used to filter the results to only include the teams with the specified IDs in the stats calculation * @type {string} * @memberof StatsApiGetTagsStats */ readonly teamIds?: string /** * * @type {string} * @memberof StatsApiGetTagsStats */ readonly search?: string /** * The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @type {number} * @memberof StatsApiGetTagsStats */ readonly page?: number /** * The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @type {number} * @memberof StatsApiGetTagsStats */ readonly itemsPerPage?: number /** * filter the results to only include entities who have a score above or equal to the specified value * @type {number} * @memberof StatsApiGetTagsStats */ readonly scoreAboveOrEqual?: number /** * filter the results to only include entities who have a score below or equal to the specified value * @type {number} * @memberof StatsApiGetTagsStats */ readonly scoreBelowOrEqual?: number /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetTagsStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetTagsStats */ readonly to?: 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. * @type {string} * @memberof StatsApiGetTagsStats */ readonly 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. * @type {string} * @memberof StatsApiGetTagsStats */ readonly userId?: string } /** * Request parameters for getTeamsStats operation in StatsApi. * @export * @interface StatsApiGetTeamsStatsRequest */ export interface StatsApiGetTeamsStatsRequest { /** * 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 * @type {string} * @memberof StatsApiGetTeamsStats */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof StatsApiGetTeamsStats */ readonly ids?: string /** * An array of IDs used to filter the results to only include the teams with the specified tags * @type {string} * @memberof StatsApiGetTeamsStats */ readonly tagIds?: string /** * The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @type {number} * @memberof StatsApiGetTeamsStats */ readonly page?: number /** * The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @type {number} * @memberof StatsApiGetTeamsStats */ readonly itemsPerPage?: number /** * filter the results to only include entities who have a score above or equal to the specified value * @type {number} * @memberof StatsApiGetTeamsStats */ readonly scoreAboveOrEqual?: number /** * filter the results to only include entities who have a score below or equal to the specified value * @type {number} * @memberof StatsApiGetTeamsStats */ readonly scoreBelowOrEqual?: number /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetTeamsStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetTeamsStats */ readonly to?: 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. * @type {string} * @memberof StatsApiGetTeamsStats */ readonly 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. * @type {string} * @memberof StatsApiGetTeamsStats */ readonly userId?: string } /** * Request parameters for getUsersStats operation in StatsApi. * @export * @interface StatsApiGetUsersStatsRequest */ export interface StatsApiGetUsersStatsRequest { /** * 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 * @type {string} * @memberof StatsApiGetUsersStats */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof StatsApiGetUsersStats */ readonly ids?: string /** * An array of teamIds used to filter the results to only include users in teams specified by the IDs. * @type {string} * @memberof StatsApiGetUsersStats */ readonly teamIds?: string /** * filter the results to only include entities with a name that contains the specified string * @type {string} * @memberof StatsApiGetUsersStats */ readonly search?: string /** * The threshold used to calculate the `respondsRegularly` field. This corresponds to the number of responses per day a user need to have the `respondsRegularly` field set to true. By default, the threshold is 6/7 (corresponds ~0.85 response per days, this is equivalent to 6 responses per week, the number of questions sent to the connector per week). * @type {number} * @memberof StatsApiGetUsersStats */ readonly respondsRegularlyThreshold?: number /** * The user id to filter the results by. This will filter the results by the given user id and will only return the stats for this user. TODO should be removed when n8n and the frontend will be updated to use the `ids` query param. * @type {string} * @memberof StatsApiGetUsersStats */ readonly filterByUserId?: string /** * The page number to retrieve. The default value is 1. The minimum value is 1. ?page=1 * @type {number} * @memberof StatsApiGetUsersStats */ readonly page?: number /** * The number of items per page to retrieve. The default value is temporary to 1000. to keep the API working as before. It will be set to 10 when the frontend is ready for this change. * @type {number} * @memberof StatsApiGetUsersStats */ readonly itemsPerPage?: number /** * filter the results to only include entities who have a score above or equal to the specified value * @type {number} * @memberof StatsApiGetUsersStats */ readonly scoreAboveOrEqual?: number /** * filter the results to only include entities who have a score below or equal to the specified value * @type {number} * @memberof StatsApiGetUsersStats */ readonly scoreBelowOrEqual?: number /** * No default value (will take all the results from the date of the first guess) if only `from` is provided, it will take all the results from the date of the `from` date to the current Date. The format of the datetime should be ISO 8601 with timezone: YYYY-MM-DDTHH:mm:ss.sssZ. Example: 2023-02-27T21:42:00.000Z. * @type {string} * @memberof StatsApiGetUsersStats */ readonly from?: string /** * A date used to filter the results based on creation date of the guesses. the operator used for this filter is <= (less than or equal to) If the `to` field is provided with a date without a time, it will include resources started 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. * @type {string} * @memberof StatsApiGetUsersStats */ readonly to?: 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. * @type {string} * @memberof StatsApiGetUsersStats */ readonly 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. * @type {string} * @memberof StatsApiGetUsersStats */ readonly userId?: string } /** * StatsApi - object-oriented interface * @export * @class StatsApi * @extends {BaseAPI} */ export class StatsApi extends BaseAPI { /** * * @summary Get company statistics * @param {StatsApiGetCompanyStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getCompanyStats(requestParameters: StatsApiGetCompanyStatsRequest, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getCompanyStats(requestParameters.id, requestParameters.companyId, requestParameters.userId, requestParameters.from, requestParameters.to, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get programs statistics * @param {StatsApiGetProgramsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getProgramsStats(requestParameters: StatsApiGetProgramsStatsRequest = {}, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getProgramsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.progressAboveOrEqual, requestParameters.progressBelowOrEqual, requestParameters.isAccelerated, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get questions statistics * @param {StatsApiGetQuestionsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getQuestionsStats(requestParameters: StatsApiGetQuestionsStatsRequest = {}, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getQuestionsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.programIds, requestParameters.teamIds, requestParameters.search, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get tags statistics * @param {StatsApiGetTagsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getTagsStats(requestParameters: StatsApiGetTagsStatsRequest = {}, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getTagsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get teams statistics * @param {StatsApiGetTeamsStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getTeamsStats(requestParameters: StatsApiGetTeamsStatsRequest = {}, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getTeamsStats(requestParameters.sortBy, requestParameters.ids, requestParameters.tagIds, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Get users statistics * @param {StatsApiGetUsersStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatsApi */ public getUsersStats(requestParameters: StatsApiGetUsersStatsRequest = {}, options?: AxiosRequestConfig) { return StatsApiFp(this.configuration).getUsersStats(requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.search, requestParameters.respondsRegularlyThreshold, requestParameters.filterByUserId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.scoreAboveOrEqual, requestParameters.scoreBelowOrEqual, requestParameters.from, requestParameters.to, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * TagsApi - axios parameter creator * @export */ export const TagsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Adds questions to a tag with the given ID. * @summary Adds questions to a tag with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addQuestionsToTag: async (id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('addQuestionsToTag', 'id', id) // verify required parameter 'altoBaseIdsDto' is not null or undefined assertParamExists('addQuestionsToTag', 'altoBaseIdsDto', altoBaseIdsDto) const localVarPath = `/v1/tags/{id}/questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(altoBaseIdsDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles POST requests to the \'/tags\' route to create a new tag using the data passed in the body. It will respond with the newly created tag. * @summary Create a new tag * @param {CreateTagDto} createTagDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTag: async (createTagDto: CreateTagDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createTagDto' is not null or undefined assertParamExists('createTag', 'createTagDto', createTagDto) const localVarPath = `/v1/tags`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createTagDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/tags/:id\' route, it \"softDelete\" a single tag 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... * @summary Soft delete\" an existing tag by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTag: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteTag', 'id', id) const localVarPath = `/v1/tags/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/tags/{:id}\' route with `{:id}` the id of the tag we want to find. If the tag exists it will return it, if not we respond with an error not found. * @summary Get a single tag by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTagById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getTagById', 'id', id) const localVarPath = `/v1/tags/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/tags\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated tags along with the current state of pagination . * @summary Get Tags with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {string} [search] * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTags: async (createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, search?: string, companyId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/tags`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/tags/:id\' route where :id is a tag ID, it updates a single tag with the ID :id and return it. If the tag with ID does not exists we return an error. * @summary Patch an existing tag by ID * @param {string} id * @param {PatchTagDto} patchTagDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchTag: async (id: string, patchTagDto: PatchTagDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchTag', 'id', id) // verify required parameter 'patchTagDto' is not null or undefined assertParamExists('patchTag', 'patchTagDto', patchTagDto) const localVarPath = `/v1/tags/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchTagDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Unassign questions from a tag with the given ID. * @summary unassign questions from a tag with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignQuestionsFromTag: async (id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('unassignQuestionsFromTag', 'id', id) // verify required parameter 'altoBaseIdsDto' is not null or undefined assertParamExists('unassignQuestionsFromTag', 'altoBaseIdsDto', altoBaseIdsDto) const localVarPath = `/v1/tags/{id}/questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(altoBaseIdsDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TagsApi - functional programming interface * @export */ export const TagsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TagsApiAxiosParamCreator(configuration) return { /** * Adds questions to a tag with the given ID. * @summary Adds questions to a tag with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async addQuestionsToTag(id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.addQuestionsToTag(id, altoBaseIdsDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles POST requests to the \'/tags\' route to create a new tag using the data passed in the body. It will respond with the newly created tag. * @summary Create a new tag * @param {CreateTagDto} createTagDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createTag(createTagDto: CreateTagDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createTag(createTagDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/tags/:id\' route, it \"softDelete\" a single tag 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... * @summary Soft delete\" an existing tag by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteTag(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTag(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/tags/{:id}\' route with `{:id}` the id of the tag we want to find. If the tag exists it will return it, if not we respond with an error not found. * @summary Get a single tag by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTagById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTagById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/tags\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated tags along with the current state of pagination . * @summary Get Tags with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {string} [search] * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTags(createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, search?: string, companyId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTags(createdBy, sortBy, ids, userId, page, itemsPerPage, createdAfter, createdBefore, search, companyId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/tags/:id\' route where :id is a tag ID, it updates a single tag with the ID :id and return it. If the tag with ID does not exists we return an error. * @summary Patch an existing tag by ID * @param {string} id * @param {PatchTagDto} patchTagDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchTag(id: string, patchTagDto: PatchTagDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchTag(id, patchTagDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Unassign questions from a tag with the given ID. * @summary unassign questions from a tag with the given ID * @param {string} id * @param {AltoBaseIdsDto} altoBaseIdsDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async unassignQuestionsFromTag(id: string, altoBaseIdsDto: AltoBaseIdsDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.unassignQuestionsFromTag(id, altoBaseIdsDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * TagsApi - factory interface * @export */ export const TagsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TagsApiFp(configuration) return { /** * Adds questions to a tag with the given ID. * @summary Adds questions to a tag with the given ID * @param {TagsApiAddQuestionsToTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ addQuestionsToTag(requestParameters: TagsApiAddQuestionsToTagRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.addQuestionsToTag(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles POST requests to the \'/tags\' route to create a new tag using the data passed in the body. It will respond with the newly created tag. * @summary Create a new tag * @param {TagsApiCreateTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTag(requestParameters: TagsApiCreateTagRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createTag(requestParameters.createTagDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/tags/:id\' route, it \"softDelete\" a single tag 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... * @summary Soft delete\" an existing tag by ID * @param {TagsApiDeleteTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTag(requestParameters: TagsApiDeleteTagRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteTag(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/tags/{:id}\' route with `{:id}` the id of the tag we want to find. If the tag exists it will return it, if not we respond with an error not found. * @summary Get a single tag by ID * @param {TagsApiGetTagByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTagById(requestParameters: TagsApiGetTagByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTagById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/tags\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated tags along with the current state of pagination . * @summary Get Tags with filter, sort and pagination options * @param {TagsApiGetTagsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTags(requestParameters: TagsApiGetTagsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTags(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.search, requestParameters.companyId, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/tags/:id\' route where :id is a tag ID, it updates a single tag with the ID :id and return it. If the tag with ID does not exists we return an error. * @summary Patch an existing tag by ID * @param {TagsApiPatchTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchTag(requestParameters: TagsApiPatchTagRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchTag(requestParameters.id, requestParameters.patchTagDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * Unassign questions from a tag with the given ID. * @summary unassign questions from a tag with the given ID * @param {TagsApiUnassignQuestionsFromTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignQuestionsFromTag(requestParameters: TagsApiUnassignQuestionsFromTagRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.unassignQuestionsFromTag(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for addQuestionsToTag operation in TagsApi. * @export * @interface TagsApiAddQuestionsToTagRequest */ export interface TagsApiAddQuestionsToTagRequest { /** * * @type {string} * @memberof TagsApiAddQuestionsToTag */ readonly id: string /** * * @type {AltoBaseIdsDto} * @memberof TagsApiAddQuestionsToTag */ readonly altoBaseIdsDto: AltoBaseIdsDto /** * 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. * @type {string} * @memberof TagsApiAddQuestionsToTag */ readonly 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. * @type {string} * @memberof TagsApiAddQuestionsToTag */ readonly userId?: string } /** * Request parameters for createTag operation in TagsApi. * @export * @interface TagsApiCreateTagRequest */ export interface TagsApiCreateTagRequest { /** * * @type {CreateTagDto} * @memberof TagsApiCreateTag */ readonly createTagDto: CreateTagDto /** * 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. * @type {string} * @memberof TagsApiCreateTag */ readonly 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. * @type {string} * @memberof TagsApiCreateTag */ readonly userId?: string } /** * Request parameters for deleteTag operation in TagsApi. * @export * @interface TagsApiDeleteTagRequest */ export interface TagsApiDeleteTagRequest { /** * * @type {string} * @memberof TagsApiDeleteTag */ readonly 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. * @type {string} * @memberof TagsApiDeleteTag */ readonly 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. * @type {string} * @memberof TagsApiDeleteTag */ readonly userId?: string } /** * Request parameters for getTagById operation in TagsApi. * @export * @interface TagsApiGetTagByIdRequest */ export interface TagsApiGetTagByIdRequest { /** * * @type {string} * @memberof TagsApiGetTagById */ readonly 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. * @type {string} * @memberof TagsApiGetTagById */ readonly 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. * @type {string} * @memberof TagsApiGetTagById */ readonly userId?: string } /** * Request parameters for getTags operation in TagsApi. * @export * @interface TagsApiGetTagsRequest */ export interface TagsApiGetTagsRequest { /** * * @type {string} * @memberof TagsApiGetTags */ readonly 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 * @type {string} * @memberof TagsApiGetTags */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof TagsApiGetTags */ readonly ids?: 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. * @type {string} * @memberof TagsApiGetTags */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof TagsApiGetTags */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof TagsApiGetTags */ readonly 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. * @type {string} * @memberof TagsApiGetTags */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof TagsApiGetTags */ readonly createdBefore?: string /** * * @type {string} * @memberof TagsApiGetTags */ readonly 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. * @type {string} * @memberof TagsApiGetTags */ readonly companyId?: string } /** * Request parameters for patchTag operation in TagsApi. * @export * @interface TagsApiPatchTagRequest */ export interface TagsApiPatchTagRequest { /** * * @type {string} * @memberof TagsApiPatchTag */ readonly id: string /** * * @type {PatchTagDto} * @memberof TagsApiPatchTag */ readonly patchTagDto: PatchTagDto /** * 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. * @type {string} * @memberof TagsApiPatchTag */ readonly 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. * @type {string} * @memberof TagsApiPatchTag */ readonly userId?: string } /** * Request parameters for unassignQuestionsFromTag operation in TagsApi. * @export * @interface TagsApiUnassignQuestionsFromTagRequest */ export interface TagsApiUnassignQuestionsFromTagRequest { /** * * @type {string} * @memberof TagsApiUnassignQuestionsFromTag */ readonly id: string /** * * @type {AltoBaseIdsDto} * @memberof TagsApiUnassignQuestionsFromTag */ readonly altoBaseIdsDto: AltoBaseIdsDto /** * 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. * @type {string} * @memberof TagsApiUnassignQuestionsFromTag */ readonly 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. * @type {string} * @memberof TagsApiUnassignQuestionsFromTag */ readonly userId?: string } /** * TagsApi - object-oriented interface * @export * @class TagsApi * @extends {BaseAPI} */ export class TagsApi extends BaseAPI { /** * Adds questions to a tag with the given ID. * @summary Adds questions to a tag with the given ID * @param {TagsApiAddQuestionsToTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public addQuestionsToTag(requestParameters: TagsApiAddQuestionsToTagRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).addQuestionsToTag(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles POST requests to the \'/tags\' route to create a new tag using the data passed in the body. It will respond with the newly created tag. * @summary Create a new tag * @param {TagsApiCreateTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public createTag(requestParameters: TagsApiCreateTagRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).createTag(requestParameters.createTagDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/tags/:id\' route, it \"softDelete\" a single tag 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... * @summary Soft delete\" an existing tag by ID * @param {TagsApiDeleteTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public deleteTag(requestParameters: TagsApiDeleteTagRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).deleteTag(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/tags/{:id}\' route with `{:id}` the id of the tag we want to find. If the tag exists it will return it, if not we respond with an error not found. * @summary Get a single tag by ID * @param {TagsApiGetTagByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public getTagById(requestParameters: TagsApiGetTagByIdRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).getTagById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/tags\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated tags along with the current state of pagination . * @summary Get Tags with filter, sort and pagination options * @param {TagsApiGetTagsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public getTags(requestParameters: TagsApiGetTagsRequest = {}, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).getTags(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.search, requestParameters.companyId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/tags/:id\' route where :id is a tag ID, it updates a single tag with the ID :id and return it. If the tag with ID does not exists we return an error. * @summary Patch an existing tag by ID * @param {TagsApiPatchTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public patchTag(requestParameters: TagsApiPatchTagRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).patchTag(requestParameters.id, requestParameters.patchTagDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * Unassign questions from a tag with the given ID. * @summary unassign questions from a tag with the given ID * @param {TagsApiUnassignQuestionsFromTagRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TagsApi */ public unassignQuestionsFromTag(requestParameters: TagsApiUnassignQuestionsFromTagRequest, options?: AxiosRequestConfig) { return TagsApiFp(this.configuration).unassignQuestionsFromTag(requestParameters.id, requestParameters.altoBaseIdsDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * TeamsApi - axios parameter creator * @export */ export const TeamsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/teams\' route to create a new team using the data passed in the body. It will respond with the newly created team. * @summary Create a new team * @param {CreateTeamDto} createTeamDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTeam: async (createTeamDto: CreateTeamDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createTeamDto' is not null or undefined assertParamExists('createTeam', 'createTeamDto', createTeamDto) const localVarPath = `/v1/teams`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createTeamDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/teams/:id\' route, it \"softDelete\" a single team 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... * @summary Soft delete\" an existing team by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTeam: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteTeam', 'id', id) const localVarPath = `/v1/teams/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/teams/{:id}\' route with `{:id}` the id of the team we want to find. If the team exists it will return it, if not we respond with an error not found. * @summary Get a single team by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeamById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getTeamById', 'id', id) const localVarPath = `/v1/teams/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/teams\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated teams along with the current state of pagination . * @summary Get Teams with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeams: async (createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, companyId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/teams`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/teams/:id\' route where :id is a team ID, it updates a single team with the ID :id and return it. If the team with ID does not exists we return an error. * @summary Patch an existing team by ID * @param {string} id * @param {PatchTeamDto} patchTeamDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchTeam: async (id: string, patchTeamDto: PatchTeamDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchTeam', 'id', id) // verify required parameter 'patchTeamDto' is not null or undefined assertParamExists('patchTeam', 'patchTeamDto', patchTeamDto) const localVarPath = `/v1/teams/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchTeamDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/update-parcour\' route, it updates the parcour for a specific team and return it. * @summary Update the parcour for a specific team * @param {string} id * @param {UpdateParcourDto} updateParcourDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateParcour: async (id: string, updateParcourDto: UpdateParcourDto, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('updateParcour', 'id', id) // verify required parameter 'updateParcourDto' is not null or undefined assertParamExists('updateParcour', 'updateParcourDto', updateParcourDto) const localVarPath = `/v1/teams/update-parcour/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(updateParcourDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TeamsApi - functional programming interface * @export */ export const TeamsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TeamsApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/teams\' route to create a new team using the data passed in the body. It will respond with the newly created team. * @summary Create a new team * @param {CreateTeamDto} createTeamDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createTeam(createTeamDto: CreateTeamDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createTeam(createTeamDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/teams/:id\' route, it \"softDelete\" a single team 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... * @summary Soft delete\" an existing team by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteTeam(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTeam(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/teams/{:id}\' route with `{:id}` the id of the team we want to find. If the team exists it will return it, if not we respond with an error not found. * @summary Get a single team by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTeamById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTeamById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/teams\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated teams along with the current state of pagination . * @summary Get Teams with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getTeams(createdBy?: string, sortBy?: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, companyId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getTeams(createdBy, sortBy, ids, userId, page, itemsPerPage, createdAfter, createdBefore, companyId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/teams/:id\' route where :id is a team ID, it updates a single team with the ID :id and return it. If the team with ID does not exists we return an error. * @summary Patch an existing team by ID * @param {string} id * @param {PatchTeamDto} patchTeamDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchTeam(id: string, patchTeamDto: PatchTeamDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchTeam(id, patchTeamDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/update-parcour\' route, it updates the parcour for a specific team and return it. * @summary Update the parcour for a specific team * @param {string} id * @param {UpdateParcourDto} updateParcourDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateParcour(id: string, updateParcourDto: UpdateParcourDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateParcour(id, updateParcourDto, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * TeamsApi - factory interface * @export */ export const TeamsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TeamsApiFp(configuration) return { /** * This method handles POST requests to the \'/teams\' route to create a new team using the data passed in the body. It will respond with the newly created team. * @summary Create a new team * @param {TeamsApiCreateTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTeam(requestParameters: TeamsApiCreateTeamRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createTeam(requestParameters.createTeamDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/teams/:id\' route, it \"softDelete\" a single team 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... * @summary Soft delete\" an existing team by ID * @param {TeamsApiDeleteTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTeam(requestParameters: TeamsApiDeleteTeamRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteTeam(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/teams/{:id}\' route with `{:id}` the id of the team we want to find. If the team exists it will return it, if not we respond with an error not found. * @summary Get a single team by ID * @param {TeamsApiGetTeamByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeamById(requestParameters: TeamsApiGetTeamByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTeamById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/teams\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated teams along with the current state of pagination . * @summary Get Teams with filter, sort and pagination options * @param {TeamsApiGetTeamsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTeams(requestParameters: TeamsApiGetTeamsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getTeams(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.companyId, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/teams/:id\' route where :id is a team ID, it updates a single team with the ID :id and return it. If the team with ID does not exists we return an error. * @summary Patch an existing team by ID * @param {TeamsApiPatchTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchTeam(requestParameters: TeamsApiPatchTeamRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchTeam(requestParameters.id, requestParameters.patchTeamDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/update-parcour\' route, it updates the parcour for a specific team and return it. * @summary Update the parcour for a specific team * @param {TeamsApiUpdateParcourRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateParcour(requestParameters: TeamsApiUpdateParcourRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.updateParcour(requestParameters.id, requestParameters.updateParcourDto, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createTeam operation in TeamsApi. * @export * @interface TeamsApiCreateTeamRequest */ export interface TeamsApiCreateTeamRequest { /** * * @type {CreateTeamDto} * @memberof TeamsApiCreateTeam */ readonly createTeamDto: CreateTeamDto /** * 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. * @type {string} * @memberof TeamsApiCreateTeam */ readonly 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. * @type {string} * @memberof TeamsApiCreateTeam */ readonly userId?: string } /** * Request parameters for deleteTeam operation in TeamsApi. * @export * @interface TeamsApiDeleteTeamRequest */ export interface TeamsApiDeleteTeamRequest { /** * * @type {string} * @memberof TeamsApiDeleteTeam */ readonly 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. * @type {string} * @memberof TeamsApiDeleteTeam */ readonly 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. * @type {string} * @memberof TeamsApiDeleteTeam */ readonly userId?: string } /** * Request parameters for getTeamById operation in TeamsApi. * @export * @interface TeamsApiGetTeamByIdRequest */ export interface TeamsApiGetTeamByIdRequest { /** * * @type {string} * @memberof TeamsApiGetTeamById */ readonly 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. * @type {string} * @memberof TeamsApiGetTeamById */ readonly 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. * @type {string} * @memberof TeamsApiGetTeamById */ readonly userId?: string } /** * Request parameters for getTeams operation in TeamsApi. * @export * @interface TeamsApiGetTeamsRequest */ export interface TeamsApiGetTeamsRequest { /** * * @type {string} * @memberof TeamsApiGetTeams */ readonly 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 * @type {string} * @memberof TeamsApiGetTeams */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof TeamsApiGetTeams */ readonly ids?: 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. * @type {string} * @memberof TeamsApiGetTeams */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof TeamsApiGetTeams */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof TeamsApiGetTeams */ readonly 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. * @type {string} * @memberof TeamsApiGetTeams */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof TeamsApiGetTeams */ readonly createdBefore?: 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. * @type {string} * @memberof TeamsApiGetTeams */ readonly companyId?: string } /** * Request parameters for patchTeam operation in TeamsApi. * @export * @interface TeamsApiPatchTeamRequest */ export interface TeamsApiPatchTeamRequest { /** * * @type {string} * @memberof TeamsApiPatchTeam */ readonly id: string /** * * @type {PatchTeamDto} * @memberof TeamsApiPatchTeam */ readonly patchTeamDto: PatchTeamDto /** * 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. * @type {string} * @memberof TeamsApiPatchTeam */ readonly 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. * @type {string} * @memberof TeamsApiPatchTeam */ readonly userId?: string } /** * Request parameters for updateParcour operation in TeamsApi. * @export * @interface TeamsApiUpdateParcourRequest */ export interface TeamsApiUpdateParcourRequest { /** * * @type {string} * @memberof TeamsApiUpdateParcour */ readonly id: string /** * * @type {UpdateParcourDto} * @memberof TeamsApiUpdateParcour */ readonly updateParcourDto: UpdateParcourDto } /** * TeamsApi - object-oriented interface * @export * @class TeamsApi * @extends {BaseAPI} */ export class TeamsApi extends BaseAPI { /** * This method handles POST requests to the \'/teams\' route to create a new team using the data passed in the body. It will respond with the newly created team. * @summary Create a new team * @param {TeamsApiCreateTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public createTeam(requestParameters: TeamsApiCreateTeamRequest, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).createTeam(requestParameters.createTeamDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/teams/:id\' route, it \"softDelete\" a single team 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... * @summary Soft delete\" an existing team by ID * @param {TeamsApiDeleteTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public deleteTeam(requestParameters: TeamsApiDeleteTeamRequest, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).deleteTeam(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/teams/{:id}\' route with `{:id}` the id of the team we want to find. If the team exists it will return it, if not we respond with an error not found. * @summary Get a single team by ID * @param {TeamsApiGetTeamByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public getTeamById(requestParameters: TeamsApiGetTeamByIdRequest, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).getTeamById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/teams\' route with the filter, sort and pagination options passed in the query parameters it will respond with the paginated teams along with the current state of pagination . * @summary Get Teams with filter, sort and pagination options * @param {TeamsApiGetTeamsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public getTeams(requestParameters: TeamsApiGetTeamsRequest = {}, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).getTeams(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.companyId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/teams/:id\' route where :id is a team ID, it updates a single team with the ID :id and return it. If the team with ID does not exists we return an error. * @summary Patch an existing team by ID * @param {TeamsApiPatchTeamRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public patchTeam(requestParameters: TeamsApiPatchTeamRequest, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).patchTeam(requestParameters.id, requestParameters.patchTeamDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/update-parcour\' route, it updates the parcour for a specific team and return it. * @summary Update the parcour for a specific team * @param {TeamsApiUpdateParcourRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TeamsApi */ public updateParcour(requestParameters: TeamsApiUpdateParcourRequest, options?: AxiosRequestConfig) { return TeamsApiFp(this.configuration).updateParcour(requestParameters.id, requestParameters.updateParcourDto, options).then((request) => request(this.axios, this.basePath)); } } /** * TheOfficeApi - axios parameter creator * @export */ export const TheOfficeApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Receive a message from the PubSub subscription * @param {*} [options] Override http request option. * @throws {RequiredError} */ theOfficeMessages: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/the-office/messages`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TheOfficeApi - functional programming interface * @export */ export const TheOfficeApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TheOfficeApiAxiosParamCreator(configuration) return { /** * * @summary Receive a message from the PubSub subscription * @param {*} [options] Override http request option. * @throws {RequiredError} */ async theOfficeMessages(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.theOfficeMessages(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * TheOfficeApi - factory interface * @export */ export const TheOfficeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TheOfficeApiFp(configuration) return { /** * * @summary Receive a message from the PubSub subscription * @param {*} [options] Override http request option. * @throws {RequiredError} */ theOfficeMessages(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.theOfficeMessages(options).then((request) => request(axios, basePath)); }, }; }; /** * TheOfficeApi - object-oriented interface * @export * @class TheOfficeApi * @extends {BaseAPI} */ export class TheOfficeApi extends BaseAPI { /** * * @summary Receive a message from the PubSub subscription * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TheOfficeApi */ public theOfficeMessages(options?: AxiosRequestConfig) { return TheOfficeApiFp(this.configuration).theOfficeMessages(options).then((request) => request(this.axios, this.basePath)); } } /** * TriggersApi - axios parameter creator * @export */ export const TriggersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This endpoint is used to trigger the accelerated program event In production it should be called by a company lead It will trigger the accelerated program event for the teams concerned by the event * @summary Trigger the accelerated program * @param {string} acceleratedProgramId The id of the accelerated program to trigger * @param {string} companyId The id of the company to trigger * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerAcceleratedProgram: async (acceleratedProgramId: string, companyId: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'acceleratedProgramId' is not null or undefined assertParamExists('triggerAcceleratedProgram', 'acceleratedProgramId', acceleratedProgramId) // verify required parameter 'companyId' is not null or undefined assertParamExists('triggerAcceleratedProgram', 'companyId', companyId) const localVarPath = `/v1/triggers/accelerated-program`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (acceleratedProgramId !== undefined) { localVarQueryParameter['acceleratedProgramId'] = acceleratedProgramId; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the email-ask-slack-authorization it will be called by a trainX lead to ask the slack admin to authorize Alto to access the slack workspace * @summary Trigger the ask slack authorization event to send an email to the slack admin to ask him to authorize Alto to access the slack workspace * @param {string} slackAdminEmail email of the slack admin to send the slack authorization request email to * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerAskSlackAuthorization: async (slackAdminEmail: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'slackAdminEmail' is not null or undefined assertParamExists('triggerAskSlackAuthorization', 'slackAdminEmail', slackAdminEmail) const localVarPath = `/v1/triggers/email-ask-slack-authorization`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (slackAdminEmail !== undefined) { localVarQueryParameter['slackAdminEmail'] = slackAdminEmail; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the company stats event In production it should be called by a cron job at the specified datetime It will trigger the company stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company stats and the id of the user who will receive the event * @summary Trigger the company stats event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerCompanyStats: async (companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/company-stats`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the email-send-gchat-instruction it will be called by a trainX lead to send an email to the users to explain how to install the gchat connector * @summary Trigger the send gchat instruction event to send an email to the users to explain how to install the gchat connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSendGchatInstruction: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/email-send-gchat-instruction`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the email-send-teams-instruction it will be called by a trainX lead to send an email to the users to explain how to install the Microsoft teams connector * @summary Trigger the send microsoft Teams instruction event to send an email to the users to explain how to install the microsoft teams connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSendTeamsInstruction: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/email-send-teams-instruction`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the session continue event In production it should be called by a cron job at the specified time (connectorTime for example) It will trigger the session continue event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and a list of questions * @summary Trigger the session continue * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [questionIds] An array of question idsto send to the connector when the trigger is triggered if not provided, the getNextQuestion algorithm will be used to get the next question if provided, the getNextQuestion algorithm will be ignored and the questionIds will be used to push the questions Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSessionContinue: async (companyIds?: string, userIds?: string, datetime?: string, questionIds?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/session-continue`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (questionIds !== undefined) { localVarQueryParameter['questionIds'] = questionIds; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the users stats event In production it should be called by a cron job at the specified datetime It will trigger the users stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the user statistics * @summary Trigger the users stats event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUserStats: async (companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/user-stats`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the users inactivity event In production it should be called by a cron job at the specified time It will trigger the users inactivity event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and the inactive users * @summary Trigger the users inactivity event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUsersInactivity: async (companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/users-inactivity`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the trainx-notif-user-no-activity-for-15days In production it should be called by a daily cron job It will trigger check activity for all companies and users and send an email to the users who have not been active for 15 days * @summary Trigger the users no activity event to send an email to users who have not been active for 15 days * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUsersNoActivity: async (companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/mail-users-no-activity`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This endpoint is used to trigger the waiting moderation event In production it should be called by a cron job at the specified time It will trigger the waiting moderation event for all companies and leads concerned by the event It will send an event on the right topic the event will contains the company and lead ids and the number of comments and questions submitted * @summary Trigger the waiting moderation event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerWaitingModeration: async (companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/triggers/waiting-moderation`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyIds !== undefined) { localVarQueryParameter['companyIds'] = companyIds; } if (userIds !== undefined) { localVarQueryParameter['userIds'] = userIds; } if (datetime !== undefined) { localVarQueryParameter['datetime'] = (datetime as any instanceof Date) ? (datetime as any).toISOString() : datetime; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * TriggersApi - functional programming interface * @export */ export const TriggersApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TriggersApiAxiosParamCreator(configuration) return { /** * This endpoint is used to trigger the accelerated program event In production it should be called by a company lead It will trigger the accelerated program event for the teams concerned by the event * @summary Trigger the accelerated program * @param {string} acceleratedProgramId The id of the accelerated program to trigger * @param {string} companyId The id of the company to trigger * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerAcceleratedProgram(acceleratedProgramId: string, companyId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerAcceleratedProgram(acceleratedProgramId, companyId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the email-ask-slack-authorization it will be called by a trainX lead to ask the slack admin to authorize Alto to access the slack workspace * @summary Trigger the ask slack authorization event to send an email to the slack admin to ask him to authorize Alto to access the slack workspace * @param {string} slackAdminEmail email of the slack admin to send the slack authorization request email to * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerAskSlackAuthorization(slackAdminEmail: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerAskSlackAuthorization(slackAdminEmail, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the company stats event In production it should be called by a cron job at the specified datetime It will trigger the company stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company stats and the id of the user who will receive the event * @summary Trigger the company stats event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerCompanyStats(companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerCompanyStats(companyIds, userIds, datetime, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the email-send-gchat-instruction it will be called by a trainX lead to send an email to the users to explain how to install the gchat connector * @summary Trigger the send gchat instruction event to send an email to the users to explain how to install the gchat connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerSendGchatInstruction(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSendGchatInstruction(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the email-send-teams-instruction it will be called by a trainX lead to send an email to the users to explain how to install the Microsoft teams connector * @summary Trigger the send microsoft Teams instruction event to send an email to the users to explain how to install the microsoft teams connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerSendTeamsInstruction(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSendTeamsInstruction(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the session continue event In production it should be called by a cron job at the specified time (connectorTime for example) It will trigger the session continue event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and a list of questions * @summary Trigger the session continue * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [questionIds] An array of question idsto send to the connector when the trigger is triggered if not provided, the getNextQuestion algorithm will be used to get the next question if provided, the getNextQuestion algorithm will be ignored and the questionIds will be used to push the questions Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerSessionContinue(companyIds?: string, userIds?: string, datetime?: string, questionIds?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerSessionContinue(companyIds, userIds, datetime, questionIds, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the users stats event In production it should be called by a cron job at the specified datetime It will trigger the users stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the user statistics * @summary Trigger the users stats event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerUserStats(companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerUserStats(companyIds, userIds, datetime, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the users inactivity event In production it should be called by a cron job at the specified time It will trigger the users inactivity event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and the inactive users * @summary Trigger the users inactivity event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerUsersInactivity(companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerUsersInactivity(companyIds, userIds, datetime, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the trainx-notif-user-no-activity-for-15days In production it should be called by a daily cron job It will trigger check activity for all companies and users and send an email to the users who have not been active for 15 days * @summary Trigger the users no activity event to send an email to users who have not been active for 15 days * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerUsersNoActivity(companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerUsersNoActivity(companyIds, userIds, datetime, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This endpoint is used to trigger the waiting moderation event In production it should be called by a cron job at the specified time It will trigger the waiting moderation event for all companies and leads concerned by the event It will send an event on the right topic the event will contains the company and lead ids and the number of comments and questions submitted * @summary Trigger the waiting moderation event * @param {string} [companyIds] An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [userIds] An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @param {string} [datetime] The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async triggerWaitingModeration(companyIds?: string, userIds?: string, datetime?: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.triggerWaitingModeration(companyIds, userIds, datetime, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * TriggersApi - factory interface * @export */ export const TriggersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = TriggersApiFp(configuration) return { /** * This endpoint is used to trigger the accelerated program event In production it should be called by a company lead It will trigger the accelerated program event for the teams concerned by the event * @summary Trigger the accelerated program * @param {TriggersApiTriggerAcceleratedProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerAcceleratedProgram(requestParameters: TriggersApiTriggerAcceleratedProgramRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerAcceleratedProgram(requestParameters.acceleratedProgramId, requestParameters.companyId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the email-ask-slack-authorization it will be called by a trainX lead to ask the slack admin to authorize Alto to access the slack workspace * @summary Trigger the ask slack authorization event to send an email to the slack admin to ask him to authorize Alto to access the slack workspace * @param {TriggersApiTriggerAskSlackAuthorizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerAskSlackAuthorization(requestParameters: TriggersApiTriggerAskSlackAuthorizationRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerAskSlackAuthorization(requestParameters.slackAdminEmail, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the company stats event In production it should be called by a cron job at the specified datetime It will trigger the company stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company stats and the id of the user who will receive the event * @summary Trigger the company stats event * @param {TriggersApiTriggerCompanyStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerCompanyStats(requestParameters: TriggersApiTriggerCompanyStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerCompanyStats(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the email-send-gchat-instruction it will be called by a trainX lead to send an email to the users to explain how to install the gchat connector * @summary Trigger the send gchat instruction event to send an email to the users to explain how to install the gchat connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSendGchatInstruction(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerSendGchatInstruction(options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the email-send-teams-instruction it will be called by a trainX lead to send an email to the users to explain how to install the Microsoft teams connector * @summary Trigger the send microsoft Teams instruction event to send an email to the users to explain how to install the microsoft teams connector * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSendTeamsInstruction(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerSendTeamsInstruction(options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the session continue event In production it should be called by a cron job at the specified time (connectorTime for example) It will trigger the session continue event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and a list of questions * @summary Trigger the session continue * @param {TriggersApiTriggerSessionContinueRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerSessionContinue(requestParameters: TriggersApiTriggerSessionContinueRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerSessionContinue(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.questionIds, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the users stats event In production it should be called by a cron job at the specified datetime It will trigger the users stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the user statistics * @summary Trigger the users stats event * @param {TriggersApiTriggerUserStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUserStats(requestParameters: TriggersApiTriggerUserStatsRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerUserStats(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the users inactivity event In production it should be called by a cron job at the specified time It will trigger the users inactivity event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and the inactive users * @summary Trigger the users inactivity event * @param {TriggersApiTriggerUsersInactivityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUsersInactivity(requestParameters: TriggersApiTriggerUsersInactivityRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerUsersInactivity(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the trainx-notif-user-no-activity-for-15days In production it should be called by a daily cron job It will trigger check activity for all companies and users and send an email to the users who have not been active for 15 days * @summary Trigger the users no activity event to send an email to users who have not been active for 15 days * @param {TriggersApiTriggerUsersNoActivityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerUsersNoActivity(requestParameters: TriggersApiTriggerUsersNoActivityRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerUsersNoActivity(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This endpoint is used to trigger the waiting moderation event In production it should be called by a cron job at the specified time It will trigger the waiting moderation event for all companies and leads concerned by the event It will send an event on the right topic the event will contains the company and lead ids and the number of comments and questions submitted * @summary Trigger the waiting moderation event * @param {TriggersApiTriggerWaitingModerationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ triggerWaitingModeration(requestParameters: TriggersApiTriggerWaitingModerationRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.triggerWaitingModeration(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for triggerAcceleratedProgram operation in TriggersApi. * @export * @interface TriggersApiTriggerAcceleratedProgramRequest */ export interface TriggersApiTriggerAcceleratedProgramRequest { /** * The id of the accelerated program to trigger * @type {string} * @memberof TriggersApiTriggerAcceleratedProgram */ readonly acceleratedProgramId: string /** * The id of the company to trigger * @type {string} * @memberof TriggersApiTriggerAcceleratedProgram */ readonly companyId: string } /** * Request parameters for triggerAskSlackAuthorization operation in TriggersApi. * @export * @interface TriggersApiTriggerAskSlackAuthorizationRequest */ export interface TriggersApiTriggerAskSlackAuthorizationRequest { /** * email of the slack admin to send the slack authorization request email to * @type {string} * @memberof TriggersApiTriggerAskSlackAuthorization */ readonly slackAdminEmail: string } /** * Request parameters for triggerCompanyStats operation in TriggersApi. * @export * @interface TriggersApiTriggerCompanyStatsRequest */ export interface TriggersApiTriggerCompanyStatsRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerCompanyStats */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerCompanyStats */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerCompanyStats */ readonly datetime?: 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. * @type {string} * @memberof TriggersApiTriggerCompanyStats */ readonly 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. * @type {string} * @memberof TriggersApiTriggerCompanyStats */ readonly userId?: string } /** * Request parameters for triggerSessionContinue operation in TriggersApi. * @export * @interface TriggersApiTriggerSessionContinueRequest */ export interface TriggersApiTriggerSessionContinueRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly datetime?: string /** * An array of question idsto send to the connector when the trigger is triggered if not provided, the getNextQuestion algorithm will be used to get the next question if provided, the getNextQuestion algorithm will be ignored and the questionIds will be used to push the questions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly questionIds?: 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. * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly 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. * @type {string} * @memberof TriggersApiTriggerSessionContinue */ readonly userId?: string } /** * Request parameters for triggerUserStats operation in TriggersApi. * @export * @interface TriggersApiTriggerUserStatsRequest */ export interface TriggersApiTriggerUserStatsRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUserStats */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUserStats */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUserStats */ readonly datetime?: 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. * @type {string} * @memberof TriggersApiTriggerUserStats */ readonly 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. * @type {string} * @memberof TriggersApiTriggerUserStats */ readonly userId?: string } /** * Request parameters for triggerUsersInactivity operation in TriggersApi. * @export * @interface TriggersApiTriggerUsersInactivityRequest */ export interface TriggersApiTriggerUsersInactivityRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersInactivity */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersInactivity */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersInactivity */ readonly datetime?: 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. * @type {string} * @memberof TriggersApiTriggerUsersInactivity */ readonly 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. * @type {string} * @memberof TriggersApiTriggerUsersInactivity */ readonly userId?: string } /** * Request parameters for triggerUsersNoActivity operation in TriggersApi. * @export * @interface TriggersApiTriggerUsersNoActivityRequest */ export interface TriggersApiTriggerUsersNoActivityRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersNoActivity */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersNoActivity */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerUsersNoActivity */ readonly datetime?: 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. * @type {string} * @memberof TriggersApiTriggerUsersNoActivity */ readonly 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. * @type {string} * @memberof TriggersApiTriggerUsersNoActivity */ readonly userId?: string } /** * Request parameters for triggerWaitingModeration operation in TriggersApi. * @export * @interface TriggersApiTriggerWaitingModerationRequest */ export interface TriggersApiTriggerWaitingModerationRequest { /** * An array of company ids to filter company that will be concerned by the trigger The company still need to match the trigger conditions (Connector time, Connector day, etc.) if not provided, all companies will be concerned by the trigger and the company will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerWaitingModeration */ readonly companyIds?: string /** * An array of user ids to filter users that will be concerned by the trigger The user still need to match the trigger conditions (Company concerned by the trigger, Connector is active, etc.) if not provided, all users will be concerned by the trigger and the user will be filtered by the trigger conditions Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerWaitingModeration */ readonly userIds?: string /** * The datetime to use to trigger the session continue (used to simulate a trigger in the past or in the future for example) Should be used only for debug and test purpose and not in production * @type {string} * @memberof TriggersApiTriggerWaitingModeration */ readonly datetime?: 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. * @type {string} * @memberof TriggersApiTriggerWaitingModeration */ readonly 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. * @type {string} * @memberof TriggersApiTriggerWaitingModeration */ readonly userId?: string } /** * TriggersApi - object-oriented interface * @export * @class TriggersApi * @extends {BaseAPI} */ export class TriggersApi extends BaseAPI { /** * This endpoint is used to trigger the accelerated program event In production it should be called by a company lead It will trigger the accelerated program event for the teams concerned by the event * @summary Trigger the accelerated program * @param {TriggersApiTriggerAcceleratedProgramRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerAcceleratedProgram(requestParameters: TriggersApiTriggerAcceleratedProgramRequest, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerAcceleratedProgram(requestParameters.acceleratedProgramId, requestParameters.companyId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the email-ask-slack-authorization it will be called by a trainX lead to ask the slack admin to authorize Alto to access the slack workspace * @summary Trigger the ask slack authorization event to send an email to the slack admin to ask him to authorize Alto to access the slack workspace * @param {TriggersApiTriggerAskSlackAuthorizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerAskSlackAuthorization(requestParameters: TriggersApiTriggerAskSlackAuthorizationRequest, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerAskSlackAuthorization(requestParameters.slackAdminEmail, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the company stats event In production it should be called by a cron job at the specified datetime It will trigger the company stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company stats and the id of the user who will receive the event * @summary Trigger the company stats event * @param {TriggersApiTriggerCompanyStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerCompanyStats(requestParameters: TriggersApiTriggerCompanyStatsRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerCompanyStats(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the email-send-gchat-instruction it will be called by a trainX lead to send an email to the users to explain how to install the gchat connector * @summary Trigger the send gchat instruction event to send an email to the users to explain how to install the gchat connector * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerSendGchatInstruction(options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerSendGchatInstruction(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the email-send-teams-instruction it will be called by a trainX lead to send an email to the users to explain how to install the Microsoft teams connector * @summary Trigger the send microsoft Teams instruction event to send an email to the users to explain how to install the microsoft teams connector * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerSendTeamsInstruction(options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerSendTeamsInstruction(options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the session continue event In production it should be called by a cron job at the specified time (connectorTime for example) It will trigger the session continue event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and a list of questions * @summary Trigger the session continue * @param {TriggersApiTriggerSessionContinueRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerSessionContinue(requestParameters: TriggersApiTriggerSessionContinueRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerSessionContinue(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.questionIds, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the users stats event In production it should be called by a cron job at the specified datetime It will trigger the users stats event for all companies and users concerned by the event It will send an event on the right topic the event will contains the user statistics * @summary Trigger the users stats event * @param {TriggersApiTriggerUserStatsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerUserStats(requestParameters: TriggersApiTriggerUserStatsRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerUserStats(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the users inactivity event In production it should be called by a cron job at the specified time It will trigger the users inactivity event for all companies and users concerned by the event It will send an event on the right topic the event will contains the company and user ids and the inactive users * @summary Trigger the users inactivity event * @param {TriggersApiTriggerUsersInactivityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerUsersInactivity(requestParameters: TriggersApiTriggerUsersInactivityRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerUsersInactivity(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the trainx-notif-user-no-activity-for-15days In production it should be called by a daily cron job It will trigger check activity for all companies and users and send an email to the users who have not been active for 15 days * @summary Trigger the users no activity event to send an email to users who have not been active for 15 days * @param {TriggersApiTriggerUsersNoActivityRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerUsersNoActivity(requestParameters: TriggersApiTriggerUsersNoActivityRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerUsersNoActivity(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This endpoint is used to trigger the waiting moderation event In production it should be called by a cron job at the specified time It will trigger the waiting moderation event for all companies and leads concerned by the event It will send an event on the right topic the event will contains the company and lead ids and the number of comments and questions submitted * @summary Trigger the waiting moderation event * @param {TriggersApiTriggerWaitingModerationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TriggersApi */ public triggerWaitingModeration(requestParameters: TriggersApiTriggerWaitingModerationRequest = {}, options?: AxiosRequestConfig) { return TriggersApiFp(this.configuration).triggerWaitingModeration(requestParameters.companyIds, requestParameters.userIds, requestParameters.datetime, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } } /** * UploadsApi - axios parameter creator * @export */ export const UploadsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Import .csv file following the format below:

Question,A,B,C,D,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,KB_Link
What is the capital of France?,Paris,London,Berlin,Madrid,A,Paris is the capital of France,Geography,Capitals,https://en.wikipedia.org/wiki/Paris
What is the capital of Germany?,Paris,London,Berlin,Madrid,C,Berlin is the capital of Germany,Geography,Capitals,https://en.wikipedia.org/wiki/Berlin

If you want to custom the number of propositions, you need to add a \"AnswersColNames\" column listing the columns names.
For example, if you want to have 3 propositions, you need to add a column \"AnswersColNames\" with the value \"A,B,C\".
Question,A,B,C,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,Berlin,A,Paris is the capital of France,Geography,Capitals,A,B,C,https://en.wikipedia.org/wiki/Paris,

You can also custom the propositions columns headers and add them to the \"AnswersColNames\" column.
For example, if you want to have 2 propositions with the headers \"Proposition 1\" and \"Proposition 2\", you need to add a column \"AnswersColNames\" with the value \"Proposition 1,Proposition 2\".
Question,Proposition 1,Proposition 2,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,A,Paris is the capital of France,Geography,Capitals,Proposition 1,Proposition 2,https://en.wikipedia.org/wiki/Paris,

* @summary * @param {File} file * @param {string} companyId2 * @param {string} userId2 * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {string} [coachId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadsControllerUploadQuestions: async (file: File, companyId2: string, userId2: string, companyId?: string, userId?: string, coachId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'file' is not null or undefined assertParamExists('uploadsControllerUploadQuestions', 'file', file) // verify required parameter 'companyId2' is not null or undefined assertParamExists('uploadsControllerUploadQuestions', 'companyId2', companyId2) // verify required parameter 'userId2' is not null or undefined assertParamExists('uploadsControllerUploadQuestions', 'userId2', userId2) const localVarPath = `/v1/uploads/questions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (file !== undefined) { localVarFormParams.append('file', file as any); } if (companyId2 !== undefined) { localVarFormParams.append('companyId', companyId2 as any); } if (userId2 !== undefined) { localVarFormParams.append('userId', userId2 as any); } if (coachId !== undefined) { localVarFormParams.append('coachId', coachId as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * UploadsApi - functional programming interface * @export */ export const UploadsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UploadsApiAxiosParamCreator(configuration) return { /** * Import .csv file following the format below:

Question,A,B,C,D,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,KB_Link
What is the capital of France?,Paris,London,Berlin,Madrid,A,Paris is the capital of France,Geography,Capitals,https://en.wikipedia.org/wiki/Paris
What is the capital of Germany?,Paris,London,Berlin,Madrid,C,Berlin is the capital of Germany,Geography,Capitals,https://en.wikipedia.org/wiki/Berlin

If you want to custom the number of propositions, you need to add a \"AnswersColNames\" column listing the columns names.
For example, if you want to have 3 propositions, you need to add a column \"AnswersColNames\" with the value \"A,B,C\".
Question,A,B,C,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,Berlin,A,Paris is the capital of France,Geography,Capitals,A,B,C,https://en.wikipedia.org/wiki/Paris,

You can also custom the propositions columns headers and add them to the \"AnswersColNames\" column.
For example, if you want to have 2 propositions with the headers \"Proposition 1\" and \"Proposition 2\", you need to add a column \"AnswersColNames\" with the value \"Proposition 1,Proposition 2\".
Question,Proposition 1,Proposition 2,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,A,Paris is the capital of France,Geography,Capitals,Proposition 1,Proposition 2,https://en.wikipedia.org/wiki/Paris,

* @summary * @param {File} file * @param {string} companyId2 * @param {string} userId2 * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {string} [coachId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async uploadsControllerUploadQuestions(file: File, companyId2: string, userId2: string, companyId?: string, userId?: string, coachId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.uploadsControllerUploadQuestions(file, companyId2, userId2, companyId, userId, coachId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * UploadsApi - factory interface * @export */ export const UploadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = UploadsApiFp(configuration) return { /** * Import .csv file following the format below:

Question,A,B,C,D,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,KB_Link
What is the capital of France?,Paris,London,Berlin,Madrid,A,Paris is the capital of France,Geography,Capitals,https://en.wikipedia.org/wiki/Paris
What is the capital of Germany?,Paris,London,Berlin,Madrid,C,Berlin is the capital of Germany,Geography,Capitals,https://en.wikipedia.org/wiki/Berlin

If you want to custom the number of propositions, you need to add a \"AnswersColNames\" column listing the columns names.
For example, if you want to have 3 propositions, you need to add a column \"AnswersColNames\" with the value \"A,B,C\".
Question,A,B,C,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,Berlin,A,Paris is the capital of France,Geography,Capitals,A,B,C,https://en.wikipedia.org/wiki/Paris,

You can also custom the propositions columns headers and add them to the \"AnswersColNames\" column.
For example, if you want to have 2 propositions with the headers \"Proposition 1\" and \"Proposition 2\", you need to add a column \"AnswersColNames\" with the value \"Proposition 1,Proposition 2\".
Question,Proposition 1,Proposition 2,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,A,Paris is the capital of France,Geography,Capitals,Proposition 1,Proposition 2,https://en.wikipedia.org/wiki/Paris,

* @summary * @param {UploadsApiUploadsControllerUploadQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ uploadsControllerUploadQuestions(requestParameters: UploadsApiUploadsControllerUploadQuestionsRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.uploadsControllerUploadQuestions(requestParameters.file, requestParameters.companyId2, requestParameters.userId2, requestParameters.companyId, requestParameters.userId, requestParameters.coachId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for uploadsControllerUploadQuestions operation in UploadsApi. * @export * @interface UploadsApiUploadsControllerUploadQuestionsRequest */ export interface UploadsApiUploadsControllerUploadQuestionsRequest { /** * * @type {File} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly file: File /** * * @type {string} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly companyId2: string /** * * @type {string} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly userId2: 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. * @type {string} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly 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. * @type {string} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly userId?: string /** * * @type {string} * @memberof UploadsApiUploadsControllerUploadQuestions */ readonly coachId?: string } /** * UploadsApi - object-oriented interface * @export * @class UploadsApi * @extends {BaseAPI} */ export class UploadsApi extends BaseAPI { /** * Import .csv file following the format below:

Question,A,B,C,D,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,KB_Link
What is the capital of France?,Paris,London,Berlin,Madrid,A,Paris is the capital of France,Geography,Capitals,https://en.wikipedia.org/wiki/Paris
What is the capital of Germany?,Paris,London,Berlin,Madrid,C,Berlin is the capital of Germany,Geography,Capitals,https://en.wikipedia.org/wiki/Berlin

If you want to custom the number of propositions, you need to add a \"AnswersColNames\" column listing the columns names.
For example, if you want to have 3 propositions, you need to add a column \"AnswersColNames\" with the value \"A,B,C\".
Question,A,B,C,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,Berlin,A,Paris is the capital of France,Geography,Capitals,A,B,C,https://en.wikipedia.org/wiki/Paris,

You can also custom the propositions columns headers and add them to the \"AnswersColNames\" column.
For example, if you want to have 2 propositions with the headers \"Proposition 1\" and \"Proposition 2\", you need to add a column \"AnswersColNames\" with the value \"Proposition 1,Proposition 2\".
Question,Proposition 1,Proposition 2,CorrectAnswers,CorrectAnswersInfo,Tags,Programs,AnswersColNames,KB_Link
What is the capital of France?,Paris,London,A,Paris is the capital of France,Geography,Capitals,Proposition 1,Proposition 2,https://en.wikipedia.org/wiki/Paris,

* @summary * @param {UploadsApiUploadsControllerUploadQuestionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UploadsApi */ public uploadsControllerUploadQuestions(requestParameters: UploadsApiUploadsControllerUploadQuestionsRequest, options?: AxiosRequestConfig) { return UploadsApiFp(this.configuration).uploadsControllerUploadQuestions(requestParameters.file, requestParameters.companyId2, requestParameters.userId2, requestParameters.companyId, requestParameters.userId, requestParameters.coachId, options).then((request) => request(this.axios, this.basePath)); } } /** * UsersApi - axios parameter creator * @export */ export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This method handles POST requests to the \'/users\' route to create a new user using the data passed in the body. It will respond with the newly created user. * @summary Create a new user * @param {CreateUserDto} createUserDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUser: async (createUserDto: CreateUserDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createUserDto' is not null or undefined assertParamExists('createUser', 'createUserDto', createUserDto) const localVarPath = `/v1/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createUserDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles DELETE requests to the \'/users/{id}\' route with `{id}` the id of the user we want to delete. Access will be removed from the concerned user. * @summary Soft delete an existing user by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteUser: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('deleteUser', 'id', id) const localVarPath = `/v1/users/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users/me\' route to get the current user. It will respond with the current user. * @summary Get a single user by ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMe: async (options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/users/me`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users/{id}/next-questions\' route with `{id}` the id of the concerned user. * @summary Get next questions for a user * @param {string} id * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNextQuestionsForUser: async (id: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, companyId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getNextQuestionsForUser', 'id', id) const localVarPath = `/v1/users/{id}/next-questions` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users/{id}\' route with `{id}` the id of the user we want to find. If the user exists it will return it, otherwise it will respond with an error. * @summary Get a single user by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUserById: async (id: string, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getUserById', 'id', id) const localVarPath = `/v1/users/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Get Users with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsers: async (createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/users`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (createdBy !== undefined) { localVarQueryParameter['createdBy'] = createdBy; } if (sortBy !== undefined) { localVarQueryParameter['sortBy'] = sortBy; } if (ids !== undefined) { localVarQueryParameter['ids'] = ids; } if (teamIds !== undefined) { localVarQueryParameter['teamIds'] = teamIds; } if (emails !== undefined) { localVarQueryParameter['emails'] = emails; } if (isCompanyAdmin !== undefined) { localVarQueryParameter['isCompanyAdmin'] = isCompanyAdmin; } if (isActive !== undefined) { localVarQueryParameter['isActive'] = isActive; } if (includeSoftDeleted !== undefined) { localVarQueryParameter['includeSoftDeleted'] = includeSoftDeleted; } if (search !== undefined) { localVarQueryParameter['search'] = search; } if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } if (page !== undefined) { localVarQueryParameter['page'] = page; } if (itemsPerPage !== undefined) { localVarQueryParameter['itemsPerPage'] = itemsPerPage; } if (createdAfter !== undefined) { localVarQueryParameter['createdAfter'] = (createdAfter as any instanceof Date) ? (createdAfter as any).toISOString() : createdAfter; } if (createdBefore !== undefined) { localVarQueryParameter['createdBefore'] = (createdBefore as any instanceof Date) ? (createdBefore as any).toISOString() : createdBefore; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This method handles PATCH requests to the \'/users/{id}\' route with `{id}` the id of the user we want to update. * @summary Patch an existing user by ID * @param {string} id * @param {PatchUserDto} patchUserDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchUser: async (id: string, patchUserDto: PatchUserDto, companyId?: string, userId?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchUser', 'id', id) // verify required parameter 'patchUserDto' is not null or undefined assertParamExists('patchUser', 'patchUserDto', patchUserDto) const localVarPath = `/v1/users/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication x-api-key required await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration) // authentication bearer required // http bearer authentication required await setBearerAuthToObject(localVarHeaderParameter, configuration) if (companyId !== undefined) { localVarQueryParameter['companyId'] = companyId; } if (userId !== undefined) { localVarQueryParameter['userId'] = userId; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(patchUserDto, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * UsersApi - functional programming interface * @export */ export const UsersApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) return { /** * This method handles POST requests to the \'/users\' route to create a new user using the data passed in the body. It will respond with the newly created user. * @summary Create a new user * @param {CreateUserDto} createUserDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createUser(createUserDto: CreateUserDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(createUserDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles DELETE requests to the \'/users/{id}\' route with `{id}` the id of the user we want to delete. Access will be removed from the concerned user. * @summary Soft delete an existing user by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteUser(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users/me\' route to get the current user. It will respond with the current user. * @summary Get a single user by ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getMe(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getMe(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users/{id}/next-questions\' route with `{id}` the id of the concerned user. * @summary Get next questions for a user * @param {string} id * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [companyId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getNextQuestionsForUser(id: string, ids?: string, userId?: string, page?: number, itemsPerPage?: number, companyId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getNextQuestionsForUser(id, ids, userId, page, itemsPerPage, companyId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users/{id}\' route with `{id}` the id of the user we want to find. If the user exists it will return it, otherwise it will respond with an error. * @summary Get a single user by ID * @param {string} id * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getUserById(id: string, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUserById(id, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Get Users with filter, sort and pagination options * @param {string} [createdBy] * @param {string} [sortBy] 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 * @param {string} [ids] An array of IDs used to filter the results to only include entities with the specified IDs * @param {string} [teamIds] An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @param {string} [emails] Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @param {boolean} [isCompanyAdmin] Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @param {boolean} [isActive] Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @param {boolean} [includeSoftDeleted] Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @param {string} [search] Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {number} [page] The page of results to retrieve. * @param {number} [itemsPerPage] The number of items per page to retrieve. * @param {string} [createdAfter] 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. * @param {string} [createdBefore] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getUsers(createdBy?: string, sortBy?: string, ids?: string, teamIds?: string, emails?: string, isCompanyAdmin?: boolean, isActive?: boolean, includeSoftDeleted?: boolean, search?: string, companyId?: string, userId?: string, page?: number, itemsPerPage?: number, createdAfter?: string, createdBefore?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getUsers(createdBy, sortBy, ids, teamIds, emails, isCompanyAdmin, isActive, includeSoftDeleted, search, companyId, userId, page, itemsPerPage, createdAfter, createdBefore, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * This method handles PATCH requests to the \'/users/{id}\' route with `{id}` the id of the user we want to update. * @summary Patch an existing user by ID * @param {string} id * @param {PatchUserDto} patchUserDto * @param {string} [companyId] 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. * @param {string} [userId] 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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async patchUser(id: string, patchUserDto: PatchUserDto, companyId?: string, userId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.patchUser(id, patchUserDto, companyId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * UsersApi - factory interface * @export */ export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = UsersApiFp(configuration) return { /** * This method handles POST requests to the \'/users\' route to create a new user using the data passed in the body. It will respond with the newly created user. * @summary Create a new user * @param {UsersApiCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUser(requestParameters: UsersApiCreateUserRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.createUser(requestParameters.createUserDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles DELETE requests to the \'/users/{id}\' route with `{id}` the id of the user we want to delete. Access will be removed from the concerned user. * @summary Soft delete an existing user by ID * @param {UsersApiDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteUser(requestParameters: UsersApiDeleteUserRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.deleteUser(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users/me\' route to get the current user. It will respond with the current user. * @summary Get a single user by ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getMe(options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getMe(options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users/{id}/next-questions\' route with `{id}` the id of the concerned user. * @summary Get next questions for a user * @param {UsersApiGetNextQuestionsForUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getNextQuestionsForUser(requestParameters: UsersApiGetNextQuestionsForUserRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getNextQuestionsForUser(requestParameters.id, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.companyId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users/{id}\' route with `{id}` the id of the user we want to find. If the user exists it will return it, otherwise it will respond with an error. * @summary Get a single user by ID * @param {UsersApiGetUserByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUserById(requestParameters: UsersApiGetUserByIdRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getUserById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Get Users with filter, sort and pagination options * @param {UsersApiGetUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUsers(requestParameters: UsersApiGetUsersRequest = {}, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.getUsers(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(axios, basePath)); }, /** * This method handles PATCH requests to the \'/users/{id}\' route with `{id}` the id of the user we want to update. * @summary Patch an existing user by ID * @param {UsersApiPatchUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchUser(requestParameters: UsersApiPatchUserRequest, options?: AxiosRequestConfig): AxiosPromise { return localVarFp.patchUser(requestParameters.id, requestParameters.patchUserDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(axios, basePath)); }, }; }; /** * Request parameters for createUser operation in UsersApi. * @export * @interface UsersApiCreateUserRequest */ export interface UsersApiCreateUserRequest { /** * * @type {CreateUserDto} * @memberof UsersApiCreateUser */ readonly createUserDto: CreateUserDto /** * 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. * @type {string} * @memberof UsersApiCreateUser */ readonly 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. * @type {string} * @memberof UsersApiCreateUser */ readonly userId?: string } /** * Request parameters for deleteUser operation in UsersApi. * @export * @interface UsersApiDeleteUserRequest */ export interface UsersApiDeleteUserRequest { /** * * @type {string} * @memberof UsersApiDeleteUser */ readonly 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. * @type {string} * @memberof UsersApiDeleteUser */ readonly 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. * @type {string} * @memberof UsersApiDeleteUser */ readonly userId?: string } /** * Request parameters for getNextQuestionsForUser operation in UsersApi. * @export * @interface UsersApiGetNextQuestionsForUserRequest */ export interface UsersApiGetNextQuestionsForUserRequest { /** * * @type {string} * @memberof UsersApiGetNextQuestionsForUser */ readonly id: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof UsersApiGetNextQuestionsForUser */ readonly ids?: 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. * @type {string} * @memberof UsersApiGetNextQuestionsForUser */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof UsersApiGetNextQuestionsForUser */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof UsersApiGetNextQuestionsForUser */ readonly itemsPerPage?: number /** * 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. * @type {string} * @memberof UsersApiGetNextQuestionsForUser */ readonly companyId?: string } /** * Request parameters for getUserById operation in UsersApi. * @export * @interface UsersApiGetUserByIdRequest */ export interface UsersApiGetUserByIdRequest { /** * * @type {string} * @memberof UsersApiGetUserById */ readonly 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. * @type {string} * @memberof UsersApiGetUserById */ readonly 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. * @type {string} * @memberof UsersApiGetUserById */ readonly userId?: string } /** * Request parameters for getUsers operation in UsersApi. * @export * @interface UsersApiGetUsersRequest */ export interface UsersApiGetUsersRequest { /** * * @type {string} * @memberof UsersApiGetUsers */ readonly 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 * @type {string} * @memberof UsersApiGetUsers */ readonly sortBy?: string /** * An array of IDs used to filter the results to only include entities with the specified IDs * @type {string} * @memberof UsersApiGetUsers */ readonly ids?: string /** * An array of team IDs used to filter the results. If no team IDs are provided, all users will be returned. The filter applied is an <b>OR</b>. <b>The query will return the users that have are assigned to the team.</b> * @type {string} * @memberof UsersApiGetUsers */ readonly teamIds?: string /** * Filter by email If email is provided, we only want to return users that have the provided email If email is not provided, we return all users * @type {string} * @memberof UsersApiGetUsers */ readonly emails?: string /** * Filter by isCompanyAdmin If isCompanyAdmin is true, we only want to return users that have the company-admin role If isCompanyAdmin is false, we only want to return users that do not have the company-admin role If isCompanyAdmin is not provided, we return all users isCompanyAdmin is computed by checking if the user has the company-admin role * @type {boolean} * @memberof UsersApiGetUsers */ readonly isCompanyAdmin?: boolean /** * Filter by isActive If isActive is true, we only want to return users that are active If isActive is false, we only want to return users that are not active If isActive is not provided, we return all users isActive is computed by checking if the user has created any guesses in the past 7 days * @type {boolean} * @memberof UsersApiGetUsers */ readonly isActive?: boolean /** * Include soft deleted users If includeDeleted is true and authenticated user is company admin or alto admin, we want to return all users, including soft deleted users * @type {boolean} * @memberof UsersApiGetUsers */ readonly includeSoftDeleted?: boolean /** * Search by email If search is provided, we want to return all users that match the search criteria If search is not provided, we return all users Search is computed by checking if the user\'s email contains the search string * @type {string} * @memberof UsersApiGetUsers */ readonly 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. * @type {string} * @memberof UsersApiGetUsers */ readonly 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. * @type {string} * @memberof UsersApiGetUsers */ readonly userId?: string /** * The page of results to retrieve. * @type {number} * @memberof UsersApiGetUsers */ readonly page?: number /** * The number of items per page to retrieve. * @type {number} * @memberof UsersApiGetUsers */ readonly 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. * @type {string} * @memberof UsersApiGetUsers */ readonly createdAfter?: string /** * 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. * @type {string} * @memberof UsersApiGetUsers */ readonly createdBefore?: string } /** * Request parameters for patchUser operation in UsersApi. * @export * @interface UsersApiPatchUserRequest */ export interface UsersApiPatchUserRequest { /** * * @type {string} * @memberof UsersApiPatchUser */ readonly id: string /** * * @type {PatchUserDto} * @memberof UsersApiPatchUser */ readonly patchUserDto: PatchUserDto /** * 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. * @type {string} * @memberof UsersApiPatchUser */ readonly 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. * @type {string} * @memberof UsersApiPatchUser */ readonly userId?: string } /** * UsersApi - object-oriented interface * @export * @class UsersApi * @extends {BaseAPI} */ export class UsersApi extends BaseAPI { /** * This method handles POST requests to the \'/users\' route to create a new user using the data passed in the body. It will respond with the newly created user. * @summary Create a new user * @param {UsersApiCreateUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public createUser(requestParameters: UsersApiCreateUserRequest, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).createUser(requestParameters.createUserDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles DELETE requests to the \'/users/{id}\' route with `{id}` the id of the user we want to delete. Access will be removed from the concerned user. * @summary Soft delete an existing user by ID * @param {UsersApiDeleteUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public deleteUser(requestParameters: UsersApiDeleteUserRequest, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).deleteUser(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users/me\' route to get the current user. It will respond with the current user. * @summary Get a single user by ID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public getMe(options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).getMe(options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users/{id}/next-questions\' route with `{id}` the id of the concerned user. * @summary Get next questions for a user * @param {UsersApiGetNextQuestionsForUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public getNextQuestionsForUser(requestParameters: UsersApiGetNextQuestionsForUserRequest, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).getNextQuestionsForUser(requestParameters.id, requestParameters.ids, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.companyId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users/{id}\' route with `{id}` the id of the user we want to find. If the user exists it will return it, otherwise it will respond with an error. * @summary Get a single user by ID * @param {UsersApiGetUserByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public getUserById(requestParameters: UsersApiGetUserByIdRequest, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).getUserById(requestParameters.id, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles GET requests to the \'/users\' route with the filter, sort and pagination options passed in the query parameters. It will respond with the paginated users along with the current state of pagination. * @summary Get Users with filter, sort and pagination options * @param {UsersApiGetUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public getUsers(requestParameters: UsersApiGetUsersRequest = {}, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).getUsers(requestParameters.createdBy, requestParameters.sortBy, requestParameters.ids, requestParameters.teamIds, requestParameters.emails, requestParameters.isCompanyAdmin, requestParameters.isActive, requestParameters.includeSoftDeleted, requestParameters.search, requestParameters.companyId, requestParameters.userId, requestParameters.page, requestParameters.itemsPerPage, requestParameters.createdAfter, requestParameters.createdBefore, options).then((request) => request(this.axios, this.basePath)); } /** * This method handles PATCH requests to the \'/users/{id}\' route with `{id}` the id of the user we want to update. * @summary Patch an existing user by ID * @param {UsersApiPatchUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UsersApi */ public patchUser(requestParameters: UsersApiPatchUserRequest, options?: AxiosRequestConfig) { return UsersApiFp(this.configuration).patchUser(requestParameters.id, requestParameters.patchUserDto, requestParameters.companyId, requestParameters.userId, options).then((request) => request(this.axios, this.basePath)); } }