diff --git a/generate-api-client/api-docs.json b/generate-api-client/api-docs.json new file mode 100644 index 00000000..b99f0b3f --- /dev/null +++ b/generate-api-client/api-docs.json @@ -0,0 +1,1649 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "queen-api", + "description": "API for Queen/Stromae", + "version": "5.6.1" + }, + "servers": [ + { "url": "http://localhost:8080", "description": "Generated server url" } + ], + "security": [{ "oauth2": ["read", "write"] }], + "tags": [ + { + "name": "03. Questionnaires", + "description": "Endpoints for questionnaires" + }, + { + "name": "08. Interrogations in temp Zone", + "description": "Endpoints for interrogations in temporary zone" + }, + { "name": "02. Campaigns", "description": "Endpoints for campaigns" }, + { + "name": "05. Metadata", + "description": "Endpoints for retrieving metadata" + }, + { + "name": "07. Paradata events", + "description": "Endpoints for paradata events" + }, + { "name": "01. Integrations", "description": "Endpoints for integration" }, + { + "name": "06. Interrogations", + "description": "Endpoints for interrogations" + }, + { + "name": "04. Nomenclatures", + "description": "Endpoints for nomenclatures" + } + ], + "paths": { + "/api/interrogations/{id}": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getInterrogationById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "$ref": "#/components/schemas/Interrogation" } + } + } + } + } + }, + "put": { + "tags": ["06. Interrogations"], + "summary": "Update interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / ", + "operationId": "updateInterrogationById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/InterrogationUpdate" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + }, + "delete": { + "tags": ["06. Interrogations"], + "summary": "Delete an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "deleteInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "No Content" } } + }, + "patch": { + "tags": ["06. Interrogations"], + "summary": "Update interrogation updated data/state-data", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "updateInterrogationDataStateDataById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InterrogationDataStateDataUpdate" + } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/interrogations/{id}/state-data": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get state-data for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getStateDataByInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { "schema": { "$ref": "#/components/schemas/StateData" } } + } + } + } + }, + "put": { + "tags": ["06. Interrogations"], + "summary": "Update state-data for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "setStateData", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/StateDataUpdate" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/interrogations/{id}/personalization": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get personalization for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getPersonalizationByInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "schema.personalization.json" } + } + } + } + } + }, + "put": { + "tags": ["06. Interrogations"], + "summary": "Update personalization for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "setPersonalization", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "schema.personalization.json" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/interrogations/{id}/data": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get data for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getDataByInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { "schema": { "$ref": "schema.data.json" } } + } + } + } + }, + "put": { + "tags": ["06. Interrogations"], + "summary": "Update data for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "updateData", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { "schema": { "$ref": "schema.data.json" } } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/questionnaire-models": { + "post": { + "tags": ["03. Questionnaires"], + "summary": "Create a Questionnaire Model", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createQuestionnaire", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuestionnaireModelCreation" + } + } + }, + "required": true + }, + "responses": { "201": { "description": "Created" } } + } + }, + "/api/paradata": { + "post": { + "tags": ["07. Paradata events"], + "summary": "Create paradata event for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "addParadata", + "requestBody": { + "content": { "application/json": { "schema": { "type": "object" } } }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/nomenclature": { + "post": { + "tags": ["04. Nomenclatures"], + "summary": "Create/update a nomenclature ", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "postNomenclature", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/NomenclatureCreation" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/interrogations/{id}/temp-zone": { + "post": { + "tags": ["08. Interrogations in temp Zone"], + "summary": "Create interrogation to temp-zone", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / ", + "operationId": "postInterrogationByIdInTempZone", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "schema.interrogation-temp-zone.json" } + } + }, + "required": true + }, + "responses": { "201": { "description": "Created" } } + } + }, + "/api/interrogations/{id}/synchronize": { + "post": { + "tags": ["06. Interrogations"], + "summary": "Synchronize an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "synchronizeInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "200": { "description": "OK" } } + } + }, + "/api/interrogations/state-data": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Retrieve interrogations filtered by state data", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getInterrogationsByStateData", + "parameters": [ + { + "name": "stateData", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "INIT", + "COMPLETED", + "VALIDATED", + "TOEXTRACT", + "EXTRACTED", + "IS_MOVED" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/Interrogation" } + } + } + } + } + } + }, + "post": { + "tags": ["06. Interrogations"], + "summary": "Get state-data for all interrogations defined in request body ", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getStateDataByInterrogations", + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "string" } } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "$ref": "#/components/schemas/InterrogationsOkNok" } + } + } + } + } + } + }, + "/api/interrogations/questionnaire-model-id": { + "post": { + "tags": ["03. Questionnaires"], + "summary": "Search questionnaire ids linked to interrogations", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getQuestionnaireModelIdByInterrogations", + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "string" } } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "$ref": "#/components/schemas/InterrogationsOkNok" } + } + } + } + } + } + }, + "/api/interrogations/delete": { + "post": { + "tags": ["06. Interrogations"], + "summary": "Delete interrogations", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "deleteInterrogations", + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "string" } } + } + }, + "required": true + }, + "responses": { "204": { "description": "No Content" } } + } + }, + "/api/events": { + "post": { + "tags": ["events-controller"], + "summary": "Save an event", + "operationId": "addEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/EventDto" } + } + }, + "required": true + }, + "responses": { "201": { "description": "Created" } } + } + }, + "/api/campaigns": { + "get": { + "tags": ["02. Campaigns"], + "summary": "Get campaign list for the current user", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getInterviewerCampaignList", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/CampaignSummary" } + } + } + } + } + } + }, + "post": { + "tags": ["02. Campaigns"], + "summary": "Create a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createCampaign", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CampaignCreation" } + } + }, + "required": true + }, + "responses": { "201": { "description": "Created" } }, + "deprecated": true + } + }, + "/api/campaigns/{id}/interrogations": { + "post": { + "tags": ["06. Interrogations"], + "summary": "Create/Update interrogations", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createUpdateInterrogations", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterrogationCreation" + } + } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/campaigns/{id}/interrogation": { + "post": { + "tags": ["06. Interrogations"], + "summary": "Create/Update an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createUpdateInterrogation", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/InterrogationCreation" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/campaign/{id}/interrogation": { + "post": { + "tags": ["06. Interrogations"], + "summary": "Create/Update an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createUpdateInterrogation_1", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/InterrogationCreation" } + } + }, + "required": true + }, + "responses": { "200": { "description": "OK" } } + } + }, + "/api/campaign": { + "post": { + "tags": ["02. Campaigns"], + "summary": "Create a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "createCampaignV2", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CampaignCreationV2" } + } + }, + "required": true + }, + "responses": { "201": { "description": "Created" } } + } + }, + "/api/campaign/xml/context": { + "post": { + "tags": ["01. Integrations"], + "summary": "Integrates the context of a campaign (XML Version - will be removed in a future version)", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "integrateXmlContext", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { "type": "string", "format": "binary" } + }, + "required": ["file"] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "$ref": "#/components/schemas/IntegrationResults" } + } + } + } + }, + "deprecated": true + } + }, + "/api/campaign/context": { + "post": { + "tags": ["01. Integrations"], + "summary": "Integrates the context of a campaign (JSON version)", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "integrateContext", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { "type": "string", "format": "binary" } + }, + "required": ["file"] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "$ref": "#/components/schemas/IntegrationResults" } + } + } + } + } + } + }, + "/api/survey-units/{id}/interrogations": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Retrieve interrogations by survey-unit", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getInterrogationsBySurveyUnit", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterrogationSummary" + } + } + } + } + } + } + } + }, + "/api/questionnaire/{id}": { + "get": { + "tags": ["03. Questionnaires"], + "summary": "Get questionnnaire", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getQuestionnaireValue", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/QuestionnaireModelValue" + } + } + } + } + }, + "deprecated": true + } + }, + "/api/questionnaire/{id}/required-nomenclatures": { + "get": { + "tags": ["04. Nomenclatures"], + "summary": "Get list of required nomenclature for a questionnaire", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getListRequiredNomenclatureByQuestionnaireId", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + } + } + } + }, + "/api/questionnaire/{id}/metadata": { + "get": { + "tags": ["05. Metadata"], + "summary": "Get metadata for a questionnaire ", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getMetadataByQuestionnaireId", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "schema.metadata.json" } + } + } + } + } + } + }, + "/api/questionnaire/{id}/data": { + "get": { + "tags": ["03. Questionnaires"], + "summary": "Get questionnnaire data", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getQuestionnaireData", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { "*/*": { "schema": { "type": "object" } } } + } + } + } + }, + "/api/nomenclatures": { + "get": { + "tags": ["04. Nomenclatures"], + "summary": "Get all nomenclatures Ids ", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getNomenclaturesId", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + } + } + } + }, + "/api/nomenclature/{id}": { + "get": { + "tags": ["04. Nomenclatures"], + "summary": "Get Nomenclature", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getNomenclatureById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "schema.nomenclature.json" } + } + } + } + } + } + }, + "/api/interrogations": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get all interrogations ids", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getInterrogationIds", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + } + } + } + }, + "/api/interrogations/{id}/metadata": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get interrogation metadata", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getInterrogationMetadataById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/InterrogationMetadata" + } + } + } + } + } + } + }, + "/api/interrogations/{id}/deposit-proof": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get deposit proof for an interrogation", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "generateDepositProof", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "surveyUnitCompositeName", + "in": "query", + "required": false, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { "schema": { "type": "string", "format": "binary" } } + } + } + } + } + }, + "/api/interrogations/temp-zone": { + "get": { + "tags": ["08. Interrogations in temp Zone"], + "summary": "GET all interrogations in temp-zone", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getInterrogationsInTempZone", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterrogationTempZone" + } + } + } + } + } + } + } + }, + "/api/interrogations/interviewer": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get list of interrogations linked to the current interviewer", + "description": "Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / ", + "operationId": "getInterviewerInterrogations", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/Interrogation" } + } + } + } + } + } + } + }, + "/api/healthcheck": { + "get": { + "tags": ["09. HealthCheck"], + "summary": "Healthcheck, check if api is alive", + "operationId": "healthCheck", + "responses": { "200": { "description": "OK" } } + } + }, + "/api/campaigns/ids": { + "get": { + "tags": ["02. Campaigns"], + "summary": "Get list of all campaigns ids", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getListCampaignsIds", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/CampaignIdsDto" } + } + } + } + } + } + } + }, + "/api/campaign/{id}/required-nomenclatures": { + "get": { + "tags": ["04. Nomenclatures"], + "summary": "Get list of required nomenclatures for a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getListRequiredNomenclature", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + } + } + } + }, + "/api/campaign/{id}/questionnaires": { + "get": { + "tags": ["03. Questionnaires"], + "summary": "Get questionnaire list for a campaign ", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getQuestionnaireDatasByCampaignId", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionnaireModelValue" + } + } + } + } + } + } + } + }, + "/api/campaign/{id}/questionnaire-id": { + "get": { + "tags": ["03. Questionnaires"], + "summary": "Get list of questionnaire ids for a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getQuestionnaireIdsByCampaignId", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QuestionnaireModelId" + } + } + } + } + } + } + } + }, + "/api/campaign/{id}/metadata": { + "get": { + "tags": ["05. Metadata"], + "summary": "Get metadata for a campaign ", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / ", + "operationId": "getMetadataByCampaignId", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { "$ref": "schema.metadata.json" } + } + } + } + } + } + }, + "/api/campaign/{id}/interrogations": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Get list of interrogations for a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / ", + "operationId": "getListInterrogationByCampaign", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterrogationSummary" + } + } + } + } + } + } + } + }, + "/api/admin/campaigns": { + "get": { + "tags": ["02. Campaigns"], + "summary": "Get list of all campaigns", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getListCampaign", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/CampaignSummary" } + } + } + } + } + } + } + }, + "/api/admin/campaigns/{id}": { + "get": { + "tags": ["02. Campaigns"], + "summary": "Get campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getCampaign", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { "schema": { "$ref": "#/components/schemas/Campaign" } } + } + } + } + } + }, + "/api/admin/campaign/{id}/interrogations": { + "get": { + "tags": ["06. Interrogations"], + "summary": "Retrieve interrogations by state", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "getInterrogationsByState", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "state", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "INIT", + "COMPLETED", + "VALIDATED", + "TOEXTRACT", + "EXTRACTED", + "IS_MOVED" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InterrogationStateDto" + } + } + } + } + } + } + } + }, + "/api/campaign/{id}": { + "delete": { + "tags": ["02. Campaigns"], + "summary": "Delete a campaign", + "description": "Authorized roles: ADMIN / WEBCLIENT / ", + "operationId": "deleteCampaignById", + "parameters": [ + { + "name": "force", + "in": "query", + "required": true, + "schema": { "type": "boolean" } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "200": { "description": "OK" } } + } + }, + "/api/admin/campaign/{id}/interrogations/data/extracted": { + "delete": { + "tags": ["06. Interrogations"], + "summary": "Clean all data from interrogations of a campaign with extracted state", + "description": "Authorized roles: ", + "operationId": "cleanData", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "start", + "in": "query", + "required": true, + "schema": { "type": "integer", "format": "int64" } + }, + { + "name": "end", + "in": "query", + "required": true, + "schema": { "type": "integer", "format": "int64" } + } + ], + "responses": { "200": { "description": "OK" } } + } + } + }, + "components": { + "schemas": { + "InterrogationUpdate": { + "type": "object", + "properties": { + "personalization": { "$ref": "schema.personalization.json" }, + "data": { "type": "object", "$ref": "schema.data.json" }, + "comment": { "type": "object" }, + "stateData": { + "$ref": "#/components/schemas/StateDataForInterrogationUpdate" + }, + "locked": { "type": "boolean" } + } + }, + "StateDataForInterrogationUpdate": { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["INIT", "COMPLETED", "VALIDATED", "TOEXTRACT", "EXTRACTED"] + }, + "date": { "type": "integer", "format": "int64" }, + "currentPage": { "type": "string", "minLength": 1 } + }, + "required": ["currentPage", "date"] + }, + "StateDataUpdate": { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": ["INIT", "COMPLETED", "VALIDATED", "TOEXTRACT", "EXTRACTED"] + }, + "currentPage": { "type": "string", "minLength": 1 } + }, + "required": ["currentPage", "state"] + }, + "QuestionnaireModelCreation": { + "type": "object", + "properties": { + "idQuestionnaireModel": { "type": "string" }, + "label": { "type": "string", "minLength": 1 }, + "value": { "type": "object" }, + "requiredNomenclatureIds": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + }, + "required": ["label", "value"] + }, + "NomenclatureCreation": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "label": { "type": "string", "minLength": 1 }, + "value": { "$ref": "schema.nomenclature.json" } + }, + "required": ["label", "value"] + }, + "Interrogation": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "questionnaireId": { "type": "string" }, + "personalization": { "$ref": "schema.personalization.json" }, + "data": { "type": "object", "$ref": "schema.data.json" }, + "comment": { "type": "object" }, + "stateData": { "$ref": "#/components/schemas/StateData" }, + "locked": { "type": "boolean" } + } + }, + "InterrogationsOkNok": { + "type": "object", + "properties": { + "interrogationOK": { + "type": "array", + "items": { "$ref": "#/components/schemas/Interrogation" } + }, + "interrogationNOK": { + "type": "array", + "items": { "$ref": "#/components/schemas/Interrogation" } + } + } + }, + "StateData": { + "type": "object", + "properties": { + "state": { + "type": "string", + "enum": [ + "INIT", + "COMPLETED", + "VALIDATED", + "TOEXTRACT", + "EXTRACTED", + "IS_MOVED" + ] + }, + "date": { "type": "integer", "format": "int64" }, + "currentPage": { "type": "string" } + } + }, + "EventDto": { + "type": "object", + "properties": { + "correlationId": { "type": "string", "format": "uuid" }, + "eventType": { + "type": "string", + "enum": [ + "MULTIMODE_MOVED", + "QUESTIONNAIRE_INIT", + "QUESTIONNAIRE_LEAF_STATES_UPDATED", + "QUESTIONNAIRE_UPDATED", + "QUESTIONNAIRE_COMPLETED", + "QUESTIONNAIRE_VALIDATED", + "QUESTIONNAIRE_SWITCH_CAPI" + ] + }, + "aggregateType": { "type": "string", "enum": ["QUESTIONNAIRE"] }, + "payload": { "$ref": "#/components/schemas/EventPayloadDto" } + }, + "required": ["aggregateType", "eventType", "payload"] + }, + "EventPayloadDto": { + "type": "object", + "properties": { + "interrogationId": { "type": "string" }, + "mode": { + "type": "string", + "enum": ["CATI", "CAPI", "CAWI", "PAPI"] + }, + "leafStates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventPayloadLeafStatesInnerDto" + } + } + }, + "required": ["interrogationId", "mode"] + }, + "EventPayloadLeafStatesInnerDto": { + "type": "object", + "properties": { + "state": { "type": "string", "enum": ["INIT", "COMPLETED"] }, + "date": { "type": "string", "format": "date-time" } + }, + "required": ["date"] + }, + "CampaignCreation": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "label": { "type": "string", "minLength": 1 }, + "sensitivity": { "type": "string", "enum": ["NORMAL", "SENSITIVE"] }, + "questionnaireIds": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + }, + "metadata": { "$ref": "#/components/schemas/MetadataCreation" } + }, + "required": ["label", "questionnaireIds"] + }, + "MetadataCreation": { + "type": "object", + "properties": { + "value": { "type": "object", "$ref": "schema.metadata.json" } + }, + "required": ["value"] + }, + "InterrogationCreation": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "surveyUnitId": { "type": "string" }, + "questionnaireId": { "type": "string" }, + "personalization": { "$ref": "schema.personalization.json" }, + "data": { "type": "object", "$ref": "schema.data.json" } + }, + "required": ["data", "questionnaireId"] + }, + "CampaignCreationV2": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "label": { "type": "string", "minLength": 1 }, + "sensitivity": { "type": "string", "enum": ["NORMAL", "SENSITIVE"] }, + "questionnaireIds": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + }, + "metadata": { "type": "object", "$ref": "schema.metadata.json" } + }, + "required": ["label", "questionnaireIds"] + }, + "IntegrationResultUnit": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "status": { + "type": "string", + "enum": ["CREATED", "UPDATED", "ERROR"] + }, + "cause": { "type": "string" } + } + }, + "IntegrationResults": { + "type": "object", + "properties": { + "campaign": { "$ref": "#/components/schemas/IntegrationResultUnit" }, + "nomenclatures": { + "type": "array", + "items": { "$ref": "#/components/schemas/IntegrationResultUnit" } + }, + "questionnaireModels": { + "type": "array", + "items": { "$ref": "#/components/schemas/IntegrationResultUnit" } + } + } + }, + "InterrogationDataStateDataUpdate": { + "type": "object", + "properties": { + "data": { "type": "object", "$ref": "schema.collected-data.json" }, + "stateData": { "$ref": "#/components/schemas/StateDataUpdate" } + }, + "required": ["stateData"] + }, + "InterrogationSummary": { + "type": "object", + "properties": { + "interrogationId": { "type": "string" }, + "campaignId": { "type": "string" } + } + }, + "QuestionnaireModelValue": { + "type": "object", + "properties": { "value": { "type": "object" } } + }, + "InterrogationMetadata": { + "type": "object", + "properties": { + "context": { "type": "string", "enum": ["household", "business"] }, + "personalization": { "$ref": "schema.personalization.json" }, + "label": { "type": "string" }, + "objectives": { "type": "string" }, + "variables": { + "type": "array", + "items": { "$ref": "#/components/schemas/MetadataVariable" } + }, + "logos": { "$ref": "#/components/schemas/Logos" } + }, + "required": ["context", "label", "objectives"] + }, + "Logo": { + "type": "object", + "properties": { + "url": { "type": "string" }, + "label": { "type": "string" } + }, + "required": ["label", "url"] + }, + "Logos": { + "type": "object", + "properties": { + "main": { "$ref": "#/components/schemas/Logo" }, + "secondaries": { + "type": "array", + "items": { "$ref": "#/components/schemas/Logo" } + } + }, + "required": ["main"] + }, + "MetadataVariable": { + "type": "object", + "properties": { "name": { "type": "string" }, "value": {} }, + "required": ["name", "value"] + }, + "InterrogationTempZone": { + "type": "object", + "properties": { + "id": { "type": "string", "format": "uuid" }, + "interrogationId": { "type": "string" }, + "userId": { "type": "string" }, + "date": { "type": "integer", "format": "int64" }, + "interrogation": { + "type": "object", + "$ref": "schema.interrogation-temp-zone.json" + } + } + }, + "CampaignSummary": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "sensitivity": { "type": "string", "enum": ["NORMAL", "SENSITIVE"] }, + "questionnaireIds": { "type": "array", "items": { "type": "string" } } + } + }, + "CampaignIdsDto": { + "type": "object", + "properties": { "id": { "type": "string" } } + }, + "QuestionnaireModelId": { + "type": "object", + "properties": { "questionnaireId": { "type": "string" } } + }, + "Campaign": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "sensitivity": { "type": "string", "enum": ["NORMAL", "SENSITIVE"] }, + "questionnaireIds": { + "type": "array", + "items": { "type": "string" } + }, + "metadata": { "type": "object" } + } + }, + "InterrogationStateDto": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "surveyUnitId": { "type": "string" }, + "questionnaireId": { "type": "string" }, + "campaignId": { "type": "string" }, + "stateData": { "$ref": "#/components/schemas/StateData" } + } + }, + "ArrayNode": { "type": "array", "items": { "type": "object" } }, + "ObjectNode": { "type": "object" } + }, + "securitySchemes": { + "oauth2": { + "type": "oauth2", + "name": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://localhost:7080/realms//protocol/openid-connect/auth", + "tokenUrl": "http://localhost:7080/realms//protocol/openid-connect/token", + "refreshUrl": "http://localhost:7080/realms//protocol/openid-connect/token", + "scopes": {} + } + } + } + } + } +} diff --git a/generate-api-client/schema.collected-data.json b/generate-api-client/schema.collected-data.json new file mode 100644 index 00000000..b04c76c1 --- /dev/null +++ b/generate-api-client/schema.collected-data.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Collected data schema", + "description": "Validation of interrogation collected data", + "type": "object", + "patternProperties": { + "^.*$": { + "$ref": "#/$defs/collected_values" + } + }, + "additionalProperties": false, + "$defs": { + "collected_values": { + "type": "object", + "additionalProperties": false, + "properties": { + "COLLECTED": { + "$ref": "schema.variable-type.json#" + }, + "EDITED": { + "$ref": "schema.variable-type.json#" + }, + "FORCED": { + "$ref": "schema.variable-type.json#" + }, + "INPUTED": { + "$ref": "schema.variable-type.json#" + }, + "INPUTTED": { + "$ref": "schema.variable-type.json#" + }, + "PREVIOUS": { + "$ref": "schema.variable-type.json#" + } + } + } + } +} diff --git a/generate-api-client/schema.data.json b/generate-api-client/schema.data.json new file mode 100644 index 00000000..1693eb0f --- /dev/null +++ b/generate-api-client/schema.data.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Data schema", + "description": "Validation of interrogation data", + "type": "object", + "additionalProperties": true, + "properties": { + "CALCULATED": { + "patternProperties": { + "^.*$": { + "$ref": "schema.variable-type.json#" + } + }, + "additionalProperties": false + }, + "EXTERNAL": { + "patternProperties": { + "^.*$": { + "$ref": "schema.variable-type.json#" + } + }, + "additionalProperties": false + }, + "COLLECTED": { + "$ref": "schema.collected-data.json#" + } + } +} diff --git a/generate-api-client/schema.interrogation-temp-zone.json b/generate-api-client/schema.interrogation-temp-zone.json new file mode 100644 index 00000000..08c490e3 --- /dev/null +++ b/generate-api-client/schema.interrogation-temp-zone.json @@ -0,0 +1,45 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Interrogation temp zone schema", + "description": "Validation of interrogation temp zone", + "type": "object", + "additionalProperties": false, + "required": ["data", "stateData", "questionnaireId"], + "properties": { + "data": { + "$ref": "schema.data.json#" + }, + "comment": { + "type": "object" + }, + "personalization": { + "$ref": "schema.personalization.json#" + }, + "questionnaireId": { + "type": "string", + "minLength": 1 + }, + "stateData": { + "$ref": "#/$defs/stateData" + } + }, + "$defs": { + "stateData": { + "type": "object", + "required": ["date", "state", "currentPage"], + "additionalProperties": false, + "properties": { + "date": { + "type": "number" + }, + "state": { + "enum": ["INIT", "COMPLETED", "VALIDATED", "TOEXTRACT", "EXTRACTED"] + }, + "currentPage": { + "type": "string", + "minLength": 1 + } + } + } + } +} diff --git a/generate-api-client/schema.metadata.json b/generate-api-client/schema.metadata.json new file mode 100644 index 00000000..b5ece44b --- /dev/null +++ b/generate-api-client/schema.metadata.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": true, + "properties": { + "inseeContext": { + "type": "string", + "enum": ["household", "business"] + }, + "variables": { + "type": "array", + "items": { + "$ref": "#/$defs/variable" + }, + "minItems": 0 + } + }, + "$defs": { + "variable": { + "type": "object", + "required": ["name", "value"], + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": ["string", "boolean", "number"] + } + } + } + } +} diff --git a/generate-api-client/schema.nomenclature.json b/generate-api-client/schema.nomenclature.json new file mode 100644 index 00000000..4ab16bea --- /dev/null +++ b/generate-api-client/schema.nomenclature.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Nomenclature schema", + "description": "Validation of nomenclatures for an interrogation", + "type": "array", + "items": { + "$ref": "#/$defs/nomenclature" + }, + "$defs": { + "nomenclature": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": ["id", "label"], + "additionalProperties": true + } + } +} diff --git a/generate-api-client/schema.personalization.json b/generate-api-client/schema.personalization.json new file mode 100644 index 00000000..073f54cf --- /dev/null +++ b/generate-api-client/schema.personalization.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Personalization schema", + "description": "Validation of personalizations for an interrogation", + "type": "array", + "items": { + "$ref": "#/$defs/personalization" + }, + "$defs": { + "personalization": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": ["name", "value"], + "additionalProperties": false + } + } +} diff --git a/generate-api-client/schema.variable-type.json b/generate-api-client/schema.variable-type.json new file mode 100644 index 00000000..fbe37143 --- /dev/null +++ b/generate-api-client/schema.variable-type.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Variable type schema use in external/calculated/collected data", + "description": "Validation of variables values in interrogation data", + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + ] + } + } + ] +} diff --git a/orval.config.ts b/orval.config.ts index 493538b4..729d15ac 100644 --- a/orval.config.ts +++ b/orval.config.ts @@ -9,6 +9,14 @@ export default defineConfig({ mode: 'tags', target: 'src/api/', schemas: 'src/models/api', + // Wipe both generated folders before each run to avoid orphan files + // (e.g. tag files left over when a backend tag is renamed/removed). + // The patterns below preserve the hand-written files living in src/api. + clean: [ + '!axiosInstance.ts', + '!axiosInstance.test.ts', + '!visualizeQueryOptions.ts', + ], client: 'react-query', override: { mutator: { diff --git a/package.json b/package.json index acb31e5a..b545d149 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stromae-dsfr", "private": true, - "version": "2.9.0", + "version": "2.10.0-rc.1", "type": "module", "scripts": { "prepare": "husky && vite-envs update-types", diff --git a/src/api/01-integrations.ts b/src/api/01-integrations.ts index 3bb498c1..d5455e47 100644 --- a/src/api/01-integrations.ts +++ b/src/api/01-integrations.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation } from '@tanstack/react-query' import type { diff --git a/src/api/02-campaigns.ts b/src/api/02-campaigns.ts index 85a64f10..facf1e2b 100644 --- a/src/api/02-campaigns.ts +++ b/src/api/02-campaigns.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation, useQuery } from '@tanstack/react-query' import type { @@ -33,6 +33,162 @@ import { stromaeInstance } from './axiosInstance' type SecondParameter unknown> = Parameters[1] +/** + * Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / + * @summary Get campaign list for the current user + */ +export const getInterviewerCampaignList = ( + options?: SecondParameter, + signal?: AbortSignal, +) => { + return stromaeInstance( + { url: `/api/campaigns`, method: 'GET', signal }, + options, + ) +} + +export const getGetInterviewerCampaignListQueryKey = () => { + return [`/api/campaigns`] as const +} + +export const getGetInterviewerCampaignListQueryOptions = < + TData = Awaited>, + TError = unknown, +>(options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter +}) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = + queryOptions?.queryKey ?? getGetInterviewerCampaignListQueryKey() + + const queryFn: QueryFunction< + Awaited> + > = ({ signal }) => getInterviewerCampaignList(requestOptions, signal) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetInterviewerCampaignListQueryResult = NonNullable< + Awaited> +> +export type GetInterviewerCampaignListQueryError = unknown + +export function useGetInterviewerCampaignList< + TData = Awaited>, + TError = unknown, +>( + options: { + query: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): DefinedUseQueryResult & { + queryKey: DataTag +} +export function useGetInterviewerCampaignList< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +export function useGetInterviewerCampaignList< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +/** + * @summary Get campaign list for the current user + */ + +export function useGetInterviewerCampaignList< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} { + const queryOptions = getGetInterviewerCampaignListQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult< + TData, + TError + > & { queryKey: DataTag } + + query.queryKey = queryOptions.queryKey + + return query +} + /** * Authorized roles: ADMIN / WEBCLIENT / * @deprecated @@ -534,7 +690,7 @@ export const getCampaign = ( ) } -export const getGetCampaignQueryKey = (id: string) => { +export const getGetCampaignQueryKey = (id?: string) => { return [`/api/admin/campaigns/${id}`] as const } diff --git a/src/api/03-questionnaires.ts b/src/api/03-questionnaires.ts index cd516131..dee0190b 100644 --- a/src/api/03-questionnaires.ts +++ b/src/api/03-questionnaires.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation, useQuery } from '@tanstack/react-query' import type { @@ -230,7 +230,7 @@ export const getQuestionnaireValue = ( ) } -export const getGetQuestionnaireValueQueryKey = (id: string) => { +export const getGetQuestionnaireValueQueryKey = (id?: string) => { return [`/api/questionnaire/${id}`] as const } @@ -400,7 +400,7 @@ export const getQuestionnaireData = ( ) } -export const getGetQuestionnaireDataQueryKey = (id: string) => { +export const getGetQuestionnaireDataQueryKey = (id?: string) => { return [`/api/questionnaire/${id}/data`] as const } @@ -568,7 +568,7 @@ export const getQuestionnaireDatasByCampaignId = ( ) } -export const getGetQuestionnaireDatasByCampaignIdQueryKey = (id: string) => { +export const getGetQuestionnaireDatasByCampaignIdQueryKey = (id?: string) => { return [`/api/campaign/${id}/questionnaires`] as const } @@ -741,7 +741,7 @@ export const getQuestionnaireIdsByCampaignId = ( ) } -export const getGetQuestionnaireIdsByCampaignIdQueryKey = (id: string) => { +export const getGetQuestionnaireIdsByCampaignIdQueryKey = (id?: string) => { return [`/api/campaign/${id}/questionnaire-id`] as const } diff --git a/src/api/04-nomenclatures.ts b/src/api/04-nomenclatures.ts index a3cf53f0..d8ef59a3 100644 --- a/src/api/04-nomenclatures.ts +++ b/src/api/04-nomenclatures.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation, useQuery } from '@tanstack/react-query' import type { @@ -136,7 +136,7 @@ export const getListRequiredNomenclatureByQuestionnaireId = ( } export const getGetListRequiredNomenclatureByQuestionnaireIdQueryKey = ( - id: string, + id?: string, ) => { return [`/api/questionnaire/${id}/required-nomenclatures`] as const } @@ -493,7 +493,7 @@ export const getNomenclatureById = ( ) } -export const getGetNomenclatureByIdQueryKey = (id: string) => { +export const getGetNomenclatureByIdQueryKey = (id?: string) => { return [`/api/nomenclature/${id}`] as const } @@ -665,7 +665,7 @@ export const getListRequiredNomenclature = ( ) } -export const getGetListRequiredNomenclatureQueryKey = (id: string) => { +export const getGetListRequiredNomenclatureQueryKey = (id?: string) => { return [`/api/campaign/${id}/required-nomenclatures`] as const } diff --git a/src/api/05-metadata.ts b/src/api/05-metadata.ts index cc21ea98..975f98de 100644 --- a/src/api/05-metadata.ts +++ b/src/api/05-metadata.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useQuery } from '@tanstack/react-query' import type { @@ -38,7 +38,7 @@ export const getMetadataByQuestionnaireId = ( ) } -export const getGetMetadataByQuestionnaireIdQueryKey = (id: string) => { +export const getGetMetadataByQuestionnaireIdQueryKey = (id?: string) => { return [`/api/questionnaire/${id}/metadata`] as const } @@ -207,7 +207,7 @@ export const getMetadataByCampaignId = ( ) } -export const getGetMetadataByCampaignIdQueryKey = (id: string) => { +export const getGetMetadataByCampaignIdQueryKey = (id?: string) => { return [`/api/campaign/${id}/metadata`] as const } diff --git a/src/api/06-interrogations.ts b/src/api/06-interrogations.ts index ee4cefaa..2779e8f0 100644 --- a/src/api/06-interrogations.ts +++ b/src/api/06-interrogations.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation, useQuery } from '@tanstack/react-query' import type { @@ -24,7 +24,7 @@ import type { import type { CleanDataParams, GenerateDepositProofParams, - GetCommentByInterrogation200, + GetInterrogationsByStateDataParams, GetInterrogationsByStateParams, Interrogation, InterrogationCreation, @@ -34,7 +34,6 @@ import type { InterrogationSummary, InterrogationUpdate, InterrogationsOkNok, - SetCommentBody, StateData, StateDataUpdate, } from '../models/api' @@ -60,7 +59,7 @@ export const getInterrogationById = ( ) } -export const getGetInterrogationByIdQueryKey = (id: string) => { +export const getGetInterrogationByIdQueryKey = (id?: string) => { return [`/api/interrogations/${id}`] as const } @@ -494,7 +493,7 @@ export const getStateDataByInterrogation = ( ) } -export const getGetStateDataByInterrogationQueryKey = (id: string) => { +export const getGetStateDataByInterrogationQueryKey = (id?: string) => { return [`/api/interrogations/${id}/state-data`] as const } @@ -751,7 +750,7 @@ export const getPersonalizationByInterrogation = ( ) } -export const getGetPersonalizationByInterrogationQueryKey = (id: string) => { +export const getGetPersonalizationByInterrogationQueryKey = (id?: string) => { return [`/api/interrogations/${id}/personalization`] as const } @@ -1012,7 +1011,7 @@ export const getDataByInterrogation = ( ) } -export const getGetDataByInterrogationQueryKey = (id: string) => { +export const getGetDataByInterrogationQueryKey = (id?: string) => { return [`/api/interrogations/${id}/data`] as const } @@ -1255,33 +1254,124 @@ export const useUpdateData = ( return useMutation(mutationOptions, queryClient) } /** - * Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / - * @summary Get comment for an interrogation + * Authorized roles: ADMIN / WEBCLIENT / + * @summary Synchronize an interrogation */ -export const getCommentByInterrogation = ( +export const synchronizeInterrogation = ( id: string, options?: SecondParameter, signal?: AbortSignal, ) => { - return stromaeInstance( - { url: `/api/interrogations/${id}/comment`, method: 'GET', signal }, + return stromaeInstance( + { url: `/api/interrogations/${id}/synchronize`, method: 'POST', signal }, options, ) } -export const getGetCommentByInterrogationQueryKey = (id: string) => { - return [`/api/interrogations/${id}/comment`] as const +export const getSynchronizeInterrogationMutationOptions = < + TError = unknown, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: string }, + TContext + > + request?: SecondParameter +}): UseMutationOptions< + Awaited>, + TError, + { id: string }, + TContext +> => { + const mutationKey = ['synchronizeInterrogation'] + const { mutation: mutationOptions, request: requestOptions } = options + ? options.mutation && + 'mutationKey' in options.mutation && + options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey }, request: undefined } + + const mutationFn: MutationFunction< + Awaited>, + { id: string } + > = (props) => { + const { id } = props ?? {} + + return synchronizeInterrogation(id, requestOptions) + } + + return { mutationFn, ...mutationOptions } } -export const getGetCommentByInterrogationQueryOptions = < - TData = Awaited>, +export type SynchronizeInterrogationMutationResult = NonNullable< + Awaited> +> + +export type SynchronizeInterrogationMutationError = unknown + +/** + * @summary Synchronize an interrogation + */ +export const useSynchronizeInterrogation = < TError = unknown, + TContext = unknown, >( - id: string, + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: string }, + TContext + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseMutationResult< + Awaited>, + TError, + { id: string }, + TContext +> => { + const mutationOptions = getSynchronizeInterrogationMutationOptions(options) + + return useMutation(mutationOptions, queryClient) +} +/** + * Authorized roles: ADMIN / WEBCLIENT / + * @summary Retrieve interrogations filtered by state data + */ +export const getInterrogationsByStateData = ( + params?: GetInterrogationsByStateDataParams, + options?: SecondParameter, + signal?: AbortSignal, +) => { + return stromaeInstance( + { url: `/api/interrogations/state-data`, method: 'GET', params, signal }, + options, + ) +} + +export const getGetInterrogationsByStateDataQueryKey = ( + params?: GetInterrogationsByStateDataParams, +) => { + return [ + `/api/interrogations/state-data`, + ...(params ? [params] : []), + ] as const +} + +export const getGetInterrogationsByStateDataQueryOptions = < + TData = Awaited>, + TError = unknown, +>( + params?: GetInterrogationsByStateDataParams, options?: { query?: Partial< UseQueryOptions< - Awaited>, + Awaited>, TError, TData > @@ -1292,47 +1382,43 @@ export const getGetCommentByInterrogationQueryOptions = < const { query: queryOptions, request: requestOptions } = options ?? {} const queryKey = - queryOptions?.queryKey ?? getGetCommentByInterrogationQueryKey(id) + queryOptions?.queryKey ?? getGetInterrogationsByStateDataQueryKey(params) const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getCommentByInterrogation(id, requestOptions, signal) + Awaited> + > = ({ signal }) => + getInterrogationsByStateData(params, requestOptions, signal) - return { - queryKey, - queryFn, - enabled: !!id, - ...queryOptions, - } as UseQueryOptions< - Awaited>, + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, TError, TData > & { queryKey: DataTag } } -export type GetCommentByInterrogationQueryResult = NonNullable< - Awaited> +export type GetInterrogationsByStateDataQueryResult = NonNullable< + Awaited> > -export type GetCommentByInterrogationQueryError = unknown +export type GetInterrogationsByStateDataQueryError = unknown -export function useGetCommentByInterrogation< - TData = Awaited>, +export function useGetInterrogationsByStateData< + TData = Awaited>, TError = unknown, >( - id: string, + params: undefined | GetInterrogationsByStateDataParams, options: { query: Partial< UseQueryOptions< - Awaited>, + Awaited>, TError, TData > > & Pick< DefinedInitialDataOptions< - Awaited>, + Awaited>, TError, - Awaited> + Awaited> >, 'initialData' > @@ -1342,24 +1428,24 @@ export function useGetCommentByInterrogation< ): DefinedUseQueryResult & { queryKey: DataTag } -export function useGetCommentByInterrogation< - TData = Awaited>, +export function useGetInterrogationsByStateData< + TData = Awaited>, TError = unknown, >( - id: string, + params?: GetInterrogationsByStateDataParams, options?: { query?: Partial< UseQueryOptions< - Awaited>, + Awaited>, TError, TData > > & Pick< UndefinedInitialDataOptions< - Awaited>, + Awaited>, TError, - Awaited> + Awaited> >, 'initialData' > @@ -1369,15 +1455,15 @@ export function useGetCommentByInterrogation< ): UseQueryResult & { queryKey: DataTag } -export function useGetCommentByInterrogation< - TData = Awaited>, +export function useGetInterrogationsByStateData< + TData = Awaited>, TError = unknown, >( - id: string, + params?: GetInterrogationsByStateDataParams, options?: { query?: Partial< UseQueryOptions< - Awaited>, + Awaited>, TError, TData > @@ -1389,18 +1475,18 @@ export function useGetCommentByInterrogation< queryKey: DataTag } /** - * @summary Get comment for an interrogation + * @summary Retrieve interrogations filtered by state data */ -export function useGetCommentByInterrogation< - TData = Awaited>, +export function useGetInterrogationsByStateData< + TData = Awaited>, TError = unknown, >( - id: string, + params?: GetInterrogationsByStateDataParams, options?: { query?: Partial< UseQueryOptions< - Awaited>, + Awaited>, TError, TData > @@ -1411,7 +1497,10 @@ export function useGetCommentByInterrogation< ): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetCommentByInterrogationQueryOptions(id, options) + const queryOptions = getGetInterrogationsByStateDataQueryOptions( + params, + options, + ) const query = useQuery(queryOptions, queryClient) as UseQueryResult< TData, @@ -1423,94 +1512,6 @@ export function useGetCommentByInterrogation< return query } -/** - * Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / SURVEY_UNIT / - * @summary Update comment for an interrogation - */ -export const setComment = ( - id: string, - setCommentBody: SetCommentBody, - options?: SecondParameter, -) => { - return stromaeInstance( - { - url: `/api/interrogations/${id}/comment`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: setCommentBody, - }, - options, - ) -} - -export const getSetCommentMutationOptions = < - TError = unknown, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { id: string; data: SetCommentBody }, - TContext - > - request?: SecondParameter -}): UseMutationOptions< - Awaited>, - TError, - { id: string; data: SetCommentBody }, - TContext -> => { - const mutationKey = ['setComment'] - const { mutation: mutationOptions, request: requestOptions } = options - ? options.mutation && - 'mutationKey' in options.mutation && - options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey }, request: undefined } - - const mutationFn: MutationFunction< - Awaited>, - { id: string; data: SetCommentBody } - > = (props) => { - const { id, data } = props ?? {} - - return setComment(id, data, requestOptions) - } - - return { mutationFn, ...mutationOptions } -} - -export type SetCommentMutationResult = NonNullable< - Awaited> -> -export type SetCommentMutationBody = SetCommentBody -export type SetCommentMutationError = unknown - -/** - * @summary Update comment for an interrogation - */ -export const useSetComment = ( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { id: string; data: SetCommentBody }, - TContext - > - request?: SecondParameter - }, - queryClient?: QueryClient, -): UseMutationResult< - Awaited>, - TError, - { id: string; data: SetCommentBody }, - TContext -> => { - const mutationOptions = getSetCommentMutationOptions(options) - - return useMutation(mutationOptions, queryClient) -} /** * Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / * @summary Get state-data for all interrogations defined in request body @@ -1987,7 +1988,7 @@ export const getInterrogationsBySurveyUnit = ( ) } -export const getGetInterrogationsBySurveyUnitQueryKey = (id: string) => { +export const getGetInterrogationsBySurveyUnitQueryKey = (id?: string) => { return [`/api/survey-units/${id}/interrogations`] as const } @@ -2311,7 +2312,7 @@ export const getInterrogationMetadataById = ( ) } -export const getGetInterrogationMetadataByIdQueryKey = (id: string) => { +export const getGetInterrogationMetadataByIdQueryKey = (id?: string) => { return [`/api/interrogations/${id}/metadata`] as const } @@ -2488,7 +2489,7 @@ export const generateDepositProof = ( } export const getGenerateDepositProofQueryKey = ( - id: string, + id?: string, params?: GenerateDepositProofParams, ) => { return [ @@ -2652,6 +2653,334 @@ export function useGenerateDepositProof< return query } +/** + * Authorized roles: ADMIN / WEBCLIENT / INTERVIEWER / + * @summary Get list of interrogations linked to the current interviewer + */ +export const getInterviewerInterrogations = ( + options?: SecondParameter, + signal?: AbortSignal, +) => { + return stromaeInstance( + { url: `/api/interrogations/interviewer`, method: 'GET', signal }, + options, + ) +} + +export const getGetInterviewerInterrogationsQueryKey = () => { + return [`/api/interrogations/interviewer`] as const +} + +export const getGetInterviewerInterrogationsQueryOptions = < + TData = Awaited>, + TError = unknown, +>(options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter +}) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = + queryOptions?.queryKey ?? getGetInterviewerInterrogationsQueryKey() + + const queryFn: QueryFunction< + Awaited> + > = ({ signal }) => getInterviewerInterrogations(requestOptions, signal) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetInterviewerInterrogationsQueryResult = NonNullable< + Awaited> +> +export type GetInterviewerInterrogationsQueryError = unknown + +export function useGetInterviewerInterrogations< + TData = Awaited>, + TError = unknown, +>( + options: { + query: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): DefinedUseQueryResult & { + queryKey: DataTag +} +export function useGetInterviewerInterrogations< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +export function useGetInterviewerInterrogations< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +/** + * @summary Get list of interrogations linked to the current interviewer + */ + +export function useGetInterviewerInterrogations< + TData = Awaited>, + TError = unknown, +>( + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} { + const queryOptions = getGetInterviewerInterrogationsQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult< + TData, + TError + > & { queryKey: DataTag } + + query.queryKey = queryOptions.queryKey + + return query +} + +/** + * Authorized roles: ADMIN / WEBCLIENT / REVIEWER / REVIEWER_ALTERNATIVE / INTERVIEWER / + * @summary Get list of interrogations for a campaign + */ +export const getListInterrogationByCampaign = ( + id: string, + options?: SecondParameter, + signal?: AbortSignal, +) => { + return stromaeInstance( + { url: `/api/campaign/${id}/interrogations`, method: 'GET', signal }, + options, + ) +} + +export const getGetListInterrogationByCampaignQueryKey = (id?: string) => { + return [`/api/campaign/${id}/interrogations`] as const +} + +export const getGetListInterrogationByCampaignQueryOptions = < + TData = Awaited>, + TError = unknown, +>( + id: string, + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, +) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = + queryOptions?.queryKey ?? getGetListInterrogationByCampaignQueryKey(id) + + const queryFn: QueryFunction< + Awaited> + > = ({ signal }) => getListInterrogationByCampaign(id, requestOptions, signal) + + return { + queryKey, + queryFn, + enabled: !!id, + ...queryOptions, + } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetListInterrogationByCampaignQueryResult = NonNullable< + Awaited> +> +export type GetListInterrogationByCampaignQueryError = unknown + +export function useGetListInterrogationByCampaign< + TData = Awaited>, + TError = unknown, +>( + id: string, + options: { + query: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): DefinedUseQueryResult & { + queryKey: DataTag +} +export function useGetListInterrogationByCampaign< + TData = Awaited>, + TError = unknown, +>( + id: string, + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +export function useGetListInterrogationByCampaign< + TData = Awaited>, + TError = unknown, +>( + id: string, + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} +/** + * @summary Get list of interrogations for a campaign + */ + +export function useGetListInterrogationByCampaign< + TData = Awaited>, + TError = unknown, +>( + id: string, + options?: { + query?: Partial< + UseQueryOptions< + Awaited>, + TError, + TData + > + > + request?: SecondParameter + }, + queryClient?: QueryClient, +): UseQueryResult & { + queryKey: DataTag +} { + const queryOptions = getGetListInterrogationByCampaignQueryOptions( + id, + options, + ) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult< + TData, + TError + > & { queryKey: DataTag } + + query.queryKey = queryOptions.queryKey + + return query +} + /** * Authorized roles: ADMIN / WEBCLIENT / * @summary Retrieve interrogations by state @@ -2674,8 +3003,8 @@ export const getInterrogationsByState = ( } export const getGetInterrogationsByStateQueryKey = ( - id: string, - params: GetInterrogationsByStateParams, + id?: string, + params?: GetInterrogationsByStateParams, ) => { return [ `/api/admin/campaign/${id}/interrogations`, diff --git a/src/api/07-paradata-events.ts b/src/api/07-paradata-events.ts index 86bb8526..a0e9cc55 100644 --- a/src/api/07-paradata-events.ts +++ b/src/api/07-paradata-events.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation } from '@tanstack/react-query' import type { diff --git a/src/api/08-interrogations-in-temp-zone.ts b/src/api/08-interrogations-in-temp-zone.ts index 4f6352fe..ccea8c4e 100644 --- a/src/api/08-interrogations-in-temp-zone.ts +++ b/src/api/08-interrogations-in-temp-zone.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useMutation, useQuery } from '@tanstack/react-query' import type { diff --git a/src/api/09-healthcheck.ts b/src/api/09-healthcheck.ts index e8ef4dfd..46ab8285 100644 --- a/src/api/09-healthcheck.ts +++ b/src/api/09-healthcheck.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import { useQuery } from '@tanstack/react-query' import type { diff --git a/src/api/10-events.ts b/src/api/events-controller.ts similarity index 56% rename from src/api/10-events.ts rename to src/api/events-controller.ts index 725821bd..65d362d8 100644 --- a/src/api/10-events.ts +++ b/src/api/events-controller.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 */ import { useMutation } from '@tanstack/react-query' import type { @@ -13,17 +13,16 @@ import type { UseMutationResult, } from '@tanstack/react-query' -import type { PostEventsBody } from '../models/api' +import type { EventDto } from '../models/api' import { stromaeInstance } from './axiosInstance' type SecondParameter unknown> = Parameters[1] /** - * Creates different types of events based on the event type - * @summary Create an event + * @summary Save an event */ -export const postEvents = ( - postEventsBody: PostEventsBody, +export const addEvent = ( + eventDto: EventDto, options?: SecondParameter, signal?: AbortSignal, ) => { @@ -32,31 +31,31 @@ export const postEvents = ( url: `/api/events`, method: 'POST', headers: { 'Content-Type': 'application/json' }, - data: postEventsBody, + data: eventDto, signal, }, options, ) } -export const getPostEventsMutationOptions = < - TError = void, +export const getAddEventMutationOptions = < + TError = unknown, TContext = unknown, >(options?: { mutation?: UseMutationOptions< - Awaited>, + Awaited>, TError, - { data: PostEventsBody }, + { data: EventDto }, TContext > request?: SecondParameter }): UseMutationOptions< - Awaited>, + Awaited>, TError, - { data: PostEventsBody }, + { data: EventDto }, TContext > => { - const mutationKey = ['postEvents'] + const mutationKey = ['addEvent'] const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && 'mutationKey' in options.mutation && @@ -66,44 +65,44 @@ export const getPostEventsMutationOptions = < : { mutation: { mutationKey }, request: undefined } const mutationFn: MutationFunction< - Awaited>, - { data: PostEventsBody } + Awaited>, + { data: EventDto } > = (props) => { const { data } = props ?? {} - return postEvents(data, requestOptions) + return addEvent(data, requestOptions) } return { mutationFn, ...mutationOptions } } -export type PostEventsMutationResult = NonNullable< - Awaited> +export type AddEventMutationResult = NonNullable< + Awaited> > -export type PostEventsMutationBody = PostEventsBody -export type PostEventsMutationError = void +export type AddEventMutationBody = EventDto +export type AddEventMutationError = unknown /** - * @summary Create an event + * @summary Save an event */ -export const usePostEvents = ( +export const useAddEvent = ( options?: { mutation?: UseMutationOptions< - Awaited>, + Awaited>, TError, - { data: PostEventsBody }, + { data: EventDto }, TContext > request?: SecondParameter }, queryClient?: QueryClient, ): UseMutationResult< - Awaited>, + Awaited>, TError, - { data: PostEventsBody }, + { data: EventDto }, TContext > => { - const mutationOptions = getPostEventsMutationOptions(options) + const mutationOptions = getAddEventMutationOptions(options) return useMutation(mutationOptions, queryClient) } diff --git a/src/components/orchestrator/Orchestrator.test.tsx b/src/components/orchestrator/Orchestrator.test.tsx index c2db2eea..6d9d77f6 100644 --- a/src/components/orchestrator/Orchestrator.test.tsx +++ b/src/components/orchestrator/Orchestrator.test.tsx @@ -43,6 +43,11 @@ vi.mock('@tanstack/react-router', async (importOriginal) => { } }) +// Autosave interval stubbed for the tests. waitFor timeouts must exceed it, +// otherwise the first interval tick can never be observed. +const AUTOSAVE_INTERVAL_MS = 2100 +const AUTOSAVE_WAIT_TIMEOUT_MS = AUTOSAVE_INTERVAL_MS + 900 + describe('Orchestrator', () => { const defaultInterrogation = { stateData: undefined, @@ -166,7 +171,7 @@ describe('Orchestrator', () => { beforeEach(() => { localStorage.clear() vi.clearAllMocks() - vi.stubEnv('VITE_AUTOSAVE_INTERVAL', '2100') + vi.stubEnv('VITE_AUTOSAVE_INTERVAL', String(AUTOSAVE_INTERVAL_MS)) }) afterEach(() => { @@ -451,7 +456,7 @@ describe('Orchestrator', () => { expect(document.title).not.toBe('Sending the questionnaire') expect(document.title).toContain('*') }, - { timeout: 3000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -562,7 +567,7 @@ describe('Orchestrator', () => { () => { expect(updateDataAndStateData).toHaveBeenCalledTimes(2) }, - { timeout: 3000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) const calls = updateDataAndStateData.mock.calls @@ -600,7 +605,7 @@ describe('Orchestrator', () => { () => { expect(document.title).not.toContain('*') }, - { timeout: 3000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -659,7 +664,7 @@ describe('Orchestrator', () => { () => { expect(getByText('Sync in progress')).toBeInTheDocument() }, - { timeout: 3000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -867,7 +872,7 @@ describe('Orchestrator', () => { () => { expect(updateDataAndStateData).toHaveBeenCalledOnce() }, - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -896,7 +901,7 @@ describe('Orchestrator', () => { expect.objectContaining({ isLogout: false, shouldShowToast: false }), ) }, - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -961,7 +966,7 @@ describe('Orchestrator', () => { await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(1), - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) await user.click(getByText('my-question')) @@ -969,7 +974,7 @@ describe('Orchestrator', () => { await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(2), - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) }) @@ -1004,13 +1009,13 @@ describe('Orchestrator', () => { // First auto-save fires — fails, isDirtyState stays true await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(1), - { timeout: 2100 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) // Second auto-save fires automatically (isDirtyState still true) — succeeds await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(2), - { timeout: 2100 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) expect(updateDataAndStateData).toHaveBeenLastCalledWith( @@ -1058,7 +1063,7 @@ describe('Orchestrator', () => { await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(1), - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) await user.click(getByText('my-question')) @@ -1068,7 +1073,7 @@ describe('Orchestrator', () => { await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(2), - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) await user.click(getByText('my-question-2')) @@ -1076,7 +1081,7 @@ describe('Orchestrator', () => { await waitFor( () => expect(updateDataAndStateData).toHaveBeenCalledTimes(3), - { timeout: 2000 }, + { timeout: AUTOSAVE_WAIT_TIMEOUT_MS }, ) expect(updateDataAndStateData).toHaveBeenLastCalledWith( diff --git a/src/components/orchestrator/Orchestrator.tsx b/src/components/orchestrator/Orchestrator.tsx index 3dac7f0a..e010409a 100644 --- a/src/components/orchestrator/Orchestrator.tsx +++ b/src/components/orchestrator/Orchestrator.tsx @@ -251,7 +251,7 @@ export function Orchestrator(props: OrchestratorProps) { getMultimode: getMultimode, }, ) - useEvents(interrogation, getCurrentArticulationState, pageTag, getChangedData) + useEvents(interrogation, pageTag, getChangedData) /** For validating the questionnaire, it tries to put a `VALIDATED` stateData with the `endPage` */ const validateQuestionnaire = async () => { diff --git a/src/components/orchestrator/hooks/useEvents.test.ts b/src/components/orchestrator/hooks/useEvents.test.ts new file mode 100644 index 00000000..8a41d65c --- /dev/null +++ b/src/components/orchestrator/hooks/useEvents.test.ts @@ -0,0 +1,157 @@ +import { renderHook } from '@testing-library/react' +import { + afterAll, + beforeAll, + beforeEach, + describe, + expect, + it, + vi, +} from 'vitest' + +import { + EventDtoAggregateType, + EventDtoEventType, + EventPayloadDtoMode, +} from '@/models/api' +import type { Interrogation } from '@/models/interrogation' + +import { useEvents } from './useEvents' + +const { mutateAsync } = vi.hoisted(() => ({ + mutateAsync: vi.fn(), +})) + +vi.mock('@/api/events-controller', () => ({ + useAddEvent: () => ({ mutateAsync }), +})) + +const noopChangedData = () => ({ COLLECTED: {} }) + +const baseInterrogation: Interrogation = { + id: 'PROTO10', + questionnaireId: 'qid', + stateData: { + state: 'COMPLETED', + date: 1, + currentPage: '1', + multimode: { state: null, date: 1 }, + }, +} + +/** Render useEvents once, then rerender with a mutated interrogation to fire the change callbacks. */ +function renderAndChange(next: Interrogation) { + const { rerender } = renderHook( + ({ interrogation }) => useEvents(interrogation, '1', noopChangedData), + { initialProps: { interrogation: baseInterrogation } }, + ) + rerender({ interrogation: next }) +} + +beforeAll(() => { + import.meta.env.VITE_MULTIMODE_ENABLED = 'true' +}) + +afterAll(() => { + import.meta.env.VITE_MULTIMODE_ENABLED = '0' +}) + +beforeEach(() => { + mutateAsync.mockReset() + mutateAsync.mockResolvedValue(undefined) +}) + +describe('useEvents', () => { + it('sends a MULTIMODE_MOVED event when multimode state becomes IS_MOVED', () => { + renderAndChange({ + ...baseInterrogation, + stateData: { + ...baseInterrogation.stateData!, + multimode: { state: 'IS_MOVED', date: 2 }, + }, + }) + + expect(mutateAsync).toHaveBeenCalledTimes(1) + expect(mutateAsync).toHaveBeenCalledWith({ + data: { + eventType: EventDtoEventType.MULTIMODE_MOVED, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, + payload: { + interrogationId: 'PROTO10', + mode: EventPayloadDtoMode.CAWI, + }, + }, + }) + }) + + it('sends a QUESTIONNAIRE_LEAF_STATES_UPDATED event with ISO dates and no cells', () => { + const date = 1_700_000_000_000 + + renderAndChange({ + ...baseInterrogation, + stateData: { + ...baseInterrogation.stateData!, + leafStates: [{ state: 'COMPLETED', date }], + }, + }) + + expect(mutateAsync).toHaveBeenCalledTimes(1) + expect(mutateAsync).toHaveBeenCalledWith({ + data: { + eventType: EventDtoEventType.QUESTIONNAIRE_LEAF_STATES_UPDATED, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, + payload: { + interrogationId: 'PROTO10', + mode: EventPayloadDtoMode.CAWI, + leafStates: [ + { state: 'COMPLETED', date: new Date(date).toISOString() }, + ], + }, + }, + }) + }) + + it('maps the interrogation state to its event type (INIT)', () => { + renderAndChange({ + ...baseInterrogation, + stateData: { ...baseInterrogation.stateData!, state: 'INIT' }, + }) + + expect(mutateAsync).toHaveBeenCalledTimes(1) + expect(mutateAsync).toHaveBeenCalledWith({ + data: { + eventType: EventDtoEventType.QUESTIONNAIRE_INIT, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, + payload: { + interrogationId: 'PROTO10', + mode: EventPayloadDtoMode.CAWI, + }, + }, + }) + }) + + it('does not send an event for states without a mapping (TOEXTRACT)', () => { + renderAndChange({ + ...baseInterrogation, + stateData: { ...baseInterrogation.stateData!, state: 'TOEXTRACT' }, + }) + + expect(mutateAsync).not.toHaveBeenCalled() + }) + + it('sends nothing when multimode is disabled', () => { + import.meta.env.VITE_MULTIMODE_ENABLED = '0' + try { + renderAndChange({ + ...baseInterrogation, + stateData: { + ...baseInterrogation.stateData!, + multimode: { state: 'IS_MOVED', date: 2 }, + }, + }) + expect(mutateAsync).not.toHaveBeenCalled() + } finally { + import.meta.env.VITE_MULTIMODE_ENABLED = 'true' + } + }) +}) diff --git a/src/components/orchestrator/hooks/useEvents.ts b/src/components/orchestrator/hooks/useEvents.ts index 22364c87..353c69f9 100644 --- a/src/components/orchestrator/hooks/useEvents.ts +++ b/src/components/orchestrator/hooks/useEvents.ts @@ -1,23 +1,41 @@ -import type { getArticulationState } from '@inseefr/lunatic' - -import { usePostEvents } from '@/api/10-events' +import { useAddEvent } from '@/api/events-controller' import { - LeafStatesUpdatedEventType, - MultimodeMovedEventType, - QuestionnaireEventType, + EventDtoAggregateType, + EventDtoEventType, + EventPayloadDtoMode, } from '@/models/api' import type { Interrogation } from '@/models/interrogation' import type { LunaticPageTag } from '@/models/lunaticType.ts' +import type { QuestionnaireState } from '@/models/questionnaireState' import { hasMultimode } from '@/utils/env.ts' import { useCallbackOnValueChange } from './useCallbackOnValueChange.ts' +// stromae-dsfr is the self-administered web frontend, so the collect mode is CAWI +const COLLECTION_MODE = EventPayloadDtoMode.CAWI + +/** + * Map an interrogation state to its event type. States that do not map to an + * event (TOEXTRACT, EXTRACTED) return undefined and emit nothing. + */ +function stateToEventType(state: QuestionnaireState | undefined) { + switch (state) { + case 'INIT': + return EventDtoEventType.QUESTIONNAIRE_INIT + case 'VALIDATED': + return EventDtoEventType.QUESTIONNAIRE_VALIDATED + case 'COMPLETED': + return EventDtoEventType.QUESTIONNAIRE_COMPLETED + default: + return undefined + } +} + /** * Trigger events when specific operations happens during interrogation */ export function useEvents( interrogation: Interrogation, - getLeafStatesData: () => ReturnType, pageTag: LunaticPageTag, getChangedData: (reset: boolean) => Record, ) { @@ -27,23 +45,22 @@ export function useEvents( } /* eslint-disable react-hooks/rules-of-hooks */ - const { mutateAsync } = usePostEvents() + const { mutateAsync } = useAddEvent() - // Send an event when multimode state changes + // Send an event when multimode state changes (only MULTIMODE_MOVED exists) useCallbackOnValueChange( interrogation.stateData?.multimode?.state ?? null, (multimodeState) => { - if (!multimodeState || !interrogation.id) { + if (multimodeState !== 'IS_MOVED' || !interrogation.id) { return } mutateAsync({ data: { - type: multimodeState.replace( - 'IS_', - 'MUTLIMODE_', - ) as MultimodeMovedEventType, + eventType: EventDtoEventType.MULTIMODE_MOVED, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, payload: { interrogationId: interrogation.id, + mode: COLLECTION_MODE, }, }, }) @@ -58,21 +75,17 @@ export function useEvents( return } - // Inject cell data inside the leafStates - const data = getLeafStatesData() - const leafStatesWithCells = leafStates.map((leafState, index) => { - return { - ...leafState, - cells: data.items[index].cells, - } - }) - mutateAsync({ data: { - type: LeafStatesUpdatedEventType.LEAF_STATES_UPDATED, + eventType: EventDtoEventType.QUESTIONNAIRE_LEAF_STATES_UPDATED, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, payload: { interrogationId: interrogation.id, - leafStates: leafStatesWithCells, + mode: COLLECTION_MODE, + leafStates: leafStates.map(({ state, date }) => ({ + state: state ?? undefined, + date: new Date(date).toISOString(), + })), }, }, }) @@ -91,9 +104,11 @@ export function useEvents( mutateAsync({ data: { - type: `QUESTIONNAIRE_UPDATED` as QuestionnaireEventType, + eventType: EventDtoEventType.QUESTIONNAIRE_UPDATED, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, payload: { interrogationId: interrogation.id, + mode: COLLECTION_MODE, }, }, }) @@ -101,14 +116,17 @@ export function useEvents( // Send an event when the interrogation state changes useCallbackOnValueChange(interrogation.stateData?.state, (state) => { - if (!state || !interrogation.id) { + const eventType = stateToEventType(state) + if (!eventType || !interrogation.id) { return } mutateAsync({ data: { - type: `QUESTIONNAIRE_${state}` as QuestionnaireEventType, + eventType, + aggregateType: EventDtoAggregateType.QUESTIONNAIRE, payload: { interrogationId: interrogation.id, + mode: COLLECTION_MODE, }, }, }) diff --git a/src/models/api/addParadataBody.ts b/src/models/api/addParadataBody.ts index 912c1144..cc2fabc6 100644 --- a/src/models/api/addParadataBody.ts +++ b/src/models/api/addParadataBody.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type AddParadataBody = { [key: string]: unknown } diff --git a/src/models/api/arrayNode.ts b/src/models/api/arrayNode.ts index dc074188..1f9d836c 100644 --- a/src/models/api/arrayNode.ts +++ b/src/models/api/arrayNode.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { ArrayNodeItem } from './arrayNodeItem' diff --git a/src/models/api/arrayNodeItem.ts b/src/models/api/arrayNodeItem.ts index e0851670..3439b4b4 100644 --- a/src/models/api/arrayNodeItem.ts +++ b/src/models/api/arrayNodeItem.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type ArrayNodeItem = { [key: string]: unknown } diff --git a/src/models/api/campaign.ts b/src/models/api/campaign.ts index 573abc77..63bb3940 100644 --- a/src/models/api/campaign.ts +++ b/src/models/api/campaign.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { CampaignMetadata } from './campaignMetadata' import type { CampaignSensitivity } from './campaignSensitivity' diff --git a/src/models/api/campaignCreation.ts b/src/models/api/campaignCreation.ts index 7d7c8345..1a30eb51 100644 --- a/src/models/api/campaignCreation.ts +++ b/src/models/api/campaignCreation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { CampaignCreationSensitivity } from './campaignCreationSensitivity' import type { MetadataCreation } from './metadataCreation' diff --git a/src/models/api/campaignCreationSensitivity.ts b/src/models/api/campaignCreationSensitivity.ts index 375c5261..92955b59 100644 --- a/src/models/api/campaignCreationSensitivity.ts +++ b/src/models/api/campaignCreationSensitivity.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CampaignCreationSensitivity = diff --git a/src/models/api/campaignCreationV2.ts b/src/models/api/campaignCreationV2.ts index f7fad972..f7a9e578 100644 --- a/src/models/api/campaignCreationV2.ts +++ b/src/models/api/campaignCreationV2.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { CampaignCreationV2Sensitivity } from './campaignCreationV2Sensitivity' import type { SchemaMetadata } from './schema.metadata/schemaMetadata' diff --git a/src/models/api/campaignCreationV2Sensitivity.ts b/src/models/api/campaignCreationV2Sensitivity.ts index 31769ff7..dab62fde 100644 --- a/src/models/api/campaignCreationV2Sensitivity.ts +++ b/src/models/api/campaignCreationV2Sensitivity.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CampaignCreationV2Sensitivity = diff --git a/src/models/api/campaignIdsDto.ts b/src/models/api/campaignIdsDto.ts index 46568747..921e9b9b 100644 --- a/src/models/api/campaignIdsDto.ts +++ b/src/models/api/campaignIdsDto.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface CampaignIdsDto { diff --git a/src/models/api/campaignMetadata.ts b/src/models/api/campaignMetadata.ts index f83d0c1b..5a72aed2 100644 --- a/src/models/api/campaignMetadata.ts +++ b/src/models/api/campaignMetadata.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CampaignMetadata = { [key: string]: unknown } diff --git a/src/models/api/campaignSensitivity.ts b/src/models/api/campaignSensitivity.ts index 8ccab4b9..4383a984 100644 --- a/src/models/api/campaignSensitivity.ts +++ b/src/models/api/campaignSensitivity.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CampaignSensitivity = diff --git a/src/models/api/campaignSummary.ts b/src/models/api/campaignSummary.ts index dc2b3719..285adc5a 100644 --- a/src/models/api/campaignSummary.ts +++ b/src/models/api/campaignSummary.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { CampaignSummarySensitivity } from './campaignSummarySensitivity' diff --git a/src/models/api/campaignSummarySensitivity.ts b/src/models/api/campaignSummarySensitivity.ts index 19858dde..3165b855 100644 --- a/src/models/api/campaignSummarySensitivity.ts +++ b/src/models/api/campaignSummarySensitivity.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CampaignSummarySensitivity = diff --git a/src/models/api/cleanDataParams.ts b/src/models/api/cleanDataParams.ts index 44d8dc08..1230e30f 100644 --- a/src/models/api/cleanDataParams.ts +++ b/src/models/api/cleanDataParams.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type CleanDataParams = { diff --git a/src/models/api/deleteCampaignByIdParams.ts b/src/models/api/deleteCampaignByIdParams.ts index 5c45d1fd..c1a54e6c 100644 --- a/src/models/api/deleteCampaignByIdParams.ts +++ b/src/models/api/deleteCampaignByIdParams.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type DeleteCampaignByIdParams = { diff --git a/src/models/api/eventDto.ts b/src/models/api/eventDto.ts new file mode 100644 index 00000000..02c2fcce --- /dev/null +++ b/src/models/api/eventDto.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ +import type { EventDtoAggregateType } from './eventDtoAggregateType' +import type { EventDtoEventType } from './eventDtoEventType' +import type { EventPayloadDto } from './eventPayloadDto' + +export interface EventDto { + correlationId?: string + eventType: EventDtoEventType + aggregateType: EventDtoAggregateType + payload: EventPayloadDto +} diff --git a/src/models/api/eventDtoAggregateType.ts b/src/models/api/eventDtoAggregateType.ts new file mode 100644 index 00000000..7f9d7293 --- /dev/null +++ b/src/models/api/eventDtoAggregateType.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ + +export type EventDtoAggregateType = + (typeof EventDtoAggregateType)[keyof typeof EventDtoAggregateType] + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EventDtoAggregateType = { + QUESTIONNAIRE: 'QUESTIONNAIRE', +} as const diff --git a/src/models/api/eventDtoEventType.ts b/src/models/api/eventDtoEventType.ts new file mode 100644 index 00000000..93cde47c --- /dev/null +++ b/src/models/api/eventDtoEventType.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ + +export type EventDtoEventType = + (typeof EventDtoEventType)[keyof typeof EventDtoEventType] + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EventDtoEventType = { + MULTIMODE_MOVED: 'MULTIMODE_MOVED', + QUESTIONNAIRE_INIT: 'QUESTIONNAIRE_INIT', + QUESTIONNAIRE_LEAF_STATES_UPDATED: 'QUESTIONNAIRE_LEAF_STATES_UPDATED', + QUESTIONNAIRE_UPDATED: 'QUESTIONNAIRE_UPDATED', + QUESTIONNAIRE_COMPLETED: 'QUESTIONNAIRE_COMPLETED', + QUESTIONNAIRE_VALIDATED: 'QUESTIONNAIRE_VALIDATED', + QUESTIONNAIRE_SWITCH_CAPI: 'QUESTIONNAIRE_SWITCH_CAPI', +} as const diff --git a/src/models/api/eventPayloadDto.ts b/src/models/api/eventPayloadDto.ts new file mode 100644 index 00000000..94b379c8 --- /dev/null +++ b/src/models/api/eventPayloadDto.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ +import type { EventPayloadDtoMode } from './eventPayloadDtoMode' +import type { EventPayloadLeafStatesInnerDto } from './eventPayloadLeafStatesInnerDto' + +export interface EventPayloadDto { + interrogationId: string + mode: EventPayloadDtoMode + leafStates?: EventPayloadLeafStatesInnerDto[] +} diff --git a/src/models/api/eventPayloadDtoMode.ts b/src/models/api/eventPayloadDtoMode.ts new file mode 100644 index 00000000..73e2cfce --- /dev/null +++ b/src/models/api/eventPayloadDtoMode.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ + +export type EventPayloadDtoMode = + (typeof EventPayloadDtoMode)[keyof typeof EventPayloadDtoMode] + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EventPayloadDtoMode = { + CATI: 'CATI', + CAPI: 'CAPI', + CAWI: 'CAWI', + PAPI: 'PAPI', +} as const diff --git a/src/models/api/eventPayloadLeafStatesInnerDto.ts b/src/models/api/eventPayloadLeafStatesInnerDto.ts new file mode 100644 index 00000000..55678502 --- /dev/null +++ b/src/models/api/eventPayloadLeafStatesInnerDto.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ +import type { EventPayloadLeafStatesInnerDtoState } from './eventPayloadLeafStatesInnerDtoState' + +export interface EventPayloadLeafStatesInnerDto { + state?: EventPayloadLeafStatesInnerDtoState + date: string +} diff --git a/src/models/api/eventPayloadLeafStatesInnerDtoState.ts b/src/models/api/eventPayloadLeafStatesInnerDtoState.ts new file mode 100644 index 00000000..da900b21 --- /dev/null +++ b/src/models/api/eventPayloadLeafStatesInnerDtoState.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ + +export type EventPayloadLeafStatesInnerDtoState = + (typeof EventPayloadLeafStatesInnerDtoState)[keyof typeof EventPayloadLeafStatesInnerDtoState] + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const EventPayloadLeafStatesInnerDtoState = { + INIT: 'INIT', + COMPLETED: 'COMPLETED', +} as const diff --git a/src/models/api/generateDepositProofParams.ts b/src/models/api/generateDepositProofParams.ts index 4e54fe54..4ba2e9a8 100644 --- a/src/models/api/generateDepositProofParams.ts +++ b/src/models/api/generateDepositProofParams.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type GenerateDepositProofParams = { diff --git a/src/models/api/getCommentByInterrogation200.ts b/src/models/api/getCommentByInterrogation200.ts deleted file mode 100644 index 532f3d0f..00000000 --- a/src/models/api/getCommentByInterrogation200.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * queen-api - * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 - */ - -export type GetCommentByInterrogation200 = { [key: string]: unknown } diff --git a/src/models/api/getInterrogationsByStateDataParams.ts b/src/models/api/getInterrogationsByStateDataParams.ts new file mode 100644 index 00000000..b3e7d75e --- /dev/null +++ b/src/models/api/getInterrogationsByStateDataParams.ts @@ -0,0 +1,12 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ +import type { GetInterrogationsByStateDataStateData } from './getInterrogationsByStateDataStateData' + +export type GetInterrogationsByStateDataParams = { + stateData?: GetInterrogationsByStateDataStateData +} diff --git a/src/models/api/getInterrogationsByStateDataStateData.ts b/src/models/api/getInterrogationsByStateDataStateData.ts new file mode 100644 index 00000000..e1d78255 --- /dev/null +++ b/src/models/api/getInterrogationsByStateDataStateData.ts @@ -0,0 +1,20 @@ +/** + * Generated by orval v7.21.0 🍺 + * Do not edit manually. + * queen-api + * API for Queen/Stromae + * OpenAPI spec version: 5.6.1 + */ + +export type GetInterrogationsByStateDataStateData = + (typeof GetInterrogationsByStateDataStateData)[keyof typeof GetInterrogationsByStateDataStateData] + +// eslint-disable-next-line @typescript-eslint/no-redeclare +export const GetInterrogationsByStateDataStateData = { + INIT: 'INIT', + COMPLETED: 'COMPLETED', + VALIDATED: 'VALIDATED', + TOEXTRACT: 'TOEXTRACT', + EXTRACTED: 'EXTRACTED', + IS_MOVED: 'IS_MOVED', +} as const diff --git a/src/models/api/getInterrogationsByStateParams.ts b/src/models/api/getInterrogationsByStateParams.ts index 7021320e..b4f4ce84 100644 --- a/src/models/api/getInterrogationsByStateParams.ts +++ b/src/models/api/getInterrogationsByStateParams.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { GetInterrogationsByStateState } from './getInterrogationsByStateState' diff --git a/src/models/api/getInterrogationsByStateState.ts b/src/models/api/getInterrogationsByStateState.ts index 1111f83d..50ad3659 100644 --- a/src/models/api/getInterrogationsByStateState.ts +++ b/src/models/api/getInterrogationsByStateState.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type GetInterrogationsByStateState = @@ -16,4 +16,5 @@ export const GetInterrogationsByStateState = { VALIDATED: 'VALIDATED', TOEXTRACT: 'TOEXTRACT', EXTRACTED: 'EXTRACTED', + IS_MOVED: 'IS_MOVED', } as const diff --git a/src/models/api/getQuestionnaireData200.ts b/src/models/api/getQuestionnaireData200.ts index ff4e9d03..50f489f5 100644 --- a/src/models/api/getQuestionnaireData200.ts +++ b/src/models/api/getQuestionnaireData200.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type GetQuestionnaireData200 = { [key: string]: unknown } diff --git a/src/models/api/index.ts b/src/models/api/index.ts index 81822da4..c524e08f 100644 --- a/src/models/api/index.ts +++ b/src/models/api/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './addParadataBody' @@ -21,8 +21,16 @@ export * from './campaignSummary' export * from './campaignSummarySensitivity' export * from './cleanDataParams' export * from './deleteCampaignByIdParams' +export * from './eventDto' +export * from './eventDtoAggregateType' +export * from './eventDtoEventType' +export * from './eventPayloadDto' +export * from './eventPayloadDtoMode' +export * from './eventPayloadLeafStatesInnerDto' +export * from './eventPayloadLeafStatesInnerDtoState' export * from './generateDepositProofParams' -export * from './getCommentByInterrogation200' +export * from './getInterrogationsByStateDataParams' +export * from './getInterrogationsByStateDataStateData' export * from './getInterrogationsByStateParams' export * from './getInterrogationsByStateState' export * from './getQuestionnaireData200' @@ -34,7 +42,6 @@ export * from './integrationResults' export * from './interrogation' export * from './interrogationComment' export * from './interrogationCreation' -export * from './interrogationCreationComment' export * from './interrogationDataStateDataUpdate' export * from './interrogationMetadata' export * from './interrogationMetadataContext' @@ -44,30 +51,17 @@ export * from './interrogationTempZone' export * from './interrogationUpdate' export * from './interrogationUpdateComment' export * from './interrogationsOkNok' -export * from './leafState' -export * from './leafStateState' -export * from './leafStatesUpdatedEvent' -export * from './leafStatesUpdatedEventPayload' -export * from './leafStatesUpdatedEventType' export * from './logo' export * from './logos' export * from './metadataCreation' export * from './metadataVariable' -export * from './multimodeMovedEvent' -export * from './multimodeMovedEventPayload' -export * from './multimodeMovedEventType' export * from './nomenclatureCreation' export * from './objectNode' -export * from './postEventsBody' -export * from './questionnaireEvent' -export * from './questionnaireEventPayload' -export * from './questionnaireEventType' export * from './questionnaireModelCreation' export * from './questionnaireModelCreationValue' export * from './questionnaireModelId' export * from './questionnaireModelValue' export * from './questionnaireModelValueValue' -export * from './setCommentBody' export * from './stateData' export * from './stateDataForInterrogationUpdate' export * from './stateDataForInterrogationUpdateState' diff --git a/src/models/api/integrateContextBody.ts b/src/models/api/integrateContextBody.ts index 88304f2c..89166a63 100644 --- a/src/models/api/integrateContextBody.ts +++ b/src/models/api/integrateContextBody.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type IntegrateContextBody = { diff --git a/src/models/api/integrateXmlContextBody.ts b/src/models/api/integrateXmlContextBody.ts index 89227984..5d7501f1 100644 --- a/src/models/api/integrateXmlContextBody.ts +++ b/src/models/api/integrateXmlContextBody.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type IntegrateXmlContextBody = { diff --git a/src/models/api/integrationResultUnit.ts b/src/models/api/integrationResultUnit.ts index 6271f0db..a6a40a09 100644 --- a/src/models/api/integrationResultUnit.ts +++ b/src/models/api/integrationResultUnit.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { IntegrationResultUnitStatus } from './integrationResultUnitStatus' diff --git a/src/models/api/integrationResultUnitStatus.ts b/src/models/api/integrationResultUnitStatus.ts index 681478c8..968d4eb4 100644 --- a/src/models/api/integrationResultUnitStatus.ts +++ b/src/models/api/integrationResultUnitStatus.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type IntegrationResultUnitStatus = diff --git a/src/models/api/integrationResults.ts b/src/models/api/integrationResults.ts index 4117c656..d2d6cb64 100644 --- a/src/models/api/integrationResults.ts +++ b/src/models/api/integrationResults.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { IntegrationResultUnit } from './integrationResultUnit' diff --git a/src/models/api/interrogation.ts b/src/models/api/interrogation.ts index 165ad6be..8ae42b88 100644 --- a/src/models/api/interrogation.ts +++ b/src/models/api/interrogation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { InterrogationComment } from './interrogationComment' import type { SchemaData } from './schema.data/schemaData' @@ -17,4 +17,5 @@ export interface Interrogation { data?: SchemaData comment?: InterrogationComment stateData?: StateData + locked?: boolean } diff --git a/src/models/api/interrogationComment.ts b/src/models/api/interrogationComment.ts index 344f4623..5bf3bc9b 100644 --- a/src/models/api/interrogationComment.ts +++ b/src/models/api/interrogationComment.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type InterrogationComment = { [key: string]: unknown } diff --git a/src/models/api/interrogationCreation.ts b/src/models/api/interrogationCreation.ts index 5ba7fe7b..589cd3ee 100644 --- a/src/models/api/interrogationCreation.ts +++ b/src/models/api/interrogationCreation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaData } from './schema.data/schemaData' import type { SchemaPersonalization } from './schema.personalization/schemaPersonalization' diff --git a/src/models/api/interrogationCreationComment.ts b/src/models/api/interrogationCreationComment.ts deleted file mode 100644 index cd92939f..00000000 --- a/src/models/api/interrogationCreationComment.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Generated by orval v7.9.0 🍺 - * Do not edit manually. - * queen-api - * API for Queen/Stromae - * OpenAPI spec version: 5.0.0-rc - */ - -export type InterrogationCreationComment = { [key: string]: unknown } diff --git a/src/models/api/interrogationDataStateDataUpdate.ts b/src/models/api/interrogationDataStateDataUpdate.ts index 655269dd..b7b0a477 100644 --- a/src/models/api/interrogationDataStateDataUpdate.ts +++ b/src/models/api/interrogationDataStateDataUpdate.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaCollectedData } from './schema.collected-data/schemaCollectedData' import type { StateDataUpdate } from './stateDataUpdate' diff --git a/src/models/api/interrogationMetadata.ts b/src/models/api/interrogationMetadata.ts index a10878a7..22c060e0 100644 --- a/src/models/api/interrogationMetadata.ts +++ b/src/models/api/interrogationMetadata.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { InterrogationMetadataContext } from './interrogationMetadataContext' import type { Logos } from './logos' diff --git a/src/models/api/interrogationMetadataContext.ts b/src/models/api/interrogationMetadataContext.ts index 32f6a27b..cb6c6408 100644 --- a/src/models/api/interrogationMetadataContext.ts +++ b/src/models/api/interrogationMetadataContext.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type InterrogationMetadataContext = diff --git a/src/models/api/interrogationStateDto.ts b/src/models/api/interrogationStateDto.ts index cf650f79..aaff3778 100644 --- a/src/models/api/interrogationStateDto.ts +++ b/src/models/api/interrogationStateDto.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { StateData } from './stateData' diff --git a/src/models/api/interrogationSummary.ts b/src/models/api/interrogationSummary.ts index 1bbc5c91..f930fca3 100644 --- a/src/models/api/interrogationSummary.ts +++ b/src/models/api/interrogationSummary.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface InterrogationSummary { diff --git a/src/models/api/interrogationTempZone.ts b/src/models/api/interrogationTempZone.ts index 5acc4d95..288dad8a 100644 --- a/src/models/api/interrogationTempZone.ts +++ b/src/models/api/interrogationTempZone.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaInterrogationTempZone } from './schema.interrogation-temp-zone/schemaInterrogationTempZone' diff --git a/src/models/api/interrogationUpdate.ts b/src/models/api/interrogationUpdate.ts index fc7c38c3..7a3131a0 100644 --- a/src/models/api/interrogationUpdate.ts +++ b/src/models/api/interrogationUpdate.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { InterrogationUpdateComment } from './interrogationUpdateComment' import type { SchemaData } from './schema.data/schemaData' @@ -15,4 +15,5 @@ export interface InterrogationUpdate { data?: SchemaData comment?: InterrogationUpdateComment stateData?: StateDataForInterrogationUpdate + locked?: boolean } diff --git a/src/models/api/interrogationUpdateComment.ts b/src/models/api/interrogationUpdateComment.ts index f4d6ea3d..ee506622 100644 --- a/src/models/api/interrogationUpdateComment.ts +++ b/src/models/api/interrogationUpdateComment.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type InterrogationUpdateComment = { [key: string]: unknown } diff --git a/src/models/api/interrogationsOkNok.ts b/src/models/api/interrogationsOkNok.ts index 31b8c954..f2e61a64 100644 --- a/src/models/api/interrogationsOkNok.ts +++ b/src/models/api/interrogationsOkNok.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { Interrogation } from './interrogation' diff --git a/src/models/api/leafState.ts b/src/models/api/leafState.ts deleted file mode 100644 index 4384d126..00000000 --- a/src/models/api/leafState.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { LeafStateState } from './leafStateState' - -export interface LeafState { - /** - * The state value, can be null or a specific state like COMPLETED - * @nullable - */ - state: LeafStateState - /** Date and time of the state (ISO 8601 format) */ - date: number -} diff --git a/src/models/api/leafStateState.ts b/src/models/api/leafStateState.ts deleted file mode 100644 index 9c4e9558..00000000 --- a/src/models/api/leafStateState.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -/** - * The state value, can be null or a specific state like COMPLETED - * @nullable - */ -export type LeafStateState = - | (typeof LeafStateState)[keyof typeof LeafStateState] - | null - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const LeafStateState = { - COMPLETED: 'COMPLETED', - INIT: 'INIT', -} as const diff --git a/src/models/api/leafStatesUpdatedEvent.ts b/src/models/api/leafStatesUpdatedEvent.ts deleted file mode 100644 index 9d72f4b9..00000000 --- a/src/models/api/leafStatesUpdatedEvent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { LeafStatesUpdatedEventPayload } from './leafStatesUpdatedEventPayload' -import type { LeafStatesUpdatedEventType } from './leafStatesUpdatedEventType' - -export interface LeafStatesUpdatedEvent { - type: LeafStatesUpdatedEventType - payload: LeafStatesUpdatedEventPayload -} diff --git a/src/models/api/leafStatesUpdatedEventPayload.ts b/src/models/api/leafStatesUpdatedEventPayload.ts deleted file mode 100644 index 8e0fe9c6..00000000 --- a/src/models/api/leafStatesUpdatedEventPayload.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { LeafState } from './leafState' - -export type LeafStatesUpdatedEventPayload = { - /** Unique identifier for the interrogation */ - interrogationId: string - /** Array of leaf state objects */ - leafStates: LeafState[] -} diff --git a/src/models/api/leafStatesUpdatedEventType.ts b/src/models/api/leafStatesUpdatedEventType.ts deleted file mode 100644 index 8d226e5f..00000000 --- a/src/models/api/leafStatesUpdatedEventType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -export type LeafStatesUpdatedEventType = - (typeof LeafStatesUpdatedEventType)[keyof typeof LeafStatesUpdatedEventType] - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const LeafStatesUpdatedEventType = { - LEAF_STATES_UPDATED: 'LEAF_STATES_UPDATED', -} as const diff --git a/src/models/api/logo.ts b/src/models/api/logo.ts index e12eb824..a27fc431 100644 --- a/src/models/api/logo.ts +++ b/src/models/api/logo.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface Logo { diff --git a/src/models/api/logos.ts b/src/models/api/logos.ts index 8b89eff7..80b65f95 100644 --- a/src/models/api/logos.ts +++ b/src/models/api/logos.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { Logo } from './logo' diff --git a/src/models/api/metadataCreation.ts b/src/models/api/metadataCreation.ts index 2648ac3d..f82f2085 100644 --- a/src/models/api/metadataCreation.ts +++ b/src/models/api/metadataCreation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaMetadata } from './schema.metadata/schemaMetadata' diff --git a/src/models/api/metadataVariable.ts b/src/models/api/metadataVariable.ts index 7459c313..add7b60b 100644 --- a/src/models/api/metadataVariable.ts +++ b/src/models/api/metadataVariable.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface MetadataVariable { diff --git a/src/models/api/multimodeMovedEvent.ts b/src/models/api/multimodeMovedEvent.ts deleted file mode 100644 index 2900c23c..00000000 --- a/src/models/api/multimodeMovedEvent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { MultimodeMovedEventPayload } from './multimodeMovedEventPayload' -import type { MultimodeMovedEventType } from './multimodeMovedEventType' - -export interface MultimodeMovedEvent { - type: MultimodeMovedEventType - payload: MultimodeMovedEventPayload -} diff --git a/src/models/api/multimodeMovedEventPayload.ts b/src/models/api/multimodeMovedEventPayload.ts deleted file mode 100644 index c51226a6..00000000 --- a/src/models/api/multimodeMovedEventPayload.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -export type MultimodeMovedEventPayload = { - /** Unique identifier for the interrogation */ - interrogationId: string -} diff --git a/src/models/api/multimodeMovedEventType.ts b/src/models/api/multimodeMovedEventType.ts deleted file mode 100644 index d590538f..00000000 --- a/src/models/api/multimodeMovedEventType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -export type MultimodeMovedEventType = - (typeof MultimodeMovedEventType)[keyof typeof MultimodeMovedEventType] - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const MultimodeMovedEventType = { - MULTIMODE_MOVED: 'MULTIMODE_MOVED', - MULTIMODE_SPLIT: 'MULTIMODE_SPLIT', -} as const diff --git a/src/models/api/nomenclatureCreation.ts b/src/models/api/nomenclatureCreation.ts index b45e1097..cd9d9c20 100644 --- a/src/models/api/nomenclatureCreation.ts +++ b/src/models/api/nomenclatureCreation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaNomenclature } from './schema.nomenclature/schemaNomenclature' diff --git a/src/models/api/objectNode.ts b/src/models/api/objectNode.ts index 11de8cc2..6f50b32d 100644 --- a/src/models/api/objectNode.ts +++ b/src/models/api/objectNode.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface ObjectNode { diff --git a/src/models/api/postEventsBody.ts b/src/models/api/postEventsBody.ts deleted file mode 100644 index cf7b74c3..00000000 --- a/src/models/api/postEventsBody.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { LeafStatesUpdatedEvent } from './leafStatesUpdatedEvent' -import type { MultimodeMovedEvent } from './multimodeMovedEvent' -import type { QuestionnaireEvent } from './questionnaireEvent' - -export type PostEventsBody = - | MultimodeMovedEvent - | QuestionnaireEvent - | LeafStatesUpdatedEvent diff --git a/src/models/api/questionnaireEvent.ts b/src/models/api/questionnaireEvent.ts deleted file mode 100644 index f269fc86..00000000 --- a/src/models/api/questionnaireEvent.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ -import type { QuestionnaireEventPayload } from './questionnaireEventPayload' -import type { QuestionnaireEventType } from './questionnaireEventType' - -export interface QuestionnaireEvent { - type: QuestionnaireEventType - payload: QuestionnaireEventPayload -} diff --git a/src/models/api/questionnaireEventPayload.ts b/src/models/api/questionnaireEventPayload.ts deleted file mode 100644 index 9edd6bf0..00000000 --- a/src/models/api/questionnaireEventPayload.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -export type QuestionnaireEventPayload = { - /** Unique identifier for the interrogation */ - interrogationId: string -} diff --git a/src/models/api/questionnaireEventType.ts b/src/models/api/questionnaireEventType.ts deleted file mode 100644 index 7716d46b..00000000 --- a/src/models/api/questionnaireEventType.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * Events API - * API for managing various event types in the system - * OpenAPI spec version: 1.0.0 - */ - -export type QuestionnaireEventType = - (typeof QuestionnaireEventType)[keyof typeof QuestionnaireEventType] - -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const QuestionnaireEventType = { - QUESTIONNAIRE_INIT: 'QUESTIONNAIRE_INIT', - QUESTIONNAIRE_VALIDATED: 'QUESTIONNAIRE_VALIDATED', - QUESTIONNAIRE_COMPLETED: 'QUESTIONNAIRE_COMPLETED', - QUESTIONNAIRE_UPDATED: 'QUESTIONNAIRE_UPDATED', -} as const diff --git a/src/models/api/questionnaireModelCreation.ts b/src/models/api/questionnaireModelCreation.ts index eba700a0..480f1094 100644 --- a/src/models/api/questionnaireModelCreation.ts +++ b/src/models/api/questionnaireModelCreation.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { QuestionnaireModelCreationValue } from './questionnaireModelCreationValue' diff --git a/src/models/api/questionnaireModelCreationValue.ts b/src/models/api/questionnaireModelCreationValue.ts index 485f3c3d..2d82fa61 100644 --- a/src/models/api/questionnaireModelCreationValue.ts +++ b/src/models/api/questionnaireModelCreationValue.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type QuestionnaireModelCreationValue = { [key: string]: unknown } diff --git a/src/models/api/questionnaireModelId.ts b/src/models/api/questionnaireModelId.ts index 66c2a0cb..322a7c26 100644 --- a/src/models/api/questionnaireModelId.ts +++ b/src/models/api/questionnaireModelId.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface QuestionnaireModelId { diff --git a/src/models/api/questionnaireModelValue.ts b/src/models/api/questionnaireModelValue.ts index bd1df226..8f9fc53c 100644 --- a/src/models/api/questionnaireModelValue.ts +++ b/src/models/api/questionnaireModelValue.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { QuestionnaireModelValueValue } from './questionnaireModelValueValue' diff --git a/src/models/api/questionnaireModelValueValue.ts b/src/models/api/questionnaireModelValueValue.ts index f12edb46..6ff8abfa 100644 --- a/src/models/api/questionnaireModelValueValue.ts +++ b/src/models/api/questionnaireModelValueValue.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type QuestionnaireModelValueValue = { [key: string]: unknown } diff --git a/src/models/api/schema.collected-data/_.ts b/src/models/api/schema.collected-data/_.ts index 2430d4a3..e942b303 100644 --- a/src/models/api/schema.collected-data/_.ts +++ b/src/models/api/schema.collected-data/_.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { CollectedValues } from './collectedValues' diff --git a/src/models/api/schema.collected-data/collectedValues.ts b/src/models/api/schema.collected-data/collectedValues.ts index 6a45a34b..baee838a 100644 --- a/src/models/api/schema.collected-data/collectedValues.ts +++ b/src/models/api/schema.collected-data/collectedValues.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaVariableType } from '../schema.variable-type/schemaVariableType' diff --git a/src/models/api/schema.collected-data/index.ts b/src/models/api/schema.collected-data/index.ts index 6c8c86d5..fec4b58e 100644 --- a/src/models/api/schema.collected-data/index.ts +++ b/src/models/api/schema.collected-data/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './_' diff --git a/src/models/api/schema.collected-data/schemaCollectedData.ts b/src/models/api/schema.collected-data/schemaCollectedData.ts index 7b398374..05da72f2 100644 --- a/src/models/api/schema.collected-data/schemaCollectedData.ts +++ b/src/models/api/schema.collected-data/schemaCollectedData.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ /** diff --git a/src/models/api/schema.data/index.ts b/src/models/api/schema.data/index.ts index db2c9088..c886323e 100644 --- a/src/models/api/schema.data/index.ts +++ b/src/models/api/schema.data/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './schemaData' diff --git a/src/models/api/schema.data/schemaData.ts b/src/models/api/schema.data/schemaData.ts index 1d96db00..cbc74c51 100644 --- a/src/models/api/schema.data/schemaData.ts +++ b/src/models/api/schema.data/schemaData.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaCollectedData } from '../schema.collected-data/schemaCollectedData' diff --git a/src/models/api/schema.interrogation-temp-zone/index.ts b/src/models/api/schema.interrogation-temp-zone/index.ts index e9fcc87c..3657a826 100644 --- a/src/models/api/schema.interrogation-temp-zone/index.ts +++ b/src/models/api/schema.interrogation-temp-zone/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './schemaInterrogationTempZone' diff --git a/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZone.ts b/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZone.ts index 5439773e..3307e55b 100644 --- a/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZone.ts +++ b/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZone.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaData } from '../schema.data/schemaData' import type { SchemaPersonalization } from '../schema.personalization/schemaPersonalization' diff --git a/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZoneComment.ts b/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZoneComment.ts index 9423fb1f..b79efcab 100644 --- a/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZoneComment.ts +++ b/src/models/api/schema.interrogation-temp-zone/schemaInterrogationTempZoneComment.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type SchemaInterrogationTempZoneComment = { [key: string]: unknown } diff --git a/src/models/api/schema.interrogation-temp-zone/stateData.ts b/src/models/api/schema.interrogation-temp-zone/stateData.ts index 5a268e1e..7210a06a 100644 --- a/src/models/api/schema.interrogation-temp-zone/stateData.ts +++ b/src/models/api/schema.interrogation-temp-zone/stateData.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { StateDataState } from './stateDataState' diff --git a/src/models/api/schema.interrogation-temp-zone/stateDataState.ts b/src/models/api/schema.interrogation-temp-zone/stateDataState.ts index 733b347c..cd68c2ee 100644 --- a/src/models/api/schema.interrogation-temp-zone/stateDataState.ts +++ b/src/models/api/schema.interrogation-temp-zone/stateDataState.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type StateDataState = diff --git a/src/models/api/schema.metadata/index.ts b/src/models/api/schema.metadata/index.ts index 681bdb38..958f3e55 100644 --- a/src/models/api/schema.metadata/index.ts +++ b/src/models/api/schema.metadata/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './schemaMetadata' diff --git a/src/models/api/schema.metadata/schemaMetadata.ts b/src/models/api/schema.metadata/schemaMetadata.ts index b6551574..be618255 100644 --- a/src/models/api/schema.metadata/schemaMetadata.ts +++ b/src/models/api/schema.metadata/schemaMetadata.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaMetadataInseeContext } from './schemaMetadataInseeContext' import type { Variable } from './variable' diff --git a/src/models/api/schema.metadata/schemaMetadataInseeContext.ts b/src/models/api/schema.metadata/schemaMetadataInseeContext.ts index 7d0f1b67..187e2467 100644 --- a/src/models/api/schema.metadata/schemaMetadataInseeContext.ts +++ b/src/models/api/schema.metadata/schemaMetadataInseeContext.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type SchemaMetadataInseeContext = diff --git a/src/models/api/schema.metadata/variable.ts b/src/models/api/schema.metadata/variable.ts index 755015b5..d4aa1fb3 100644 --- a/src/models/api/schema.metadata/variable.ts +++ b/src/models/api/schema.metadata/variable.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { VariableValue } from './variableValue' diff --git a/src/models/api/schema.metadata/variableValue.ts b/src/models/api/schema.metadata/variableValue.ts index 03dc6345..77b5bc89 100644 --- a/src/models/api/schema.metadata/variableValue.ts +++ b/src/models/api/schema.metadata/variableValue.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type VariableValue = string | boolean | number diff --git a/src/models/api/schema.nomenclature/index.ts b/src/models/api/schema.nomenclature/index.ts index 23cb246a..7e7751c4 100644 --- a/src/models/api/schema.nomenclature/index.ts +++ b/src/models/api/schema.nomenclature/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './nomenclature' diff --git a/src/models/api/schema.nomenclature/nomenclature.ts b/src/models/api/schema.nomenclature/nomenclature.ts index 2238734e..180760ad 100644 --- a/src/models/api/schema.nomenclature/nomenclature.ts +++ b/src/models/api/schema.nomenclature/nomenclature.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface Nomenclature { diff --git a/src/models/api/schema.nomenclature/schemaNomenclature.ts b/src/models/api/schema.nomenclature/schemaNomenclature.ts index b2d881ba..8a434767 100644 --- a/src/models/api/schema.nomenclature/schemaNomenclature.ts +++ b/src/models/api/schema.nomenclature/schemaNomenclature.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { Nomenclature } from './nomenclature' diff --git a/src/models/api/schema.personalization/index.ts b/src/models/api/schema.personalization/index.ts index 821828fa..42e1851f 100644 --- a/src/models/api/schema.personalization/index.ts +++ b/src/models/api/schema.personalization/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './personalization' diff --git a/src/models/api/schema.personalization/personalization.ts b/src/models/api/schema.personalization/personalization.ts index e554c44a..c7ad8168 100644 --- a/src/models/api/schema.personalization/personalization.ts +++ b/src/models/api/schema.personalization/personalization.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export interface Personalization { diff --git a/src/models/api/schema.personalization/schemaPersonalization.ts b/src/models/api/schema.personalization/schemaPersonalization.ts index d0ed2a9b..a834c1da 100644 --- a/src/models/api/schema.personalization/schemaPersonalization.ts +++ b/src/models/api/schema.personalization/schemaPersonalization.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { Personalization } from './personalization' diff --git a/src/models/api/schema.variable-type/index.ts b/src/models/api/schema.variable-type/index.ts index 07988a78..81cc42cf 100644 --- a/src/models/api/schema.variable-type/index.ts +++ b/src/models/api/schema.variable-type/index.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export * from './schemaVariableType' diff --git a/src/models/api/schema.variable-type/schemaVariableType.ts b/src/models/api/schema.variable-type/schemaVariableType.ts index 08758a7e..38a712a4 100644 --- a/src/models/api/schema.variable-type/schemaVariableType.ts +++ b/src/models/api/schema.variable-type/schemaVariableType.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaVariableTypeAnyOfItem } from './schemaVariableTypeAnyOfItem' diff --git a/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItem.ts b/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItem.ts index ddeccfa6..f493fea6 100644 --- a/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItem.ts +++ b/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItem.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { SchemaVariableTypeAnyOfItemAnyOfItem } from './schemaVariableTypeAnyOfItemAnyOfItem' diff --git a/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItemAnyOfItem.ts b/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItemAnyOfItem.ts index eb5de99e..6bc28d08 100644 --- a/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItemAnyOfItem.ts +++ b/src/models/api/schema.variable-type/schemaVariableTypeAnyOfItemAnyOfItem.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type SchemaVariableTypeAnyOfItemAnyOfItem = string | null diff --git a/src/models/api/setCommentBody.ts b/src/models/api/setCommentBody.ts deleted file mode 100644 index 218f5848..00000000 --- a/src/models/api/setCommentBody.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * queen-api - * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 - */ - -export type SetCommentBody = { [key: string]: unknown } diff --git a/src/models/api/stateData.ts b/src/models/api/stateData.ts index 3a280347..ae2dae53 100644 --- a/src/models/api/stateData.ts +++ b/src/models/api/stateData.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { StateDataState } from './stateDataState' diff --git a/src/models/api/stateDataForInterrogationUpdate.ts b/src/models/api/stateDataForInterrogationUpdate.ts index f0b6a4d6..0fb23483 100644 --- a/src/models/api/stateDataForInterrogationUpdate.ts +++ b/src/models/api/stateDataForInterrogationUpdate.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { StateDataForInterrogationUpdateState } from './stateDataForInterrogationUpdateState' diff --git a/src/models/api/stateDataForInterrogationUpdateState.ts b/src/models/api/stateDataForInterrogationUpdateState.ts index 11fb27b3..ac88c152 100644 --- a/src/models/api/stateDataForInterrogationUpdateState.ts +++ b/src/models/api/stateDataForInterrogationUpdateState.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type StateDataForInterrogationUpdateState = diff --git a/src/models/api/stateDataState.ts b/src/models/api/stateDataState.ts index 733b347c..3e815e96 100644 --- a/src/models/api/stateDataState.ts +++ b/src/models/api/stateDataState.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type StateDataState = @@ -16,4 +16,5 @@ export const StateDataState = { VALIDATED: 'VALIDATED', TOEXTRACT: 'TOEXTRACT', EXTRACTED: 'EXTRACTED', + IS_MOVED: 'IS_MOVED', } as const diff --git a/src/models/api/stateDataUpdate.ts b/src/models/api/stateDataUpdate.ts index b612c27e..c5098a0d 100644 --- a/src/models/api/stateDataUpdate.ts +++ b/src/models/api/stateDataUpdate.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ import type { StateDataUpdateState } from './stateDataUpdateState' diff --git a/src/models/api/stateDataUpdateState.ts b/src/models/api/stateDataUpdateState.ts index c1686047..63877df4 100644 --- a/src/models/api/stateDataUpdateState.ts +++ b/src/models/api/stateDataUpdateState.ts @@ -1,9 +1,9 @@ /** - * Generated by orval v7.10.0 🍺 + * Generated by orval v7.21.0 🍺 * Do not edit manually. * queen-api * API for Queen/Stromae - * OpenAPI spec version: 5.5.0 + * OpenAPI spec version: 5.6.1 */ export type StateDataUpdateState = diff --git a/src/models/stateData.ts b/src/models/stateData.ts index 99ca9add..4019f6a9 100644 --- a/src/models/stateData.ts +++ b/src/models/stateData.ts @@ -1,7 +1,7 @@ import { type Extends } from 'tsafe/Extends' import { assert } from 'tsafe/assert' -import type { LeafStateState, StateData as StateDataApi } from './api' +import type { StateData as StateDataApi } from './api' import type { PageType } from './page' import type { QuestionnaireState } from './questionnaireState' @@ -10,7 +10,7 @@ export type StateData = { date: number currentPage: PageType leafStates?: { - state: LeafStateState + state: 'INIT' | 'COMPLETED' | null date: number }[]