Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,649 changes: 1,649 additions & 0 deletions generate-api-client/api-docs.json

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions generate-api-client/schema.collected-data.json
Original file line number Diff line number Diff line change
@@ -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#"
}
}
}
}
}
28 changes: 28 additions & 0 deletions generate-api-client/schema.data.json
Original file line number Diff line number Diff line change
@@ -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#"
}
}
}
45 changes: 45 additions & 0 deletions generate-api-client/schema.interrogation-temp-zone.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
33 changes: 33 additions & 0 deletions generate-api-client/schema.metadata.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}
}
}
}
24 changes: 24 additions & 0 deletions generate-api-client/schema.nomenclature.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
24 changes: 24 additions & 0 deletions generate-api-client/schema.personalization.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
51 changes: 51 additions & 0 deletions generate-api-client/schema.variable-type.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
]
}
}
]
}
8 changes: 8 additions & 0 deletions orval.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/api/01-integrations.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading
Loading