From 74a69aa7d21bb5c3be86b1737ef316eb9de98f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20CG?= Date: Mon, 25 Nov 2024 15:40:00 +0100 Subject: [PATCH] doc: add @public release-tag (#1664) * fix: add stats price fallback --- .../src/mappers/requests/related-prompts-request.mapper.ts | 2 ++ .../src/mappers/responses/related-prompts-response.mapper.ts | 2 ++ .../src/schemas/models/related-prompt.schema.ts | 2 ++ .../x-adapter-platform/src/schemas/models/stats.schema.ts | 4 ++-- .../src/schemas/requests/related-prompts-request.schema.ts | 2 ++ .../src/schemas/responses/related-prompts-response.schema.ts | 2 ++ .../src/types/models/related-prompt.model.ts | 2 ++ .../src/types/responses/related-prompts-response.model.ts | 2 ++ packages/x-types/src/query-signals/related-prompt.model.ts | 2 ++ .../x-types/src/request/related-prompts-request.model.ts | 2 ++ .../x-types/src/response/related-prompts-response.model.ts | 2 ++ packages/x-types/src/stats.model.ts | 5 ++++- 12 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/x-adapter-platform/src/mappers/requests/related-prompts-request.mapper.ts b/packages/x-adapter-platform/src/mappers/requests/related-prompts-request.mapper.ts index 0931253491..b1805a03c7 100644 --- a/packages/x-adapter-platform/src/mappers/requests/related-prompts-request.mapper.ts +++ b/packages/x-adapter-platform/src/mappers/requests/related-prompts-request.mapper.ts @@ -5,6 +5,8 @@ import { relatedPromptsRequestSchema } from '../../schemas/requests/related-prom /** * Default implementation for the RelatedPromptsRequestMapper. + * + * @public */ export const relatedPromptsRequestMapper = schemaMapperFactory< RelatedPromptsRequest, diff --git a/packages/x-adapter-platform/src/mappers/responses/related-prompts-response.mapper.ts b/packages/x-adapter-platform/src/mappers/responses/related-prompts-response.mapper.ts index 869520f73c..f401fe725c 100644 --- a/packages/x-adapter-platform/src/mappers/responses/related-prompts-response.mapper.ts +++ b/packages/x-adapter-platform/src/mappers/responses/related-prompts-response.mapper.ts @@ -7,6 +7,8 @@ import { relatedPromptsResponseSchema } from '../../schemas/responses/related-pr /** * Default implementation for the RelatedPromptsResponseMapper. + * + * @public */ export const relatedPromptsResponseMapper = schemaMapperFactory< PlatformRelatedPromptsResponse, diff --git a/packages/x-adapter-platform/src/schemas/models/related-prompt.schema.ts b/packages/x-adapter-platform/src/schemas/models/related-prompt.schema.ts index 1589a2076d..38efbdb19d 100644 --- a/packages/x-adapter-platform/src/schemas/models/related-prompt.schema.ts +++ b/packages/x-adapter-platform/src/schemas/models/related-prompt.schema.ts @@ -4,6 +4,8 @@ import { PlatformRelatedPrompt } from '../../types/models/related-prompt.model'; /** * Default implementation for the RelatedPromptSchema. + * + * @public */ export const relatedPromptSchema = createMutableSchema({ modelName: () => 'RelatedPrompt', diff --git a/packages/x-adapter-platform/src/schemas/models/stats.schema.ts b/packages/x-adapter-platform/src/schemas/models/stats.schema.ts index e276615beb..4ab2fa958d 100644 --- a/packages/x-adapter-platform/src/schemas/models/stats.schema.ts +++ b/packages/x-adapter-platform/src/schemas/models/stats.schema.ts @@ -9,7 +9,7 @@ import { PlatformStats } from '../../types/models/stats.model'; */ export const statsSchema = createMutableSchema({ price: { - min: ({ price }) => Number(price.min), - max: ({ price }) => Number(price.max) + min: ({ price }) => (price?.min ? Number(price.min) : undefined), + max: ({ price }) => (price?.max ? Number(price.max) : undefined) } }); diff --git a/packages/x-adapter-platform/src/schemas/requests/related-prompts-request.schema.ts b/packages/x-adapter-platform/src/schemas/requests/related-prompts-request.schema.ts index abc14613c8..47b05f6245 100644 --- a/packages/x-adapter-platform/src/schemas/requests/related-prompts-request.schema.ts +++ b/packages/x-adapter-platform/src/schemas/requests/related-prompts-request.schema.ts @@ -4,6 +4,8 @@ import { PlatformRelatedPromptsRequest } from '../../types/requests/related-prom /** * Default implementation for the RelatedPromptsRequestSchema. + * + * @public */ export const relatedPromptsRequestSchema = createMutableSchema< RelatedPromptsRequest, diff --git a/packages/x-adapter-platform/src/schemas/responses/related-prompts-response.schema.ts b/packages/x-adapter-platform/src/schemas/responses/related-prompts-response.schema.ts index 46480429c6..9b0544a60b 100644 --- a/packages/x-adapter-platform/src/schemas/responses/related-prompts-response.schema.ts +++ b/packages/x-adapter-platform/src/schemas/responses/related-prompts-response.schema.ts @@ -6,6 +6,8 @@ import { relatedPromptSchema } from '../models/related-prompt.schema'; /** * Default implementation for the RelatedPromptsResponseSchema. + * + * @public */ export const relatedPromptsResponseSchema = createMutableSchema< PlatformRelatedPromptsResponse, diff --git a/packages/x-adapter-platform/src/types/models/related-prompt.model.ts b/packages/x-adapter-platform/src/types/models/related-prompt.model.ts index c219d1324b..fb494a8ac7 100644 --- a/packages/x-adapter-platform/src/types/models/related-prompt.model.ts +++ b/packages/x-adapter-platform/src/types/models/related-prompt.model.ts @@ -1,5 +1,7 @@ /** * Related prompt model for the `platform` API. + * + * @public */ export interface PlatformRelatedPrompt { nextQueries: string[]; diff --git a/packages/x-adapter-platform/src/types/responses/related-prompts-response.model.ts b/packages/x-adapter-platform/src/types/responses/related-prompts-response.model.ts index 1eb0be25f2..802fc1f42a 100644 --- a/packages/x-adapter-platform/src/types/responses/related-prompts-response.model.ts +++ b/packages/x-adapter-platform/src/types/responses/related-prompts-response.model.ts @@ -2,6 +2,8 @@ import { PlatformRelatedPrompt } from '../models/related-prompt.model'; /** * Response for the `related prompts` endpoint. + * + * @public */ export interface PlatformRelatedPromptsResponse { data: { diff --git a/packages/x-types/src/query-signals/related-prompt.model.ts b/packages/x-types/src/query-signals/related-prompt.model.ts index e3601cbda6..1c8c198237 100644 --- a/packages/x-types/src/query-signals/related-prompt.model.ts +++ b/packages/x-types/src/query-signals/related-prompt.model.ts @@ -2,6 +2,8 @@ import { NamedModel } from '../named-model.model'; /** * Represents a related prompt. + * + * @public */ export interface RelatedPrompt extends NamedModel<'RelatedPrompt'> { /** The next queries related to the prompt. */ diff --git a/packages/x-types/src/request/related-prompts-request.model.ts b/packages/x-types/src/request/related-prompts-request.model.ts index fe005b3c6c..64e0da5b03 100644 --- a/packages/x-types/src/request/related-prompts-request.model.ts +++ b/packages/x-types/src/request/related-prompts-request.model.ts @@ -2,5 +2,7 @@ import { ExtraParamsRequest, QueryableRequest } from './request.model'; /** * Request for Related Prompts endpoint. + * + * @public */ export interface RelatedPromptsRequest extends QueryableRequest, ExtraParamsRequest {} diff --git a/packages/x-types/src/response/related-prompts-response.model.ts b/packages/x-types/src/response/related-prompts-response.model.ts index c07147e100..de3fb33889 100644 --- a/packages/x-types/src/response/related-prompts-response.model.ts +++ b/packages/x-types/src/response/related-prompts-response.model.ts @@ -2,6 +2,8 @@ import { RelatedPrompt } from '../query-signals/related-prompt.model'; /** * Response for the related prompts endpoint. + * + * @public */ export interface RelatedPromptsResponse { relatedPrompts: RelatedPrompt[]; diff --git a/packages/x-types/src/stats.model.ts b/packages/x-types/src/stats.model.ts index ec67ed2fb2..e083e5012c 100644 --- a/packages/x-types/src/stats.model.ts +++ b/packages/x-types/src/stats.model.ts @@ -6,5 +6,8 @@ * @public */ export interface Stats { - price: { min: number; max: number }; + price: { + min: number | undefined; + max: number | undefined; + }; }