From 75062ef872f86cada677a92695d90ebaf3334444 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Mon, 8 Dec 2025 16:16:39 -0500 Subject: [PATCH 01/33] fix drf errors --- ...XpathManualTranslationItemRevisionsItem.ts | 23 + .../api/models/advancedFeaturePostRequest.ts | 18 + ...> advancedFeaturePostRequestParamsItem.ts} | 5 +- .../js/api/models/advancedFeatureResponse.ts | 20 + ...s => advancedFeatureResponseParamsItem.ts} | 2 +- jsapp/js/api/models/asset.ts | 4 +- jsapp/js/api/models/assetAnalysisFormJson.ts | 2 - jsapp/js/api/models/dataSupplementResponse.ts | 17 + ...dataSupplementResponseQuestionNameXpath.ts | 25 + ...nseQuestionNameXpathManualTranscription.ts | 28 + ...meXpathManualTranscriptionRevisionsItem.ts | 23 + ...eQuestionNameXpathManualTranslationItem.ts | 26 + .../patchedAdvancedFeaturePatchRequest.ts | 16 + ...edAdvancedFeaturePatchRequestParamsItem.ts | 13 + .../models/patchedDataSupplementPayload.ts | 17 + ...dDataSupplementPayloadQuestionNameXpath.ts | 25 + ...oadQuestionNameXpathManualTranscription.ts | 16 + ...dQuestionNameXpathManualTranslationItem.ts | 16 + jsapp/js/api/react-query/advanced-features.ts | 562 ++++++++ jsapp/js/api/react-query/survey-data.ts | 205 +++ kobo/apps/subsequences/views.py | 6 +- kpi/views/v2/data.py | 7 + static/openapi/schema_v2.json | 1141 +++++++++++++++-- static/openapi/schema_v2.yaml | 778 ++++++++++- 24 files changed, 2884 insertions(+), 111 deletions(-) create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts create mode 100644 jsapp/js/api/models/advancedFeaturePostRequest.ts rename jsapp/js/api/models/{assetAdvancedSubmissionSchema.ts => advancedFeaturePostRequestParamsItem.ts} (88%) create mode 100644 jsapp/js/api/models/advancedFeatureResponse.ts rename jsapp/js/api/models/{assetAnalysisFormJsonEngines.ts => advancedFeatureResponseParamsItem.ts} (91%) create mode 100644 jsapp/js/api/models/dataSupplementResponse.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts create mode 100644 jsapp/js/api/models/patchedAdvancedFeaturePatchRequest.ts create mode 100644 jsapp/js/api/models/patchedAdvancedFeaturePatchRequestParamsItem.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayload.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts create mode 100644 jsapp/js/api/react-query/advanced-features.ts diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts new file mode 100644 index 0000000000..7a3a5a3671 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem = + | (unknown & { + language?: string + value?: string + _dateCreated: string + }) + | (unknown & { + language?: string + value?: string + _dateCreated: string + }) diff --git a/jsapp/js/api/models/advancedFeaturePostRequest.ts b/jsapp/js/api/models/advancedFeaturePostRequest.ts new file mode 100644 index 0000000000..77da01bfe8 --- /dev/null +++ b/jsapp/js/api/models/advancedFeaturePostRequest.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { AdvancedFeaturePostRequestParamsItem } from './advancedFeaturePostRequestParamsItem' + +export interface AdvancedFeaturePostRequest { + question_xpath: string + action: string + params: AdvancedFeaturePostRequestParamsItem[] +} diff --git a/jsapp/js/api/models/assetAdvancedSubmissionSchema.ts b/jsapp/js/api/models/advancedFeaturePostRequestParamsItem.ts similarity index 88% rename from jsapp/js/api/models/assetAdvancedSubmissionSchema.ts rename to jsapp/js/api/models/advancedFeaturePostRequestParamsItem.ts index 7fc0402e9a..8a07454855 100644 --- a/jsapp/js/api/models/assetAdvancedSubmissionSchema.ts +++ b/jsapp/js/api/models/advancedFeaturePostRequestParamsItem.ts @@ -10,7 +10,4 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type AssetAdvancedSubmissionSchema = { - readonly type?: string - readonly $description?: string -} +export type AdvancedFeaturePostRequestParamsItem = { [key: string]: unknown } diff --git a/jsapp/js/api/models/advancedFeatureResponse.ts b/jsapp/js/api/models/advancedFeatureResponse.ts new file mode 100644 index 0000000000..e855b2a947 --- /dev/null +++ b/jsapp/js/api/models/advancedFeatureResponse.ts @@ -0,0 +1,20 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { AdvancedFeatureResponseParamsItem } from './advancedFeatureResponseParamsItem' + +export interface AdvancedFeatureResponse { + question_xpath: string + action: string + params: AdvancedFeatureResponseParamsItem[] + asset: string + uid: string +} diff --git a/jsapp/js/api/models/assetAnalysisFormJsonEngines.ts b/jsapp/js/api/models/advancedFeatureResponseParamsItem.ts similarity index 91% rename from jsapp/js/api/models/assetAnalysisFormJsonEngines.ts rename to jsapp/js/api/models/advancedFeatureResponseParamsItem.ts index 0780d32986..fcb44ae1ef 100644 --- a/jsapp/js/api/models/assetAnalysisFormJsonEngines.ts +++ b/jsapp/js/api/models/advancedFeatureResponseParamsItem.ts @@ -10,4 +10,4 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type AssetAnalysisFormJsonEngines = { [key: string]: unknown } +export type AdvancedFeatureResponseParamsItem = { [key: string]: unknown } diff --git a/jsapp/js/api/models/asset.ts b/jsapp/js/api/models/asset.ts index eacf8f1b5e..268f27a2d3 100644 --- a/jsapp/js/api/models/asset.ts +++ b/jsapp/js/api/models/asset.ts @@ -1,5 +1,4 @@ import type { AssetAdvancedFeatures } from './assetAdvancedFeatures' -import type { AssetAdvancedSubmissionSchema } from './assetAdvancedSubmissionSchema' import type { AssetAnalysisFormJson } from './assetAnalysisFormJson' import type { AssetAssignablePermissionsItem } from './assetAssignablePermissionsItem' import type { AssetChildren } from './assetChildren' @@ -64,13 +63,12 @@ export interface Asset { report_styles?: AssetReportStyles report_custom?: AssetReportCustom advanced_features?: AssetAdvancedFeatures - readonly advanced_submission_schema: AssetAdvancedSubmissionSchema - readonly analysis_form_json: AssetAnalysisFormJson map_styles?: AssetMapStyles map_custom?: AssetMapCustom content?: AssetContent readonly downloads: readonly AssetDownloadsItem[] readonly embeds: readonly AssetEmbedsItem[] + readonly analysis_form_json: AssetAnalysisFormJson readonly xform_link: string readonly hooks_link: string tag_string?: string diff --git a/jsapp/js/api/models/assetAnalysisFormJson.ts b/jsapp/js/api/models/assetAnalysisFormJson.ts index 66439f560d..76a43bcf66 100644 --- a/jsapp/js/api/models/assetAnalysisFormJson.ts +++ b/jsapp/js/api/models/assetAnalysisFormJson.ts @@ -9,9 +9,7 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { AssetAnalysisFormJsonEngines } from './assetAnalysisFormJsonEngines' export type AssetAnalysisFormJson = { - readonly engines?: AssetAnalysisFormJsonEngines readonly additional_fields?: string[] } diff --git a/jsapp/js/api/models/dataSupplementResponse.ts b/jsapp/js/api/models/dataSupplementResponse.ts new file mode 100644 index 0000000000..f298492268 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponse.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementResponseQuestionNameXpath } from './dataSupplementResponseQuestionNameXpath' + +export interface DataSupplementResponse { + _version?: string + question_name_xpath?: DataSupplementResponseQuestionNameXpath +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts new file mode 100644 index 0000000000..168e4cfd7d --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts @@ -0,0 +1,25 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' +import type { DataSupplementResponseQuestionNameXpathManualTranslationItem } from './dataSupplementResponseQuestionNameXpathManualTranslationItem' + +export type DataSupplementResponseQuestionNameXpath = + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] + }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts new file mode 100644 index 0000000000..078499d102 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts @@ -0,0 +1,28 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem } from './dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem' + +export type DataSupplementResponseQuestionNameXpathManualTranscription = + | (unknown & { + language?: string + value?: string + _dateCreated: string + _dateModified: string + revisions?: DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem[] + }) + | (unknown & { + language?: string + value?: string + _dateCreated: string + _dateModified: string + revisions?: DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem[] + }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts new file mode 100644 index 0000000000..702a4506e7 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem = + | (unknown & { + language?: string + value?: string + _dateCreated: string + }) + | (unknown & { + language?: string + value?: string + _dateCreated: string + }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts new file mode 100644 index 0000000000..d44a6f950a --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts @@ -0,0 +1,26 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem' + +export type DataSupplementResponseQuestionNameXpathManualTranslationItem = + | (unknown & { + language?: string + value?: string + _dateCreated: string + _revisions?: _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem[] + }) + | (unknown & { + language?: string + value?: string + _dateCreated: string + _revisions?: _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem[] + }) diff --git a/jsapp/js/api/models/patchedAdvancedFeaturePatchRequest.ts b/jsapp/js/api/models/patchedAdvancedFeaturePatchRequest.ts new file mode 100644 index 0000000000..35ddf1e060 --- /dev/null +++ b/jsapp/js/api/models/patchedAdvancedFeaturePatchRequest.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedAdvancedFeaturePatchRequestParamsItem } from './patchedAdvancedFeaturePatchRequestParamsItem' + +export interface PatchedAdvancedFeaturePatchRequest { + params?: PatchedAdvancedFeaturePatchRequestParamsItem[] +} diff --git a/jsapp/js/api/models/patchedAdvancedFeaturePatchRequestParamsItem.ts b/jsapp/js/api/models/patchedAdvancedFeaturePatchRequestParamsItem.ts new file mode 100644 index 0000000000..180c2229b3 --- /dev/null +++ b/jsapp/js/api/models/patchedAdvancedFeaturePatchRequestParamsItem.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedAdvancedFeaturePatchRequestParamsItem = { [key: string]: unknown } diff --git a/jsapp/js/api/models/patchedDataSupplementPayload.ts b/jsapp/js/api/models/patchedDataSupplementPayload.ts new file mode 100644 index 0000000000..355efe8f6f --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayload.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpath } from './patchedDataSupplementPayloadQuestionNameXpath' + +export interface PatchedDataSupplementPayload { + _version?: string + question_name_xpath?: PatchedDataSupplementPayloadQuestionNameXpath +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts new file mode 100644 index 0000000000..63ee3b6e2c --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts @@ -0,0 +1,25 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' + +export type PatchedDataSupplementPayloadQuestionNameXpath = + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + }) diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts new file mode 100644 index 0000000000..608f4bc4dd --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathManualTranscription = { + language: string + value: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts new file mode 100644 index 0000000000..3cfa0d78a6 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem = { + language: string + translation?: string +} diff --git a/jsapp/js/api/react-query/advanced-features.ts b/jsapp/js/api/react-query/advanced-features.ts new file mode 100644 index 0000000000..c83a6d2548 --- /dev/null +++ b/jsapp/js/api/react-query/advanced-features.ts @@ -0,0 +1,562 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import { useMutation, useQuery } from '@tanstack/react-query' +import type { + MutationFunction, + QueryFunction, + QueryKey, + UseMutationOptions, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query' + +import type { AdvancedFeaturePostRequest } from '../models/advancedFeaturePostRequest' + +import type { AdvancedFeatureResponse } from '../models/advancedFeatureResponse' + +import type { ErrorDetail } from '../models/errorDetail' + +import type { ErrorObject } from '../models/errorObject' + +import type { PatchedAdvancedFeaturePatchRequest } from '../models/patchedAdvancedFeaturePatchRequest' + +import { fetchWithAuth } from '../orval.mutator' + +type SecondParameter unknown> = Parameters[1] + +/** + * ## List all advanced features on an asset + +Lists all advanced features on all questions in an asset + + */ +export type assetsAdvancedFeaturesListResponse200 = { + data: AdvancedFeatureResponse[] + status: 200 +} + +export type assetsAdvancedFeaturesListResponse404 = { + data: ErrorDetail + status: 404 +} + +export type assetsAdvancedFeaturesListResponseComposite = + | assetsAdvancedFeaturesListResponse200 + | assetsAdvancedFeaturesListResponse404 + +export type assetsAdvancedFeaturesListResponse = assetsAdvancedFeaturesListResponseComposite & { + headers: Headers +} + +export const getAssetsAdvancedFeaturesListUrl = (uidAsset: string) => { + return `/api/v2/assets/${uidAsset}/advanced-features/` +} + +export const assetsAdvancedFeaturesList = async ( + uidAsset: string, + options?: RequestInit, +): Promise => { + return fetchWithAuth(getAssetsAdvancedFeaturesListUrl(uidAsset), { + ...options, + method: 'GET', + }) +} + +export const getAssetsAdvancedFeaturesListQueryKey = (uidAsset: string) => { + return ['api', 'v2', 'assets', uidAsset, 'advanced-features'] as const +} + +export const getAssetsAdvancedFeaturesListQueryOptions = < + TData = Awaited>, + TError = ErrorDetail, +>( + uidAsset: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAssetsAdvancedFeaturesListQueryKey(uidAsset) + + const queryFn: QueryFunction>> = ({ signal }) => + assetsAdvancedFeaturesList(uidAsset, { signal, ...requestOptions }) + + return { queryKey, queryFn, enabled: !!uidAsset, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey } +} + +export type AssetsAdvancedFeaturesListQueryResult = NonNullable>> +export type AssetsAdvancedFeaturesListQueryError = ErrorDetail + +export function useAssetsAdvancedFeaturesList< + TData = Awaited>, + TError = ErrorDetail, +>( + uidAsset: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +): UseQueryResult & { queryKey: QueryKey } { + const queryOptions = getAssetsAdvancedFeaturesListQueryOptions(uidAsset, options) + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey } + + query.queryKey = queryOptions.queryKey + + return query +} + +/** + * ## Add an advanced action to an asset + +Enables a new type of advanced action on a question in the asset. +* `action`, `params`, and `question_xpath` are required +* `params` must match the expected param_schema of the `action` + +Accepted `action`s include: +* `manual_transcription` +* `automatic_google_transcription` +* `manual_translation` +* `automatic_google_translation` +* `qual` + +For all actions except `qual`, `params` must look like +> '[{"language": "es"}, {"language": "en"}, ...]' + +For `qual`, `params` must look like +``` + [ + { + 'type': 'qualInteger', + 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a', + 'labels': {'_default': 'How many characters appear in the story?'}, + }, + { + 'type': 'qualSelectMultiple', + 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', + 'labels': {'_default': "What themes were present in the story?"}, + 'choices': [ + { + 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6', + 'labels': {'_default': 'Empathy'}, + }, + { + 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a', + 'labels': {'_default': 'Competition'}, + }, + { + 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf', + 'labels': {'_default': 'Apathy'}, + }, + ], + }, + { + 'type': 'qualSelectOne', + 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503', + 'labels': {'_default': 'Was this a first-hand account?'}, + 'choices': [ + { + 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99', + 'labels': {'_default': 'Yes'}, + }, + { + 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94', + 'labels': {'_default': 'No'}, + }, + ], + }, + { + 'type': 'qualTags', + 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f', + 'labels': {'_default': 'Tag any landmarks mentioned in the story'}, + }, + { + 'type': 'qualText', + 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad', + 'labels': {'_default': 'Add any further remarks'}, + }, + { + 'type': 'qualNote', + 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72', + 'labels': {'_default': 'Thanks for your diligence'}, + }, + ]``` + + */ +export type assetsAdvancedFeaturesCreateResponse201 = { + data: AdvancedFeatureResponse + status: 201 +} + +export type assetsAdvancedFeaturesCreateResponse400 = { + data: ErrorObject + status: 400 +} + +export type assetsAdvancedFeaturesCreateResponse404 = { + data: ErrorDetail + status: 404 +} + +export type assetsAdvancedFeaturesCreateResponseComposite = + | assetsAdvancedFeaturesCreateResponse201 + | assetsAdvancedFeaturesCreateResponse400 + | assetsAdvancedFeaturesCreateResponse404 + +export type assetsAdvancedFeaturesCreateResponse = assetsAdvancedFeaturesCreateResponseComposite & { + headers: Headers +} + +export const getAssetsAdvancedFeaturesCreateUrl = (uidAsset: string) => { + return `/api/v2/assets/${uidAsset}/advanced-features/` +} + +export const assetsAdvancedFeaturesCreate = async ( + uidAsset: string, + advancedFeaturePostRequest: AdvancedFeaturePostRequest, + options?: RequestInit, +): Promise => { + return fetchWithAuth(getAssetsAdvancedFeaturesCreateUrl(uidAsset), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(advancedFeaturePostRequest), + }) +} + +export const getAssetsAdvancedFeaturesCreateMutationOptions = < + TError = ErrorObject | ErrorDetail, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; data: AdvancedFeaturePostRequest }, + TContext + > + request?: SecondParameter +}): UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; data: AdvancedFeaturePostRequest }, + TContext +> => { + const mutationKey = ['assetsAdvancedFeaturesCreate'] + 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>, + { uidAsset: string; data: AdvancedFeaturePostRequest } + > = (props) => { + const { uidAsset, data } = props ?? {} + + return assetsAdvancedFeaturesCreate(uidAsset, data, requestOptions) + } + + return { mutationFn, ...mutationOptions } +} + +export type AssetsAdvancedFeaturesCreateMutationResult = NonNullable< + Awaited> +> +export type AssetsAdvancedFeaturesCreateMutationBody = AdvancedFeaturePostRequest +export type AssetsAdvancedFeaturesCreateMutationError = ErrorObject | ErrorDetail + +export const useAssetsAdvancedFeaturesCreate = (options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; data: AdvancedFeaturePostRequest }, + TContext + > + request?: SecondParameter +}) => { + const mutationOptions = getAssetsAdvancedFeaturesCreateMutationOptions(options) + + return useMutation(mutationOptions) +} +/** + * ## Retrieve advanced feature configuration for a question on an asset + +Gets the params for one advanced action for one question in an asset + + */ +export type assetsAdvancedFeaturesRetrieveResponse200 = { + data: AdvancedFeatureResponse + status: 200 +} + +export type assetsAdvancedFeaturesRetrieveResponse404 = { + data: ErrorDetail + status: 404 +} + +export type assetsAdvancedFeaturesRetrieveResponseComposite = + | assetsAdvancedFeaturesRetrieveResponse200 + | assetsAdvancedFeaturesRetrieveResponse404 + +export type assetsAdvancedFeaturesRetrieveResponse = assetsAdvancedFeaturesRetrieveResponseComposite & { + headers: Headers +} + +export const getAssetsAdvancedFeaturesRetrieveUrl = (uidAsset: string, id: string) => { + return `/api/v2/assets/${uidAsset}/advanced-features/${id}/` +} + +export const assetsAdvancedFeaturesRetrieve = async ( + uidAsset: string, + id: string, + options?: RequestInit, +): Promise => { + return fetchWithAuth(getAssetsAdvancedFeaturesRetrieveUrl(uidAsset, id), { + ...options, + method: 'GET', + }) +} + +export const getAssetsAdvancedFeaturesRetrieveQueryKey = (uidAsset: string, id: string) => { + return ['api', 'v2', 'assets', uidAsset, 'advanced-features', id] as const +} + +export const getAssetsAdvancedFeaturesRetrieveQueryOptions = < + TData = Awaited>, + TError = ErrorDetail, +>( + uidAsset: string, + id: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAssetsAdvancedFeaturesRetrieveQueryKey(uidAsset, id) + + const queryFn: QueryFunction>> = ({ signal }) => + assetsAdvancedFeaturesRetrieve(uidAsset, id, { signal, ...requestOptions }) + + return { queryKey, queryFn, enabled: !!(uidAsset && id), ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey } +} + +export type AssetsAdvancedFeaturesRetrieveQueryResult = NonNullable< + Awaited> +> +export type AssetsAdvancedFeaturesRetrieveQueryError = ErrorDetail + +export function useAssetsAdvancedFeaturesRetrieve< + TData = Awaited>, + TError = ErrorDetail, +>( + uidAsset: string, + id: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +): UseQueryResult & { queryKey: QueryKey } { + const queryOptions = getAssetsAdvancedFeaturesRetrieveQueryOptions(uidAsset, id, options) + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey } + + query.queryKey = queryOptions.queryKey + + return query +} + +/** + * ## Update an advanced action on an asset + +Update the params of an advanced action on a question in the asset. +* `params` is required +* `params` must match the expected param_schema of the action being updated + +For all actions except `qual`, `params` must look like +> '[{"language": "es"}, {"language": "en"}, ...]' + +For `qual`, `params` must look like +``` + [ + { + 'type': 'qualInteger', + 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a', + 'labels': {'_default': 'How many characters appear in the story?'}, + }, + { + 'type': 'qualSelectMultiple', + 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', + 'labels': {'_default': "What themes were present in the story?"}, + 'choices': [ + { + 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6', + 'labels': {'_default': 'Empathy'}, + }, + { + 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a', + 'labels': {'_default': 'Competition'}, + }, + { + 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf', + 'labels': {'_default': 'Apathy'}, + }, + ], + }, + { + 'type': 'qualSelectOne', + 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503', + 'labels': {'_default': 'Was this a first-hand account?'}, + 'choices': [ + { + 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99', + 'labels': {'_default': 'Yes'}, + }, + { + 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94', + 'labels': {'_default': 'No'}, + }, + ], + }, + { + 'type': 'qualTags', + 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f', + 'labels': {'_default': 'Tag any landmarks mentioned in the story'}, + }, + { + 'type': 'qualText', + 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad', + 'labels': {'_default': 'Add any further remarks'}, + }, + { + 'type': 'qualNote', + 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72', + 'labels': {'_default': 'Thanks for your diligence'}, + }, + ]``` + + */ +export type assetsAdvancedFeaturesPartialUpdateResponse200 = { + data: AdvancedFeatureResponse + status: 200 +} + +export type assetsAdvancedFeaturesPartialUpdateResponse400 = { + data: ErrorObject + status: 400 +} + +export type assetsAdvancedFeaturesPartialUpdateResponse404 = { + data: ErrorDetail + status: 404 +} + +export type assetsAdvancedFeaturesPartialUpdateResponseComposite = + | assetsAdvancedFeaturesPartialUpdateResponse200 + | assetsAdvancedFeaturesPartialUpdateResponse400 + | assetsAdvancedFeaturesPartialUpdateResponse404 + +export type assetsAdvancedFeaturesPartialUpdateResponse = assetsAdvancedFeaturesPartialUpdateResponseComposite & { + headers: Headers +} + +export const getAssetsAdvancedFeaturesPartialUpdateUrl = (uidAsset: string, id: string) => { + return `/api/v2/assets/${uidAsset}/advanced-features/${id}/` +} + +export const assetsAdvancedFeaturesPartialUpdate = async ( + uidAsset: string, + id: string, + patchedAdvancedFeaturePatchRequest: PatchedAdvancedFeaturePatchRequest, + options?: RequestInit, +): Promise => { + return fetchWithAuth( + getAssetsAdvancedFeaturesPartialUpdateUrl(uidAsset, id), + { + ...options, + method: 'PATCH', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(patchedAdvancedFeaturePatchRequest), + }, + ) +} + +export const getAssetsAdvancedFeaturesPartialUpdateMutationOptions = < + TError = ErrorObject | ErrorDetail, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: string; data: PatchedAdvancedFeaturePatchRequest }, + TContext + > + request?: SecondParameter +}): UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: string; data: PatchedAdvancedFeaturePatchRequest }, + TContext +> => { + const mutationKey = ['assetsAdvancedFeaturesPartialUpdate'] + 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>, + { uidAsset: string; id: string; data: PatchedAdvancedFeaturePatchRequest } + > = (props) => { + const { uidAsset, id, data } = props ?? {} + + return assetsAdvancedFeaturesPartialUpdate(uidAsset, id, data, requestOptions) + } + + return { mutationFn, ...mutationOptions } +} + +export type AssetsAdvancedFeaturesPartialUpdateMutationResult = NonNullable< + Awaited> +> +export type AssetsAdvancedFeaturesPartialUpdateMutationBody = PatchedAdvancedFeaturePatchRequest +export type AssetsAdvancedFeaturesPartialUpdateMutationError = ErrorObject | ErrorDetail + +export const useAssetsAdvancedFeaturesPartialUpdate = < + TError = ErrorObject | ErrorDetail, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: string; data: PatchedAdvancedFeaturePatchRequest }, + TContext + > + request?: SecondParameter +}) => { + const mutationOptions = getAssetsAdvancedFeaturesPartialUpdateMutationOptions(options) + + return useMutation(mutationOptions) +} diff --git a/jsapp/js/api/react-query/survey-data.ts b/jsapp/js/api/react-query/survey-data.ts index a3aa417ca8..1f2cd2c737 100644 --- a/jsapp/js/api/react-query/survey-data.ts +++ b/jsapp/js/api/react-query/survey-data.ts @@ -47,6 +47,8 @@ import type { DataResponse } from '../models/dataResponse' import type { DataStatusesUpdate } from '../models/dataStatusesUpdate' +import type { DataSupplementResponse } from '../models/dataSupplementResponse' + import type { DataValidationStatusUpdateResponse } from '../models/dataValidationStatusUpdateResponse' import type { EnketoEditResponse } from '../models/enketoEditResponse' @@ -85,6 +87,8 @@ import type { PairedDataResponse } from '../models/pairedDataResponse' import type { PatchedDataBulkUpdate } from '../models/patchedDataBulkUpdate' +import type { PatchedDataSupplementPayload } from '../models/patchedDataSupplementPayload' + import type { PatchedDataValidationStatusUpdatePayload } from '../models/patchedDataValidationStatusUpdatePayload' import type { PatchedDataValidationStatusesUpdatePayload } from '../models/patchedDataValidationStatusesUpdatePayload' @@ -1283,6 +1287,207 @@ export function useAssetsDataEnketoViewRetrieve< return query } +/** + * ## TBC Supplement retrieve + + */ +export type assetsDataSupplementRetrieveResponse200 = { + data: DataSupplementResponse + status: 200 +} + +export type assetsDataSupplementRetrieveResponse400 = { + data: ErrorObject + status: 400 +} + +export type assetsDataSupplementRetrieveResponse401 = { + data: ErrorDetail + status: 401 +} + +export type assetsDataSupplementRetrieveResponseComposite = + | assetsDataSupplementRetrieveResponse200 + | assetsDataSupplementRetrieveResponse400 + | assetsDataSupplementRetrieveResponse401 + +export type assetsDataSupplementRetrieveResponse = assetsDataSupplementRetrieveResponseComposite & { + headers: Headers +} + +export const getAssetsDataSupplementRetrieveUrl = (uidAsset: string, id: number) => { + return `/api/v2/assets/${uidAsset}/data/${id}/supplement/` +} + +export const assetsDataSupplementRetrieve = async ( + uidAsset: string, + id: number, + options?: RequestInit, +): Promise => { + return fetchWithAuth(getAssetsDataSupplementRetrieveUrl(uidAsset, id), { + ...options, + method: 'GET', + }) +} + +export const getAssetsDataSupplementRetrieveQueryKey = (uidAsset: string, id: number) => { + return ['api', 'v2', 'assets', uidAsset, 'data', id, 'supplement'] as const +} + +export const getAssetsDataSupplementRetrieveQueryOptions = < + TData = Awaited>, + TError = ErrorObject | ErrorDetail, +>( + uidAsset: string, + id: number, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAssetsDataSupplementRetrieveQueryKey(uidAsset, id) + + const queryFn: QueryFunction>> = ({ signal }) => + assetsDataSupplementRetrieve(uidAsset, id, { signal, ...requestOptions }) + + return { queryKey, queryFn, enabled: !!(uidAsset && id), ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey } +} + +export type AssetsDataSupplementRetrieveQueryResult = NonNullable< + Awaited> +> +export type AssetsDataSupplementRetrieveQueryError = ErrorObject | ErrorDetail + +export function useAssetsDataSupplementRetrieve< + TData = Awaited>, + TError = ErrorObject | ErrorDetail, +>( + uidAsset: string, + id: number, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +): UseQueryResult & { queryKey: QueryKey } { + const queryOptions = getAssetsDataSupplementRetrieveQueryOptions(uidAsset, id, options) + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey } + + query.queryKey = queryOptions.queryKey + + return query +} + +/** + * ## TBC Supplement update + + */ +export type assetsDataSupplementPartialUpdateResponse200 = { + data: DataSupplementResponse + status: 200 +} + +export type assetsDataSupplementPartialUpdateResponse400 = { + data: ErrorObject + status: 400 +} + +export type assetsDataSupplementPartialUpdateResponse401 = { + data: ErrorDetail + status: 401 +} + +export type assetsDataSupplementPartialUpdateResponseComposite = + | assetsDataSupplementPartialUpdateResponse200 + | assetsDataSupplementPartialUpdateResponse400 + | assetsDataSupplementPartialUpdateResponse401 + +export type assetsDataSupplementPartialUpdateResponse = assetsDataSupplementPartialUpdateResponseComposite & { + headers: Headers +} + +export const getAssetsDataSupplementPartialUpdateUrl = (uidAsset: string, id: number) => { + return `/api/v2/assets/${uidAsset}/data/${id}/supplement/` +} + +export const assetsDataSupplementPartialUpdate = async ( + uidAsset: string, + id: number, + patchedDataSupplementPayload: PatchedDataSupplementPayload, + options?: RequestInit, +): Promise => { + return fetchWithAuth( + getAssetsDataSupplementPartialUpdateUrl(uidAsset, id), + { + ...options, + method: 'PATCH', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(patchedDataSupplementPayload), + }, + ) +} + +export const getAssetsDataSupplementPartialUpdateMutationOptions = < + TError = ErrorObject | ErrorDetail, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, + TContext + > + request?: SecondParameter +}): UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, + TContext +> => { + const mutationKey = ['assetsDataSupplementPartialUpdate'] + 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>, + { uidAsset: string; id: number; data: PatchedDataSupplementPayload } + > = (props) => { + const { uidAsset, id, data } = props ?? {} + + return assetsDataSupplementPartialUpdate(uidAsset, id, data, requestOptions) + } + + return { mutationFn, ...mutationOptions } +} + +export type AssetsDataSupplementPartialUpdateMutationResult = NonNullable< + Awaited> +> +export type AssetsDataSupplementPartialUpdateMutationBody = PatchedDataSupplementPayload +export type AssetsDataSupplementPartialUpdateMutationError = ErrorObject | ErrorDetail + +export const useAssetsDataSupplementPartialUpdate = (options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, + TContext + > + request?: SecondParameter +}) => { + const mutationOptions = getAssetsDataSupplementPartialUpdateMutationOptions(options) + + return useMutation(mutationOptions) +} /** * ## Get validation statuses Retrieves the validation status of a submission. diff --git a/kobo/apps/subsequences/views.py b/kobo/apps/subsequences/views.py index ed050218ee..1aa930b6a0 100644 --- a/kobo/apps/subsequences/views.py +++ b/kobo/apps/subsequences/views.py @@ -27,7 +27,7 @@ tags=['Advanced Features'], parameters=[ OpenApiParameter( - name='parent_lookup_asset', + name='uid_asset', type=str, location=OpenApiParameter.PATH, required=True, @@ -64,7 +64,7 @@ ), parameters=[ OpenApiParameter( - name='uid', + name='id', type=str, location=OpenApiParameter.PATH, required=True, @@ -82,7 +82,7 @@ ), parameters=[ OpenApiParameter( - name='uid', + name='id', type=str, location=OpenApiParameter.PATH, required=True, diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index acb70e2dad..399ef10ac6 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -99,6 +99,13 @@ required=True, description='UID of the parent asset', ), + OpenApiParameter( + name='id', + type=int, + location=OpenApiParameter.PATH, + required=False, + description='ID of the data (when applicable)', + ), ], ) @extend_schema_view( diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 135c1977c4..85006a34f2 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -1574,6 +1574,338 @@ } } }, + "/api/v2/assets/{uid_asset}/advanced-features/": { + "get": { + "operationId": "api_v2_assets_advanced_features_list", + "description": "## List all advanced features on an asset\n\nLists all advanced features on all questions in an asset\n", + "parameters": [ + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent assets", + "required": true + } + ], + "tags": [ + "Advanced Features" + ], + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdvancedFeatureResponse" + } + } + } + }, + "description": null + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + } + } + }, + "post": { + "operationId": "api_v2_assets_advanced_features_create", + "description": "## Add an advanced action to an asset\n\nEnables a new type of advanced action on a question in the asset.\n* `action`, `params`, and `question_xpath` are required\n* `params` must match the expected param_schema of the `action`\n\nAccepted `action`s include:\n* `manual_transcription`\n* `automatic_google_transcription`\n* `manual_translation`\n* `automatic_google_translation`\n* `qual`\n\nFor all actions except `qual`, `params` must look like\n> '[{\"language\": \"es\"}, {\"language\": \"en\"}, ...]'\n\nFor `qual`, `params` must look like\n```\n [\n {\n 'type': 'qualInteger',\n 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a',\n 'labels': {'_default': 'How many characters appear in the story?'},\n },\n {\n 'type': 'qualSelectMultiple',\n 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5',\n 'labels': {'_default': \"What themes were present in the story?\"},\n 'choices': [\n {\n 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6',\n 'labels': {'_default': 'Empathy'},\n },\n {\n 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a',\n 'labels': {'_default': 'Competition'},\n },\n {\n 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf',\n 'labels': {'_default': 'Apathy'},\n },\n ],\n },\n {\n 'type': 'qualSelectOne',\n 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503',\n 'labels': {'_default': 'Was this a first-hand account?'},\n 'choices': [\n {\n 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99',\n 'labels': {'_default': 'Yes'},\n },\n {\n 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94',\n 'labels': {'_default': 'No'},\n },\n ],\n },\n {\n 'type': 'qualTags',\n 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f',\n 'labels': {'_default': 'Tag any landmarks mentioned in the story'},\n },\n {\n 'type': 'qualText',\n 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad',\n 'labels': {'_default': 'Add any further remarks'},\n },\n {\n 'type': 'qualNote',\n 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72',\n 'labels': {'_default': 'Thanks for your diligence'},\n },\n ]```\n", + "parameters": [ + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent assets", + "required": true + } + ], + "tags": [ + "Advanced Features" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeaturePostRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeaturePostRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeaturePostRequest" + } + } + }, + "required": true + }, + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeatureResponse" + } + } + }, + "description": null + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "examples": { + "BadRequest": { + "value": { + "detail": { + "field_name": [ + "Error message" + ] + } + }, + "summary": "Bad request" + } + } + } + }, + "description": "" + } + } + } + }, + "/api/v2/assets/{uid_asset}/advanced-features/{id}/": { + "get": { + "operationId": "api_v2_assets_advanced_features_retrieve", + "description": "## Retrieve advanced feature configuration for a question on an asset\n\nGets the params for one advanced action for one question in an asset\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "description": "UID of the action", + "required": true + }, + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent assets", + "required": true + } + ], + "tags": [ + "Advanced Features" + ], + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeatureResponse" + } + } + }, + "description": null + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + } + } + }, + "patch": { + "operationId": "api_v2_assets_advanced_features_partial_update", + "description": "## Update an advanced action on an asset\n\nUpdate the params of an advanced action on a question in the asset.\n* `params` is required\n* `params` must match the expected param_schema of the action being updated\n\nFor all actions except `qual`, `params` must look like\n> '[{\"language\": \"es\"}, {\"language\": \"en\"}, ...]'\n\nFor `qual`, `params` must look like\n```\n [\n {\n 'type': 'qualInteger',\n 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a',\n 'labels': {'_default': 'How many characters appear in the story?'},\n },\n {\n 'type': 'qualSelectMultiple',\n 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5',\n 'labels': {'_default': \"What themes were present in the story?\"},\n 'choices': [\n {\n 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6',\n 'labels': {'_default': 'Empathy'},\n },\n {\n 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a',\n 'labels': {'_default': 'Competition'},\n },\n {\n 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf',\n 'labels': {'_default': 'Apathy'},\n },\n ],\n },\n {\n 'type': 'qualSelectOne',\n 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503',\n 'labels': {'_default': 'Was this a first-hand account?'},\n 'choices': [\n {\n 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99',\n 'labels': {'_default': 'Yes'},\n },\n {\n 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94',\n 'labels': {'_default': 'No'},\n },\n ],\n },\n {\n 'type': 'qualTags',\n 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f',\n 'labels': {'_default': 'Tag any landmarks mentioned in the story'},\n },\n {\n 'type': 'qualText',\n 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad',\n 'labels': {'_default': 'Add any further remarks'},\n },\n {\n 'type': 'qualNote',\n 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72',\n 'labels': {'_default': 'Thanks for your diligence'},\n },\n ]```\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string" + }, + "description": "UID of the action", + "required": true + }, + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent assets", + "required": true + } + ], + "tags": [ + "Advanced Features" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedAdvancedFeaturePatchRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/PatchedAdvancedFeaturePatchRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/PatchedAdvancedFeaturePatchRequest" + } + } + } + }, + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdvancedFeatureResponse" + } + } + }, + "description": null + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "examples": { + "BadRequest": { + "value": { + "detail": { + "field_name": [ + "Error message" + ] + } + }, + "summary": "Bad request" + } + } + } + }, + "description": "" + } + } + } + }, "/api/v2/assets/{uid_asset}/attachments/{id}/": { "delete": { "operationId": "api_v2_assets_attachments_destroy", @@ -1897,6 +2229,15 @@ ] } }, + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true + }, { "name": "limit", "required": false, @@ -2027,11 +2368,146 @@ "schema": { "$ref": "#/components/schemas/DataResponse" } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/DataResponse" - } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/DataResponse" + } + } + }, + "description": null + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + } + } + }, + "delete": { + "operationId": "api_v2_assets_data_destroy", + "description": "## Deletes current submission\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data", + "required": true + }, + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent asset", + "required": true + } + ], + "tags": [ + "Survey data" + ], + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "204": { + "description": "No response body" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotFound": { + "value": { + "detail": "Not found." + }, + "summary": "Not Found" + } + } + } + }, + "description": "" + } + } + } + }, + "/api/v2/assets/{uid_asset}/data/{id}/duplicate/": { + "post": { + "operationId": "api_v2_assets_data_duplicate_create", + "description": "## Duplicate submission\nDuplicates the data of a submission\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data", + "required": true + }, + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent asset", + "required": true + } + ], + "tags": [ + "Survey data" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataBulkDelete" + } + } + }, + "required": true + }, + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataResponse" + } } }, "description": null @@ -2055,10 +2531,12 @@ "description": "" } } - }, - "delete": { - "operationId": "api_v2_assets_data_destroy", - "description": "## Deletes current submission\n", + } + }, + "/api/v2/assets/{uid_asset}/data/{id}/edit/": { + "get": { + "operationId": "api_v2_assets_data_edit_retrieve", + "description": "## Get submission url of enketo in edit mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/edit/`: deprecated, use the next one.\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/`: redirect to the enketo url submission with a 302 HTTP code.\n", "parameters": [ { "in": "path", @@ -2091,8 +2569,33 @@ } ], "responses": { - "204": { - "description": "No response body" + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnketoEditResponse" + } + } + }, + "description": null + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "AccessDenied": { + "value": { + "detail": "You do not have permission to perform this action." + }, + "summary": "Access Denied" + } + } + } + }, + "description": "" }, "404": { "content": { @@ -2115,10 +2618,10 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/duplicate/": { - "post": { - "operationId": "api_v2_assets_data_duplicate_create", - "description": "## Duplicate submission\nDuplicates the data of a submission\n", + "/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/": { + "get": { + "operationId": "api_v2_assets_data_enketo_edit_retrieve", + "description": "## Get submission url of enketo in edit mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/edit/`: deprecated, use the next one.\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/`: redirect to the enketo url submission with a 302 HTTP code.\n", "parameters": [ { "in": "path", @@ -2142,16 +2645,6 @@ "tags": [ "Survey data" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DataBulkDelete" - } - } - }, - "required": true - }, "security": [ { "BasicAuth": [] @@ -2165,12 +2658,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataResponse" + "$ref": "#/components/schemas/EnketoEditResponse" } } }, "description": null }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "AccessDenied": { + "value": { + "detail": "You do not have permission to perform this action." + }, + "summary": "Access Denied" + } + } + } + }, + "description": "" + }, "404": { "content": { "application/json": { @@ -2192,9 +2703,9 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/edit/": { + "/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/": { "get": { - "operationId": "api_v2_assets_data_edit_retrieve", + "operationId": "api_v2_assets_data_enketo_redirect_edit_retrieve", "description": "## Get submission url of enketo in edit mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/edit/`: deprecated, use the next one.\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/`: redirect to the enketo url submission with a 302 HTTP code.\n", "parameters": [ { @@ -2277,10 +2788,10 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/": { + "/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/": { "get": { - "operationId": "api_v2_assets_data_enketo_edit_retrieve", - "description": "## Get submission url of enketo in edit mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/edit/`: deprecated, use the next one.\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/`: redirect to the enketo url submission with a 302 HTTP code.\n", + "operationId": "api_v2_assets_data_enketo_redirect_view_retrieve", + "description": "## Get submission url of enketo in preview mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/view/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/`: redirect to the enketo url submission with a 302 code.\n", "parameters": [ { "in": "path", @@ -2317,7 +2828,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnketoEditResponse" + "$ref": "#/components/schemas/EnketoViewResponse" } } }, @@ -2362,10 +2873,10 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/": { + "/api/v2/assets/{uid_asset}/data/{id}/enketo/view/": { "get": { - "operationId": "api_v2_assets_data_enketo_redirect_edit_retrieve", - "description": "## Get submission url of enketo in edit mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/edit/`: deprecated, use the next one.\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/edit/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/edit/`: redirect to the enketo url submission with a 302 HTTP code.\n", + "operationId": "api_v2_assets_data_enketo_view_retrieve", + "description": "## Get submission url of enketo in preview mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/view/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/`: redirect to the enketo url submission with a 302 code.\n", "parameters": [ { "in": "path", @@ -2402,7 +2913,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnketoEditResponse" + "$ref": "#/components/schemas/EnketoViewResponse" } } }, @@ -2447,10 +2958,10 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/": { + "/api/v2/assets/{uid_asset}/data/{id}/supplement/": { "get": { - "operationId": "api_v2_assets_data_enketo_redirect_view_retrieve", - "description": "## Get submission url of enketo in preview mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/view/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/`: redirect to the enketo url submission with a 302 code.\n", + "operationId": "api_v2_assets_data_supplement_retrieve", + "description": "## TBC Supplement retrieve\n", "parameters": [ { "in": "path", @@ -2458,7 +2969,16 @@ "schema": { "type": "integer" }, - "description": "ID of the data", + "description": "ID of the data (when applicable)", + "required": true + }, + { + "in": "path", + "name": "pk", + "schema": { + "type": "string" + }, + "description": "Submission identifier", "required": true }, { @@ -2487,12 +3007,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnketoViewResponse" + "$ref": "#/components/schemas/DataSupplementResponse" } } }, "description": null }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotAuthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + }, + "summary": "Not authenticated" + } + } + } + }, + "description": "" + }, "403": { "content": { "application/json": { @@ -2528,14 +3066,34 @@ } }, "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "examples": { + "BadRequest": { + "value": { + "detail": { + "field_name": [ + "Error message" + ] + } + }, + "summary": "Bad request" + } + } + } + }, + "description": "" } } - } - }, - "/api/v2/assets/{uid_asset}/data/{id}/enketo/view/": { - "get": { - "operationId": "api_v2_assets_data_enketo_view_retrieve", - "description": "## Get submission url of enketo in preview mode\n\nNote: Some variation of this url exists:\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/view/`: return the url of the enketo submission (as seen in the response example).\n\n`/api/v2/assets/{uid_asset}/data/{id}/enketo/redirect/view/`: redirect to the enketo url submission with a 302 code.\n", + }, + "patch": { + "operationId": "api_v2_assets_data_supplement_partial_update", + "description": "## TBC Supplement update\n", "parameters": [ { "in": "path", @@ -2543,7 +3101,16 @@ "schema": { "type": "integer" }, - "description": "ID of the data", + "description": "ID of the data (when applicable)", + "required": true + }, + { + "in": "path", + "name": "pk", + "schema": { + "type": "string" + }, + "description": "Submission identifier", "required": true }, { @@ -2559,6 +3126,15 @@ "tags": [ "Survey data" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedDataSupplementPayload" + } + } + } + }, "security": [ { "BasicAuth": [] @@ -2572,12 +3148,30 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnketoViewResponse" + "$ref": "#/components/schemas/DataSupplementResponse" } } }, "description": null }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "NotAuthenticated": { + "value": { + "detail": "Authentication credentials were not provided." + }, + "summary": "Not authenticated" + } + } + } + }, + "description": "" + }, "403": { "content": { "application/json": { @@ -2613,6 +3207,28 @@ } }, "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorObject" + }, + "examples": { + "BadRequest": { + "value": { + "detail": { + "field_name": [ + "Error message" + ] + } + }, + "summary": "Bad request" + } + } + } + }, + "description": "" } } } @@ -2693,7 +3309,16 @@ "schema": { "type": "integer" }, - "description": "ID of the data", + "description": "ID of the data (when applicable)", + "required": true + }, + { + "in": "path", + "name": "submission_id_or_root_uuid", + "schema": { + "type": "string" + }, + "description": "Submission identifier", "required": true }, { @@ -3100,6 +3725,15 @@ "operationId": "api_v2_assets_data_bulk_partial_update", "description": "## Bulk updating of submissions\n\nWhere `` is a string and should be an existing XML field value of the submissions.\nIf `` is part of a group or nested group, the field must follow the group hierarchy\nstructure, i.e.:\n\nIf the field is within a group called `group_1`, the field name is `question_1` and the new value is `new value`,\nthe payload should contain an item with the following structure:\n\n*\"group_1/question_1\": \"new value\"*\n\n\nSimilarly, if there are `N` nested groups, the structure will be:\n\n*\"group_1/sub_group_1/.../sub_group_n/question_1\": \"new value\"*\n", "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true + }, { "in": "path", "name": "uid_asset", @@ -3165,6 +3799,15 @@ "operationId": "api_v2_assets_data_bulk_destroy", "description": "## Bulk delete submissions\n\n```curl\n curl -X DELETE https://kf.kobotoolbox.org/api/v2/assets/aSAvYreNzVEkrWg5Gdcvg/data/bulk/\n```\n\n**Payload**\n```json\n{\n \"submissions_ids\": [\n 1,\n 2\n ]\n }\n```\n* Where: `submissions_ids` (required) is a list of submission root id on the data\nto delete\n\n\n**Response**\n```json\n{\n \"detail\": \"{number_of_submissions} submissions have been deleted\"\n}\n```\n* Where: `number_of_submissions` is the number of items that was deleted\n\n\n_Due to limitations with DRF-Spectacular current version, `DELETE` actions do not support showing a request body OR a response body. This is due to the 'vague' nature of the action which generally does *not* recommend the use of a payload. To still document this endpoint, example for the payload and response will be included but it will not be possible to test this endpoint. The HTTP code and the errors example are, for their part, factual and can be considered when working with the endpoint._\n", "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true + }, { "in": "path", "name": "uid_asset", @@ -3216,6 +3859,15 @@ "operationId": "api_v2_assets_data_validation_statuses_partial_update", "description": "## Bulk update submissions status\n\n* Where: \"submissions_ids\" (required) is a list of submission root id on the data\nto delete\n* Where: \"validation_status.uid\" (required) is a string and can be one of these values:\n * `validation_status_approved`\n * `validation_status_not_approved`\n * `validation_status_on_hold`\n\nWill return the number of submission updated as such:\n> **Response**\n>\n> {\n> \"detail\": \"{number_of_submissions} submissions have been updated\"\n> }\n", "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true + }, { "in": "path", "name": "uid_asset", @@ -3281,6 +3933,15 @@ "operationId": "api_v2_assets_data_validation_statuses_destroy", "description": "## Bulk delete submissions status\n\n```curl\n curl -X DELETE https://kf.kobotoolbox.org/api/v2/assets/aSAvYreNzVEkrWg5Gdcvg/data/validation_statuses/\n```\n\n**Payload**\n```json\n{\n \"payload\": {\n \"submission_ids\": [\n 1,\n 2\n ],\n \"validation_status.uid\": \"validation_status\"\n }\n}\n```\n* Where: \"submissions_ids\" (required) is a list of submission root id on the data\nto delete\n\nThe validation status of the submission can be updated. The `validation_status.uid` should be a `string`, and it must be one of the following values:\n- `validation_status_approved`\n- `validation_status_not_approved`\n- `validation_status_on_hold`\n\n**Response**\n```json\n{\n \"detail\": \"{number_of_submissions} submissions have been updated\"\n}\n```\n\n_Due to limitations with DRF-Spectacular current version, `DELETE` actions do not support showing a request body OR a response body. This is due to the 'vague' nature of the action which generally does *not* recommend the use of a payload. To still document this endpoint, example for the payload and response will be included but it will not be possible to test this endpoint. The HTTP code and the errors example are, for their part, factual and can be considered when working with the endpoint._\n", "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true + }, { "in": "path", "name": "uid_asset", @@ -12529,6 +13190,58 @@ "username" ] }, + "AdvancedFeaturePostRequest": { + "type": "object", + "properties": { + "question_xpath": { + "type": "string" + }, + "action": { + "type": "string" + }, + "params": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "action", + "params", + "question_xpath" + ] + }, + "AdvancedFeatureResponse": { + "type": "object", + "properties": { + "question_xpath": { + "type": "string" + }, + "action": { + "type": "string" + }, + "params": { + "type": "array", + "items": { + "type": "object" + } + }, + "asset": { + "type": "string" + }, + "uid": { + "type": "string" + } + }, + "required": [ + "action", + "asset", + "params", + "question_xpath", + "uid" + ] + }, "Asset": { "type": "object", "properties": { @@ -12783,33 +13496,6 @@ "advanced_features": { "type": "object" }, - "advanced_submission_schema": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "$description": { - "type": "string" - } - }, - "readOnly": true - }, - "analysis_form_json": { - "type": "object", - "properties": { - "engines": { - "type": "object" - }, - "additional_fields": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "readOnly": true - }, "map_styles": { "type": "object" }, @@ -12875,6 +13561,18 @@ }, "readOnly": true }, + "analysis_form_json": { + "type": "object", + "properties": { + "additional_fields": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "readOnly": true + }, "xform_link": { "type": "string", "format": "uri", @@ -13004,7 +13702,6 @@ }, "required": [ "access_types", - "advanced_submission_schema", "analysis_form_json", "asset_type", "assignable_permissions", @@ -14463,6 +15160,220 @@ "detail" ] }, + "DataSupplementResponse": { + "type": "object", + "properties": { + "_version": { + "type": "string", + "example": "20250812" + }, + "question_name_xpath": { + "type": "object", + "properties": { + "manual_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "revisions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated" + ], + "anyOf": [ + { + "required": [ + "language", + "value" + ] + }, + { + "not": { + "anyOf": [ + { + "required": [ + "language" + ] + }, + { + "required": [ + "value" + ] + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified" + ], + "anyOf": [ + { + "required": [ + "language", + "value" + ] + }, + { + "not": { + "anyOf": [ + { + "required": [ + "language" + ] + }, + { + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "manual_translation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_revisions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated" + ], + "anyOf": [ + { + "required": [ + "language", + "value" + ] + }, + { + "not": { + "anyOf": [ + { + "required": [ + "language" + ] + }, + { + "required": [ + "value" + ] + } + ] + } + } + ] + } + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated" + ], + "anyOf": [ + { + "required": [ + "language", + "value" + ] + }, + { + "not": { + "anyOf": [ + { + "required": [ + "language" + ] + }, + { + "required": [ + "value" + ] + } + ] + } + } + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "manual_transcription" + ] + }, + { + "required": [ + "manual_translation" + ] + } + ] + } + } + }, "DataValidationStatusUpdateResponse": { "type": "object", "properties": { @@ -17892,6 +18803,17 @@ "url" ] }, + "PatchedAdvancedFeaturePatchRequest": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, "PatchedAssetPatchRequest": { "oneOf": [ { @@ -18104,6 +19026,69 @@ } } }, + "PatchedDataSupplementPayload": { + "type": "object", + "properties": { + "_version": { + "type": "string", + "example": "20250812" + }, + "question_name_xpath": { + "type": "object", + "properties": { + "manual_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "manual_translation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "translation": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "manual_transcription" + ] + }, + { + "required": [ + "manual_translation" + ] + } + ] + } + } + }, "PatchedDataValidationStatusUpdatePayload": { "type": "object", "properties": { diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 63fea9f35d..692be6013c 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -1098,6 +1098,350 @@ paths: detail: Not found. summary: Not Found description: '' + /api/v2/assets/{uid_asset}/advanced-features/: + get: + operationId: api_v2_assets_advanced_features_list + description: | + ## List all advanced features on an asset + + Lists all advanced features on all questions in an asset + parameters: + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent assets + required: true + tags: + - Advanced Features + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/AdvancedFeatureResponse' + description: null + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + post: + operationId: api_v2_assets_advanced_features_create + description: | + ## Add an advanced action to an asset + + Enables a new type of advanced action on a question in the asset. + * `action`, `params`, and `question_xpath` are required + * `params` must match the expected param_schema of the `action` + + Accepted `action`s include: + * `manual_transcription` + * `automatic_google_transcription` + * `manual_translation` + * `automatic_google_translation` + * `qual` + + For all actions except `qual`, `params` must look like + > '[{"language": "es"}, {"language": "en"}, ...]' + + For `qual`, `params` must look like + ``` + [ + { + 'type': 'qualInteger', + 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a', + 'labels': {'_default': 'How many characters appear in the story?'}, + }, + { + 'type': 'qualSelectMultiple', + 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', + 'labels': {'_default': "What themes were present in the story?"}, + 'choices': [ + { + 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6', + 'labels': {'_default': 'Empathy'}, + }, + { + 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a', + 'labels': {'_default': 'Competition'}, + }, + { + 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf', + 'labels': {'_default': 'Apathy'}, + }, + ], + }, + { + 'type': 'qualSelectOne', + 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503', + 'labels': {'_default': 'Was this a first-hand account?'}, + 'choices': [ + { + 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99', + 'labels': {'_default': 'Yes'}, + }, + { + 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94', + 'labels': {'_default': 'No'}, + }, + ], + }, + { + 'type': 'qualTags', + 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f', + 'labels': {'_default': 'Tag any landmarks mentioned in the story'}, + }, + { + 'type': 'qualText', + 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad', + 'labels': {'_default': 'Add any further remarks'}, + }, + { + 'type': 'qualNote', + 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72', + 'labels': {'_default': 'Thanks for your diligence'}, + }, + ]``` + parameters: + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent assets + required: true + tags: + - Advanced Features + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AdvancedFeaturePostRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AdvancedFeaturePostRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/AdvancedFeaturePostRequest' + required: true + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AdvancedFeatureResponse' + description: null + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' + /api/v2/assets/{uid_asset}/advanced-features/{id}/: + get: + operationId: api_v2_assets_advanced_features_retrieve + description: | + ## Retrieve advanced feature configuration for a question on an asset + + Gets the params for one advanced action for one question in an asset + parameters: + - in: path + name: id + schema: + type: string + description: UID of the action + required: true + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent assets + required: true + tags: + - Advanced Features + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AdvancedFeatureResponse' + description: null + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + patch: + operationId: api_v2_assets_advanced_features_partial_update + description: | + ## Update an advanced action on an asset + + Update the params of an advanced action on a question in the asset. + * `params` is required + * `params` must match the expected param_schema of the action being updated + + For all actions except `qual`, `params` must look like + > '[{"language": "es"}, {"language": "en"}, ...]' + + For `qual`, `params` must look like + ``` + [ + { + 'type': 'qualInteger', + 'uuid': '1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a', + 'labels': {'_default': 'How many characters appear in the story?'}, + }, + { + 'type': 'qualSelectMultiple', + 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', + 'labels': {'_default': "What themes were present in the story?"}, + 'choices': [ + { + 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6', + 'labels': {'_default': 'Empathy'}, + }, + { + 'uuid': 'cb82919d-2948-4ccf-a488-359c5d5ee53a', + 'labels': {'_default': 'Competition'}, + }, + { + 'uuid': '8effe3b1-619e-4ada-be45-ebcea5af0aaf', + 'labels': {'_default': 'Apathy'}, + }, + ], + }, + { + 'type': 'qualSelectOne', + 'uuid': '1a8b748b-f470-4c40-bc09-ce2b1197f503', + 'labels': {'_default': 'Was this a first-hand account?'}, + 'choices': [ + { + 'uuid': '3c7aacdc-8971-482a-9528-68e64730fc99', + 'labels': {'_default': 'Yes'}, + }, + { + 'uuid': '7e31c6a5-5eac-464c-970c-62c383546a94', + 'labels': {'_default': 'No'}, + }, + ], + }, + { + 'type': 'qualTags', + 'uuid': 'e9b4e6d1-fdbb-4dc9-8b10-a9c3c388322f', + 'labels': {'_default': 'Tag any landmarks mentioned in the story'}, + }, + { + 'type': 'qualText', + 'uuid': '83acf2a7-8edc-4fd8-8b9f-f832ca3f18ad', + 'labels': {'_default': 'Add any further remarks'}, + }, + { + 'type': 'qualNote', + 'uuid': '5ef11d48-d7a3-432e-af83-8c2e9b1feb72', + 'labels': {'_default': 'Thanks for your diligence'}, + }, + ]``` + parameters: + - in: path + name: id + schema: + type: string + description: UID of the action + required: true + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent assets + required: true + tags: + - Advanced Features + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedAdvancedFeaturePatchRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PatchedAdvancedFeaturePatchRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/PatchedAdvancedFeaturePatchRequest' + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AdvancedFeatureResponse' + description: null + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' /api/v2/assets/{uid_asset}/attachments/{id}/: delete: operationId: api_v2_assets_attachments_destroy @@ -1394,6 +1738,12 @@ paths: - geojson - json - xml + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true - name: limit required: false in: query @@ -1897,6 +2247,174 @@ paths: detail: Not found. summary: Not Found description: '' + /api/v2/assets/{uid_asset}/data/{id}/supplement/: + get: + operationId: api_v2_assets_data_supplement_retrieve + description: | + ## TBC Supplement retrieve + parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true + - in: path + name: pk + schema: + type: string + description: Submission identifier + required: true + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent asset + required: true + tags: + - Survey data + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DataSupplementResponse' + description: null + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotAuthenticated: + value: + detail: Authentication credentials were not provided. + summary: Not authenticated + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + AccessDenied: + value: + detail: You do not have permission to perform this action. + summary: Access Denied + description: '' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' + patch: + operationId: api_v2_assets_data_supplement_partial_update + description: | + ## TBC Supplement update + parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true + - in: path + name: pk + schema: + type: string + description: Submission identifier + required: true + - in: path + name: uid_asset + schema: + type: string + description: UID of the parent asset + required: true + tags: + - Survey data + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDataSupplementPayload' + security: + - BasicAuth: [] + - TokenAuth: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DataSupplementResponse' + description: null + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotAuthenticated: + value: + detail: Authentication credentials were not provided. + summary: Not authenticated + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + AccessDenied: + value: + detail: You do not have permission to perform this action. + summary: Access Denied + description: '' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotFound: + value: + detail: Not found. + summary: Not Found + description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' /api/v2/assets/{uid_asset}/data/{id}/validation_status/: get: operationId: api_v2_assets_data_validation_status_retrieve @@ -1954,7 +2472,13 @@ paths: name: id schema: type: integer - description: ID of the data + description: ID of the data (when applicable) + required: true + - in: path + name: submission_id_or_root_uuid + schema: + type: string + description: Submission identifier required: true - in: path name: uid_asset @@ -2276,6 +2800,12 @@ paths: *"group_1/sub_group_1/.../sub_group_n/question_1": "new value"* parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true - in: path name: uid_asset schema: @@ -2343,6 +2873,12 @@ paths: _Due to limitations with DRF-Spectacular current version, `DELETE` actions do not support showing a request body OR a response body. This is due to the 'vague' nature of the action which generally does *not* recommend the use of a payload. To still document this endpoint, example for the payload and response will be included but it will not be possible to test this endpoint. The HTTP code and the errors example are, for their part, factual and can be considered when working with the endpoint._ parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true - in: path name: uid_asset schema: @@ -2388,6 +2924,12 @@ paths: > "detail": "{number_of_submissions} submissions have been updated" > } parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true - in: path name: uid_asset schema: @@ -2460,6 +3002,12 @@ paths: _Due to limitations with DRF-Spectacular current version, `DELETE` actions do not support showing a request body OR a response body. This is due to the 'vague' nature of the action which generally does *not* recommend the use of a payload. To still document this endpoint, example for the payload and response will be included but it will not be possible to test this endpoint. The HTTP code and the errors example are, for their part, factual and can be considered when working with the endpoint._ parameters: + - in: path + name: id + schema: + type: integer + description: ID of the data (when applicable) + required: true - in: path name: uid_asset schema: @@ -9087,6 +9635,42 @@ components: - user - user_uid - username + AdvancedFeaturePostRequest: + type: object + properties: + question_xpath: + type: string + action: + type: string + params: + type: array + items: + type: object + required: + - action + - params + - question_xpath + AdvancedFeatureResponse: + type: object + properties: + question_xpath: + type: string + action: + type: string + params: + type: array + items: + type: object + asset: + type: string + uid: + type: string + required: + - action + - asset + - params + - question_xpath + - uid Asset: type: object properties: @@ -9268,24 +9852,6 @@ components: type: object advanced_features: type: object - advanced_submission_schema: - type: object - properties: - type: - type: string - $description: - type: string - readOnly: true - analysis_form_json: - type: object - properties: - engines: - type: object - additional_fields: - type: array - items: - type: string - readOnly: true map_styles: type: object map_custom: @@ -9329,6 +9895,14 @@ components: url: type: string readOnly: true + analysis_form_json: + type: object + properties: + additional_fields: + type: array + items: + type: string + readOnly: true xform_link: type: string format: uri @@ -9426,7 +10000,6 @@ components: nullable: true required: - access_types - - advanced_submission_schema - analysis_form_json - asset_type - assignable_permissions @@ -10451,6 +11024,124 @@ components: type: string required: - detail + DataSupplementResponse: + type: object + properties: + _version: + type: string + example: '20250812' + question_name_xpath: + type: object + properties: + manual_transcription: + type: object + properties: + language: + type: string + value: + type: string + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + revisions: + type: array + items: + type: object + properties: + language: + type: string + value: + type: string + _dateCreated: + type: string + format: date-time + additionalProperties: false + required: + - _dateCreated + anyOf: + - required: + - language + - value + - not: + anyOf: + - required: + - language + - required: + - value + additionalProperties: false + required: + - _dateCreated + - _dateModified + anyOf: + - required: + - language + - value + - not: + anyOf: + - required: + - language + - required: + - value + manual_translation: + type: array + items: + type: object + properties: + language: + type: string + value: + type: string + _dateCreated: + type: string + format: date-time + _revisions: + type: array + items: + type: object + properties: + language: + type: string + value: + type: string + _dateCreated: + type: string + format: date-time + additionalProperties: false + required: + - _dateCreated + anyOf: + - required: + - language + - value + - not: + anyOf: + - required: + - language + - required: + - value + additionalProperties: false + required: + - _dateCreated + anyOf: + - required: + - language + - value + - not: + anyOf: + - required: + - language + - required: + - value + minLength: 1 + additionalProperties: false + anyOf: + - required: + - manual_transcription + - required: + - manual_translation DataValidationStatusUpdateResponse: type: object properties: @@ -12933,6 +13624,13 @@ components: - source - source__name - url + PatchedAdvancedFeaturePatchRequest: + type: object + properties: + params: + type: array + items: + type: object PatchedAssetPatchRequest: oneOf: - type: object @@ -13083,6 +13781,46 @@ components: properties: field_to_update: type: string + PatchedDataSupplementPayload: + type: object + properties: + _version: + type: string + example: '20250812' + question_name_xpath: + type: object + properties: + manual_transcription: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + manual_translation: + type: array + items: + type: object + properties: + language: + type: string + translation: + type: string + additionalProperties: false + required: + - language + - value + minLength: 1 + additionalProperties: false + anyOf: + - required: + - manual_transcription + - required: + - manual_translation PatchedDataValidationStatusUpdatePayload: type: object properties: From 0b6e61d556cfc1a8cfa3a7ad71335a32eb2c7d69 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Tue, 9 Dec 2025 09:40:59 -0500 Subject: [PATCH 02/33] fix biome formatting --- kpi/fixtures/asset_with_settings_and_qa.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kpi/fixtures/asset_with_settings_and_qa.json b/kpi/fixtures/asset_with_settings_and_qa.json index c16a9e3f2c..99ccff6f0d 100644 --- a/kpi/fixtures/asset_with_settings_and_qa.json +++ b/kpi/fixtures/asset_with_settings_and_qa.json @@ -53,11 +53,13 @@ "question_xpath": "q1", "asset": 3, "action": "qual", - "params": [{ - "type": "qualInteger", - "uuid": "1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a", - "labels": {"_default": "How many characters appear in the story?"} - }] + "params": [ + { + "type": "qualInteger", + "uuid": "1a2c8eb0-e2ec-4b3c-942a-c1a5410c081a", + "labels": { "_default": "How many characters appear in the story?" } + } + ] } } ] From d11c59e3149c8e3e5be0e083fb9c24ead381a3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 10:35:55 -0500 Subject: [PATCH 03/33] fix(openAPI): make supplement detail action use "root_uuid" as unique identifier --- kpi/urls/router_api_v2.py | 17 ++++++++++++++++- kpi/views/v2/data.py | 20 ++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/kpi/urls/router_api_v2.py b/kpi/urls/router_api_v2.py index 30b7be12d5..c3c252eb7c 100644 --- a/kpi/urls/router_api_v2.py +++ b/kpi/urls/router_api_v2.py @@ -18,6 +18,7 @@ from kobo.apps.user_reports.views import UserReportsViewSet from kpi.constants import API_NAMESPACES from kpi.renderers import BasicHTMLRenderer +from kpi.permissions import AdvancedSubmissionPermission from kpi.views.v2.asset import AssetViewSet from kpi.views.v2.asset_counts import AssetCountsViewSet from kpi.views.v2.asset_export_settings import AssetExportSettingsViewSet @@ -239,4 +240,18 @@ def get_urls(self, *args, **kwargs): ), ] -urls_patterns = router_api_v2.urls + enketo_url_aliases +# Declared here instead of using `@action` on the ViewSet because it requires a +# custom lookup field (`root_uuid`), which is not supported by DRF Spectacular. +supplement_url_pattern = [ + path( + 'assets//data//supplement/', + DataViewSet.as_view( + {'get': 'supplement', 'patch': 'supplement'}, + renderer_classes=[JSONRenderer], + permission_classes=[AdvancedSubmissionPermission], + ), + name='submission-supplement', + ), +] + +urls_patterns = router_api_v2.urls + enketo_url_aliases + supplement_url_pattern diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index 399ef10ac6..1d82a773cb 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -494,11 +494,10 @@ def retrieve(self, request, pk, *args, **kwargs): responses=open_api_200_ok_response(DataSupplementResponse), # TODO CHANGEME parameters=[ OpenApiParameter( - name='pk', + name='id', type=str, location=OpenApiParameter.PATH, - required=True, - description='Submission identifier', + exclude=True, ), ], ) @@ -509,24 +508,17 @@ def retrieve(self, request, pk, *args, **kwargs): responses=open_api_200_ok_response(DataSupplementResponse), parameters=[ OpenApiParameter( - name='pk', + name='id', type=str, location=OpenApiParameter.PATH, - required=True, - description='Submission identifier', + exclude=True, ), ], ) - @action( - detail=True, - methods=['GET', 'PATCH'], - renderer_classes=[renderers.JSONRenderer], - permission_classes=[AdvancedSubmissionPermission], - ) - def supplement(self, request, pk, *args, **kwargs): + def supplement(self, request, root_uuid, *args, **kwargs): # make it clear, a root uuid is expected here - submission_root_uuid = pk + submission_root_uuid = root_uuid deployment = self._get_deployment() try: From 0ac5a405a5a7b37271c919455bff1bff1d333fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 10:36:50 -0500 Subject: [PATCH 04/33] fix(auditLogs): support "root_uuid" lookup in supplement endpoint --- kobo/apps/audit_log/models.py | 6 +++++- kobo/apps/audit_log/tests/test_project_history_logs.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kobo/apps/audit_log/models.py b/kobo/apps/audit_log/models.py index 7e6430ab1a..c023bdea9a 100644 --- a/kobo/apps/audit_log/models.py +++ b/kobo/apps/audit_log/models.py @@ -671,7 +671,11 @@ def _create_from_submission_request(cls, request): @classmethod def _create_from_submission_extra_request(cls, request): - s_uuid = request.resolver_match.kwargs['pk'] + try: + s_uuid = request.resolver_match.kwargs['pk'] + except KeyError: + s_uuid = request.resolver_match.kwargs['root_uuid'] + # have to fetch the instance here because we don't have access to it # anywhere else in the request instance = Instance.objects.filter( diff --git a/kobo/apps/audit_log/tests/test_project_history_logs.py b/kobo/apps/audit_log/tests/test_project_history_logs.py index ca931b11d8..a1655312fa 100644 --- a/kobo/apps/audit_log/tests/test_project_history_logs.py +++ b/kobo/apps/audit_log/tests/test_project_history_logs.py @@ -1992,7 +1992,7 @@ def test_update_qa_data(self, is_anonymous, expected_username): method=self.client.patch, url=reverse( self._get_endpoint('submission-supplement'), - kwargs={'uid_asset': self.asset.uid, 'pk': submission['_uuid']}, + args=[self.asset.uid, submission['_uuid']], ), request_data={ '_version': '20250820', From 54ebe8e774ccc9d3781b7fdd29ffeb12ed318f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 10:37:34 -0500 Subject: [PATCH 05/33] docs: update OpenAPI schemas and Orval query helpers --- jsapp/js/api/react-query/survey-data.ts | 402 ++++++++++++------------ static/openapi/schema_v2.json | 338 ++++++++++---------- static/openapi/schema_v2.yaml | 242 +++++++------- 3 files changed, 474 insertions(+), 508 deletions(-) diff --git a/jsapp/js/api/react-query/survey-data.ts b/jsapp/js/api/react-query/survey-data.ts index 1f2cd2c737..98d15ba8a5 100644 --- a/jsapp/js/api/react-query/survey-data.ts +++ b/jsapp/js/api/react-query/survey-data.ts @@ -1287,207 +1287,6 @@ export function useAssetsDataEnketoViewRetrieve< return query } -/** - * ## TBC Supplement retrieve - - */ -export type assetsDataSupplementRetrieveResponse200 = { - data: DataSupplementResponse - status: 200 -} - -export type assetsDataSupplementRetrieveResponse400 = { - data: ErrorObject - status: 400 -} - -export type assetsDataSupplementRetrieveResponse401 = { - data: ErrorDetail - status: 401 -} - -export type assetsDataSupplementRetrieveResponseComposite = - | assetsDataSupplementRetrieveResponse200 - | assetsDataSupplementRetrieveResponse400 - | assetsDataSupplementRetrieveResponse401 - -export type assetsDataSupplementRetrieveResponse = assetsDataSupplementRetrieveResponseComposite & { - headers: Headers -} - -export const getAssetsDataSupplementRetrieveUrl = (uidAsset: string, id: number) => { - return `/api/v2/assets/${uidAsset}/data/${id}/supplement/` -} - -export const assetsDataSupplementRetrieve = async ( - uidAsset: string, - id: number, - options?: RequestInit, -): Promise => { - return fetchWithAuth(getAssetsDataSupplementRetrieveUrl(uidAsset, id), { - ...options, - method: 'GET', - }) -} - -export const getAssetsDataSupplementRetrieveQueryKey = (uidAsset: string, id: number) => { - return ['api', 'v2', 'assets', uidAsset, 'data', id, 'supplement'] as const -} - -export const getAssetsDataSupplementRetrieveQueryOptions = < - TData = Awaited>, - TError = ErrorObject | ErrorDetail, ->( - uidAsset: string, - id: number, - options?: { - query?: UseQueryOptions>, TError, TData> - request?: SecondParameter - }, -) => { - const { query: queryOptions, request: requestOptions } = options ?? {} - - const queryKey = queryOptions?.queryKey ?? getAssetsDataSupplementRetrieveQueryKey(uidAsset, id) - - const queryFn: QueryFunction>> = ({ signal }) => - assetsDataSupplementRetrieve(uidAsset, id, { signal, ...requestOptions }) - - return { queryKey, queryFn, enabled: !!(uidAsset && id), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: QueryKey } -} - -export type AssetsDataSupplementRetrieveQueryResult = NonNullable< - Awaited> -> -export type AssetsDataSupplementRetrieveQueryError = ErrorObject | ErrorDetail - -export function useAssetsDataSupplementRetrieve< - TData = Awaited>, - TError = ErrorObject | ErrorDetail, ->( - uidAsset: string, - id: number, - options?: { - query?: UseQueryOptions>, TError, TData> - request?: SecondParameter - }, -): UseQueryResult & { queryKey: QueryKey } { - const queryOptions = getAssetsDataSupplementRetrieveQueryOptions(uidAsset, id, options) - - const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey } - - query.queryKey = queryOptions.queryKey - - return query -} - -/** - * ## TBC Supplement update - - */ -export type assetsDataSupplementPartialUpdateResponse200 = { - data: DataSupplementResponse - status: 200 -} - -export type assetsDataSupplementPartialUpdateResponse400 = { - data: ErrorObject - status: 400 -} - -export type assetsDataSupplementPartialUpdateResponse401 = { - data: ErrorDetail - status: 401 -} - -export type assetsDataSupplementPartialUpdateResponseComposite = - | assetsDataSupplementPartialUpdateResponse200 - | assetsDataSupplementPartialUpdateResponse400 - | assetsDataSupplementPartialUpdateResponse401 - -export type assetsDataSupplementPartialUpdateResponse = assetsDataSupplementPartialUpdateResponseComposite & { - headers: Headers -} - -export const getAssetsDataSupplementPartialUpdateUrl = (uidAsset: string, id: number) => { - return `/api/v2/assets/${uidAsset}/data/${id}/supplement/` -} - -export const assetsDataSupplementPartialUpdate = async ( - uidAsset: string, - id: number, - patchedDataSupplementPayload: PatchedDataSupplementPayload, - options?: RequestInit, -): Promise => { - return fetchWithAuth( - getAssetsDataSupplementPartialUpdateUrl(uidAsset, id), - { - ...options, - method: 'PATCH', - headers: { 'Content-Type': 'application/json', ...options?.headers }, - body: JSON.stringify(patchedDataSupplementPayload), - }, - ) -} - -export const getAssetsDataSupplementPartialUpdateMutationOptions = < - TError = ErrorObject | ErrorDetail, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, - TContext - > - request?: SecondParameter -}): UseMutationOptions< - Awaited>, - TError, - { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, - TContext -> => { - const mutationKey = ['assetsDataSupplementPartialUpdate'] - 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>, - { uidAsset: string; id: number; data: PatchedDataSupplementPayload } - > = (props) => { - const { uidAsset, id, data } = props ?? {} - - return assetsDataSupplementPartialUpdate(uidAsset, id, data, requestOptions) - } - - return { mutationFn, ...mutationOptions } -} - -export type AssetsDataSupplementPartialUpdateMutationResult = NonNullable< - Awaited> -> -export type AssetsDataSupplementPartialUpdateMutationBody = PatchedDataSupplementPayload -export type AssetsDataSupplementPartialUpdateMutationError = ErrorObject | ErrorDetail - -export const useAssetsDataSupplementPartialUpdate = (options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { uidAsset: string; id: number; data: PatchedDataSupplementPayload }, - TContext - > - request?: SecondParameter -}) => { - const mutationOptions = getAssetsDataSupplementPartialUpdateMutationOptions(options) - - return useMutation(mutationOptions) -} /** * ## Get validation statuses Retrieves the validation status of a submission. @@ -1783,6 +1582,207 @@ export const useAssetsDataValidationStatusDestroy = { + return `/api/v2/assets/${uidAsset}/data/${rootUuid}/supplement/` +} + +export const assetsDataSupplementRetrieve = async ( + uidAsset: string, + rootUuid: string, + options?: RequestInit, +): Promise => { + return fetchWithAuth(getAssetsDataSupplementRetrieveUrl(uidAsset, rootUuid), { + ...options, + method: 'GET', + }) +} + +export const getAssetsDataSupplementRetrieveQueryKey = (uidAsset: string, rootUuid: string) => { + return ['api', 'v2', 'assets', uidAsset, 'data', rootUuid, 'supplement'] as const +} + +export const getAssetsDataSupplementRetrieveQueryOptions = < + TData = Awaited>, + TError = ErrorObject | ErrorDetail, +>( + uidAsset: string, + rootUuid: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +) => { + const { query: queryOptions, request: requestOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAssetsDataSupplementRetrieveQueryKey(uidAsset, rootUuid) + + const queryFn: QueryFunction>> = ({ signal }) => + assetsDataSupplementRetrieve(uidAsset, rootUuid, { signal, ...requestOptions }) + + return { queryKey, queryFn, enabled: !!(uidAsset && rootUuid), ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey } +} + +export type AssetsDataSupplementRetrieveQueryResult = NonNullable< + Awaited> +> +export type AssetsDataSupplementRetrieveQueryError = ErrorObject | ErrorDetail + +export function useAssetsDataSupplementRetrieve< + TData = Awaited>, + TError = ErrorObject | ErrorDetail, +>( + uidAsset: string, + rootUuid: string, + options?: { + query?: UseQueryOptions>, TError, TData> + request?: SecondParameter + }, +): UseQueryResult & { queryKey: QueryKey } { + const queryOptions = getAssetsDataSupplementRetrieveQueryOptions(uidAsset, rootUuid, options) + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey } + + query.queryKey = queryOptions.queryKey + + return query +} + +/** + * ## TBC Supplement update + + */ +export type assetsDataSupplementPartialUpdateResponse200 = { + data: DataSupplementResponse + status: 200 +} + +export type assetsDataSupplementPartialUpdateResponse400 = { + data: ErrorObject + status: 400 +} + +export type assetsDataSupplementPartialUpdateResponse401 = { + data: ErrorDetail + status: 401 +} + +export type assetsDataSupplementPartialUpdateResponseComposite = + | assetsDataSupplementPartialUpdateResponse200 + | assetsDataSupplementPartialUpdateResponse400 + | assetsDataSupplementPartialUpdateResponse401 + +export type assetsDataSupplementPartialUpdateResponse = assetsDataSupplementPartialUpdateResponseComposite & { + headers: Headers +} + +export const getAssetsDataSupplementPartialUpdateUrl = (uidAsset: string, rootUuid: string) => { + return `/api/v2/assets/${uidAsset}/data/${rootUuid}/supplement/` +} + +export const assetsDataSupplementPartialUpdate = async ( + uidAsset: string, + rootUuid: string, + patchedDataSupplementPayload: PatchedDataSupplementPayload, + options?: RequestInit, +): Promise => { + return fetchWithAuth( + getAssetsDataSupplementPartialUpdateUrl(uidAsset, rootUuid), + { + ...options, + method: 'PATCH', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(patchedDataSupplementPayload), + }, + ) +} + +export const getAssetsDataSupplementPartialUpdateMutationOptions = < + TError = ErrorObject | ErrorDetail, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; rootUuid: string; data: PatchedDataSupplementPayload }, + TContext + > + request?: SecondParameter +}): UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; rootUuid: string; data: PatchedDataSupplementPayload }, + TContext +> => { + const mutationKey = ['assetsDataSupplementPartialUpdate'] + 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>, + { uidAsset: string; rootUuid: string; data: PatchedDataSupplementPayload } + > = (props) => { + const { uidAsset, rootUuid, data } = props ?? {} + + return assetsDataSupplementPartialUpdate(uidAsset, rootUuid, data, requestOptions) + } + + return { mutationFn, ...mutationOptions } +} + +export type AssetsDataSupplementPartialUpdateMutationResult = NonNullable< + Awaited> +> +export type AssetsDataSupplementPartialUpdateMutationBody = PatchedDataSupplementPayload +export type AssetsDataSupplementPartialUpdateMutationError = ErrorObject | ErrorDetail + +export const useAssetsDataSupplementPartialUpdate = (options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { uidAsset: string; rootUuid: string; data: PatchedDataSupplementPayload }, + TContext + > + request?: SecondParameter +}) => { + const mutationOptions = getAssetsDataSupplementPartialUpdateMutationOptions(options) + + return useMutation(mutationOptions) +} /** * ## Get an asset's attachment using xpath diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 85006a34f2..e993aa2f52 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -2958,10 +2958,10 @@ } } }, - "/api/v2/assets/{uid_asset}/data/{id}/supplement/": { + "/api/v2/assets/{uid_asset}/data/{id}/validation_status/": { "get": { - "operationId": "api_v2_assets_data_supplement_retrieve", - "description": "## TBC Supplement retrieve\n", + "operationId": "api_v2_assets_data_validation_status_retrieve", + "description": "## Get validation statuses\nRetrieves the validation status of a submission.\n", "parameters": [ { "in": "path", @@ -2969,16 +2969,7 @@ "schema": { "type": "integer" }, - "description": "ID of the data (when applicable)", - "required": true - }, - { - "in": "path", - "name": "pk", - "schema": { - "type": "string" - }, - "description": "Submission identifier", + "description": "ID of the data", "required": true }, { @@ -3007,47 +2998,94 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataSupplementResponse" + "$ref": "#/components/schemas/DataValidationStatusUpdateResponse" } } }, "description": null }, - "401": { + "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetail" }, "examples": { - "NotAuthenticated": { + "NotFound": { "value": { - "detail": "Authentication credentials were not provided." + "detail": "Not found." }, - "summary": "Not authenticated" + "summary": "Not Found" } } } }, "description": "" + } + } + }, + "patch": { + "operationId": "api_v2_assets_data_validation_status_partial_update", + "description": "## Update the validation of a submission\n\nThe validation status of the submission can be updated. The `validation_status.uid` should be a `string`, and it must be one of the following values:\n\n- `validation_status_approved`\n- `validation_status_not_approved`\n- `validation_status_on_hold`\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data (when applicable)", + "required": true }, - "403": { + { + "in": "path", + "name": "submission_id_or_root_uuid", + "schema": { + "type": "string" + }, + "description": "Submission identifier", + "required": true + }, + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent asset", + "required": true + } + ], + "tags": [ + "Survey data" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedDataValidationStatusUpdatePayload" + } + } + } + }, + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorDetail" - }, - "examples": { - "AccessDenied": { - "value": { - "detail": "You do not have permission to perform this action." - }, - "summary": "Access Denied" - } + "$ref": "#/components/schemas/DataValidationStatusUpdateResponse" } } }, - "description": "" + "description": null }, "404": { "content": { @@ -3066,23 +3104,59 @@ } }, "description": "" + } + } + }, + "delete": { + "operationId": "api_v2_assets_data_validation_status_destroy", + "description": "## Delete validation status\n", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer" + }, + "description": "ID of the data", + "required": true }, - "400": { + { + "in": "path", + "name": "uid_asset", + "schema": { + "type": "string" + }, + "description": "UID of the parent asset", + "required": true + } + ], + "tags": [ + "Survey data" + ], + "security": [ + { + "BasicAuth": [] + }, + { + "TokenAuth": [] + } + ], + "responses": { + "204": { + "description": "No response body" + }, + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorObject" + "$ref": "#/components/schemas/ErrorDetail" }, "examples": { - "BadRequest": { + "NotFound": { "value": { - "detail": { - "field_name": [ - "Error message" - ] - } + "detail": "Not found." }, - "summary": "Bad request" + "summary": "Not Found" } } } @@ -3090,27 +3164,19 @@ "description": "" } } - }, - "patch": { - "operationId": "api_v2_assets_data_supplement_partial_update", - "description": "## TBC Supplement update\n", + } + }, + "/api/v2/assets/{uid_asset}/data/{root_uuid}/supplement/": { + "get": { + "operationId": "api_v2_assets_data_supplement_retrieve", + "description": "## TBC Supplement retrieve\n", "parameters": [ { "in": "path", - "name": "id", - "schema": { - "type": "integer" - }, - "description": "ID of the data (when applicable)", - "required": true - }, - { - "in": "path", - "name": "pk", + "name": "root_uuid", "schema": { "type": "string" }, - "description": "Submission identifier", "required": true }, { @@ -3126,15 +3192,6 @@ "tags": [ "Survey data" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchedDataSupplementPayload" - } - } - } - }, "security": [ { "BasicAuth": [] @@ -3231,20 +3288,17 @@ "description": "" } } - } - }, - "/api/v2/assets/{uid_asset}/data/{id}/validation_status/": { - "get": { - "operationId": "api_v2_assets_data_validation_status_retrieve", - "description": "## Get validation statuses\nRetrieves the validation status of a submission.\n", + }, + "patch": { + "operationId": "api_v2_assets_data_supplement_partial_update", + "description": "## TBC Supplement update\n", "parameters": [ { "in": "path", - "name": "id", + "name": "root_uuid", "schema": { - "type": "integer" + "type": "string" }, - "description": "ID of the data", "required": true }, { @@ -3260,6 +3314,15 @@ "tags": [ "Survey data" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchedDataSupplementPayload" + } + } + } + }, "security": [ { "BasicAuth": [] @@ -3273,94 +3336,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataValidationStatusUpdateResponse" + "$ref": "#/components/schemas/DataSupplementResponse" } } }, "description": null }, - "404": { + "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorDetail" }, "examples": { - "NotFound": { + "NotAuthenticated": { "value": { - "detail": "Not found." + "detail": "Authentication credentials were not provided." }, - "summary": "Not Found" + "summary": "Not authenticated" } } } }, "description": "" - } - } - }, - "patch": { - "operationId": "api_v2_assets_data_validation_status_partial_update", - "description": "## Update the validation of a submission\n\nThe validation status of the submission can be updated. The `validation_status.uid` should be a `string`, and it must be one of the following values:\n\n- `validation_status_approved`\n- `validation_status_not_approved`\n- `validation_status_on_hold`\n", - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "integer" - }, - "description": "ID of the data (when applicable)", - "required": true - }, - { - "in": "path", - "name": "submission_id_or_root_uuid", - "schema": { - "type": "string" - }, - "description": "Submission identifier", - "required": true - }, - { - "in": "path", - "name": "uid_asset", - "schema": { - "type": "string" - }, - "description": "UID of the parent asset", - "required": true - } - ], - "tags": [ - "Survey data" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchedDataValidationStatusUpdatePayload" - } - } - } - }, - "security": [ - { - "BasicAuth": [] }, - { - "TokenAuth": [] - } - ], - "responses": { - "200": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DataValidationStatusUpdateResponse" + "$ref": "#/components/schemas/ErrorDetail" + }, + "examples": { + "AccessDenied": { + "value": { + "detail": "You do not have permission to perform this action." + }, + "summary": "Access Denied" + } } } }, - "description": null + "description": "" }, "404": { "content": { @@ -3379,59 +3395,23 @@ } }, "description": "" - } - } - }, - "delete": { - "operationId": "api_v2_assets_data_validation_status_destroy", - "description": "## Delete validation status\n", - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "integer" - }, - "description": "ID of the data", - "required": true }, - { - "in": "path", - "name": "uid_asset", - "schema": { - "type": "string" - }, - "description": "UID of the parent asset", - "required": true - } - ], - "tags": [ - "Survey data" - ], - "security": [ - { - "BasicAuth": [] - }, - { - "TokenAuth": [] - } - ], - "responses": { - "204": { - "description": "No response body" - }, - "404": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorDetail" + "$ref": "#/components/schemas/ErrorObject" }, "examples": { - "NotFound": { + "BadRequest": { "value": { - "detail": "Not found." + "detail": { + "field_name": [ + "Error message" + ] + } }, - "summary": "Not Found" + "summary": "Bad request" } } } diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 692be6013c..b797adc00c 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -2247,23 +2247,18 @@ paths: detail: Not found. summary: Not Found description: '' - /api/v2/assets/{uid_asset}/data/{id}/supplement/: + /api/v2/assets/{uid_asset}/data/{id}/validation_status/: get: - operationId: api_v2_assets_data_supplement_retrieve + operationId: api_v2_assets_data_validation_status_retrieve description: | - ## TBC Supplement retrieve + ## Get validation statuses + Retrieves the validation status of a submission. parameters: - in: path name: id schema: type: integer - description: ID of the data (when applicable) - required: true - - in: path - name: pk - schema: - type: string - description: Submission identifier + description: ID of the data required: true - in: path name: uid_asset @@ -2281,30 +2276,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DataSupplementResponse' + $ref: '#/components/schemas/DataValidationStatusUpdateResponse' description: null - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorDetail' - examples: - NotAuthenticated: - value: - detail: Authentication credentials were not provided. - summary: Not authenticated - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorDetail' - examples: - AccessDenied: - value: - detail: You do not have permission to perform this action. - summary: Access Denied - description: '' '404': content: application/json: @@ -2316,23 +2289,16 @@ paths: detail: Not found. summary: Not Found description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorObject' - examples: - BadRequest: - value: - detail: - field_name: - - Error message - summary: Bad request - description: '' patch: - operationId: api_v2_assets_data_supplement_partial_update + operationId: api_v2_assets_data_validation_status_partial_update description: | - ## TBC Supplement update + ## Update the validation of a submission + + The validation status of the submission can be updated. The `validation_status.uid` should be a `string`, and it must be one of the following values: + + - `validation_status_approved` + - `validation_status_not_approved` + - `validation_status_on_hold` parameters: - in: path name: id @@ -2341,7 +2307,7 @@ paths: description: ID of the data (when applicable) required: true - in: path - name: pk + name: submission_id_or_root_uuid schema: type: string description: Submission identifier @@ -2358,7 +2324,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchedDataSupplementPayload' + $ref: '#/components/schemas/PatchedDataValidationStatusUpdatePayload' security: - BasicAuth: [] - TokenAuth: [] @@ -2367,30 +2333,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DataSupplementResponse' + $ref: '#/components/schemas/DataValidationStatusUpdateResponse' description: null - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorDetail' - examples: - NotAuthenticated: - value: - detail: Authentication credentials were not provided. - summary: Not authenticated - description: '' - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorDetail' - examples: - AccessDenied: - value: - detail: You do not have permission to perform this action. - summary: Access Denied - description: '' '404': content: application/json: @@ -2402,25 +2346,10 @@ paths: detail: Not found. summary: Not Found description: '' - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorObject' - examples: - BadRequest: - value: - detail: - field_name: - - Error message - summary: Bad request - description: '' - /api/v2/assets/{uid_asset}/data/{id}/validation_status/: - get: - operationId: api_v2_assets_data_validation_status_retrieve + delete: + operationId: api_v2_assets_data_validation_status_destroy description: | - ## Get validation statuses - Retrieves the validation status of a submission. + ## Delete validation status parameters: - in: path name: id @@ -2440,12 +2369,8 @@ paths: - BasicAuth: [] - TokenAuth: [] responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DataValidationStatusUpdateResponse' - description: null + '204': + description: No response body '404': content: application/json: @@ -2457,28 +2382,16 @@ paths: detail: Not found. summary: Not Found description: '' - patch: - operationId: api_v2_assets_data_validation_status_partial_update + /api/v2/assets/{uid_asset}/data/{root_uuid}/supplement/: + get: + operationId: api_v2_assets_data_supplement_retrieve description: | - ## Update the validation of a submission - - The validation status of the submission can be updated. The `validation_status.uid` should be a `string`, and it must be one of the following values: - - - `validation_status_approved` - - `validation_status_not_approved` - - `validation_status_on_hold` + ## TBC Supplement retrieve parameters: - in: path - name: id - schema: - type: integer - description: ID of the data (when applicable) - required: true - - in: path - name: submission_id_or_root_uuid + name: root_uuid schema: type: string - description: Submission identifier required: true - in: path name: uid_asset @@ -2488,11 +2401,6 @@ paths: required: true tags: - Survey data - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchedDataValidationStatusUpdatePayload' security: - BasicAuth: [] - TokenAuth: [] @@ -2501,8 +2409,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DataValidationStatusUpdateResponse' + $ref: '#/components/schemas/DataSupplementResponse' description: null + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotAuthenticated: + value: + detail: Authentication credentials were not provided. + summary: Not authenticated + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + AccessDenied: + value: + detail: You do not have permission to perform this action. + summary: Access Denied + description: '' '404': content: application/json: @@ -2514,16 +2444,28 @@ paths: detail: Not found. summary: Not Found description: '' - delete: - operationId: api_v2_assets_data_validation_status_destroy + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' + patch: + operationId: api_v2_assets_data_supplement_partial_update description: | - ## Delete validation status + ## TBC Supplement update parameters: - in: path - name: id + name: root_uuid schema: - type: integer - description: ID of the data + type: string required: true - in: path name: uid_asset @@ -2533,12 +2475,43 @@ paths: required: true tags: - Survey data + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchedDataSupplementPayload' security: - BasicAuth: [] - TokenAuth: [] responses: - '204': - description: No response body + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DataSupplementResponse' + description: null + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + NotAuthenticated: + value: + detail: Authentication credentials were not provided. + summary: Not authenticated + description: '' + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDetail' + examples: + AccessDenied: + value: + detail: You do not have permission to perform this action. + summary: Access Denied + description: '' '404': content: application/json: @@ -2550,6 +2523,19 @@ paths: detail: Not found. summary: Not Found description: '' + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorObject' + examples: + BadRequest: + value: + detail: + field_name: + - Error message + summary: Bad request + description: '' /api/v2/assets/{uid_asset}/data/{uid_data}/attachments/: get: operationId: api_v2_assets_data_attachments_list From 2d0f13e002e8171b2f07d47278250f581ffdc00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 10:39:05 -0500 Subject: [PATCH 06/33] style: linter --- kpi/deployment_backends/openrosa_backend.py | 2 +- kpi/urls/router_api_v2.py | 2 +- kpi/views/v2/data.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/kpi/deployment_backends/openrosa_backend.py b/kpi/deployment_backends/openrosa_backend.py index 5262b128f4..135508407f 100644 --- a/kpi/deployment_backends/openrosa_backend.py +++ b/kpi/deployment_backends/openrosa_backend.py @@ -21,6 +21,7 @@ from django.utils import timezone from django.utils.translation import gettext_lazy as t from django_redis import get_redis_connection +from pyxform.builder import create_survey_from_xls from rest_framework import exceptions, status from kobo.apps.data_collectors.utils import ( @@ -79,7 +80,6 @@ from kpi.utils.mongo_helper import MongoHelper from kpi.utils.object_permission import get_anonymous_user, get_database_user from kpi.utils.xml import fromstring_preserve_root_xmlns, xml_tostring -from pyxform.builder import create_survey_from_xls from ..exceptions import AttachmentUidMismatchException, BadFormatException from .base_backend import BaseDeploymentBackend from .kc_access.utils import kc_transaction_atomic diff --git a/kpi/urls/router_api_v2.py b/kpi/urls/router_api_v2.py index c3c252eb7c..7b28afa78c 100644 --- a/kpi/urls/router_api_v2.py +++ b/kpi/urls/router_api_v2.py @@ -17,8 +17,8 @@ from kobo.apps.subsequences.views import QuestionAdvancedFeatureViewSet from kobo.apps.user_reports.views import UserReportsViewSet from kpi.constants import API_NAMESPACES -from kpi.renderers import BasicHTMLRenderer from kpi.permissions import AdvancedSubmissionPermission +from kpi.renderers import BasicHTMLRenderer from kpi.views.v2.asset import AssetViewSet from kpi.views.v2.asset_counts import AssetCountsViewSet from kpi.views.v2.asset_export_settings import AssetExportSettingsViewSet diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index 1d82a773cb..8837871e0a 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -48,7 +48,6 @@ from kpi.models import Asset from kpi.paginators import DataPagination from kpi.permissions import ( - AdvancedSubmissionPermission, DuplicateSubmissionPermission, EditLinkSubmissionPermission, SubmissionPermission, From 01632e4f866fa1fd14c22531c78d3022f8d11a1f Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Wed, 10 Dec 2025 10:59:53 -0500 Subject: [PATCH 07/33] add parameter for root_uuid --- kpi/views/v2/data.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index 8837871e0a..5bc71ee3f2 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -498,6 +498,13 @@ def retrieve(self, request, pk, *args, **kwargs): location=OpenApiParameter.PATH, exclude=True, ), + OpenApiParameter( + name='root_uuid', + type=str, + location=OpenApiParameter.PATH, + required=True, + description='Root UUID of the submission', + ), ], ) @extend_schema( @@ -512,6 +519,13 @@ def retrieve(self, request, pk, *args, **kwargs): location=OpenApiParameter.PATH, exclude=True, ), + OpenApiParameter( + name='root_uuid', + type=str, + location=OpenApiParameter.PATH, + required=True, + description='Root UUID of the submission', + ), ], ) def supplement(self, request, root_uuid, *args, **kwargs): From 7689302355e7a8365056cc5581aeee482a84e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 11:02:40 -0500 Subject: [PATCH 08/33] docs(openAPI): update schemas --- static/openapi/schema_v2.json | 2 ++ static/openapi/schema_v2.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index e993aa2f52..fa20737dc2 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -3177,6 +3177,7 @@ "schema": { "type": "string" }, + "description": "Root UUID of the submission", "required": true }, { @@ -3299,6 +3300,7 @@ "schema": { "type": "string" }, + "description": "Root UUID of the submission", "required": true }, { diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index b797adc00c..91f9db65d3 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -2392,6 +2392,7 @@ paths: name: root_uuid schema: type: string + description: Root UUID of the submission required: true - in: path name: uid_asset @@ -2466,6 +2467,7 @@ paths: name: root_uuid schema: type: string + description: Root UUID of the submission required: true - in: path name: uid_asset From bc2192ea9ea50394f5c2e04bd420d2eb39b95ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 15:26:49 -0500 Subject: [PATCH 09/33] fix: add `qual` result schema to OpenAPI response schema --- kpi/schema_extensions/v2/data/extensions.py | 206 +++++++++++++++++++- 1 file changed, 201 insertions(+), 5 deletions(-) diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 86026f6af8..982d0c3140 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -139,11 +139,15 @@ def map_serializer(self, auto_schema, direction): class DataSupplementResponseExtension(OpenApiSerializerExtension): target_class = 'kpi.schema_extensions.v2.data.serializers.DataSupplementResponse' + DATETIME = build_basic_type(OpenApiTypes.DATETIME) + UUID_STR = {'type': 'string', 'format': 'uuid'} + def map_serializer(self, auto_schema, direction): + # TODO move to class constants # Reusable building blocks to reduce redundancy LANG_STR = GENERIC_STRING_SCHEMA VALUE_STR = GENERIC_STRING_SCHEMA - DATETIME = build_basic_type(OpenApiTypes.DATETIME) + # DATETIME = build_basic_type(OpenApiTypes.DATETIME) # Constraint helper: "language" and "value" must be both present or both absent PAIR_LANG_VALUE_BOTH_OR_NONE = { @@ -160,6 +164,7 @@ def map_serializer(self, auto_schema, direction): ] } + # TODO move action schemas logic to their own methods. # Shared properties for objects that carry a language/value pair VALUE_PROPS = { 'language': LANG_STR, @@ -173,7 +178,7 @@ def map_serializer(self, auto_schema, direction): additionalProperties=False, properties={ **VALUE_PROPS, - '_dateCreated': DATETIME, # Always required for a revision entry + '_dateCreated': self.DATETIME, # Always required for a revision entry }, required=['_dateCreated'], **PAIR_LANG_VALUE_BOTH_OR_NONE, @@ -187,8 +192,8 @@ def map_serializer(self, auto_schema, direction): additionalProperties=False, properties={ **VALUE_PROPS, # Coupled via PAIR_LANG_VALUE_BOTH_OR_NONE - '_dateCreated': DATETIME, # Always required - '_dateModified': DATETIME, # Always required + '_dateCreated': self.DATETIME, # Always required + '_dateModified': self.DATETIME, # Always required 'revisions': build_array_type( schema=REVISION_ITEM, ), @@ -205,7 +210,7 @@ def map_serializer(self, auto_schema, direction): additionalProperties=False, properties={ **VALUE_PROPS, # Coupled via PAIR_LANG_VALUE_BOTH_OR_NONE - '_dateCreated': DATETIME, # Always required + '_dateCreated': self.DATETIME, # Always required '_revisions': build_array_type( schema=REVISION_ITEM, ), @@ -230,16 +235,207 @@ def map_serializer(self, auto_schema, direction): properties={ 'manual_transcription': MANUAL_TRANSCRIPTION, 'manual_translation': MANUAL_TRANSLATION, + 'qual': self._get_qual_schema(), }, # At least one of "manual_transcription" or "manual_translation" must be present anyOf=[ {'required': ['manual_transcription']}, {'required': ['manual_translation']}, + {'required': ['qual']}, ], ), } ) + @classmethod + def _get_qual_schema(cls): + """ + Build the OpenAPI schema for the `qual` field. + """ + + # --------------------------------------------------------------------- + # qualCommon + # --------------------------------------------------------------------- + qual_common = build_object_type( + additionalProperties=False, + properties={ + 'uuid': cls.UUID_STR, + # "value" is intentionally untyped here: it will be refined + # by the specific qual* schemas below. + 'value': {}, + }, + required=['uuid', 'value'], + ) + + # --------------------------------------------------------------------- + # qualInteger + # properties: { value: integer | null } + # --------------------------------------------------------------------- + qual_integer = { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'integer', + 'nullable': True, + }, + }, + } + + # --------------------------------------------------------------------- + # qualSelectMultiple + # properties: { value: ['507129be-2aee-4fb9-8ddd-ac766ba35f46', ...] } + # --------------------------------------------------------------------- + qual_select_multiple = { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'array', + 'items': cls.UUID_STR, + }, + }, + } + + # --------------------------------------------------------------------- + # qualSelectOne + # properties: { value: '0bbdb149-c85c-46c2-ad31-583377c423da' } + # --------------------------------------------------------------------- + qual_select_one = { + 'type': 'object', + 'properties': { + 'value': cls.UUID_STR, + }, + } + + # --------------------------------------------------------------------- + # qualTags + # properties: { value: [string, ...] } + # --------------------------------------------------------------------- + qual_tags = { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'array', + 'items': { + 'type': 'string', + }, + }, + }, + } + + # --------------------------------------------------------------------- + # qualText + # properties: { value: string } + # --------------------------------------------------------------------- + qual_text = { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'string', + }, + }, + } + + # --------------------------------------------------------------------- + # dataSchema + # oneOf: + # - allOf: [qualCommon, qualInteger] + # - allOf: [qualCommon, qualSelectMultiple] + # - allOf: [qualCommon, qualSelectOne] + # - allOf: [qualCommon, qualTags] + # - allOf: [qualCommon, qualText] + # + # We *do not* enforce "uuid: const " here + # because in your use case UUIDs are dynamic (1..n). + # --------------------------------------------------------------------- + data_schema = { + 'oneOf': [ + {'allOf': [qual_common, qual_integer]}, + {'allOf': [qual_common, qual_select_multiple]}, + {'allOf': [qual_common, qual_select_one]}, + {'allOf': [qual_common, qual_tags]}, + {'allOf': [qual_common, qual_text]}, + ] + } + + # --------------------------------------------------------------------- + # dataActionKey._versions[] item + # + # $defs.dataActionKey._versions.items: + # - additionalProperties: false + # - properties: + # _data: dataSchema + # _dateAccepted: dateTime + # _dateCreated: dateTime + # _uuid: uuid + # - required: [_data, _dateCreated, _uuid] + # --------------------------------------------------------------------- + data_action_version = build_object_type( + additionalProperties=False, + properties={ + '_data': data_schema, + '_dateAccepted': cls.DATETIME, + '_dateCreated': cls.DATETIME, + '_uuid': cls.UUID_STR, + }, + required=['_data', '_dateCreated', '_uuid'], + ) + + # --------------------------------------------------------------------- + # dataActionKey + # + # $defs.dataActionKey: + # - additionalProperties: false + # - properties: + # _dateCreated: dateTime + # _dateModified: dateTime + # _versions: [data_action_version, ...] (minItems=1) + # - required: [_dateCreated, _dateModified] + # --------------------------------------------------------------------- + data_action_key = build_object_type( + additionalProperties=False, + properties={ + '_dateCreated': cls.DATETIME, + '_dateModified': cls.DATETIME, + '_versions': build_array_type( + schema=data_action_version, + min_length=1, + ), + }, + required=['_dateCreated', '_dateModified', '_versions'], + ) + + # --------------------------------------------------------------------- + # Root "qual" object + # + # In the original JSON Schema, the top-level "properties" were: + # { + # "": { $ref: '#/$defs/dataActionKey' }, + # ... + # } + # and you clarified that ALL those keys are UUIDs and that there can + # be from 1 to N of them. + # + # In OpenAPI, we model that as: + # - an object + # - whose keys are dynamic + # - whose values follow the dataActionKey schema + # + # So we use `additionalProperties` to represent + # "map". + # + # Optionally, `x-patternProperties` gives a hint that keys are UUIDs. + # --------------------------------------------------------------------- + qual_root = build_object_type( + additionalProperties=data_action_key, + # No fixed properties since keys are dynamic UUIDs + patternProperties={ + # simple UUID-like regex; you can tighten it if desired + '^[0-9a-fA-F-]{36}$': data_action_key, + } + ) + + return qual_root + class DataValidationPayloadFieldExtension(OpenApiSerializerFieldExtension): target_class = 'kpi.schema_extensions.v2.data.fields.DataValidationPayloadField' From 96b31aae8b49756e5e436cc9fe9e800d82483a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 16:41:54 -0500 Subject: [PATCH 10/33] fix(openAPI): add schema and example for qualitative analysis for supplement endpoint --- kpi/schema_extensions/v2/data/extensions.py | 108 +++++++++++++++++++- 1 file changed, 105 insertions(+), 3 deletions(-) diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 982d0c3140..575ea3ceaf 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -97,6 +97,9 @@ def map_serializer_field(self, auto_schema, direction): class DataSupplementPayloadExtension(OpenApiSerializerExtension): target_class = 'kpi.schema_extensions.v2.data.serializers.DataSupplementPayload' + DATETIME = build_basic_type(OpenApiTypes.DATETIME) + UUID_STR = {'type': 'string', 'format': 'uuid'} + def map_serializer(self, auto_schema, direction): return build_object_type( properties={ @@ -120,21 +123,120 @@ def map_serializer(self, auto_schema, direction): additionalProperties=False, properties={ 'language': GENERIC_STRING_SCHEMA, - 'translation': GENERIC_STRING_SCHEMA, + 'value': GENERIC_STRING_SCHEMA, }, required=['language', 'value'], ), min_length=1, - ) + ), + 'qual': self._get_qual_schema() }, anyOf=[ {'required': ['manual_transcription']}, {'required': ['manual_translation']}, + {'required': ['qual']}, ], - ), + ) } ) + @classmethod + def _get_qual_schema(cls): + qual_defs = { + 'qualCommon': { + 'type': 'object', + 'additionalProperties': False, + 'properties': { + 'uuid': cls.UUID_STR, + 'value': {}, + }, + 'required': ['uuid', 'value'], + }, + 'qualInteger': { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'integer', + 'nullable': True, + }, + }, + }, + 'qualText': { + 'type': 'object', + 'properties': { + 'value': {'type': 'string'}, + }, + }, + 'qualSelectOne': { + 'type': 'object', + 'properties': { + 'value': cls.UUID_STR, + }, + }, + 'qualSelectMultiple': { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'array', + 'items': cls.UUID_STR, + }, + }, + }, + } + + return { + 'oneOf': [ + { + 'allOf': [ + qual_defs['qualCommon'], + qual_defs['qualInteger'], + { + 'type': 'object', + 'properties': { + 'uuid': cls.UUID_STR, + }, + }, + ], + }, + { + 'allOf': [ + qual_defs['qualCommon'], + qual_defs['qualText'], + { + 'type': 'object', + 'properties': { + 'uuid': cls.UUID_STR, + }, + }, + ], + }, + { + 'allOf': [ + qual_defs['qualCommon'], + qual_defs['qualSelectOne'], + { + 'type': 'object', + 'properties': { + 'uuid': cls.UUID_STR, + }, + }, + ], + }, + { + 'allOf': [ + qual_defs['qualCommon'], + qual_defs['qualSelectMultiple'], + { + 'type': 'object', + 'properties': { + 'uuid': cls.UUID_STR, + }, + }, + ], + }, + ], + } + class DataSupplementResponseExtension(OpenApiSerializerExtension): target_class = 'kpi.schema_extensions.v2.data.serializers.DataSupplementResponse' From 12d104b3b76d76f4e36cafb14deda4e40dcf778b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Wed, 10 Dec 2025 17:03:36 -0500 Subject: [PATCH 11/33] fix(openAPI): generate schemas and Orval helpers --- ...sponseQuestionNameXpathQualVersionsItem.ts | 19 + ...seQuestionNameXpathQualVersionsItemData.ts | 23 + ...stionNameXpathQualVersionsItemDataOneOf.ts | 17 + ...NameXpathQualVersionsItemDataOneOfAllOf.ts | 16 + ...eXpathQualVersionsItemDataOneOfAllOfTwo.ts | 16 + ...nNameXpathQualVersionsItemDataOneOfFour.ts | 17 + ...XpathQualVersionsItemDataOneOfFourAllOf.ts | 16 + ...thQualVersionsItemDataOneOfFourAllOfTwo.ts | 15 + ...eXpathQualVersionsItemDataOneOfOnethree.ts | 17 + ...hQualVersionsItemDataOneOfOnethreeAllOf.ts | 16 + ...alVersionsItemDataOneOfOnethreeAllOfTwo.ts | 15 + ...meXpathQualVersionsItemDataOneOfOnezero.ts | 17 + ...thQualVersionsItemDataOneOfOnezeroAllOf.ts | 16 + ...ualVersionsItemDataOneOfOnezeroAllOfTwo.ts | 15 + ...NameXpathQualVersionsItemDataOneOfSeven.ts | 17 + ...pathQualVersionsItemDataOneOfSevenAllOf.ts | 16 + ...hQualVersionsItemDataOneOfSevenAllOfTwo.ts | 15 + ...dataSupplementResponseQuestionNameXpath.ts | 9 + ...SupplementResponseQuestionNameXpathQual.ts | 21 + ...dDataSupplementPayloadQuestionNameXpath.ts | 9 + ...dQuestionNameXpathManualTranslationItem.ts | 2 +- ...aSupplementPayloadQuestionNameXpathQual.ts | 21 + ...lementPayloadQuestionNameXpathQualOneOf.ts | 19 + ...tPayloadQuestionNameXpathQualOneOfAllOf.ts | 16 + ...oadQuestionNameXpathQualOneOfAllOfThree.ts | 15 + ...yloadQuestionNameXpathQualOneOfAllOfTwo.ts | 16 + ...ntPayloadQuestionNameXpathQualOneOfFive.ts | 19 + ...loadQuestionNameXpathQualOneOfFiveAllOf.ts | 16 + ...uestionNameXpathQualOneOfFiveAllOfThree.ts | 15 + ...dQuestionNameXpathQualOneOfFiveAllOfTwo.ts | 15 + ...ntPayloadQuestionNameXpathQualOneOfNine.ts | 19 + ...loadQuestionNameXpathQualOneOfNineAllOf.ts | 16 + ...uestionNameXpathQualOneOfNineAllOfThree.ts | 15 + ...dQuestionNameXpathQualOneOfNineAllOfTwo.ts | 15 + ...yloadQuestionNameXpathQualOneOfOnethree.ts | 19 + ...QuestionNameXpathQualOneOfOnethreeAllOf.ts | 16 + ...ionNameXpathQualOneOfOnethreeAllOfThree.ts | 15 + ...stionNameXpathQualOneOfOnethreeAllOfTwo.ts | 15 + kobo/apps/subsequences/actions/qual.py | 32 +- kobo/apps/subsequences/tests/test_qual.py | 160 +++-- kpi/schema_extensions/v2/data/extensions.py | 6 +- static/openapi/schema_v2.json | 559 +++++++++++++++++- static/openapi/schema_v2.yaml | 332 ++++++++++- 43 files changed, 1587 insertions(+), 108 deletions(-) create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts new file mode 100644 index 0000000000..02dad3783d --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemData } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemData' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItem = { + _data: _DataSupplementResponseQuestionNameXpathQualVersionsItemData + _dateAccepted?: string + _dateCreated: string + _uuid: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts new file mode 100644 index 0000000000..68884c151b --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemData = + | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf + | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour + | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven + | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero + | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts new file mode 100644 index 0000000000..5d297d5f0d --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf = + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf & + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts new file mode 100644 index 0000000000..5a1c2ceb27 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts new file mode 100644 index 0000000000..e48b232843 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo = { + /** @nullable */ + value?: number | null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts new file mode 100644 index 0000000000..f506451ce8 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour = + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf & + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts new file mode 100644 index 0000000000..5c5922adc1 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts new file mode 100644 index 0000000000..ff04ea0ddd --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts new file mode 100644 index 0000000000..c8e3c9ebba --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree = + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf & + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts new file mode 100644 index 0000000000..dcab534fd7 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts new file mode 100644 index 0000000000..a851dc0131 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts new file mode 100644 index 0000000000..6a3618a5f8 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero = + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf & + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts new file mode 100644 index 0000000000..ded1478afb --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts new file mode 100644 index 0000000000..a8d6007494 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts new file mode 100644 index 0000000000..268da9732d --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf' +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo' + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven = + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf & + _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts new file mode 100644 index 0000000000..51b84b29f9 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts new file mode 100644 index 0000000000..59ee91696c --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts index 168e4cfd7d..3f43f47fb6 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts @@ -11,15 +11,24 @@ The endpoints are grouped by area of intended use. Each category contains relate */ import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' import type { DataSupplementResponseQuestionNameXpathManualTranslationItem } from './dataSupplementResponseQuestionNameXpathManualTranslationItem' +import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual' export type DataSupplementResponseQuestionNameXpath = | (unknown & { manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription /** @minLength 1 */ manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] + qual?: DataSupplementResponseQuestionNameXpathQual }) | (unknown & { manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription /** @minLength 1 */ manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] + qual?: DataSupplementResponseQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] + qual?: DataSupplementResponseQuestionNameXpathQual }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts new file mode 100644 index 0000000000..957d0c731e --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathQualVersionsItem } from './_dataSupplementResponseQuestionNameXpathQualVersionsItem' + +export type DataSupplementResponseQuestionNameXpathQual = { + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathQualVersionsItem[] + } +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts index 63ee3b6e2c..e13c17a094 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts @@ -11,15 +11,24 @@ The endpoints are grouped by area of intended use. Each category contains relate */ import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' +import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual' export type PatchedDataSupplementPayloadQuestionNameXpath = | (unknown & { manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription /** @minLength 1 */ manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual }) | (unknown & { manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription /** @minLength 1 */ manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual }) diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts index 3cfa0d78a6..981d0bad07 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts @@ -12,5 +12,5 @@ The endpoints are grouped by area of intended use. Each category contains relate export type PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem = { language: string - translation?: string + value: string } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts new file mode 100644 index 0000000000..942e553fea --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOf' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree' + +export type PatchedDataSupplementPayloadQuestionNameXpathQual = + | PatchedDataSupplementPayloadQuestionNameXpathQualOneOf + | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive + | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine + | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts new file mode 100644 index 0000000000..9b3ec75cc8 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo' + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOf = + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts new file mode 100644 index 0000000000..5675de99ae --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts new file mode 100644 index 0000000000..d8f6e7a924 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts new file mode 100644 index 0000000000..f2735f2424 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo = { + /** @nullable */ + value?: number | null +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts new file mode 100644 index 0000000000..48e25c2e3e --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo' + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive = + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts new file mode 100644 index 0000000000..0a84a6c275 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts new file mode 100644 index 0000000000..7b9af964d3 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts new file mode 100644 index 0000000000..3dbb26dbdc --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts new file mode 100644 index 0000000000..2367ca3afd --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo' + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine = + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts new file mode 100644 index 0000000000..ad0b7ce2e1 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts new file mode 100644 index 0000000000..00388e8406 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts new file mode 100644 index 0000000000..4670ed1017 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts new file mode 100644 index 0000000000..45d1ebb8eb --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree' +import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo' + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree = + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo & + PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts new file mode 100644 index 0000000000..64f3e8b7eb --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts new file mode 100644 index 0000000000..c4f4cac6c4 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts new file mode 100644 index 0000000000..b2c42d5d9b --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo = { + value?: string[] +} diff --git a/kobo/apps/subsequences/actions/qual.py b/kobo/apps/subsequences/actions/qual.py index 5c4c0d8edb..d8e569a2aa 100644 --- a/kobo/apps/subsequences/actions/qual.py +++ b/kobo/apps/subsequences/actions/qual.py @@ -283,9 +283,7 @@ def overlaps_other_actions(self) -> bool: """ return False - def transform_data_for_output( - self, action_data: dict - ) -> dict[str, Any]: + def transform_data_for_output(self, action_data: dict) -> dict[str, Any]: qual_questions_by_uuid = {q['uuid']: q for q in self.params} @@ -328,7 +326,7 @@ def transform_data_for_output( choice = choices_by_uuid[qual_uuid].get(value) output_value = { 'uuid': value, - 'labels': choice.get('labels') if choice else {} + 'labels': choice.get('labels') if choice else {}, } else: output_value = None @@ -337,21 +335,25 @@ def transform_data_for_output( output_value = [] for choice_uuid in value: choice = choices_by_uuid[qual_uuid].get(choice_uuid) - output_value.append({ - 'uuid': choice_uuid, - 'labels': choice.get('labels') if choice else {} - }) + output_value.append( + { + 'uuid': choice_uuid, + 'labels': choice.get('labels') if choice else {}, + } + ) else: output_value = [] else: # Unchanged value for other types (integer, text, tags) output_value = value - results_list.append({ - 'val': output_value, - 'type': qual_question['type'], - 'uuid': qual_uuid, - 'xpath': self.source_question_xpath, - 'labels': qual_question.get('labels', {}), - }) + results_list.append( + { + 'val': output_value, + 'type': qual_question['type'], + 'uuid': qual_uuid, + 'xpath': self.source_question_xpath, + 'labels': qual_question.get('labels', {}), + } + ) return {'qual': results_list} diff --git a/kobo/apps/subsequences/tests/test_qual.py b/kobo/apps/subsequences/tests/test_qual.py index 74e7e9a48e..08a57acfab 100644 --- a/kobo/apps/subsequences/tests/test_qual.py +++ b/kobo/apps/subsequences/tests/test_qual.py @@ -1,11 +1,11 @@ -from copy import deepcopy -from unittest import mock, TestCase import uuid +from copy import deepcopy +from unittest import TestCase, mock -from freezegun import freeze_time import dateutil import jsonschema import pytest +from freezegun import freeze_time from ..actions.qual import QualAction from .constants import EMPTY_SUBMISSION @@ -42,7 +42,7 @@ class Fix: { 'type': 'qualSelectMultiple', 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', - 'labels': {'_default': "What themes were present in the story?"}, + 'labels': {'_default': 'What themes were present in the story?'}, 'choices': [ { 'uuid': '2e24e6b4-bc3b-4e8e-b0cd-d8d3b9ca15b6', @@ -546,7 +546,7 @@ def test_param_validation(): { 'type': 'qualSelectMultiple', 'uuid': '2e30bec7-4843-43c7-98bc-13114af230c5', - 'labels': {'_default': "What themes were present in the story?"}, + 'labels': {'_default': 'What themes were present in the story?'}, # Oops, no choices! } ] @@ -622,7 +622,7 @@ def test_result_content(): assert filled_uuids == empty_uuids datetime_iter = iter( - (dateutil.parser.parse(dt) for dt in Fix.result_mock_timestamp_sequence) + dateutil.parser.parse(dt) for dt in Fix.result_mock_timestamp_sequence ) uuid_list = [uuid.UUID(u) for u in Fix.result_mock_uuid_sequence] @@ -664,17 +664,17 @@ class TestQualActionMethods(TestCase): 'choices': [ { 'uuid': 'choice-high-uuid', - 'labels': {'_default': 'High', 'fr': 'Élevé', 'es': 'Alto'} + 'labels': {'_default': 'High', 'fr': 'Élevé', 'es': 'Alto'}, }, { 'uuid': 'choice-medium-uuid', - 'labels': {'_default': 'Medium', 'fr': 'Moyen', 'es': 'Medio'} + 'labels': {'_default': 'Medium', 'fr': 'Moyen', 'es': 'Medio'}, }, { 'uuid': 'choice-low-uuid', - 'labels': {'_default': 'Low', 'fr': 'Bas', 'es': 'Bajo'} + 'labels': {'_default': 'Low', 'fr': 'Bas', 'es': 'Bajo'}, }, - ] + ], }, { 'type': 'qualSelectMultiple', @@ -683,17 +683,14 @@ class TestQualActionMethods(TestCase): 'choices': [ { 'uuid': 'tag-shelter-uuid', - 'labels': {'_default': 'Shelter', 'ar': 'مأوى'} - }, - { - 'uuid': 'tag-food-uuid', - 'labels': {'_default': 'Food', 'ar': 'طعام'} + 'labels': {'_default': 'Shelter', 'ar': 'مأوى'}, }, + {'uuid': 'tag-food-uuid', 'labels': {'_default': 'Food', 'ar': 'طعام'}}, { 'uuid': 'tag-medical-uuid', - 'labels': {'_default': 'Medical', 'ar': 'طبي'} + 'labels': {'_default': 'Medical', 'ar': 'طبي'}, }, - ] + ], }, ] @@ -749,7 +746,7 @@ def test_get_output_fields(self): assert high_choice['labels'] == { '_default': 'High', 'fr': 'Élevé', - 'es': 'Alto' + 'es': 'Alto', } # Test select multiple (with choices) @@ -761,13 +758,9 @@ def test_get_output_fields(self): # Verify multilingual choice labels shelter_choice = next( - c for c in select_multi_field['choices'] - if c['uuid'] == 'tag-shelter-uuid' + c for c in select_multi_field['choices'] if c['uuid'] == 'tag-shelter-uuid' ) - assert shelter_choice['labels'] == { - '_default': 'Shelter', - 'ar': 'مأوى' - } + assert shelter_choice['labels'] == {'_default': 'Shelter', 'ar': 'مأوى'} def test_transform_data_for_output_all_question_types(self): """ @@ -784,57 +777,65 @@ def test_transform_data_for_output_all_question_types(self): action_data = { # Integer question 'qual-integer-uuid': { - '_versions': [{ - '_data': {'uuid': 'qual-integer-uuid', 'value': 5}, - '_dateCreated': '2025-11-24T10:00:00Z', - '_dateAccepted': '2025-11-24T10:00:00Z', - '_uuid': 'v1' - }], + '_versions': [ + { + '_data': {'uuid': 'qual-integer-uuid', 'value': 5}, + '_dateCreated': '2025-11-24T10:00:00Z', + '_dateAccepted': '2025-11-24T10:00:00Z', + '_uuid': 'v1', + } + ], '_dateCreated': '2025-11-24T10:00:00Z', - '_dateModified': '2025-11-24T10:00:00Z' + '_dateModified': '2025-11-24T10:00:00Z', }, # Text question 'qual-text-uuid': { - '_versions': [{ - '_data': { - 'uuid': 'qual-text-uuid', - 'value': 'Family needs immediate shelter and medical care' - }, - '_dateCreated': '2025-11-24T10:05:00Z', - '_dateAccepted': '2025-11-24T10:05:00Z', - '_uuid': 'v2' - }], + '_versions': [ + { + '_data': { + 'uuid': 'qual-text-uuid', + 'value': 'Family needs immediate shelter and medical care', + }, + '_dateCreated': '2025-11-24T10:05:00Z', + '_dateAccepted': '2025-11-24T10:05:00Z', + '_uuid': 'v2', + } + ], '_dateCreated': '2025-11-24T10:05:00Z', - '_dateModified': '2025-11-24T10:05:00Z' + '_dateModified': '2025-11-24T10:05:00Z', }, # Select one question 'qual-select-one-uuid': { - '_versions': [{ - '_data': { - 'uuid': 'qual-select-one-uuid', - 'value': 'choice-high-uuid' - }, - '_dateCreated': '2025-11-24T10:10:00Z', - '_dateAccepted': '2025-11-24T10:10:00Z', - '_uuid': 'v3' - }], + '_versions': [ + { + '_data': { + 'uuid': 'qual-select-one-uuid', + 'value': 'choice-high-uuid', + }, + '_dateCreated': '2025-11-24T10:10:00Z', + '_dateAccepted': '2025-11-24T10:10:00Z', + '_uuid': 'v3', + } + ], '_dateCreated': '2025-11-24T10:10:00Z', - '_dateModified': '2025-11-24T10:10:00Z' + '_dateModified': '2025-11-24T10:10:00Z', }, # Select multiple question 'qual-select-multi-uuid': { - '_versions': [{ - '_data': { - 'uuid': 'qual-select-multi-uuid', - 'value': ['tag-shelter-uuid', 'tag-medical-uuid'] - }, - '_dateCreated': '2025-11-24T10:15:00Z', - '_dateAccepted': '2025-11-24T10:15:00Z', - '_uuid': 'v4' - }], + '_versions': [ + { + '_data': { + 'uuid': 'qual-select-multi-uuid', + 'value': ['tag-shelter-uuid', 'tag-medical-uuid'], + }, + '_dateCreated': '2025-11-24T10:15:00Z', + '_dateAccepted': '2025-11-24T10:15:00Z', + '_uuid': 'v4', + } + ], '_dateCreated': '2025-11-24T10:15:00Z', - '_dateModified': '2025-11-24T10:15:00Z' - } + '_dateModified': '2025-11-24T10:15:00Z', + }, } output = action.transform_data_for_output(action_data) @@ -870,7 +871,7 @@ def find_item(q_uuid): assert select_one_value['labels'] == { '_default': 'High', 'fr': 'Élevé', - 'es': 'Alto' + 'es': 'Alto', } # Test select multiple - array of UUIDs transformed to array of objects @@ -884,19 +885,13 @@ def find_item(q_uuid): shelter_item = next( i for i in select_multi_value if i['uuid'] == 'tag-shelter-uuid' ) - assert shelter_item['labels'] == { - '_default': 'Shelter', - 'ar': 'مأوى' - } + assert shelter_item['labels'] == {'_default': 'Shelter', 'ar': 'مأوى'} # Verify second choice medical_item = next( i for i in select_multi_value if i['uuid'] == 'tag-medical-uuid' ) - assert medical_item['labels'] == { - '_default': 'Medical', - 'ar': 'طبي' - } + assert medical_item['labels'] == {'_default': 'Medical', 'ar': 'طبي'} def test_transform_data_prefers_newest_date_accepted_version(self): """ @@ -910,35 +905,26 @@ def test_transform_data_prefers_newest_date_accepted_version(self): 'qual-text-uuid': { '_versions': [ { - '_data': { - 'uuid': 'qual-text-uuid', - 'value': 'Initial note' - }, + '_data': {'uuid': 'qual-text-uuid', 'value': 'Initial note'}, '_dateCreated': '2025-11-24T09:00:00Z', '_dateAccepted': '2025-11-24T09:00:00Z', - '_uuid': 'v1' + '_uuid': 'v1', }, { - '_data': { - 'uuid': 'qual-text-uuid', - 'value': 'Revised note' - }, + '_data': {'uuid': 'qual-text-uuid', 'value': 'Revised note'}, '_dateCreated': '2025-11-24T10:00:00Z', '_dateAccepted': '2025-11-24T10:00:00Z', - '_uuid': 'v2' + '_uuid': 'v2', }, { - '_data': { - 'uuid': 'qual-text-uuid', - 'value': 'Final note' - }, + '_data': {'uuid': 'qual-text-uuid', 'value': 'Final note'}, '_dateCreated': '2025-11-24T11:00:00Z', '_dateAccepted': '2025-11-24T09:30:00Z', - '_uuid': 'v3' + '_uuid': 'v3', }, ], '_dateCreated': '2025-11-24T09:00:00Z', - '_dateModified': '2025-11-24T11:00:00Z' + '_dateModified': '2025-11-24T11:00:00Z', } } diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 575ea3ceaf..81a9016b1f 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -129,14 +129,14 @@ def map_serializer(self, auto_schema, direction): ), min_length=1, ), - 'qual': self._get_qual_schema() + 'qual': self._get_qual_schema(), }, anyOf=[ {'required': ['manual_transcription']}, {'required': ['manual_translation']}, {'required': ['qual']}, ], - ) + ), } ) @@ -533,7 +533,7 @@ def _get_qual_schema(cls): patternProperties={ # simple UUID-like regex; you can tighten it if desired '^[0-9a-fA-F-]{36}$': data_action_key, - } + }, ) return qual_root diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index fa20737dc2..6790b3968d 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -15338,6 +15338,399 @@ ] }, "minLength": 1 + }, + "qual": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_data": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + ] + } + ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateCreated", + "_uuid" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + }, + "patternProperties": { + "^[0-9a-fA-F-]{36}$": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_data": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + ] + } + ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateCreated", + "_uuid" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } + } } }, "additionalProperties": false, @@ -15351,6 +15744,11 @@ "required": [ "manual_translation" ] + }, + { + "required": [ + "qual" + ] } ] } @@ -19042,7 +19440,7 @@ "language": { "type": "string" }, - "translation": { + "value": { "type": "string" } }, @@ -19053,6 +19451,160 @@ ] }, "minLength": 1 + }, + "qual": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + } + ] } }, "additionalProperties": false, @@ -19066,6 +19618,11 @@ "required": [ "manual_translation" ] + }, + { + "required": [ + "qual" + ] } ] } diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 91f9db65d3..53cb7afdca 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -11124,12 +11124,253 @@ components: - required: - value minLength: 1 + qual: + type: object + additionalProperties: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _versions: + type: array + items: + type: object + properties: + _data: + oneOf: + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: integer + nullable: true + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + format: uuid + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: string + format: uuid + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: string + _dateAccepted: + type: string + format: date-time + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + additionalProperties: false + required: + - _data + - _dateCreated + - _uuid + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _versions + patternProperties: + ^[0-9a-fA-F-]{36}$: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _versions: + type: array + items: + type: object + properties: + _data: + oneOf: + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: integer + nullable: true + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + format: uuid + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: string + format: uuid + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + - allOf: + - type: object + properties: + uuid: + type: string + format: uuid + value: {} + additionalProperties: false + required: + - uuid + - value + - type: object + properties: + value: + type: string + _dateAccepted: + type: string + format: date-time + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + additionalProperties: false + required: + - _data + - _dateCreated + - _uuid + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _versions additionalProperties: false anyOf: - required: - manual_transcription - required: - manual_translation + - required: + - qual DataValidationStatusUpdateResponse: type: object properties: @@ -13796,19 +14037,108 @@ components: properties: language: type: string - translation: + value: type: string additionalProperties: false required: - language - value minLength: 1 + qual: + oneOf: + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: integer + nullable: true + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid additionalProperties: false anyOf: - required: - manual_transcription - required: - manual_translation + - required: + - qual PatchedDataValidationStatusUpdatePayload: type: object properties: From 992bbb77642ea5b339f8650df83935499083eac6 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Thu, 11 Dec 2025 10:43:41 -0500 Subject: [PATCH 12/33] add schema for NLP for supplement endpoint --- .../js/api/models/_dataResponseAttachments.ts | 18 +- ...tomatedGoogleTranscriptionVersionsItem.ts} | 19 +- ...athAutomatedGoogleTranslationDependency.ts | 15 + ...hAutomatedGoogleTranslationVersionsItem.ts | 19 + ...ameXpathManualTranscriptionVersionsItem.ts | 20 + ...onNameXpathManualTranslationDependency.ts} | 14 +- ...nNameXpathManualTranslationVersionsItem.ts | 19 + ...dataSupplementResponseQuestionNameXpath.ts | 58 ++- ...onNameXpathAutomatedGoogleTranscription.ts | 19 + ...tionNameXpathAutomatedGoogleTranslation.ts | 21 + ...nseQuestionNameXpathManualTranscription.ts | 23 +- ...onseQuestionNameXpathManualTranslation.ts} | 23 +- ...dDataSupplementPayloadQuestionNameXpath.ts | 68 +++- ...onNameXpathAutomatedGoogleTranscription.ts | 16 + ...NameXpathAutomatedGoogleTranslationItem.ts | 16 + kpi/schema_extensions/v2/data/extensions.py | 240 ++++++----- static/openapi/schema_v2.json | 381 +++++++++++------- static/openapi/schema_v2.yaml | 250 ++++++++---- 18 files changed, 829 insertions(+), 410 deletions(-) rename jsapp/js/api/models/{dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts => _dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts} (74%) create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts rename jsapp/js/api/models/{_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts => _dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts} (80%) create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts rename jsapp/js/api/models/{dataSupplementResponseQuestionNameXpathManualTranslationItem.ts => dataSupplementResponseQuestionNameXpathManualTranslation.ts} (64%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts diff --git a/jsapp/js/api/models/_dataResponseAttachments.ts b/jsapp/js/api/models/_dataResponseAttachments.ts index 00aa73039c..3dd9a2fd5a 100644 --- a/jsapp/js/api/models/_dataResponseAttachments.ts +++ b/jsapp/js/api/models/_dataResponseAttachments.ts @@ -11,12 +11,12 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataResponseAttachments = { - download_url?: string - download_large_url?: string - download_medium_url?: string - download_small_url?: string - mimetype?: string - filename?: string - uid?: string - question_xpath?: string -} + download_url?: string; + download_large_url?: string; + download_medium_url?: string; + download_small_url?: string; + mimetype?: string; + filename?: string; + uid?: string; + question_xpath?: string; +}; diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts similarity index 74% rename from jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts rename to jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts index 702a4506e7..6b66a481b5 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts @@ -10,14 +10,11 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem = - | (unknown & { - language?: string - value?: string - _dateCreated: string - }) - | (unknown & { - language?: string - value?: string - _dateCreated: string - }) +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem = { + _dateCreated: string; + _uuid: string; + language: string; + status?: string; + value: string; + _dateAccepted?: string; +}; diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts new file mode 100644 index 0000000000..e42886a002 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency = { + _actionId: string; +}; diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts new file mode 100644 index 0000000000..867d6c83ba --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { + _dateCreated: string; + _uuid: string; + language: string; + status?: string; + value: string; +}; diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts new file mode 100644 index 0000000000..5848ad2112 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts @@ -0,0 +1,20 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem = { + _dateCreated: string; + _uuid: string; + language: string; + status?: string; + value: string; + _dateAccepted?: string; +}; diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts similarity index 80% rename from jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts rename to jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts index 7a3a5a3671..77983eb8f8 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts @@ -10,14 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem = - | (unknown & { - language?: string - value?: string - _dateCreated: string - }) - | (unknown & { - language?: string - value?: string - _dateCreated: string - }) +export type _DataSupplementResponseQuestionNameXpathManualTranslationDependency = { + _actionId: string; +}; diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts new file mode 100644 index 0000000000..1b9f3567a9 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { + _dateCreated: string; + _uuid: string; + language: string; + status?: string; + value: string; +}; diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts index 3f43f47fb6..76f685f1eb 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts @@ -9,26 +9,40 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' -import type { DataSupplementResponseQuestionNameXpathManualTranslationItem } from './dataSupplementResponseQuestionNameXpathManualTranslationItem' -import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual' +import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription'; +import type { DataSupplementResponseQuestionNameXpathManualTranslation } from './dataSupplementResponseQuestionNameXpathManualTranslation'; +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription'; +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation'; +import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual'; -export type DataSupplementResponseQuestionNameXpath = - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslationItem[] - qual?: DataSupplementResponseQuestionNameXpathQual - }) +export type DataSupplementResponseQuestionNameXpath = (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; + qual?: DataSupplementResponseQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; + qual?: DataSupplementResponseQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; + qual?: DataSupplementResponseQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; + qual?: DataSupplementResponseQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; + qual?: DataSupplementResponseQuestionNameXpathQual; +}); diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts new file mode 100644 index 0000000000..8dfd792c45 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem'; + +export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription = { + _dateCreated: string; + _dateModified: string; + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem[]; +}; diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts new file mode 100644 index 0000000000..afa16d4bdf --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency'; +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem'; + +export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation = { + _dateCreated: string; + _dateModified: string; + _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency; + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[]; +}; diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts index 078499d102..9e1b409b26 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts @@ -9,20 +9,11 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem } from './dataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem' +import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem'; -export type DataSupplementResponseQuestionNameXpathManualTranscription = - | (unknown & { - language?: string - value?: string - _dateCreated: string - _dateModified: string - revisions?: DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem[] - }) - | (unknown & { - language?: string - value?: string - _dateCreated: string - _dateModified: string - revisions?: DataSupplementResponseQuestionNameXpathManualTranscriptionRevisionsItem[] - }) +export type DataSupplementResponseQuestionNameXpathManualTranscription = { + _dateCreated: string; + _dateModified: string; + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem[]; +}; diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts similarity index 64% rename from jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts rename to jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts index d44a6f950a..d6c0c4f37d 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslationItem.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts @@ -9,18 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem' +import type { _DataSupplementResponseQuestionNameXpathManualTranslationDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationDependency'; +import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem'; -export type DataSupplementResponseQuestionNameXpathManualTranslationItem = - | (unknown & { - language?: string - value?: string - _dateCreated: string - _revisions?: _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem[] - }) - | (unknown & { - language?: string - value?: string - _dateCreated: string - _revisions?: _DataSupplementResponseQuestionNameXpathManualTranslationItemRevisionsItem[] - }) +export type DataSupplementResponseQuestionNameXpathManualTranslation = { + _dateCreated: string; + _dateModified: string; + _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationDependency; + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[]; +}; diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts index e13c17a094..d6dc443bde 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts @@ -9,26 +9,50 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' -import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual' +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription'; +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem'; +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription'; +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem'; +import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual'; -export type PatchedDataSupplementPayloadQuestionNameXpath = - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) +export type PatchedDataSupplementPayloadQuestionNameXpath = (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; +}) | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; +}); diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts new file mode 100644 index 0000000000..54d988671e --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription = { + language: string; + value: string; +}; diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts new file mode 100644 index 0000000000..e228428811 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem = { + language: string; + value: string; +}; diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 81a9016b1f..aa8f8dae11 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -110,36 +110,64 @@ def map_serializer(self, auto_schema, direction): 'question_name_xpath': build_object_type( additionalProperties=False, properties={ - 'manual_transcription': build_object_type( - additionalProperties=False, - properties={ - 'language': GENERIC_STRING_SCHEMA, - 'value': GENERIC_STRING_SCHEMA, - }, - required=['language', 'value'], + 'manual_transcription': ( + self._get_manual_transcription_schema() + ), + 'manual_translation': ( + self._get_manual_translation_schema() ), - 'manual_translation': build_array_type( - schema=build_object_type( - additionalProperties=False, - properties={ - 'language': GENERIC_STRING_SCHEMA, - 'value': GENERIC_STRING_SCHEMA, - }, - required=['language', 'value'], - ), - min_length=1, + 'automated_google_transcription': ( + self._get_auto_transcription_schema() + ), + 'automated_google_translation': ( + self._get_auto_translation_schema() ), 'qual': self._get_qual_schema(), }, anyOf=[ {'required': ['manual_transcription']}, {'required': ['manual_translation']}, + {'required': ['automated_google_transcription']}, + {'required': ['automated_google_translation']}, {'required': ['qual']}, ], ), } ) + @classmethod + def _get_common_pair_schema(cls): + return build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'value': GENERIC_STRING_SCHEMA, + }, + required=['language', 'value'], + ) + + @classmethod + def _get_manual_transcription_schema(cls): + return cls._get_common_pair_schema() + + @classmethod + def _get_auto_transcription_schema(cls): + return cls._get_common_pair_schema() + + @classmethod + def _get_manual_translation_schema(cls): + return build_array_type( + schema=cls._get_common_pair_schema(), + min_length=1, + ) + + @classmethod + def _get_auto_translation_schema(cls): + return build_array_type( + schema=cls._get_common_pair_schema(), + min_length=1, + ) + @classmethod def _get_qual_schema(cls): qual_defs = { @@ -245,110 +273,126 @@ class DataSupplementResponseExtension(OpenApiSerializerExtension): UUID_STR = {'type': 'string', 'format': 'uuid'} def map_serializer(self, auto_schema, direction): - # TODO move to class constants - # Reusable building blocks to reduce redundancy - LANG_STR = GENERIC_STRING_SCHEMA - VALUE_STR = GENERIC_STRING_SCHEMA - # DATETIME = build_basic_type(OpenApiTypes.DATETIME) - - # Constraint helper: "language" and "value" must be both present or both absent - PAIR_LANG_VALUE_BOTH_OR_NONE = { - 'anyOf': [ - {'required': ['language', 'value']}, # both present - { - 'not': { # forbid the cases where only one is present - 'anyOf': [ - {'required': ['language']}, - {'required': ['value']}, - ] - } + return build_object_type( + properties={ + '_version': { + 'type': 'string', + 'example': '20250812', }, - ] - } + 'question_name_xpath': build_object_type( + additionalProperties=False, + properties={ + 'manual_transcription': ( + self._get_manual_transcription_schema() + ), + 'manual_translation': ( + self._get_manual_translation_schema() + ), + 'automated_google_transcription': ( + self._get_auto_transcription_schema() + ), + 'automated_google_translation': ( + self._get_auto_translation_schema() + ), + 'qual': self._get_qual_schema(), + }, + # At least one of "manual_transcription" or "manual_translation" + # must be present + anyOf=[ + {'required': ['manual_transcription']}, + {'required': ['manual_translation']}, + {'required': ['automated_google_transcription']}, + {'required': ['automated_google_translation']}, + {'required': ['qual']}, + ], + ), + } + ) - # TODO move action schemas logic to their own methods. - # Shared properties for objects that carry a language/value pair - VALUE_PROPS = { - 'language': LANG_STR, - 'value': VALUE_STR, + @classmethod + def _get_base_version_props(cls): + return { + '_dateCreated': cls.DATETIME, + '_uuid': cls.UUID_STR, + 'language': GENERIC_STRING_SCHEMA, + 'status': GENERIC_STRING_SCHEMA, + 'value': GENERIC_STRING_SCHEMA, } - # Generic revision item: - # - requires _dateCreated; - # - language/value are coupled (both-or-none) - REVISION_ITEM = build_object_type( + @classmethod + def _get_base_version_required(cls): + return ['_dateCreated', '_uuid', 'language', 'value'] + + @classmethod + def _build_transcription_schema(cls): + """ + Helper for both manual and automated transcription. + Items have optional '_dateAccepted'. + """ + version_item = build_object_type( additionalProperties=False, properties={ - **VALUE_PROPS, - '_dateCreated': self.DATETIME, # Always required for a revision entry + **cls._get_base_version_props(), + '_dateAccepted': cls.DATETIME, # Optional }, - required=['_dateCreated'], - **PAIR_LANG_VALUE_BOTH_OR_NONE, + required=cls._get_base_version_required(), ) - # Manual transcription object: - # - _dateCreated and _dateModified are always required - # - language/value: both-or-none - # - "revisions" is an array of REVISION_ITEMs - MANUAL_TRANSCRIPTION = build_object_type( + return build_object_type( additionalProperties=False, properties={ - **VALUE_PROPS, # Coupled via PAIR_LANG_VALUE_BOTH_OR_NONE - '_dateCreated': self.DATETIME, # Always required - '_dateModified': self.DATETIME, # Always required - 'revisions': build_array_type( - schema=REVISION_ITEM, - ), + '_dateCreated': cls.DATETIME, + '_dateModified': cls.DATETIME, + '_versions': build_array_type(schema=version_item, min_length=1), }, - required=['_dateCreated', '_dateModified'], - **PAIR_LANG_VALUE_BOTH_OR_NONE, + required=['_dateCreated', '_dateModified', '_versions'], ) - # Each item in manual_translation: - # - requires _dateCreated - # - language/value: both-or-none - # - has a "_revisions" array with the same REVISION_ITEM structure - MANUAL_TRANSLATION_ITEM = build_object_type( + @classmethod + def _build_translation_schema(cls): + """ + Helper for both manual and automated translation. + Root has required '_dependency'. + """ + version_item = build_object_type( additionalProperties=False, - properties={ - **VALUE_PROPS, # Coupled via PAIR_LANG_VALUE_BOTH_OR_NONE - '_dateCreated': self.DATETIME, # Always required - '_revisions': build_array_type( - schema=REVISION_ITEM, - ), - }, - required=['_dateCreated'], - **PAIR_LANG_VALUE_BOTH_OR_NONE, + properties=cls._get_base_version_props(), + required=cls._get_base_version_required(), ) - MANUAL_TRANSLATION = build_array_type( - schema=MANUAL_TRANSLATION_ITEM, - min_length=1, + dependency_schema = build_object_type( + additionalProperties=False, + properties={'_actionId': GENERIC_STRING_SCHEMA}, + required=['_actionId'], ) return build_object_type( + additionalProperties=False, properties={ - '_version': { - 'type': 'string', - 'example': '20250812', - }, - 'question_name_xpath': build_object_type( - additionalProperties=False, - properties={ - 'manual_transcription': MANUAL_TRANSCRIPTION, - 'manual_translation': MANUAL_TRANSLATION, - 'qual': self._get_qual_schema(), - }, - # At least one of "manual_transcription" or "manual_translation" must be present - anyOf=[ - {'required': ['manual_transcription']}, - {'required': ['manual_translation']}, - {'required': ['qual']}, - ], - ), - } + '_dateCreated': cls.DATETIME, + '_dateModified': cls.DATETIME, + '_dependency': dependency_schema, + '_versions': build_array_type(schema=version_item, min_length=1), + }, + required=['_dateCreated', '_dateModified', '_versions', '_dependency'], ) + @classmethod + def _get_manual_transcription_schema(cls): + return cls._build_transcription_schema() + + @classmethod + def _get_auto_transcription_schema(cls): + return cls._build_transcription_schema() + + @classmethod + def _get_manual_translation_schema(cls): + return cls._build_translation_schema() + + @classmethod + def _get_auto_translation_schema(cls): + return cls._build_translation_schema() + @classmethod def _get_qual_schema(cls): """ diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 6790b3968d..9478dce7d6 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -15155,12 +15155,6 @@ "manual_transcription": { "type": "object", "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, "_dateCreated": { "type": "string", "format": "date-time" @@ -15169,175 +15163,236 @@ "type": "string", "format": "date-time" }, - "revisions": { + "_versions": { "type": "array", "items": { "type": "object", "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, "language": { "type": "string" }, + "status": { + "type": "string" + }, "value": { "type": "string" }, - "_dateCreated": { + "_dateAccepted": { "type": "string", "format": "date-time" } }, "additionalProperties": false, "required": [ - "_dateCreated" - ], - "anyOf": [ - { - "required": [ - "language", - "value" - ] - }, - { - "not": { - "anyOf": [ - { - "required": [ - "language" - ] - }, - { - "required": [ - "value" - ] - } - ] - } - } + "_dateCreated", + "_uuid", + "language", + "value" ] - } + }, + "minLength": 1 } }, "additionalProperties": false, "required": [ "_dateCreated", - "_dateModified" - ], - "anyOf": [ - { + "_dateModified", + "_versions" + ] + }, + "manual_translation": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" + } + }, + "additionalProperties": false, "required": [ - "language", - "value" + "_actionId" ] }, - { - "not": { - "anyOf": [ - { - "required": [ - "language" - ] + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" }, - { - "required": [ - "value" - ] + "_uuid": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "status": { + "type": "string" + }, + "value": { + "type": "string" } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_uuid", + "language", + "value" ] - } + }, + "minLength": 1 } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_dependency", + "_versions" ] }, - "manual_translation": { - "type": "array", - "items": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_revisions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, - "_dateCreated": { - "type": "string", - "format": "date-time" - } + "automated_google_transcription": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" }, - "additionalProperties": false, - "required": [ - "_dateCreated" - ], - "anyOf": [ - { - "required": [ - "language", - "value" - ] - }, - { - "not": { - "anyOf": [ - { - "required": [ - "language" - ] - }, - { - "required": [ - "value" - ] - } - ] - } - } - ] + "_uuid": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "status": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_uuid", + "language", + "value" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + }, + "automated_google_translation": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "_actionId" + ] }, - "additionalProperties": false, - "required": [ - "_dateCreated" - ], - "anyOf": [ - { + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "status": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, "required": [ + "_dateCreated", + "_uuid", "language", "value" ] }, - { - "not": { - "anyOf": [ - { - "required": [ - "language" - ] - }, - { - "required": [ - "value" - ] - } - ] - } - } - ] + "minLength": 1 + } }, - "minLength": 1 + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_dependency", + "_versions" + ] }, "qual": { "type": "object", @@ -15745,6 +15800,16 @@ "manual_translation" ] }, + { + "required": [ + "automated_google_transcription" + ] + }, + { + "required": [ + "automated_google_translation" + ] + }, { "required": [ "qual" @@ -19452,6 +19517,42 @@ }, "minLength": 1 }, + "automated_google_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "automated_google_translation": { + "type": "array", + "items": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "minLength": 1 + }, "qual": { "oneOf": [ { @@ -19619,6 +19720,16 @@ "manual_translation" ] }, + { + "required": [ + "automated_google_transcription" + ] + }, + { + "required": [ + "automated_google_translation" + ] + }, { "required": [ "qual" diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 53cb7afdca..6f56dc223c 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -11024,106 +11024,179 @@ components: manual_transcription: type: object properties: - language: + _dateCreated: type: string - value: + format: date-time + _dateModified: type: string + format: date-time + _versions: + type: array + items: + type: object + properties: + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + language: + type: string + status: + type: string + value: + type: string + _dateAccepted: + type: string + format: date-time + additionalProperties: false + required: + - _dateCreated + - _uuid + - language + - value + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _versions + manual_translation: + type: object + properties: _dateCreated: type: string format: date-time _dateModified: type: string format: date-time - revisions: + _dependency: + type: object + properties: + _actionId: + type: string + additionalProperties: false + required: + - _actionId + _versions: type: array items: type: object properties: + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid language: type: string + status: + type: string value: type: string + additionalProperties: false + required: + - _dateCreated + - _uuid + - language + - value + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _dependency + - _versions + automated_google_transcription: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _versions: + type: array + items: + type: object + properties: _dateCreated: type: string format: date-time + _uuid: + type: string + format: uuid + language: + type: string + status: + type: string + value: + type: string + _dateAccepted: + type: string + format: date-time additionalProperties: false required: - _dateCreated - anyOf: - - required: - - language - - value - - not: - anyOf: - - required: - - language - - required: - - value + - _uuid + - language + - value + minLength: 1 additionalProperties: false required: - _dateCreated - _dateModified - anyOf: - - required: - - language - - value - - not: - anyOf: - - required: + - _versions + automated_google_translation: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _dependency: + type: object + properties: + _actionId: + type: string + additionalProperties: false + required: + - _actionId + _versions: + type: array + items: + type: object + properties: + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + language: + type: string + status: + type: string + value: + type: string + additionalProperties: false + required: + - _dateCreated + - _uuid - language - - required: - value - manual_translation: - type: array - items: - type: object - properties: - language: - type: string - value: - type: string - _dateCreated: - type: string - format: date-time - _revisions: - type: array - items: - type: object - properties: - language: - type: string - value: - type: string - _dateCreated: - type: string - format: date-time - additionalProperties: false - required: - - _dateCreated - anyOf: - - required: - - language - - value - - not: - anyOf: - - required: - - language - - required: - - value - additionalProperties: false - required: - - _dateCreated - anyOf: - - required: - - language - - value - - not: - anyOf: - - required: - - language - - required: - - value - minLength: 1 + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _dependency + - _versions qual: type: object additionalProperties: @@ -11369,6 +11442,10 @@ components: - manual_transcription - required: - manual_translation + - required: + - automated_google_transcription + - required: + - automated_google_translation - required: - qual DataValidationStatusUpdateResponse: @@ -14044,6 +14121,31 @@ components: - language - value minLength: 1 + automated_google_transcription: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + automated_google_translation: + type: array + items: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + minLength: 1 qual: oneOf: - allOf: @@ -14137,6 +14239,10 @@ components: - manual_transcription - required: - manual_translation + - required: + - automated_google_transcription + - required: + - automated_google_translation - required: - qual PatchedDataValidationStatusUpdatePayload: From d000584cf5dae5f80eb53f12c8991993b040340e Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Thu, 11 Dec 2025 11:14:39 -0500 Subject: [PATCH 13/33] fix biome and orval styling issues --- .../js/api/models/_dataResponseAttachments.ts | 18 ++-- ...utomatedGoogleTranscriptionVersionsItem.ts | 14 +-- ...athAutomatedGoogleTranslationDependency.ts | 4 +- ...hAutomatedGoogleTranslationVersionsItem.ts | 12 +-- ...ameXpathManualTranscriptionVersionsItem.ts | 14 +-- ...ionNameXpathManualTranslationDependency.ts | 4 +- ...nNameXpathManualTranslationVersionsItem.ts | 12 +-- ...dataSupplementResponseQuestionNameXpath.ts | 77 ++++++++------- ...onNameXpathAutomatedGoogleTranscription.ts | 10 +- ...tionNameXpathAutomatedGoogleTranslation.ts | 14 +-- ...nseQuestionNameXpathManualTranscription.ts | 10 +- ...ponseQuestionNameXpathManualTranslation.ts | 14 +-- ...dDataSupplementPayloadQuestionNameXpath.ts | 97 ++++++++++--------- ...onNameXpathAutomatedGoogleTranscription.ts | 6 +- ...NameXpathAutomatedGoogleTranslationItem.ts | 6 +- 15 files changed, 161 insertions(+), 151 deletions(-) diff --git a/jsapp/js/api/models/_dataResponseAttachments.ts b/jsapp/js/api/models/_dataResponseAttachments.ts index 3dd9a2fd5a..00aa73039c 100644 --- a/jsapp/js/api/models/_dataResponseAttachments.ts +++ b/jsapp/js/api/models/_dataResponseAttachments.ts @@ -11,12 +11,12 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataResponseAttachments = { - download_url?: string; - download_large_url?: string; - download_medium_url?: string; - download_small_url?: string; - mimetype?: string; - filename?: string; - uid?: string; - question_xpath?: string; -}; + download_url?: string + download_large_url?: string + download_medium_url?: string + download_small_url?: string + mimetype?: string + filename?: string + uid?: string + question_xpath?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts index 6b66a481b5..d4af0a209b 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts @@ -11,10 +11,10 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem = { - _dateCreated: string; - _uuid: string; - language: string; - status?: string; - value: string; - _dateAccepted?: string; -}; + _dateCreated: string + _uuid: string + language: string + status?: string + value: string + _dateAccepted?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts index e42886a002..c580add4c3 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts @@ -11,5 +11,5 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency = { - _actionId: string; -}; + _actionId: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts index 867d6c83ba..71db6c9a67 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts @@ -11,9 +11,9 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { - _dateCreated: string; - _uuid: string; - language: string; - status?: string; - value: string; -}; + _dateCreated: string + _uuid: string + language: string + status?: string + value: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts index 5848ad2112..bbd1c4119a 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts @@ -11,10 +11,10 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem = { - _dateCreated: string; - _uuid: string; - language: string; - status?: string; - value: string; - _dateAccepted?: string; -}; + _dateCreated: string + _uuid: string + language: string + status?: string + value: string + _dateAccepted?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts index 77983eb8f8..25726311a3 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts @@ -11,5 +11,5 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathManualTranslationDependency = { - _actionId: string; -}; + _actionId: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts index 1b9f3567a9..3dab0f081d 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts @@ -11,9 +11,9 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { - _dateCreated: string; - _uuid: string; - language: string; - status?: string; - value: string; -}; + _dateCreated: string + _uuid: string + language: string + status?: string + value: string +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts index 76f685f1eb..f8fbc0a948 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts @@ -9,40 +9,45 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription'; -import type { DataSupplementResponseQuestionNameXpathManualTranslation } from './dataSupplementResponseQuestionNameXpathManualTranslation'; -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription'; -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation'; -import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual'; +import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' +import type { DataSupplementResponseQuestionNameXpathManualTranslation } from './dataSupplementResponseQuestionNameXpathManualTranslation' +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription' +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation' +import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual' -export type DataSupplementResponseQuestionNameXpath = (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; - qual?: DataSupplementResponseQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; - qual?: DataSupplementResponseQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; - qual?: DataSupplementResponseQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; - qual?: DataSupplementResponseQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription; - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation; - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription; - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation; - qual?: DataSupplementResponseQuestionNameXpathQual; -}); +export type DataSupplementResponseQuestionNameXpath = + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation + qual?: DataSupplementResponseQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation + qual?: DataSupplementResponseQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation + qual?: DataSupplementResponseQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation + qual?: DataSupplementResponseQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription + manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation + automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation + qual?: DataSupplementResponseQuestionNameXpathQual + }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts index 8dfd792c45..504718f013 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts @@ -9,11 +9,11 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem'; +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem' export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription = { - _dateCreated: string; - _dateModified: string; + _dateCreated: string + _dateModified: string /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem[]; -}; + _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem[] +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts index afa16d4bdf..c1889ccffc 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts @@ -9,13 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency'; -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem'; +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency' +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem' export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation = { - _dateCreated: string; - _dateModified: string; - _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency; + _dateCreated: string + _dateModified: string + _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[]; -}; + _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[] +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts index 9e1b409b26..35e00fa99e 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts @@ -9,11 +9,11 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem'; +import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem' export type DataSupplementResponseQuestionNameXpathManualTranscription = { - _dateCreated: string; - _dateModified: string; + _dateCreated: string + _dateModified: string /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem[]; -}; + _versions: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem[] +} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts index d6c0c4f37d..eeb1a0bb2b 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts @@ -9,13 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationDependency'; -import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem'; +import type { _DataSupplementResponseQuestionNameXpathManualTranslationDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationDependency' +import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem' export type DataSupplementResponseQuestionNameXpathManualTranslation = { - _dateCreated: string; - _dateModified: string; - _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationDependency; + _dateCreated: string + _dateModified: string + _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationDependency /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[]; -}; + _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[] +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts index d6dc443bde..7ba46f3049 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts @@ -9,50 +9,55 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription'; -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem'; -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription'; -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem'; -import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual'; +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' +import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription' +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem' +import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual' -export type PatchedDataSupplementPayloadQuestionNameXpath = (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; -}) | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription; - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[]; - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription; - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[]; - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual; -}); +export type PatchedDataSupplementPayloadQuestionNameXpath = + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription + /** @minLength 1 */ + manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] + automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription + /** @minLength 1 */ + automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] + qual?: PatchedDataSupplementPayloadQuestionNameXpathQual + }) diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts index 54d988671e..708023fce9 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts @@ -11,6 +11,6 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription = { - language: string; - value: string; -}; + language: string + value: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts index e228428811..ae270222b1 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts @@ -11,6 +11,6 @@ The endpoints are grouped by area of intended use. Each category contains relate */ export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem = { - language: string; - value: string; -}; + language: string + value: string +} From c53b7741d93e2bcab67d91a1db8f1d7971852b58 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Thu, 11 Dec 2025 11:22:24 -0500 Subject: [PATCH 14/33] fix imports --- .../js/api/models/dataSupplementResponseQuestionNameXpath.ts | 4 ++-- .../models/patchedDataSupplementPayloadQuestionNameXpath.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts index f8fbc0a948..edabd94a13 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts @@ -1,3 +1,5 @@ +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription' +import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation' /** * Generated by orval v7.10.0 🍺 * Do not edit manually. @@ -11,8 +13,6 @@ The endpoints are grouped by area of intended use. Each category contains relate */ import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' import type { DataSupplementResponseQuestionNameXpathManualTranslation } from './dataSupplementResponseQuestionNameXpathManualTranslation' -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription' -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation' import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual' export type DataSupplementResponseQuestionNameXpath = diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts index 7ba46f3049..b8a4db6743 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts @@ -1,3 +1,5 @@ +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription' +import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem' /** * Generated by orval v7.10.0 🍺 * Do not edit manually. @@ -11,8 +13,6 @@ The endpoints are grouped by area of intended use. Each category contains relate */ import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription' -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem' import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual' export type PatchedDataSupplementPayloadQuestionNameXpath = From 8b66a637e33784ae6e3df9e81e3cf458e73590b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Thu, 11 Dec 2025 13:01:23 -0500 Subject: [PATCH 15/33] fix: improve OpenAPI examples for supplement endpoint --- kpi/schema_extensions/v2/data/examples.py | 365 ++++++++++++++++++++++ kpi/utils/schema_extensions/response.py | 4 +- kpi/views/v2/data.py | 4 +- 3 files changed, 371 insertions(+), 2 deletions(-) create mode 100644 kpi/schema_extensions/v2/data/examples.py diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py new file mode 100644 index 0000000000..82a4c05a15 --- /dev/null +++ b/kpi/schema_extensions/v2/data/examples.py @@ -0,0 +1,365 @@ +from drf_spectacular.utils import OpenApiExample + + +def get_data_supplement_examples() -> list[OpenApiExample]: + """ + Return all OpenApiExample objects used to document the DataSupplementPayload + request body. One example is provided for each branch of the `anyOf` + conditions in the schema: + - manual_transcription + - manual_translation + - each of the 4 variants of `qual` (integer, null, string, uuid, list of uuid) + """ + + return ( + _get_data_supplement_patch_payload_request_examples() + + _get_data_supplement_response_examples() + ) + + +def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample]: + return [ + OpenApiExample( + 'Manual Transcription', + value={ + "_version": "20250812", + "question_name_xpath": { + "manual_transcription": { + "language": "fr", + "value": "Bonjour" + } + } + }, + request_only=True, + ), + OpenApiExample( + 'Manual Translation', + value={ + "_version": "20250812", + "question_name_xpath": { + "manual_translation": + {"language": "en", "value": "Hello"}, + } + }, + request_only=True, + ), + OpenApiExample( + 'Qualitative Analysis – Integer Question', + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "uuid": "11111111-1111-1111-1111-111111111111", + "value": 42, + } + } + }, + request_only=True, + ), + OpenApiExample( + 'Qualitative Analysis – Text Question', + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "uuid": "22222222-2222-2222-2222-222222222222", + "value": "example-text", + } + } + }, + request_only=True, + ), + OpenApiExample( + 'Qualitative Analysis – Single Choice Question', + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "uuid": "33333333-3333-3333-3333-333333333333", + "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + } + } + }, + request_only=True, + ), + OpenApiExample( + 'Qualitative Analysis – Multiple Choice Question', + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "uuid": "44444444-4444-4444-4444-444444444444", + "value": [ + "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", + ], + } + } + }, + request_only=True, + ), + OpenApiExample( + 'Qualitative Analysis – Tags Question', + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "uuid": "44444444-4444-4444-4444-444444444444", + "value": ["tag1", "tag2"], + } + } + }, + request_only=True, + ) + ] + + +def _get_data_supplement_response_examples(): + iso = "2025-01-01T12:00:00Z" + + return [ + OpenApiExample( + name="Manual Transcription", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "manual_transcription": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_dateCreated": iso, + "_uuid": "11111111-1111-1111-1111-111111111111", + "language": "fr", + "value": "Bonjour", + "_dateAccepted": iso, + } + ] + } + } + } + ), + OpenApiExample( + name="Manual Translation", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "manual_translation": { + "en": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_dateCreated": iso, + "_dateAccepted": iso, + "_uuid": "22222222-2222-2222-2222-222222222222", + "language": "en", + "value": "Hello", + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + }, + } + ] + }, + "es": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_dateCreated": iso, + "_dateAccepted": iso, + "_uuid": "33333333-3333-3333-3333-333333333333", + "language": "es", + "status": "accepted", + "value": "Hola", + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + }, + } + ] + } + } + } + } + ), + OpenApiExample( + name="Automated Google Transcription", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "automated_google_transcription": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_dateCreated": iso, + "_uuid": "44444444-4444-4444-4444-444444444444", + "language": "en", + "status": "generated", + "value": "Hello world", + "_dateAccepted": iso + } + ] + } + } + } + ), + OpenApiExample( + name="Automated Google Translation", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "automated_google_translation": { + "_dateCreated": iso, + "_dateModified": iso, + "_dependency": { + "_actionId": "action-67890" + }, + "_versions": [ + { + "_dateCreated": iso, + "_uuid": "55555555-5555-5555-5555-555555555555", + "language": "fr", + "status": "generated", + "value": "Bonjour le monde" + } + ] + } + } + } + ), + OpenApiExample( + name="Qualitative Analysis – Integer Question", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "66666666-6666-6666-6666-666666666666": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_data": { + "uuid": "66666666-6666-6666-6666-666666666666", + "value": 42 + }, + "_dateCreated": iso, + "_uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + } + ] + } + } + } + } + ), + OpenApiExample( + name="Qualitative Analysis – Text Question", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_data": { + "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff", + "value": "This is a qualitative text response." + }, + "_dateCreated": iso, + "_uuid": "12121212-3434-5656-7878-909090909090" + } + ] + } + } + } + } + ), + OpenApiExample( + name="Qualitative Analysis – Single Choice Question", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "77777777-7777-7777-7777-777777777777": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_data": { + "uuid": "77777777-7777-7777-7777-777777777777", + "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + }, + "_dateCreated": iso, + "_uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + } + ] + } + } + } + } + ), + OpenApiExample( + name="Qualitative Analysis – Multiple Choice Question", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "88888888-8888-8888-8888-888888888888": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_data": { + "uuid": "88888888-8888-8888-8888-888888888888", + "value": [ + "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + ] + }, + "_dateCreated": iso, + "_uuid": "99999999-9999-9999-9999-999999999999" + } + ] + } + } + } + } + ), + OpenApiExample( + name="Qualitative Analysis – Tags Question", + response_only=True, + value={ + "_version": "20250812", + "question_name_xpath": { + "qual": { + "bbbbbbbb-cccc-dddd-eeee-ffffffffffff": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_data": { + "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + "value": ["urgent", "review", "priority"] + }, + "_dateCreated": iso, + "_uuid": "23232323-4545-6767-8989-010101010101" + } + ] + } + } + } + } + ), + ] diff --git a/kpi/utils/schema_extensions/response.py b/kpi/utils/schema_extensions/response.py index a7df856a09..aacaf760da 100644 --- a/kpi/utils/schema_extensions/response.py +++ b/kpi/utils/schema_extensions/response.py @@ -250,7 +250,9 @@ def open_api_generic_response( response = { success_key: OpenApiResponse( - response=given_serializer, description=kwargs.get('description') + response=given_serializer, + description=kwargs.get('description'), + examples=kwargs.get('examples'), ) } diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index 5bc71ee3f2..b53ec785f7 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -59,6 +59,7 @@ SubmissionGeoJsonRenderer, SubmissionXMLRenderer, ) +from kpi.schema_extensions.v2.data.examples import get_data_supplement_examples from kpi.schema_extensions.v2.data.serializers import ( DataBulkDelete, DataBulkUpdate, @@ -490,7 +491,7 @@ def retrieve(self, request, pk, *args, **kwargs): @extend_schema( methods=['GET'], description=read_md('kpi', 'data/supplement_retrieve.md'), - responses=open_api_200_ok_response(DataSupplementResponse), # TODO CHANGEME + responses=open_api_200_ok_response(DataSupplementResponse), parameters=[ OpenApiParameter( name='id', @@ -527,6 +528,7 @@ def retrieve(self, request, pk, *args, **kwargs): description='Root UUID of the submission', ), ], + examples=get_data_supplement_examples(), ) def supplement(self, request, root_uuid, *args, **kwargs): From 5cf1bc80ffaadde2312d3c420dbdb73af7e79161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Thu, 11 Dec 2025 13:29:11 -0500 Subject: [PATCH 16/33] fix: automated actions --- kobo/apps/subsequences/actions/base.py | 2 +- kpi/schema_extensions/v2/data/examples.py | 70 ++++++++++++++++++----- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/kobo/apps/subsequences/actions/base.py b/kobo/apps/subsequences/actions/base.py index d2031c1b19..0b253df8a8 100644 --- a/kobo/apps/subsequences/actions/base.py +++ b/kobo/apps/subsequences/actions/base.py @@ -685,7 +685,7 @@ def external_data_schema(self) -> dict: Schema rules: - The field `status` is always required and must be one of: - ["requested", "in_progress", "complete", "failed"]. + ["in_progress", "complete", "failed"]. - If `status` == "complete": * The field `value` becomes required and must be a string. - If `status` == "failed": diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index 82a4c05a15..60e02c3ac9 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -200,9 +200,15 @@ def _get_data_supplement_response_examples(): "_dateCreated": iso, "_uuid": "44444444-4444-4444-4444-444444444444", "language": "en", - "status": "generated", + "status": "complete", "value": "Hello world", "_dateAccepted": iso + }, + { + "_dateCreated": iso, + "_uuid": "44444444-4444-4444-4444-444444444444", + "language": "en", + "status": "in_progress", } ] } @@ -216,20 +222,54 @@ def _get_data_supplement_response_examples(): "_version": "20250812", "question_name_xpath": { "automated_google_translation": { - "_dateCreated": iso, - "_dateModified": iso, - "_dependency": { - "_actionId": "action-67890" - }, - "_versions": [ - { - "_dateCreated": iso, - "_uuid": "55555555-5555-5555-5555-555555555555", - "language": "fr", - "status": "generated", - "value": "Bonjour le monde" - } - ] + "en": { + "_dateCreated": iso, + "_dateModified": iso, + "_versions": [ + { + "_dateCreated": iso, + "_dateAccepted": iso, + "_uuid": "88888888-8888-8888-8888-888888888888", + "language": "fr", + "status": "complete", + "value": "Bonjour le monde", + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + }, + }, + { + "_dateCreated": iso, + "_uuid": "77777777-7777-7777-7777-777777777777", + "status": "in_progress", + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + }, + }, + { + "_dateCreated": iso, + "_uuid": "66666666-6666-6666-6666-666666666666", + "language": "fr", + "status": "deleted", + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + }, + }, + { + "_dateCreated": iso, + "_uuid": "55555555-5555-5555-5555-555555555555", + "language": "fr", + "status": "complete", + "value": "Allo la foule", + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + }, + } + ] + } } } } From dee3638745af89d980d05b9010acfd93ba234bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Thu, 11 Dec 2025 13:44:24 -0500 Subject: [PATCH 17/33] style: linter --- kpi/schema_extensions/v2/data/examples.py | 499 ++++++++++---------- kpi/schema_extensions/v2/data/extensions.py | 8 +- 2 files changed, 256 insertions(+), 251 deletions(-) diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index 60e02c3ac9..4260222aae 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -3,12 +3,25 @@ def get_data_supplement_examples() -> list[OpenApiExample]: """ - Return all OpenApiExample objects used to document the DataSupplementPayload - request body. One example is provided for each branch of the `anyOf` - conditions in the schema: + Return all OpenApiExample objects used to document the Data Supplement + endpoint. Includes both request-only and response-only examples. + + Request examples cover each valid branch of the `anyOf` payload: - manual_transcription - manual_translation - - each of the 4 variants of `qual` (integer, null, string, uuid, list of uuid) + - automated_google_transcription + - automated_google_translation + - all 5 Qualitative Analysis variants: + - integer + - text + - tags + - select_one + - select_multiple + + Response examples provide the corresponding server-side structures for the + same cases. Each example is explicitly marked as request_only or response_only + to avoid overriding content types and to ensure Swagger displays them in the + correct sections. """ return ( @@ -22,384 +35,380 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Manual Transcription', value={ - "_version": "20250812", - "question_name_xpath": { - "manual_transcription": { - "language": "fr", - "value": "Bonjour" - } - } + '_version': '20250812', + 'question_name_xpath': { + 'manual_transcription': {'language': 'fr', 'value': 'Bonjour'} + }, }, request_only=True, ), OpenApiExample( 'Manual Translation', value={ - "_version": "20250812", - "question_name_xpath": { - "manual_translation": - {"language": "en", "value": "Hello"}, - } + '_version': '20250812', + 'question_name_xpath': { + 'manual_translation': {'language': 'en', 'value': 'Hello'}, + }, }, request_only=True, ), OpenApiExample( 'Qualitative Analysis – Integer Question', value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "uuid": "11111111-1111-1111-1111-111111111111", - "value": 42, + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'uuid': '11111111-1111-1111-1111-111111111111', + 'value': 42, } - } + }, }, request_only=True, ), OpenApiExample( 'Qualitative Analysis – Text Question', value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "uuid": "22222222-2222-2222-2222-222222222222", - "value": "example-text", + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'uuid': '22222222-2222-2222-2222-222222222222', + 'value': 'example-text', } - } + }, }, request_only=True, ), OpenApiExample( 'Qualitative Analysis – Single Choice Question', value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "uuid": "33333333-3333-3333-3333-333333333333", - "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'uuid': '33333333-3333-3333-3333-333333333333', + 'value': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', } - } + }, }, request_only=True, ), OpenApiExample( 'Qualitative Analysis – Multiple Choice Question', value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "uuid": "44444444-4444-4444-4444-444444444444", - "value": [ - "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", - "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'uuid': '44444444-4444-4444-4444-444444444444', + 'value': [ + 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', + 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', ], } - } + }, }, request_only=True, ), OpenApiExample( 'Qualitative Analysis – Tags Question', value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "uuid": "44444444-4444-4444-4444-444444444444", - "value": ["tag1", "tag2"], + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'uuid': '44444444-4444-4444-4444-444444444444', + 'value': ['tag1', 'tag2'], } - } + }, }, request_only=True, - ) + ), ] def _get_data_supplement_response_examples(): - iso = "2025-01-01T12:00:00Z" + iso = '2025-01-01T12:00:00Z' return [ OpenApiExample( - name="Manual Transcription", + name='Manual Transcription', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "manual_transcription": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'manual_transcription': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_dateCreated": iso, - "_uuid": "11111111-1111-1111-1111-111111111111", - "language": "fr", - "value": "Bonjour", - "_dateAccepted": iso, + '_dateCreated': iso, + '_uuid': '11111111-1111-1111-1111-111111111111', + 'language': 'fr', + 'value': 'Bonjour', + '_dateAccepted': iso, } - ] + ], } - } - } + }, + }, ), OpenApiExample( - name="Manual Translation", + name='Manual Translation', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "manual_translation": { - "en": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'manual_translation': { + 'en': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_dateCreated": iso, - "_dateAccepted": iso, - "_uuid": "22222222-2222-2222-2222-222222222222", - "language": "en", - "value": "Hello", - "_dependency": { - "_actionId": "manual_transcription", - "_uuid": "11111111-1111-1111-1111-111111111111" + '_dateCreated': iso, + '_dateAccepted': iso, + '_uuid': '22222222-2222-2222-2222-222222222222', + 'language': 'en', + 'value': 'Hello', + '_dependency': { + '_actionId': 'manual_transcription', + '_uuid': '11111111-1111-1111-1111-111111111111', }, } - ] + ], }, - "es": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + 'es': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_dateCreated": iso, - "_dateAccepted": iso, - "_uuid": "33333333-3333-3333-3333-333333333333", - "language": "es", - "status": "accepted", - "value": "Hola", - "_dependency": { - "_actionId": "manual_transcription", - "_uuid": "11111111-1111-1111-1111-111111111111" + '_dateCreated': iso, + '_dateAccepted': iso, + '_uuid': '33333333-3333-3333-3333-333333333333', + 'language': 'es', + 'status': 'accepted', + 'value': 'Hola', + '_dependency': { + '_actionId': 'manual_transcription', + '_uuid': '11111111-1111-1111-1111-111111111111', }, } - ] - } + ], + }, } - } - } + }, + }, ), OpenApiExample( - name="Automated Google Transcription", + name='Automated Google Transcription', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "automated_google_transcription": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'automated_google_transcription': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_dateCreated": iso, - "_uuid": "44444444-4444-4444-4444-444444444444", - "language": "en", - "status": "complete", - "value": "Hello world", - "_dateAccepted": iso + '_dateCreated': iso, + '_uuid': '44444444-4444-4444-4444-444444444444', + 'language': 'en', + 'status': 'complete', + 'value': 'Hello world', + '_dateAccepted': iso, }, { - "_dateCreated": iso, - "_uuid": "44444444-4444-4444-4444-444444444444", - "language": "en", - "status": "in_progress", - } - ] + '_dateCreated': iso, + '_uuid': '44444444-4444-4444-4444-444444444444', + 'language': 'en', + 'status': 'in_progress', + }, + ], } - } - } + }, + }, ), OpenApiExample( - name="Automated Google Translation", + name='Automated Google Translation', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "automated_google_translation": { - "en": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'automated_google_translation': { + 'en': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_dateCreated": iso, - "_dateAccepted": iso, - "_uuid": "88888888-8888-8888-8888-888888888888", - "language": "fr", - "status": "complete", - "value": "Bonjour le monde", - "_dependency": { - "_actionId": "automatic_google_transcription", - "_uuid": "44444444-4444-4444-4444-444444444444" + '_dateCreated': iso, + '_dateAccepted': iso, + '_uuid': '88888888-8888-8888-8888-888888888888', + 'language': 'fr', + 'status': 'complete', + 'value': 'Bonjour le monde', + '_dependency': { + '_actionId': 'automatic_google_transcription', + '_uuid': '44444444-4444-4444-4444-444444444444', }, }, { - "_dateCreated": iso, - "_uuid": "77777777-7777-7777-7777-777777777777", - "status": "in_progress", - "_dependency": { - "_actionId": "automatic_google_transcription", - "_uuid": "44444444-4444-4444-4444-444444444444" + '_dateCreated': iso, + '_uuid': '77777777-7777-7777-7777-777777777777', + 'status': 'in_progress', + '_dependency': { + '_actionId': 'automatic_google_transcription', + '_uuid': '44444444-4444-4444-4444-444444444444', }, }, { - "_dateCreated": iso, - "_uuid": "66666666-6666-6666-6666-666666666666", - "language": "fr", - "status": "deleted", - "_dependency": { - "_actionId": "automatic_google_transcription", - "_uuid": "44444444-4444-4444-4444-444444444444" + '_dateCreated': iso, + '_uuid': '66666666-6666-6666-6666-666666666666', + 'language': 'fr', + 'status': 'deleted', + '_dependency': { + '_actionId': 'automatic_google_transcription', + '_uuid': '44444444-4444-4444-4444-444444444444', }, }, { - "_dateCreated": iso, - "_uuid": "55555555-5555-5555-5555-555555555555", - "language": "fr", - "status": "complete", - "value": "Allo la foule", - "_dependency": { - "_actionId": "automatic_google_transcription", - "_uuid": "44444444-4444-4444-4444-444444444444" + '_dateCreated': iso, + '_uuid': '55555555-5555-5555-5555-555555555555', + 'language': 'fr', + 'status': 'complete', + 'value': 'Allo la foule', + '_dependency': { + '_actionId': 'automatic_google_transcription', + '_uuid': '44444444-4444-4444-4444-444444444444', }, - } - ] + }, + ], } } - } - } + }, + }, ), OpenApiExample( - name="Qualitative Analysis – Integer Question", + name='Qualitative Analysis – Integer Question', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "66666666-6666-6666-6666-666666666666": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + '66666666-6666-6666-6666-666666666666': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_data": { - "uuid": "66666666-6666-6666-6666-666666666666", - "value": 42 + '_data': { + 'uuid': '66666666-6666-6666-6666-666666666666', + 'value': 42, }, - "_dateCreated": iso, - "_uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + '_dateCreated': iso, + '_uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', } - ] + ], } } - } - } + }, + }, ), OpenApiExample( - name="Qualitative Analysis – Text Question", + name='Qualitative Analysis – Text Question', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_data": { - "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff", - "value": "This is a qualitative text response." + '_data': { + 'uuid': 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff', + 'value': 'This is a qualitative text response.', }, - "_dateCreated": iso, - "_uuid": "12121212-3434-5656-7878-909090909090" + '_dateCreated': iso, + '_uuid': '12121212-3434-5656-7878-909090909090', } - ] + ], } } - } - } + }, + }, ), OpenApiExample( - name="Qualitative Analysis – Single Choice Question", + name='Qualitative Analysis – Single Choice Question', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "77777777-7777-7777-7777-777777777777": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + '77777777-7777-7777-7777-777777777777': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_data": { - "uuid": "77777777-7777-7777-7777-777777777777", - "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + '_data': { + 'uuid': '77777777-7777-7777-7777-777777777777', + 'value': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', }, - "_dateCreated": iso, - "_uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + '_dateCreated': iso, + '_uuid': 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', } - ] + ], } } - } - } + }, + }, ), OpenApiExample( - name="Qualitative Analysis – Multiple Choice Question", + name='Qualitative Analysis – Multiple Choice Question', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "88888888-8888-8888-8888-888888888888": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + '88888888-8888-8888-8888-888888888888': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_data": { - "uuid": "88888888-8888-8888-8888-888888888888", - "value": [ - "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", - "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" - ] + '_data': { + 'uuid': '88888888-8888-8888-8888-888888888888', + 'value': [ + 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', + 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', + ], }, - "_dateCreated": iso, - "_uuid": "99999999-9999-9999-9999-999999999999" + '_dateCreated': iso, + '_uuid': '99999999-9999-9999-9999-999999999999', } - ] + ], } } - } - } + }, + }, ), OpenApiExample( - name="Qualitative Analysis – Tags Question", + name='Qualitative Analysis – Tags Question', response_only=True, value={ - "_version": "20250812", - "question_name_xpath": { - "qual": { - "bbbbbbbb-cccc-dddd-eeee-ffffffffffff": { - "_dateCreated": iso, - "_dateModified": iso, - "_versions": [ + '_version': '20250812', + 'question_name_xpath': { + 'qual': { + 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff': { + '_dateCreated': iso, + '_dateModified': iso, + '_versions': [ { - "_data": { - "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", - "value": ["urgent", "review", "priority"] + '_data': { + 'uuid': 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff', + 'value': ['urgent', 'review', 'priority'], }, - "_dateCreated": iso, - "_uuid": "23232323-4545-6767-8989-010101010101" + '_dateCreated': iso, + '_uuid': '23232323-4545-6767-8989-010101010101', } - ] + ], } } - } - } + }, + }, ), ] diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index aa8f8dae11..d9a15a60a3 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -113,9 +113,7 @@ def map_serializer(self, auto_schema, direction): 'manual_transcription': ( self._get_manual_transcription_schema() ), - 'manual_translation': ( - self._get_manual_translation_schema() - ), + 'manual_translation': (self._get_manual_translation_schema()), 'automated_google_transcription': ( self._get_auto_transcription_schema() ), @@ -285,9 +283,7 @@ def map_serializer(self, auto_schema, direction): 'manual_transcription': ( self._get_manual_transcription_schema() ), - 'manual_translation': ( - self._get_manual_translation_schema() - ), + 'manual_translation': (self._get_manual_translation_schema()), 'automated_google_transcription': ( self._get_auto_transcription_schema() ), From b4ab39f3b50e7d9f9541df013bf639379c53db12 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Thu, 11 Dec 2025 14:02:12 -0500 Subject: [PATCH 18/33] fixing schema errors --- ...utomatedGoogleTranscriptionVersionsItem.ts | 2 +- ...hAutomatedGoogleTranslationVersionsItem.ts | 4 +- ...oogleTranslationVersionsItemDependency.ts} | 3 +- ...ameXpathManualTranscriptionVersionsItem.ts | 1 - ...nNameXpathManualTranslationVersionsItem.ts | 3 +- ...anualTranslationVersionsItemDependency.ts} | 3 +- ...tionNameXpathAutomatedGoogleTranslation.ts | 12 +- ...ponseQuestionNameXpathManualTranslation.ts | 12 +- kpi/schema_extensions/v2/data/extensions.py | 70 +++-- static/openapi/schema_v2.json | 256 +++++++++--------- static/openapi/schema_v2.yaml | 196 +++++++------- 11 files changed, 301 insertions(+), 261 deletions(-) rename jsapp/js/api/models/{_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts => _dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts} (94%) rename jsapp/js/api/models/{_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts => _dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts} (94%) diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts index d4af0a209b..0206b25713 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts @@ -14,7 +14,7 @@ export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription _dateCreated: string _uuid: string language: string - status?: string value: string + status?: string _dateAccepted?: string } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts index 71db6c9a67..d44dd5d4b5 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts @@ -9,11 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency' export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { _dateCreated: string _uuid: string language: string - status?: string value: string + status?: string + _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts similarity index 94% rename from jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts rename to jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts index c580add4c3..66de98be0c 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts @@ -10,6 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency = { +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency = { _actionId: string + _uuid: string } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts index bbd1c4119a..91cfd68110 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts @@ -14,7 +14,6 @@ export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsI _dateCreated: string _uuid: string language: string - status?: string value: string _dateAccepted?: string } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts index 3dab0f081d..2e06d3e91d 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts @@ -9,11 +9,12 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ +import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency' export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { _dateCreated: string _uuid: string language: string - status?: string value: string + _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts similarity index 94% rename from jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts rename to jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts index 25726311a3..6930a74268 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationDependency.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts @@ -10,6 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type _DataSupplementResponseQuestionNameXpathManualTranslationDependency = { +export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency = { _actionId: string + _uuid: string } diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts index c1889ccffc..baa14c5fe5 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts @@ -9,13 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency' import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem' export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation = { - _dateCreated: string - _dateModified: string - _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationDependency - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[] + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[] + } } diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts index eeb1a0bb2b..1bacf04d51 100644 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts +++ b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts @@ -9,13 +9,13 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationDependency' import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem' export type DataSupplementResponseQuestionNameXpathManualTranslation = { - _dateCreated: string - _dateModified: string - _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationDependency - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[] + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[] + } } diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index aa8f8dae11..2a90a2bc68 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -310,29 +310,46 @@ def map_serializer(self, auto_schema, direction): ) @classmethod - def _get_base_version_props(cls): - return { + def _get_base_version_props(cls, include_status=False): + """ + Base properties for a version item. + """ + props = { '_dateCreated': cls.DATETIME, '_uuid': cls.UUID_STR, 'language': GENERIC_STRING_SCHEMA, - 'status': GENERIC_STRING_SCHEMA, 'value': GENERIC_STRING_SCHEMA, } + if include_status: + props['status'] = GENERIC_STRING_SCHEMA + + return props + @classmethod def _get_base_version_required(cls): return ['_dateCreated', '_uuid', 'language', 'value'] @classmethod - def _build_transcription_schema(cls): + def _get_dependency_schema(cls): + return build_object_type( + additionalProperties=False, + properties={ + "_actionId": GENERIC_STRING_SCHEMA, + "_uuid": cls.UUID_STR, + }, + required=["_actionId", "_uuid"], + ) + + @classmethod + def _build_transcription_schema(cls, include_status=False): """ Helper for both manual and automated transcription. - Items have optional '_dateAccepted'. """ version_item = build_object_type( additionalProperties=False, properties={ - **cls._get_base_version_props(), + **cls._get_base_version_props(include_status=include_status), '_dateAccepted': cls.DATETIME, # Optional }, required=cls._get_base_version_required(), @@ -349,49 +366,50 @@ def _build_transcription_schema(cls): ) @classmethod - def _build_translation_schema(cls): + def _build_translation_schema(cls, include_status=False): """ - Helper for both manual and automated translation. - Root has required '_dependency'. + Translation Schema: + Map. + The keys are dynamic strings (e.g., 'en', 'es'). """ version_item = build_object_type( additionalProperties=False, - properties=cls._get_base_version_props(), - required=cls._get_base_version_required(), + properties={ + **cls._get_base_version_props(include_status), + '_dependency': cls._get_dependency_schema(), + }, + required=[*cls._get_base_version_required(), '_dependency'], ) - dependency_schema = build_object_type( + inner_action_schema = build_object_type( additionalProperties=False, - properties={'_actionId': GENERIC_STRING_SCHEMA}, - required=['_actionId'], + properties={ + "_dateCreated": cls.DATETIME, + "_dateModified": cls.DATETIME, + "_versions": build_array_type(schema=version_item, min_length=1), + }, + required=["_dateCreated", "_dateModified", "_versions"], ) return build_object_type( - additionalProperties=False, - properties={ - '_dateCreated': cls.DATETIME, - '_dateModified': cls.DATETIME, - '_dependency': dependency_schema, - '_versions': build_array_type(schema=version_item, min_length=1), - }, - required=['_dateCreated', '_dateModified', '_versions', '_dependency'], + additionalProperties=inner_action_schema, ) @classmethod def _get_manual_transcription_schema(cls): - return cls._build_transcription_schema() + return cls._build_transcription_schema(include_status=False) @classmethod def _get_auto_transcription_schema(cls): - return cls._build_transcription_schema() + return cls._build_transcription_schema(include_status=True) @classmethod def _get_manual_translation_schema(cls): - return cls._build_translation_schema() + return cls._build_translation_schema(include_status=False) @classmethod def _get_auto_translation_schema(cls): - return cls._build_translation_schema() + return cls._build_translation_schema(include_status=True) @classmethod def _get_qual_schema(cls): diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 9478dce7d6..552160990f 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -15179,9 +15179,6 @@ "language": { "type": "string" }, - "status": { - "type": "string" - }, "value": { "type": "string" }, @@ -15210,68 +15207,73 @@ }, "manual_translation": { "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_dependency": { - "type": "object", - "properties": { - "_actionId": { - "type": "string" - } + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" }, - "additionalProperties": false, - "required": [ - "_actionId" - ] - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" - }, - "language": { - "type": "string" - }, - "status": { - "type": "string" + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_actionId", + "_uuid" + ] + } }, - "value": { - "type": "string" - } + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dependency", + "_uuid", + "language", + "value" + ] }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_uuid", - "language", - "value" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_dependency", - "_versions" - ] + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } }, "automated_google_transcription": { "type": "object", @@ -15300,10 +15302,10 @@ "language": { "type": "string" }, - "status": { + "value": { "type": "string" }, - "value": { + "status": { "type": "string" }, "_dateAccepted": { @@ -15331,68 +15333,76 @@ }, "automated_google_translation": { "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_dependency": { - "type": "object", - "properties": { - "_actionId": { - "type": "string" - } + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" }, - "additionalProperties": false, - "required": [ - "_actionId" - ] - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" - }, - "language": { - "type": "string" - }, - "status": { - "type": "string" + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "status": { + "type": "string" + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_actionId", + "_uuid" + ] + } }, - "value": { - "type": "string" - } + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dependency", + "_uuid", + "language", + "value" + ] }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_uuid", - "language", - "value" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_dependency", - "_versions" - ] + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } }, "qual": { "type": "object", diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 6f56dc223c..f07c28a6a3 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -11043,8 +11043,6 @@ components: format: uuid language: type: string - status: - type: string value: type: string _dateAccepted: @@ -11064,51 +11062,55 @@ components: - _versions manual_translation: type: object - properties: - _dateCreated: - type: string - format: date-time - _dateModified: - type: string - format: date-time - _dependency: - type: object - properties: - _actionId: - type: string - additionalProperties: false - required: - - _actionId - _versions: - type: array - items: - type: object - properties: - _dateCreated: - type: string - format: date-time - _uuid: - type: string - format: uuid - language: - type: string - status: - type: string - value: - type: string - additionalProperties: false - required: - - _dateCreated - - _uuid - - language - - value - minLength: 1 - additionalProperties: false - required: - - _dateCreated - - _dateModified - - _dependency - - _versions + additionalProperties: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _versions: + type: array + items: + type: object + properties: + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + language: + type: string + value: + type: string + _dependency: + type: object + properties: + _actionId: + type: string + _uuid: + type: string + format: uuid + additionalProperties: false + required: + - _actionId + - _uuid + additionalProperties: false + required: + - _dateCreated + - _dependency + - _uuid + - language + - value + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _versions automated_google_transcription: type: object properties: @@ -11131,10 +11133,10 @@ components: format: uuid language: type: string - status: - type: string value: type: string + status: + type: string _dateAccepted: type: string format: date-time @@ -11152,51 +11154,57 @@ components: - _versions automated_google_translation: type: object - properties: - _dateCreated: - type: string - format: date-time - _dateModified: - type: string - format: date-time - _dependency: - type: object - properties: - _actionId: - type: string - additionalProperties: false - required: - - _actionId - _versions: - type: array - items: - type: object - properties: - _dateCreated: - type: string - format: date-time - _uuid: - type: string - format: uuid - language: - type: string - status: - type: string - value: - type: string - additionalProperties: false - required: - - _dateCreated - - _uuid - - language - - value - minLength: 1 - additionalProperties: false - required: - - _dateCreated - - _dateModified - - _dependency - - _versions + additionalProperties: + type: object + properties: + _dateCreated: + type: string + format: date-time + _dateModified: + type: string + format: date-time + _versions: + type: array + items: + type: object + properties: + _dateCreated: + type: string + format: date-time + _uuid: + type: string + format: uuid + language: + type: string + value: + type: string + status: + type: string + _dependency: + type: object + properties: + _actionId: + type: string + _uuid: + type: string + format: uuid + additionalProperties: false + required: + - _actionId + - _uuid + additionalProperties: false + required: + - _dateCreated + - _dependency + - _uuid + - language + - value + minLength: 1 + additionalProperties: false + required: + - _dateCreated + - _dateModified + - _versions qual: type: object additionalProperties: From 24f42625bc96f9f9f25f4aa80fddd6da0b73eba6 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Thu, 11 Dec 2025 14:08:44 -0500 Subject: [PATCH 19/33] fix quotes --- kpi/schema_extensions/v2/data/extensions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index cc598c2bd6..b5ba5a5c4f 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -331,10 +331,10 @@ def _get_dependency_schema(cls): return build_object_type( additionalProperties=False, properties={ - "_actionId": GENERIC_STRING_SCHEMA, - "_uuid": cls.UUID_STR, + '_actionId': GENERIC_STRING_SCHEMA, + '_uuid': cls.UUID_STR, }, - required=["_actionId", "_uuid"], + required=['_actionId', '_uuid'], ) @classmethod @@ -380,11 +380,11 @@ def _build_translation_schema(cls, include_status=False): inner_action_schema = build_object_type( additionalProperties=False, properties={ - "_dateCreated": cls.DATETIME, - "_dateModified": cls.DATETIME, - "_versions": build_array_type(schema=version_item, min_length=1), + '_dateCreated': cls.DATETIME, + '_dateModified': cls.DATETIME, + '_versions': build_array_type(schema=version_item, min_length=1), }, - required=["_dateCreated", "_dateModified", "_versions"], + required=['_dateCreated', '_dateModified', '_versions'], ) return build_object_type( From c04c8b9718cf6755111b045cca45c5fdcf2445fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Thu, 11 Dec 2025 17:52:07 -0500 Subject: [PATCH 20/33] fix: make OpenAPI examples accurate --- kpi/schema_extensions/v2/data/examples.py | 166 +++++++++++++++----- kpi/schema_extensions/v2/data/extensions.py | 4 +- 2 files changed, 126 insertions(+), 44 deletions(-) diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index 4260222aae..a23d387cf2 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -35,7 +35,7 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Manual Transcription', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'manual_transcription': {'language': 'fr', 'value': 'Bonjour'} }, @@ -45,17 +45,73 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Manual Translation', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'manual_translation': {'language': 'en', 'value': 'Hello'}, }, }, request_only=True, ), + OpenApiExample( + 'Automic Google Transcription', + value={ + '_version': '20250820', + 'question_name_xpath': { + 'automatic_google_transcription': {'language': 'fr'} + }, + }, + request_only=True, + ), + OpenApiExample( + 'Automic Google Translation', + value={ + '_version': '20250820', + 'question_name_xpath': { + 'automatic_google_translation': {'language': 'en'}, + }, + }, + request_only=True, + ), + OpenApiExample( + 'Delete NLP action', + description=( + '`` can be any of:' + '
' + ' * `manual_transcription`
' + ' * `manual_translation`
' + ' * `automatic_google_transcription`
' + ' * `automatic_google_translation`
' + '' + '`` is the language code, e.g. `en`.' + ), + value={ + '_version': '20250820', + 'question_name_xpath': { + '': {'language': '', 'value': None}, + }, + }, + request_only=True, + ), + OpenApiExample( + 'Accept automatic NLP action', + description=( + '`` can be any of `automatic_google_transcription` or ' + '`automatic_google_translation`.
' + '`` is the language code, e.g. `en`.
' + '`accepted` is a boolean. It can `true` or `false`.' + ), + value={ + '_version': '20250820', + 'question_name_xpath': { + '': {'language': '', 'accepted': True}, + }, + }, + request_only=True, + ), OpenApiExample( 'Qualitative Analysis – Integer Question', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'uuid': '11111111-1111-1111-1111-111111111111', @@ -68,7 +124,7 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Qualitative Analysis – Text Question', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'uuid': '22222222-2222-2222-2222-222222222222', @@ -81,7 +137,7 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Qualitative Analysis – Single Choice Question', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'uuid': '33333333-3333-3333-3333-333333333333', @@ -94,7 +150,7 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Qualitative Analysis – Multiple Choice Question', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'uuid': '44444444-4444-4444-4444-444444444444', @@ -110,7 +166,7 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample OpenApiExample( 'Qualitative Analysis – Tags Question', value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'uuid': '44444444-4444-4444-4444-444444444444', @@ -131,7 +187,7 @@ def _get_data_supplement_response_examples(): name='Manual Transcription', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'manual_transcription': { '_dateCreated': iso, @@ -139,10 +195,12 @@ def _get_data_supplement_response_examples(): '_versions': [ { '_dateCreated': iso, - '_uuid': '11111111-1111-1111-1111-111111111111', - 'language': 'fr', - 'value': 'Bonjour', '_dateAccepted': iso, + '_uuid': '11111111-1111-1111-1111-111111111111', + '_data': { + 'language': 'fr', + 'value': 'Bonjour', + }, } ], } @@ -153,7 +211,7 @@ def _get_data_supplement_response_examples(): name='Manual Translation', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'manual_translation': { 'en': { @@ -164,8 +222,10 @@ def _get_data_supplement_response_examples(): '_dateCreated': iso, '_dateAccepted': iso, '_uuid': '22222222-2222-2222-2222-222222222222', - 'language': 'en', - 'value': 'Hello', + '_data': { + 'language': 'en', + 'value': 'Hello', + }, '_dependency': { '_actionId': 'manual_transcription', '_uuid': '11111111-1111-1111-1111-111111111111', @@ -181,9 +241,10 @@ def _get_data_supplement_response_examples(): '_dateCreated': iso, '_dateAccepted': iso, '_uuid': '33333333-3333-3333-3333-333333333333', - 'language': 'es', - 'status': 'accepted', - 'value': 'Hola', + '_data': { + 'language': 'es', + 'value': 'Hola', + }, '_dependency': { '_actionId': 'manual_transcription', '_uuid': '11111111-1111-1111-1111-111111111111', @@ -199,7 +260,7 @@ def _get_data_supplement_response_examples(): name='Automated Google Transcription', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'automated_google_transcription': { '_dateCreated': iso, @@ -208,16 +269,20 @@ def _get_data_supplement_response_examples(): { '_dateCreated': iso, '_uuid': '44444444-4444-4444-4444-444444444444', - 'language': 'en', - 'status': 'complete', - 'value': 'Hello world', + '_data': { + 'language': 'en', + 'status': 'complete', + 'value': 'Hello world', + }, '_dateAccepted': iso, }, { '_dateCreated': iso, '_uuid': '44444444-4444-4444-4444-444444444444', - 'language': 'en', - 'status': 'in_progress', + '_data': { + 'language': 'en', + 'status': 'in_progress', + }, }, ], } @@ -228,10 +293,10 @@ def _get_data_supplement_response_examples(): name='Automated Google Translation', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'automated_google_translation': { - 'en': { + 'fr': { '_dateCreated': iso, '_dateModified': iso, '_versions': [ @@ -239,9 +304,11 @@ def _get_data_supplement_response_examples(): '_dateCreated': iso, '_dateAccepted': iso, '_uuid': '88888888-8888-8888-8888-888888888888', - 'language': 'fr', - 'status': 'complete', - 'value': 'Bonjour le monde', + '_data': { + 'language': 'fr', + 'status': 'complete', + 'value': 'Bonjour le monde', + }, '_dependency': { '_actionId': 'automatic_google_transcription', '_uuid': '44444444-4444-4444-4444-444444444444', @@ -250,7 +317,10 @@ def _get_data_supplement_response_examples(): { '_dateCreated': iso, '_uuid': '77777777-7777-7777-7777-777777777777', - 'status': 'in_progress', + '_data': { + 'language': 'fr', + 'status': 'in_progress', + }, '_dependency': { '_actionId': 'automatic_google_transcription', '_uuid': '44444444-4444-4444-4444-444444444444', @@ -259,8 +329,11 @@ def _get_data_supplement_response_examples(): { '_dateCreated': iso, '_uuid': '66666666-6666-6666-6666-666666666666', - 'language': 'fr', - 'status': 'deleted', + '_data': { + 'language': 'fr', + 'value': None, + 'status': 'deleted', + }, '_dependency': { '_actionId': 'automatic_google_transcription', '_uuid': '44444444-4444-4444-4444-444444444444', @@ -270,8 +343,10 @@ def _get_data_supplement_response_examples(): '_dateCreated': iso, '_uuid': '55555555-5555-5555-5555-555555555555', 'language': 'fr', - 'status': 'complete', - 'value': 'Allo la foule', + '_data': { + 'status': 'complete', + 'value': 'Allo la foule', + }, '_dependency': { '_actionId': 'automatic_google_transcription', '_uuid': '44444444-4444-4444-4444-444444444444', @@ -287,7 +362,7 @@ def _get_data_supplement_response_examples(): name='Qualitative Analysis – Integer Question', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { '66666666-6666-6666-6666-666666666666': { @@ -295,11 +370,12 @@ def _get_data_supplement_response_examples(): '_dateModified': iso, '_versions': [ { + '_dateCreated': iso, + '_dateAccepted': iso, '_data': { 'uuid': '66666666-6666-6666-6666-666666666666', 'value': 42, }, - '_dateCreated': iso, '_uuid': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', } ], @@ -312,7 +388,7 @@ def _get_data_supplement_response_examples(): name='Qualitative Analysis – Text Question', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff': { @@ -320,11 +396,12 @@ def _get_data_supplement_response_examples(): '_dateModified': iso, '_versions': [ { + '_dateCreated': iso, + '_dateAccepted': iso, '_data': { 'uuid': 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff', 'value': 'This is a qualitative text response.', }, - '_dateCreated': iso, '_uuid': '12121212-3434-5656-7878-909090909090', } ], @@ -337,7 +414,7 @@ def _get_data_supplement_response_examples(): name='Qualitative Analysis – Single Choice Question', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { '77777777-7777-7777-7777-777777777777': { @@ -345,11 +422,13 @@ def _get_data_supplement_response_examples(): '_dateModified': iso, '_versions': [ { + '_dateCreated': iso, + '_dateAccepted': iso, '_data': { + 'uuid': '77777777-7777-7777-7777-777777777777', 'value': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', }, - '_dateCreated': iso, '_uuid': 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', } ], @@ -362,7 +441,7 @@ def _get_data_supplement_response_examples(): name='Qualitative Analysis – Multiple Choice Question', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { '88888888-8888-8888-8888-888888888888': { @@ -370,6 +449,8 @@ def _get_data_supplement_response_examples(): '_dateModified': iso, '_versions': [ { + '_dateCreated': iso, + '_dateAccepted': iso, '_data': { 'uuid': '88888888-8888-8888-8888-888888888888', 'value': [ @@ -377,7 +458,6 @@ def _get_data_supplement_response_examples(): 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', ], }, - '_dateCreated': iso, '_uuid': '99999999-9999-9999-9999-999999999999', } ], @@ -390,7 +470,7 @@ def _get_data_supplement_response_examples(): name='Qualitative Analysis – Tags Question', response_only=True, value={ - '_version': '20250812', + '_version': '20250820', 'question_name_xpath': { 'qual': { 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff': { @@ -398,6 +478,8 @@ def _get_data_supplement_response_examples(): '_dateModified': iso, '_versions': [ { + '_dateCreated': iso, + '_dateAccepted': iso, '_data': { 'uuid': 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff', 'value': ['urgent', 'review', 'priority'], diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index d9a15a60a3..7d2be938d4 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -105,7 +105,7 @@ def map_serializer(self, auto_schema, direction): properties={ '_version': { 'type': 'string', - 'example': '20250812', + 'example': '20250820', }, 'question_name_xpath': build_object_type( additionalProperties=False, @@ -275,7 +275,7 @@ def map_serializer(self, auto_schema, direction): properties={ '_version': { 'type': 'string', - 'example': '20250812', + 'example': '20250820', }, 'question_name_xpath': build_object_type( additionalProperties=False, From f7f3d839c559c86983a3cae88a48f1667cf2c9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Thu, 11 Dec 2025 18:16:24 -0500 Subject: [PATCH 21/33] fix: use different timestamp in examples --- kpi/schema_extensions/v2/data/examples.py | 95 ++++++++++++----------- kpi/views/v2/data.py | 1 + 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index a23d387cf2..428d1068ed 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -180,7 +180,10 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample def _get_data_supplement_response_examples(): - iso = '2025-01-01T12:00:00Z' + iso0 = "2025-01-01T12:00:00Z" + iso1 = "2025-01-01T12:01:00Z" + iso2 = "2025-01-01T12:02:00Z" + iso3 = "2025-01-01T12:03:00Z" return [ OpenApiExample( @@ -190,12 +193,12 @@ def _get_data_supplement_response_examples(): '_version': '20250820', 'question_name_xpath': { 'manual_transcription': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_uuid': '11111111-1111-1111-1111-111111111111', '_data': { 'language': 'fr', @@ -215,12 +218,12 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'manual_translation': { 'en': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_uuid': '22222222-2222-2222-2222-222222222222', '_data': { 'language': 'en', @@ -234,12 +237,12 @@ def _get_data_supplement_response_examples(): ], }, 'es': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso1, + '_dateModified': iso1, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso1, + '_dateAccepted': iso1, '_uuid': '33333333-3333-3333-3333-333333333333', '_data': { 'language': 'es', @@ -263,21 +266,21 @@ def _get_data_supplement_response_examples(): '_version': '20250820', 'question_name_xpath': { 'automated_google_transcription': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso1, '_versions': [ { - '_dateCreated': iso, + '_dateCreated': iso1, '_uuid': '44444444-4444-4444-4444-444444444444', '_data': { 'language': 'en', 'status': 'complete', 'value': 'Hello world', }, - '_dateAccepted': iso, + '_dateAccepted': iso1, }, { - '_dateCreated': iso, + '_dateCreated': iso0, '_uuid': '44444444-4444-4444-4444-444444444444', '_data': { 'language': 'en', @@ -297,12 +300,12 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'automated_google_translation': { 'fr': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso3, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso3, + '_dateAccepted': iso3, '_uuid': '88888888-8888-8888-8888-888888888888', '_data': { 'language': 'fr', @@ -315,7 +318,7 @@ def _get_data_supplement_response_examples(): }, }, { - '_dateCreated': iso, + '_dateCreated': iso2, '_uuid': '77777777-7777-7777-7777-777777777777', '_data': { 'language': 'fr', @@ -327,7 +330,7 @@ def _get_data_supplement_response_examples(): }, }, { - '_dateCreated': iso, + '_dateCreated': iso1, '_uuid': '66666666-6666-6666-6666-666666666666', '_data': { 'language': 'fr', @@ -340,7 +343,7 @@ def _get_data_supplement_response_examples(): }, }, { - '_dateCreated': iso, + '_dateCreated': iso0, '_uuid': '55555555-5555-5555-5555-555555555555', 'language': 'fr', '_data': { @@ -366,12 +369,12 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'qual': { '66666666-6666-6666-6666-666666666666': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_data': { 'uuid': '66666666-6666-6666-6666-666666666666', 'value': 42, @@ -392,12 +395,12 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'qual': { 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_data': { 'uuid': 'aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff', 'value': 'This is a qualitative text response.', @@ -418,14 +421,13 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'qual': { '77777777-7777-7777-7777-777777777777': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_data': { - 'uuid': '77777777-7777-7777-7777-777777777777', 'value': 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', }, @@ -445,12 +447,12 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'qual': { '88888888-8888-8888-8888-888888888888': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_data': { 'uuid': '88888888-8888-8888-8888-888888888888', 'value': [ @@ -474,17 +476,16 @@ def _get_data_supplement_response_examples(): 'question_name_xpath': { 'qual': { 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff': { - '_dateCreated': iso, - '_dateModified': iso, + '_dateCreated': iso0, + '_dateModified': iso0, '_versions': [ { - '_dateCreated': iso, - '_dateAccepted': iso, + '_dateCreated': iso0, + '_dateAccepted': iso0, '_data': { 'uuid': 'bbbbbbbb-cccc-dddd-eeee-ffffffffffff', 'value': ['urgent', 'review', 'priority'], }, - '_dateCreated': iso, '_uuid': '23232323-4545-6767-8989-010101010101', } ], diff --git a/kpi/views/v2/data.py b/kpi/views/v2/data.py index b53ec785f7..5268005ac8 100644 --- a/kpi/views/v2/data.py +++ b/kpi/views/v2/data.py @@ -507,6 +507,7 @@ def retrieve(self, request, pk, *args, **kwargs): description='Root UUID of the submission', ), ], + examples=get_data_supplement_examples(), ) @extend_schema( methods=['PATCH'], From 538ee20741c08adc708359acc4c79a1b2b28e754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Fri, 12 Dec 2025 09:38:00 -0500 Subject: [PATCH 22/33] fix: update OpenAPI schemas and Orval helpers --- kpi/schema_extensions/v2/data/examples.py | 8 +- static/openapi/schema_v2.json | 754 +++++++++++++++++++++- static/openapi/schema_v2.yaml | 502 +++++++++++++- 3 files changed, 1256 insertions(+), 8 deletions(-) diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index 428d1068ed..9dbdfcd233 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -180,10 +180,10 @@ def _get_data_supplement_patch_payload_request_examples() -> list[OpenApiExample def _get_data_supplement_response_examples(): - iso0 = "2025-01-01T12:00:00Z" - iso1 = "2025-01-01T12:01:00Z" - iso2 = "2025-01-01T12:02:00Z" - iso3 = "2025-01-01T12:03:00Z" + iso0 = '2025-01-01T12:00:00Z' + iso1 = '2025-01-01T12:01:00Z' + iso2 = '2025-01-01T12:02:00Z' + iso3 = '2025-01-01T12:03:00Z' return [ OpenApiExample( diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 552160990f..3db290209d 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -3207,6 +3207,311 @@ "application/json": { "schema": { "$ref": "#/components/schemas/DataSupplementResponse" + }, + "examples": { + "ManualTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_transcription": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_uuid": "11111111-1111-1111-1111-111111111111", + "_data": { + "language": "fr", + "value": "Bonjour" + } + } + ] + } + } + }, + "summary": "Manual Transcription" + }, + "ManualTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_translation": { + "en": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_uuid": "22222222-2222-2222-2222-222222222222", + "_data": { + "language": "en", + "value": "Hello" + }, + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + } + } + ] + }, + "es": { + "_dateCreated": "2025-01-01T12:01:00Z", + "_dateModified": "2025-01-01T12:01:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_dateAccepted": "2025-01-01T12:01:00Z", + "_uuid": "33333333-3333-3333-3333-333333333333", + "_data": { + "language": "es", + "value": "Hola" + }, + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + } + } + ] + } + } + } + }, + "summary": "Manual Translation" + }, + "AutomatedGoogleTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automated_google_transcription": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:01:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_uuid": "44444444-4444-4444-4444-444444444444", + "_data": { + "language": "en", + "status": "complete", + "value": "Hello world" + }, + "_dateAccepted": "2025-01-01T12:01:00Z" + }, + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_uuid": "44444444-4444-4444-4444-444444444444", + "_data": { + "language": "en", + "status": "in_progress" + } + } + ] + } + } + }, + "summary": "Automated Google Transcription" + }, + "AutomatedGoogleTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automated_google_translation": { + "fr": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:03:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:03:00Z", + "_dateAccepted": "2025-01-01T12:03:00Z", + "_uuid": "88888888-8888-8888-8888-888888888888", + "_data": { + "language": "fr", + "status": "complete", + "value": "Bonjour le monde" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:02:00Z", + "_uuid": "77777777-7777-7777-7777-777777777777", + "_data": { + "language": "fr", + "status": "in_progress" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_uuid": "66666666-6666-6666-6666-666666666666", + "_data": { + "language": "fr", + "value": null, + "status": "deleted" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_uuid": "55555555-5555-5555-5555-555555555555", + "language": "fr", + "_data": { + "status": "complete", + "value": "Allo la foule" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + } + ] + } + } + } + }, + "summary": "Automated Google Translation" + }, + "QualitativeAnalysis–IntegerQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "66666666-6666-6666-6666-666666666666": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "66666666-6666-6666-6666-666666666666", + "value": 42 + }, + "_uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Integer Question" + }, + "QualitativeAnalysis–TextQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff", + "value": "This is a qualitative text response." + }, + "_uuid": "12121212-3434-5656-7878-909090909090" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Text Question" + }, + "QualitativeAnalysis–SingleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "77777777-7777-7777-7777-777777777777": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "77777777-7777-7777-7777-777777777777", + "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + }, + "_uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Single Choice Question" + }, + "QualitativeAnalysis–MultipleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "88888888-8888-8888-8888-888888888888": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "88888888-8888-8888-8888-888888888888", + "value": [ + "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + ] + }, + "_uuid": "99999999-9999-9999-9999-999999999999" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Multiple Choice Question" + }, + "QualitativeAnalysis–TagsQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "bbbbbbbb-cccc-dddd-eeee-ffffffffffff": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + "value": [ + "urgent", + "review", + "priority" + ] + }, + "_uuid": "23232323-4545-6767-8989-010101010101" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Tags Question" + } } } }, @@ -3321,6 +3626,146 @@ "application/json": { "schema": { "$ref": "#/components/schemas/PatchedDataSupplementPayload" + }, + "examples": { + "ManualTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_transcription": { + "language": "fr", + "value": "Bonjour" + } + } + }, + "summary": "Manual Transcription" + }, + "ManualTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_translation": { + "language": "en", + "value": "Hello" + } + } + }, + "summary": "Manual Translation" + }, + "AutomicGoogleTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automatic_google_transcription": { + "language": "fr" + } + } + }, + "summary": "Automic Google Transcription" + }, + "AutomicGoogleTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automatic_google_translation": { + "language": "en" + } + } + }, + "summary": "Automic Google Translation" + }, + "DeleteNLPAction": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "": { + "language": "", + "value": null + } + } + }, + "summary": "Delete NLP action", + "description": "`` can be any of:
* `manual_transcription`
* `manual_translation`
* `automatic_google_transcription`
* `automatic_google_translation`
`` is the language code, e.g. `en`." + }, + "AcceptAutomaticNLPAction": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "": { + "language": "", + "accepted": true + } + } + }, + "summary": "Accept automatic NLP action", + "description": "`` can be any of `automatic_google_transcription` or `automatic_google_translation`.
`` is the language code, e.g. `en`.
`accepted` is a boolean. It can `true` or `false`." + }, + "QualitativeAnalysis–IntegerQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "uuid": "11111111-1111-1111-1111-111111111111", + "value": 42 + } + } + }, + "summary": "Qualitative Analysis – Integer Question" + }, + "QualitativeAnalysis–TextQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "uuid": "22222222-2222-2222-2222-222222222222", + "value": "example-text" + } + } + }, + "summary": "Qualitative Analysis – Text Question" + }, + "QualitativeAnalysis–SingleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "uuid": "33333333-3333-3333-3333-333333333333", + "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + } + } + }, + "summary": "Qualitative Analysis – Single Choice Question" + }, + "QualitativeAnalysis–MultipleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "uuid": "44444444-4444-4444-4444-444444444444", + "value": [ + "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + ] + } + } + }, + "summary": "Qualitative Analysis – Multiple Choice Question" + }, + "QualitativeAnalysis–TagsQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "uuid": "44444444-4444-4444-4444-444444444444", + "value": [ + "tag1", + "tag2" + ] + } + } + }, + "summary": "Qualitative Analysis – Tags Question" + } } } } @@ -3339,6 +3784,311 @@ "application/json": { "schema": { "$ref": "#/components/schemas/DataSupplementResponse" + }, + "examples": { + "ManualTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_transcription": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_uuid": "11111111-1111-1111-1111-111111111111", + "_data": { + "language": "fr", + "value": "Bonjour" + } + } + ] + } + } + }, + "summary": "Manual Transcription" + }, + "ManualTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "manual_translation": { + "en": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_uuid": "22222222-2222-2222-2222-222222222222", + "_data": { + "language": "en", + "value": "Hello" + }, + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + } + } + ] + }, + "es": { + "_dateCreated": "2025-01-01T12:01:00Z", + "_dateModified": "2025-01-01T12:01:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_dateAccepted": "2025-01-01T12:01:00Z", + "_uuid": "33333333-3333-3333-3333-333333333333", + "_data": { + "language": "es", + "value": "Hola" + }, + "_dependency": { + "_actionId": "manual_transcription", + "_uuid": "11111111-1111-1111-1111-111111111111" + } + } + ] + } + } + } + }, + "summary": "Manual Translation" + }, + "AutomatedGoogleTranscription": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automated_google_transcription": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:01:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_uuid": "44444444-4444-4444-4444-444444444444", + "_data": { + "language": "en", + "status": "complete", + "value": "Hello world" + }, + "_dateAccepted": "2025-01-01T12:01:00Z" + }, + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_uuid": "44444444-4444-4444-4444-444444444444", + "_data": { + "language": "en", + "status": "in_progress" + } + } + ] + } + } + }, + "summary": "Automated Google Transcription" + }, + "AutomatedGoogleTranslation": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "automated_google_translation": { + "fr": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:03:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:03:00Z", + "_dateAccepted": "2025-01-01T12:03:00Z", + "_uuid": "88888888-8888-8888-8888-888888888888", + "_data": { + "language": "fr", + "status": "complete", + "value": "Bonjour le monde" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:02:00Z", + "_uuid": "77777777-7777-7777-7777-777777777777", + "_data": { + "language": "fr", + "status": "in_progress" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:01:00Z", + "_uuid": "66666666-6666-6666-6666-666666666666", + "_data": { + "language": "fr", + "value": null, + "status": "deleted" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + }, + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_uuid": "55555555-5555-5555-5555-555555555555", + "language": "fr", + "_data": { + "status": "complete", + "value": "Allo la foule" + }, + "_dependency": { + "_actionId": "automatic_google_transcription", + "_uuid": "44444444-4444-4444-4444-444444444444" + } + } + ] + } + } + } + }, + "summary": "Automated Google Translation" + }, + "QualitativeAnalysis–IntegerQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "66666666-6666-6666-6666-666666666666": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "66666666-6666-6666-6666-666666666666", + "value": 42 + }, + "_uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Integer Question" + }, + "QualitativeAnalysis–TextQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff", + "value": "This is a qualitative text response." + }, + "_uuid": "12121212-3434-5656-7878-909090909090" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Text Question" + }, + "QualitativeAnalysis–SingleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "77777777-7777-7777-7777-777777777777": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "77777777-7777-7777-7777-777777777777", + "value": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" + }, + "_uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Single Choice Question" + }, + "QualitativeAnalysis–MultipleChoiceQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "88888888-8888-8888-8888-888888888888": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "88888888-8888-8888-8888-888888888888", + "value": [ + "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", + "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" + ] + }, + "_uuid": "99999999-9999-9999-9999-999999999999" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Multiple Choice Question" + }, + "QualitativeAnalysis–TagsQuestion": { + "value": { + "_version": "20250820", + "question_name_xpath": { + "qual": { + "bbbbbbbb-cccc-dddd-eeee-ffffffffffff": { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateModified": "2025-01-01T12:00:00Z", + "_versions": [ + { + "_dateCreated": "2025-01-01T12:00:00Z", + "_dateAccepted": "2025-01-01T12:00:00Z", + "_data": { + "uuid": "bbbbbbbb-cccc-dddd-eeee-ffffffffffff", + "value": [ + "urgent", + "review", + "priority" + ] + }, + "_uuid": "23232323-4545-6767-8989-010101010101" + } + ] + } + } + } + }, + "summary": "Qualitative Analysis – Tags Question" + } } } }, @@ -15147,7 +15897,7 @@ "properties": { "_version": { "type": "string", - "example": "20250812" + "example": "20250820" }, "question_name_xpath": { "type": "object", @@ -19486,7 +20236,7 @@ "properties": { "_version": { "type": "string", - "example": "20250812" + "example": "20250820" }, "question_name_xpath": { "type": "object", diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index f07c28a6a3..339ee9070e 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -2411,6 +2411,206 @@ paths: application/json: schema: $ref: '#/components/schemas/DataSupplementResponse' + examples: + ManualTranscription: + value: + _version: '20250820' + question_name_xpath: + manual_transcription: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _uuid: 11111111-1111-1111-1111-111111111111 + _data: + language: fr + value: Bonjour + summary: Manual Transcription + ManualTranslation: + value: + _version: '20250820' + question_name_xpath: + manual_translation: + en: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _uuid: 22222222-2222-2222-2222-222222222222 + _data: + language: en + value: Hello + _dependency: + _actionId: manual_transcription + _uuid: 11111111-1111-1111-1111-111111111111 + es: + _dateCreated: '2025-01-01T12:01:00Z' + _dateModified: '2025-01-01T12:01:00Z' + _versions: + - _dateCreated: '2025-01-01T12:01:00Z' + _dateAccepted: '2025-01-01T12:01:00Z' + _uuid: 33333333-3333-3333-3333-333333333333 + _data: + language: es + value: Hola + _dependency: + _actionId: manual_transcription + _uuid: 11111111-1111-1111-1111-111111111111 + summary: Manual Translation + AutomatedGoogleTranscription: + value: + _version: '20250820' + question_name_xpath: + automated_google_transcription: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:01:00Z' + _versions: + - _dateCreated: '2025-01-01T12:01:00Z' + _uuid: 44444444-4444-4444-4444-444444444444 + _data: + language: en + status: complete + value: Hello world + _dateAccepted: '2025-01-01T12:01:00Z' + - _dateCreated: '2025-01-01T12:00:00Z' + _uuid: 44444444-4444-4444-4444-444444444444 + _data: + language: en + status: in_progress + summary: Automated Google Transcription + AutomatedGoogleTranslation: + value: + _version: '20250820' + question_name_xpath: + automated_google_translation: + fr: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:03:00Z' + _versions: + - _dateCreated: '2025-01-01T12:03:00Z' + _dateAccepted: '2025-01-01T12:03:00Z' + _uuid: 88888888-8888-8888-8888-888888888888 + _data: + language: fr + status: complete + value: Bonjour le monde + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:02:00Z' + _uuid: 77777777-7777-7777-7777-777777777777 + _data: + language: fr + status: in_progress + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:01:00Z' + _uuid: 66666666-6666-6666-6666-666666666666 + _data: + language: fr + value: null + status: deleted + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:00:00Z' + _uuid: 55555555-5555-5555-5555-555555555555 + language: fr + _data: + status: complete + value: Allo la foule + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + summary: Automated Google Translation + QualitativeAnalysis–IntegerQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 66666666-6666-6666-6666-666666666666: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 66666666-6666-6666-6666-666666666666 + value: 42 + _uuid: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + summary: Qualitative Analysis – Integer Question + QualitativeAnalysis–TextQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff + value: This is a qualitative text response. + _uuid: 12121212-3434-5656-7878-909090909090 + summary: Qualitative Analysis – Text Question + QualitativeAnalysis–SingleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 77777777-7777-7777-7777-777777777777: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 77777777-7777-7777-7777-777777777777 + value: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + _uuid: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + summary: Qualitative Analysis – Single Choice Question + QualitativeAnalysis–MultipleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 88888888-8888-8888-8888-888888888888: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 88888888-8888-8888-8888-888888888888 + value: + - aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + - bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + _uuid: 99999999-9999-9999-9999-999999999999 + summary: Qualitative Analysis – Multiple Choice Question + QualitativeAnalysis–TagsQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + bbbbbbbb-cccc-dddd-eeee-ffffffffffff: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: bbbbbbbb-cccc-dddd-eeee-ffffffffffff + value: + - urgent + - review + - priority + _uuid: 23232323-4545-6767-8989-010101010101 + summary: Qualitative Analysis – Tags Question description: null '401': content: @@ -2482,6 +2682,104 @@ paths: application/json: schema: $ref: '#/components/schemas/PatchedDataSupplementPayload' + examples: + ManualTranscription: + value: + _version: '20250820' + question_name_xpath: + manual_transcription: + language: fr + value: Bonjour + summary: Manual Transcription + ManualTranslation: + value: + _version: '20250820' + question_name_xpath: + manual_translation: + language: en + value: Hello + summary: Manual Translation + AutomicGoogleTranscription: + value: + _version: '20250820' + question_name_xpath: + automatic_google_transcription: + language: fr + summary: Automic Google Transcription + AutomicGoogleTranslation: + value: + _version: '20250820' + question_name_xpath: + automatic_google_translation: + language: en + summary: Automic Google Translation + DeleteNLPAction: + value: + _version: '20250820' + question_name_xpath: + : + language: + value: null + summary: Delete NLP action + description: '`` can be any of:
* `manual_transcription`
* + `manual_translation`
* `automatic_google_transcription`
* + `automatic_google_translation`
`` is the language code, + e.g. `en`.' + AcceptAutomaticNLPAction: + value: + _version: '20250820' + question_name_xpath: + : + language: + accepted: true + summary: Accept automatic NLP action + description: '`` can be any of `automatic_google_transcription` + or `automatic_google_translation`.
`` is the language + code, e.g. `en`.
`accepted` is a boolean. It can `true` or `false`.' + QualitativeAnalysis–IntegerQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + uuid: 11111111-1111-1111-1111-111111111111 + value: 42 + summary: Qualitative Analysis – Integer Question + QualitativeAnalysis–TextQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + uuid: 22222222-2222-2222-2222-222222222222 + value: example-text + summary: Qualitative Analysis – Text Question + QualitativeAnalysis–SingleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + uuid: 33333333-3333-3333-3333-333333333333 + value: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + summary: Qualitative Analysis – Single Choice Question + QualitativeAnalysis–MultipleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + uuid: 44444444-4444-4444-4444-444444444444 + value: + - aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + - bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + summary: Qualitative Analysis – Multiple Choice Question + QualitativeAnalysis–TagsQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + uuid: 44444444-4444-4444-4444-444444444444 + value: + - tag1 + - tag2 + summary: Qualitative Analysis – Tags Question security: - BasicAuth: [] - TokenAuth: [] @@ -2491,6 +2789,206 @@ paths: application/json: schema: $ref: '#/components/schemas/DataSupplementResponse' + examples: + ManualTranscription: + value: + _version: '20250820' + question_name_xpath: + manual_transcription: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _uuid: 11111111-1111-1111-1111-111111111111 + _data: + language: fr + value: Bonjour + summary: Manual Transcription + ManualTranslation: + value: + _version: '20250820' + question_name_xpath: + manual_translation: + en: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _uuid: 22222222-2222-2222-2222-222222222222 + _data: + language: en + value: Hello + _dependency: + _actionId: manual_transcription + _uuid: 11111111-1111-1111-1111-111111111111 + es: + _dateCreated: '2025-01-01T12:01:00Z' + _dateModified: '2025-01-01T12:01:00Z' + _versions: + - _dateCreated: '2025-01-01T12:01:00Z' + _dateAccepted: '2025-01-01T12:01:00Z' + _uuid: 33333333-3333-3333-3333-333333333333 + _data: + language: es + value: Hola + _dependency: + _actionId: manual_transcription + _uuid: 11111111-1111-1111-1111-111111111111 + summary: Manual Translation + AutomatedGoogleTranscription: + value: + _version: '20250820' + question_name_xpath: + automated_google_transcription: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:01:00Z' + _versions: + - _dateCreated: '2025-01-01T12:01:00Z' + _uuid: 44444444-4444-4444-4444-444444444444 + _data: + language: en + status: complete + value: Hello world + _dateAccepted: '2025-01-01T12:01:00Z' + - _dateCreated: '2025-01-01T12:00:00Z' + _uuid: 44444444-4444-4444-4444-444444444444 + _data: + language: en + status: in_progress + summary: Automated Google Transcription + AutomatedGoogleTranslation: + value: + _version: '20250820' + question_name_xpath: + automated_google_translation: + fr: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:03:00Z' + _versions: + - _dateCreated: '2025-01-01T12:03:00Z' + _dateAccepted: '2025-01-01T12:03:00Z' + _uuid: 88888888-8888-8888-8888-888888888888 + _data: + language: fr + status: complete + value: Bonjour le monde + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:02:00Z' + _uuid: 77777777-7777-7777-7777-777777777777 + _data: + language: fr + status: in_progress + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:01:00Z' + _uuid: 66666666-6666-6666-6666-666666666666 + _data: + language: fr + value: null + status: deleted + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + - _dateCreated: '2025-01-01T12:00:00Z' + _uuid: 55555555-5555-5555-5555-555555555555 + language: fr + _data: + status: complete + value: Allo la foule + _dependency: + _actionId: automatic_google_transcription + _uuid: 44444444-4444-4444-4444-444444444444 + summary: Automated Google Translation + QualitativeAnalysis–IntegerQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 66666666-6666-6666-6666-666666666666: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 66666666-6666-6666-6666-666666666666 + value: 42 + _uuid: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + summary: Qualitative Analysis – Integer Question + QualitativeAnalysis–TextQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: aaaaaaaa-bbbb-cccc-dddd-eeeeffffffff + value: This is a qualitative text response. + _uuid: 12121212-3434-5656-7878-909090909090 + summary: Qualitative Analysis – Text Question + QualitativeAnalysis–SingleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 77777777-7777-7777-7777-777777777777: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 77777777-7777-7777-7777-777777777777 + value: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + _uuid: bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + summary: Qualitative Analysis – Single Choice Question + QualitativeAnalysis–MultipleChoiceQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + 88888888-8888-8888-8888-888888888888: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: 88888888-8888-8888-8888-888888888888 + value: + - aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa + - bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb + _uuid: 99999999-9999-9999-9999-999999999999 + summary: Qualitative Analysis – Multiple Choice Question + QualitativeAnalysis–TagsQuestion: + value: + _version: '20250820' + question_name_xpath: + qual: + bbbbbbbb-cccc-dddd-eeee-ffffffffffff: + _dateCreated: '2025-01-01T12:00:00Z' + _dateModified: '2025-01-01T12:00:00Z' + _versions: + - _dateCreated: '2025-01-01T12:00:00Z' + _dateAccepted: '2025-01-01T12:00:00Z' + _data: + uuid: bbbbbbbb-cccc-dddd-eeee-ffffffffffff + value: + - urgent + - review + - priority + _uuid: 23232323-4545-6767-8989-010101010101 + summary: Qualitative Analysis – Tags Question description: null '401': content: @@ -11017,7 +11515,7 @@ components: properties: _version: type: string - example: '20250812' + example: '20250820' question_name_xpath: type: object properties: @@ -14100,7 +14598,7 @@ components: properties: _version: type: string - example: '20250812' + example: '20250820' question_name_xpath: type: object properties: From 3ee24766e37fe19bed0a0f1b39ba3b4f6d6f5dd0 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Fri, 12 Dec 2025 12:04:22 -0500 Subject: [PATCH 23/33] fix schema errors and biome formatting --- ...utomatedGoogleTranscriptionVersionsItem.ts | 5 +- ...atedGoogleTranscriptionVersionsItemData.ts | 17 +++ ...hAutomatedGoogleTranslationVersionsItem.ts | 6 +- ...omatedGoogleTranslationVersionsItemData.ts | 17 +++ ...ameXpathManualTranscriptionVersionsItem.ts | 6 +- ...pathManualTranscriptionVersionsItemData.ts | 16 ++ ...nNameXpathManualTranslationVersionsItem.ts | 5 +- ...eXpathManualTranslationVersionsItemData.ts | 16 ++ ...onNameXpathAutomatedGoogleTranscription.ts | 1 - ...NameXpathAutomatedGoogleTranslationItem.ts | 1 - .../asset_with_old_advanced_features.json | 63 ++++---- kpi/schema_extensions/v2/data/examples.py | 2 +- kpi/schema_extensions/v2/data/extensions.py | 75 ++++++--- static/openapi/schema_v2.json | 142 +++++++++++------- static/openapi/schema_v2.yaml | 94 +++++++----- 15 files changed, 308 insertions(+), 158 deletions(-) create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts index 0206b25713..e10b59decd 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts @@ -9,12 +9,11 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData' export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem = { _dateCreated: string _uuid: string - language: string - value: string - status?: string _dateAccepted?: string + _data: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts new file mode 100644 index 0000000000..40c8015814 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData = { + language: string + value?: string + status?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts index d44dd5d4b5..697f6df417 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts @@ -10,12 +10,12 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency' +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData' export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { _dateCreated: string _uuid: string - language: string - value: string - status?: string _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency + _dateAccepted?: string + _data: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts new file mode 100644 index 0000000000..ce3059938c --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData = { + language: string + value?: string + status?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts index 91cfd68110..4bc9015c57 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts @@ -9,11 +9,11 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ +import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData' export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem = { _dateCreated: string _uuid: string - language: string - value: string - _dateAccepted?: string + _dateAccepted: string + _data: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts new file mode 100644 index 0000000000..696b4d5510 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData = { + language: string + value?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts index 2e06d3e91d..38cf3c3885 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts @@ -10,11 +10,12 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency' +import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData' export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { _dateCreated: string _uuid: string - language: string - value: string _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency + _dateAccepted: string + _data: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData } diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts new file mode 100644 index 0000000000..3762ef6061 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData = { + language: string + value?: string +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts index 708023fce9..51efcfa1b3 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts @@ -12,5 +12,4 @@ The endpoints are grouped by area of intended use. Each category contains relate export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription = { language: string - value: string } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts index ae270222b1..98eb8ff328 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts @@ -12,5 +12,4 @@ The endpoints are grouped by area of intended use. Each category contains relate export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem = { language: string - value: string } diff --git a/kpi/fixtures/asset_with_old_advanced_features.json b/kpi/fixtures/asset_with_old_advanced_features.json index 306ec3f0c2..6448a2a2c9 100644 --- a/kpi/fixtures/asset_with_old_advanced_features.json +++ b/kpi/fixtures/asset_with_old_advanced_features.json @@ -25,7 +25,7 @@ "qual": { "qual_survey": [ { - "labels": {"_default": "Note"}, + "labels": { "_default": "Note" }, "scope": "by_question#survey", "type": "qual_note", "uuid": "qual_note_q1", @@ -34,19 +34,19 @@ { "choices": [ { - "labels": {"_default": "Green"}, + "labels": { "_default": "Green" }, "uuid": "green_q1" }, { - "labels": {"_default": "Red"}, + "labels": { "_default": "Red" }, "uuid": "red_q1" }, { - "labels": {"_default": "Blue"}, + "labels": { "_default": "Blue" }, "uuid": "blue_q1" } ], - "labels": {"_default": "Multiple?"}, + "labels": { "_default": "Multiple?" }, "scope": "by_question#survey", "type": "qual_select_multiple", "uuid": "qual_select_multiple_q1", @@ -55,42 +55,43 @@ { "choices": [ { - "labels": {"_default": "A"}, + "labels": { "_default": "A" }, "uuid": "a_q1" }, { - "labels": {"_default": "B"}, - "uuid": "b_q1"} + "labels": { "_default": "B" }, + "uuid": "b_q1" + } ], - "labels": {"_default": "Single?"}, + "labels": { "_default": "Single?" }, "scope": "by_question#survey", "type": "qual_select_one", "uuid": "qual_select_one_q1", "xpath": "q1" }, { - "labels": {"_default": "Integer?"}, + "labels": { "_default": "Integer?" }, "scope": "by_question#survey", "type": "qual_integer", "uuid": "qual_integer_q1", "xpath": "q1" }, { - "labels": {"_default": "Text?"}, + "labels": { "_default": "Text?" }, "scope": "by_question#survey", "type": "qual_text", "uuid": "qual_text_q1", "xpath": "q1" }, { - "labels": {"_default": "Tags?"}, + "labels": { "_default": "Tags?" }, "scope": "by_question#survey", "type": "qual_tags", "uuid": "qual_tags_q1", "xpath": "q1" }, - { - "labels": {"_default": "Note"}, + { + "labels": { "_default": "Note" }, "scope": "by_question#survey", "type": "qual_note", "uuid": "qual_note_q2", @@ -99,19 +100,19 @@ { "choices": [ { - "labels": {"_default": "Green"}, + "labels": { "_default": "Green" }, "uuid": "green_q2" }, { - "labels": {"_default": "Red"}, + "labels": { "_default": "Red" }, "uuid": "red_q2" }, { - "labels": {"_default": "Blue"}, + "labels": { "_default": "Blue" }, "uuid": "blue_q2" } ], - "labels": {"_default": "Multiple?"}, + "labels": { "_default": "Multiple?" }, "scope": "by_question#survey", "type": "qual_select_multiple", "uuid": "qual_select_multiple_q2", @@ -120,35 +121,36 @@ { "choices": [ { - "labels": {"_default": "A"}, + "labels": { "_default": "A" }, "uuid": "a_q2" }, { - "labels": {"_default": "B"}, - "uuid": "b_q2"} + "labels": { "_default": "B" }, + "uuid": "b_q2" + } ], - "labels": {"_default": "Single?"}, + "labels": { "_default": "Single?" }, "scope": "by_question#survey", "type": "qual_select_one", "uuid": "qual_select_one_q2", "xpath": "q2" }, { - "labels": {"_default": "Integer?"}, + "labels": { "_default": "Integer?" }, "scope": "by_question#survey", "type": "qual_integer", "uuid": "qual_integer_q2", "xpath": "q2" }, { - "labels": {"_default": "Text?"}, + "labels": { "_default": "Text?" }, "scope": "by_question#survey", "type": "qual_text", "uuid": "qual_text_q2", "xpath": "q2" }, { - "labels": {"_default": "Tags?"}, + "labels": { "_default": "Tags?" }, "scope": "by_question#survey", "type": "qual_tags", "uuid": "qual_tags_q2", @@ -156,15 +158,10 @@ } ] }, - "transcript": {"languages": ["en"]}, - "translation": {"languages": ["es"]} + "transcript": { "languages": ["en"] }, + "translation": { "languages": ["es"] } }, - "known_cols": [ - "q1:transcript:en", - "q2:transcript:en", - "q1:translation:es", - "q2:translation:es" - ], + "known_cols": ["q1:transcript:en", "q2:transcript:en", "q1:translation:es", "q2:translation:es"], "date_created": "2022-04-05T21:00:22.402Z", "date_modified": "2022-04-05T21:00:33.946Z", "owner": 2, diff --git a/kpi/schema_extensions/v2/data/examples.py b/kpi/schema_extensions/v2/data/examples.py index 9dbdfcd233..8b74b62497 100644 --- a/kpi/schema_extensions/v2/data/examples.py +++ b/kpi/schema_extensions/v2/data/examples.py @@ -345,8 +345,8 @@ def _get_data_supplement_response_examples(): { '_dateCreated': iso0, '_uuid': '55555555-5555-5555-5555-555555555555', - 'language': 'fr', '_data': { + 'language': 'fr', 'status': 'complete', 'value': 'Allo la foule', }, diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index f134563622..2540289967 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -134,7 +134,10 @@ def map_serializer(self, auto_schema, direction): ) @classmethod - def _get_common_pair_schema(cls): + def _get_manual_pair_schema(cls): + """ + Used for Manual operations. Requires both language and value. + """ return build_object_type( additionalProperties=False, properties={ @@ -144,25 +147,38 @@ def _get_common_pair_schema(cls): required=['language', 'value'], ) + @classmethod + def _get_auto_pair_schema(cls): + """ + Used for Automated operations. Only requires language. + """ + return build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + }, + required=['language'], + ) + @classmethod def _get_manual_transcription_schema(cls): - return cls._get_common_pair_schema() + return cls._get_manual_pair_schema() @classmethod def _get_auto_transcription_schema(cls): - return cls._get_common_pair_schema() + return cls._get_auto_pair_schema() @classmethod def _get_manual_translation_schema(cls): return build_array_type( - schema=cls._get_common_pair_schema(), + schema=cls._get_manual_pair_schema(), min_length=1, ) @classmethod def _get_auto_translation_schema(cls): return build_array_type( - schema=cls._get_common_pair_schema(), + schema=cls._get_auto_pair_schema(), min_length=1, ) @@ -306,13 +322,11 @@ def map_serializer(self, auto_schema, direction): ) @classmethod - def _get_base_version_props(cls, include_status=False): + def _get_data_content_schema(cls, include_status=False): """ - Base properties for a version item. + Common Schema for the nested `_data` object found in versions. """ props = { - '_dateCreated': cls.DATETIME, - '_uuid': cls.UUID_STR, 'language': GENERIC_STRING_SCHEMA, 'value': GENERIC_STRING_SCHEMA, } @@ -320,11 +334,11 @@ def _get_base_version_props(cls, include_status=False): if include_status: props['status'] = GENERIC_STRING_SCHEMA - return props - - @classmethod - def _get_base_version_required(cls): - return ['_dateCreated', '_uuid', 'language', 'value'] + return build_object_type( + additionalProperties=False, + properties=props, + required=['language'], + ) @classmethod def _get_dependency_schema(cls): @@ -340,15 +354,25 @@ def _get_dependency_schema(cls): @classmethod def _build_transcription_schema(cls, include_status=False): """ - Helper for both manual and automated transcription. + Transcription Schema: + _versions list where each item has a nested `_data` object. + _dateAccepted is required if Manual (include_status=False), optional otherwise. """ + required_fields = ['_dateCreated', '_uuid', '_data'] + + # If Manual (no status), dateAccepted is Mandatory. + if not include_status: + required_fields.append('_dateAccepted') + version_item = build_object_type( additionalProperties=False, properties={ - **cls._get_base_version_props(include_status=include_status), - '_dateAccepted': cls.DATETIME, # Optional + '_dateCreated': cls.DATETIME, + '_uuid': cls.UUID_STR, + '_dateAccepted': cls.DATETIME, + '_data': cls._get_data_content_schema(include_status=include_status), }, - required=cls._get_base_version_required(), + required=required_fields, ) return build_object_type( @@ -366,15 +390,24 @@ def _build_translation_schema(cls, include_status=False): """ Translation Schema: Map. - The keys are dynamic strings (e.g., 'en', 'es'). + _dateAccepted is required if Manual (include_status=False), optional otherwise. """ + required_fields = ['_dateCreated', '_uuid', '_dependency', '_data'] + + # If Manual (no status), dateAccepted is Mandatory. + if not include_status: + required_fields.append('_dateAccepted') + version_item = build_object_type( additionalProperties=False, properties={ - **cls._get_base_version_props(include_status), + '_dateCreated': cls.DATETIME, + '_uuid': cls.UUID_STR, '_dependency': cls._get_dependency_schema(), + '_dateAccepted': cls.DATETIME, + '_data': cls._get_data_content_schema(include_status=include_status), }, - required=[*cls._get_base_version_required(), '_dependency'], + required=required_fields, ) inner_action_schema = build_object_type( diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 3db290209d..b918b3e586 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -3363,8 +3363,8 @@ { "_dateCreated": "2025-01-01T12:00:00Z", "_uuid": "55555555-5555-5555-5555-555555555555", - "language": "fr", "_data": { + "language": "fr", "status": "complete", "value": "Allo la foule" }, @@ -3940,8 +3940,8 @@ { "_dateCreated": "2025-01-01T12:00:00Z", "_uuid": "55555555-5555-5555-5555-555555555555", - "language": "fr", "_data": { + "language": "fr", "status": "complete", "value": "Allo la foule" }, @@ -15926,23 +15926,32 @@ "type": "string", "format": "uuid" }, - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, "_dateAccepted": { "type": "string", "format": "date-time" + }, + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] } }, "additionalProperties": false, "required": [ + "_data", + "_dateAccepted", "_dateCreated", - "_uuid", - "language", - "value" + "_uuid" ] }, "minLength": 1 @@ -15981,12 +15990,6 @@ "type": "string", "format": "uuid" }, - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, "_dependency": { "type": "object", "properties": { @@ -16003,15 +16006,34 @@ "_actionId", "_uuid" ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] } }, "additionalProperties": false, "required": [ + "_data", + "_dateAccepted", "_dateCreated", "_dependency", - "_uuid", - "language", - "value" + "_uuid" ] }, "minLength": 1 @@ -16049,26 +16071,34 @@ "type": "string", "format": "uuid" }, - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, - "status": { - "type": "string" - }, "_dateAccepted": { "type": "string", "format": "date-time" + }, + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] } }, "additionalProperties": false, "required": [ + "_data", "_dateCreated", - "_uuid", - "language", - "value" + "_uuid" ] }, "minLength": 1 @@ -16107,15 +16137,6 @@ "type": "string", "format": "uuid" }, - "language": { - "type": "string" - }, - "value": { - "type": "string" - }, - "status": { - "type": "string" - }, "_dependency": { "type": "object", "properties": { @@ -16132,15 +16153,36 @@ "_actionId", "_uuid" ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] } }, "additionalProperties": false, "required": [ + "_data", "_dateCreated", "_dependency", - "_uuid", - "language", - "value" + "_uuid" ] }, "minLength": 1 @@ -20282,15 +20324,11 @@ "properties": { "language": { "type": "string" - }, - "value": { - "type": "string" } }, "additionalProperties": false, "required": [ - "language", - "value" + "language" ] }, "automated_google_translation": { @@ -20300,15 +20338,11 @@ "properties": { "language": { "type": "string" - }, - "value": { - "type": "string" } }, "additionalProperties": false, "required": [ - "language", - "value" + "language" ] }, "minLength": 1 diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 339ee9070e..2739dda403 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -2518,8 +2518,8 @@ paths: _uuid: 44444444-4444-4444-4444-444444444444 - _dateCreated: '2025-01-01T12:00:00Z' _uuid: 55555555-5555-5555-5555-555555555555 - language: fr _data: + language: fr status: complete value: Allo la foule _dependency: @@ -2896,8 +2896,8 @@ paths: _uuid: 44444444-4444-4444-4444-444444444444 - _dateCreated: '2025-01-01T12:00:00Z' _uuid: 55555555-5555-5555-5555-555555555555 - language: fr _data: + language: fr status: complete value: Allo la foule _dependency: @@ -11539,19 +11539,25 @@ components: _uuid: type: string format: uuid - language: - type: string - value: - type: string _dateAccepted: type: string format: date-time + _data: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language additionalProperties: false required: + - _data + - _dateAccepted - _dateCreated - _uuid - - language - - value minLength: 1 additionalProperties: false required: @@ -11580,10 +11586,6 @@ components: _uuid: type: string format: uuid - language: - type: string - value: - type: string _dependency: type: object properties: @@ -11596,13 +11598,26 @@ components: required: - _actionId - _uuid + _dateAccepted: + type: string + format: date-time + _data: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language additionalProperties: false required: + - _data + - _dateAccepted - _dateCreated - _dependency - _uuid - - language - - value minLength: 1 additionalProperties: false required: @@ -11629,21 +11644,26 @@ components: _uuid: type: string format: uuid - language: - type: string - value: - type: string - status: - type: string _dateAccepted: type: string format: date-time + _data: + type: object + properties: + language: + type: string + value: + type: string + status: + type: string + additionalProperties: false + required: + - language additionalProperties: false required: + - _data - _dateCreated - _uuid - - language - - value minLength: 1 additionalProperties: false required: @@ -11672,12 +11692,6 @@ components: _uuid: type: string format: uuid - language: - type: string - value: - type: string - status: - type: string _dependency: type: object properties: @@ -11690,13 +11704,27 @@ components: required: - _actionId - _uuid + _dateAccepted: + type: string + format: date-time + _data: + type: object + properties: + language: + type: string + value: + type: string + status: + type: string + additionalProperties: false + required: + - language additionalProperties: false required: + - _data - _dateCreated - _dependency - _uuid - - language - - value minLength: 1 additionalProperties: false required: @@ -14632,12 +14660,9 @@ components: properties: language: type: string - value: - type: string additionalProperties: false required: - language - - value automated_google_translation: type: array items: @@ -14645,12 +14670,9 @@ components: properties: language: type: string - value: - type: string additionalProperties: false required: - language - - value minLength: 1 qual: oneOf: From 72fac69901f938408769c778508a39fc53df5363 Mon Sep 17 00:00:00 2001 From: RuthShryock Date: Fri, 12 Dec 2025 12:07:40 -0500 Subject: [PATCH 24/33] fix imports sorting causing biome failures --- ...seQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts | 2 +- ...entResponseQuestionNameXpathManualTranslationVersionsItem.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts index 697f6df417..c6ac8aebe5 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts @@ -1,3 +1,4 @@ +import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData' /** * Generated by orval v7.10.0 🍺 * Do not edit manually. @@ -10,7 +11,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency' -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData' export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { _dateCreated: string diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts index 38cf3c3885..59ec3da413 100644 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts +++ b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts @@ -1,3 +1,4 @@ +import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData' /** * Generated by orval v7.10.0 🍺 * Do not edit manually. @@ -10,7 +11,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency' -import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData' export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { _dateCreated: string From 7f582623fd10223ed5e68c4aefb27caca033ad4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Fri, 12 Dec 2025 16:46:25 -0500 Subject: [PATCH 25/33] fix: update schema to support dynamic question names --- kobo/apps/subsequences/models.py | 2 +- kpi/schema_extensions/v2/data/extensions.py | 289 +++++++++++--------- kpi/schema_extensions/v2/generic/schema.py | 5 + 3 files changed, 172 insertions(+), 124 deletions(-) diff --git a/kobo/apps/subsequences/models.py b/kobo/apps/subsequences/models.py index 9d664f073f..cd68a3ca00 100644 --- a/kobo/apps/subsequences/models.py +++ b/kobo/apps/subsequences/models.py @@ -82,7 +82,7 @@ def revise_data(asset: 'kpi.Asset', submission: dict, incoming_data: dict) -> di raise InvalidAction from e action = feature.to_action() - action.check_limits(asset.owner) + # action.check_limits(asset.owner) question_supplemental_data = supplemental_data.setdefault( question_xpath, {} diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 2540289967..84a9e9913b 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -9,7 +9,8 @@ ) from drf_spectacular.types import OpenApiTypes -from kpi.schema_extensions.v2.generic.schema import GENERIC_STRING_SCHEMA +from kpi.schema_extensions.v2.generic.schema import GENERIC_STRING_SCHEMA, \ + STATUS_NLP_ACTION_SCHEMA from kpi.utils.schema_extensions.url_builder import build_url_type @@ -106,80 +107,55 @@ def map_serializer(self, auto_schema, direction): '_version': { 'type': 'string', 'example': '20250820', + } + }, + additionalProperties=build_object_type( + additionalProperties=False, + properties={ + 'manual_transcription': self._get_manual_nlp_action_schema(), + 'manual_translation': self._get_manual_nlp_action_schema(), + 'automatic_google_transcription': ( + self._get_auto_nlp_action_schema() + ), + 'automatic_google_translation': ( + self._get_auto_nlp_action_schema() + ), + 'qual': self._get_qual_schema(), }, - 'question_name_xpath': build_object_type( - additionalProperties=False, - properties={ - 'manual_transcription': ( - self._get_manual_transcription_schema() - ), - 'manual_translation': (self._get_manual_translation_schema()), - 'automated_google_transcription': ( - self._get_auto_transcription_schema() - ), - 'automated_google_translation': ( - self._get_auto_translation_schema() - ), - 'qual': self._get_qual_schema(), - }, - anyOf=[ - {'required': ['manual_transcription']}, - {'required': ['manual_translation']}, - {'required': ['automated_google_transcription']}, - {'required': ['automated_google_translation']}, - {'required': ['qual']}, - ], - ), - } + anyOf=[ + {'required': ['manual_transcription']}, + {'required': ['manual_translation']}, + {'required': ['automatic_google_transcription']}, + {'required': ['automatic_google_translation']}, + {'required': ['qual']}, + ], + ), + required=['_version'], ) @classmethod - def _get_manual_pair_schema(cls): - """ - Used for Manual operations. Requires both language and value. - """ + def _get_auto_nlp_action_schema(cls): + return build_object_type( additionalProperties=False, properties={ 'language': GENERIC_STRING_SCHEMA, - 'value': GENERIC_STRING_SCHEMA, + 'accepted': {'type': 'boolean'}, }, - required=['language', 'value'], + required=['language'], ) + @classmethod - def _get_auto_pair_schema(cls): - """ - Used for Automated operations. Only requires language. - """ + def _get_manual_nlp_action_schema(cls): + return build_object_type( additionalProperties=False, properties={ 'language': GENERIC_STRING_SCHEMA, + 'value': GENERIC_STRING_SCHEMA, }, - required=['language'], - ) - - @classmethod - def _get_manual_transcription_schema(cls): - return cls._get_manual_pair_schema() - - @classmethod - def _get_auto_transcription_schema(cls): - return cls._get_auto_pair_schema() - - @classmethod - def _get_manual_translation_schema(cls): - return build_array_type( - schema=cls._get_manual_pair_schema(), - min_length=1, - ) - - @classmethod - def _get_auto_translation_schema(cls): - return build_array_type( - schema=cls._get_auto_pair_schema(), - min_length=1, + required=['language', 'value'], ) @classmethod @@ -224,6 +200,15 @@ def _get_qual_schema(cls): }, }, }, + 'qualTags': { + 'type': 'object', + 'properties': { + 'value': { + 'type': 'array', + 'items': {'type': 'string'}, + }, + }, + }, } return { @@ -276,6 +261,18 @@ def _get_qual_schema(cls): }, ], }, + { + 'allOf': [ + qual_defs['qualCommon'], + qual_defs['qualTags'], + { + 'type': 'object', + 'properties': { + 'uuid': cls.UUID_STR, + }, + }, + ], + }, ], } @@ -287,68 +284,38 @@ class DataSupplementResponseExtension(OpenApiSerializerExtension): UUID_STR = {'type': 'string', 'format': 'uuid'} def map_serializer(self, auto_schema, direction): + return build_object_type( properties={ '_version': { 'type': 'string', 'example': '20250820', - }, - 'question_name_xpath': build_object_type( - additionalProperties=False, - properties={ - 'manual_transcription': ( - self._get_manual_transcription_schema() - ), - 'manual_translation': (self._get_manual_translation_schema()), - 'automated_google_transcription': ( - self._get_auto_transcription_schema() - ), - 'automated_google_translation': ( - self._get_auto_translation_schema() - ), - 'qual': self._get_qual_schema(), - }, - # At least one of "manual_transcription" or "manual_translation" - # must be present - anyOf=[ - {'required': ['manual_transcription']}, - {'required': ['manual_translation']}, - {'required': ['automated_google_transcription']}, - {'required': ['automated_google_translation']}, - {'required': ['qual']}, - ], - ), - } - ) - - @classmethod - def _get_data_content_schema(cls, include_status=False): - """ - Common Schema for the nested `_data` object found in versions. - """ - props = { - 'language': GENERIC_STRING_SCHEMA, - 'value': GENERIC_STRING_SCHEMA, - } - - if include_status: - props['status'] = GENERIC_STRING_SCHEMA - - return build_object_type( - additionalProperties=False, - properties=props, - required=['language'], - ) - - @classmethod - def _get_dependency_schema(cls): - return build_object_type( - additionalProperties=False, - properties={ - '_actionId': GENERIC_STRING_SCHEMA, - '_uuid': cls.UUID_STR, + } }, - required=['_actionId', '_uuid'], + additionalProperties=build_object_type( + additionalProperties=False, + properties={ + 'manual_transcription': self._get_manual_transcription_schema(), + 'manual_translation': self._get_manual_translation_schema(), + 'automated_google_transcription': ( + self._get_auto_transcription_schema() + ), + 'automated_google_translation': ( + self._get_auto_translation_schema() + ), + 'qual': self._get_qual_schema(), + }, + # At least one of "manual_transcription" or "manual_translation" + # must be present + anyOf=[ + {'required': ['manual_transcription']}, + {'required': ['manual_translation']}, + {'required': ['automated_google_transcription']}, + {'required': ['automated_google_translation']}, + {'required': ['qual']}, + ], + ), + required=['_version'], ) @classmethod @@ -420,26 +387,102 @@ def _build_translation_schema(cls, include_status=False): required=['_dateCreated', '_dateModified', '_versions'], ) - return build_object_type( - additionalProperties=inner_action_schema, - ) + return build_object_type(additionalProperties=inner_action_schema) @classmethod - def _get_manual_transcription_schema(cls): - return cls._build_transcription_schema(include_status=False) + def _get_base_version_required(cls): + return ['_dateCreated', '_uuid', '_data'] @classmethod - def _get_auto_transcription_schema(cls): - return cls._build_transcription_schema(include_status=True) + def _get_data_content_schema(cls, include_status=False): + """ + Common Schema for the nested `_data` object found in versions. + """ + + if not include_status: + return build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'value': {'type': 'string', 'nullable': True}, + }, + required=['language', 'value'], + ) + + return { + 'oneOf': [ + # in_progress → no value, no error + build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'status': {'type': 'string', 'const': 'in_progress'}, + }, + required=['language', 'status'], + ), + + # failed → error required, no value + build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'status': {'type': 'string', 'const': 'failed'}, + 'error': {'type': 'string'}, + }, + required=['language', 'status', 'error'], + ), + + # complete → value required (string) + build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'status': {'type': 'string', 'const': 'complete'}, + 'value': {'type': 'string'}, + }, + required=['language', 'status', 'value'], + ), + + # deleted → value required AND must be null + build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'status': {'type': 'string', 'const': 'deleted'}, + 'value': {'type': 'null'}, + }, + required=['language', 'status', 'value'], + ), + ] + } @classmethod - def _get_manual_translation_schema(cls): - return cls._build_translation_schema(include_status=False) + def _get_dependency_schema(cls): + return build_object_type( + additionalProperties=False, + properties={ + '_actionId': GENERIC_STRING_SCHEMA, + '_uuid': cls.UUID_STR, + }, + required=['_actionId', '_uuid'], + ) + + @classmethod + def _get_auto_transcription_schema(cls): + return cls._build_transcription_schema(include_status=True) @classmethod def _get_auto_translation_schema(cls): return cls._build_translation_schema(include_status=True) + @classmethod + def _get_manual_transcription_schema(cls): + return cls._build_transcription_schema(include_status=False) + + @classmethod + def _get_manual_translation_schema(cls): + return cls._build_translation_schema(include_status=False) + @classmethod def _get_qual_schema(cls): """ diff --git a/kpi/schema_extensions/v2/generic/schema.py b/kpi/schema_extensions/v2/generic/schema.py index 55089ac762..c6fcb4b2f1 100644 --- a/kpi/schema_extensions/v2/generic/schema.py +++ b/kpi/schema_extensions/v2/generic/schema.py @@ -76,3 +76,8 @@ GENERIC_OBJECT_SCHEMA = build_object_type(properties={}) USER_URL_SCHEMA = build_url_type('api_v2:user-kpi-detail', username='bob') + +STATUS_NLP_ACTION_SCHEMA = { + 'type': 'string', + 'enum': ['failed', 'complete', 'deleted', 'in_progress'], +} From abc568a2c2922eacf67e7821bc9d665f028f2522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Fri, 12 Dec 2025 17:04:34 -0500 Subject: [PATCH 26/33] docs: update markdowns --- kpi/docs/api/v2/data/supplement_retrieve.md | 24 ++++++++++++++++++++- kpi/docs/api/v2/data/supplement_update.md | 16 +++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/kpi/docs/api/v2/data/supplement_retrieve.md b/kpi/docs/api/v2/data/supplement_retrieve.md index c1ce431843..7a8dd23b0a 100644 --- a/kpi/docs/api/v2/data/supplement_retrieve.md +++ b/kpi/docs/api/v2/data/supplement_retrieve.md @@ -1 +1,23 @@ -## TBC Supplement retrieve +## Retrieve submission supplementary data + +This endpoint allows you to retrieve supplementary data attached to a submission. + +The supplementary data may include: + +* NLP actions + * Manual transcription + * Manual translation + * Automatic Google transcription + * Automatic Google translation +* Qualitative analysis + * Text + * Number + * Single Choice + * Multiple Choice + * Tags + +⚠️ The response examples in this documentation show each action in isolation for +readability. + +In practice, multiple actions can be combined for the same question, and a single +submission may contain multiple questions. diff --git a/kpi/docs/api/v2/data/supplement_update.md b/kpi/docs/api/v2/data/supplement_update.md index cd370eb445..ff6ec0c8ac 100644 --- a/kpi/docs/api/v2/data/supplement_update.md +++ b/kpi/docs/api/v2/data/supplement_update.md @@ -1 +1,15 @@ -## TBC Supplement update +## Update submission supplementary data + +This endpoint allows you to add, update, or delete supplementary data for a submission. + +It supports the same action types as the GET endpoint: + +* NLP actions (manual and automatic transcription / translation) +* Qualitative analysis + +The PATCH payload follows the same per-question structure as the GET response. + +⚠️ In this documentation, request and response examples present each action in +isolation for clarity. In practice, multiple actions may be combined within the same +payload or response, including for the same question, and a single submission may +contain multiple questions. From 5149035c05948dd93383e6399cb2de8f61e984c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Fri, 12 Dec 2025 17:07:31 -0500 Subject: [PATCH 27/33] style: linter --- kpi/schema_extensions/v2/data/extensions.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 84a9e9913b..c156dea2df 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -9,8 +9,7 @@ ) from drf_spectacular.types import OpenApiTypes -from kpi.schema_extensions.v2.generic.schema import GENERIC_STRING_SCHEMA, \ - STATUS_NLP_ACTION_SCHEMA +from kpi.schema_extensions.v2.generic.schema import GENERIC_STRING_SCHEMA from kpi.utils.schema_extensions.url_builder import build_url_type @@ -145,7 +144,6 @@ def _get_auto_nlp_action_schema(cls): required=['language'], ) - @classmethod def _get_manual_nlp_action_schema(cls): @@ -420,7 +418,6 @@ def _get_data_content_schema(cls, include_status=False): }, required=['language', 'status'], ), - # failed → error required, no value build_object_type( additionalProperties=False, @@ -431,7 +428,6 @@ def _get_data_content_schema(cls, include_status=False): }, required=['language', 'status', 'error'], ), - # complete → value required (string) build_object_type( additionalProperties=False, @@ -442,7 +438,6 @@ def _get_data_content_schema(cls, include_status=False): }, required=['language', 'status', 'value'], ), - # deleted → value required AND must be null build_object_type( additionalProperties=False, From c5f8e2f8be5230f37ef73467b14d2677a6946c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Fri, 12 Dec 2025 17:07:55 -0500 Subject: [PATCH 28/33] fix: update OpenAPI schemas and Orval helpers --- ...utomatedGoogleTranscriptionVersionsItem.ts | 19 - ...atedGoogleTranscriptionVersionsItemData.ts | 17 - ...hAutomatedGoogleTranslationVersionsItem.ts | 21 - ...omatedGoogleTranslationVersionsItemData.ts | 17 - ...GoogleTranslationVersionsItemDependency.ts | 16 - ...ameXpathManualTranscriptionVersionsItem.ts | 19 - ...pathManualTranscriptionVersionsItemData.ts | 16 - ...nNameXpathManualTranslationVersionsItem.ts | 21 - ...eXpathManualTranslationVersionsItemData.ts | 16 - ...ManualTranslationVersionsItemDependency.ts | 16 - ...sponseQuestionNameXpathQualVersionsItem.ts | 19 - ...seQuestionNameXpathQualVersionsItemData.ts | 23 - ...stionNameXpathQualVersionsItemDataOneOf.ts | 17 - ...NameXpathQualVersionsItemDataOneOfAllOf.ts | 16 - ...eXpathQualVersionsItemDataOneOfAllOfTwo.ts | 16 - ...nNameXpathQualVersionsItemDataOneOfFour.ts | 17 - ...XpathQualVersionsItemDataOneOfFourAllOf.ts | 16 - ...thQualVersionsItemDataOneOfFourAllOfTwo.ts | 15 - ...eXpathQualVersionsItemDataOneOfOnethree.ts | 17 - ...hQualVersionsItemDataOneOfOnethreeAllOf.ts | 16 - ...alVersionsItemDataOneOfOnethreeAllOfTwo.ts | 15 - ...meXpathQualVersionsItemDataOneOfOnezero.ts | 17 - ...thQualVersionsItemDataOneOfOnezeroAllOf.ts | 16 - ...ualVersionsItemDataOneOfOnezeroAllOfTwo.ts | 15 - ...NameXpathQualVersionsItemDataOneOfSeven.ts | 17 - ...pathQualVersionsItemDataOneOfSevenAllOf.ts | 16 - ...hQualVersionsItemDataOneOfSevenAllOfTwo.ts | 15 - jsapp/js/api/models/dataSupplementResponse.ts | 40 +- ...dataSupplementResponseQuestionNameXpath.ts | 53 - ...onNameXpathAutomatedGoogleTranscription.ts | 19 - ...tionNameXpathAutomatedGoogleTranslation.ts | 21 - ...nseQuestionNameXpathManualTranscription.ts | 19 - ...ponseQuestionNameXpathManualTranslation.ts | 21 - ...SupplementResponseQuestionNameXpathQual.ts | 21 - .../models/patchedDataSupplementPayload.ts | 40 +- ...dDataSupplementPayloadQuestionNameXpath.ts | 63 - ...onNameXpathAutomatedGoogleTranscription.ts | 15 - ...NameXpathAutomatedGoogleTranslationItem.ts | 15 - ...oadQuestionNameXpathManualTranscription.ts | 16 - ...dQuestionNameXpathManualTranslationItem.ts | 16 - ...aSupplementPayloadQuestionNameXpathQual.ts | 21 - ...lementPayloadQuestionNameXpathQualOneOf.ts | 19 - ...tPayloadQuestionNameXpathQualOneOfAllOf.ts | 16 - ...oadQuestionNameXpathQualOneOfAllOfThree.ts | 15 - ...yloadQuestionNameXpathQualOneOfAllOfTwo.ts | 16 - ...ntPayloadQuestionNameXpathQualOneOfFive.ts | 19 - ...loadQuestionNameXpathQualOneOfFiveAllOf.ts | 16 - ...uestionNameXpathQualOneOfFiveAllOfThree.ts | 15 - ...dQuestionNameXpathQualOneOfFiveAllOfTwo.ts | 15 - ...ntPayloadQuestionNameXpathQualOneOfNine.ts | 19 - ...loadQuestionNameXpathQualOneOfNineAllOf.ts | 16 - ...uestionNameXpathQualOneOfNineAllOfThree.ts | 15 - ...dQuestionNameXpathQualOneOfNineAllOfTwo.ts | 15 - ...yloadQuestionNameXpathQualOneOfOnethree.ts | 19 - ...QuestionNameXpathQualOneOfOnethreeAllOf.ts | 16 - ...ionNameXpathQualOneOfOnethreeAllOfThree.ts | 15 - ...stionNameXpathQualOneOfOnethreeAllOfTwo.ts | 15 - jsapp/js/api/react-query/survey-data.ts | 40 +- static/openapi/schema_v2.json | 1392 ++++++++++------- static/openapi/schema_v2.yaml | 941 ++++++----- 60 files changed, 1444 insertions(+), 2031 deletions(-) delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts delete mode 100644 jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts delete mode 100644 jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts delete mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts deleted file mode 100644 index e10b59decd..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData' - -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem = { - _dateCreated: string - _uuid: string - _dateAccepted?: string - _data: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts deleted file mode 100644 index 40c8015814..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItemData = { - language: string - value?: string - status?: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts deleted file mode 100644 index c6ac8aebe5..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData' -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency' - -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem = { - _dateCreated: string - _uuid: string - _dependency: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency - _dateAccepted?: string - _data: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts deleted file mode 100644 index ce3059938c..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemData = { - language: string - value?: string - status?: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts deleted file mode 100644 index 66de98be0c..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItemDependency = { - _actionId: string - _uuid: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts deleted file mode 100644 index 4bc9015c57..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData' - -export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem = { - _dateCreated: string - _uuid: string - _dateAccepted: string - _data: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts deleted file mode 100644 index 696b4d5510..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItemData = { - language: string - value?: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts deleted file mode 100644 index 59ec3da413..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData' -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency' - -export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem = { - _dateCreated: string - _uuid: string - _dependency: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency - _dateAccepted: string - _data: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts deleted file mode 100644 index 3762ef6061..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemData = { - language: string - value?: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts deleted file mode 100644 index 6930a74268..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItemDependency = { - _actionId: string - _uuid: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts deleted file mode 100644 index 02dad3783d..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItem.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemData } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemData' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItem = { - _data: _DataSupplementResponseQuestionNameXpathQualVersionsItemData - _dateAccepted?: string - _dateCreated: string - _uuid: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts deleted file mode 100644 index 68884c151b..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemData.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemData = - | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf - | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour - | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven - | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero - | _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts deleted file mode 100644 index 5d297d5f0d..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOf = - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf & - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts deleted file mode 100644 index 5a1c2ceb27..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts deleted file mode 100644 index e48b232843..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfAllOfTwo = { - /** @nullable */ - value?: number | null -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts deleted file mode 100644 index f506451ce8..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFour = - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf & - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts deleted file mode 100644 index 5c5922adc1..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts deleted file mode 100644 index ff04ea0ddd..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfFourAllOfTwo = { - value?: string[] -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts deleted file mode 100644 index c8e3c9ebba..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethree = - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf & - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts deleted file mode 100644 index dcab534fd7..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts deleted file mode 100644 index a851dc0131..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnethreeAllOfTwo = { - value?: string -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts deleted file mode 100644 index 6a3618a5f8..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezero = - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf & - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts deleted file mode 100644 index ded1478afb..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts deleted file mode 100644 index a8d6007494..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfOnezeroAllOfTwo = { - value?: string[] -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts deleted file mode 100644 index 268da9732d..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf' -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo } from './_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo' - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSeven = - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf & - _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts deleted file mode 100644 index 51b84b29f9..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts deleted file mode 100644 index 59ee91696c..0000000000 --- a/jsapp/js/api/models/_dataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type _DataSupplementResponseQuestionNameXpathQualVersionsItemDataOneOfSevenAllOfTwo = { - value?: string -} diff --git a/jsapp/js/api/models/dataSupplementResponse.ts b/jsapp/js/api/models/dataSupplementResponse.ts index f298492268..8c98ec68ca 100644 --- a/jsapp/js/api/models/dataSupplementResponse.ts +++ b/jsapp/js/api/models/dataSupplementResponse.ts @@ -9,9 +9,43 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { DataSupplementResponseQuestionNameXpath } from './dataSupplementResponseQuestionNameXpath' export interface DataSupplementResponse { - _version?: string - question_name_xpath?: DataSupplementResponseQuestionNameXpath + _version: string + [key: string]: + | (unknown & { + manual_transcription?: DataSupplementResponseManualTranscription + manual_translation?: DataSupplementResponseManualTranslation + automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation + qual?: DataSupplementResponseQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseManualTranscription + manual_translation?: DataSupplementResponseManualTranslation + automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation + qual?: DataSupplementResponseQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseManualTranscription + manual_translation?: DataSupplementResponseManualTranslation + automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation + qual?: DataSupplementResponseQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseManualTranscription + manual_translation?: DataSupplementResponseManualTranslation + automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation + qual?: DataSupplementResponseQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseManualTranscription + manual_translation?: DataSupplementResponseManualTranslation + automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription + automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation + qual?: DataSupplementResponseQual + }) } diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts deleted file mode 100644 index edabd94a13..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpath.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription' -import type { DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation } from './dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation' -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementResponseQuestionNameXpathManualTranscription } from './dataSupplementResponseQuestionNameXpathManualTranscription' -import type { DataSupplementResponseQuestionNameXpathManualTranslation } from './dataSupplementResponseQuestionNameXpathManualTranslation' -import type { DataSupplementResponseQuestionNameXpathQual } from './dataSupplementResponseQuestionNameXpathQual' - -export type DataSupplementResponseQuestionNameXpath = - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation - qual?: DataSupplementResponseQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseQuestionNameXpathManualTranscription - manual_translation?: DataSupplementResponseQuestionNameXpathManualTranslation - automated_google_transcription?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation - qual?: DataSupplementResponseQuestionNameXpathQual - }) diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts deleted file mode 100644 index 504718f013..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem' - -export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscription = { - _dateCreated: string - _dateModified: string - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranscriptionVersionsItem[] -} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts deleted file mode 100644 index baa14c5fe5..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem' - -export type DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslation = { - [key: string]: { - _dateCreated: string - _dateModified: string - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathAutomatedGoogleTranslationVersionsItem[] - } -} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts deleted file mode 100644 index 35e00fa99e..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranscription.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem' - -export type DataSupplementResponseQuestionNameXpathManualTranscription = { - _dateCreated: string - _dateModified: string - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathManualTranscriptionVersionsItem[] -} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts deleted file mode 100644 index 1bacf04d51..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathManualTranslation.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem } from './_dataSupplementResponseQuestionNameXpathManualTranslationVersionsItem' - -export type DataSupplementResponseQuestionNameXpathManualTranslation = { - [key: string]: { - _dateCreated: string - _dateModified: string - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathManualTranslationVersionsItem[] - } -} diff --git a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts b/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts deleted file mode 100644 index 957d0c731e..0000000000 --- a/jsapp/js/api/models/dataSupplementResponseQuestionNameXpathQual.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { _DataSupplementResponseQuestionNameXpathQualVersionsItem } from './_dataSupplementResponseQuestionNameXpathQualVersionsItem' - -export type DataSupplementResponseQuestionNameXpathQual = { - [key: string]: { - _dateCreated: string - _dateModified: string - /** @minLength 1 */ - _versions: _DataSupplementResponseQuestionNameXpathQualVersionsItem[] - } -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayload.ts b/jsapp/js/api/models/patchedDataSupplementPayload.ts index 355efe8f6f..b296fd68e0 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayload.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayload.ts @@ -9,9 +9,43 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { PatchedDataSupplementPayloadQuestionNameXpath } from './patchedDataSupplementPayloadQuestionNameXpath' export interface PatchedDataSupplementPayload { - _version?: string - question_name_xpath?: PatchedDataSupplementPayloadQuestionNameXpath + _version: string + [key: string]: + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadManualTranscription + manual_translation?: PatchedDataSupplementPayloadManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadManualTranscription + manual_translation?: PatchedDataSupplementPayloadManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadManualTranscription + manual_translation?: PatchedDataSupplementPayloadManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadManualTranscription + manual_translation?: PatchedDataSupplementPayloadManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadManualTranscription + manual_translation?: PatchedDataSupplementPayloadManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadQual + }) } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts deleted file mode 100644 index b8a4db6743..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpath.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription' -import type { PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem' -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranscription } from './patchedDataSupplementPayloadQuestionNameXpathManualTranscription' -import type { PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem } from './patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem' -import type { PatchedDataSupplementPayloadQuestionNameXpathQual } from './patchedDataSupplementPayloadQuestionNameXpathQual' - -export type PatchedDataSupplementPayloadQuestionNameXpath = - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadQuestionNameXpathManualTranscription - /** @minLength 1 */ - manual_translation?: PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem[] - automated_google_transcription?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription - /** @minLength 1 */ - automated_google_translation?: PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem[] - qual?: PatchedDataSupplementPayloadQuestionNameXpathQual - }) diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts deleted file mode 100644 index 51efcfa1b3..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranscription = { - language: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts deleted file mode 100644 index 98eb8ff328..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathAutomatedGoogleTranslationItem = { - language: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts deleted file mode 100644 index 608f4bc4dd..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranscription.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathManualTranscription = { - language: string - value: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts deleted file mode 100644 index 981d0bad07..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathManualTranslationItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathManualTranslationItem = { - language: string - value: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts deleted file mode 100644 index 942e553fea..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQual.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOf' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree' - -export type PatchedDataSupplementPayloadQuestionNameXpathQual = - | PatchedDataSupplementPayloadQuestionNameXpathQualOneOf - | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive - | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine - | PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts deleted file mode 100644 index 9b3ec75cc8..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOf.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo' - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOf = - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts deleted file mode 100644 index 5675de99ae..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts deleted file mode 100644 index d8f6e7a924..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfThree = { - uuid?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts deleted file mode 100644 index f2735f2424..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfAllOfTwo = { - /** @nullable */ - value?: number | null -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts deleted file mode 100644 index 48e25c2e3e..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFive.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo' - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFive = - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts deleted file mode 100644 index 0a84a6c275..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts deleted file mode 100644 index 7b9af964d3..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfThree = { - uuid?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts deleted file mode 100644 index 3dbb26dbdc..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfFiveAllOfTwo = { - value?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts deleted file mode 100644 index 2367ca3afd..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNine.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo' - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNine = - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts deleted file mode 100644 index ad0b7ce2e1..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts deleted file mode 100644 index 00388e8406..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfThree = { - uuid?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts deleted file mode 100644 index 4670ed1017..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfNineAllOfTwo = { - value?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts deleted file mode 100644 index 45d1ebb8eb..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree' -import type { PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo } from './patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo' - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethree = - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo & - PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts deleted file mode 100644 index 64f3e8b7eb..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts deleted file mode 100644 index c4f4cac6c4..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfThree = { - uuid?: string -} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts deleted file mode 100644 index b2c42d5d9b..0000000000 --- a/jsapp/js/api/models/patchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type PatchedDataSupplementPayloadQuestionNameXpathQualOneOfOnethreeAllOfTwo = { - value?: string[] -} diff --git a/jsapp/js/api/react-query/survey-data.ts b/jsapp/js/api/react-query/survey-data.ts index 98d15ba8a5..3ece987538 100644 --- a/jsapp/js/api/react-query/survey-data.ts +++ b/jsapp/js/api/react-query/survey-data.ts @@ -1583,7 +1583,29 @@ export const useAssetsDataValidationStatusDestroy = Date: Fri, 12 Dec 2025 23:46:17 -0500 Subject: [PATCH 29/33] fix: remove debug comment --- kobo/apps/subsequences/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kobo/apps/subsequences/models.py b/kobo/apps/subsequences/models.py index cd68a3ca00..9d664f073f 100644 --- a/kobo/apps/subsequences/models.py +++ b/kobo/apps/subsequences/models.py @@ -82,7 +82,7 @@ def revise_data(asset: 'kpi.Asset', submission: dict, incoming_data: dict) -> di raise InvalidAction from e action = feature.to_action() - # action.check_limits(asset.owner) + action.check_limits(asset.owner) question_supplemental_data = supplemental_data.setdefault( question_xpath, {} From 59967142383ef8144df5627e8b1c8080e78793d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Sat, 13 Dec 2025 11:35:20 -0500 Subject: [PATCH 30/33] fix: fix Orval TS generation for dynamic keys --- ...utomaticGoogleTranscriptionVersionsItem.ts | 19 + ...aticGoogleTranscriptionVersionsItemData.ts | 21 + ...oogleTranscriptionVersionsItemDataOneOf.ts | 16 + ...eTranscriptionVersionsItemDataOneOfFour.ts | 17 + ...TranscriptionVersionsItemDataOneOfThree.ts | 17 + ...leTranscriptionVersionsItemDataOneOfTwo.ts | 17 + ...fAutomaticGoogleTranslationVersionsItem.ts | 21 + ...omaticGoogleTranslationVersionsItemData.ts | 21 + ...cGoogleTranslationVersionsItemDataOneOf.ts | 16 + ...gleTranslationVersionsItemDataOneOfFour.ts | 17 + ...leTranslationVersionsItemDataOneOfThree.ts | 17 + ...ogleTranslationVersionsItemDataOneOfTwo.ts | 17 + ...GoogleTranslationVersionsItemDependency.ts | 16 + ...eOfOneOfManualTranscriptionVersionsItem.ts | 19 + ...neOfManualTranscriptionVersionsItemData.ts | 17 + ...OneOfOneOfManualTranslationVersionsItem.ts | 21 + ...fOneOfManualTranslationVersionsItemData.ts | 17 + ...ManualTranslationVersionsItemDependency.ts | 16 + ...ementResponseOneOfOneOfQualVersionsItem.ts | 19 + ...tResponseOneOfOneOfQualVersionsItemData.ts | 23 + ...onseOneOfOneOfQualVersionsItemDataOneOf.ts | 17 + ...neOfOneOfQualVersionsItemDataOneOfAllOf.ts | 16 + ...fOneOfQualVersionsItemDataOneOfAllOfTwo.ts | 16 + ...OneOfOneOfQualVersionsItemDataOneOfFour.ts | 17 + ...OneOfQualVersionsItemDataOneOfFourAllOf.ts | 16 + ...OfQualVersionsItemDataOneOfFourAllOfTwo.ts | 15 + ...fOneOfQualVersionsItemDataOneOfOnethree.ts | 17 + ...fQualVersionsItemDataOneOfOnethreeAllOf.ts | 16 + ...alVersionsItemDataOneOfOnethreeAllOfTwo.ts | 15 + ...OfOneOfQualVersionsItemDataOneOfOnezero.ts | 17 + ...OfQualVersionsItemDataOneOfOnezeroAllOf.ts | 16 + ...ualVersionsItemDataOneOfOnezeroAllOfTwo.ts | 15 + ...neOfOneOfQualVersionsItemDataOneOfSeven.ts | 17 + ...neOfQualVersionsItemDataOneOfSevenAllOf.ts | 16 + ...fQualVersionsItemDataOneOfSevenAllOfTwo.ts | 15 + .../api/models/dataSupplementPayloadOneOf.ts | 14 + .../models/dataSupplementPayloadOneOfOneOf.ts | 53 + ...dOneOfOneOfAutomaticGoogleTranscription.ts | 16 + ...oadOneOfOneOfAutomaticGoogleTranslation.ts | 16 + ...entPayloadOneOfOneOfManualTranscription.ts | 16 + ...ementPayloadOneOfOneOfManualTranslation.ts | 16 + .../dataSupplementPayloadOneOfOneOfQual.ts | 23 + ...ataSupplementPayloadOneOfOneOfQualOneOf.ts | 18 + ...pplementPayloadOneOfOneOfQualOneOfAllOf.ts | 16 + ...entPayloadOneOfOneOfQualOneOfAllOfThree.ts | 15 + ...ementPayloadOneOfOneOfQualOneOfAllOfTwo.ts | 16 + ...upplementPayloadOneOfOneOfQualOneOfFive.ts | 18 + ...mentPayloadOneOfOneOfQualOneOfFiveAllOf.ts | 16 + ...ayloadOneOfOneOfQualOneOfFiveAllOfThree.ts | 15 + ...tPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts | 15 + ...upplementPayloadOneOfOneOfQualOneOfNine.ts | 18 + ...mentPayloadOneOfOneOfQualOneOfNineAllOf.ts | 16 + ...ayloadOneOfOneOfQualOneOfNineAllOfThree.ts | 15 + ...tPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts | 15 + ...ementPayloadOneOfOneOfQualOneOfOneseven.ts | 18 + ...PayloadOneOfOneOfQualOneOfOnesevenAllOf.ts | 16 + ...adOneOfOneOfQualOneOfOnesevenAllOfThree.ts | 15 + ...loadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts | 15 + ...ementPayloadOneOfOneOfQualOneOfOnethree.ts | 18 + ...PayloadOneOfOneOfQualOneOfOnethreeAllOf.ts | 16 + ...adOneOfOneOfQualOneOfOnethreeAllOfThree.ts | 15 + ...loadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts | 15 + jsapp/js/api/models/dataSupplementResponse.ts | 37 +- .../api/models/dataSupplementResponseOneOf.ts | 14 + .../dataSupplementResponseOneOfOneOf.ts | 53 + ...eOneOfOneOfAutomaticGoogleTranscription.ts | 19 + ...nseOneOfOneOfAutomaticGoogleTranslation.ts | 21 + ...ntResponseOneOfOneOfManualTranscription.ts | 19 + ...mentResponseOneOfOneOfManualTranslation.ts | 21 + .../dataSupplementResponseOneOfOneOfQual.ts | 21 + .../models/patchedDataSupplementPayload.ts | 37 +- kpi/schema_extensions/v2/data/extensions.py | 265 +-- kpi/utils/schema_extensions/mixins.py | 23 + static/openapi/schema_v2.json | 1598 +++++++++-------- static/openapi/schema_v2.yaml | 352 ++-- 75 files changed, 2419 insertions(+), 1141 deletions(-) create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItem.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemData.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf.ts create mode 100644 jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts create mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOf.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOf.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranslation.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranscription.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranslation.ts create mode 100644 jsapp/js/api/models/dataSupplementResponseOneOfOneOfQual.ts create mode 100644 kpi/utils/schema_extensions/mixins.py diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem.ts new file mode 100644 index 0000000000..3fbde0913a --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData' + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem = { + _dateCreated: string + _uuid: string + _dateAccepted?: string + _data: _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData.ts new file mode 100644 index 0000000000..5d8d22e966 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo' + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemData = + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf.ts new file mode 100644 index 0000000000..1ba631c00f --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOf = { + language: string + status: 'in_progress' +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour.ts new file mode 100644 index 0000000000..9b5455017a --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfFour = { + language: string + status: 'deleted' + value: null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree.ts new file mode 100644 index 0000000000..8587f75b2f --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfThree = { + language: string + status: 'complete' + value: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo.ts new file mode 100644 index 0000000000..8feefc520c --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItemDataOneOfTwo = { + language: string + status: 'failed' + error: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem.ts new file mode 100644 index 0000000000..4cd14712ff --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem.ts @@ -0,0 +1,21 @@ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData' +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency' + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem = { + _dateCreated: string + _uuid: string + _dependency: _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency + _dateAccepted?: string + _data: _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData.ts new file mode 100644 index 0000000000..7ef4763af7 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree' +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo' + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemData = + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree + | _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf.ts new file mode 100644 index 0000000000..3ed6e7ac96 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOf = { + language: string + status: 'in_progress' +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour.ts new file mode 100644 index 0000000000..b89851b7a3 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfFour = { + language: string + status: 'deleted' + value: null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree.ts new file mode 100644 index 0000000000..b17106a708 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfThree = { + language: string + status: 'complete' + value: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo.ts new file mode 100644 index 0000000000..4946b21bf9 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDataOneOfTwo = { + language: string + status: 'failed' + error: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency.ts new file mode 100644 index 0000000000..53cbad2c55 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItemDependency = { + _actionId: string + _uuid: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem.ts new file mode 100644 index 0000000000..3f1e83b09c --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData } from './_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData' + +export type _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem = { + _dateCreated: string + _uuid: string + _dateAccepted: string + _data: _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData.ts new file mode 100644 index 0000000000..98d13550d5 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItemData = { + language: string + /** @nullable */ + value: string | null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItem.ts new file mode 100644 index 0000000000..ed46101772 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItem.ts @@ -0,0 +1,21 @@ +import type { _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemData } from './_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemData' +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency } from './_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency' + +export type _DataSupplementResponseOneOfOneOfManualTranslationVersionsItem = { + _dateCreated: string + _uuid: string + _dependency: _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency + _dateAccepted: string + _data: _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemData +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemData.ts new file mode 100644 index 0000000000..37ff331e3f --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemData.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemData = { + language: string + /** @nullable */ + value: string | null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency.ts new file mode 100644 index 0000000000..234ccd6083 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfManualTranslationVersionsItemDependency = { + _actionId: string + _uuid: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItem.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItem.ts new file mode 100644 index 0000000000..cef501e6bc --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItem.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemData } from './_dataSupplementResponseOneOfOneOfQualVersionsItemData' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItem = { + _data: _DataSupplementResponseOneOfOneOfQualVersionsItemData + _dateAccepted?: string + _dateCreated: string + _uuid: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemData.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemData.ts new file mode 100644 index 0000000000..03faff909a --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemData.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemData = + | _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf + | _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour + | _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven + | _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero + | _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf.ts new file mode 100644 index 0000000000..cfffc48e37 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOf = + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf & + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf.ts new file mode 100644 index 0000000000..5836f00bad --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo.ts new file mode 100644 index 0000000000..dc1e8d46b5 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfAllOfTwo = { + /** @nullable */ + value?: number | null +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour.ts new file mode 100644 index 0000000000..a75592006a --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFour = + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf & + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf.ts new file mode 100644 index 0000000000..88938e1886 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo.ts new file mode 100644 index 0000000000..a3f4bda489 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfFourAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree.ts new file mode 100644 index 0000000000..1b351112f2 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethree = + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf & + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf.ts new file mode 100644 index 0000000000..a954a6118a --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo.ts new file mode 100644 index 0000000000..d4c7f8bef3 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnethreeAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero.ts new file mode 100644 index 0000000000..5686279655 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezero = + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf & + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf.ts new file mode 100644 index 0000000000..91959fddf5 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo.ts new file mode 100644 index 0000000000..2b61a48d81 --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfOnezeroAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven.ts new file mode 100644 index 0000000000..deb16c39aa --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf' +import type { _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo } from './_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo' + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSeven = + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf & + _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf.ts new file mode 100644 index 0000000000..cdf9a43f2e --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo.ts b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo.ts new file mode 100644 index 0000000000..9b5af9806c --- /dev/null +++ b/jsapp/js/api/models/_dataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type _DataSupplementResponseOneOfOneOfQualVersionsItemDataOneOfSevenAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOf.ts new file mode 100644 index 0000000000..8b8d43a9d0 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOf.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOf } from './dataSupplementPayloadOneOfOneOf' + +export type DataSupplementPayloadOneOf = string | DataSupplementPayloadOneOfOneOf diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts new file mode 100644 index 0000000000..3d49d41488 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts @@ -0,0 +1,53 @@ +import type { DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription } from './dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription' +import type { DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation } from './dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation' +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfManualTranscription } from './dataSupplementPayloadOneOfOneOfManualTranscription' +import type { DataSupplementPayloadOneOfOneOfManualTranslation } from './dataSupplementPayloadOneOfOneOfManualTranslation' +import type { DataSupplementPayloadOneOfOneOfQual } from './dataSupplementPayloadOneOfOneOfQual' + +export type DataSupplementPayloadOneOfOneOf = + | (unknown & { + manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementPayloadOneOfOneOfQual + }) diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts new file mode 100644 index 0000000000..a18428aeef --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription = { + language: string + accepted?: boolean +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts new file mode 100644 index 0000000000..d3fffa6455 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation = { + language: string + accepted?: boolean +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts new file mode 100644 index 0000000000..8e77afdad2 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfManualTranscription = { + language: string + value: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts new file mode 100644 index 0000000000..1acd371ff8 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfManualTranslation = { + language: string + value: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts new file mode 100644 index 0000000000..cc4f5c73c0 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOf } from './dataSupplementPayloadOneOfOneOfQualOneOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfFive } from './dataSupplementPayloadOneOfOneOfQualOneOfFive' +import type { DataSupplementPayloadOneOfOneOfQualOneOfNine } from './dataSupplementPayloadOneOfOneOfQualOneOfNine' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOneseven } from './dataSupplementPayloadOneOfOneOfQualOneOfOneseven' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethree' + +export type DataSupplementPayloadOneOfOneOfQual = + | DataSupplementPayloadOneOfOneOfQualOneOf + | DataSupplementPayloadOneOfOneOfQualOneOfFive + | DataSupplementPayloadOneOfOneOfQualOneOfNine + | DataSupplementPayloadOneOfOneOfQualOneOfOnethree + | DataSupplementPayloadOneOfOneOfQualOneOfOneseven diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts new file mode 100644 index 0000000000..17d2b7d919 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree' +import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo' + +export type DataSupplementPayloadOneOfOneOfQualOneOf = DataSupplementPayloadOneOfOneOfQualOneOfAllOf & + DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo & + DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts new file mode 100644 index 0000000000..74f6f12b76 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts new file mode 100644 index 0000000000..0d4339958c --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts new file mode 100644 index 0000000000..89c39fd10e --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo = { + /** @nullable */ + value?: number | null +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts new file mode 100644 index 0000000000..d60dfe7783 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree' +import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo' + +export type DataSupplementPayloadOneOfOneOfQualOneOfFive = DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf & + DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo & + DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts new file mode 100644 index 0000000000..5cea16271e --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts new file mode 100644 index 0000000000..74867ae61a --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts new file mode 100644 index 0000000000..06f45ed5cd --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts new file mode 100644 index 0000000000..564bce0a66 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree' +import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo' + +export type DataSupplementPayloadOneOfOneOfQualOneOfNine = DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf & + DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo & + DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts new file mode 100644 index 0000000000..1177c85ef6 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts new file mode 100644 index 0000000000..6c5e18ba22 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts new file mode 100644 index 0000000000..cc9d7eb807 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo = { + value?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts new file mode 100644 index 0000000000..8fced274b7 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo' + +export type DataSupplementPayloadOneOfOneOfQualOneOfOneseven = DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf & + DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo & + DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts new file mode 100644 index 0000000000..e3a3171466 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts new file mode 100644 index 0000000000..e5c5fdc4aa --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts new file mode 100644 index 0000000000..5cb57f50b4 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts new file mode 100644 index 0000000000..27df64824d --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree' +import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo' + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnethree = DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf & + DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo & + DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts new file mode 100644 index 0000000000..b8a306db6c --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts new file mode 100644 index 0000000000..63cddb033a --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts new file mode 100644 index 0000000000..a7b34cb9af --- /dev/null +++ b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo = { + value?: string[] +} diff --git a/jsapp/js/api/models/dataSupplementResponse.ts b/jsapp/js/api/models/dataSupplementResponse.ts index 8c98ec68ca..56c026ab0d 100644 --- a/jsapp/js/api/models/dataSupplementResponse.ts +++ b/jsapp/js/api/models/dataSupplementResponse.ts @@ -12,40 +12,5 @@ The endpoints are grouped by area of intended use. Each category contains relate export interface DataSupplementResponse { _version: string - [key: string]: - | (unknown & { - manual_transcription?: DataSupplementResponseManualTranscription - manual_translation?: DataSupplementResponseManualTranslation - automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation - qual?: DataSupplementResponseQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseManualTranscription - manual_translation?: DataSupplementResponseManualTranslation - automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation - qual?: DataSupplementResponseQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseManualTranscription - manual_translation?: DataSupplementResponseManualTranslation - automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation - qual?: DataSupplementResponseQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseManualTranscription - manual_translation?: DataSupplementResponseManualTranslation - automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation - qual?: DataSupplementResponseQual - }) - | (unknown & { - manual_transcription?: DataSupplementResponseManualTranscription - manual_translation?: DataSupplementResponseManualTranslation - automated_google_transcription?: DataSupplementResponseAutomatedGoogleTranscription - automated_google_translation?: DataSupplementResponseAutomatedGoogleTranslation - qual?: DataSupplementResponseQual - }) + [key: string]: DataSupplementResponseOneOf } diff --git a/jsapp/js/api/models/dataSupplementResponseOneOf.ts b/jsapp/js/api/models/dataSupplementResponseOneOf.ts new file mode 100644 index 0000000000..6c89ec3964 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOf.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementResponseOneOfOneOf } from './dataSupplementResponseOneOfOneOf' + +export type DataSupplementResponseOneOf = string | DataSupplementResponseOneOfOneOf diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOf.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOf.ts new file mode 100644 index 0000000000..3cc8d258f9 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOf.ts @@ -0,0 +1,53 @@ +import type { DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription } from './dataSupplementResponseOneOfOneOfAutomaticGoogleTranscription' +import type { DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation } from './dataSupplementResponseOneOfOneOfAutomaticGoogleTranslation' +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { DataSupplementResponseOneOfOneOfManualTranscription } from './dataSupplementResponseOneOfOneOfManualTranscription' +import type { DataSupplementResponseOneOfOneOfManualTranslation } from './dataSupplementResponseOneOfOneOfManualTranslation' +import type { DataSupplementResponseOneOfOneOfQual } from './dataSupplementResponseOneOfOneOfQual' + +export type DataSupplementResponseOneOfOneOf = + | (unknown & { + manual_transcription?: DataSupplementResponseOneOfOneOfManualTranscription + manual_translation?: DataSupplementResponseOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementResponseOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseOneOfOneOfManualTranscription + manual_translation?: DataSupplementResponseOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementResponseOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseOneOfOneOfManualTranscription + manual_translation?: DataSupplementResponseOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementResponseOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseOneOfOneOfManualTranscription + manual_translation?: DataSupplementResponseOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementResponseOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: DataSupplementResponseOneOfOneOfManualTranscription + manual_translation?: DataSupplementResponseOneOfOneOfManualTranslation + automatic_google_transcription?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation + qual?: DataSupplementResponseOneOfOneOfQual + }) diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranscription.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranscription.ts new file mode 100644 index 0000000000..68b6da5073 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranscription.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem' + +export type DataSupplementResponseOneOfOneOfAutomaticGoogleTranscription = { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseOneOfOneOfAutomaticGoogleTranscriptionVersionsItem[] +} diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranslation.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranslation.ts new file mode 100644 index 0000000000..8889bb7cf5 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfAutomaticGoogleTranslation.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem } from './_dataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem' + +export type DataSupplementResponseOneOfOneOfAutomaticGoogleTranslation = { + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseOneOfOneOfAutomaticGoogleTranslationVersionsItem[] + } +} diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranscription.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranscription.ts new file mode 100644 index 0000000000..c595a97b39 --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranscription.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem } from './_dataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem' + +export type DataSupplementResponseOneOfOneOfManualTranscription = { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseOneOfOneOfManualTranscriptionVersionsItem[] +} diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranslation.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranslation.ts new file mode 100644 index 0000000000..051c1cc62b --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfManualTranslation.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfManualTranslationVersionsItem } from './_dataSupplementResponseOneOfOneOfManualTranslationVersionsItem' + +export type DataSupplementResponseOneOfOneOfManualTranslation = { + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseOneOfOneOfManualTranslationVersionsItem[] + } +} diff --git a/jsapp/js/api/models/dataSupplementResponseOneOfOneOfQual.ts b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfQual.ts new file mode 100644 index 0000000000..8677bd852d --- /dev/null +++ b/jsapp/js/api/models/dataSupplementResponseOneOfOneOfQual.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { _DataSupplementResponseOneOfOneOfQualVersionsItem } from './_dataSupplementResponseOneOfOneOfQualVersionsItem' + +export type DataSupplementResponseOneOfOneOfQual = { + [key: string]: { + _dateCreated: string + _dateModified: string + /** @minLength 1 */ + _versions: _DataSupplementResponseOneOfOneOfQualVersionsItem[] + } +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayload.ts b/jsapp/js/api/models/patchedDataSupplementPayload.ts index b296fd68e0..ae20c7d8ab 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayload.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayload.ts @@ -12,40 +12,5 @@ The endpoints are grouped by area of intended use. Each category contains relate export interface PatchedDataSupplementPayload { _version: string - [key: string]: - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadManualTranscription - manual_translation?: PatchedDataSupplementPayloadManualTranslation - automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription - automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation - qual?: PatchedDataSupplementPayloadQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadManualTranscription - manual_translation?: PatchedDataSupplementPayloadManualTranslation - automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription - automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation - qual?: PatchedDataSupplementPayloadQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadManualTranscription - manual_translation?: PatchedDataSupplementPayloadManualTranslation - automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription - automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation - qual?: PatchedDataSupplementPayloadQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadManualTranscription - manual_translation?: PatchedDataSupplementPayloadManualTranslation - automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription - automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation - qual?: PatchedDataSupplementPayloadQual - }) - | (unknown & { - manual_transcription?: PatchedDataSupplementPayloadManualTranscription - manual_translation?: PatchedDataSupplementPayloadManualTranslation - automatic_google_transcription?: PatchedDataSupplementPayloadAutomaticGoogleTranscription - automatic_google_translation?: PatchedDataSupplementPayloadAutomaticGoogleTranslation - qual?: PatchedDataSupplementPayloadQual - }) + [key: string]: DataSupplementPayloadOneOf } diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index c156dea2df..14ab512de4 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -5,11 +5,12 @@ from drf_spectacular.plumbing import ( build_array_type, build_basic_type, - build_object_type, + build_object_type, ResolvedComponent, ) from drf_spectacular.types import OpenApiTypes from kpi.schema_extensions.v2.generic.schema import GENERIC_STRING_SCHEMA +from kpi.utils.schema_extensions.mixins import ComponentRegistrationMixin from kpi.utils.schema_extensions.url_builder import build_url_type @@ -94,76 +95,65 @@ def map_serializer_field(self, auto_schema, direction): ) -class DataSupplementPayloadExtension(OpenApiSerializerExtension): +class DataSupplementPayloadExtension( + ComponentRegistrationMixin, OpenApiSerializerExtension +): target_class = 'kpi.schema_extensions.v2.data.serializers.DataSupplementPayload' DATETIME = build_basic_type(OpenApiTypes.DATETIME) UUID_STR = {'type': 'string', 'format': 'uuid'} - def map_serializer(self, auto_schema, direction): - return build_object_type( - properties={ - '_version': { - 'type': 'string', - 'example': '20250820', - } - }, - additionalProperties=build_object_type( - additionalProperties=False, - properties={ - 'manual_transcription': self._get_manual_nlp_action_schema(), - 'manual_translation': self._get_manual_nlp_action_schema(), - 'automatic_google_transcription': ( - self._get_auto_nlp_action_schema() - ), - 'automatic_google_translation': ( - self._get_auto_nlp_action_schema() - ), - 'qual': self._get_qual_schema(), - }, - anyOf=[ - {'required': ['manual_transcription']}, - {'required': ['manual_translation']}, - {'required': ['automatic_google_transcription']}, - {'required': ['automatic_google_translation']}, - {'required': ['qual']}, - ], - ), - required=['_version'], - ) - - @classmethod - def _get_auto_nlp_action_schema(cls): + @property + def question_schema(self): return build_object_type( additionalProperties=False, properties={ - 'language': GENERIC_STRING_SCHEMA, - 'accepted': {'type': 'boolean'}, + 'manual_transcription': self._nlp_manual_action_schema, + 'manual_translation': self._nlp_manual_action_schema, + 'automatic_google_transcription': self._nlp_automatic_action_schema, + 'automatic_google_translation': self._nlp_automatic_action_schema, + 'qual': self._qual_schema, }, - required=['language'], + anyOf=[ + {'required': ['manual_transcription']}, + {'required': ['manual_translation']}, + {'required': ['automatic_google_transcription']}, + {'required': ['automatic_google_translation']}, + {'required': ['qual']}, + ], ) - @classmethod - def _get_manual_nlp_action_schema(cls): + def map_serializer(self, auto_schema, direction): + + one_of_schema = { + 'oneOf': [ + {'type': 'string'}, # for `_version` + self.question_schema, + ] + } return build_object_type( - additionalProperties=False, properties={ - 'language': GENERIC_STRING_SCHEMA, - 'value': GENERIC_STRING_SCHEMA, + '_version': { + 'type': 'string', + 'example': '20250820', + } }, - required=['language', 'value'], + additionalProperties = self._register_schema_component( + auto_schema, 'DataSupplementPayloadOneOf', one_of_schema + ), + required=['_version'], ) - @classmethod - def _get_qual_schema(cls): + @property + def _qual_schema(self): qual_defs = { 'qualCommon': { 'type': 'object', 'additionalProperties': False, 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, 'value': {}, }, 'required': ['uuid', 'value'], @@ -186,7 +176,7 @@ def _get_qual_schema(cls): 'qualSelectOne': { 'type': 'object', 'properties': { - 'value': cls.UUID_STR, + 'value': self.UUID_STR, }, }, 'qualSelectMultiple': { @@ -194,7 +184,7 @@ def _get_qual_schema(cls): 'properties': { 'value': { 'type': 'array', - 'items': cls.UUID_STR, + 'items': self.UUID_STR, }, }, }, @@ -218,7 +208,7 @@ def _get_qual_schema(cls): { 'type': 'object', 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, }, }, ], @@ -230,7 +220,7 @@ def _get_qual_schema(cls): { 'type': 'object', 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, }, }, ], @@ -242,7 +232,7 @@ def _get_qual_schema(cls): { 'type': 'object', 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, }, }, ], @@ -254,7 +244,7 @@ def _get_qual_schema(cls): { 'type': 'object', 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, }, }, ], @@ -266,7 +256,7 @@ def _get_qual_schema(cls): { 'type': 'object', 'properties': { - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, }, }, ], @@ -274,15 +264,83 @@ def _get_qual_schema(cls): ], } + @property + def _nlp_automatic_action_schema(self): + + return build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'accepted': {'type': 'boolean'}, + }, + required=['language'], + ) + + @property + def _nlp_manual_action_schema(self): -class DataSupplementResponseExtension(OpenApiSerializerExtension): + return build_object_type( + additionalProperties=False, + properties={ + 'language': GENERIC_STRING_SCHEMA, + 'value': GENERIC_STRING_SCHEMA, + }, + required=['language', 'value'], + ) + + def _register_schema_component(self, auto_schema, name, schema): + component = ResolvedComponent( + name=name, + type=ResolvedComponent.SCHEMA, + schema=schema, + object=self, + ) + + auto_schema.registry.register(component) + return component.ref + + +class DataSupplementResponseExtension( + ComponentRegistrationMixin, OpenApiSerializerExtension +): target_class = 'kpi.schema_extensions.v2.data.serializers.DataSupplementResponse' DATETIME = build_basic_type(OpenApiTypes.DATETIME) UUID_STR = {'type': 'string', 'format': 'uuid'} + + @property + def question_schema(self): + + return build_object_type( + additionalProperties=False, + properties={ + 'manual_transcription': self._manual_transcription_schema, + 'manual_translation': self._manual_translation_schema, + 'automatic_google_transcription': self._automatic_transcription_schema, + 'automatic_google_translation': self._automatic_translation_schema, + 'qual': self._qual_schema, + }, + # At least one of "manual_transcription" or "manual_translation" + # must be present + anyOf=[ + {'required': ['manual_transcription']}, + {'required': ['manual_translation']}, + {'required': ['automatic_google_transcription']}, + {'required': ['automatic_google_translation']}, + {'required': ['qual']}, + ] + ) + def map_serializer(self, auto_schema, direction): + one_of_schema = { + 'oneOf': [ + {'type': 'string'}, # for `_version` + self.question_schema, + ] + } + return build_object_type( properties={ '_version': { @@ -290,32 +348,32 @@ def map_serializer(self, auto_schema, direction): 'example': '20250820', } }, - additionalProperties=build_object_type( - additionalProperties=False, - properties={ - 'manual_transcription': self._get_manual_transcription_schema(), - 'manual_translation': self._get_manual_translation_schema(), - 'automated_google_transcription': ( - self._get_auto_transcription_schema() - ), - 'automated_google_translation': ( - self._get_auto_translation_schema() - ), - 'qual': self._get_qual_schema(), - }, - # At least one of "manual_transcription" or "manual_translation" - # must be present - anyOf=[ - {'required': ['manual_transcription']}, - {'required': ['manual_translation']}, - {'required': ['automated_google_transcription']}, - {'required': ['automated_google_translation']}, - {'required': ['qual']}, - ], + # This schema intentionally uses a named component for `additionalProperties` + # because the payload mixes: + # - a static key (`_version`) + # - dynamic keys (question names) + # + # When represented as a plain `additionalProperties` object, Orval generates + # a TypeScript index signature that conflicts with the static `_version` field + # (i.e. `[key: string]: QuestionEntry` vs `_version: string`). + # + # Registering and referencing a dedicated schema component here allows Orval + # to generate a union type for dynamic values while keeping `_version` + # correctly typed, without changing the backend response format. + additionalProperties = self._register_schema_component( + auto_schema, 'DataSupplementResponseOneOf', one_of_schema ), required=['_version'], ) + @property + def _automatic_transcription_schema(self): + return self._build_transcription_schema(include_status=True) + + @property + def _automatic_translation_schema(self): + return self._build_translation_schema(include_status=True) + @classmethod def _build_transcription_schema(cls, include_status=False): """ @@ -357,6 +415,7 @@ def _build_translation_schema(cls, include_status=False): Map. _dateAccepted is required if Manual (include_status=False), optional otherwise. """ + required_fields = ['_dateCreated', '_uuid', '_dependency', '_data'] # If Manual (no status), dateAccepted is Mandatory. @@ -387,10 +446,6 @@ def _build_translation_schema(cls, include_status=False): return build_object_type(additionalProperties=inner_action_schema) - @classmethod - def _get_base_version_required(cls): - return ['_dateCreated', '_uuid', '_data'] - @classmethod def _get_data_content_schema(cls, include_status=False): """ @@ -453,6 +508,7 @@ def _get_data_content_schema(cls, include_status=False): @classmethod def _get_dependency_schema(cls): + return build_object_type( additionalProperties=False, properties={ @@ -462,24 +518,8 @@ def _get_dependency_schema(cls): required=['_actionId', '_uuid'], ) - @classmethod - def _get_auto_transcription_schema(cls): - return cls._build_transcription_schema(include_status=True) - - @classmethod - def _get_auto_translation_schema(cls): - return cls._build_translation_schema(include_status=True) - - @classmethod - def _get_manual_transcription_schema(cls): - return cls._build_transcription_schema(include_status=False) - - @classmethod - def _get_manual_translation_schema(cls): - return cls._build_translation_schema(include_status=False) - - @classmethod - def _get_qual_schema(cls): + @property + def _qual_schema(self): """ Build the OpenAPI schema for the `qual` field. """ @@ -490,7 +530,7 @@ def _get_qual_schema(cls): qual_common = build_object_type( additionalProperties=False, properties={ - 'uuid': cls.UUID_STR, + 'uuid': self.UUID_STR, # "value" is intentionally untyped here: it will be refined # by the specific qual* schemas below. 'value': {}, @@ -521,7 +561,7 @@ def _get_qual_schema(cls): 'properties': { 'value': { 'type': 'array', - 'items': cls.UUID_STR, + 'items': self.UUID_STR, }, }, } @@ -533,7 +573,7 @@ def _get_qual_schema(cls): qual_select_one = { 'type': 'object', 'properties': { - 'value': cls.UUID_STR, + 'value': self.UUID_STR, }, } @@ -604,9 +644,9 @@ def _get_qual_schema(cls): additionalProperties=False, properties={ '_data': data_schema, - '_dateAccepted': cls.DATETIME, - '_dateCreated': cls.DATETIME, - '_uuid': cls.UUID_STR, + '_dateAccepted': self.DATETIME, + '_dateCreated': self.DATETIME, + '_uuid': self.UUID_STR, }, required=['_data', '_dateCreated', '_uuid'], ) @@ -625,8 +665,8 @@ def _get_qual_schema(cls): data_action_key = build_object_type( additionalProperties=False, properties={ - '_dateCreated': cls.DATETIME, - '_dateModified': cls.DATETIME, + '_dateCreated': self.DATETIME, + '_dateModified': self.DATETIME, '_versions': build_array_type( schema=data_action_version, min_length=1, @@ -667,6 +707,15 @@ def _get_qual_schema(cls): return qual_root + @property + def _manual_transcription_schema(cls): + return cls._build_transcription_schema(include_status=False) + + @property + def _manual_translation_schema(cls): + return cls._build_translation_schema(include_status=False) + + class DataValidationPayloadFieldExtension(OpenApiSerializerFieldExtension): target_class = 'kpi.schema_extensions.v2.data.fields.DataValidationPayloadField' diff --git a/kpi/utils/schema_extensions/mixins.py b/kpi/utils/schema_extensions/mixins.py new file mode 100644 index 0000000000..b79d87480a --- /dev/null +++ b/kpi/utils/schema_extensions/mixins.py @@ -0,0 +1,23 @@ +from drf_spectacular.plumbing import ResolvedComponent + + +class ComponentRegistrationMixin: + """ + Helper mixin for OpenApiSerializerExtension to register ad-hoc schema + components and return a stable $ref. + + The extension instance (`self`) is intentionally used as the component + source object to associate the newly registered schema component with + the serializer extension that defines it. + """ + + def _register_schema_component(self, auto_schema, name, schema): + component = ResolvedComponent( + name=name, + type=ResolvedComponent.SCHEMA, + schema=schema, + object=self, + ) + + auto_schema.registry.register(component) + return component.ref diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index fbab69e02e..9a87611e60 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -15893,84 +15893,325 @@ "detail" ] }, - "DataSupplementResponse": { - "type": "object", - "properties": { - "_version": { - "type": "string", - "example": "20250820" - } - }, - "additionalProperties": { - "type": "object", - "properties": { - "manual_transcription": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" + "DataSupplementPayloadOneOf": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "manual_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "_dateModified": { - "type": "string", - "format": "date-time" + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "manual_translation": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "automatic_google_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "accepted": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] + }, + "automatic_google_translation": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "accepted": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] + }, + "qual": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] }, - "_uuid": { - "type": "string", - "format": "uuid" + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } }, - "_dateAccepted": { - "type": "string", - "format": "date-time" + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] }, - "_data": { + { "type": "object", "properties": { - "language": { + "value": { "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { "value": { "type": "string", - "nullable": true + "format": "uuid" } - }, + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, "required": [ - "language", + "uuid", "value" ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateAccepted", - "_dateCreated", - "_uuid" ] }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + } + ] + } }, - "manual_translation": { - "type": "object", - "additionalProperties": { + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "manual_transcription" + ] + }, + { + "required": [ + "manual_translation" + ] + }, + { + "required": [ + "automatic_google_transcription" + ] + }, + { + "required": [ + "automatic_google_translation" + ] + }, + { + "required": [ + "qual" + ] + } + ] + } + ] + }, + "DataSupplementResponse": { + "type": "object", + "properties": { + "_version": { + "type": "string", + "example": "20250820" + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/DataSupplementResponseOneOf" + }, + "required": [ + "_version" + ] + }, + "DataSupplementResponseOneOf": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "manual_transcription": { "type": "object", "properties": { "_dateCreated": { @@ -15994,23 +16235,6 @@ "type": "string", "format": "uuid" }, - "_dependency": { - "type": "object", - "properties": { - "_actionId": { - "type": "string" - }, - "_uuid": { - "type": "string", - "format": "uuid" - } - }, - "additionalProperties": false, - "required": [ - "_actionId", - "_uuid" - ] - }, "_dateAccepted": { "type": "string", "format": "date-time" @@ -16021,171 +16245,122 @@ "language": { "type": "string" }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateAccepted", - "_dateCreated", - "_dependency", - "_uuid" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] - } - }, - "automated_google_transcription": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" - }, - "_dateAccepted": { - "type": "string", - "format": "date-time" - }, - "_data": { - "oneOf": [ - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "status": { - "type": "string", - "const": "in_progress" - } - }, - "additionalProperties": false, - "required": [ - "language", - "status" - ] + "value": { + "type": "string", + "nullable": true + } }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "status": { - "type": "string", - "const": "failed" - }, - "error": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "error", - "language", - "status" - ] + "additionalProperties": false, + "required": [ + "language", + "value" + ] + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateAccepted", + "_dateCreated", + "_uuid" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + }, + "manual_translation": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" }, - { + "_uuid": { + "type": "string", + "format": "uuid" + }, + "_dependency": { "type": "object", "properties": { - "language": { + "_actionId": { "type": "string" }, - "status": { + "_uuid": { "type": "string", - "const": "complete" - }, - "value": { - "type": "string" + "format": "uuid" } }, "additionalProperties": false, "required": [ - "language", - "status", - "value" + "_actionId", + "_uuid" ] }, - { + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_data": { "type": "object", "properties": { "language": { "type": "string" }, - "status": { - "type": "string", - "const": "deleted" - }, "value": { - "type": "null" + "type": "string", + "nullable": true } }, "additionalProperties": false, "required": [ "language", - "status", "value" ] } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateAccepted", + "_dateCreated", + "_dependency", + "_uuid" ] - } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateCreated", - "_uuid" - ] + }, + "minLength": 1 + } }, - "minLength": 1 + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] } }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] - }, - "automated_google_translation": { - "type": "object", - "additionalProperties": { + "automatic_google_transcription": { "type": "object", "properties": { "_dateCreated": { @@ -16209,23 +16384,6 @@ "type": "string", "format": "uuid" }, - "_dependency": { - "type": "object", - "properties": { - "_actionId": { - "type": "string" - }, - "_uuid": { - "type": "string", - "format": "uuid" - } - }, - "additionalProperties": false, - "required": [ - "_actionId", - "_uuid" - ] - }, "_dateAccepted": { "type": "string", "format": "date-time" @@ -16278,239 +16436,41 @@ }, "status": { "type": "string", - "const": "complete" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "language", - "status", - "value" - ] - }, - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "status": { - "type": "string", - "const": "deleted" - }, - "value": { - "type": "null" - } - }, - "additionalProperties": false, - "required": [ - "language", - "status", - "value" - ] - } - ] - } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateCreated", - "_dependency", - "_uuid" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] - } - }, - "qual": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_data": { - "oneOf": [ - { - "allOf": [ - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "additionalProperties": false, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "integer", - "nullable": true - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "additionalProperties": false, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "additionalProperties": false, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "additionalProperties": false, - "required": [ - "uuid", - "value" - ] + "const": "complete" }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string" - } - } - } + "value": { + "type": "string" } + }, + "additionalProperties": false, + "required": [ + "language", + "status", + "value" ] }, { - "allOf": [ - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "additionalProperties": false, - "required": [ - "uuid", - "value" - ] + "type": "object", + "properties": { + "language": { + "type": "string" }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - } - } + "status": { + "type": "string", + "const": "deleted" + }, + "value": { + "type": "null" } + }, + "additionalProperties": false, + "required": [ + "language", + "status", + "value" ] } ] - }, - "_dateAccepted": { - "type": "string", - "format": "date-time" - }, - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" } }, "additionalProperties": false, @@ -16530,8 +16490,160 @@ "_versions" ] }, - "patternProperties": { - "^[0-9a-fA-F-]{36}$": { + "automatic_google_translation": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_actionId", + "_uuid" + ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_data": { + "oneOf": [ + { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "status": { + "type": "string", + "const": "in_progress" + } + }, + "additionalProperties": false, + "required": [ + "language", + "status" + ] + }, + { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "status": { + "type": "string", + "const": "failed" + }, + "error": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "error", + "language", + "status" + ] + }, + { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "status": { + "type": "string", + "const": "complete" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "status", + "value" + ] + }, + { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "status": { + "type": "string", + "const": "deleted" + }, + "value": { + "type": "null" + } + }, + "additionalProperties": false, + "required": [ + "language", + "status", + "value" + ] + } + ] + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateCreated", + "_dependency", + "_uuid" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } + }, + "qual": { + "type": "object", + "additionalProperties": { "type": "object", "properties": { "_dateCreated": { @@ -16703,62 +16815,255 @@ "type": "string", "format": "date-time" }, - "_uuid": { - "type": "string", - "format": "uuid" - } + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateCreated", + "_uuid" + ] + }, + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + }, + "patternProperties": { + "^[0-9a-fA-F-]{36}$": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_data": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "additionalProperties": false, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + } + ] + } + ] + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateCreated", + "_uuid" + ] }, - "additionalProperties": false, - "required": [ - "_data", - "_dateCreated", - "_uuid" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] + "minLength": 1 + } + }, + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } } } - } - }, - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "manual_transcription" - ] - }, - { - "required": [ - "manual_translation" - ] - }, - { - "required": [ - "automated_google_transcription" - ] - }, - { - "required": [ - "automated_google_translation" - ] }, - { - "required": [ - "qual" - ] - } - ] - }, - "required": [ - "_version" + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "manual_transcription" + ] + }, + { + "required": [ + "manual_translation" + ] + }, + { + "required": [ + "automatic_google_transcription" + ] + }, + { + "required": [ + "automatic_google_translation" + ] + }, + { + "required": [ + "qual" + ] + } + ] + } ] }, "DataValidationStatusUpdateResponse": { @@ -20422,292 +20727,7 @@ } }, "additionalProperties": { - "type": "object", - "properties": { - "manual_transcription": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - }, - "manual_translation": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - }, - "automatic_google_transcription": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "accepted": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "language" - ] - }, - "automatic_google_translation": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "accepted": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "language" - ] - }, - "qual": { - "oneOf": [ - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "integer", - "nullable": true - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "string", - "format": "uuid" - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - } - ] - } - }, - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "manual_transcription" - ] - }, - { - "required": [ - "manual_translation" - ] - }, - { - "required": [ - "automatic_google_transcription" - ] - }, - { - "required": [ - "automatic_google_translation" - ] - }, - { - "required": [ - "qual" - ] - } - ] + "$ref": "#/components/schemas/DataSupplementPayloadOneOf" }, "required": [ "_version" diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index b6d75d010a..2e323d0f7d 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -11547,6 +11547,174 @@ components: type: string required: - detail + DataSupplementPayloadOneOf: + oneOf: + - type: string + - type: object + properties: + manual_transcription: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + manual_translation: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + automatic_google_transcription: + type: object + properties: + language: + type: string + accepted: + type: boolean + additionalProperties: false + required: + - language + automatic_google_translation: + type: object + properties: + language: + type: string + accepted: + type: boolean + additionalProperties: false + required: + - language + qual: + oneOf: + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: integer + nullable: true + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + - type: object + properties: + uuid: + type: string + format: uuid + additionalProperties: false + anyOf: + - required: + - manual_transcription + - required: + - manual_translation + - required: + - automatic_google_transcription + - required: + - automatic_google_translation + - required: + - qual DataSupplementResponse: type: object properties: @@ -11554,7 +11722,13 @@ components: type: string example: '20250820' additionalProperties: - type: object + $ref: '#/components/schemas/DataSupplementResponseOneOf' + required: + - _version + DataSupplementResponseOneOf: + oneOf: + - type: string + - type: object properties: manual_transcription: type: object @@ -11665,7 +11839,7 @@ components: - _dateCreated - _dateModified - _versions - automated_google_transcription: + automatic_google_transcription: type: object properties: _dateCreated: @@ -11754,7 +11928,7 @@ components: - _dateCreated - _dateModified - _versions - automated_google_translation: + automatic_google_translation: type: object additionalProperties: type: object @@ -12104,13 +12278,11 @@ components: - required: - manual_translation - required: - - automated_google_transcription + - automatic_google_transcription - required: - - automated_google_translation + - automatic_google_translation - required: - qual - required: - - _version DataValidationStatusUpdateResponse: type: object properties: @@ -14757,171 +14929,7 @@ components: type: string example: '20250820' additionalProperties: - type: object - properties: - manual_transcription: - type: object - properties: - language: - type: string - value: - type: string - additionalProperties: false - required: - - language - - value - manual_translation: - type: object - properties: - language: - type: string - value: - type: string - additionalProperties: false - required: - - language - - value - automatic_google_transcription: - type: object - properties: - language: - type: string - accepted: - type: boolean - additionalProperties: false - required: - - language - automatic_google_translation: - type: object - properties: - language: - type: string - accepted: - type: boolean - additionalProperties: false - required: - - language - qual: - oneOf: - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: integer - nullable: true - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: string - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: string - format: uuid - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: array - items: - type: string - format: uuid - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: array - items: - type: string - - type: object - properties: - uuid: - type: string - format: uuid - additionalProperties: false - anyOf: - - required: - - manual_transcription - - required: - - manual_translation - - required: - - automatic_google_transcription - - required: - - automatic_google_translation - - required: - - qual + $ref: '#/components/schemas/DataSupplementPayloadOneOf' required: - _version PatchedDataValidationStatusUpdatePayload: From e3d9a9438c946dfd7eea57c85612f1b801faf05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Sat, 13 Dec 2025 12:13:44 -0500 Subject: [PATCH 31/33] fix: only register new components --- jsapp/js/api/models/dataSupplementResponse.ts | 2 ++ jsapp/js/api/models/patchedDataSupplementPayload.ts | 2 ++ kpi/schema_extensions/v2/data/extensions.py | 10 +++++----- kpi/utils/schema_extensions/mixins.py | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/jsapp/js/api/models/dataSupplementResponse.ts b/jsapp/js/api/models/dataSupplementResponse.ts index 56c026ab0d..d60f1fefec 100644 --- a/jsapp/js/api/models/dataSupplementResponse.ts +++ b/jsapp/js/api/models/dataSupplementResponse.ts @@ -10,6 +10,8 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ +import { DataSupplementResponseOneOf } from './dataSupplementResponseOneOf' + export interface DataSupplementResponse { _version: string [key: string]: DataSupplementResponseOneOf diff --git a/jsapp/js/api/models/patchedDataSupplementPayload.ts b/jsapp/js/api/models/patchedDataSupplementPayload.ts index ae20c7d8ab..5b15130806 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayload.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayload.ts @@ -10,6 +10,8 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ +import { DataSupplementPayloadOneOf } from './dataSupplementPayloadOneOf' + export interface PatchedDataSupplementPayload { _version: string [key: string]: DataSupplementPayloadOneOf diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 14ab512de4..6a0455d13d 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -3,9 +3,10 @@ OpenApiSerializerFieldExtension, ) from drf_spectacular.plumbing import ( + ResolvedComponent, build_array_type, build_basic_type, - build_object_type, ResolvedComponent, + build_object_type, ) from drf_spectacular.types import OpenApiTypes @@ -140,7 +141,7 @@ def map_serializer(self, auto_schema, direction): 'example': '20250820', } }, - additionalProperties = self._register_schema_component( + additionalProperties=self._register_schema_component( auto_schema, 'DataSupplementPayloadOneOf', one_of_schema ), required=['_version'], @@ -308,7 +309,6 @@ class DataSupplementResponseExtension( DATETIME = build_basic_type(OpenApiTypes.DATETIME) UUID_STR = {'type': 'string', 'format': 'uuid'} - @property def question_schema(self): @@ -329,7 +329,7 @@ def question_schema(self): {'required': ['automatic_google_transcription']}, {'required': ['automatic_google_translation']}, {'required': ['qual']}, - ] + ], ) def map_serializer(self, auto_schema, direction): @@ -360,7 +360,7 @@ def map_serializer(self, auto_schema, direction): # Registering and referencing a dedicated schema component here allows Orval # to generate a union type for dynamic values while keeping `_version` # correctly typed, without changing the backend response format. - additionalProperties = self._register_schema_component( + additionalProperties=self._register_schema_component( auto_schema, 'DataSupplementResponseOneOf', one_of_schema ), required=['_version'], diff --git a/kpi/utils/schema_extensions/mixins.py b/kpi/utils/schema_extensions/mixins.py index b79d87480a..806a34bad0 100644 --- a/kpi/utils/schema_extensions/mixins.py +++ b/kpi/utils/schema_extensions/mixins.py @@ -19,5 +19,5 @@ def _register_schema_component(self, auto_schema, name, schema): object=self, ) - auto_schema.registry.register(component) + auto_schema.registry.register_on_missing(component) return component.ref From 895246c612b9bc78a042b8161f1328b9a0358d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Sat, 13 Dec 2025 15:03:24 -0500 Subject: [PATCH 32/33] fix: use hook to add missing imports for Orval --- .../models/dataSupplementPayloadOneOfOneOf.ts | 53 - .../dataSupplementPayloadOneOfOneOfQual.ts | 23 - ...ataSupplementPayloadOneOfOneOfQualOneOf.ts | 18 - ...upplementPayloadOneOfOneOfQualOneOfFive.ts | 18 - ...upplementPayloadOneOfOneOfQualOneOfNine.ts | 18 - ...ementPayloadOneOfOneOfQualOneOfOneseven.ts | 18 - ...ementPayloadOneOfOneOfQualOneOfOnethree.ts | 18 - ...PayloadOneOfOneOfQualOneOfOnethreeAllOf.ts | 16 - ...adOneOfOneOfQualOneOfOnethreeAllOfThree.ts | 15 - jsapp/js/api/models/dataSupplementResponse.ts | 3 +- .../models/patchedDataSupplementPayload.ts | 5 +- ...s => patchedDataSupplementPayloadOneOf.ts} | 4 +- .../patchedDataSupplementPayloadOneOfOneOf.ts | 53 + ...OneOfOneOfAutomaticGoogleTranscription.ts} | 2 +- ...adOneOfOneOfAutomaticGoogleTranslation.ts} | 2 +- ...ntPayloadOneOfOneOfManualTranscription.ts} | 2 +- ...mentPayloadOneOfOneOfManualTranslation.ts} | 2 +- ...chedDataSupplementPayloadOneOfOneOfQual.ts | 23 + ...ataSupplementPayloadOneOfOneOfQualOneOf.ts | 18 + ...plementPayloadOneOfOneOfQualOneOfAllOf.ts} | 2 +- ...ntPayloadOneOfOneOfQualOneOfAllOfThree.ts} | 2 +- ...mentPayloadOneOfOneOfQualOneOfAllOfTwo.ts} | 2 +- ...upplementPayloadOneOfOneOfQualOneOfFive.ts | 19 + ...entPayloadOneOfOneOfQualOneOfFiveAllOf.ts} | 2 +- ...yloadOneOfOneOfQualOneOfFiveAllOfThree.ts} | 2 +- ...PayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts} | 2 +- ...upplementPayloadOneOfOneOfQualOneOfNine.ts | 19 + ...entPayloadOneOfOneOfQualOneOfNineAllOf.ts} | 2 +- ...yloadOneOfOneOfQualOneOfNineAllOfThree.ts} | 2 +- ...PayloadOneOfOneOfQualOneOfNineAllOfTwo.ts} | 2 +- ...ementPayloadOneOfOneOfQualOneOfOneseven.ts | 19 + ...ayloadOneOfOneOfQualOneOfOnesevenAllOf.ts} | 2 +- ...dOneOfOneOfQualOneOfOnesevenAllOfThree.ts} | 2 +- ...oadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts} | 2 +- ...ementPayloadOneOfOneOfQualOneOfOnethree.ts | 19 + ...PayloadOneOfOneOfQualOneOfOnethreeAllOf.ts | 16 + ...adOneOfOneOfQualOneOfOnethreeAllOfThree.ts | 15 + ...oadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts} | 2 +- kpi/schema_extensions/v2/data/extensions.py | 2 +- kpi/schema_extensions/v2/generic/schema.py | 5 - orval.config.js | 3 + scripts/orval-fix-missing-imports.js | 59 ++ static/openapi/schema_v2.json | 904 +++++++++--------- static/openapi/schema_v2.yaml | 338 +++---- 44 files changed, 907 insertions(+), 848 deletions(-) delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts delete mode 100644 jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOf.ts => patchedDataSupplementPayloadOneOf.ts} (80%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOf.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts => patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts => patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfManualTranscription.ts => patchedDataSupplementPayloadOneOfOneOfManualTranscription.ts} (92%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfManualTranslation.ts => patchedDataSupplementPayloadOneOfOneOfManualTranslation.ts} (92%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQual.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOf.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts} (92%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts} (92%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFive.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts} (92%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts} (91%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNine.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts} (92%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts} (91%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts} (91%) rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts} (91%) create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts create mode 100644 jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts rename jsapp/js/api/models/{dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts => patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts} (91%) create mode 100644 scripts/orval-fix-missing-imports.js diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts deleted file mode 100644 index 3d49d41488..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOf.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription } from './dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription' -import type { DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation } from './dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation' -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfManualTranscription } from './dataSupplementPayloadOneOfOneOfManualTranscription' -import type { DataSupplementPayloadOneOfOneOfManualTranslation } from './dataSupplementPayloadOneOfOneOfManualTranslation' -import type { DataSupplementPayloadOneOfOneOfQual } from './dataSupplementPayloadOneOfOneOfQual' - -export type DataSupplementPayloadOneOfOneOf = - | (unknown & { - manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription - manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation - automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription - automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation - qual?: DataSupplementPayloadOneOfOneOfQual - }) - | (unknown & { - manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription - manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation - automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription - automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation - qual?: DataSupplementPayloadOneOfOneOfQual - }) - | (unknown & { - manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription - manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation - automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription - automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation - qual?: DataSupplementPayloadOneOfOneOfQual - }) - | (unknown & { - manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription - manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation - automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription - automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation - qual?: DataSupplementPayloadOneOfOneOfQual - }) - | (unknown & { - manual_transcription?: DataSupplementPayloadOneOfOneOfManualTranscription - manual_translation?: DataSupplementPayloadOneOfOneOfManualTranslation - automatic_google_transcription?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription - automatic_google_translation?: DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation - qual?: DataSupplementPayloadOneOfOneOfQual - }) diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts deleted file mode 100644 index cc4f5c73c0..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQual.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOf } from './dataSupplementPayloadOneOfOneOfQualOneOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfFive } from './dataSupplementPayloadOneOfOneOfQualOneOfFive' -import type { DataSupplementPayloadOneOfOneOfQualOneOfNine } from './dataSupplementPayloadOneOfOneOfQualOneOfNine' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOneseven } from './dataSupplementPayloadOneOfOneOfQualOneOfOneseven' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethree' - -export type DataSupplementPayloadOneOfOneOfQual = - | DataSupplementPayloadOneOfOneOfQualOneOf - | DataSupplementPayloadOneOfOneOfQualOneOfFive - | DataSupplementPayloadOneOfOneOfQualOneOfNine - | DataSupplementPayloadOneOfOneOfQualOneOfOnethree - | DataSupplementPayloadOneOfOneOfQualOneOfOneseven diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts deleted file mode 100644 index 17d2b7d919..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOf.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree' -import type { DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo' - -export type DataSupplementPayloadOneOfOneOfQualOneOf = DataSupplementPayloadOneOfOneOfQualOneOfAllOf & - DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo & - DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts deleted file mode 100644 index d60dfe7783..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFive.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree' -import type { DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo' - -export type DataSupplementPayloadOneOfOneOfQualOneOfFive = DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf & - DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo & - DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts deleted file mode 100644 index 564bce0a66..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNine.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree' -import type { DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo' - -export type DataSupplementPayloadOneOfOneOfQualOneOfNine = DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf & - DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo & - DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts deleted file mode 100644 index 8fced274b7..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo' - -export type DataSupplementPayloadOneOfOneOfQualOneOfOneseven = DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf & - DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo & - DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts deleted file mode 100644 index 27df64824d..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree' -import type { DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo } from './dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo' - -export type DataSupplementPayloadOneOfOneOfQualOneOfOnethree = DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf & - DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo & - DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts deleted file mode 100644 index b8a306db6c..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf = { - uuid: string - value: unknown -} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts b/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts deleted file mode 100644 index 63cddb033a..0000000000 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Generated by orval v7.10.0 🍺 - * Do not edit manually. - * KoboToolbox Primary API - * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). - -The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. - -**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". - * OpenAPI spec version: 2.0.0 (api_v2) - */ - -export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree = { - uuid?: string -} diff --git a/jsapp/js/api/models/dataSupplementResponse.ts b/jsapp/js/api/models/dataSupplementResponse.ts index d60f1fefec..d628b75829 100644 --- a/jsapp/js/api/models/dataSupplementResponse.ts +++ b/jsapp/js/api/models/dataSupplementResponse.ts @@ -10,8 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -import { DataSupplementResponseOneOf } from './dataSupplementResponseOneOf' - +import type { DataSupplementResponseOneOf } from './dataSupplementResponseOneOf' export interface DataSupplementResponse { _version: string [key: string]: DataSupplementResponseOneOf diff --git a/jsapp/js/api/models/patchedDataSupplementPayload.ts b/jsapp/js/api/models/patchedDataSupplementPayload.ts index 5b15130806..77ce77b8b0 100644 --- a/jsapp/js/api/models/patchedDataSupplementPayload.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayload.ts @@ -10,9 +10,8 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -import { DataSupplementPayloadOneOf } from './dataSupplementPayloadOneOf' - +import type { PatchedDataSupplementPayloadOneOf } from './patchedDataSupplementPayloadOneOf' export interface PatchedDataSupplementPayload { _version: string - [key: string]: DataSupplementPayloadOneOf + [key: string]: PatchedDataSupplementPayloadOneOf } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOf.ts similarity index 80% rename from jsapp/js/api/models/dataSupplementPayloadOneOf.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOf.ts index 8b8d43a9d0..f8e9f64fa5 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOf.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOf.ts @@ -9,6 +9,6 @@ The endpoints are grouped by area of intended use. Each category contains relate **General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". * OpenAPI spec version: 2.0.0 (api_v2) */ -import type { DataSupplementPayloadOneOfOneOf } from './dataSupplementPayloadOneOfOneOf' +import type { PatchedDataSupplementPayloadOneOfOneOf } from './patchedDataSupplementPayloadOneOfOneOf' -export type DataSupplementPayloadOneOf = string | DataSupplementPayloadOneOfOneOf +export type PatchedDataSupplementPayloadOneOf = string | PatchedDataSupplementPayloadOneOfOneOf diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOf.ts new file mode 100644 index 0000000000..8ba18013bb --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOf.ts @@ -0,0 +1,53 @@ +import type { PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription } from './patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription' +import type { PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation } from './patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation' +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfManualTranscription } from './patchedDataSupplementPayloadOneOfOneOfManualTranscription' +import type { PatchedDataSupplementPayloadOneOfOneOfManualTranslation } from './patchedDataSupplementPayloadOneOfOneOfManualTranslation' +import type { PatchedDataSupplementPayloadOneOfOneOfQual } from './patchedDataSupplementPayloadOneOfOneOfQual' + +export type PatchedDataSupplementPayloadOneOfOneOf = + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: PatchedDataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: PatchedDataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: PatchedDataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: PatchedDataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadOneOfOneOfQual + }) + | (unknown & { + manual_transcription?: PatchedDataSupplementPayloadOneOfOneOfManualTranscription + manual_translation?: PatchedDataSupplementPayloadOneOfOneOfManualTranslation + automatic_google_transcription?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription + automatic_google_translation?: PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation + qual?: PatchedDataSupplementPayloadOneOfOneOfQual + }) diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts index d3fffa6455..7bea060481 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation = { +export type PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription = { language: string accepted?: boolean } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts index a18428aeef..e5775ff79a 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfAutomaticGoogleTranscription = { +export type PatchedDataSupplementPayloadOneOfOneOfAutomaticGoogleTranslation = { language: string accepted?: boolean } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranscription.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranscription.ts index 8e77afdad2..cf71ef67bd 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranscription.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranscription.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfManualTranscription = { +export type PatchedDataSupplementPayloadOneOfOneOfManualTranscription = { language: string value: string } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranslation.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranslation.ts index 1acd371ff8..d1edb99148 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfManualTranslation.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfManualTranslation.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfManualTranslation = { +export type PatchedDataSupplementPayloadOneOfOneOfManualTranslation = { language: string value: string } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQual.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQual.ts new file mode 100644 index 0000000000..771114c963 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQual.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfFive } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfFive' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfNine } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfNine' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree' + +export type PatchedDataSupplementPayloadOneOfOneOfQual = + | PatchedDataSupplementPayloadOneOfOneOfQualOneOf + | PatchedDataSupplementPayloadOneOfOneOfQualOneOfFive + | PatchedDataSupplementPayloadOneOfOneOfQualOneOfNine + | PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree + | PatchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOf.ts new file mode 100644 index 0000000000..3644d068ef --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOf.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo' + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOf = PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts index 5cea16271e..260b853462 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOf = { uuid: string value: unknown } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts index 74867ae61a..fcc4fbe310 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfThree = { uuid?: string } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts index 89c39fd10e..890bdf071e 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfAllOfTwo = { /** @nullable */ value?: number | null } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFive.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFive.ts new file mode 100644 index 0000000000..96b7bc3ccd --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFive.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo' + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfFive = + PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts index 1177c85ef6..070aae1cf1 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOf = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOf = { uuid: string value: unknown } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts index 6c5e18ba22..0629b6147e 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfThree = { uuid?: string } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts index cc9d7eb807..92fc020e14 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo = { value?: string } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNine.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNine.ts new file mode 100644 index 0000000000..4d0b9af7ea --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNine.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo' + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfNine = + PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts similarity index 92% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts index 74f6f12b76..89c8eab8c4 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOf.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfAllOf = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOf = { uuid: string value: unknown } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts index e5c5fdc4aa..c7f48df1ee 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfThree = { uuid?: string } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts index 06f45ed5cd..7f643bad60 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfFiveAllOfTwo = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfNineAllOfTwo = { value?: string } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts new file mode 100644 index 0000000000..d038f817a4 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo' + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOneseven = + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts index e3a3171466..464384ba9d 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf.ts @@ -10,7 +10,7 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOf = { uuid: string value: unknown } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts index 0d4339958c..92ee12efc5 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfAllOfThree.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfAllOfThree = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfThree = { uuid?: string } diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts index 5cb57f50b4..093e9a3a44 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnesevenAllOfTwo = { value?: string[] } diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts new file mode 100644 index 0000000000..90fdcea171 --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree' +import type { PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo } from './patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo' + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethree = + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo & + PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts new file mode 100644 index 0000000000..b3b027443b --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOf = { + uuid: string + value: unknown +} diff --git a/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts new file mode 100644 index 0000000000..395aafc18b --- /dev/null +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v7.10.0 🍺 + * Do not edit manually. + * KoboToolbox Primary API + * This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/). + +The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources. + +**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets". + * OpenAPI spec version: 2.0.0 (api_v2) + */ + +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfThree = { + uuid?: string +} diff --git a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts similarity index 91% rename from jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts rename to jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts index a7b34cb9af..6c4d044a2d 100644 --- a/jsapp/js/api/models/dataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts +++ b/jsapp/js/api/models/patchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo.ts @@ -10,6 +10,6 @@ The endpoints are grouped by area of intended use. Each category contains relate * OpenAPI spec version: 2.0.0 (api_v2) */ -export type DataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo = { +export type PatchedDataSupplementPayloadOneOfOneOfQualOneOfOnethreeAllOfTwo = { value?: string[] } diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 6a0455d13d..67719379bc 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -142,7 +142,7 @@ def map_serializer(self, auto_schema, direction): } }, additionalProperties=self._register_schema_component( - auto_schema, 'DataSupplementPayloadOneOf', one_of_schema + auto_schema, 'PatchedDataSupplementPayloadOneOf', one_of_schema ), required=['_version'], ) diff --git a/kpi/schema_extensions/v2/generic/schema.py b/kpi/schema_extensions/v2/generic/schema.py index c6fcb4b2f1..55089ac762 100644 --- a/kpi/schema_extensions/v2/generic/schema.py +++ b/kpi/schema_extensions/v2/generic/schema.py @@ -76,8 +76,3 @@ GENERIC_OBJECT_SCHEMA = build_object_type(properties={}) USER_URL_SCHEMA = build_url_type('api_v2:user-kpi-detail', username='bob') - -STATUS_NLP_ACTION_SCHEMA = { - 'type': 'string', - 'enum': ['failed', 'complete', 'deleted', 'in_progress'], -} diff --git a/orval.config.js b/orval.config.js index 5fb9453737..6d590a52ec 100644 --- a/orval.config.js +++ b/orval.config.js @@ -37,5 +37,8 @@ module.exports = { input: { target: './static/openapi/schema_v2.yaml', }, + hooks: { + afterAllFilesWrite: 'node scripts/orval-fix-missing-imports.js', + }, }, } diff --git a/scripts/orval-fix-missing-imports.js b/scripts/orval-fix-missing-imports.js new file mode 100644 index 0000000000..b1de9ae117 --- /dev/null +++ b/scripts/orval-fix-missing-imports.js @@ -0,0 +1,59 @@ +/* eslint-disable no-console */ +const fs = require('fs') +const path = require('path') + +const ROOT = process.cwd() // /srv/src/kpi +const MODELS_DIR = path.join(ROOT, 'jsapp/js/api/models') + +const TARGETS = [ + { + file: 'dataSupplementResponse.ts', + type: 'DataSupplementResponseOneOf', + importPath: './dataSupplementResponseOneOf', + }, + { + file: 'patchedDataSupplementPayload.ts', + type: 'PatchedDataSupplementPayloadOneOf', + importPath: './patchedDataSupplementPayloadOneOf', + }, +] + +function insertImportAfterHeader(source, importLine) { + // Match first /** ... */ block + const headerMatch = source.match(/^\/\*\*[\s\S]*?\*\/\s*/) + + if (!headerMatch) { + // Fallback: prepend if header not found + return `${importLine}\n${source}` + } + + const header = headerMatch[0] + const rest = source.slice(header.length) + + return `${header}\n${importLine}\n${rest}` +} + +for (const { file, type, importPath } of TARGETS) { + const filePath = path.join(MODELS_DIR, file) + + if (!fs.existsSync(filePath)) { + continue + } + + const source = fs.readFileSync(filePath, 'utf8') + + const usesType = source.includes(type) + const hasImport = new RegExp(`import\\s+type\\s*\\{\\s*${type}\\s*\\}`).test(source) + const hasLocalDecl = new RegExp(`\\b(type|interface)\\s+${type}\\b`).test(source) + + if (!usesType || hasImport || hasLocalDecl) { + continue + } + + const importLine = `import type { ${type} } from '${importPath}'` + + const patched = insertImportAfterHeader(source, importLine) + + fs.writeFileSync(filePath, patched, 'utf8') + console.log(`✔ Added missing import for ${type} in ${file}`) +} diff --git a/static/openapi/schema_v2.json b/static/openapi/schema_v2.json index 9a87611e60..cc2d242464 100644 --- a/static/openapi/schema_v2.json +++ b/static/openapi/schema_v2.json @@ -15893,7 +15893,22 @@ "detail" ] }, - "DataSupplementPayloadOneOf": { + "DataSupplementResponse": { + "type": "object", + "properties": { + "_version": { + "type": "string", + "example": "20250820" + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/DataSupplementResponseOneOf" + }, + "required": [ + "_version" + ] + }, + "DataSupplementResponseOneOf": { "oneOf": [ { "type": "string" @@ -15904,314 +15919,153 @@ "manual_transcription": { "type": "object", "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - }, - "manual_translation": { - "type": "object", - "properties": { - "language": { - "type": "string" + "_dateCreated": { + "type": "string", + "format": "date-time" }, - "value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - }, - "automatic_google_transcription": { - "type": "object", - "properties": { - "language": { - "type": "string" + "_dateModified": { + "type": "string", + "format": "date-time" }, - "accepted": { - "type": "boolean" + "_versions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_uuid": { + "type": "string", + "format": "uuid" + }, + "_dateAccepted": { + "type": "string", + "format": "date-time" + }, + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + } + }, + "additionalProperties": false, + "required": [ + "_data", + "_dateAccepted", + "_dateCreated", + "_uuid" + ] + }, + "minLength": 1 } }, "additionalProperties": false, "required": [ - "language" + "_dateCreated", + "_dateModified", + "_versions" ] }, - "automatic_google_translation": { + "manual_translation": { "type": "object", - "properties": { - "language": { - "type": "string" - }, - "accepted": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "language" - ] - }, - "qual": { - "oneOf": [ - { - "allOf": [ - { + "additionalProperties": { + "type": "object", + "properties": { + "_dateCreated": { + "type": "string", + "format": "date-time" + }, + "_dateModified": { + "type": "string", + "format": "date-time" + }, + "_versions": { + "type": "array", + "items": { "type": "object", - "additionalProperties": false, "properties": { - "uuid": { + "_dateCreated": { "type": "string", - "format": "uuid" + "format": "date-time" }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "integer", - "nullable": true - } - } - }, - { - "type": "object", - "properties": { - "uuid": { + "_uuid": { "type": "string", "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { + }, + "_dependency": { + "type": "object", + "properties": { + "_actionId": { + "type": "string" + }, + "_uuid": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false, + "required": [ + "_actionId", + "_uuid" + ] + }, + "_dateAccepted": { "type": "string", - "format": "uuid" + "format": "date-time" }, - "value": {} + "_data": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + } }, + "additionalProperties": false, "required": [ - "uuid", - "value" + "_data", + "_dateAccepted", + "_dateCreated", + "_dependency", + "_uuid" ] }, - { - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] + "minLength": 1 + } }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "string", - "format": "uuid" - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - }, - { - "allOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "value": {} - }, - "required": [ - "uuid", - "value" - ] - }, - { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } - } - ] - } - ] - } - }, - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "manual_transcription" - ] - }, - { - "required": [ - "manual_translation" - ] - }, - { - "required": [ - "automatic_google_transcription" - ] - }, - { - "required": [ - "automatic_google_translation" - ] + "additionalProperties": false, + "required": [ + "_dateCreated", + "_dateModified", + "_versions" + ] + } }, - { - "required": [ - "qual" - ] - } - ] - } - ] - }, - "DataSupplementResponse": { - "type": "object", - "properties": { - "_version": { - "type": "string", - "example": "20250820" - } - }, - "additionalProperties": { - "$ref": "#/components/schemas/DataSupplementResponseOneOf" - }, - "required": [ - "_version" - ] - }, - "DataSupplementResponseOneOf": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "manual_transcription": { + "automatic_google_transcription": { "type": "object", "properties": { "_dateCreated": { @@ -16240,172 +16094,23 @@ "format": "date-time" }, "_data": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateAccepted", - "_dateCreated", - "_uuid" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] - }, - "manual_translation": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" - }, - "_dependency": { - "type": "object", - "properties": { - "_actionId": { - "type": "string" + "oneOf": [ + { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "status": { + "type": "string", + "const": "in_progress" + } }, - "_uuid": { - "type": "string", - "format": "uuid" - } - }, - "additionalProperties": false, - "required": [ - "_actionId", - "_uuid" - ] - }, - "_dateAccepted": { - "type": "string", - "format": "date-time" - }, - "_data": { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false, - "required": [ - "language", - "value" - ] - } - }, - "additionalProperties": false, - "required": [ - "_data", - "_dateAccepted", - "_dateCreated", - "_dependency", - "_uuid" - ] - }, - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "_dateCreated", - "_dateModified", - "_versions" - ] - } - }, - "automatic_google_transcription": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_dateModified": { - "type": "string", - "format": "date-time" - }, - "_versions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "_dateCreated": { - "type": "string", - "format": "date-time" - }, - "_uuid": { - "type": "string", - "format": "uuid" - }, - "_dateAccepted": { - "type": "string", - "format": "date-time" - }, - "_data": { - "oneOf": [ - { - "type": "object", - "properties": { - "language": { - "type": "string" - }, - "status": { - "type": "string", - "const": "in_progress" - } - }, - "additionalProperties": false, - "required": [ - "language", - "status" - ] + "additionalProperties": false, + "required": [ + "language", + "status" + ] }, { "type": "object", @@ -20727,12 +20432,307 @@ } }, "additionalProperties": { - "$ref": "#/components/schemas/DataSupplementPayloadOneOf" + "$ref": "#/components/schemas/PatchedDataSupplementPayloadOneOf" }, "required": [ "_version" ] }, + "PatchedDataSupplementPayloadOneOf": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "manual_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "manual_translation": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "language", + "value" + ] + }, + "automatic_google_transcription": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "accepted": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] + }, + "automatic_google_translation": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "accepted": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "language" + ] + }, + "qual": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "uuid" + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "value": {} + }, + "required": [ + "uuid", + "value" + ] + }, + { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + } + ] + } + ] + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "manual_transcription" + ] + }, + { + "required": [ + "manual_translation" + ] + }, + { + "required": [ + "automatic_google_transcription" + ] + }, + { + "required": [ + "automatic_google_translation" + ] + }, + { + "required": [ + "qual" + ] + } + ] + } + ] + }, "PatchedDataValidationStatusUpdatePayload": { "type": "object", "properties": { diff --git a/static/openapi/schema_v2.yaml b/static/openapi/schema_v2.yaml index 2e323d0f7d..ef6a9b5542 100644 --- a/static/openapi/schema_v2.yaml +++ b/static/openapi/schema_v2.yaml @@ -11547,174 +11547,6 @@ components: type: string required: - detail - DataSupplementPayloadOneOf: - oneOf: - - type: string - - type: object - properties: - manual_transcription: - type: object - properties: - language: - type: string - value: - type: string - additionalProperties: false - required: - - language - - value - manual_translation: - type: object - properties: - language: - type: string - value: - type: string - additionalProperties: false - required: - - language - - value - automatic_google_transcription: - type: object - properties: - language: - type: string - accepted: - type: boolean - additionalProperties: false - required: - - language - automatic_google_translation: - type: object - properties: - language: - type: string - accepted: - type: boolean - additionalProperties: false - required: - - language - qual: - oneOf: - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: integer - nullable: true - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: string - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: string - format: uuid - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: array - items: - type: string - format: uuid - - type: object - properties: - uuid: - type: string - format: uuid - - allOf: - - type: object - additionalProperties: false - properties: - uuid: - type: string - format: uuid - value: {} - required: - - uuid - - value - - type: object - properties: - value: - type: array - items: - type: string - - type: object - properties: - uuid: - type: string - format: uuid - additionalProperties: false - anyOf: - - required: - - manual_transcription - - required: - - manual_translation - - required: - - automatic_google_transcription - - required: - - automatic_google_translation - - required: - - qual DataSupplementResponse: type: object properties: @@ -14929,9 +14761,177 @@ components: type: string example: '20250820' additionalProperties: - $ref: '#/components/schemas/DataSupplementPayloadOneOf' + $ref: '#/components/schemas/PatchedDataSupplementPayloadOneOf' required: - _version + PatchedDataSupplementPayloadOneOf: + oneOf: + - type: string + - type: object + properties: + manual_transcription: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + manual_translation: + type: object + properties: + language: + type: string + value: + type: string + additionalProperties: false + required: + - language + - value + automatic_google_transcription: + type: object + properties: + language: + type: string + accepted: + type: boolean + additionalProperties: false + required: + - language + automatic_google_translation: + type: object + properties: + language: + type: string + accepted: + type: boolean + additionalProperties: false + required: + - language + qual: + oneOf: + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: integer + nullable: true + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + format: uuid + - type: object + properties: + uuid: + type: string + format: uuid + - allOf: + - type: object + additionalProperties: false + properties: + uuid: + type: string + format: uuid + value: {} + required: + - uuid + - value + - type: object + properties: + value: + type: array + items: + type: string + - type: object + properties: + uuid: + type: string + format: uuid + additionalProperties: false + anyOf: + - required: + - manual_transcription + - required: + - manual_translation + - required: + - automatic_google_transcription + - required: + - automatic_google_translation + - required: + - qual PatchedDataValidationStatusUpdatePayload: type: object properties: From c42961d4dc98ab242f45bb2bf0d7f5784e279042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20L=C3=A9ger?= Date: Sat, 13 Dec 2025 15:22:32 -0500 Subject: [PATCH 33/33] fix: cleanup --- kpi/schema_extensions/v2/data/extensions.py | 41 ++++++++++----------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/kpi/schema_extensions/v2/data/extensions.py b/kpi/schema_extensions/v2/data/extensions.py index 67719379bc..8ffcf8c1d4 100644 --- a/kpi/schema_extensions/v2/data/extensions.py +++ b/kpi/schema_extensions/v2/data/extensions.py @@ -3,7 +3,6 @@ OpenApiSerializerFieldExtension, ) from drf_spectacular.plumbing import ( - ResolvedComponent, build_array_type, build_basic_type, build_object_type, @@ -141,6 +140,18 @@ def map_serializer(self, auto_schema, direction): 'example': '20250820', } }, + # Use a named schema component for `additionalProperties` because the + # payload mixes: + # - a static key (`_version`) + # - dynamic keys (question names) + # + # When represented as a plain `additionalProperties` object, Orval generates + # a TypeScript index signature that conflicts with the static `_version` + # field (i.e. `[key: string]: QuestionEntry` vs `_version: string`). + # + # Registering and referencing a dedicated schema component here allows Orval + # to generate a union type for dynamic values while keeping `_version` + # correctly typed, without changing the backend response format. additionalProperties=self._register_schema_component( auto_schema, 'PatchedDataSupplementPayloadOneOf', one_of_schema ), @@ -289,17 +300,6 @@ def _nlp_manual_action_schema(self): required=['language', 'value'], ) - def _register_schema_component(self, auto_schema, name, schema): - component = ResolvedComponent( - name=name, - type=ResolvedComponent.SCHEMA, - schema=schema, - object=self, - ) - - auto_schema.registry.register(component) - return component.ref - class DataSupplementResponseExtension( ComponentRegistrationMixin, OpenApiSerializerExtension @@ -348,14 +348,14 @@ def map_serializer(self, auto_schema, direction): 'example': '20250820', } }, - # This schema intentionally uses a named component for `additionalProperties` - # because the payload mixes: + # Use a named schema component for `additionalProperties` because the + # payload mixes: # - a static key (`_version`) # - dynamic keys (question names) # # When represented as a plain `additionalProperties` object, Orval generates - # a TypeScript index signature that conflicts with the static `_version` field - # (i.e. `[key: string]: QuestionEntry` vs `_version: string`). + # a TypeScript index signature that conflicts with the static `_version` + # field (i.e. `[key: string]: QuestionEntry` vs `_version: string`). # # Registering and referencing a dedicated schema component here allows Orval # to generate a union type for dynamic values while keeping `_version` @@ -708,13 +708,12 @@ def _qual_schema(self): return qual_root @property - def _manual_transcription_schema(cls): - return cls._build_transcription_schema(include_status=False) + def _manual_transcription_schema(self): + return self._build_transcription_schema(include_status=False) @property - def _manual_translation_schema(cls): - return cls._build_translation_schema(include_status=False) - + def _manual_translation_schema(self): + return self._build_translation_schema(include_status=False) class DataValidationPayloadFieldExtension(OpenApiSerializerFieldExtension):