Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add @public release-tag #1664

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { relatedPromptsRequestSchema } from '../../schemas/requests/related-prom

/**
* Default implementation for the RelatedPromptsRequestMapper.
*
* @public
*/
export const relatedPromptsRequestMapper = schemaMapperFactory<
RelatedPromptsRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { relatedPromptsResponseSchema } from '../../schemas/responses/related-pr

/**
* Default implementation for the RelatedPromptsResponseMapper.
*
* @public
*/
export const relatedPromptsResponseMapper = schemaMapperFactory<
PlatformRelatedPromptsResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { PlatformRelatedPrompt } from '../../types/models/related-prompt.model';

/**
* Default implementation for the RelatedPromptSchema.
*
* @public
*/
export const relatedPromptSchema = createMutableSchema<PlatformRelatedPrompt, RelatedPrompt>({
modelName: () => 'RelatedPrompt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PlatformStats } from '../../types/models/stats.model';
*/
export const statsSchema = createMutableSchema<PlatformStats, Stats>({
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)
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { PlatformRelatedPromptsRequest } from '../../types/requests/related-prom

/**
* Default implementation for the RelatedPromptsRequestSchema.
*
* @public
*/
export const relatedPromptsRequestSchema = createMutableSchema<
RelatedPromptsRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { relatedPromptSchema } from '../models/related-prompt.schema';

/**
* Default implementation for the RelatedPromptsResponseSchema.
*
* @public
*/
export const relatedPromptsResponseSchema = createMutableSchema<
PlatformRelatedPromptsResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**
* Related prompt model for the `platform` API.
*
* @public
*/
export interface PlatformRelatedPrompt {
nextQueries: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { PlatformRelatedPrompt } from '../models/related-prompt.model';

/**
* Response for the `related prompts` endpoint.
*
* @public
*/
export interface PlatformRelatedPromptsResponse {
data: {
Expand Down
2 changes: 2 additions & 0 deletions packages/x-types/src/query-signals/related-prompt.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ import { ExtraParamsRequest, QueryableRequest } from './request.model';

/**
* Request for Related Prompts endpoint.
*
* @public
*/
export interface RelatedPromptsRequest extends QueryableRequest, ExtraParamsRequest {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { RelatedPrompt } from '../query-signals/related-prompt.model';

/**
* Response for the related prompts endpoint.
*
* @public
*/
export interface RelatedPromptsResponse {
relatedPrompts: RelatedPrompt[];
Expand Down
5 changes: 4 additions & 1 deletion packages/x-types/src/stats.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
* @public
*/
export interface Stats {
price: { min: number; max: number };
price: {
min: number | undefined;
max: number | undefined;
};
}