From f5973c305ad43ce3fec5e1599be10e13e47b4fd7 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 11 Jul 2024 15:47:40 +0000 Subject: [PATCH] fix(specs): browse response required properties https://github.com/algolia/api-clients-automation/pull/3348 Co-authored-by: Pierre Millot --- .../ingestion/model/dockerStreamsInput.ts | 5 +++++ packages/ingestion/model/index.ts | 5 ++--- .../ingestion/model/onDemandDateUtilsInput.ts | 20 ------------------- .../ingestion/model/scheduleDateUtilsInput.ts | 15 -------------- ...reamingUtilsInput.ts => streamingInput.ts} | 2 +- packages/ingestion/model/taskInput.ts | 11 +++------- packages/ingestion/model/transformation.ts | 2 +- .../ingestion/model/transformationCreate.ts | 2 +- packages/ingestion/src/ingestionClient.ts | 10 ---------- 9 files changed, 13 insertions(+), 59 deletions(-) create mode 100644 packages/ingestion/model/dockerStreamsInput.ts delete mode 100644 packages/ingestion/model/onDemandDateUtilsInput.ts delete mode 100644 packages/ingestion/model/scheduleDateUtilsInput.ts rename packages/ingestion/model/{streamingUtilsInput.ts => streamingInput.ts} (91%) diff --git a/packages/ingestion/model/dockerStreamsInput.ts b/packages/ingestion/model/dockerStreamsInput.ts new file mode 100644 index 000000000..66334f677 --- /dev/null +++ b/packages/ingestion/model/dockerStreamsInput.ts @@ -0,0 +1,5 @@ +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. + +export type DockerStreamsInput = { + streams: Record; +}; diff --git a/packages/ingestion/model/index.ts b/packages/ingestion/model/index.ts index cf7e0c7a3..5290b5baa 100644 --- a/packages/ingestion/model/index.ts +++ b/packages/ingestion/model/index.ts @@ -41,6 +41,7 @@ export * from './destinationUpdate'; export * from './destinationUpdateResponse'; export * from './dockerImageType'; export * from './dockerRegistry'; +export * from './dockerStreamsInput'; export * from './errorBase'; export * from './event'; export * from './eventSortKeys'; @@ -58,7 +59,6 @@ export * from './mappingInput'; export * from './mappingKitAction'; export * from './mappingTypeCSV'; export * from './methodType'; -export * from './onDemandDateUtilsInput'; export * from './onDemandTrigger'; export * from './onDemandTriggerInput'; export * from './onDemandTriggerType'; @@ -77,7 +77,6 @@ export * from './runResponse'; export * from './runSortKeys'; export * from './runStatus'; export * from './runType'; -export * from './scheduleDateUtilsInput'; export * from './scheduleTrigger'; export * from './scheduleTriggerInput'; export * from './scheduleTriggerType'; @@ -108,9 +107,9 @@ export * from './sourceUpdateInput'; export * from './sourceUpdateResponse'; export * from './sourceUpdateShopify'; export * from './sourceWatchResponse'; +export * from './streamingInput'; export * from './streamingTrigger'; export * from './streamingTriggerType'; -export * from './streamingUtilsInput'; export * from './subscriptionTrigger'; export * from './subscriptionTriggerType'; export * from './task'; diff --git a/packages/ingestion/model/onDemandDateUtilsInput.ts b/packages/ingestion/model/onDemandDateUtilsInput.ts deleted file mode 100644 index a06733652..000000000 --- a/packages/ingestion/model/onDemandDateUtilsInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -import type { MappingInput } from './mappingInput'; - -/** - * Input for a manually-triggered task whose source is of type `bigquery` and for which extracted data spans a given time range. - */ -export type OnDemandDateUtilsInput = { - /** - * Earliest date in RFC 3339 format of the extracted data from Big Query. - */ - startDate: string; - - /** - * Latest date in RFC 3339 format of the extracted data from Big Query. - */ - endDate: string; - - mapping?: MappingInput; -}; diff --git a/packages/ingestion/model/scheduleDateUtilsInput.ts b/packages/ingestion/model/scheduleDateUtilsInput.ts deleted file mode 100644 index 9d1a77e5e..000000000 --- a/packages/ingestion/model/scheduleDateUtilsInput.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. - -import type { MappingInput } from './mappingInput'; - -/** - * Input for scheduled tasks whose source is of type `bigquery` and for which extracted data spans a fixed number of days. - */ -export type ScheduleDateUtilsInput = { - /** - * Number of days in the past until the current day for which to extract Big Query data. - */ - timeframe: number; - - mapping?: MappingInput; -}; diff --git a/packages/ingestion/model/streamingUtilsInput.ts b/packages/ingestion/model/streamingInput.ts similarity index 91% rename from packages/ingestion/model/streamingUtilsInput.ts rename to packages/ingestion/model/streamingInput.ts index bf3fbb81a..ecd003dc5 100644 --- a/packages/ingestion/model/streamingUtilsInput.ts +++ b/packages/ingestion/model/streamingInput.ts @@ -5,6 +5,6 @@ import type { MappingInput } from './mappingInput'; /** * Input for a `streaming` task whose source is of type `ga4BigqueryExport` and for which extracted data is continuously streamed. */ -export type StreamingUtilsInput = { +export type StreamingInput = { mapping: MappingInput; }; diff --git a/packages/ingestion/model/taskInput.ts b/packages/ingestion/model/taskInput.ts index c0596f4cd..71d5a7c51 100644 --- a/packages/ingestion/model/taskInput.ts +++ b/packages/ingestion/model/taskInput.ts @@ -1,15 +1,10 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { OnDemandDateUtilsInput } from './onDemandDateUtilsInput'; -import type { ScheduleDateUtilsInput } from './scheduleDateUtilsInput'; +import type { DockerStreamsInput } from './dockerStreamsInput'; import type { ShopifyInput } from './shopifyInput'; -import type { StreamingUtilsInput } from './streamingUtilsInput'; +import type { StreamingInput } from './streamingInput'; /** * Configuration of the task, depending on its type. */ -export type TaskInput = - | OnDemandDateUtilsInput - | ScheduleDateUtilsInput - | ShopifyInput - | StreamingUtilsInput; +export type TaskInput = DockerStreamsInput | ShopifyInput | StreamingInput; diff --git a/packages/ingestion/model/transformation.ts b/packages/ingestion/model/transformation.ts index 350efddee..68d4af8b0 100644 --- a/packages/ingestion/model/transformation.ts +++ b/packages/ingestion/model/transformation.ts @@ -19,7 +19,7 @@ export type Transformation = { /** * A descriptive name for your transformation of what it does. */ - description: string; + description?: string; /** * Date of creation in RFC 3339 format. diff --git a/packages/ingestion/model/transformationCreate.ts b/packages/ingestion/model/transformationCreate.ts index 6c5b2462a..0753e5144 100644 --- a/packages/ingestion/model/transformationCreate.ts +++ b/packages/ingestion/model/transformationCreate.ts @@ -17,5 +17,5 @@ export type TransformationCreate = { /** * A descriptive name for your transformation of what it does. */ - description: string; + description?: string; }; diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index 84c4c26cf..446da63e9 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -439,11 +439,6 @@ export function createIngestionClient({ 'Parameter `transformationCreate.name` is required when calling `createTransformation`.' ); } - if (!transformationCreate.description) { - throw new Error( - 'Parameter `transformationCreate.description` is required when calling `createTransformation`.' - ); - } const requestPath = '/1/transformations'; const headers: Headers = {}; @@ -2172,11 +2167,6 @@ export function createIngestionClient({ 'Parameter `transformationCreate.name` is required when calling `updateTransformation`.' ); } - if (!transformationCreate.description) { - throw new Error( - 'Parameter `transformationCreate.description` is required when calling `updateTransformation`.' - ); - } const requestPath = '/1/transformations/{transformationID}'.replace( '{transformationID}',