diff --git a/.gitmodules b/.gitmodules index b3e72e9d6..f94b812a8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,3 +128,8 @@ url = https://github.com/distilled-mirror/spec-mirror-modal.git ignore = dirty shallow = true +[submodule "packages/meilisearch/specs/spec-mirror-meilisearch"] + path = packages/meilisearch/specs/spec-mirror-meilisearch + url = https://github.com/distilled-mirror/spec-mirror-meilisearch.git + ignore = dirty + shallow = true diff --git a/packages/meilisearch/.generated-specs/meilisearch.json b/packages/meilisearch/.generated-specs/meilisearch.json new file mode 100644 index 000000000..7f098cdcd --- /dev/null +++ b/packages/meilisearch/.generated-specs/meilisearch.json @@ -0,0 +1,19993 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "UnreferencedShape", + "namespace": "*" + } + ] + }, + "shapes": { + "com.meilisearch.api#GetBatchesRequestBatchUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetBatchesRequestUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetBatchesRequestCanceledByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetBatchesRequestTypesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#Status": { + "type": "enum", + "members": { + "ENQUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enqueued" + } + }, + "PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "processing" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "succeeded" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "canceled" + } + } + }, + "traits": { + "smithy.api#documentation": "The status of a task." + } + }, + "com.meilisearch.api#GetBatchesRequestStatusesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Status" + }, + "traits": {} + }, + "com.meilisearch.api#GetBatchesRequestIndexUidsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetBatchesRequest": { + "type": "structure", + "members": { + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of batches to return." + } + }, + "from": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "from", + "smithy.api#documentation": "`uid` of the first batch returned." + } + }, + "reverse": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reverse", + "smithy.api#documentation": "If `true`, returns results in the reverse order, from oldest to most recent." + } + }, + "batchUids": { + "target": "com.meilisearch.api#GetBatchesRequestBatchUidsList", + "traits": { + "smithy.api#httpQuery": "batchUids", + "smithy.api#documentation": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character." + } + }, + "uids": { + "target": "com.meilisearch.api#GetBatchesRequestUidsList", + "traits": { + "smithy.api#httpQuery": "uids", + "smithy.api#documentation": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character." + } + }, + "canceledBy": { + "target": "com.meilisearch.api#GetBatchesRequestCanceledByList", + "traits": { + "smithy.api#httpQuery": "canceledBy", + "smithy.api#documentation": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character." + } + }, + "types": { + "target": "com.meilisearch.api#GetBatchesRequestTypesList", + "traits": { + "smithy.api#httpQuery": "types", + "smithy.api#documentation": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character." + } + }, + "statuses": { + "target": "com.meilisearch.api#GetBatchesRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses", + "smithy.api#documentation": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter." + } + }, + "indexUids": { + "target": "com.meilisearch.api#GetBatchesRequestIndexUidsList", + "traits": { + "smithy.api#httpQuery": "indexUids", + "smithy.api#documentation": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character." + } + }, + "afterEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format." + } + }, + "beforeEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format." + } + }, + "afterStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format." + } + }, + "beforeStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format." + } + }, + "afterFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format." + } + }, + "beforeFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#AllBatches": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#AllBatchesResultsList", + "traits": { + "smithy.api#documentation": "Array of batch objects", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of batches", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of batches returned", + "smithy.api#required": {} + } + }, + "from": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The first batch uid returned", + "com.distilled.openapi#nullable": {} + } + }, + "next": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Value to send in from to fetch the next slice of results", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a paginated list of batches" + } + }, + "com.meilisearch.api#BatchView": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The unique sequential identifier assigned to this batch. Batch UIDs\nare assigned in order of creation and can be used to retrieve specific\nbatch information or correlate tasks that were processed together.", + "smithy.api#required": {} + } + }, + "progress": { + "target": "com.meilisearch.api#ProgressView", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Aggregated details from all tasks in this batch. For example, if the\nbatch contains multiple document addition tasks, this will show the\ntotal number of documents received and indexed across all tasks.", + "smithy.api#required": {} + } + }, + "stats": { + "target": "com.meilisearch.api#BatchStatsView", + "traits": { + "smithy.api#documentation": "Statistical information about the batch, including the number of tasks\nby status, the types of tasks included, and the indexes affected.\nUseful for understanding the composition and outcome of the batch.", + "smithy.api#required": {} + } + }, + "duration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The total time spent processing this batch, formatted as an ISO-8601\nduration (e.g., `PT2.5S` for 2.5 seconds). This is `null` for batches\nthat haven't finished processing yet.", + "com.distilled.openapi#nullable": {} + } + }, + "startedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when Meilisearch began processing this batch, formatted\nas an RFC 3339 date-time string. All batches have a start time as it's\nset when processing begins." + } + }, + "finishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this batch finished processing, formatted as an\nRFC 3339 date-time string. This is `null` for batches that are still\nbeing processed.", + "com.distilled.openapi#nullable": {} + } + }, + "batchStrategy": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Explains why the batch was finalized and stopped accepting more tasks.\nCommon reasons include reaching the maximum batch size, encountering\nincompatible tasks, or processing being explicitly triggered." + } + } + }, + "traits": { + "smithy.api#documentation": "Represents a batch of tasks that were processed together." + } + }, + "com.meilisearch.api#ProgressView": { + "type": "structure", + "members": { + "steps": { + "target": "com.meilisearch.api#ProgressViewStepsList", + "traits": { + "smithy.api#documentation": "A hierarchical list of processing steps currently being executed.\nSteps are listed from outermost to innermost, with each step\nrepresenting a more granular operation within its parent step.", + "smithy.api#required": {} + } + }, + "percentage": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The overall completion percentage of the operation (0.0 to 100.0).\nThis is calculated by combining the progress of all nested steps,\nweighted by their relative importance.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Real-time progress information for a batch or task that is currently\nbeing processed. Use this to display progress bars or status updates to\nusers." + } + }, + "com.meilisearch.api#ProgressStepView": { + "type": "structure", + "members": { + "currentStep": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable name describing what this processing step is doing.\nExamples include \"indexing documents\", \"computing embeddings\",\n\"building word cache\", etc.", + "smithy.api#required": {} + } + }, + "finished": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of items that have been processed so far in this step.\nCompare with `total` to calculate the percentage complete for this\nspecific step.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The total number of items to process in this step. When `finished`\nequals `total`, this step is complete and processing moves to the\nnext step.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a single processing step within a batch or task. Each\nstep has a name, current progress, and total items to process." + } + }, + "com.meilisearch.api#ProgressViewStepsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ProgressStepView" + }, + "traits": { + "smithy.api#documentation": "A hierarchical list of processing steps currently being executed.\nSteps are listed from outermost to innermost, with each step\nrepresenting a more granular operation within its parent step." + } + }, + "com.meilisearch.api#BatchStatsView": { + "type": "structure", + "members": { + "totalNbTasks": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of tasks in the batch", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.meilisearch.api#BatchStatsViewStatusMap", + "traits": { + "smithy.api#documentation": "Count of tasks by status", + "smithy.api#required": {} + } + }, + "types": { + "target": "com.meilisearch.api#BatchStatsViewTypesMap", + "traits": { + "smithy.api#documentation": "Count of tasks by type", + "smithy.api#required": {} + } + }, + "indexUids": { + "target": "com.meilisearch.api#BatchStatsViewIndexUidsMap", + "traits": { + "smithy.api#documentation": "Count of tasks by index UID", + "smithy.api#required": {} + } + }, + "progressTrace": { + "target": "com.meilisearch.api#BatchStatsViewProgressTraceMap", + "traits": { + "smithy.api#documentation": "Detailed progress trace information" + } + }, + "writeChannelCongestion": { + "target": "com.meilisearch.api#BatchStatsViewWriteChannelCongestionMap", + "traits": { + "smithy.api#documentation": "Write channel congestion metrics", + "com.distilled.openapi#nullable": {} + } + }, + "internalDatabaseSizes": { + "target": "com.meilisearch.api#BatchStatsViewInternalDatabaseSizesMap", + "traits": { + "smithy.api#documentation": "Internal database size information" + } + }, + "embedderRequests": { + "target": "com.meilisearch.api#EmbedderStatsView", + "traits": { + "smithy.api#documentation": "Statistics about AI embedder API requests made during batch processing.\nIncludes total requests, successful/failed counts, and response times.\nOnly present when the batch involved vector embedding operations." + } + } + }, + "traits": { + "smithy.api#documentation": "Provides comprehensive statistics about a batch's execution.\n\nIncludes task counts, status breakdowns, and AI embedder usage. This\ninformation is useful for monitoring system performance and understanding\nbatch composition." + } + }, + "com.meilisearch.api#BatchStatsViewStatusMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Count of tasks by status" + } + }, + "com.meilisearch.api#BatchStatsViewTypesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Count of tasks by type" + } + }, + "com.meilisearch.api#BatchStatsViewIndexUidsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Count of tasks by index UID" + } + }, + "com.meilisearch.api#BatchStatsViewProgressTraceMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Detailed progress trace information" + } + }, + "com.meilisearch.api#BatchStatsViewWriteChannelCongestionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Write channel congestion metrics" + } + }, + "com.meilisearch.api#BatchStatsViewInternalDatabaseSizesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Internal database size information" + } + }, + "com.meilisearch.api#EmbedderStatsView": { + "type": "structure", + "members": { + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of embedder requests", + "smithy.api#required": {} + } + }, + "failed": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of failed embedder requests", + "smithy.api#required": {} + } + }, + "lastError": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Last error message from the embedder", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Statistics for embedder requests" + } + }, + "com.meilisearch.api#AllBatchesResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#BatchView" + }, + "traits": { + "smithy.api#documentation": "Array of batch objects" + } + }, + "com.meilisearch.api#GetBatches": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetBatchesRequest" + }, + "output": { + "target": "com.meilisearch.api#AllBatches" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/batches", + "code": 200 + }, + "smithy.api#documentation": "List batches\n\nMeilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance.\n\nBatches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters." + } + }, + "com.meilisearch.api#GetBatchesStream": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/batches/stream", + "code": 200 + }, + "smithy.api#documentation": "Stream batches changes\n\nThe `/batches/stream` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on).\n\nBatches are sent throught an SSE stream any time their progress or status changes, i.e., enqueued, processing, succeeded, failed." + } + }, + "com.meilisearch.api#GetBatchRequest": { + "type": "structure", + "members": { + "batch_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique batch identifier." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetBatch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetBatchRequest" + }, + "output": { + "target": "com.meilisearch.api#BatchView" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/batches/{batch_id}", + "code": 200 + }, + "smithy.api#documentation": "Get batch\n\nMeilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing.\n\nFor example, multiple document additions to the same index may be batched together. Retrieve a single batch by its unique identifier to monitor its progress and performance." + } + }, + "com.meilisearch.api#ListWorkspaces": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/chats", + "code": 200 + }, + "smithy.api#documentation": "List chat workspaces\n\nList all chat workspaces registered on the instance, with pagination.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#GetChatRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetChat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetChatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/chats/{workspace_uid}", + "code": 200 + }, + "smithy.api#documentation": "Get a chat workspace\n\nGet the details of a chat workspace by its unique identifier.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#DeleteChatRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteChat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteChatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/chats/{workspace_uid}", + "code": 200 + }, + "smithy.api#documentation": "Delete a chat workspace\n\nDelete a chat workspace and its settings by its unique identifier.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessage": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase1" + }, + "Case2": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase2" + }, + "Case3": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase3" + }, + "Case4": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase4" + }, + "Case5": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase5" + } + }, + "traits": { + "smithy.api#documentation": "A message in the chat completion conversation. Tagged by `role` (system, user, assistant, tool, developer, or function)." + } + }, + "com.meilisearch.api#ChatCompletionRequestDeveloperMessageContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestDeveloperMessageContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The contents of a developer message: either a text string or an array of text content parts." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessageContentPartText": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A text content part of a message." + } + }, + "com.meilisearch.api#ChatCompletionRequestDeveloperMessageContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageContentPartText" + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase0Role": { + "type": "enum", + "members": { + "DEVELOPER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "developer" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase0": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatCompletionRequestDeveloperMessageContent", + "traits": { + "smithy.api#documentation": "The contents of the developer message.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase0Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestSystemMessageContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestSystemMessageContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The contents of a system message: either a text string or an array of text content parts." + } + }, + "com.meilisearch.api#ChatCompletionRequestSystemMessageContentPartType": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestSystemMessageContentPart": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestSystemMessageContentPartType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestSystemMessageContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestSystemMessageContentPart" + }, + "traits": { + "smithy.api#documentation": "An array of content parts with a defined type. For system messages, only type `text` is supported." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase1Role": { + "type": "enum", + "members": { + "SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "system" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase1": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatCompletionRequestSystemMessageContent", + "traits": { + "smithy.api#documentation": "The contents of the system message.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase1Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The contents of a user message: either a text string or an array of content parts (text, image, or audio)." + } + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPart": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase1" + }, + "Case2": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase2" + } + }, + "traits": { + "smithy.api#documentation": "A content part in a user message (text, image, or audio)." + } + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase0Type": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase0": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ImageUrl": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Either a URL of the image or the base64 encoded image data.", + "smithy.api#required": {} + } + }, + "detail": { + "target": "com.meilisearch.api#ImageDetail", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An image URL with optional detail level." + } + }, + "com.meilisearch.api#ImageDetail": { + "type": "enum", + "members": { + "AUTO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto" + } + }, + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "low" + } + }, + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "high" + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies the detail level of the image." + } + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase1Type": { + "type": "enum", + "members": { + "IMAGE_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "image_url" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase1": { + "type": "structure", + "members": { + "image_url": { + "target": "com.meilisearch.api#ImageUrl", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase1Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#InputAudio": { + "type": "structure", + "members": { + "data": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Base64 encoded audio data.", + "smithy.api#required": {} + } + }, + "format": { + "target": "com.meilisearch.api#InputAudioFormat", + "traits": { + "smithy.api#documentation": "The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Input audio data for an audio content part." + } + }, + "com.meilisearch.api#InputAudioFormat": { + "type": "enum", + "members": { + "WAV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wav" + } + }, + "MP3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mp3" + } + } + }, + "traits": { + "smithy.api#documentation": "The format of the encoded audio data." + } + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase2Type": { + "type": "enum", + "members": { + "INPUT_AUDIO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "input_audio" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase2": { + "type": "structure", + "members": { + "input_audio": { + "target": "com.meilisearch.api#InputAudio", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPartCase2Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestUserMessageContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContentPart" + }, + "traits": { + "smithy.api#documentation": "An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase2Role": { + "type": "enum", + "members": { + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "user" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase2": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatCompletionRequestUserMessageContent", + "traits": { + "smithy.api#documentation": "The contents of the user message.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase2Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The contents of an assistant message: either a text string or an array of content parts (text or refusal)." + } + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPart": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase1" + } + }, + "traits": { + "smithy.api#documentation": "A content part in an assistant message (text or refusal)." + } + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase0Type": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase0": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase1Type": { + "type": "enum", + "members": { + "REFUSAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "refusal" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase1": { + "type": "structure", + "members": { + "refusal": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refusal message generated by the model.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPartCase1Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContentPart" + }, + "traits": { + "smithy.api#documentation": "An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`." + } + }, + "com.meilisearch.api#ChatCompletionRequestAssistantMessageAudio": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for a previous audio response from the model.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Data about a previous audio response from the model, used in multi-turn conversations." + } + }, + "com.meilisearch.api#ChatCompletionMessageToolCall": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ID of the tool call.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionToolType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "function": { + "target": "com.meilisearch.api#FunctionCall", + "traits": { + "smithy.api#documentation": "The function that the model called.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A tool call generated by the model." + } + }, + "com.meilisearch.api#ChatCompletionToolType": { + "type": "enum", + "members": { + "FUNCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "function" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of a tool. Currently, only `function` is supported." + } + }, + "com.meilisearch.api#FunctionCall": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the function to call.", + "smithy.api#required": {} + } + }, + "arguments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The name and arguments of a function that should be called, as generated by the model." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase3ToolCallsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionMessageToolCall" + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase3Role": { + "type": "enum", + "members": { + "ASSISTANT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "assistant" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase3": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageContent", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "refusal": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refusal message by the assistant.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "An optional name for the participant. Provides the model information to differentiate between participants of the same role.", + "com.distilled.openapi#nullable": {} + } + }, + "audio": { + "target": "com.meilisearch.api#ChatCompletionRequestAssistantMessageAudio", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tool_calls": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase3ToolCallsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "function_call": { + "target": "com.meilisearch.api#FunctionCall", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase3Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestToolMessageContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionRequestToolMessageContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The contents of a tool message: either a text string or an array of text content parts." + } + }, + "com.meilisearch.api#ChatCompletionRequestToolMessageContentPartType": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestToolMessageContentPart": { + "type": "structure", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ChatCompletionRequestToolMessageContentPartType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestToolMessageContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestToolMessageContentPart" + }, + "traits": { + "smithy.api#documentation": "An array of content parts with a defined type. For tool messages, only type `text` is supported." + } + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase4Role": { + "type": "enum", + "members": { + "TOOL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tool" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase4": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatCompletionRequestToolMessageContent", + "traits": { + "smithy.api#documentation": "The contents of the tool message.", + "smithy.api#required": {} + } + }, + "tool_call_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase4Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase5Role": { + "type": "enum", + "members": { + "FUNCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "function" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionRequestMessageCase5": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The return value from the function call, to return to the model.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the function to call.", + "smithy.api#required": {} + } + }, + "role": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageCase5Role", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatRequestMessagesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestMessage" + }, + "traits": { + "smithy.api#documentation": "A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio)." + } + }, + "com.meilisearch.api#ReasoningEffort": { + "type": "enum", + "members": { + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "low" + } + }, + "MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "medium" + } + }, + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "high" + } + } + }, + "traits": { + "smithy.api#documentation": "Constrains effort on reasoning for reasoning models. Supported values are `low`, `medium`, and `high`." + } + }, + "com.meilisearch.api#ChatRequestLogitBiasMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.\nMathematically, the bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;\nvalues like -100 or 100 should result in a ban or exclusive selection of the relevant token." + } + }, + "com.meilisearch.api#ChatCompletionModalities": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + }, + "AUDIO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "audio" + } + } + }, + "traits": { + "smithy.api#documentation": "Output types that you would like the model to generate for this request.\n\nMost models are capable of generating text, which is the default: `[\"text\"]`\n\nThe `gpt-4o-audio-preview` model can also be used to [generate\naudio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `[\"text\", \"audio\"]`" + } + }, + "com.meilisearch.api#ChatRequestModalitiesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionModalities" + }, + "traits": { + "smithy.api#documentation": "Output types that you would like the model to generate for this request. Most models are capable of generating text, which is the default: `[\"text\"]`." + } + }, + "com.meilisearch.api#PredictionContentContent": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#PredictionContentContentCase1List" + } + }, + "traits": { + "smithy.api#documentation": "The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly." + } + }, + "com.meilisearch.api#PredictionContentContentCase1List": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionRequestMessageContentPartText" + }, + "traits": { + "smithy.api#documentation": "An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs." + } + }, + "com.meilisearch.api#PredictionContentType": { + "type": "enum", + "members": { + "CONTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "content" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PredictionContent": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#PredictionContentContent", + "traits": { + "smithy.api#documentation": "The type of the predicted content you want to provide. This type is\ncurrently always `content`.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#PredictionContentType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The type of the predicted content you want to provide. This type is\ncurrently always `content`." + } + }, + "com.meilisearch.api#ChatCompletionAudio": { + "type": "structure", + "members": { + "voice": { + "target": "com.meilisearch.api#ChatCompletionAudioVoice", + "traits": { + "smithy.api#documentation": "The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).", + "smithy.api#required": {} + } + }, + "format": { + "target": "com.meilisearch.api#ChatCompletionAudioFormat", + "traits": { + "smithy.api#documentation": "Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for audio output. Required when audio output is requested with `modalities: [\"audio\"]`." + } + }, + "com.meilisearch.api#ChatCompletionAudioVoice": { + "type": "enum", + "members": { + "ALLOY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "alloy" + } + }, + "ASH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ash" + } + }, + "BALLAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ballad" + } + }, + "CORAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "coral" + } + }, + "ECHO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "echo" + } + }, + "SAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sage" + } + }, + "SHIMMER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "shimmer" + } + }, + "VERSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "verse" + } + } + }, + "traits": { + "smithy.api#documentation": "The voice the model uses to respond in audio output." + } + }, + "com.meilisearch.api#ChatCompletionAudioFormat": { + "type": "enum", + "members": { + "WAV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wav" + } + }, + "MP3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mp3" + } + }, + "FLAC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "flac" + } + }, + "OPUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "opus" + } + }, + "PCM16": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pcm16" + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`." + } + }, + "com.meilisearch.api#ResponseFormat": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ResponseFormatCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ResponseFormatCase1" + }, + "Case2": { + "target": "com.meilisearch.api#ResponseFormatCase2" + } + }, + "traits": { + "smithy.api#documentation": "An object specifying the format that the model must output (text, JSON object, or JSON schema)." + } + }, + "com.meilisearch.api#ResponseFormatCase0Type": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ResponseFormatCase0": { + "type": "structure", + "members": { + "type": { + "target": "com.meilisearch.api#ResponseFormatCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The type of response format being defined: `text`" + } + }, + "com.meilisearch.api#ResponseFormatCase1Type": { + "type": "enum", + "members": { + "JSON_OBJECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json_object" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ResponseFormatCase1": { + "type": "structure", + "members": { + "type": { + "target": "com.meilisearch.api#ResponseFormatCase1Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The type of response format being defined: `json_object`" + } + }, + "com.meilisearch.api#ResponseFormatJsonSchema": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of what the response format is for, used by the model to determine how to respond in the format.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The schema for the response format, described as a JSON Schema object." + } + }, + "strict": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A JSON Schema-based response format specification for Structured Outputs." + } + }, + "com.meilisearch.api#ResponseFormatCase2Type": { + "type": "enum", + "members": { + "JSON_SCHEMA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json_schema" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ResponseFormatCase2": { + "type": "structure", + "members": { + "json_schema": { + "target": "com.meilisearch.api#ResponseFormatJsonSchema", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ResponseFormatCase2Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The type of response format being defined: `json_schema`" + } + }, + "com.meilisearch.api#ServiceTier": { + "type": "enum", + "members": { + "AUTO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies the latency tier to use for processing the request." + } + }, + "com.meilisearch.api#Stop": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.meilisearch.api#StopCase1List" + } + }, + "traits": { + "smithy.api#documentation": "Up to 4 sequences where the API will stop generating further tokens." + } + }, + "com.meilisearch.api#StopCase1List": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionStreamOptions": { + "type": "structure", + "members": { + "include_usage": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Options for streaming response. Only set this when you set `stream: true`." + } + }, + "com.meilisearch.api#ChatCompletionTool": { + "type": "structure", + "members": { + "type": { + "target": "com.meilisearch.api#ChatCompletionToolType", + "traits": { + "smithy.api#required": {} + } + }, + "function": { + "target": "com.meilisearch.api#FunctionObject", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A tool the model may call. Currently, only functions are supported as a tool." + } + }, + "com.meilisearch.api#FunctionObject": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of what the function does, used by the model to choose when and how to call the function.", + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n\nOmitting `parameters` defines a function with an empty parameter list." + } + }, + "strict": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A function definition for tool use, described as a JSON Schema object." + } + }, + "com.meilisearch.api#ChatRequestToolsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionTool" + }, + "traits": { + "smithy.api#documentation": "A list of tools the model may call. Currently, only functions are supported as a tool.\nUse this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported." + } + }, + "com.meilisearch.api#ChatCompletionToolChoiceOption": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ChatCompletionToolChoiceOptionCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionToolChoiceOptionCase1" + }, + "Case2": { + "target": "com.meilisearch.api#ChatCompletionToolChoiceOptionCase2" + }, + "Case3": { + "target": "com.meilisearch.api#ChatCompletionToolChoiceOptionCase3" + } + }, + "traits": { + "smithy.api#documentation": "Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.present." + } + }, + "com.meilisearch.api#ChatCompletionToolChoiceOptionCase0": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionToolChoiceOptionCase1": { + "type": "enum", + "members": { + "AUTO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionToolChoiceOptionCase2": { + "type": "enum", + "members": { + "REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "required" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionNamedToolChoice": { + "type": "structure", + "members": { + "type": { + "target": "com.meilisearch.api#ChatCompletionToolType", + "traits": { + "smithy.api#documentation": "The type of the tool. Currently, only `function` is supported.", + "smithy.api#required": {} + } + }, + "function": { + "target": "com.meilisearch.api#FunctionName", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Specifies a tool the model should use. Use to force the model to call a specific function." + } + }, + "com.meilisearch.api#FunctionName": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the function to call.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A wrapper for a function name reference." + } + }, + "com.meilisearch.api#ChatCompletionToolChoiceOptionCase3": { + "type": "structure", + "members": { + "named": { + "target": "com.meilisearch.api#ChatCompletionNamedToolChoice", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatCompletionFunctionCall": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#ChatCompletionFunctionCallCase0" + }, + "Case1": { + "target": "com.meilisearch.api#ChatCompletionFunctionCallCase1" + }, + "Case2": { + "target": "com.meilisearch.api#ChatCompletionFunctionCallCase2" + } + }, + "traits": { + "smithy.api#documentation": "Deprecated in favor of `tool_choice`. Controls which (if any) function is called by the model." + } + }, + "com.meilisearch.api#ChatCompletionFunctionCallCase0": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": { + "smithy.api#documentation": "The model does not call a function, and responds to the end-user." + } + }, + "com.meilisearch.api#ChatCompletionFunctionCallCase1": { + "type": "enum", + "members": { + "AUTO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto" + } + } + }, + "traits": { + "smithy.api#documentation": "The model can pick between an end-user or calling a function." + } + }, + "com.meilisearch.api#ChatCompletionFunctionCallCase2Function": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Forces the model to call the specified function." + } + }, + "com.meilisearch.api#ChatCompletionFunctionCallCase2": { + "type": "structure", + "members": { + "Function": { + "target": "com.meilisearch.api#ChatCompletionFunctionCallCase2Function", + "traits": { + "smithy.api#documentation": "Forces the model to call the specified function.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Forces the model to call the specified function." + } + }, + "com.meilisearch.api#ChatCompletionFunctions": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of what the function does, used by the model to choose when and how to call the function.", + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n\nOmitting `parameters` defines a function with an empty parameter list.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Deprecated: A function the model may generate JSON inputs for. Use `ChatCompletionTool` instead." + } + }, + "com.meilisearch.api#ChatRequestFunctionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionFunctions" + }, + "traits": { + "smithy.api#documentation": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for." + } + }, + "com.meilisearch.api#ChatRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + }, + "messages": { + "target": "com.meilisearch.api#ChatRequestMessagesList", + "traits": { + "smithy.api#documentation": "A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).", + "smithy.api#required": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "ID of the model to use.\nSee the [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) table for details on which models work with the Chat API.", + "smithy.api#required": {} + } + }, + "store": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether or not to store the output of this chat completion request\n\nfor use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products.", + "com.distilled.openapi#nullable": {} + } + }, + "reasoning_effort": { + "target": "com.meilisearch.api#ReasoningEffort", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Developer-defined tags and values used for filtering completions in the [dashboard](https://platform.openai.com/chat-completions)." + } + }, + "frequency_penalty": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "com.distilled.openapi#nullable": {} + } + }, + "logit_bias": { + "target": "com.meilisearch.api#ChatRequestLogitBiasMap", + "traits": { + "smithy.api#documentation": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.\nMathematically, the bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;\nvalues like -100 or 100 should result in a ban or exclusive selection of the relevant token.", + "com.distilled.openapi#nullable": {} + } + }, + "logprobs": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", + "com.distilled.openapi#nullable": {} + } + }, + "top_logprobs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", + "com.distilled.openapi#nullable": {} + } + }, + "max_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion.\n\nThis value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).", + "com.distilled.openapi#nullable": {} + } + }, + "max_completion_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).", + "com.distilled.openapi#nullable": {} + } + }, + "n": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.", + "com.distilled.openapi#nullable": {} + } + }, + "modalities": { + "target": "com.meilisearch.api#ChatRequestModalitiesList", + "traits": { + "smithy.api#documentation": "Output types that you would like the model to generate for this request. Most models are capable of generating text, which is the default: `[\"text\"]`.", + "com.distilled.openapi#nullable": {} + } + }, + "prediction": { + "target": "com.meilisearch.api#PredictionContent", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "audio": { + "target": "com.meilisearch.api#ChatCompletionAudio", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "presence_penalty": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "com.distilled.openapi#nullable": {} + } + }, + "response_format": { + "target": "com.meilisearch.api#ResponseFormat", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "seed": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": " This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests\nwith the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.", + "com.distilled.openapi#nullable": {} + } + }, + "service_tier": { + "target": "com.meilisearch.api#ServiceTier", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "stop": { + "target": "com.meilisearch.api#Stop", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "stream": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If set, partial message deltas will be sent, like in ChatGPT.\nTokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).", + "com.distilled.openapi#nullable": {} + } + }, + "stream_options": { + "target": "com.meilisearch.api#ChatCompletionStreamOptions", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "temperature": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,\nwhile lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", + "com.distilled.openapi#nullable": {} + } + }, + "top_p": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability mass.\nSo 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\n We generally recommend altering this or `temperature` but not both.", + "com.distilled.openapi#nullable": {} + } + }, + "tools": { + "target": "com.meilisearch.api#ChatRequestToolsList", + "traits": { + "smithy.api#documentation": "A list of tools the model may call. Currently, only functions are supported as a tool.\nUse this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.", + "com.distilled.openapi#nullable": {} + } + }, + "tool_choice": { + "target": "com.meilisearch.api#ChatCompletionToolChoiceOption", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parallel_tool_calls": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.", + "com.distilled.openapi#nullable": {} + } + }, + "user": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).", + "com.distilled.openapi#nullable": {} + } + }, + "function_call": { + "target": "com.meilisearch.api#ChatCompletionFunctionCall", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "functions": { + "target": "com.meilisearch.api#ChatRequestFunctionsList", + "traits": { + "smithy.api#documentation": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#CreateChatCompletionResponse": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A unique identifier for the chat completion.", + "smithy.api#required": {} + } + }, + "choices": { + "target": "com.meilisearch.api#CreateChatCompletionResponseChoicesList", + "traits": { + "smithy.api#documentation": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "smithy.api#required": {} + } + }, + "created": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The Unix timestamp (in seconds) of when the chat completion was created.", + "smithy.api#required": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The model used for the chat completion.", + "smithy.api#required": {} + } + }, + "service_tier": { + "target": "com.meilisearch.api#ServiceTierResponse", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "system_fingerprint": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.", + "com.distilled.openapi#nullable": {} + } + }, + "object": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The object type, which is always `chat.completion`.", + "smithy.api#required": {} + } + }, + "usage": { + "target": "com.meilisearch.api#CompletionUsage", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents a chat completion response returned by model, based on the provided input." + } + }, + "com.meilisearch.api#ChatChoice": { + "type": "structure", + "members": { + "index": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The index of the choice in the list of choices.", + "smithy.api#required": {} + } + }, + "message": { + "target": "com.meilisearch.api#ChatCompletionResponseMessage", + "traits": { + "smithy.api#required": {} + } + }, + "finish_reason": { + "target": "com.meilisearch.api#FinishReason", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "logprobs": { + "target": "com.meilisearch.api#ChatChoiceLogprobs", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A chat completion choice generated by the model." + } + }, + "com.meilisearch.api#ChatCompletionResponseMessage": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The contents of the message.", + "com.distilled.openapi#nullable": {} + } + }, + "refusal": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The refusal message generated by the model.", + "com.distilled.openapi#nullable": {} + } + }, + "tool_calls": { + "target": "com.meilisearch.api#ChatCompletionResponseMessageToolCallsList", + "traits": { + "smithy.api#documentation": "The tool calls generated by the model, such as function calls.", + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.meilisearch.api#Role", + "traits": { + "smithy.api#documentation": "The role of the author of this message.", + "smithy.api#required": {} + } + }, + "function_call": { + "target": "com.meilisearch.api#FunctionCall", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "audio": { + "target": "com.meilisearch.api#ChatCompletionResponseMessageAudio", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A chat completion message generated by the model." + } + }, + "com.meilisearch.api#ChatCompletionResponseMessageToolCallsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionMessageToolCall" + }, + "traits": { + "smithy.api#documentation": "The tool calls generated by the model, such as function calls." + } + }, + "com.meilisearch.api#Role": { + "type": "enum", + "members": { + "SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "system" + } + }, + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "user" + } + }, + "ASSISTANT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "assistant" + } + }, + "TOOL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tool" + } + }, + "FUNCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "function" + } + } + }, + "traits": { + "smithy.api#documentation": "The role of the author of a message." + } + }, + "com.meilisearch.api#ChatCompletionResponseMessageAudio": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for this audio response.", + "smithy.api#required": {} + } + }, + "expires_at": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.", + "smithy.api#required": {} + } + }, + "data": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Base64 encoded audio bytes generated by the model, in the format specified in the request.", + "smithy.api#required": {} + } + }, + "transcript": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Transcript of the audio generated by the model.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Audio data in a chat completion response message." + } + }, + "com.meilisearch.api#FinishReason": { + "type": "enum", + "members": { + "STOP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stop" + } + }, + "LENGTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "length" + } + }, + "TOOL_CALLS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tool_calls" + } + }, + "CONTENT_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "content_filter" + } + }, + "FUNCTION_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "function_call" + } + } + }, + "traits": { + "smithy.api#documentation": "The reason the model stopped generating tokens." + } + }, + "com.meilisearch.api#ChatChoiceLogprobs": { + "type": "structure", + "members": { + "content": { + "target": "com.meilisearch.api#ChatChoiceLogprobsContentList", + "traits": { + "smithy.api#documentation": "A list of message content tokens with log probability information.", + "com.distilled.openapi#nullable": {} + } + }, + "refusal": { + "target": "com.meilisearch.api#ChatChoiceLogprobsRefusalList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Log probability information for a chat completion choice." + } + }, + "com.meilisearch.api#ChatCompletionTokenLogprob": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The token.", + "smithy.api#required": {} + } + }, + "logprob": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.", + "smithy.api#required": {} + } + }, + "bytes": { + "target": "com.meilisearch.api#ChatCompletionTokenLogprobBytesList", + "traits": { + "smithy.api#documentation": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "com.distilled.openapi#nullable": {} + } + }, + "top_logprobs": { + "target": "com.meilisearch.api#ChatCompletionTokenLogprobTopLogprobsList", + "traits": { + "smithy.api#documentation": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Log probability information for an output token." + } + }, + "com.meilisearch.api#ChatCompletionTokenLogprobBytesList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token." + } + }, + "com.meilisearch.api#TopLogprobs": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The token.", + "smithy.api#required": {} + } + }, + "logprob": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "The log probability of this token.", + "smithy.api#required": {} + } + }, + "bytes": { + "target": "com.meilisearch.api#TopLogprobsBytesList", + "traits": { + "smithy.api#documentation": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A most likely token and its log probability at a given position." + } + }, + "com.meilisearch.api#TopLogprobsBytesList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token." + } + }, + "com.meilisearch.api#ChatCompletionTokenLogprobTopLogprobsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#TopLogprobs" + }, + "traits": { + "smithy.api#documentation": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned." + } + }, + "com.meilisearch.api#ChatChoiceLogprobsContentList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionTokenLogprob" + }, + "traits": { + "smithy.api#documentation": "A list of message content tokens with log probability information." + } + }, + "com.meilisearch.api#ChatChoiceLogprobsRefusalList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatCompletionTokenLogprob" + }, + "traits": {} + }, + "com.meilisearch.api#CreateChatCompletionResponseChoicesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ChatChoice" + }, + "traits": { + "smithy.api#documentation": "A list of chat completion choices. Can be more than one if `n` is greater than 1." + } + }, + "com.meilisearch.api#ServiceTierResponse": { + "type": "enum", + "members": { + "SCALE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scale" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "AUTO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto" + } + } + }, + "traits": { + "smithy.api#documentation": "The service tier used for processing the request, as returned in the response." + } + }, + "com.meilisearch.api#CompletionUsage": { + "type": "structure", + "members": { + "prompt_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of tokens in the prompt.", + "smithy.api#required": {} + } + }, + "completion_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of tokens in the generated completion.", + "smithy.api#required": {} + } + }, + "total_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of tokens used in the request (prompt + completion).", + "smithy.api#required": {} + } + }, + "prompt_tokens_details": { + "target": "com.meilisearch.api#PromptTokensDetails", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "completion_tokens_details": { + "target": "com.meilisearch.api#CompletionTokensDetails", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Usage statistics for the completion request." + } + }, + "com.meilisearch.api#PromptTokensDetails": { + "type": "structure", + "members": { + "audio_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Audio input tokens present in the prompt.", + "com.distilled.openapi#nullable": {} + } + }, + "cached_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Cached tokens present in the prompt.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Breakdown of tokens used in a completion." + } + }, + "com.meilisearch.api#CompletionTokensDetails": { + "type": "structure", + "members": { + "accepted_prediction_tokens": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "audio_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Audio input tokens generated by the model.", + "com.distilled.openapi#nullable": {} + } + }, + "reasoning_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Tokens generated by the model for reasoning.", + "com.distilled.openapi#nullable": {} + } + }, + "rejected_prediction_tokens": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": " When using Predicted Outputs, the number of tokens in the\nprediction that did not appear in the completion. However, like\nreasoning tokens, these tokens are still counted in the total\ncompletion tokens for purposes of billing, output, and context\nwindow limits.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Breakdown of tokens used in a completion." + } + }, + "com.meilisearch.api#Chat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ChatRequest" + }, + "output": { + "target": "com.meilisearch.api#CreateChatCompletionResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/chats/{workspace_uid}/chat/completions", + "code": 200 + }, + "smithy.api#documentation": "Request a chat completion\n\nAnswer a conversational question with the OpenAI-compatible chat completions API,\nusing the documents of the authorized indexes as context.\nOnly streamed responses (`stream: true`) are supported.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#GetSettingsRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetSettings": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/chats/{workspace_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "Get settings of a chat workspace\n\nGet the settings of a chat workspace, such as the LLM source, the base prompts,\nand the search parameters. The API key is never returned.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#ChatCompletionSource": { + "type": "enum", + "members": { + "OPENAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openAi" + } + }, + "MISTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mistral" + } + }, + "AZUREOPENAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "azureOpenAi" + } + }, + "VLLM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vLlm" + } + } + }, + "traits": { + "smithy.api#documentation": "LLM provider for chat completions" + } + }, + "com.meilisearch.api#PatchSettingsRequestPrompts": { + "type": "structure", + "members": { + "system": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "System prompt for the LLM", + "com.distilled.openapi#nullable": {} + } + }, + "searchDescription": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the search function for the LLM", + "com.distilled.openapi#nullable": {} + } + }, + "searchQParam": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the query parameter for search", + "com.distilled.openapi#nullable": {} + } + }, + "searchFilterParam": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Description of the filter parameter for search", + "com.distilled.openapi#nullable": {} + } + }, + "searchIndexUidParam": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Custom prompts for chat completions" + } + }, + "com.meilisearch.api#PatchSettingsRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + }, + "source": { + "target": "com.meilisearch.api#ChatCompletionSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "orgId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Organization ID for the LLM provider", + "com.distilled.openapi#nullable": {} + } + }, + "projectId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Project ID for the LLM provider", + "com.distilled.openapi#nullable": {} + } + }, + "apiVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API version for the LLM provider", + "com.distilled.openapi#nullable": {} + } + }, + "deploymentId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Deployment ID for Azure OpenAI", + "com.distilled.openapi#nullable": {} + } + }, + "baseUrl": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Base URL for the LLM API", + "com.distilled.openapi#nullable": {} + } + }, + "apiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key for authentication with the LLM provider", + "com.distilled.openapi#nullable": {}, + "smithy.api#sensitive": {} + } + }, + "prompts": { + "target": "com.meilisearch.api#PatchSettingsRequestPrompts", + "traits": { + "smithy.api#documentation": "Custom prompts for chat completions", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchSettings": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/chats/{workspace_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "Update settings of a chat workspace\n\nPartially update the settings of a chat workspace, such as the LLM source, the base prompts,\nand the search parameters. Fields set to `null` are reset to their default value,\nand missing fields are left unchanged.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#ResetSettingsRequest": { + "type": "structure", + "members": { + "workspace_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier of the chat workspace." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#ResetSettings": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ResetSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/chats/{workspace_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "Reset the settings of a chat workspace\n\nReset all the settings of a chat workspace to their default value.\n\nThis route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#CreateDump": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/dumps", + "code": 200 + }, + "smithy.api#documentation": "Create dump\n\nTrigger a dump creation process. When complete, a dump file is written to the [dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). The directory is created if it does not exist." + } + }, + "com.meilisearch.api#ListRulesFilter": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Only include rules whose names match these patterns (e.g. `[\"black-friday\", \"promo*\"]`).", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include rules that are active (true) or not active (false).", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ListRulesRequest": { + "type": "structure", + "members": { + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of rules to skip. Defaults to 0." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of rules to return. Default to 20." + } + }, + "filter": { + "target": "com.meilisearch.api#ListRulesFilter", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PaginationViewDynamicSearchRule": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsList", + "traits": { + "smithy.api#documentation": "Items for the current page.", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of items skipped.", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of items returned.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of items matching the query.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#Conditions": { + "type": "structure", + "members": { + "time": { + "target": "com.meilisearch.api#TimeCondition", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "com.meilisearch.api#QueryCondition", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "filter": { + "target": "com.meilisearch.api#FilterCondition", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#TimeCondition": { + "type": "structure", + "members": { + "start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Start of the time range where this rule can be considered active.\n\nSpecify as a RFC3339 datetime.", + "com.distilled.openapi#nullable": {} + } + }, + "end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "End of the time range where this rule can be considered active.\n\nSpecify as a RFC3339 datetime.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#QueryCondition": { + "type": "structure", + "members": { + "isEmpty": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If present and non-null, specifies either:\n\n- That this rule can only be active when the search query is empty\n- That this rule can only be active when the search query is non-empty (contains at least one word)", + "com.distilled.openapi#nullable": {} + } + }, + "words": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "If present and non-null, specifies that the rule can only be active if all the specified words are\npresent in the search query.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FilterCondition": { + "type": "structure", + "members": { + "values": { + "target": "com.meilisearch.api#FilterConditionValuesMap" + } + }, + "traits": {} + }, + "com.meilisearch.api#FilterConditionValuesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.meilisearch.api#RuleAction": { + "type": "structure", + "members": { + "selector": { + "target": "com.meilisearch.api#Selector", + "traits": { + "smithy.api#documentation": "Target document selector for this action.", + "smithy.api#required": {} + } + }, + "action": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Action payload to apply to the selected document.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#Selector": { + "type": "structure", + "members": { + "indexUid": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsItemActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#RuleAction" + }, + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches." + } + }, + "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsItem": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the dynamic search rule.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable description of the dynamic search rule.", + "com.distilled.openapi#nullable": {} + } + }, + "lastUpdatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date time of the last update of this rule.", + "com.distilled.openapi#nullable": {} + } + }, + "precedence": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Precedence of the dynamic search rule. Lower numeric values take precedence over higher\nones. If omitted, the rule is treated as having the lowest precedence. This precedence is\nused to resolve conflicts between matching rules:\n- If the same document is selected by multiple rules, the smallest `priority` number wins\n- If different documents are pinned to the same position, they are ordered by ascending `priority`", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the dynamic search rule is active." + } + }, + "conditions": { + "target": "com.meilisearch.api#Conditions", + "traits": { + "smithy.api#documentation": "Conditions that must match before the dynamic search rule applies." + } + }, + "actions": { + "target": "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsItemActionsList", + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#PaginationViewDynamicSearchRuleResultsItem" + }, + "traits": { + "smithy.api#documentation": "Items for the current page." + } + }, + "com.meilisearch.api#ListRules": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ListRulesRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewDynamicSearchRule" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/dynamic-search-rules", + "code": 200 + }, + "smithy.api#documentation": "List search rules\n\nReturn all search rules configured on the instance." + } + }, + "com.meilisearch.api#ClearRules": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/dynamic-search-rules", + "code": 200 + }, + "smithy.api#documentation": "Delete all search rules.\n\nThis will delete **all** the currently defined search rules." + } + }, + "com.meilisearch.api#GetRuleRequest": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the search rule." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DynamicSearchRule": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the dynamic search rule.", + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable description of the dynamic search rule.", + "com.distilled.openapi#nullable": {} + } + }, + "lastUpdatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date time of the last update of this rule.", + "com.distilled.openapi#nullable": {} + } + }, + "precedence": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Precedence of the dynamic search rule. Lower numeric values take precedence over higher\nones. If omitted, the rule is treated as having the lowest precedence. This precedence is\nused to resolve conflicts between matching rules:\n- If the same document is selected by multiple rules, the smallest `priority` number wins\n- If different documents are pinned to the same position, they are ordered by ascending `priority`", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the dynamic search rule is active." + } + }, + "conditions": { + "target": "com.meilisearch.api#Conditions", + "traits": { + "smithy.api#documentation": "Conditions that must match before the dynamic search rule applies." + } + }, + "actions": { + "target": "com.meilisearch.api#DynamicSearchRuleActionsList", + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#DynamicSearchRuleActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#RuleAction" + }, + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches." + } + }, + "com.meilisearch.api#GetRule": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetRuleRequest" + }, + "output": { + "target": "com.meilisearch.api#DynamicSearchRule" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/dynamic-search-rules/{uid}", + "code": 200 + }, + "smithy.api#documentation": "Get a search rule\n\nRetrieve a single search rule by its unique identifier." + } + }, + "com.meilisearch.api#UpdateOrCreateRuleRequestActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#RuleAction" + }, + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches." + } + }, + "com.meilisearch.api#UpdateOrCreateRuleRequest": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the search rule." + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Human-readable description of the dynamic search rule.", + "com.distilled.openapi#nullable": {} + } + }, + "precedence": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Precedence of the dynamic search rule. Lower numeric values take precedence over higher\nones. If omitted, the rule is treated as having the lowest precedence. This precedence is\nused to resolve conflicts between matching rules:\n- If the same document is selected by multiple rules, the smallest `priority` number wins\n- If different documents are pinned to the same position, they are ordered by ascending `priority`", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the dynamic search rule is active.", + "com.distilled.openapi#nullable": {} + } + }, + "conditions": { + "target": "com.meilisearch.api#Conditions", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "actions": { + "target": "com.meilisearch.api#UpdateOrCreateRuleRequestActionsList", + "traits": { + "smithy.api#documentation": "Actions to apply when the dynamic search rule matches.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#UpdateOrCreateRule": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#UpdateOrCreateRuleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/dynamic-search-rules/{uid}", + "code": 200 + }, + "smithy.api#documentation": "Create or update a search rule\n\nPartially update a search rule by replacing the provided fields. If the rule doesn't exist, it will be created." + } + }, + "com.meilisearch.api#DeleteRuleRequest": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the search rule." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteRule": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteRuleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/dynamic-search-rules/{uid}", + "code": 200 + }, + "smithy.api#documentation": "Delete a search rule\n\nDelete a search rule by its unique identifier." + } + }, + "com.meilisearch.api#RuntimeTogglableFeatures": { + "type": "structure", + "members": { + "metrics": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the /metrics endpoint for Prometheus metrics", + "com.distilled.openapi#nullable": {} + } + }, + "logsRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the /logs route for log configuration", + "com.distilled.openapi#nullable": {} + } + }, + "tasksStreamingRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the `GET /tasks/stream` and `GET /batches/stream` SSE-based routes", + "com.distilled.openapi#nullable": {} + } + }, + "editDocumentsByFunction": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable document editing via JavaScript functions", + "com.distilled.openapi#nullable": {} + } + }, + "containsFilter": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the CONTAINS filter operator", + "com.distilled.openapi#nullable": {} + } + }, + "dynamicSearchRules": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable dynamic search rules and the `/dynamic-search-rules` routes", + "com.distilled.openapi#nullable": {} + } + }, + "network": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable network features for distributed search", + "com.distilled.openapi#nullable": {} + } + }, + "getTaskDocumentsRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the route to get documents from tasks", + "com.distilled.openapi#nullable": {} + } + }, + "taskQueueCompactionRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the route to compact the task queue database", + "com.distilled.openapi#nullable": {} + } + }, + "compositeEmbedders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable composite embedders for multi-source embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "chatCompletions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable chat completion capabilities", + "com.distilled.openapi#nullable": {} + } + }, + "multimodal": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable multimodal search with images and other media", + "com.distilled.openapi#nullable": {} + } + }, + "foreignKeys": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable foreign key support for document hydration", + "com.distilled.openapi#nullable": {} + } + }, + "disableDocumentsFetchQueue": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Disable documents fetch queue", + "com.distilled.openapi#nullable": {} + } + }, + "legacySearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable legacy search pipeline", + "com.distilled.openapi#nullable": {} + } + }, + "renderRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the `POST /render-template` route", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Experimental features that can be toggled at runtime" + } + }, + "com.meilisearch.api#GetFeatures": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#RuntimeTogglableFeatures" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/experimental-features", + "code": 200 + }, + "smithy.api#documentation": "List experimental features\n\nReturn all experimental features that can be toggled via this API, and whether each one is currently enabled or disabled." + } + }, + "com.meilisearch.api#PatchFeaturesRequest": { + "type": "structure", + "members": { + "metrics": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the /metrics endpoint for Prometheus metrics", + "com.distilled.openapi#nullable": {} + } + }, + "logsRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the /logs route for log configuration", + "com.distilled.openapi#nullable": {} + } + }, + "tasksStreamingRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the `GET /tasks/stream` and `GET /batches/stream` SSE-based routes", + "com.distilled.openapi#nullable": {} + } + }, + "editDocumentsByFunction": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable document editing via JavaScript functions", + "com.distilled.openapi#nullable": {} + } + }, + "containsFilter": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the CONTAINS filter operator", + "com.distilled.openapi#nullable": {} + } + }, + "dynamicSearchRules": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable dynamic search rules and the `/dynamic-search-rules` routes", + "com.distilled.openapi#nullable": {} + } + }, + "network": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable network features for distributed search", + "com.distilled.openapi#nullable": {} + } + }, + "getTaskDocumentsRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the route to get documents from tasks", + "com.distilled.openapi#nullable": {} + } + }, + "taskQueueCompactionRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the route to compact the task queue database", + "com.distilled.openapi#nullable": {} + } + }, + "compositeEmbedders": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable composite embedders for multi-source embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "chatCompletions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable chat completion capabilities", + "com.distilled.openapi#nullable": {} + } + }, + "multimodal": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable multimodal search with images and other media", + "com.distilled.openapi#nullable": {} + } + }, + "foreignKeys": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable foreign key support for document hydration", + "com.distilled.openapi#nullable": {} + } + }, + "disableDocumentsFetchQueue": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Disable documents fetch queue", + "com.distilled.openapi#nullable": {} + } + }, + "legacySearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable legacy search pipeline", + "com.distilled.openapi#nullable": {} + } + }, + "renderRoute": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable the `POST /render-template` route", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchFeatures": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchFeaturesRequest" + }, + "output": { + "target": "com.meilisearch.api#RuntimeTogglableFeatures" + }, + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/experimental-features", + "code": 200 + }, + "smithy.api#documentation": "Configure experimental features\n\nEnable or disable experimental features at runtime." + } + }, + "com.meilisearch.api#ExportIndexSettings": { + "type": "structure", + "members": { + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Filter expression to select which documents to export", + "com.distilled.openapi#nullable": {} + } + }, + "overrideSettings": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to override settings on the destination index", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Export settings for a specific index" + } + }, + "com.meilisearch.api#ExportRequestIndexesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ExportIndexSettings" + }, + "traits": { + "smithy.api#documentation": "Index patterns to export with their settings" + } + }, + "com.meilisearch.api#ExportRequest": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL of the destination Meilisearch instance" + } + }, + "apiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key for authenticating with the destination instance", + "com.distilled.openapi#nullable": {}, + "smithy.api#sensitive": {} + } + }, + "payloadSize": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Maximum payload size per request", + "com.distilled.openapi#nullable": {} + } + }, + "indexes": { + "target": "com.meilisearch.api#ExportRequestIndexesMap", + "traits": { + "smithy.api#documentation": "Index patterns to export with their settings", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Export": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ExportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/export", + "code": 200 + }, + "smithy.api#documentation": "Export to a remote Meilisearch\n\nTrigger an export that sends documents and settings from this instance to a remote Meilisearch server. Configure the remote URL and optional API key in the request body." + } + }, + "com.meilisearch.api#HealthResponse": { + "type": "structure", + "members": { + "status": { + "target": "com.meilisearch.api#HealthStatus", + "traits": { + "smithy.api#documentation": "The status of the instance.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#HealthStatus": { + "type": "enum", + "members": { + "AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "available" + } + }, + "MUSTRESTART": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mustRestart" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#GetHealth": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#HealthResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/health", + "code": 200 + }, + "smithy.api#documentation": "Get health\n\nThe health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available.\n\nThe engine will return `available` status with a `200` status code when the instance is healthy.\nIt will return `mustRestart` status with a `500` status code if the instance requires a restart.\nThis restart is required after a compaction of the task queue for example." + } + }, + "com.meilisearch.api#ListIndexesRequest": { + "type": "structure", + "members": { + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "offset", + "smithy.api#documentation": "The number of indexes to skip before starting to retrieve anything." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "The number of indexes to retrieve." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PaginationViewIndexView": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#PaginationViewIndexViewResultsList", + "traits": { + "smithy.api#documentation": "Items for the current page.", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of items skipped.", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of items returned.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of items matching the query.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewIndexViewResultsItem": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the index. Once created, it cannot be changed", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Creation date of the index, represented in RFC 3339 format", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Latest date of index update, represented in RFC 3339 format", + "smithy.api#required": {} + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An index containing searchable documents" + } + }, + "com.meilisearch.api#PaginationViewIndexViewResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#PaginationViewIndexViewResultsItem" + }, + "traits": { + "smithy.api#documentation": "Items for the current page." + } + }, + "com.meilisearch.api#ListIndexes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ListIndexesRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewIndexView" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes", + "code": 200 + }, + "smithy.api#documentation": "List all indexes\n\nReturns a paginated list of indexes. Use the `offset` and `limit` query parameters to page through results." + } + }, + "com.meilisearch.api#CreateIndexRequest": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the index", + "smithy.api#required": {} + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#CreateIndex": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#CreateIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes", + "code": 200 + }, + "smithy.api#documentation": "Create index\n\nCreate a new index with an optional [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key).\n\nIf no primary key is provided, Meilisearch will [infer one](https://www.meilisearch.com/docs/learn/getting_started/primary_key#meilisearch-guesses-your-primary-key) from the first batch of documents." + } + }, + "com.meilisearch.api#GetIndexRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#IndexView": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the index. Once created, it cannot be changed", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Creation date of the index, represented in RFC 3339 format", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Latest date of index update, represented in RFC 3339 format", + "smithy.api#required": {} + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An index containing searchable documents" + } + }, + "com.meilisearch.api#GetIndex": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetIndexRequest" + }, + "output": { + "target": "com.meilisearch.api#IndexView" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}", + "code": 200 + }, + "smithy.api#documentation": "Get index\n\nRetrieve the metadata of a single index: its uid, [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key), and creation/update timestamps." + } + }, + "com.meilisearch.api#UpdateIndexRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "New [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index", + "com.distilled.openapi#nullable": {} + } + }, + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "New uid for the index (for renaming)", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#UpdateIndex": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#UpdateIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}", + "code": 200 + }, + "smithy.api#documentation": "Update index\n\nUpdate the [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) or uid of an index.\n\nReturns an error if the index does not exist or if it already contains documents ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) cannot be changed in that case)." + } + }, + "com.meilisearch.api#DeleteIndexRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteIndex": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}", + "code": 200 + }, + "smithy.api#documentation": "Delete index\n\nPermanently delete an index and all its documents, settings, and task history." + } + }, + "com.meilisearch.api#CompactRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Compact": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#CompactRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/compact", + "code": 200 + }, + "smithy.api#documentation": "Compact index\n\nTrigger a compaction process on the specified index.\n\nCompaction reorganizes the index database to reclaim space and improve read performance." + } + }, + "com.meilisearch.api#GetDocumentsRequestFieldsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetDocumentsRequestIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetDocumentsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "offset", + "smithy.api#documentation": "Number of documents to skip in the response. Use this parameter\ntogether with `limit` to paginate through large document sets. For\nexample, to get documents 21-40, set `offset=20` and `limit=20`.\nDefaults to `0`." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Defaults to `20`." + } + }, + "fields": { + "target": "com.meilisearch.api#GetDocumentsRequestFieldsList", + "traits": { + "smithy.api#httpQuery": "fields", + "smithy.api#documentation": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes are returned. Example: `title,description,price`." + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "retrieveVectors", + "smithy.api#documentation": "When `true`, includes vector embeddings in the response for documents\nthat have them. This is useful when you need to inspect or export\nvector data. Defaults to `false`." + } + }, + "ids": { + "target": "com.meilisearch.api#GetDocumentsRequestIdsList", + "traits": { + "smithy.api#httpQuery": "ids", + "smithy.api#documentation": "Comma-separated list of document IDs to retrieve. Only documents with\nmatching IDs will be returned. If not specified, all documents\nmatching other criteria are returned." + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter", + "smithy.api#documentation": "Filter expression to select which documents to return. Attributes must be added to the\n`filterableAttributes` index setting before they can be used in filters. Only accepts\nstring expressions (not array syntax). Example: `genres = action AND rating > 4`." + } + }, + "sort": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "sort", + "smithy.api#documentation": "Attribute(s) to sort the documents by. Format: `attribute:asc` or\n`attribute:desc`. Multiple sort criteria can be comma-separated.\nExample: `price:asc,rating:desc`." + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "useNetwork", + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PaginationViewValue": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#PaginationViewValueResultsList", + "traits": { + "smithy.api#documentation": "Items for the current page.", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of items skipped.", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of items returned.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of items matching the query.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewValueResultsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Items for the current page." + } + }, + "com.meilisearch.api#GetDocuments": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetDocumentsRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewValue" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/documents", + "code": 200 + }, + "smithy.api#documentation": "List documents with GET\n\nRetrieve documents in batches using query parameters for offset, limit, and optional filtering.\n\n**Deprecated:** This endpoint will be deprecated in a future release. Use `POST /indexes/{index_uid}/documents/fetch` instead, which supports more parameters and array-based filter expressions.\n\n**Note:** Documents are not returned following the order of their primary keys." + } + }, + "com.meilisearch.api#ReplaceDocumentsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "primaryKey", + "smithy.api#documentation": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set." + } + }, + "csvDelimiter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "csvDelimiter", + "smithy.api#documentation": "Customize the CSV column delimiter when importing CSV documents. Must be a single ASCII\ncharacter. Only valid when the content type is `text/csv`; using this parameter with\n`application/json` or `application/x-ndjson` will return an error. Default: `,`." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + }, + "skipCreation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skipCreation", + "smithy.api#documentation": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#ReplaceDocuments": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ReplaceDocumentsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/documents", + "code": 200 + }, + "smithy.api#documentation": "Add or replace documents\n\nAdd a list of documents or replace them if they already exist.\n\nIf you send an already existing document (same id) the whole existing document will be\noverwritten by the new document. Fields previously in the document not present in the new\ndocument are removed.\n\nIf the provided index does not exist, it will be created.\n\n**Accepted content types:** `application/json`, `application/x-ndjson`, `text/csv`.\n\n**Note:** Use the reserved `_geo` object to add geo coordinates: `{\"lat\": 48.8566, \"lng\": 2.3522}`.\n\nFor a partial update see [add or update documents route](/docs/reference/api/documents/add-or-update-documents)." + } + }, + "com.meilisearch.api#UpdateDocumentsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "primaryKey", + "smithy.api#documentation": "The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document.\nThis parameter is optional and can only be set the first time documents are added to an index.\nSubsequent attempts to specify it will be ignored if the primary key has already been set." + } + }, + "csvDelimiter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "csvDelimiter", + "smithy.api#documentation": "Customize the CSV column delimiter when importing CSV documents. Must be a single ASCII\ncharacter. Only valid when the content type is `text/csv`; using this parameter with\n`application/json` or `application/x-ndjson` will return an error. Default: `,`." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + }, + "skipCreation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skipCreation", + "smithy.api#documentation": "When set to `true`, only updates existing documents and skips creating\nnew ones. Documents that don't already exist in the index will be\nignored. This is useful for partial updates where you only want to\nmodify existing records without adding new ones." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#UpdateDocuments": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#UpdateDocumentsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/documents", + "code": 200 + }, + "smithy.api#documentation": "Add or update documents\n\nAdd a list of documents or update them if they already exist.\n\nIf you send an already existing document (same id) the old document will\nbe only partially updated according to the fields of the new document.\nThus, any fields not present in the new document are kept and remained\nunchanged.\n\n**Important:** Partial updates apply only to top-level fields. Updating an object attribute\nreplaces the entire object, removing any subfields not present in the update. Dot notation\nin an update request creates a new flat attribute rather than updating an existing nested field.\n\nIf the provided index does not exist, it will be created.\n\n**Accepted content types:** `application/json`, `application/x-ndjson`, `text/csv`.\n\n**Note:** Use the reserved `_geo` object to add geo coordinates: `{\"lat\": 48.8566, \"lng\": 2.3522}`.\n\nTo completely overwrite a document, see [add or replace documents route](/docs/reference/api/documents/add-or-replace-documents)." + } + }, + "com.meilisearch.api#ClearAllDocumentsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#ClearAllDocuments": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ClearAllDocumentsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/documents", + "code": 200 + }, + "smithy.api#documentation": "Delete all documents\n\nPermanently delete all documents in the specified index. Settings and index metadata are preserved." + } + }, + "com.meilisearch.api#DeleteDocumentsByFilterRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter expression to match documents for deletion. Attributes must be in\n`filterableAttributes` before they can be used. Accepts a string or an array of arrays.\nSending an empty filter will return a `bad_request` error.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteDocumentsByFilter": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteDocumentsByFilterRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/documents/delete", + "code": 200 + }, + "smithy.api#documentation": "Delete documents by filter\n\nDelete all documents in the index that match the given filter expression." + } + }, + "com.meilisearch.api#DeleteDocumentsBatchRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteDocumentsBatchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + }, + "body": { + "target": "com.meilisearch.api#DeleteDocumentsBatchRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteDocumentsBatch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteDocumentsBatchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/documents/delete-batch", + "code": 200 + }, + "smithy.api#documentation": "Delete documents by batch\n\nDelete multiple documents in one request by providing an array of [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values." + } + }, + "com.meilisearch.api#EditDocumentsByFunctionRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter expression to select which documents to edit. If omitted, all documents in the\nindex will be processed. Attributes must be in `filterableAttributes` to be used." + } + }, + "context": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Arbitrary data to pass into the function scope. By default the function only has access\nto the current document being edited via the `doc` variable." + } + }, + "function": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A [RHAI](https://rhai.rs) function string to apply to each document. The function has\naccess to a `doc` variable representing the current document. Modify `doc` fields to\nupdate the document. Return `null` or `()` to delete the document.\nTo enable this feature: `PATCH /experimental-features/ {\"editDocumentsByFunction\": true}`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#EditDocumentsByFunction": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#EditDocumentsByFunctionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/documents/edit", + "code": 200 + }, + "smithy.api#documentation": "Edit documents by function\n\nUse a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch. The function receives each document and returns the modified document.\n\nThis feature is experimental and must be enabled through the experimental route." + } + }, + "com.meilisearch.api#DocumentsByQueryPostRequestFieldsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Array of document attributes to include in the response. If not\nspecified, all attributes listed in the `displayedAttributes` setting\nare returned. Use this to reduce response size by only requesting the\nfields you need. Example: `[\"title\", \"description\", \"price\"]`." + } + }, + "com.meilisearch.api#DocumentsByQueryPostRequestIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Array of specific document IDs to retrieve. Only documents with\nmatching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents." + } + }, + "com.meilisearch.api#DocumentsByQueryPostRequestSortList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Array of attributes to sort the documents by. Each entry should be in\nthe format `attribute:direction` where direction is either `asc`\n(ascending) or `desc` (descending). Example: `[\"price:asc\",\n\"rating:desc\"]` sorts by price ascending, then by rating descending." + } + }, + "com.meilisearch.api#DocumentsByQueryPostRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents to skip in the response. Use together with `limit`\nfor pagination through large document sets. For example, to get\ndocuments 151-170, set `offset=150` and `limit=20`. Defaults to `0`." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time and memory usage. Defaults to\n`20`." + } + }, + "fields": { + "target": "com.meilisearch.api#DocumentsByQueryPostRequestFieldsList", + "traits": { + "smithy.api#documentation": "Array of document attributes to include in the response. If not\nspecified, all attributes listed in the `displayedAttributes` setting\nare returned. Use this to reduce response size by only requesting the\nfields you need. Example: `[\"title\", \"description\", \"price\"]`.", + "com.distilled.openapi#nullable": {} + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, includes the vector embeddings in the response for\ndocuments that have them. This is useful when you need to inspect or\nexport vector data. Note that this can significantly increase response\nsize. Defaults to `false`." + } + }, + "ids": { + "target": "com.meilisearch.api#DocumentsByQueryPostRequestIdsList", + "traits": { + "smithy.api#documentation": "Array of specific document IDs to retrieve. Only documents with\nmatching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all\ndocuments matching other criteria are returned. This is useful for\nfetching specific known documents.", + "com.distilled.openapi#nullable": {} + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter expression to select which documents to return. Attributes must be added to the\n`filterableAttributes` index setting before they can be used in filters. Accepts a string\nor an array of arrays of strings for AND/OR combinations.\nExample string: `\"genres = action AND rating > 4\"`.\nExample array: `[[\"genres = action\", \"genres = comedy\"], \"rating > 4\"]` (inner array = OR, outer = AND)." + } + }, + "sort": { + "target": "com.meilisearch.api#DocumentsByQueryPostRequestSortList", + "traits": { + "smithy.api#documentation": "Array of attributes to sort the documents by. Each entry should be in\nthe format `attribute:direction` where direction is either `asc`\n(ascending) or `desc` (descending). Example: `[\"price:asc\",\n\"rating:desc\"]` sorts by price ascending, then by rating descending.", + "com.distilled.openapi#nullable": {} + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DocumentsByQueryPost": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DocumentsByQueryPostRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewValue" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/documents/fetch", + "code": 200 + }, + "smithy.api#documentation": "List documents with POST\n\nRetrieve a set of documents with optional filtering, sorting, and pagination. Use the request\nbody to specify filters, sort order, and which fields to return.\n\n**Note:** Sending an empty payload (`{}`) returns all documents in the index.\n\n**Note:** Documents are not returned following the order of their primary keys." + } + }, + "com.meilisearch.api#GetDocumentRequestFieldsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetDocumentRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The document identifier." + } + }, + "fields": { + "target": "com.meilisearch.api#GetDocumentRequestFieldsList", + "traits": { + "smithy.api#httpQuery": "fields", + "smithy.api#documentation": "Comma-separated list of document attributes to include in the\nresponse. Use `*` to retrieve all attributes. By default, all\nattributes listed in the `displayedAttributes` setting are returned.\nExample: `title,description,price`." + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "retrieveVectors", + "smithy.api#documentation": "When `true`, includes the vector embeddings in the response for this\ndocument. This is useful when you need to inspect or export vector\ndata. Note that this can significantly increase response size if the\ndocument has multiple embedders configured. Defaults to `false`." + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "useNetwork", + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetDocumentResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetDocument": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetDocumentRequest" + }, + "output": { + "target": "com.meilisearch.api#GetDocumentResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/documents/{document_id}", + "code": 200 + }, + "smithy.api#documentation": "Get document\n\nRetrieve a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value." + } + }, + "com.meilisearch.api#DeleteDocumentRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "document_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Document identifier." + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "customMetadata", + "smithy.api#documentation": "A string that can be used to identify and filter tasks. This metadata\nis stored with the task and returned in task responses. Useful for\ntracking tasks from external systems or associating tasks with\nspecific operations in your application." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteDocument": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteDocumentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/documents/{document_id}", + "code": 200 + }, + "smithy.api#documentation": "Delete document\n\nDelete a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key)." + } + }, + "com.meilisearch.api#SearchRequestVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "Custom query vector for semantic search" + } + }, + "com.meilisearch.api#HybridQuery": { + "type": "structure", + "members": { + "semanticRatio": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Balance between keyword (0.0) and semantic (1.0) search." + } + }, + "embedder": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the embedder from the index embedders setting (`embedder` in JSON). Used to vectorize the query.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Hybrid search: balance between keyword and semantic search." + } + }, + "com.meilisearch.api#MatchingStrategy": { + "type": "enum", + "members": { + "LAST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "FREQUENCY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "frequency" + } + } + }, + "traits": { + "smithy.api#documentation": "Strategy used to match query terms within documents" + } + }, + "com.meilisearch.api#SearchRequestAttributesToSearchOnList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Restrict search to specified attributes" + } + }, + "com.meilisearch.api#Locale": { + "type": "enum", + "members": { + "AF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "af" + } + }, + "AK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ak" + } + }, + "AM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "am" + } + }, + "AR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ar" + } + }, + "AZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "az" + } + }, + "BE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "be" + } + }, + "BN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bn" + } + }, + "BG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bg" + } + }, + "CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ca" + } + }, + "CS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cs" + } + }, + "DA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "da" + } + }, + "DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de" + } + }, + "EL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "el" + } + }, + "EN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en" + } + }, + "EO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eo" + } + }, + "ET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "et" + } + }, + "FI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fi" + } + }, + "FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr" + } + }, + "GU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gu" + } + }, + "HE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "he" + } + }, + "HI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hi" + } + }, + "HR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hr" + } + }, + "HU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hu" + } + }, + "HY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hy" + } + }, + "ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "id" + } + }, + "IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "it" + } + }, + "JV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "jv" + } + }, + "JA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ja" + } + }, + "KN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kn" + } + }, + "KA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ka" + } + }, + "KM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "km" + } + }, + "KO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ko" + } + }, + "LA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "la" + } + }, + "LV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lv" + } + }, + "LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lt" + } + }, + "ML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ml" + } + }, + "MR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mr" + } + }, + "MK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mk" + } + }, + "MY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "my" + } + }, + "NE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ne" + } + }, + "NL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nl" + } + }, + "NB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nb" + } + }, + "OR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "or" + } + }, + "PA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pa" + } + }, + "FA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fa" + } + }, + "PL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pl" + } + }, + "PT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pt" + } + }, + "RO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ro" + } + }, + "RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ru" + } + }, + "SI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "si" + } + }, + "SK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sk" + } + }, + "SL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sl" + } + }, + "SN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sn" + } + }, + "ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es" + } + }, + "SR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sr" + } + }, + "SV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sv" + } + }, + "TA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ta" + } + }, + "TE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "te" + } + }, + "TL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tl" + } + }, + "TH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "th" + } + }, + "TK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tk" + } + }, + "TR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tr" + } + }, + "UK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uk" + } + }, + "UR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ur" + } + }, + "UZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uz" + } + }, + "VI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vi" + } + }, + "YI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "yi" + } + }, + "ZH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh" + } + }, + "ZU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zu" + } + }, + "AFR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "afr" + } + }, + "AKA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aka" + } + }, + "AMH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "amh" + } + }, + "ARA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ara" + } + }, + "AZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aze" + } + }, + "BEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bel" + } + }, + "BEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ben" + } + }, + "BUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bul" + } + }, + "CAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cat" + } + }, + "CES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ces" + } + }, + "DAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dan" + } + }, + "DEU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deu" + } + }, + "ELL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ell" + } + }, + "ENG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eng" + } + }, + "EPO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "epo" + } + }, + "EST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "est" + } + }, + "FIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fin" + } + }, + "FRA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fra" + } + }, + "GUJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "guj" + } + }, + "HEB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "heb" + } + }, + "HIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hin" + } + }, + "HRV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hrv" + } + }, + "HUN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hun" + } + }, + "HYE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hye" + } + }, + "IND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ind" + } + }, + "ITA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ita" + } + }, + "JAV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "jav" + } + }, + "JPN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "jpn" + } + }, + "KAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kan" + } + }, + "KAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kat" + } + }, + "KHM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "khm" + } + }, + "KOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kor" + } + }, + "LAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lat" + } + }, + "LAV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lav" + } + }, + "LIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lit" + } + }, + "MAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mal" + } + }, + "MAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mar" + } + }, + "MKD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mkd" + } + }, + "MYA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mya" + } + }, + "NEP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nep" + } + }, + "NLD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nld" + } + }, + "NOB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nob" + } + }, + "ORI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ori" + } + }, + "PAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pan" + } + }, + "PES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pes" + } + }, + "POL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pol" + } + }, + "POR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "por" + } + }, + "RON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ron" + } + }, + "RUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rus" + } + }, + "SIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sin" + } + }, + "SLK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "slk" + } + }, + "SLV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "slv" + } + }, + "SNA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sna" + } + }, + "SPA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "spa" + } + }, + "SRP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "srp" + } + }, + "SWE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "swe" + } + }, + "TAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tam" + } + }, + "TEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tel" + } + }, + "TGL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tgl" + } + }, + "THA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tha" + } + }, + "TUK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tuk" + } + }, + "TUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tur" + } + }, + "UKR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ukr" + } + }, + "URD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "urd" + } + }, + "UZB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uzb" + } + }, + "VIE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vie" + } + }, + "YID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "yid" + } + }, + "ZHO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zho" + } + }, + "ZUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zul" + } + }, + "CMN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cmn" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#SearchRequestLocalesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Locale" + }, + "traits": { + "smithy.api#documentation": "Languages to use for query processing" + } + }, + "com.meilisearch.api#SearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "facetQuery": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string to search for matching facet values. If not specified, Meilisearch returns all facet values for the `facetName`, limited to 100 results. Note: only the first word is used for matching.", + "com.distilled.openapi#nullable": {} + } + }, + "facetName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the facet attribute to search. Must be present in the index's `filterableAttributes` list.", + "smithy.api#required": {} + } + }, + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string to filter the underlying documents before computing facet values. This affects which facet values appear and their counts, but does not filter the facet values themselves.", + "com.distilled.openapi#nullable": {} + } + }, + "vector": { + "target": "com.meilisearch.api#SearchRequestVectorList", + "traits": { + "smithy.api#documentation": "Custom query vector for semantic search", + "com.distilled.openapi#nullable": {} + } + }, + "media": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Multimodal content for AI-powered search" + } + }, + "hybrid": { + "target": "com.meilisearch.api#HybridQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter expression to restrict which documents are considered when computing facet values. Attributes must be in `filterableAttributes` before they can be used in filters." + } + }, + "matchingStrategy": { + "target": "com.meilisearch.api#MatchingStrategy" + }, + "attributesToSearchOn": { + "target": "com.meilisearch.api#SearchRequestAttributesToSearchOnList", + "traits": { + "smithy.api#documentation": "Restrict search to specified attributes", + "com.distilled.openapi#nullable": {} + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Minimum ranking score threshold (0.0 to 1.0) that documents must\nachieve to be considered when computing facet counts. Documents with\nscores below this threshold are excluded from facet value counts.", + "com.distilled.openapi#nullable": {} + } + }, + "locales": { + "target": "com.meilisearch.api#SearchRequestLocalesList", + "traits": { + "smithy.api#documentation": "Languages to use for query processing", + "com.distilled.openapi#nullable": {} + } + }, + "exhaustiveFacetCount": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Return exhaustive facet count instead of an estimate", + "com.distilled.openapi#nullable": {} + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#FacetSearchResult": { + "type": "structure", + "members": { + "facetHits": { + "target": "com.meilisearch.api#FacetSearchResultFacetHitsList", + "traits": { + "smithy.api#documentation": "Array of matching facet values with their document counts, sorted lexicographically\nin ascending order (or by count if `sortFacetValuesBy` is set to `\"count\"`).", + "smithy.api#required": {} + } + }, + "facetQuery": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The original `facetQuery` from the request. `null` if no query was provided.", + "com.distilled.openapi#nullable": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Time in milliseconds Meilisearch took to process the request.", + "smithy.api#required": {} + } + }, + "remoteErrors": { + "target": "com.meilisearch.api#FacetSearchResultRemoteErrorsMap", + "traits": { + "smithy.api#documentation": "Errors from remote shards. Only present in federated search when some remotes failed.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Result of a facet search operation." + } + }, + "com.meilisearch.api#FacetValueHitSchema": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The facet value that matched the query.", + "smithy.api#required": {} + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents with this facet value among the search results.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema representation of a facet value hit (for OpenAPI documentation only)." + } + }, + "com.meilisearch.api#FacetSearchResultFacetHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#FacetValueHitSchema" + }, + "traits": { + "smithy.api#documentation": "Array of matching facet values with their document counts, sorted lexicographically\nin ascending order (or by count if `sortFacetValuesBy` is set to `\"count\"`)." + } + }, + "com.meilisearch.api#ResponseError": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The error message.", + "smithy.api#required": {} + } + }, + "code": { + "target": "com.meilisearch.api#Code", + "traits": { + "smithy.api#documentation": "The error code.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#ErrorType", + "traits": { + "smithy.api#documentation": "The error type.", + "smithy.api#required": {} + } + }, + "link": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A link to the documentation about this specific error.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#Code": { + "type": "enum", + "members": { + "API_KEY_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api_key_already_exists" + } + }, + "API_KEY_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api_key_not_found" + } + }, + "INDEX_SCOPED_API_KEY_WITH_GLOBAL_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_scoped_api_key_with_global_action" + } + }, + "BAD_PARAMETER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bad_parameter" + } + }, + "BAD_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bad_request" + } + }, + "DATABASE_SIZE_LIMIT_REACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database_size_limit_reached" + } + }, + "DOCUMENT_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document_not_found" + } + }, + "DUMP_ALREADY_PROCESSING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dump_already_processing" + } + }, + "DUMP_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dump_not_found" + } + }, + "DUMP_PROCESS_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dump_process_failed" + } + }, + "DUPLICATE_INDEX_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "duplicate_index_found" + } + }, + "IMMUTABLE_API_KEY_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_actions" + } + }, + "IMMUTABLE_API_KEY_CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_created_at" + } + }, + "IMMUTABLE_API_KEY_EXPIRES_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_expires_at" + } + }, + "IMMUTABLE_API_KEY_INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_indexes" + } + }, + "IMMUTABLE_API_KEY_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_key" + } + }, + "IMMUTABLE_API_KEY_UID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_uid" + } + }, + "IMMUTABLE_API_KEY_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_api_key_updated_at" + } + }, + "IMMUTABLE_INDEX_CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_index_created_at" + } + }, + "IMMUTABLE_INDEX_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_index_updated_at" + } + }, + "IMPORT_TASK_ALREADY_RECEIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "import_task_already_received" + } + }, + "IMPORT_TASK_UNKNOWN_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "import_task_unknown_remote" + } + }, + "RECEIVE_IMPORT_FINISHED_UNKNOWN_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "receive_import_finished_unknown_remote" + } + }, + "IMPORT_TASK_WITHOUT_NETWORK_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "import_task_without_network_task" + } + }, + "INDEX_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_already_exists" + } + }, + "INDEX_CREATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_creation_failed" + } + }, + "INDEX_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_not_found" + } + }, + "INDEX_PRIMARY_KEY_ALREADY_EXISTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_primary_key_already_exists" + } + }, + "INDEX_PRIMARY_KEY_MULTIPLE_CANDIDATES_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_primary_key_multiple_candidates_found" + } + }, + "INDEX_PRIMARY_KEY_NO_CANDIDATE_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "index_primary_key_no_candidate_found" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "INVALID_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key" + } + }, + "INVALID_API_KEY_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_actions" + } + }, + "INVALID_API_KEY_DESCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_description" + } + }, + "INVALID_API_KEY_EXPIRES_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_expires_at" + } + }, + "INVALID_API_KEY_INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_indexes" + } + }, + "INVALID_API_KEY_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_limit" + } + }, + "INVALID_API_KEY_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_name" + } + }, + "INVALID_API_KEY_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_offset" + } + }, + "INVALID_API_KEY_UID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_api_key_uid" + } + }, + "INVALID_CONTENT_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_content_type" + } + }, + "INVALID_DOCUMENT_CSV_DELIMITER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_csv_delimiter" + } + }, + "INVALID_DOCUMENT_FIELDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_fields" + } + }, + "INVALID_DOCUMENT_RETRIEVE_VECTORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_retrieve_vectors" + } + }, + "MISSING_DOCUMENT_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_document_filter" + } + }, + "MISSING_DOCUMENT_EDITION_FUNCTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_document_edition_function" + } + }, + "INCONSISTENT_DOCUMENT_CHANGE_HEADERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inconsistent_document_change_headers" + } + }, + "INVALID_DOCUMENT_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_filter" + } + }, + "INVALID_DOCUMENT_SORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_sort" + } + }, + "INVALID_DOCUMENT_USE_NETWORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_use_network" + } + }, + "INVALID_DOCUMENT_RETRIEVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_retrieve" + } + }, + "INVALID_DOCUMENT_GEO_FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_geo_field" + } + }, + "INVALID_DOCUMENT_GEOJSON_FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_geojson_field" + } + }, + "INVALID_HEADER_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_header_value" + } + }, + "INVALID_VECTOR_DIMENSIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_vector_dimensions" + } + }, + "INVALID_VECTORS_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_vectors_type" + } + }, + "INVALID_DOCUMENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_id" + } + }, + "INVALID_DOCUMENT_IDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_ids" + } + }, + "INVALID_DOCUMENT_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_limit" + } + }, + "INVALID_DOCUMENT_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_offset" + } + }, + "INVALID_SEARCH_EMBEDDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_embedder" + } + }, + "INVALID_SIMILAR_EMBEDDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_embedder" + } + }, + "INVALID_SEARCH_HYBRID_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_hybrid_query" + } + }, + "INVALID_INDEX_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_limit" + } + }, + "INVALID_INDEX_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_offset" + } + }, + "INVALID_INDEX_PRIMARY_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_primary_key" + } + }, + "INVALID_INDEX_CUSTOM_METADATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_custom_metadata" + } + }, + "INVALID_SKIP_CREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_skip_creation" + } + }, + "INVALID_INDEX_UID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_uid" + } + }, + "INVALID_MULTI_SEARCH_FACETS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_facets" + } + }, + "INVALID_MULTI_SEARCH_FACETS_BY_INDEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_facets_by_index" + } + }, + "INVALID_MULTI_SEARCH_FACET_ORDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_facet_order" + } + }, + "INVALID_MULTI_SEARCH_QUERY_PERSONALIZATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_personalization" + } + }, + "INVALID_MULTI_SEARCH_QUERY_SHOW_PERFORMANCE_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_show_performance_details" + } + }, + "INVALID_MULTI_SEARCH_FEDERATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_federated" + } + }, + "INVALID_MULTI_SEARCH_FEDERATION_OPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_federation_options" + } + }, + "INVALID_MULTI_SEARCH_MAX_VALUES_PER_FACET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_max_values_per_facet" + } + }, + "INVALID_MULTI_SEARCH_MERGE_FACETS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_merge_facets" + } + }, + "INVALID_MULTI_SEARCH_QUERY_FACETS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_facets" + } + }, + "INVALID_MULTI_SEARCH_DISTINCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_distinct" + } + }, + "INVALID_MULTI_SEARCH_QUERY_PAGINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_pagination" + } + }, + "INVALID_MULTI_SEARCH_QUERY_RANKING_RULES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_ranking_rules" + } + }, + "INVALID_MULTI_SEARCH_QUERY_POSITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_query_position" + } + }, + "INVALID_MULTI_SEARCH_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_remote" + } + }, + "INVALID_MULTI_SEARCH_WEIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_multi_search_weight" + } + }, + "INVALID_NETWORK_LEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_leader" + } + }, + "INVALID_NETWORK_REMOTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_remotes" + } + }, + "INVALID_NETWORK_SHARDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_shards" + } + }, + "INVALID_NETWORK_SELF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_self" + } + }, + "INVALID_NETWORK_SEARCH_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_search_api_key" + } + }, + "INVALID_NETWORK_WRITE_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_write_api_key" + } + }, + "INVALID_NETWORK_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_network_url" + } + }, + "INVALID_SEARCH_ATTRIBUTES_TO_SEARCH_ON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_attributes_to_search_on" + } + }, + "INVALID_SEARCH_ATTRIBUTES_TO_CROP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_attributes_to_crop" + } + }, + "INVALID_SEARCH_ATTRIBUTES_TO_HIGHLIGHT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_attributes_to_highlight" + } + }, + "INVALID_SIMILAR_ATTRIBUTES_TO_RETRIEVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_attributes_to_retrieve" + } + }, + "INVALID_SIMILAR_RETRIEVE_VECTORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_retrieve_vectors" + } + }, + "INVALID_SEARCH_ATTRIBUTES_TO_RETRIEVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_attributes_to_retrieve" + } + }, + "INVALID_SEARCH_RANKING_SCORE_THRESHOLD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_ranking_score_threshold" + } + }, + "INVALID_SIMILAR_RANKING_SCORE_THRESHOLD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_ranking_score_threshold" + } + }, + "INVALID_SEARCH_RETRIEVE_VECTORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_retrieve_vectors" + } + }, + "INVALID_SEARCH_CROP_LENGTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_crop_length" + } + }, + "INVALID_SEARCH_CROP_MARKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_crop_marker" + } + }, + "INVALID_SEARCH_FACETS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_facets" + } + }, + "INVALID_SEARCH_SEMANTIC_RATIO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_semantic_ratio" + } + }, + "INVALID_SEARCH_LOCALES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_locales" + } + }, + "INVALID_FACET_SEARCH_EXHAUSTIVE_FACET_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_facet_search_exhaustive_facet_count" + } + }, + "INVALID_FACET_SEARCH_FACET_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_facet_search_facet_name" + } + }, + "INVALID_SIMILAR_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_id" + } + }, + "INVALID_SEARCH_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_filter" + } + }, + "INVALID_SIMILAR_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_filter" + } + }, + "INVALID_SEARCH_HIGHLIGHT_POST_TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_highlight_post_tag" + } + }, + "INVALID_SEARCH_HIGHLIGHT_PRE_TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_highlight_pre_tag" + } + }, + "INVALID_SEARCH_HITS_PER_PAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_hits_per_page" + } + }, + "INVALID_SIMILAR_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_limit" + } + }, + "INVALID_SEARCH_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_limit" + } + }, + "INVALID_SEARCH_MATCHING_STRATEGY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_matching_strategy" + } + }, + "INVALID_SIMILAR_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_offset" + } + }, + "INVALID_SEARCH_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_offset" + } + }, + "INVALID_SEARCH_PAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_page" + } + }, + "INVALID_SEARCH_Q": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_q" + } + }, + "INVALID_FACET_SEARCH_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_facet_search_query" + } + }, + "INVALID_FACET_SEARCH_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_facet_search_name" + } + }, + "FACET_SEARCH_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "facet_search_disabled" + } + }, + "INVALID_SEARCH_VECTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_vector" + } + }, + "INVALID_SEARCH_MEDIA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_media" + } + }, + "INVALID_SEARCH_SHOW_MATCHES_POSITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_show_matches_position" + } + }, + "INVALID_SEARCH_SHOW_RANKING_SCORE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_show_ranking_score" + } + }, + "INVALID_SIMILAR_SHOW_RANKING_SCORE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_show_ranking_score" + } + }, + "INVALID_SEARCH_SHOW_RANKING_SCORE_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_show_ranking_score_details" + } + }, + "INVALID_SEARCH_SHOW_PERFORMANCE_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_show_performance_details" + } + }, + "INVALID_SEARCH_USE_NETWORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_use_network" + } + }, + "INVALID_SIMILAR_SHOW_RANKING_SCORE_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_show_ranking_score_details" + } + }, + "INVALID_SIMILAR_SHOW_PERFORMANCE_DETAILS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_similar_show_performance_details" + } + }, + "INVALID_SEARCH_SORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_sort" + } + }, + "INVALID_SEARCH_DISTINCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_distinct" + } + }, + "INVALID_SEARCH_PERSONALIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_personalize" + } + }, + "INVALID_SEARCH_PERSONALIZE_USER_CONTEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_personalize_user_context" + } + }, + "INVALID_SEARCH_MEDIA_AND_VECTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_search_media_and_vector" + } + }, + "INVALID_SETTINGS_DISPLAYED_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_displayed_attributes" + } + }, + "INVALID_SETTINGS_DISTINCT_ATTRIBUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_distinct_attribute" + } + }, + "INVALID_SETTINGS_PROXIMITY_PRECISION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_proximity_precision" + } + }, + "INVALID_SETTINGS_FACET_SEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_facet_search" + } + }, + "INVALID_SETTINGS_PREFIX_SEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_prefix_search" + } + }, + "INVALID_SETTINGS_FACETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_faceting" + } + }, + "INVALID_SETTINGS_FILTERABLE_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_filterable_attributes" + } + }, + "INVALID_SETTINGS_FOREIGN_KEYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_foreign_keys" + } + }, + "INVALID_SETTINGS_PAGINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_pagination" + } + }, + "INVALID_SETTINGS_SEARCH_CUTOFF_MS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_search_cutoff_ms" + } + }, + "INVALID_SETTINGS_EMBEDDERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_embedders" + } + }, + "INVALID_SETTINGS_RANKING_RULES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_ranking_rules" + } + }, + "INVALID_SETTINGS_SEARCHABLE_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_searchable_attributes" + } + }, + "INVALID_SETTINGS_SORTABLE_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_sortable_attributes" + } + }, + "INVALID_SETTINGS_STOP_WORDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_stop_words" + } + }, + "INVALID_SETTINGS_NON_SEPARATOR_TOKENS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_non_separator_tokens" + } + }, + "INVALID_SETTINGS_SEPARATOR_TOKENS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_separator_tokens" + } + }, + "INVALID_SETTINGS_DICTIONARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_dictionary" + } + }, + "INVALID_SETTINGS_SYNONYMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_synonyms" + } + }, + "INVALID_SETTINGS_TYPO_TOLERANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_typo_tolerance" + } + }, + "INVALID_SETTINGS_LOCALIZED_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_localized_attributes" + } + }, + "INVALID_STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_state" + } + }, + "INVALID_STATS_SHOW_INTERNAL_DATABASE_SIZES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_stats_show_internal_database_sizes" + } + }, + "INVALID_STATS_SIZE_FORMAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_stats_size_format" + } + }, + "INVALID_STORE_FILE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_store_file" + } + }, + "INVALID_SWAP_DUPLICATE_INDEX_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_swap_duplicate_index_found" + } + }, + "INVALID_SWAP_INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_swap_indexes" + } + }, + "INVALID_SWAP_RENAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_swap_rename" + } + }, + "INVALID_TASK_AFTER_ENQUEUED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_after_enqueued_at" + } + }, + "INVALID_TASK_AFTER_FINISHED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_after_finished_at" + } + }, + "INVALID_TASK_AFTER_STARTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_after_started_at" + } + }, + "INVALID_TASK_BEFORE_ENQUEUED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_before_enqueued_at" + } + }, + "INVALID_TASK_BEFORE_FINISHED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_before_finished_at" + } + }, + "INVALID_TASK_BEFORE_STARTED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_before_started_at" + } + }, + "INVALID_TASK_CANCELED_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_canceled_by" + } + }, + "INVALID_TASK_FROM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_from" + } + }, + "INVALID_TASK_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_limit" + } + }, + "INVALID_TASK_REVERSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_reverse" + } + }, + "INVALID_TASK_STATUSES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_statuses" + } + }, + "INVALID_TASK_TYPES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_types" + } + }, + "INVALID_TASK_UIDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_task_uids" + } + }, + "INVALID_BATCH_UIDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_batch_uids" + } + }, + "IO_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "io_error" + } + }, + "FEATURE_NOT_ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "feature_not_enabled" + } + }, + "MALFORMED_PAYLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "malformed_payload" + } + }, + "MAX_FIELDS_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "max_fields_limit_exceeded" + } + }, + "MISSING_API_KEY_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_api_key_actions" + } + }, + "MISSING_API_KEY_EXPIRES_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_api_key_expires_at" + } + }, + "MISSING_API_KEY_INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_api_key_indexes" + } + }, + "MISSING_AUTHORIZATION_HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_authorization_header" + } + }, + "MISSING_CONTENT_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_content_type" + } + }, + "MISSING_DOCUMENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_document_id" + } + }, + "MISSING_FACET_SEARCH_FACET_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_facet_search_facet_name" + } + }, + "MISSING_INDEX_UID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_index_uid" + } + }, + "MISSING_MASTER_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_master_key" + } + }, + "MISSING_NETWORK_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_network_url" + } + }, + "MISSING_PAYLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_payload" + } + }, + "MISSING_SEARCH_HYBRID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_search_hybrid" + } + }, + "MISSING_SWAP_INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_swap_indexes" + } + }, + "MISSING_TASK_FILTERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "missing_task_filters" + } + }, + "NETWORK_VERSION_MISMATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "network_version_mismatch" + } + }, + "NO_SPACE_LEFT_ON_DEVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_space_left_on_device" + } + }, + "NOT_LEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_leader" + } + }, + "PAYLOAD_TOO_LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "payload_too_large" + } + }, + "REMOTE_BAD_RESPONSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_bad_response" + } + }, + "REMOTE_BAD_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_bad_request" + } + }, + "UNKNOWN_REMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknown_remote" + } + }, + "REMOTE_COULD_NOT_SEND_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_could_not_send_request" + } + }, + "REMOTE_INVALID_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_invalid_api_key" + } + }, + "REMOTE_REMOTE_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_remote_error" + } + }, + "REMOTE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote_timeout" + } + }, + "TOO_MANY_SEARCH_REQUESTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "too_many_search_requests" + } + }, + "TASK_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "task_not_found" + } + }, + "TASK_FILE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "task_file_not_found" + } + }, + "BATCH_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "batch_not_found" + } + }, + "TOO_MANY_OPEN_FILES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "too_many_open_files" + } + }, + "TOO_MANY_VECTORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "too_many_vectors" + } + }, + "UNEXPECTED_NETWORK_PREVIOUS_REMOTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unexpected_network_previous_remotes" + } + }, + "NETWORK_VERSION_TOO_OLD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "network_version_too_old" + } + }, + "UNPROCESSED_NETWORK_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unprocessed_network_task" + } + }, + "UNRETRIEVABLE_DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unretrievable_document" + } + }, + "UNRETRIEVABLE_ERROR_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unretrievable_error_code" + } + }, + "UNSUPPORTED_MEDIA_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unsupported_media_type" + } + }, + "INVALID_S3_SNAPSHOT_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_s3_snapshot_request" + } + }, + "INVALID_S3_SNAPSHOT_PARAMETERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_s3_snapshot_parameters" + } + }, + "S3_SNAPSHOT_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3_snapshot_server_error" + } + }, + "VECTOR_EMBEDDING_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "vector_embedding_error" + } + }, + "NOT_FOUND_SIMILAR_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "not_found_similar_id" + } + }, + "INVALID_DOCUMENT_EDITION_CONTEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_edition_context" + } + }, + "INVALID_DOCUMENT_EDITION_FUNCTION_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_document_edition_function_filter" + } + }, + "EDIT_DOCUMENTS_BY_FUNCTION_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "edit_documents_by_function_error" + } + }, + "INVALID_SETTINGS_INDEX_CHAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_settings_index_chat" + } + }, + "INVALID_EXPORT_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_url" + } + }, + "INVALID_EXPORT_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_api_key" + } + }, + "INVALID_EXPORT_PAYLOAD_SIZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_payload_size" + } + }, + "INVALID_EXPORT_INDEXES_PATTERNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_indexes_patterns" + } + }, + "INVALID_EXPORT_INDEX_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_index_filter" + } + }, + "INVALID_EXPORT_INDEX_OVERRIDE_SETTINGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_export_index_override_settings" + } + }, + "UNIMPLEMENTED_EXTERNAL_FUNCTION_CALLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unimplemented_external_function_calling" + } + }, + "UNIMPLEMENTED_NON_STREAMING_CHAT_COMPLETIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unimplemented_non_streaming_chat_completions" + } + }, + "UNIMPLEMENTED_MULTI_CHOICE_CHAT_COMPLETIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unimplemented_multi_choice_chat_completions" + } + }, + "CHAT_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chat_not_found" + } + }, + "INVALID_CHAT_SETTING_DOCUMENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_setting_document_template" + } + }, + "INVALID_CHAT_COMPLETION_ORG_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_org_id" + } + }, + "INVALID_CHAT_COMPLETION_PROJECT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_project_id" + } + }, + "INVALID_CHAT_COMPLETION_API_VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_api_version" + } + }, + "INVALID_CHAT_COMPLETION_DEPLOYMENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_deployment_id" + } + }, + "INVALID_CHAT_COMPLETION_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_source" + } + }, + "INVALID_CHAT_COMPLETION_BASE_API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_base_api" + } + }, + "INVALID_CHAT_COMPLETION_API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_api_key" + } + }, + "INVALID_CHAT_COMPLETION_PROMPTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_prompts" + } + }, + "INVALID_CHAT_COMPLETION_SYSTEM_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_system_prompt" + } + }, + "INVALID_CHAT_COMPLETION_SEARCH_DESCRIPTION_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_search_description_prompt" + } + }, + "INVALID_CHAT_COMPLETION_SEARCH_QUERY_PARAM_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_search_query_param_prompt" + } + }, + "INVALID_CHAT_COMPLETION_SEARCH_FILTER_PARAM_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_search_filter_param_prompt" + } + }, + "INVALID_CHAT_COMPLETION_SEARCH_INDEX_UID_PARAM_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_search_index_uid_param_prompt" + } + }, + "INVALID_CHAT_COMPLETION_PRE_QUERY_PROMPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_chat_completion_pre_query_prompt" + } + }, + "INVALID_INDEX_FIELDS_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter" + } + }, + "INVALID_INDEX_FIELDS_FILTER_ATTRIBUTE_PATTERNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_attribute_patterns" + } + }, + "INVALID_INDEX_FIELDS_FILTER_DISPLAYED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_displayed" + } + }, + "INVALID_INDEX_FIELDS_FILTER_SEARCHABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_searchable" + } + }, + "INVALID_INDEX_FIELDS_FILTER_SORTABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_sortable" + } + }, + "INVALID_INDEX_FIELDS_FILTER_DISTINCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_distinct" + } + }, + "INVALID_INDEX_FIELDS_FILTER_RANKING_RULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_ranking_rule" + } + }, + "INVALID_INDEX_FIELDS_FILTER_FILTERABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_index_fields_filter_filterable" + } + }, + "REQUIRES_ENTERPRISE_EDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "requires_enterprise_edition" + } + }, + "INVALID_RENDER_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_render_template" + } + }, + "INVALID_RENDER_INPUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_render_input" + } + }, + "RENDER_DOCUMENT_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "render_document_not_found" + } + }, + "TEMPLATE_PARSING_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "template_parsing_error" + } + }, + "TEMPLATE_RENDERING_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "template_rendering_error" + } + }, + "INVALID_WEBHOOKS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_webhooks" + } + }, + "INVALID_WEBHOOK_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_webhook_url" + } + }, + "INVALID_WEBHOOK_HEADERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_webhook_headers" + } + }, + "IMMUTABLE_WEBHOOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_webhook" + } + }, + "INVALID_WEBHOOK_UUID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_webhook_uuid" + } + }, + "WEBHOOK_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhook_not_found" + } + }, + "IMMUTABLE_WEBHOOK_UUID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_webhook_uuid" + } + }, + "IMMUTABLE_WEBHOOK_IS_EDITABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "immutable_webhook_is_editable" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_OFFSET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_offset" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_LIMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_limit" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_filter" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_DESCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_description" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_PRIORITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_priority" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_active" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_CONDITIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_conditions" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_actions" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_FILTER_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_filter_query" + } + }, + "INVALID_DYNAMIC_SEARCH_RULE_FILTER_ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_dynamic_search_rule_filter_active" + } + }, + "DYNAMIC_SEARCH_RULE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamic_search_rule_not_found" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ErrorType": { + "type": "enum", + "members": { + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "INVALID_REQUEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "invalid_request" + } + }, + "AUTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auth" + } + }, + "SYSTEM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "system" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FacetSearchResultRemoteErrorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ResponseError" + }, + "traits": { + "smithy.api#documentation": "Errors from remote shards. Only present in federated search when some remotes failed." + } + }, + "com.meilisearch.api#Search": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SearchRequest" + }, + "output": { + "target": "com.meilisearch.api#FacetSearchResult" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/facet-search", + "code": 200 + }, + "smithy.api#documentation": "Search for facet values\n\nSearch for facet values matching a query within a given facet attribute. Use this to build\nautocomplete or dropdown UIs for facet filters.\n\n**Prerequisite:** The `facetName` attribute must be in the index's `filterableAttributes` list.\nFacet search will not work without this configuration.\n\n**Note:** Facet search only considers the first word of `facetQuery`. Searching for `Jane`\nreturns `Jane Austen`, but searching for `Austen` does not.\n\n**Note:** Numeric facet values are not searchable. Convert numbers to strings if you need\nto search them as facets." + } + }, + "com.meilisearch.api#ListFieldsFilter": { + "type": "structure", + "members": { + "attributePatterns": { + "target": "com.meilisearch.api#AttributePatterns", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "displayed": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that are displayed (true) or not displayed (false) in search results.", + "com.distilled.openapi#nullable": {} + } + }, + "searchable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that are searchable (true) or not searchable (false).", + "com.distilled.openapi#nullable": {} + } + }, + "sortable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that are sortable (true) or not sortable (false).", + "com.distilled.openapi#nullable": {} + } + }, + "distinct": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that are used as distinct attribute (true) or not (false).", + "com.distilled.openapi#nullable": {} + } + }, + "rankingRule": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that have a custom ranking rule (asc/desc) (true) or not (false).", + "com.distilled.openapi#nullable": {} + } + }, + "filterable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only include fields that are filterable (true) or not filterable (false).", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Filter fields by attribute name patterns or by capability (displayed, searchable, sortable, etc.). All criteria are ANDed." + } + }, + "com.meilisearch.api#AttributePatterns": { + "type": "structure", + "members": { + "patterns": { + "target": "com.meilisearch.api#AttributePatternsPatternsList", + "traits": { + "smithy.api#documentation": "An array of attribute name patterns. Each pattern can be an exact\nattribute name, or include wildcards (`*`) at the start, end, or\nboth. Examples: `[\"title\", \"description_*\", \"*_date\", \"*content*\"]`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A collection of patterns used to match attribute names. Patterns can\ninclude wildcards (`*`) for flexible matching. For example, `title`\nmatches exactly, `overview_*` matches any attribute starting with\n`overview_`, and `*_date` matches any attribute ending with `_date`." + } + }, + "com.meilisearch.api#AttributePatternsPatternsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "An array of attribute name patterns. Each pattern can be an exact\nattribute name, or include wildcards (`*`) at the start, end, or\nboth. Examples: `[\"title\", \"description_*\", \"*_date\", \"*content*\"]`." + } + }, + "com.meilisearch.api#PostIndexFieldsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index whose fields to list." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of fields to skip. Defaults to 0." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of fields to return. Defaults to 20." + } + }, + "filter": { + "target": "com.meilisearch.api#ListFieldsFilter", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PaginationViewField": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#PaginationViewFieldResultsList", + "traits": { + "smithy.api#documentation": "Items for the current page.", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of items skipped.", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of items returned.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of items matching the query.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldDisplayConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldSearchConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldSortableConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldDistinctConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldRankingRuleConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "order": { + "target": "com.meilisearch.api#FieldRankingRuleConfigOrderList" + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldRankingRuleConfigOrderList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#FieldFilterableConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "sortBy": { + "target": "com.meilisearch.api#FacetValuesSort", + "traits": { + "smithy.api#required": {} + } + }, + "facetSearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "equality": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "comparison": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FacetValuesSort": { + "type": "enum", + "members": { + "ALPHA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "alpha" + } + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "count" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldLocalizedConfig": { + "type": "structure", + "members": { + "locales": { + "target": "com.meilisearch.api#FieldLocalizedConfigLocalesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#FieldLocalizedConfigLocalesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewFieldResultsItem": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "displayed": { + "target": "com.meilisearch.api#FieldDisplayConfig", + "traits": { + "smithy.api#required": {} + } + }, + "searchable": { + "target": "com.meilisearch.api#FieldSearchConfig", + "traits": { + "smithy.api#required": {} + } + }, + "sortable": { + "target": "com.meilisearch.api#FieldSortableConfig", + "traits": { + "smithy.api#required": {} + } + }, + "distinct": { + "target": "com.meilisearch.api#FieldDistinctConfig", + "traits": { + "smithy.api#required": {} + } + }, + "rankingRule": { + "target": "com.meilisearch.api#FieldRankingRuleConfig", + "traits": { + "smithy.api#required": {} + } + }, + "filterable": { + "target": "com.meilisearch.api#FieldFilterableConfig", + "traits": { + "smithy.api#required": {} + } + }, + "localized": { + "target": "com.meilisearch.api#FieldLocalizedConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewFieldResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#PaginationViewFieldResultsItem" + }, + "traits": { + "smithy.api#documentation": "Items for the current page." + } + }, + "com.meilisearch.api#PostIndexFields": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PostIndexFieldsRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewField" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/fields", + "code": 200 + }, + "smithy.api#documentation": "List index fields\n\nReturns a paginated list of fields in the index with their metadata: whether they are displayed, searchable, sortable, filterable, distinct, have a custom ranking rule (asc/desc), and for filterable fields the sort order for facet values." + } + }, + "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToRetrieveList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToCropList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToHighlightList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestFacetsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToSearchOnList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestLocalesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Locale" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequestVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": {} + }, + "com.meilisearch.api#SearchWithUrlQueryRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "q", + "smithy.api#documentation": "Sets the search terms.\n\nMeilisearch returns documents that match this query.\n\nThe query supports [prefix search](https://www.meilisearch.com/docs/learn/engine/prefix) and [typo tolerance](https://www.meilisearch.com/docs/learn/relevancy/typo_tolerance_settings).\n\nMeilisearch only considers the first ten words; terms are normalized (lowercase, accents ignored).\n\nOmit or leave empty for a placeholder search: no query terms are applied, so Meilisearch returns all searchable documents in the index, ordered by [ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules).\n\nEnclose terms in double quotes (`\"`) for phrase search: only documents containing that exact sequence of words are returned (e.g. `\"Winter Feast\"`).\n\nUse a minus sign (`-`) before a word or phrase to exclude it from results." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "offset", + "smithy.api#documentation": "Number of documents to skip at the start of the results.\n\nUse together with `limit` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination) (e.g. offset=20 and limit=20 returns results 21–40).\n\nThis parameter is ignored when `page` or `hitsPerPage` is set; in that case the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of documents to return in the response.\n\nUse with `offset` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination).\n\nThis parameter is ignored when `page` or `hitsPerPage` is set.\n\nThe value cannot exceed the index [maxTotalHits](https://www.meilisearch.com/docs/reference/api/settings/update-pagination#body-max-total-hits-one-of-0) setting." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "page", + "smithy.api#documentation": "Request a specific results page (1-indexed).\n\nUse together with `hitsPerPage`.\n\nWhen this parameter is set, the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`.\n\n`page` and `hitsPerPage` take precedence over `offset` and `limit`." + } + }, + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "hitsPerPage", + "smithy.api#documentation": "Maximum number of documents per page for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination).\n\nThis value determines `totalPages`; use it together with `page`.\n\nWhen set, the response includes `totalHits` and `totalPages`.\n\nSet to 0 to obtain the exhaustive `totalHits` count without returning any documents." + } + }, + "attributesToRetrieve": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToRetrieveList", + "traits": { + "smithy.api#httpQuery": "attributesToRetrieve", + "smithy.api#documentation": "List of attributes to include in each returned document.\n\nUse `[\"*\"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used.\n\nAttributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response." + } + }, + "attributesToCrop": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToCropList", + "traits": { + "smithy.api#httpQuery": "attributesToCrop", + "smithy.api#documentation": "Attributes whose values should be cropped to a short excerpt.\n\nThe cropped text appears in each hit's `_formatted` object.\n\nLength is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax.\n\nUse `[\"*\"]` to crop all attributes in `attributesToRetrieve`.\n\nWhen possible, the crop is centered around the matching terms." + } + }, + "cropLength": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "cropLength", + "smithy.api#documentation": "Maximum number of words to include in cropped values.\n\nThis parameter only applies when `attributesToCrop` is set.\n\nBoth query terms and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0) count toward this length." + } + }, + "cropMarker": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "cropMarker", + "smithy.api#documentation": "String used to mark crop boundaries in cropped text.\n\nIf null or empty, no markers are inserted.\n\nMarkers are only added where content was actually removed." + } + }, + "attributesToHighlight": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToHighlightList", + "traits": { + "smithy.api#httpQuery": "attributesToHighlight", + "smithy.api#documentation": "Attributes in which matching query terms should be highlighted.\n\nThe highlighted text appears in each hit's `_formatted` object.\n\nUse `[\"*\"]` to highlight in all attributes from `attributesToRetrieve`.\n\nBy default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`.\n\nHighlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0).\n\nSupported value types are string, number, array, and object.\n\nNote: highlights matches within all listed attributes, even those not in `searchableAttributes`." + } + }, + "highlightPreTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "highlightPreTag", + "smithy.api#documentation": "String to insert before each highlighted term.\n\nCan be any string (e.g. ``, `*`).\n\nIf null or empty, nothing is inserted at the start of a match." + } + }, + "highlightPostTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "highlightPostTag", + "smithy.api#documentation": "String to insert after each highlighted term.\n\nShould be used together with `highlightPreTag` to avoid malformed output (e.g. unclosed HTML tags)." + } + }, + "showMatchesPosition": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showMatchesPosition", + "smithy.api#documentation": "When true, each hit includes a `_matchesPosition` object with the byte offset (`start` and `length`) of each matched term.\n\nThis is useful when you need custom highlighting.\n\nNote: reports match positions in all attributes, even non-searchable ones. Positions are measured in bytes, not characters." + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter", + "smithy.api#documentation": "A [filter](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) expression to narrow results.\n\nAll attributes used in the expression must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0).\n\nPass a string (e.g. `\"(genres = horror OR genres = mystery) AND director = 'Jordan Peele'\"`).\n\nFor [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoRadius(lat, lng, distance_in_meters)`, `_geoBoundingBox([lat,lng],[lat,lng])`, or `_geoPolygon([lat,lng], ...)` (GeoJSON only for polygon).\n\nGET route accepts a string only; the value must be URL-encoded." + } + }, + "sort": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "sort", + "smithy.api#documentation": "Sort results by one or more attributes and their order.\n\nUse the format `[\"attribute:asc\", \"attribute:desc\"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used.\n\nFor [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters.\n\nThe first attribute in the list has precedence.\n\nSee [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results)." + } + }, + "distinct": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "distinct", + "smithy.api#documentation": "Return only one document per distinct value of the given attribute (e.g. deduplicate by product_id).\n\nThe attribute must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0).\n\nThis overrides the index [distinctAttribute](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-distinct-attribute-one-of-0) setting for this request.\n\nSee [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute)." + } + }, + "facets": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestFacetsList", + "traits": { + "smithy.api#httpQuery": "facets", + "smithy.api#documentation": "Return the count of matches per facet value for the listed attributes.\n\nThe response includes `facetDistribution` and, for numeric facets, `facetStats` (min/max).\n\nThis route also supports patterns, i.e., \"title\", \"dogs.*\", \"*\", which can match over the [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0).\n\nThe number of values returned per facet is limited by the index [maxValuesPerFacet](https://www.meilisearch.com/docs/reference/api/settings/update-faceting#body-max-values-per-facet-one-of-0) setting; attributes not in filterableAttributes are ignored.\n\nMore info: [faceting](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters)." + } + }, + "matchingStrategy": { + "target": "com.meilisearch.api#MatchingStrategy", + "traits": { + "smithy.api#httpQuery": "matchingStrategy", + "smithy.api#documentation": "How to match query terms when there are not enough results to satisfy `limit`.\n\n**`last`**: Returns documents containing all query terms first. If there are not enough such results, Meilisearch removes one query term at a time, starting from the end of the query (e.g. for \"big fat cat\", then \"big fat\", then \"big\").\n\n**`all`**: Only returns documents that contain all query terms. Meilisearch does not relax the query even if fewer than `limit` documents match.\n\n**`frequency`**: Returns documents containing all query terms first. If there are not enough, removes one term at a time starting with the word that is most frequent in the dataset, giving more weight to rarer terms (e.g. in \"white cotton shirt\", prioritizes documents containing \"white\" if \"shirt\" is very common).\n\nDefault: `last`." + } + }, + "attributesToSearchOn": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestAttributesToSearchOnList", + "traits": { + "smithy.api#httpQuery": "attributesToSearchOn", + "smithy.api#documentation": "Restrict the search to the listed attributes only.\n\nEach attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list.\n\nThe order of attributes in this parameter does not affect relevancy." + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "rankingScoreThreshold", + "smithy.api#documentation": "Exclude from the results any document whose [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) is below this value (between 0.0 and 1.0).\n\nExcluded hits do not count toward `estimatedTotalHits`, `totalHits`, or facet distribution.\n\nWhen used together with `page` and `hitsPerPage`, this parameter may reduce performance because Meilisearch must score all matching documents." + } + }, + "locales": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestLocalesList", + "traits": { + "smithy.api#httpQuery": "locales", + "smithy.api#documentation": "Explicitly specify the language(s) of the query.\n\nPass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0).\n\nThis overrides auto-detection; use it when auto-detection is wrong for the query or the documents.\n\nSee also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language)." + } + }, + "hybridEmbedder": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "hybridEmbedder", + "smithy.api#documentation": "Name of the embedder for [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search), which combines keyword and semantic search.\n\nMust match an embedder configured in the index settings.\n\nRequired when `vector` or `hybridSemanticRatio` is set." + } + }, + "hybridSemanticRatio": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "hybridSemanticRatio", + "smithy.api#documentation": "Balance between keyword and semantic search: 0.0 means keyword-only results, 1.0 means semantic-only.\n\nWhen `q` is empty and this value is greater than 0, Meilisearch performs a pure semantic search.\n\nRequires `hybridEmbedder` when set." + } + }, + "vector": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequestVectorList", + "traits": { + "smithy.api#httpQuery": "vector", + "smithy.api#documentation": "Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search).\n\nThe array length must match the dimensions of the embedder configured in the index.\n\nThis parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings).\n\nWhen used with `hybrid`, documents are ranked by vector similarity.\n\nYou can also use it to override an embedder's automatic vector generation." + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "retrieveVectors", + "smithy.api#documentation": "When true, the response includes document and query embeddings in each hit's `_vectors` field.\n\nThe `_vectors` field must be listed in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) for it to appear." + } + }, + "personalizeUserContext": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "personalizeUserContext", + "smithy.api#documentation": "For [personalized search](https://www.meilisearch.com/docs/learn/personalization/making_personalized_search_queries): a string describing the user (e.g. preferences or behavior).\n\nResults are then tailored to that profile.\n\nPersonalization must be [enabled](https://www.meilisearch.com/docs/reference/api/experimental-features/configure-experimental-features) (e.g. Cohere key for self-hosted instances)." + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "useNetwork", + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered, documents deduplicated across remotes).\n\nWhen `false` or omitted, the query runs locally.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` or omitted = local (default).\n\nWhen using the network, the index must exist with compatible settings on all remotes.\n\nDocuments with the same id are assumed identical for deduplication." + } + }, + "showRankingScore": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showRankingScore", + "smithy.api#documentation": "When true, each document includes a `_rankingScore` between 0.0 and 1.0; a higher value means the document is more relevant.\n\nSee [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score).\n\nThe `sort` ranking rule does not affect the value of `_rankingScore`." + } + }, + "showRankingScoreDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showRankingScoreDetails", + "smithy.api#documentation": "When true, each document includes `_rankingScoreDetails`, which breaks down the score contribution of each [ranking rule](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules).\n\nUseful for debugging relevancy." + } + }, + "showPerformanceDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showPerformanceDetails", + "smithy.api#documentation": "When true, the response includes a `performanceDetails` object with a timing breakdown of the query processing." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SearchHit": { + "type": "structure", + "members": { + "_formatted": { + "target": "com.meilisearch.api#SearchHitFormattedMap", + "traits": { + "smithy.api#documentation": "Document with highlighted and cropped attributes.\n\nPresent when `attributesToHighlight` or `attributesToCrop` was set." + } + }, + "_matchesPosition": { + "target": "com.meilisearch.api#SearchHitMatchesPositionMap", + "traits": { + "smithy.api#documentation": "Byte offsets (`start`, `length`) of each matched term per attribute.\n\nPresent when `showMatchesPosition` was true.", + "com.distilled.openapi#nullable": {} + } + }, + "_rankingScore": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Global [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) from 0.0 to 1.0.\n\nPresent when `showRankingScore` was true.", + "com.distilled.openapi#nullable": {} + } + }, + "_rankingScoreDetails": { + "target": "com.meilisearch.api#SearchHitRankingScoreDetailsMap", + "traits": { + "smithy.api#documentation": "Per-rule score breakdown (words, typo, proximity, etc.).\n\nPresent when `showRankingScoreDetails` was true.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A single search result hit." + } + }, + "com.meilisearch.api#SearchHitFormattedMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Document with highlighted and cropped attributes.\n\nPresent when `attributesToHighlight` or `attributesToCrop` was set." + } + }, + "com.meilisearch.api#MatchBounds": { + "type": "structure", + "members": { + "start": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The byte offset where the match begins within the attribute value.\nThis is a zero-indexed position from the start of the string.", + "smithy.api#required": {} + } + }, + "length": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The length in bytes of the matched text. Combined with `start`, this\ndefines the exact substring that matched the query term.", + "smithy.api#required": {} + } + }, + "indices": { + "target": "com.meilisearch.api#MatchBoundsIndicesList", + "traits": { + "smithy.api#documentation": "Byte indices of individual matched characters when the match spans\nmultiple positions (e.g., for prefix matches). This is `null` for\nsimple contiguous matches.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the position of a matching term in a document field. Used to\nindicate where query terms were found within attribute values, enabling\nfeatures like highlighting and match position display." + } + }, + "com.meilisearch.api#MatchBoundsIndicesList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Byte indices of individual matched characters when the match spans\nmultiple positions (e.g., for prefix matches). This is `null` for\nsimple contiguous matches." + } + }, + "com.meilisearch.api#SearchHitMatchesPositionValueList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#MatchBounds" + }, + "traits": {} + }, + "com.meilisearch.api#SearchHitMatchesPositionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#SearchHitMatchesPositionValueList" + }, + "traits": { + "smithy.api#documentation": "Byte offsets (`start`, `length`) of each matched term per attribute.\n\nPresent when `showMatchesPosition` was true." + } + }, + "com.meilisearch.api#SearchHitRankingScoreDetailsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Per-rule score breakdown (words, typo, proximity, etc.).\n\nPresent when `showRankingScoreDetails` was true." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponseHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchHit" + }, + "traits": { + "smithy.api#documentation": "Matching documents.\n\nEach hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponseQueryVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "Query embedding used for the search.\n\nPresent when vector or hybrid search was used." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponseFacetDistributionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Count of matching documents per facet value for each requested facet.\n\nPresent when `facets` was set." + } + }, + "com.meilisearch.api#FacetStats": { + "type": "structure", + "members": { + "min": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Lowest numeric value for this facet among matching documents.", + "smithy.api#required": {} + } + }, + "max": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Highest numeric value for this facet among matching documents.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Minimum and maximum numeric values for a facet.\n\nPresent when the facet attribute has numeric values among matching documents." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponseFacetStatsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetStats" + }, + "traits": { + "smithy.api#documentation": "Minimum and maximum numeric values per facet.\n\nPresent for numeric facets when `facets` was set." + } + }, + "com.meilisearch.api#SearchMetadata": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string set for the query, if not already present in the response.\n\nOnly set if:\n\n1. the metadata corresponds to a query in a federated search request, **and**\n2. that federated search request query is not a placeholder search (empty or missing `q`)\n\nNever set for regular search and non-federated multi-search because\nthe query(ies) are already present in the response.", + "com.distilled.openapi#nullable": {} + } + }, + "queryUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the query.", + "smithy.api#required": {} + } + }, + "indexUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "UID of the index that was searched.", + "smithy.api#required": {} + } + }, + "primaryKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index.", + "com.distilled.openapi#nullable": {} + } + }, + "remote": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Remote that processed the query (federated search only).", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Metadata about a search query (included when requested via header)." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponseRemoteErrorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ResponseError" + }, + "traits": { + "smithy.api#documentation": "Errors from remote shards. Federated search only." + } + }, + "com.meilisearch.api#SearchWithUrlQueryResponse": { + "type": "structure", + "members": { + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results per page." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page index (1-based)." + } + }, + "totalPages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of result pages." + } + }, + "totalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of matching documents." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents skipped." + } + }, + "estimatedTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated total number of matches (not exhaustive).\n\nPrioritizes relevancy and performance." + } + }, + "hits": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponseHitsList", + "traits": { + "smithy.api#documentation": "Matching documents.\n\nEach hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`.", + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string that produced this response.", + "smithy.api#required": {} + } + }, + "queryVector": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponseQueryVectorList", + "traits": { + "smithy.api#documentation": "Query embedding used for the search.\n\nPresent when vector or hybrid search was used.", + "com.distilled.openapi#nullable": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Time taken to process the query, in milliseconds.", + "smithy.api#required": {} + } + }, + "facetDistribution": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponseFacetDistributionMap", + "traits": { + "smithy.api#documentation": "Count of matching documents per facet value for each requested facet.\n\nPresent when `facets` was set.", + "com.distilled.openapi#nullable": {} + } + }, + "facetStats": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponseFacetStatsMap", + "traits": { + "smithy.api#documentation": "Minimum and maximum numeric values per facet.\n\nPresent for numeric facets when `facets` was set.", + "com.distilled.openapi#nullable": {} + } + }, + "requestUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "UUID v7 identifying this search request.", + "com.distilled.openapi#nullable": {} + } + }, + "metadata": { + "target": "com.meilisearch.api#SearchMetadata", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "performanceDetails": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Timing breakdown per processing step.\n\nPresent when `showPerformanceDetails` was true." + } + }, + "remoteErrors": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponseRemoteErrorsMap", + "traits": { + "smithy.api#documentation": "Errors from remote shards. Federated search only.", + "com.distilled.openapi#nullable": {} + } + }, + "semanticHitCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive number of semantic search matches.\n\nAI-powered (hybrid/semantic) searches only.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#SearchWithUrlQuery": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SearchWithUrlQueryRequest" + }, + "output": { + "target": "com.meilisearch.api#SearchWithUrlQueryResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/search", + "code": 200 + }, + "smithy.api#documentation": "Search with GET\n\nSearch for documents matching a query in the given index.\n\n> Equivalent to the [search with POST route](/docs/reference/api/search/search-with-post) in the Meilisearch API.\n\n**Note:** By default this endpoint returns at most 1000 results. Configure `pagination.maxTotalHits` in index settings to change this limit.\n\n**Note:** The GET route only accepts string filter expressions. Use the POST route if you need array-of-array filter syntax." + } + }, + "com.meilisearch.api#SearchWithPostRequestAttributesToRetrieveList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "List of attributes to include in each returned document.\n\nUse `[\"*\"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used.\n\nAttributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response." + } + }, + "com.meilisearch.api#SearchWithPostRequestAttributesToCropList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes whose values should be cropped to a short excerpt.\n\nThe cropped text appears in each hit's `_formatted` object.\n\nLength is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax.\n\nUse `[\"*\"]` to crop all attributes in `attributesToRetrieve`.\n\nWhen possible, the crop is centered around the matching terms." + } + }, + "com.meilisearch.api#SearchWithPostRequestAttributesToHighlightList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes in which matching query terms should be highlighted.\n\nThe highlighted text appears in each hit's `_formatted` object.\n\nUse `[\"*\"]` to highlight in all attributes from `attributesToRetrieve`.\n\nBy default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`.\n\nHighlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0).\n\nSupported value types are string, number, array, and object.\n\nNote: highlights matches within all listed attributes, even those not in `searchableAttributes`." + } + }, + "com.meilisearch.api#SearchWithPostRequestSortList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Sort results by one or more attributes and their order.\n\nUse the format `[\"attribute:asc\", \"attribute:desc\"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used.\n\nFor [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters.\n\nThe first attribute in the list has precedence.\n\nSee [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results)." + } + }, + "com.meilisearch.api#SearchWithPostRequestAttributesToSearchOnList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Restrict the search to the listed attributes only.\n\nEach attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list.\n\nThe order of attributes in this parameter does not affect relevancy." + } + }, + "com.meilisearch.api#SearchWithPostRequestLocalesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Locale" + }, + "traits": { + "smithy.api#documentation": "Explicitly specify the language(s) of the query.\n\nPass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0).\n\nThis overrides auto-detection; use it when auto-detection is wrong for the query or the documents.\n\nSee also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language)." + } + }, + "com.meilisearch.api#SearchWithPostRequestVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search).\n\nThe array length must match the dimensions of the embedder configured in the index.\n\nThis parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings).\n\nWhen used with `hybrid`, documents are ranked by vector similarity.\n\nYou can also use it to override an embedder's automatic vector generation." + } + }, + "com.meilisearch.api#Personalize": { + "type": "structure", + "members": { + "userContext": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String describing the user (e.g. preferences, behavior).\n\nUsed to return different results for different profiles.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for [personalized search](https://www.meilisearch.com/docs/learn/personalization/making_personalized_search_queries) results.\n\nWhen enabled, results are tailored to the user profile described in `userContext`." + } + }, + "com.meilisearch.api#SearchWithPostRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Sets the search terms.\n\nMeilisearch returns documents that match this query.\n\nThe query supports [prefix search](https://www.meilisearch.com/docs/learn/engine/prefix) and [typo tolerance](https://www.meilisearch.com/docs/learn/relevancy/typo_tolerance_settings).\n\nMeilisearch only considers the first ten words; terms are normalized (lowercase, accents ignored).\n\nOmit or leave empty for a placeholder search: no query terms are applied, so Meilisearch returns all searchable documents in the index, ordered by [ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules).\n\nEnclose terms in double quotes (`\"`) for phrase search: only documents containing that exact sequence of words are returned (e.g. `\"Winter Feast\"`).\n\nUse a minus sign (`-`) before a word or phrase to exclude it from results.", + "com.distilled.openapi#nullable": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents to skip at the start of the results.\n\nUse together with `limit` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination) (e.g. offset=20 and limit=20 returns results 21–40).\n\nThis parameter is ignored when `page` or `hitsPerPage` is set; in that case the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents to return in the response.\n\nUse with `offset` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination).\n\nThis parameter is ignored when `page` or `hitsPerPage` is set. The value cannot exceed the index [maxTotalHits](https://www.meilisearch.com/docs/reference/api/settings/update-pagination#body-max-total-hits-one-of-0) setting." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Request a specific results page (1-indexed).\n\nUse together with `hitsPerPage`.\n\nWhen this parameter is set, the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`.\n\n`page` and `hitsPerPage` take precedence over `offset` and `limit`.", + "com.distilled.openapi#nullable": {} + } + }, + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents per page for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination).\n\nThis value determines `totalPages`; use it together with `page`.\n\nWhen set, the response includes `totalHits` and `totalPages`.\n\nSet to 0 to obtain the exhaustive `totalHits` count without returning any documents.", + "com.distilled.openapi#nullable": {} + } + }, + "attributesToRetrieve": { + "target": "com.meilisearch.api#SearchWithPostRequestAttributesToRetrieveList", + "traits": { + "smithy.api#documentation": "List of attributes to include in each returned document.\n\nUse `[\"*\"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used.\n\nAttributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response.", + "com.distilled.openapi#nullable": {} + } + }, + "attributesToCrop": { + "target": "com.meilisearch.api#SearchWithPostRequestAttributesToCropList", + "traits": { + "smithy.api#documentation": "Attributes whose values should be cropped to a short excerpt.\n\nThe cropped text appears in each hit's `_formatted` object.\n\nLength is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax.\n\nUse `[\"*\"]` to crop all attributes in `attributesToRetrieve`.\n\nWhen possible, the crop is centered around the matching terms.", + "com.distilled.openapi#nullable": {} + } + }, + "cropLength": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of words to include in cropped values.\n\nThis parameter only applies when `attributesToCrop` is set.\n\nBoth query terms and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0) count toward this length." + } + }, + "cropMarker": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String used to mark crop boundaries in cropped text.\n\nIf null or empty, no markers are inserted.\n\nMarkers are only added where content was actually removed." + } + }, + "attributesToHighlight": { + "target": "com.meilisearch.api#SearchWithPostRequestAttributesToHighlightList", + "traits": { + "smithy.api#documentation": "Attributes in which matching query terms should be highlighted.\n\nThe highlighted text appears in each hit's `_formatted` object.\n\nUse `[\"*\"]` to highlight in all attributes from `attributesToRetrieve`.\n\nBy default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`.\n\nHighlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0).\n\nSupported value types are string, number, array, and object.\n\nNote: highlights matches within all listed attributes, even those not in `searchableAttributes`.", + "com.distilled.openapi#nullable": {} + } + }, + "highlightPreTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String to insert before each highlighted term.\n\nCan be any string (e.g. ``, `*`).\n\nIf null or empty, nothing is inserted at the start of a match." + } + }, + "highlightPostTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String to insert after each highlighted term.\n\nShould be used together with `highlightPreTag` to avoid malformed output (e.g. unclosed HTML tags)." + } + }, + "showMatchesPosition": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, each hit includes a `_matchesPosition` object with the byte offset (`start` and `length`) of each matched term.\n\nThis is useful when you need custom highlighting.\n\nNote: reports match positions in all attributes, even non-searchable ones. Positions are measured in bytes, not characters." + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "A [filter](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) expression to narrow results.\n\nAll attributes used in the expression must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0).\n\nYou can pass a string (e.g. `\"(genres = horror OR genres = mystery) AND director = 'Jordan Peele'\"`) or an array (e.g. `[[\"genres = horror\", \"genres = mystery\"], \"director = 'Jordan Peele'\"]`).\n\nFor [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoRadius(lat, lng, distance_in_meters)`, `_geoBoundingBox([lat,lng],[lat,lng])`, or `_geoPolygon([lat,lng], ...)` (GeoJSON only for polygon)." + } + }, + "sort": { + "target": "com.meilisearch.api#SearchWithPostRequestSortList", + "traits": { + "smithy.api#documentation": "Sort results by one or more attributes and their order.\n\nUse the format `[\"attribute:asc\", \"attribute:desc\"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used.\n\nFor [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters.\n\nThe first attribute in the list has precedence.\n\nSee [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results).", + "com.distilled.openapi#nullable": {} + } + }, + "distinct": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Return only one document per distinct value of the given attribute (e.g. deduplicate by product_id).\n\nThe attribute must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0).\n\nThis overrides the index [distinctAttribute](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-distinct-attribute-one-of-0) setting for this request.\n\nSee [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute).", + "com.distilled.openapi#nullable": {} + } + }, + "facets": { + "target": "com.meilisearch.api#AttributePatterns", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "matchingStrategy": { + "target": "com.meilisearch.api#MatchingStrategy" + }, + "attributesToSearchOn": { + "target": "com.meilisearch.api#SearchWithPostRequestAttributesToSearchOnList", + "traits": { + "smithy.api#documentation": "Restrict the search to the listed attributes only.\n\nEach attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list.\n\nThe order of attributes in this parameter does not affect relevancy.", + "com.distilled.openapi#nullable": {} + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Exclude from the results any document whose [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) is below this value (between 0.0 and 1.0).\n\nExcluded hits do not count toward `estimatedTotalHits`, `totalHits`, or facet distribution.\n\nWhen used together with `page` and `hitsPerPage`, this parameter may reduce performance because Meilisearch must score all matching documents.", + "com.distilled.openapi#nullable": {} + } + }, + "locales": { + "target": "com.meilisearch.api#SearchWithPostRequestLocalesList", + "traits": { + "smithy.api#documentation": "Explicitly specify the language(s) of the query.\n\nPass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0).\n\nThis overrides auto-detection; use it when auto-detection is wrong for the query or the documents.\n\nSee also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language).", + "com.distilled.openapi#nullable": {} + } + }, + "hybrid": { + "target": "com.meilisearch.api#HybridQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "vector": { + "target": "com.meilisearch.api#SearchWithPostRequestVectorList", + "traits": { + "smithy.api#documentation": "Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search).\n\nThe array length must match the dimensions of the embedder configured in the index.\n\nThis parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings).\n\nWhen used with `hybrid`, documents are ranked by vector similarity.\n\nYou can also use it to override an embedder's automatic vector generation.", + "com.distilled.openapi#nullable": {} + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, the response includes document and query embeddings in each hit's `_vectors` field.\n\nThe `_vectors` field must be listed in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) for it to appear." + } + }, + "media": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "For [multimodal search](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings): provide data (e.g. image, text) that populates a single search fragment configured in index settings.\n\nA search fragment is a named slot that defines which media or fields are sent to the embedder.\n\nAn embedder is required; this parameter is incompatible with `vector`.\n\nPOST only." + } + }, + "personalize": { + "target": "com.meilisearch.api#Personalize", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes.", + "com.distilled.openapi#nullable": {} + } + }, + "showRankingScore": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, each document includes a `_rankingScore` between 0.0 and 1.0; a higher value means the document is more relevant.\n\nSee [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score).\n\nThe `sort` ranking rule does not affect the value of `_rankingScore`." + } + }, + "showRankingScoreDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, each document includes `_rankingScoreDetails`, which breaks down the score contribution of each [ranking rule](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules).\n\nUseful for debugging relevancy." + } + }, + "showPerformanceDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, the response includes a `performanceDetails` object with a timing breakdown of the query processing." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SearchWithPostResponseHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchHit" + }, + "traits": { + "smithy.api#documentation": "Matching documents.\n\nEach hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`." + } + }, + "com.meilisearch.api#SearchWithPostResponseQueryVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "Query embedding used for the search.\n\nPresent when vector or hybrid search was used." + } + }, + "com.meilisearch.api#SearchWithPostResponseFacetDistributionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Count of matching documents per facet value for each requested facet.\n\nPresent when `facets` was set." + } + }, + "com.meilisearch.api#SearchWithPostResponseFacetStatsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetStats" + }, + "traits": { + "smithy.api#documentation": "Minimum and maximum numeric values per facet.\n\nPresent for numeric facets when `facets` was set." + } + }, + "com.meilisearch.api#SearchWithPostResponseRemoteErrorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ResponseError" + }, + "traits": { + "smithy.api#documentation": "Errors from remote shards. Federated search only." + } + }, + "com.meilisearch.api#SearchWithPostResponse": { + "type": "structure", + "members": { + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results per page." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page index (1-based)." + } + }, + "totalPages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of result pages." + } + }, + "totalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of matching documents." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents skipped." + } + }, + "estimatedTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated total number of matches (not exhaustive).\n\nPrioritizes relevancy and performance." + } + }, + "hits": { + "target": "com.meilisearch.api#SearchWithPostResponseHitsList", + "traits": { + "smithy.api#documentation": "Matching documents.\n\nEach hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`.", + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string that produced this response.", + "smithy.api#required": {} + } + }, + "queryVector": { + "target": "com.meilisearch.api#SearchWithPostResponseQueryVectorList", + "traits": { + "smithy.api#documentation": "Query embedding used for the search.\n\nPresent when vector or hybrid search was used.", + "com.distilled.openapi#nullable": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Time taken to process the query, in milliseconds.", + "smithy.api#required": {} + } + }, + "facetDistribution": { + "target": "com.meilisearch.api#SearchWithPostResponseFacetDistributionMap", + "traits": { + "smithy.api#documentation": "Count of matching documents per facet value for each requested facet.\n\nPresent when `facets` was set.", + "com.distilled.openapi#nullable": {} + } + }, + "facetStats": { + "target": "com.meilisearch.api#SearchWithPostResponseFacetStatsMap", + "traits": { + "smithy.api#documentation": "Minimum and maximum numeric values per facet.\n\nPresent for numeric facets when `facets` was set.", + "com.distilled.openapi#nullable": {} + } + }, + "requestUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "UUID v7 identifying this search request.", + "com.distilled.openapi#nullable": {} + } + }, + "metadata": { + "target": "com.meilisearch.api#SearchMetadata", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "performanceDetails": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Timing breakdown per processing step.\n\nPresent when `showPerformanceDetails` was true." + } + }, + "remoteErrors": { + "target": "com.meilisearch.api#SearchWithPostResponseRemoteErrorsMap", + "traits": { + "smithy.api#documentation": "Errors from remote shards. Federated search only.", + "com.distilled.openapi#nullable": {} + } + }, + "semanticHitCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive number of semantic search matches.\n\nAI-powered (hybrid/semantic) searches only.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#SearchWithPost": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SearchWithPostRequest" + }, + "output": { + "target": "com.meilisearch.api#SearchWithPostResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/search", + "code": 200 + }, + "smithy.api#documentation": "Search with POST\n\nSearch for documents matching a query in the given index.\n\n> Equivalent to the [search with GET route](/docs/reference/api/search/search-with-get) in the Meilisearch API.\n\n**Note:** By default this endpoint returns at most 1000 results. Configure `pagination.maxTotalHits` in index settings to change this limit." + } + }, + "com.meilisearch.api#GetAllRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SettingsUnchecked": { + "type": "structure", + "members": { + "displayedAttributes": { + "target": "com.meilisearch.api#SettingsUncheckedDisplayedAttributesList", + "traits": { + "smithy.api#documentation": "Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes).", + "com.distilled.openapi#nullable": {} + } + }, + "searchableAttributes": { + "target": "com.meilisearch.api#SettingsUncheckedSearchableAttributesList", + "traits": { + "smithy.api#documentation": "Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes).", + "com.distilled.openapi#nullable": {} + } + }, + "filterableAttributes": { + "target": "com.meilisearch.api#SettingsUncheckedFilterableAttributesList", + "traits": { + "smithy.api#documentation": "Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`.", + "com.distilled.openapi#nullable": {} + } + }, + "sortableAttributes": { + "target": "com.meilisearch.api#SettingsUncheckedSortableAttributesList", + "traits": { + "smithy.api#documentation": "Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results).", + "com.distilled.openapi#nullable": {} + } + }, + "foreignKeys": { + "target": "com.meilisearch.api#SettingsUncheckedForeignKeysList", + "traits": { + "smithy.api#documentation": "Foreign keys to use for cross-index filtering search.", + "com.distilled.openapi#nullable": {} + } + }, + "rankingRules": { + "target": "com.meilisearch.api#SettingsUncheckedRankingRulesList", + "traits": { + "smithy.api#documentation": "[Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`).", + "com.distilled.openapi#nullable": {} + } + }, + "stopWords": { + "target": "com.meilisearch.api#SettingsUncheckedStopWordsList", + "traits": { + "smithy.api#documentation": "Words ignored when present in search queries.", + "com.distilled.openapi#nullable": {} + } + }, + "nonSeparatorTokens": { + "target": "com.meilisearch.api#SettingsUncheckedNonSeparatorTokensList", + "traits": { + "smithy.api#documentation": "Characters that are not treated as word separators. Removed from the default separator set.", + "com.distilled.openapi#nullable": {} + } + }, + "separatorTokens": { + "target": "com.meilisearch.api#SettingsUncheckedSeparatorTokensList", + "traits": { + "smithy.api#documentation": "Characters that delimit words. Added on top of the default separators.", + "com.distilled.openapi#nullable": {} + } + }, + "dictionary": { + "target": "com.meilisearch.api#SettingsUncheckedDictionaryList", + "traits": { + "smithy.api#documentation": "Strings Meilisearch parses as a single term. Useful for names or domain terms.", + "com.distilled.openapi#nullable": {} + } + }, + "synonyms": { + "target": "com.meilisearch.api#SettingsUncheckedSynonymsMap", + "traits": { + "smithy.api#documentation": "Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms).", + "com.distilled.openapi#nullable": {} + } + }, + "distinctAttribute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Field whose value must be unique in the returned documents. One document per distinct value. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute).", + "com.distilled.openapi#nullable": {} + } + }, + "proximityPrecision": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Precision for the proximity ranking rule and phrase search: `byWord` (exact distance) or `byAttribute` (same attribute).", + "com.distilled.openapi#nullable": {} + } + }, + "typoTolerance": { + "target": "com.meilisearch.api#TypoSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "faceting": { + "target": "com.meilisearch.api#FacetingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pagination": { + "target": "com.meilisearch.api#PaginationSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedders": { + "target": "com.meilisearch.api#SettingsUncheckedEmbeddersMap", + "traits": { + "smithy.api#documentation": "[Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.).", + "com.distilled.openapi#nullable": {} + } + }, + "searchCutoffMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum duration of a search in milliseconds. If reached, the search stops and returns results computed so far. When null, 1500 ms is used.", + "com.distilled.openapi#nullable": {} + } + }, + "localizedAttributes": { + "target": "com.meilisearch.api#SettingsUncheckedLocalizedAttributesList", + "traits": { + "smithy.api#documentation": "Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes.", + "com.distilled.openapi#nullable": {} + } + }, + "facetSearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, [facet search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters) is enabled. When false, the facet-search endpoint is disabled.", + "com.distilled.openapi#nullable": {} + } + }, + "prefixSearch": { + "target": "com.meilisearch.api#PrefixSearchSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "chat": { + "target": "com.meilisearch.api#ChatSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Index settings: every option you can configure for search and index behavior.\n\nUsed as the request body for PATCH settings. Only the fields you send are updated; pass `null` to reset a setting to its default.\n\nSee also: [Configuring index settings on the Cloud](https://www.meilisearch.com/docs/learn/configuration/configuring_index_settings)." + } + }, + "com.meilisearch.api#SettingsUncheckedDisplayedAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes)." + } + }, + "com.meilisearch.api#SettingsUncheckedSearchableAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes)." + } + }, + "com.meilisearch.api#FilterableAttributesRule": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "FilterableAttributesPatterns": { + "target": "com.meilisearch.api#FilterableAttributesPatterns" + } + }, + "traits": {} + }, + "com.meilisearch.api#FilterableAttributesPatterns": { + "type": "structure", + "members": { + "attributePatterns": { + "target": "com.meilisearch.api#FilterableAttributesPatternsAttributePatternsList", + "traits": { + "smithy.api#documentation": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"price_*\", \"stock\"]` matches `price_usd`,\n`price_eur`, and `stock`.", + "smithy.api#required": {} + } + }, + "features": { + "target": "com.meilisearch.api#FilterableAttributesFeatures", + "traits": { + "smithy.api#documentation": "The filtering and faceting features enabled for attributes matching\nthese patterns. If not specified, defaults to equality filtering\nenabled." + } + } + }, + "traits": { + "smithy.api#documentation": "Defines a set of attribute patterns with specific filtering and faceting\nfeatures. This allows fine-grained control over which operations are\nallowed on matched attributes." + } + }, + "com.meilisearch.api#FilterableAttributesPatternsAttributePatternsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"price_*\", \"stock\"]` matches `price_usd`,\n`price_eur`, and `stock`." + } + }, + "com.meilisearch.api#FilterableAttributesFeatures": { + "type": "structure", + "members": { + "facetSearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, allows searching within facet values for matching\nattributes. This enables the facet search feature which lets users\nsearch for specific facet values. Defaults to `false`." + } + }, + "filter": { + "target": "com.meilisearch.api#FilterFeatures", + "traits": { + "smithy.api#documentation": "Controls which filter operators are allowed for matching attributes.\nSee `FilterFeatures` for available options." + } + } + }, + "traits": { + "smithy.api#documentation": "Controls which filtering and faceting operations are enabled for matching\nattributes. This allows restricting certain operations on specific fields\nfor security or performance reasons." + } + }, + "com.meilisearch.api#FilterFeatures": { + "type": "structure", + "members": { + "equality": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, enables equality operators: `=`, `!=`, and `IN`. These\nallow filtering for exact matches or membership in a set of values.\nAlso enables `IS EMPTY`, `IS NULL`, and `EXISTS` operators. Defaults\nto `true`." + } + }, + "comparison": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, enables comparison operators: `<`, `>`, `<=`, `>=`, and\n`TO` (range). These allow filtering based on numeric or string\ncomparisons. Defaults to `false`." + } + } + }, + "traits": { + "smithy.api#documentation": "Controls which filter operators are allowed for an attribute. This\nprovides fine-grained control over filtering capabilities." + } + }, + "com.meilisearch.api#SettingsUncheckedFilterableAttributesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#FilterableAttributesRule" + }, + "traits": { + "smithy.api#documentation": "Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`." + } + }, + "com.meilisearch.api#SettingsUncheckedSortableAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results)." + } + }, + "com.meilisearch.api#ForeignKey": { + "type": "structure", + "members": { + "foreignIndexUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "fieldName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#SettingsUncheckedForeignKeysList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ForeignKey" + }, + "traits": { + "smithy.api#documentation": "Foreign keys to use for cross-index filtering search." + } + }, + "com.meilisearch.api#SettingsUncheckedRankingRulesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "[Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`)." + } + }, + "com.meilisearch.api#SettingsUncheckedStopWordsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Words ignored when present in search queries." + } + }, + "com.meilisearch.api#SettingsUncheckedNonSeparatorTokensList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Characters that are not treated as word separators. Removed from the default separator set." + } + }, + "com.meilisearch.api#SettingsUncheckedSeparatorTokensList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Characters that delimit words. Added on top of the default separators." + } + }, + "com.meilisearch.api#SettingsUncheckedDictionaryList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Strings Meilisearch parses as a single term. Useful for names or domain terms." + } + }, + "com.meilisearch.api#SettingsUncheckedSynonymsValueList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SettingsUncheckedSynonymsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#SettingsUncheckedSynonymsValueList" + }, + "traits": { + "smithy.api#documentation": "Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms)." + } + }, + "com.meilisearch.api#TypoSettings": { + "type": "structure", + "members": { + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, typo tolerance is enabled. When false, only exact matches are returned.", + "com.distilled.openapi#nullable": {} + } + }, + "minWordSizeForTypos": { + "target": "com.meilisearch.api#MinWordSizeTyposSetting", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "disableOnWords": { + "target": "com.meilisearch.api#TypoSettingsDisableOnWordsList", + "traits": { + "smithy.api#documentation": "Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly.", + "com.distilled.openapi#nullable": {} + } + }, + "disableOnAttributes": { + "target": "com.meilisearch.api#TypoSettingsDisableOnAttributesList", + "traits": { + "smithy.api#documentation": "Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs.", + "com.distilled.openapi#nullable": {} + } + }, + "disableOnNumbers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, typo tolerance is disabled on numeric tokens. For example, 123 will not match 132.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Typo tolerance: how spelling mistakes in queries are handled." + } + }, + "com.meilisearch.api#MinWordSizeTyposSetting": { + "type": "structure", + "members": { + "oneTypo": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Minimum word length to accept one typo. Shorter words must match exactly. For example, if set to 5, \"apple\" can have one typo but \"app\" cannot.", + "com.distilled.openapi#nullable": {} + } + }, + "twoTypos": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Minimum word length to accept two typos. Must be greater than or equal to `oneTypo`. For example, if set to 9, \"computing\" can have two typos.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Minimum word length required before typos are allowed.\n\nThis helps prevent matching very short words with typos, which can lead to irrelevant results." + } + }, + "com.meilisearch.api#TypoSettingsDisableOnWordsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly." + } + }, + "com.meilisearch.api#TypoSettingsDisableOnAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs." + } + }, + "com.meilisearch.api#FacetingSettings": { + "type": "structure", + "members": { + "maxValuesPerFacet": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of facet values returned per facet. Values are sorted in ascending lexicographical order.", + "com.distilled.openapi#nullable": {} + } + }, + "sortFacetValuesBy": { + "target": "com.meilisearch.api#FacetingSettingsSortFacetValuesByMap", + "traits": { + "smithy.api#documentation": "Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Faceting: maximum number of facet values and how they are sorted." + } + }, + "com.meilisearch.api#FacetingSettingsSortFacetValuesByMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetValuesSort" + }, + "traits": { + "smithy.api#documentation": "Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets." + } + }, + "com.meilisearch.api#PaginationSettings": { + "type": "structure", + "members": { + "maxTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of search results Meilisearch can return. Limit and offset cannot go beyond this value.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Pagination: cap on how many results a search can return." + } + }, + "com.meilisearch.api#EmbeddingSettings": { + "type": "structure", + "members": { + "source": { + "target": "com.meilisearch.api#EmbedderSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model name.\n\n- Available for `openAi`, `huggingFace`, `ollama`.\n- Mandatory for `ollama`.\n- For `openAi`/`huggingFace` optional with defaults.\n- 🏗️ Changing the value of this parameter always regenerates embeddings.", + "com.distilled.openapi#nullable": {} + } + }, + "revision": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model revision (e.g. Hugging Face commit SHA).\n\n- Only available for `huggingFace`.\n- If unset, latest is used.\n- 🏗️ Changing the value of this parameter always regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "pooling": { + "target": "com.meilisearch.api#OverridePooling", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "apiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key sent to the embedder.\n\n- If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables.\n- If not set for other sources, no bearer token is sent.\n- This setting is partially hidden when returned by the settings\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {}, + "smithy.api#sensitive": {} + } + }, + "dimensions": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of dimensions of the embedding vectors.\n\n- Available for `userProvided`, `openAi`, `ollama`, `rest`.\n- Mandatory for `userProvided`.\n- For `openAi`/`ollama`/`rest` inferred if omitted.\n- 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "binaryQuantized": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, vectors are stored as 1-bit (smaller, faster, less precise).\n\n- Available for all sources.\n- Irreversible once enabled.\n- 🏗️ When set to true, embeddings are not regenerated, but they are binary quantized, which takes time.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document.\n\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Max size in bytes of the rendered document template.\n\nLonger output is truncated.\n\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated", + "com.distilled.openapi#nullable": {} + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL of the embedder API.\n\n- Mandatory for `rest`. Optional for `openAi` and `ollama`.\n- 🌱 When modified for `openAi``, embeddings are never regenerated\n- 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated\n- If targetting URL resolving to a non-global IP (such as `localhost`), make sure that\n `--experimental-allowed-ip-networks` allows it. For details on how use this parameter,\n refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks).", + "com.distilled.openapi#nullable": {} + } + }, + "indexingFragments": { + "target": "com.meilisearch.api#EmbeddingSettingsIndexingFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "com.distilled.openapi#nullable": {} + } + }, + "searchFragments": { + "target": "com.meilisearch.api#EmbeddingSettingsSearchFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "request": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Request body template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{text}}\"` for the input.\n- Mandatory for `rest`.\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + } + }, + "response": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Response template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{embedding}}\"` where the embedding array is.\n- Mandatory for `rest`." + } + }, + "headers": { + "target": "com.meilisearch.api#EmbeddingSettingsHeadersMap", + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "searchEmbedder": { + "target": "com.meilisearch.api#SubEmbeddingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "indexingEmbedder": { + "target": "com.meilisearch.api#SubEmbeddingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "distribution": { + "target": "com.meilisearch.api#DistributionShift", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Embedder configuration for [AI-powered / hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search)." + } + }, + "com.meilisearch.api#EmbedderSource": { + "type": "enum", + "members": { + "OPENAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openAi" + } + }, + "HUGGINGFACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "huggingFace" + } + }, + "OLLAMA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ollama" + } + }, + "USERPROVIDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "userProvided" + } + }, + "REST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rest" + } + }, + "COMPOSITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "composite" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#OverridePooling": { + "type": "enum", + "members": { + "USEMODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "useModel" + } + }, + "FORCECLS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "forceCls" + } + }, + "FORCEMEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "forceMean" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#EmbeddingSettingsIndexingFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes." + } + }, + "com.meilisearch.api#EmbeddingSettingsSearchFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#EmbeddingSettingsHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#SubEmbeddingSettings": { + "type": "structure", + "members": { + "source": { + "target": "com.meilisearch.api#EmbedderSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model name.\n\n- Available for `openAi`, `huggingFace`, `ollama`.\n- Mandatory for `ollama`.\n- For `openAi`/`huggingFace` optional with defaults.\n- 🏗️ Changing the value of this parameter always regenerates embeddings.", + "com.distilled.openapi#nullable": {} + } + }, + "revision": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model revision (e.g. Hugging Face commit SHA).\n\n- Only available for `huggingFace`.\n- If unset, latest is used.\n- 🏗️ Changing the value of this parameter always regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "pooling": { + "target": "com.meilisearch.api#OverridePooling", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "apiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key sent to the embedder.\n\n- If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables.\n- If not set for other sources, no bearer token is sent.\n- This setting is partially hidden when returned by the settings\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {}, + "smithy.api#sensitive": {} + } + }, + "dimensions": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of dimensions of the embedding vectors.\n\n- Available for `userProvided`, `openAi`, `ollama`, `rest`.\n- Mandatory for `userProvided`.\n- For `openAi`/`ollama`/`rest` inferred if omitted.\n- 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document.\n\n- Only available for `indexingEmbedder`, not `searchEmbedder`.\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Max size in bytes of the rendered document template.\n\nLonger output is truncated.\n\n- Only available for `indexingEmbedder`, not `searchEmbedder`.\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated", + "com.distilled.openapi#nullable": {} + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL of the embedder API.\n\n- Mandatory for `rest`. Optional for `openAi` and `ollama`.\n- 🌱 When modified for `openAi``, embeddings are never regenerated\n- 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated\n- If targetting URL resolving to a non-global IP (such as `localhost`), make sure that\n `--experimental-allowed-ip-networks` allows it. For details on how use this parameter,\n refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks).", + "com.distilled.openapi#nullable": {} + } + }, + "indexingFragments": { + "target": "com.meilisearch.api#SubEmbeddingSettingsIndexingFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- Only available for `indexingEmbedder`, not `searchEmbedder`.\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "com.distilled.openapi#nullable": {} + } + }, + "searchFragments": { + "target": "com.meilisearch.api#SubEmbeddingSettingsSearchFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "request": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Request body template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{text}}\"` for the input.\n- Mandatory for `rest`.\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + } + }, + "response": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Response template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{embedding}}\"` where the embedding array is.\n- Mandatory for `rest`." + } + }, + "headers": { + "target": "com.meilisearch.api#SubEmbeddingSettingsHeadersMap", + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Sub-embedder config for composite embedders. Used by `indexingEmbedder` (vectorize documents at index time) and `searchEmbedder` (vectorize queries at search time). Same fields as a top-level embedder, except no `binaryQuantized`, `distribution`, `documentTemplate`/`documentTemplateMaxBytes` for searchEmbedder." + } + }, + "com.meilisearch.api#SubEmbeddingSettingsIndexingFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- Only available for `indexingEmbedder`, not `searchEmbedder`.\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes." + } + }, + "com.meilisearch.api#SubEmbeddingSettingsSearchFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#SubEmbeddingSettingsHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#DistributionShift": { + "type": "structure", + "members": { + "current_mean": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Value where the results are \"packed\".\n\nSimilarity scores are translated so that they are packed around 0.5 instead", + "smithy.api#required": {} + } + }, + "current_sigma": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "standard deviation of a similarity score.\n\nSet below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Describes the mean and sigma of distribution of embedding similarity in the embedding space.\n\nThe intended use is to make the similarity score more comparable to the regular ranking score.\nThis allows to correct effects where results are too \"packed\" around a certain value." + } + }, + "com.meilisearch.api#SettingsUncheckedEmbeddersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#EmbeddingSettings" + }, + "traits": { + "smithy.api#documentation": "[Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.)." + } + }, + "com.meilisearch.api#LocalizedAttributesRuleView": { + "type": "structure", + "members": { + "attributePatterns": { + "target": "com.meilisearch.api#LocalizedAttributesRuleViewAttributePatternsList", + "traits": { + "smithy.api#documentation": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"title_*\", \"description\"]` matches\n`title_en`, `title_fr`, and `description`.", + "smithy.api#required": {} + } + }, + "locales": { + "target": "com.meilisearch.api#LocalizedAttributesRuleViewLocalesList", + "traits": { + "smithy.api#documentation": "The list of locales (languages) to apply to matching attributes. When\nthese attributes are indexed, Meilisearch will use language-specific\ntokenization rules. Examples: `[\"en\", \"fr\"]` or `[\"jpn\", \"zho\"]`.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Defines a rule for associating specific locales (languages) with\nattributes. This allows Meilisearch to use language-specific tokenization\nand processing for matched attributes, improving search quality for\nmultilingual content." + } + }, + "com.meilisearch.api#LocalizedAttributesRuleViewAttributePatternsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Patterns to match attribute names. Use `*` as a wildcard to match any\ncharacters. For example, `[\"title_*\", \"description\"]` matches\n`title_en`, `title_fr`, and `description`." + } + }, + "com.meilisearch.api#LocalizedAttributesRuleViewLocalesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Locale" + }, + "traits": { + "smithy.api#documentation": "The list of locales (languages) to apply to matching attributes. When\nthese attributes are indexed, Meilisearch will use language-specific\ntokenization rules. Examples: `[\"en\", \"fr\"]` or `[\"jpn\", \"zho\"]`." + } + }, + "com.meilisearch.api#SettingsUncheckedLocalizedAttributesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#LocalizedAttributesRuleView" + }, + "traits": { + "smithy.api#documentation": "Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes." + } + }, + "com.meilisearch.api#PrefixSearchSettings": { + "type": "enum", + "members": { + "INDEXINGTIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexingTime" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#ChatSettings": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Index description shown to the LLM so it can decide when and how to query this index.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Liquid template that defines the text sent to the LLM for each document.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum size in bytes of the rendered document template. Longer text is truncated.", + "com.distilled.openapi#nullable": {} + } + }, + "searchParameters": { + "target": "com.meilisearch.api#ChatSearchParams", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "[Chat (conversation)](https://www.meilisearch.com/docs/learn/chat/getting_started_with_chat) settings: how the index is described to the LLM and how it is queried." + } + }, + "com.meilisearch.api#ChatSearchParams": { + "type": "structure", + "members": { + "hybrid": { + "target": "com.meilisearch.api#HybridQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned per search performed by the LLM.", + "com.distilled.openapi#nullable": {} + } + }, + "sort": { + "target": "com.meilisearch.api#ChatSearchParamsSortList", + "traits": { + "smithy.api#documentation": "Sort order: array of strings like `attribute:asc` or `attribute:desc`.", + "com.distilled.openapi#nullable": {} + } + }, + "distinct": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Attribute used to return at most one document per distinct value.", + "com.distilled.openapi#nullable": {} + } + }, + "matchingStrategy": { + "target": "com.meilisearch.api#MatchingStrategy", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "attributesToSearchOn": { + "target": "com.meilisearch.api#ChatSearchParamsAttributesToSearchOnList", + "traits": { + "smithy.api#documentation": "Attributes on which to run the search. If unset, all searchable attributes are used.", + "com.distilled.openapi#nullable": {} + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Search parameters applied when the LLM queries this index." + } + }, + "com.meilisearch.api#ChatSearchParamsSortList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Sort order: array of strings like `attribute:asc` or `attribute:desc`." + } + }, + "com.meilisearch.api#ChatSearchParamsAttributesToSearchOnList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes on which to run the search. If unset, all searchable attributes are used." + } + }, + "com.meilisearch.api#GetAll": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetAllRequest" + }, + "output": { + "target": "com.meilisearch.api#SettingsUnchecked" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "List all settings\n\nReturns all settings of the index. Each setting is returned with its current value or the default if not set." + } + }, + "com.meilisearch.api#UpdateAllRequestDisplayedAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes)." + } + }, + "com.meilisearch.api#UpdateAllRequestSearchableAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes)." + } + }, + "com.meilisearch.api#UpdateAllRequestFilterableAttributesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#FilterableAttributesRule" + }, + "traits": { + "smithy.api#documentation": "Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`." + } + }, + "com.meilisearch.api#UpdateAllRequestSortableAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results)." + } + }, + "com.meilisearch.api#UpdateAllRequestForeignKeysList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ForeignKey" + }, + "traits": { + "smithy.api#documentation": "Foreign keys to use for cross-index filtering search." + } + }, + "com.meilisearch.api#UpdateAllRequestRankingRulesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "[Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`)." + } + }, + "com.meilisearch.api#UpdateAllRequestStopWordsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Words ignored when present in search queries." + } + }, + "com.meilisearch.api#UpdateAllRequestNonSeparatorTokensList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Characters that are not treated as word separators. Removed from the default separator set." + } + }, + "com.meilisearch.api#UpdateAllRequestSeparatorTokensList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Characters that delimit words. Added on top of the default separators." + } + }, + "com.meilisearch.api#UpdateAllRequestDictionaryList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Strings Meilisearch parses as a single term. Useful for names or domain terms." + } + }, + "com.meilisearch.api#UpdateAllRequestSynonymsValueList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#UpdateAllRequestSynonymsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#UpdateAllRequestSynonymsValueList" + }, + "traits": { + "smithy.api#documentation": "Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms)." + } + }, + "com.meilisearch.api#UpdateAllRequestEmbeddersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#EmbeddingSettings" + }, + "traits": { + "smithy.api#documentation": "[Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.)." + } + }, + "com.meilisearch.api#UpdateAllRequestLocalizedAttributesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#LocalizedAttributesRuleView" + }, + "traits": { + "smithy.api#documentation": "Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes." + } + }, + "com.meilisearch.api#UpdateAllRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "displayedAttributes": { + "target": "com.meilisearch.api#UpdateAllRequestDisplayedAttributesList", + "traits": { + "smithy.api#documentation": "Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes).", + "com.distilled.openapi#nullable": {} + } + }, + "searchableAttributes": { + "target": "com.meilisearch.api#UpdateAllRequestSearchableAttributesList", + "traits": { + "smithy.api#documentation": "Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes).", + "com.distilled.openapi#nullable": {} + } + }, + "filterableAttributes": { + "target": "com.meilisearch.api#UpdateAllRequestFilterableAttributesList", + "traits": { + "smithy.api#documentation": "Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`.", + "com.distilled.openapi#nullable": {} + } + }, + "sortableAttributes": { + "target": "com.meilisearch.api#UpdateAllRequestSortableAttributesList", + "traits": { + "smithy.api#documentation": "Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results).", + "com.distilled.openapi#nullable": {} + } + }, + "foreignKeys": { + "target": "com.meilisearch.api#UpdateAllRequestForeignKeysList", + "traits": { + "smithy.api#documentation": "Foreign keys to use for cross-index filtering search.", + "com.distilled.openapi#nullable": {} + } + }, + "rankingRules": { + "target": "com.meilisearch.api#UpdateAllRequestRankingRulesList", + "traits": { + "smithy.api#documentation": "[Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`).", + "com.distilled.openapi#nullable": {} + } + }, + "stopWords": { + "target": "com.meilisearch.api#UpdateAllRequestStopWordsList", + "traits": { + "smithy.api#documentation": "Words ignored when present in search queries.", + "com.distilled.openapi#nullable": {} + } + }, + "nonSeparatorTokens": { + "target": "com.meilisearch.api#UpdateAllRequestNonSeparatorTokensList", + "traits": { + "smithy.api#documentation": "Characters that are not treated as word separators. Removed from the default separator set.", + "com.distilled.openapi#nullable": {} + } + }, + "separatorTokens": { + "target": "com.meilisearch.api#UpdateAllRequestSeparatorTokensList", + "traits": { + "smithy.api#documentation": "Characters that delimit words. Added on top of the default separators.", + "com.distilled.openapi#nullable": {} + } + }, + "dictionary": { + "target": "com.meilisearch.api#UpdateAllRequestDictionaryList", + "traits": { + "smithy.api#documentation": "Strings Meilisearch parses as a single term. Useful for names or domain terms.", + "com.distilled.openapi#nullable": {} + } + }, + "synonyms": { + "target": "com.meilisearch.api#UpdateAllRequestSynonymsMap", + "traits": { + "smithy.api#documentation": "Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms).", + "com.distilled.openapi#nullable": {} + } + }, + "distinctAttribute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Field whose value must be unique in the returned documents. One document per distinct value. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute).", + "com.distilled.openapi#nullable": {} + } + }, + "proximityPrecision": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Precision for the proximity ranking rule and phrase search: `byWord` (exact distance) or `byAttribute` (same attribute).", + "com.distilled.openapi#nullable": {} + } + }, + "typoTolerance": { + "target": "com.meilisearch.api#TypoSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "faceting": { + "target": "com.meilisearch.api#FacetingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pagination": { + "target": "com.meilisearch.api#PaginationSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedders": { + "target": "com.meilisearch.api#UpdateAllRequestEmbeddersMap", + "traits": { + "smithy.api#documentation": "[Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.).", + "com.distilled.openapi#nullable": {} + } + }, + "searchCutoffMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum duration of a search in milliseconds. If reached, the search stops and returns results computed so far. When null, 1500 ms is used.", + "com.distilled.openapi#nullable": {} + } + }, + "localizedAttributes": { + "target": "com.meilisearch.api#UpdateAllRequestLocalizedAttributesList", + "traits": { + "smithy.api#documentation": "Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes.", + "com.distilled.openapi#nullable": {} + } + }, + "facetSearch": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, [facet search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters) is enabled. When false, the facet-search endpoint is disabled.", + "com.distilled.openapi#nullable": {} + } + }, + "prefixSearch": { + "target": "com.meilisearch.api#PrefixSearchSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "chat": { + "target": "com.meilisearch.api#ChatSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#UpdateAll": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#UpdateAllRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "Update all settings\n\nUpdates one or more settings for the index. Only the fields sent in the body are changed. Pass null for a setting to reset it to its default. If the index does not exist, it is created.\n\nSee also: [Configuring index settings on the Cloud](https://www.meilisearch.com/docs/learn/configuration/configuring_index_settings)." + } + }, + "com.meilisearch.api#DeleteAllRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteAll": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteAllRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings", + "code": 200 + }, + "smithy.api#documentation": "Reset all settings\n\nResets all settings of the index to their default values." + } + }, + "com.meilisearch.api#GetchatRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Getchat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetchatRequest" + }, + "output": { + "target": "com.meilisearch.api#ChatSettings" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/chat", + "code": 200 + }, + "smithy.api#documentation": "Get chat\n\nReturns the current value of the `chat` setting for the index." + } + }, + "com.meilisearch.api#PatchchatRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Index description shown to the LLM so it can decide when and how to query this index.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Liquid template that defines the text sent to the LLM for each document.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum size in bytes of the rendered document template. Longer text is truncated.", + "com.distilled.openapi#nullable": {} + } + }, + "searchParameters": { + "target": "com.meilisearch.api#ChatSearchParams", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Patchchat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchchatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings/chat", + "code": 200 + }, + "smithy.api#documentation": "Update chat\n\nUpdates the `chat` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletechatRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deletechat": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletechatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/chat", + "code": 200 + }, + "smithy.api#documentation": "Reset chat\n\nResets the `chat` setting to its default value." + } + }, + "com.meilisearch.api#GetdictionaryRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetdictionaryResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetdictionaryResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetdictionaryResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#Getdictionary": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetdictionaryRequest" + }, + "output": { + "target": "com.meilisearch.api#GetdictionaryResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/dictionary", + "code": 200 + }, + "smithy.api#documentation": "Get dictionary\n\nReturns the current value of the `dictionary` setting for the index." + } + }, + "com.meilisearch.api#PutdictionaryRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutdictionaryRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutdictionaryRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Putdictionary": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutdictionaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/dictionary", + "code": 200 + }, + "smithy.api#documentation": "Update dictionary\n\nUpdates the `dictionary` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletedictionaryRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deletedictionary": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletedictionaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/dictionary", + "code": 200 + }, + "smithy.api#documentation": "Reset dictionary\n\nResets the `dictionary` setting to its default value." + } + }, + "com.meilisearch.api#GetdisplayedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetdisplayedAttributesResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetdisplayedAttributesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetdisplayedAttributesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetdisplayedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetdisplayedAttributesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetdisplayedAttributesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/displayed-attributes", + "code": 200 + }, + "smithy.api#documentation": "Get displayedAttributes\n\nReturns the current value of the `displayedAttributes` setting for the index." + } + }, + "com.meilisearch.api#PutdisplayedAttributesRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutdisplayedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutdisplayedAttributesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutdisplayedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutdisplayedAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/displayed-attributes", + "code": 200 + }, + "smithy.api#documentation": "Update displayedAttributes\n\nUpdates the `displayedAttributes` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletedisplayedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletedisplayedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletedisplayedAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/displayed-attributes", + "code": 200 + }, + "smithy.api#documentation": "Reset displayedAttributes\n\nResets the `displayedAttributes` setting to its default value." + } + }, + "com.meilisearch.api#GetdistinctAttributeRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetdistinctAttributeResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetdistinctAttribute": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetdistinctAttributeRequest" + }, + "output": { + "target": "com.meilisearch.api#GetdistinctAttributeResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/distinct-attribute", + "code": 200 + }, + "smithy.api#documentation": "Get distinctAttribute\n\nReturns the current value of the `distinctAttribute` setting for the index." + } + }, + "com.meilisearch.api#PutdistinctAttributeRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutdistinctAttribute": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutdistinctAttributeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/distinct-attribute", + "code": 200 + }, + "smithy.api#documentation": "Update distinctAttribute\n\nUpdates the `distinctAttribute` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletedistinctAttributeRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletedistinctAttribute": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletedistinctAttributeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/distinct-attribute", + "code": 200 + }, + "smithy.api#documentation": "Reset distinctAttribute\n\nResets the `distinctAttribute` setting to its default value." + } + }, + "com.meilisearch.api#GetembeddersRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SettingEmbeddingSettings": { + "type": "structure", + "members": { + "inner": { + "target": "com.meilisearch.api#SettingEmbeddingSettingsInner", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for one [embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and hybrid search.\n\nSet `source` (`openAi`, `huggingFace`, `ollama`, `rest`, `userProvided`), then the options that apply: `model`, `apiKey`, `documentTemplate`, `dimensions`, `url`, etc." + } + }, + "com.meilisearch.api#SettingEmbeddingSettingsInnerIndexingFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes." + } + }, + "com.meilisearch.api#SettingEmbeddingSettingsInnerSearchFragmentsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#SettingEmbeddingSettingsInnerHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings" + } + }, + "com.meilisearch.api#SettingEmbeddingSettingsInner": { + "type": "structure", + "members": { + "source": { + "target": "com.meilisearch.api#EmbedderSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model name.\n\n- Available for `openAi`, `huggingFace`, `ollama`.\n- Mandatory for `ollama`.\n- For `openAi`/`huggingFace` optional with defaults.\n- 🏗️ Changing the value of this parameter always regenerates embeddings.", + "com.distilled.openapi#nullable": {} + } + }, + "revision": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Model revision (e.g. Hugging Face commit SHA).\n\n- Only available for `huggingFace`.\n- If unset, latest is used.\n- 🏗️ Changing the value of this parameter always regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "pooling": { + "target": "com.meilisearch.api#OverridePooling", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "apiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key sent to the embedder.\n\n- If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables.\n- If not set for other sources, no bearer token is sent.\n- This setting is partially hidden when returned by the settings\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {}, + "smithy.api#sensitive": {} + } + }, + "dimensions": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of dimensions of the embedding vectors.\n\n- Available for `userProvided`, `openAi`, `ollama`, `rest`.\n- Mandatory for `userProvided`.\n- For `openAi`/`ollama`/`rest` inferred if omitted.\n- 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings\n- 🌱 For other sources, changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "binaryQuantized": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, vectors are stored as 1-bit (smaller, faster, less precise).\n\n- Available for all sources.\n- Irreversible once enabled.\n- 🏗️ When set to true, embeddings are not regenerated, but they are binary quantized, which takes time.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "[Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document.\n\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text.", + "com.distilled.openapi#nullable": {} + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Max size in bytes of the rendered document template.\n\nLonger output is truncated.\n\n- Available for `openAi`, `huggingFace`, `ollama`, `rest`.\n- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.\n- 🌱 When decreased, embeddings are never regenerated", + "com.distilled.openapi#nullable": {} + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL of the embedder API.\n\n- Mandatory for `rest`. Optional for `openAi` and `ollama`.\n- 🌱 When modified for `openAi``, embeddings are never regenerated\n- 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated\n- If targetting URL resolving to a non-global IP (such as `localhost`), make sure that\n `--experimental-allowed-ip-networks` allows it. For details on how use this parameter,\n refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks).", + "com.distilled.openapi#nullable": {} + } + }, + "indexingFragments": { + "target": "com.meilisearch.api#SettingEmbeddingSettingsInnerIndexingFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time.\n\nFor `rest` with multimodal; key is fragment name, value the payload.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents.\n- 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes.", + "com.distilled.openapi#nullable": {} + } + }, + "searchFragments": { + "target": "com.meilisearch.api#SettingEmbeddingSettingsInnerSearchFragmentsMap", + "traits": { + "smithy.api#documentation": "Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time.\n\nFor `rest` with multimodal.\n\nSee also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings)\n\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "request": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Request body template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{text}}\"` for the input.\n- Mandatory for `rest`.\n- 🏗️ Changing the value of this parameter always regenerates embeddings" + } + }, + "response": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Response template for `rest` embedder.\n\nSee also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder)\n\n- Use `\"{{embedding}}\"` where the embedding array is.\n- Mandatory for `rest`." + } + }, + "headers": { + "target": "com.meilisearch.api#SettingEmbeddingSettingsInnerHeadersMap", + "traits": { + "smithy.api#documentation": "Extra HTTP headers sent to the embedder.\n\n- Available for `rest`.\n- 🌱 Changing the value of this parameter never regenerates embeddings", + "com.distilled.openapi#nullable": {} + } + }, + "searchEmbedder": { + "target": "com.meilisearch.api#SubEmbeddingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "indexingEmbedder": { + "target": "com.meilisearch.api#SubEmbeddingSettings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "distribution": { + "target": "com.meilisearch.api#DistributionShift", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Embedder configuration for [AI-powered / hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search)." + } + }, + "com.meilisearch.api#GetembeddersResponseBodyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#SettingEmbeddingSettings" + }, + "traits": {} + }, + "com.meilisearch.api#GetembeddersResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetembeddersResponseBodyMap", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#Getembedders": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetembeddersRequest" + }, + "output": { + "target": "com.meilisearch.api#GetembeddersResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/embedders", + "code": 200 + }, + "smithy.api#documentation": "Get embedders\n\nReturns the current value of the `embedders` setting for the index." + } + }, + "com.meilisearch.api#PatchembeddersRequestBodyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#SettingEmbeddingSettings" + }, + "traits": {} + }, + "com.meilisearch.api#PatchembeddersRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PatchembeddersRequestBodyMap", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Patchembedders": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchembeddersRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings/embedders", + "code": 200 + }, + "smithy.api#documentation": "Update embedders\n\nUpdates the `embedders` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleteembeddersRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deleteembedders": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteembeddersRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/embedders", + "code": 200 + }, + "smithy.api#documentation": "Reset embedders\n\nResets the `embedders` setting to its default value." + } + }, + "com.meilisearch.api#GetfacetSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetfacetSearchResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetfacetSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetfacetSearchRequest" + }, + "output": { + "target": "com.meilisearch.api#GetfacetSearchResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/facet-search", + "code": 200 + }, + "smithy.api#documentation": "Get facetSearch\n\nReturns the current value of the `facetSearch` setting for the index." + } + }, + "com.meilisearch.api#PutfacetSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutfacetSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutfacetSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/facet-search", + "code": 200 + }, + "smithy.api#documentation": "Update facetSearch\n\nUpdates the `facetSearch` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletefacetSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletefacetSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletefacetSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/facet-search", + "code": 200 + }, + "smithy.api#documentation": "Reset facetSearch\n\nResets the `facetSearch` setting to its default value." + } + }, + "com.meilisearch.api#GetfacetingRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Getfaceting": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetfacetingRequest" + }, + "output": { + "target": "com.meilisearch.api#FacetingSettings" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/faceting", + "code": 200 + }, + "smithy.api#documentation": "Get faceting\n\nReturns the current value of the `faceting` setting for the index." + } + }, + "com.meilisearch.api#PatchfacetingRequestSortFacetValuesByMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetValuesSort" + }, + "traits": { + "smithy.api#documentation": "Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets." + } + }, + "com.meilisearch.api#PatchfacetingRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "maxValuesPerFacet": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of facet values returned per facet. Values are sorted in ascending lexicographical order.", + "com.distilled.openapi#nullable": {} + } + }, + "sortFacetValuesBy": { + "target": "com.meilisearch.api#PatchfacetingRequestSortFacetValuesByMap", + "traits": { + "smithy.api#documentation": "Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Patchfaceting": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchfacetingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings/faceting", + "code": 200 + }, + "smithy.api#documentation": "Update faceting\n\nUpdates the `faceting` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletefacetingRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deletefaceting": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletefacetingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/faceting", + "code": 200 + }, + "smithy.api#documentation": "Reset faceting\n\nResets the `faceting` setting to its default value." + } + }, + "com.meilisearch.api#GetfilterableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetfilterableAttributesResponseBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#FilterableAttributesRule" + }, + "traits": {} + }, + "com.meilisearch.api#GetfilterableAttributesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetfilterableAttributesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetfilterableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetfilterableAttributesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetfilterableAttributesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/filterable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Get filterableAttributes\n\nReturns the current value of the `filterableAttributes` setting for the index." + } + }, + "com.meilisearch.api#PutfilterableAttributesRequestBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#FilterableAttributesRule" + }, + "traits": {} + }, + "com.meilisearch.api#PutfilterableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutfilterableAttributesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutfilterableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutfilterableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/filterable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Update filterableAttributes\n\nUpdates the `filterableAttributes` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletefilterableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletefilterableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletefilterableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/filterable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Reset filterableAttributes\n\nResets the `filterableAttributes` setting to its default value." + } + }, + "com.meilisearch.api#GetforeignKeysRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetforeignKeysResponseBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ForeignKey" + }, + "traits": {} + }, + "com.meilisearch.api#GetforeignKeysResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetforeignKeysResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetforeignKeys": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetforeignKeysRequest" + }, + "output": { + "target": "com.meilisearch.api#GetforeignKeysResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/foreign-keys", + "code": 200 + }, + "smithy.api#documentation": "Get foreignKeys\n\nReturns the current value of the `foreignKeys` setting for the index." + } + }, + "com.meilisearch.api#PutforeignKeysRequestBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#ForeignKey" + }, + "traits": {} + }, + "com.meilisearch.api#PutforeignKeysRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutforeignKeysRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutforeignKeys": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutforeignKeysRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/foreign-keys", + "code": 200 + }, + "smithy.api#documentation": "Update foreignKeys\n\nUpdates the `foreignKeys` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleteforeignKeysRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteforeignKeys": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteforeignKeysRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/foreign-keys", + "code": 200 + }, + "smithy.api#documentation": "Reset foreignKeys\n\nResets the `foreignKeys` setting to its default value." + } + }, + "com.meilisearch.api#GetlocalizedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetlocalizedAttributesResponseBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#LocalizedAttributesRuleView" + }, + "traits": {} + }, + "com.meilisearch.api#GetlocalizedAttributesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetlocalizedAttributesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetlocalizedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetlocalizedAttributesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetlocalizedAttributesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/localized-attributes", + "code": 200 + }, + "smithy.api#documentation": "Get localizedAttributes\n\nReturns the current value of the `localizedAttributes` setting for the index." + } + }, + "com.meilisearch.api#PutlocalizedAttributesRequestBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#LocalizedAttributesRuleView" + }, + "traits": {} + }, + "com.meilisearch.api#PutlocalizedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutlocalizedAttributesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutlocalizedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutlocalizedAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/localized-attributes", + "code": 200 + }, + "smithy.api#documentation": "Update localizedAttributes\n\nUpdates the `localizedAttributes` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletelocalizedAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletelocalizedAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletelocalizedAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/localized-attributes", + "code": 200 + }, + "smithy.api#documentation": "Reset localizedAttributes\n\nResets the `localizedAttributes` setting to its default value." + } + }, + "com.meilisearch.api#GetnonSeparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetnonSeparatorTokensResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetnonSeparatorTokensResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetnonSeparatorTokensResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetnonSeparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetnonSeparatorTokensRequest" + }, + "output": { + "target": "com.meilisearch.api#GetnonSeparatorTokensResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/non-separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Get nonSeparatorTokens\n\nReturns the current value of the `nonSeparatorTokens` setting for the index." + } + }, + "com.meilisearch.api#PutnonSeparatorTokensRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutnonSeparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutnonSeparatorTokensRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutnonSeparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutnonSeparatorTokensRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/non-separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Update nonSeparatorTokens\n\nUpdates the `nonSeparatorTokens` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletenonSeparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletenonSeparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletenonSeparatorTokensRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/non-separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Reset nonSeparatorTokens\n\nResets the `nonSeparatorTokens` setting to its default value." + } + }, + "com.meilisearch.api#GetpaginationRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Getpagination": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetpaginationRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationSettings" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/pagination", + "code": 200 + }, + "smithy.api#documentation": "Get pagination\n\nReturns the current value of the `pagination` setting for the index." + } + }, + "com.meilisearch.api#PatchpaginationRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "maxTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of search results Meilisearch can return. Limit and offset cannot go beyond this value.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Patchpagination": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchpaginationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings/pagination", + "code": 200 + }, + "smithy.api#documentation": "Update pagination\n\nUpdates the `pagination` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletepaginationRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deletepagination": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletepaginationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/pagination", + "code": 200 + }, + "smithy.api#documentation": "Reset pagination\n\nResets the `pagination` setting to its default value." + } + }, + "com.meilisearch.api#GetprefixSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetprefixSearchResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#PrefixSearchSettings", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetprefixSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetprefixSearchRequest" + }, + "output": { + "target": "com.meilisearch.api#GetprefixSearchResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/prefix-search", + "code": 200 + }, + "smithy.api#documentation": "Get prefixSearch\n\nReturns the current value of the `prefixSearch` setting for the index." + } + }, + "com.meilisearch.api#PutprefixSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PrefixSearchSettings", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutprefixSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutprefixSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/prefix-search", + "code": 200 + }, + "smithy.api#documentation": "Update prefixSearch\n\nUpdates the `prefixSearch` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleteprefixSearchRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteprefixSearch": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteprefixSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/prefix-search", + "code": 200 + }, + "smithy.api#documentation": "Reset prefixSearch\n\nResets the `prefixSearch` setting to its default value." + } + }, + "com.meilisearch.api#GetproximityPrecisionRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#ProximityPrecisionView": { + "type": "enum", + "members": { + "BYWORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "byWord" + } + }, + "BYATTRIBUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "byAttribute" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#GetproximityPrecisionResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#ProximityPrecisionView", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetproximityPrecision": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetproximityPrecisionRequest" + }, + "output": { + "target": "com.meilisearch.api#GetproximityPrecisionResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/proximity-precision", + "code": 200 + }, + "smithy.api#documentation": "Get proximityPrecision\n\nReturns the current value of the `proximityPrecision` setting for the index." + } + }, + "com.meilisearch.api#PutproximityPrecisionRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#ProximityPrecisionView", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutproximityPrecision": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutproximityPrecisionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/proximity-precision", + "code": 200 + }, + "smithy.api#documentation": "Update proximityPrecision\n\nUpdates the `proximityPrecision` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleteproximityPrecisionRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteproximityPrecision": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteproximityPrecisionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/proximity-precision", + "code": 200 + }, + "smithy.api#documentation": "Reset proximityPrecision\n\nResets the `proximityPrecision` setting to its default value." + } + }, + "com.meilisearch.api#GetrankingRulesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#RankingRuleView": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#RankingRuleViewCase0" + }, + "Case1": { + "target": "com.meilisearch.api#RankingRuleViewCase1" + }, + "Case2": { + "target": "com.meilisearch.api#RankingRuleViewCase2" + }, + "Case3": { + "target": "com.meilisearch.api#RankingRuleViewCase3" + }, + "Case4": { + "target": "com.meilisearch.api#RankingRuleViewCase4" + }, + "Case5": { + "target": "com.meilisearch.api#RankingRuleViewCase5" + }, + "Case6": { + "target": "com.meilisearch.api#RankingRuleViewCase6" + }, + "Case7": { + "target": "com.meilisearch.api#RankingRuleViewCase7" + }, + "Case8": { + "target": "com.meilisearch.api#RankingRuleViewCase8" + }, + "Case9": { + "target": "com.meilisearch.api#RankingRuleViewCase9" + } + }, + "traits": {} + }, + "com.meilisearch.api#RankingRuleViewCase0": { + "type": "enum", + "members": { + "WORDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "words" + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by decreasing number of matched query terms." + } + }, + "com.meilisearch.api#RankingRuleViewCase1": { + "type": "enum", + "members": { + "TYPO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "typo" + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by increasing number of typos." + } + }, + "com.meilisearch.api#RankingRuleViewCase2": { + "type": "enum", + "members": { + "PROXIMITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "proximity" + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by increasing distance between matched query terms." + } + }, + "com.meilisearch.api#RankingRuleViewCase3": { + "type": "enum", + "members": { + "ATTRIBUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "attribute" + } + } + }, + "traits": { + "smithy.api#documentation": "Documents with query words contained in more important\nattributes and at a closer-to-the-front position in it\nare considered better." + } + }, + "com.meilisearch.api#RankingRuleViewCase4": { + "type": "enum", + "members": { + "ATTRIBUTERANK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "attributeRank" + } + } + }, + "traits": { + "smithy.api#documentation": "Documents with query words contained in more important\nattributes are considered better. Position of the\nquery words in an attribute is not considered." + } + }, + "com.meilisearch.api#RankingRuleViewCase5": { + "type": "enum", + "members": { + "WORDPOSITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wordPosition" + } + } + }, + "traits": { + "smithy.api#documentation": "Documents with query words that are closer to the front\nof an attribute are considered better. Attribute rank\nis not considered." + } + }, + "com.meilisearch.api#RankingRuleViewCase6": { + "type": "enum", + "members": { + "SORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sort" + } + } + }, + "traits": { + "smithy.api#documentation": "Dynamically sort at query time the documents. None, one or multiple\nAsc/Desc sortable attributes can be used in place of this criterion at\nquery time." + } + }, + "com.meilisearch.api#RankingRuleViewCase7": { + "type": "enum", + "members": { + "EXACTNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exactness" + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by the similarity of the matched words with the query words." + } + }, + "com.meilisearch.api#RankingRuleViewCase8": { + "type": "structure", + "members": { + "asc": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Sorted by the increasing value of the field specified.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by the increasing value of the field specified." + } + }, + "com.meilisearch.api#RankingRuleViewCase9": { + "type": "structure", + "members": { + "desc": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Sorted by the decreasing value of the field specified.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Sorted by the decreasing value of the field specified." + } + }, + "com.meilisearch.api#GetrankingRulesResponseBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#RankingRuleView" + }, + "traits": {} + }, + "com.meilisearch.api#GetrankingRulesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetrankingRulesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetrankingRules": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetrankingRulesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetrankingRulesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/ranking-rules", + "code": 200 + }, + "smithy.api#documentation": "Get rankingRules\n\nReturns the current value of the `rankingRules` setting for the index." + } + }, + "com.meilisearch.api#PutrankingRulesRequestBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#RankingRuleView" + }, + "traits": {} + }, + "com.meilisearch.api#PutrankingRulesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutrankingRulesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutrankingRules": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutrankingRulesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/ranking-rules", + "code": 200 + }, + "smithy.api#documentation": "Update rankingRules\n\nUpdates the `rankingRules` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleterankingRulesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleterankingRules": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleterankingRulesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/ranking-rules", + "code": 200 + }, + "smithy.api#documentation": "Reset rankingRules\n\nResets the `rankingRules` setting to its default value." + } + }, + "com.meilisearch.api#GetsearchCutoffMsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetsearchCutoffMsResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetsearchCutoffMs": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetsearchCutoffMsRequest" + }, + "output": { + "target": "com.meilisearch.api#GetsearchCutoffMsResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/search-cutoff-ms", + "code": 200 + }, + "smithy.api#documentation": "Get searchCutoffMs\n\nReturns the current value of the `searchCutoffMs` setting for the index." + } + }, + "com.meilisearch.api#PutsearchCutoffMsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutsearchCutoffMs": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutsearchCutoffMsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/search-cutoff-ms", + "code": 200 + }, + "smithy.api#documentation": "Update searchCutoffMs\n\nUpdates the `searchCutoffMs` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletesearchCutoffMsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletesearchCutoffMs": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletesearchCutoffMsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/search-cutoff-ms", + "code": 200 + }, + "smithy.api#documentation": "Reset searchCutoffMs\n\nResets the `searchCutoffMs` setting to its default value." + } + }, + "com.meilisearch.api#GetsearchableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetsearchableAttributesResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetsearchableAttributesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetsearchableAttributesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetsearchableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetsearchableAttributesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetsearchableAttributesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/searchable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Get searchableAttributes\n\nReturns the current value of the `searchableAttributes` setting for the index." + } + }, + "com.meilisearch.api#PutsearchableAttributesRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutsearchableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutsearchableAttributesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutsearchableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutsearchableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/searchable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Update searchableAttributes\n\nUpdates the `searchableAttributes` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletesearchableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletesearchableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletesearchableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/searchable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Reset searchableAttributes\n\nResets the `searchableAttributes` setting to its default value." + } + }, + "com.meilisearch.api#GetseparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetseparatorTokensResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetseparatorTokensResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetseparatorTokensResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetseparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetseparatorTokensRequest" + }, + "output": { + "target": "com.meilisearch.api#GetseparatorTokensResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Get separatorTokens\n\nReturns the current value of the `separatorTokens` setting for the index." + } + }, + "com.meilisearch.api#PutseparatorTokensRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutseparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutseparatorTokensRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutseparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutseparatorTokensRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Update separatorTokens\n\nUpdates the `separatorTokens` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeleteseparatorTokensRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteseparatorTokens": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteseparatorTokensRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/separator-tokens", + "code": 200 + }, + "smithy.api#documentation": "Reset separatorTokens\n\nResets the `separatorTokens` setting to its default value." + } + }, + "com.meilisearch.api#GetsortableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetsortableAttributesResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetsortableAttributesResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetsortableAttributesResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetsortableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetsortableAttributesRequest" + }, + "output": { + "target": "com.meilisearch.api#GetsortableAttributesResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/sortable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Get sortableAttributes\n\nReturns the current value of the `sortableAttributes` setting for the index." + } + }, + "com.meilisearch.api#PutsortableAttributesRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutsortableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutsortableAttributesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutsortableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutsortableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/sortable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Update sortableAttributes\n\nUpdates the `sortableAttributes` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletesortableAttributesRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletesortableAttributes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletesortableAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/sortable-attributes", + "code": 200 + }, + "smithy.api#documentation": "Reset sortableAttributes\n\nResets the `sortableAttributes` setting to its default value." + } + }, + "com.meilisearch.api#GetstopWordsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetstopWordsResponseBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetstopWordsResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetstopWordsResponseBodyList", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetstopWords": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetstopWordsRequest" + }, + "output": { + "target": "com.meilisearch.api#GetstopWordsResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/stop-words", + "code": 200 + }, + "smithy.api#documentation": "Get stopWords\n\nReturns the current value of the `stopWords` setting for the index." + } + }, + "com.meilisearch.api#PutstopWordsRequestBodyList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutstopWordsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutstopWordsRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PutstopWords": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutstopWordsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/stop-words", + "code": 200 + }, + "smithy.api#documentation": "Update stopWords\n\nUpdates the `stopWords` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletestopWordsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletestopWords": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletestopWordsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/stop-words", + "code": 200 + }, + "smithy.api#documentation": "Reset stopWords\n\nResets the `stopWords` setting to its default value." + } + }, + "com.meilisearch.api#GetsynonymsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetsynonymsResponseBodyValueList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetsynonymsResponseBodyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#GetsynonymsResponseBodyValueList" + }, + "traits": {} + }, + "com.meilisearch.api#GetsynonymsResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#GetsynonymsResponseBodyMap", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#Getsynonyms": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetsynonymsRequest" + }, + "output": { + "target": "com.meilisearch.api#GetsynonymsResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/synonyms", + "code": 200 + }, + "smithy.api#documentation": "Get synonyms\n\nReturns the current value of the `synonyms` setting for the index." + } + }, + "com.meilisearch.api#PutsynonymsRequestBodyValueList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#PutsynonymsRequestBodyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#PutsynonymsRequestBodyValueList" + }, + "traits": {} + }, + "com.meilisearch.api#PutsynonymsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "body": { + "target": "com.meilisearch.api#PutsynonymsRequestBodyMap", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Putsynonyms": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PutsynonymsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/indexes/{index_uid}/settings/synonyms", + "code": 200 + }, + "smithy.api#documentation": "Update synonyms\n\nUpdates the `synonyms` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletesynonymsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Deletesynonyms": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletesynonymsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/synonyms", + "code": 200 + }, + "smithy.api#documentation": "Reset synonyms\n\nResets the `synonyms` setting to its default value." + } + }, + "com.meilisearch.api#GettypoToleranceRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GettypoTolerance": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GettypoToleranceRequest" + }, + "output": { + "target": "com.meilisearch.api#TypoSettings" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/settings/typo-tolerance", + "code": 200 + }, + "smithy.api#documentation": "Get typoTolerance\n\nReturns the current value of the `typoTolerance` setting for the index." + } + }, + "com.meilisearch.api#PatchtypoToleranceRequestDisableOnWordsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly." + } + }, + "com.meilisearch.api#PatchtypoToleranceRequestDisableOnAttributesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs." + } + }, + "com.meilisearch.api#PatchtypoToleranceRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, typo tolerance is enabled. When false, only exact matches are returned.", + "com.distilled.openapi#nullable": {} + } + }, + "minWordSizeForTypos": { + "target": "com.meilisearch.api#MinWordSizeTyposSetting", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "disableOnWords": { + "target": "com.meilisearch.api#PatchtypoToleranceRequestDisableOnWordsList", + "traits": { + "smithy.api#documentation": "Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly.", + "com.distilled.openapi#nullable": {} + } + }, + "disableOnAttributes": { + "target": "com.meilisearch.api#PatchtypoToleranceRequestDisableOnAttributesList", + "traits": { + "smithy.api#documentation": "Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs.", + "com.distilled.openapi#nullable": {} + } + }, + "disableOnNumbers": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When true, typo tolerance is disabled on numeric tokens. For example, 123 will not match 132.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchtypoTolerance": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchtypoToleranceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/indexes/{index_uid}/settings/typo-tolerance", + "code": 200 + }, + "smithy.api#documentation": "Update typoTolerance\n\nUpdates the `typoTolerance` setting for the index. Send the new value in the request body; send null to reset to default." + } + }, + "com.meilisearch.api#DeletetypoToleranceRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeletetypoTolerance": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeletetypoToleranceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/indexes/{index_uid}/settings/typo-tolerance", + "code": 200 + }, + "smithy.api#documentation": "Reset typoTolerance\n\nResets the `typoTolerance` setting to its default value." + } + }, + "com.meilisearch.api#SimilarGetRequestAttributesToRetrieveList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#SimilarGetRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#required": {}, + "smithy.api#documentation": "The unique identifier ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value) of the target document.\nMeilisearch will find and return documents that are semantically\nsimilar to this document based on their vector embeddings. This is a\nrequired parameter." + } + }, + "embedder": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "embedder", + "smithy.api#required": {}, + "smithy.api#documentation": "The name of the embedder to use for finding similar documents. This\nmust match one of the embedders configured in your index settings. The\nembedder determines how document similarity is calculated based on\nvector embeddings." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "offset", + "smithy.api#documentation": "Number of similar documents to skip in the response. Use together with\n`limit` for pagination through large result sets. For example, to get\nsimilar documents 21-40, set `offset=20` and `limit=20`. Defaults to\n`0`." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of similar documents to return in a single response. Use\ntogether with `offset` for pagination. Higher values return more\nresults but may increase response time. Defaults to `20`." + } + }, + "attributes_to_retrieve": { + "target": "com.meilisearch.api#SimilarGetRequestAttributesToRetrieveList", + "traits": { + "smithy.api#httpQuery": "attributes_to_retrieve", + "smithy.api#documentation": "Comma-separated list of document attributes to include in the response.\nUse `*` to retrieve all attributes. By default, all attributes listed\nin the `displayedAttributes` setting are returned. Example:\n`title,description,price`." + } + }, + "retrieve_vectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "retrieve_vectors", + "smithy.api#documentation": "When `true`, includes the vector embeddings for each returned document.\nUseful for debugging or when you need to inspect the vector data. Note\nthat this can significantly increase response size. Defaults to\n`false`." + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter", + "smithy.api#documentation": "Filter expression to narrow down which documents can be returned as\nsimilar. Uses the same syntax as search filters. Only documents\nmatching this filter will be considered when finding similar documents.\nExample: `genres = action AND year > 2000`." + } + }, + "show_ranking_score": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "show_ranking_score", + "smithy.api#documentation": "When `true`, includes a global `_rankingScore` field in each document\nshowing how similar it is to the target document. The score is a value\nbetween 0 and 1, where higher values indicate greater similarity.\nDefaults to `false`." + } + }, + "show_ranking_score_details": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "show_ranking_score_details", + "smithy.api#documentation": "When `true`, includes a detailed `_rankingScoreDetails` object in each\ndocument breaking down how the similarity score was calculated. Useful\nfor debugging and understanding why certain documents are considered\nmore similar. Defaults to `false`." + } + }, + "show_performance_details": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "show_performance_details", + "smithy.api#documentation": "When `true`, includes a `_performanceDetails` object showing the\nperformance details of the search." + } + }, + "ranking_score_threshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#httpQuery": "ranking_score_threshold", + "smithy.api#documentation": "Minimum ranking score threshold (between 0.0 and 1.0) that documents\nmust meet to be included in results. Documents with a similarity score\nbelow this threshold will be excluded. Useful for ensuring only highly\nsimilar documents are returned." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SimilarGetResponseHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchHit" + }, + "traits": { + "smithy.api#documentation": "Results of the query" + } + }, + "com.meilisearch.api#SimilarGetResponse": { + "type": "structure", + "members": { + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results per page." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page index (1-based)." + } + }, + "totalPages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of result pages." + } + }, + "totalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of matching documents." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents skipped." + } + }, + "estimatedTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated total number of matches (not exhaustive).\n\nPrioritizes relevancy and performance." + } + }, + "hits": { + "target": "com.meilisearch.api#SimilarGetResponseHitsList", + "traits": { + "smithy.api#documentation": "Results of the query", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Document ID that was used as reference", + "smithy.api#required": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Processing time of the query in milliseconds", + "smithy.api#required": {} + } + }, + "performanceDetails": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Performance details of the query" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#SimilarGet": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SimilarGetRequest" + }, + "output": { + "target": "com.meilisearch.api#SimilarGetResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/similar", + "code": 200 + }, + "smithy.api#documentation": "Get similar documents with GET\n\nRetrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations." + } + }, + "com.meilisearch.api#SimilarPostRequestAttributesToRetrieveList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes to display in the returned documents" + } + }, + "com.meilisearch.api#SimilarPostRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Document ID to find similar documents for", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents to skip" + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned" + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter queries by an attribute's value" + } + }, + "embedder": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the embedder to use for semantic similarity", + "smithy.api#required": {} + } + }, + "attributesToRetrieve": { + "target": "com.meilisearch.api#SimilarPostRequestAttributesToRetrieveList", + "traits": { + "smithy.api#documentation": "Attributes to display in the returned documents", + "com.distilled.openapi#nullable": {} + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Return document vector data" + } + }, + "showRankingScore": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Display the global ranking score of a document" + } + }, + "showRankingScoreDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Adds a detailed global ranking score field" + } + }, + "showPerformanceDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Adds a detailed performance details field" + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Excludes results with low ranking scores" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SimilarPostResponseHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchHit" + }, + "traits": { + "smithy.api#documentation": "Results of the query" + } + }, + "com.meilisearch.api#SimilarPostResponse": { + "type": "structure", + "members": { + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results per page." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page index (1-based)." + } + }, + "totalPages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of result pages." + } + }, + "totalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of matching documents." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents skipped." + } + }, + "estimatedTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated total number of matches (not exhaustive).\n\nPrioritizes relevancy and performance." + } + }, + "hits": { + "target": "com.meilisearch.api#SimilarPostResponseHitsList", + "traits": { + "smithy.api#documentation": "Results of the query", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Document ID that was used as reference", + "smithy.api#required": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Processing time of the query in milliseconds", + "smithy.api#required": {} + } + }, + "performanceDetails": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Performance details of the query" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#SimilarPost": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SimilarPostRequest" + }, + "output": { + "target": "com.meilisearch.api#SimilarPostResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/indexes/{index_uid}/similar", + "code": 200 + }, + "smithy.api#documentation": "Get similar documents with POST\n\nRetrieve documents similar to a reference document identified by its id.\n\n> Useful for “more like this” or recommendations." + } + }, + "com.meilisearch.api#SizeFormat": { + "type": "enum", + "members": { + "HUMAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "human" + } + }, + "RAW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "raw" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#GetIndexStatsRequest": { + "type": "structure", + "members": { + "index_uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Unique identifier of the index." + } + }, + "showInternalDatabaseSizes": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showInternalDatabaseSizes", + "smithy.api#documentation": "If `true`, adds `internalDatabaseSizes` to the response." + } + }, + "sizeFormat": { + "target": "com.meilisearch.api#SizeFormat", + "traits": { + "smithy.api#httpQuery": "sizeFormat", + "smithy.api#documentation": "Specify how to format the sizes:\n\n- `\"raw\"` (default): format sizes as a number of bytes\n- `\"human\"`: format sizes as a human-readable string with an appropriate unit." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#IndexStats": { + "type": "structure", + "members": { + "numberOfDocuments": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents in the index", + "smithy.api#required": {} + } + }, + "indexSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Size of the index' DB, in bytes.", + "smithy.api#required": {} + } + }, + "usedIndexSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Size of the used pages of the index' DB, in bytes.", + "smithy.api#required": {} + } + }, + "rawDocumentDbSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Size of the documents database, in bytes.", + "smithy.api#required": {} + } + }, + "avgDocumentSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Average size of a document in the documents database.", + "smithy.api#required": {} + } + }, + "isIndexing": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether or not the index is currently ingesting document", + "smithy.api#required": {} + } + }, + "internalDatabaseSizes": { + "target": "com.meilisearch.api#IndexStatsInternalDatabaseSizesMap", + "traits": { + "smithy.api#documentation": "Size of all the internal databases for the index.\n\nDatabase names can change from version to version." + } + }, + "numberOfEmbeddings": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of embeddings in the index", + "com.distilled.openapi#nullable": {} + } + }, + "numberOfEmbeddedDocuments": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of embedded documents in the index", + "com.distilled.openapi#nullable": {} + } + }, + "fieldDistribution": { + "target": "com.meilisearch.api#IndexStatsFieldDistributionMap", + "traits": { + "smithy.api#documentation": "Association of every field name with the number of times it occurs in\nthe documents.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Stats of an `Index`, as known to the `stats` route." + } + }, + "com.meilisearch.api#Size": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.meilisearch.api#IndexStatsInternalDatabaseSizesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Size" + }, + "traits": { + "smithy.api#documentation": "Size of all the internal databases for the index.\n\nDatabase names can change from version to version." + } + }, + "com.meilisearch.api#IndexStatsFieldDistributionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": { + "smithy.api#documentation": "Association of every field name with the number of times it occurs in\nthe documents." + } + }, + "com.meilisearch.api#GetIndexStats": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetIndexStatsRequest" + }, + "output": { + "target": "com.meilisearch.api#IndexStats" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/indexes/{index_uid}/stats", + "code": 200 + }, + "smithy.api#documentation": "Get stats of index\n\nReturn statistics for a single index: document count, database size, indexing status, and field distribution." + } + }, + "com.meilisearch.api#ListApiKeysRequest": { + "type": "structure", + "members": { + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "offset", + "smithy.api#documentation": "Number of keys to skip. Use with `limit` for pagination. Defaults to 0." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of keys to return. Use with `offset` for pagination. Defaults to 20." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PaginationViewKeyView": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#PaginationViewKeyViewResultsList", + "traits": { + "smithy.api#documentation": "Items for the current page.", + "smithy.api#required": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of items skipped.", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of items returned.", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of items matching the query.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#Action": { + "type": "enum", + "members": { + "VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "*" + } + }, + "SEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search" + } + }, + "DOCUMENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documents.*" + } + }, + "DOCUMENTS_ADD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documents.add" + } + }, + "DOCUMENTS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documents.get" + } + }, + "DOCUMENTS_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documents.delete" + } + }, + "INDEXES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.*" + } + }, + "INDEXES_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.create" + } + }, + "INDEXES_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.get" + } + }, + "INDEXES_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.update" + } + }, + "INDEXES_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.delete" + } + }, + "INDEXES_SWAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.swap" + } + }, + "TASKS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tasks.*" + } + }, + "TASKS_CANCEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tasks.cancel" + } + }, + "TASKS_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tasks.delete" + } + }, + "TASKS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tasks.get" + } + }, + "SETTINGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "settings.*" + } + }, + "SETTINGS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "settings.get" + } + }, + "SETTINGS_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "settings.update" + } + }, + "STATS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stats.*" + } + }, + "STATS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stats.get" + } + }, + "METRICS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metrics.*" + } + }, + "METRICS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metrics.get" + } + }, + "DUMPS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dumps.*" + } + }, + "DUMPS_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dumps.create" + } + }, + "SNAPSHOTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snapshots.*" + } + }, + "SNAPSHOTS_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snapshots.create" + } + }, + "VERSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "version" + } + }, + "KEYS_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "keys.create" + } + }, + "KEYS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "keys.get" + } + }, + "KEYS_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "keys.update" + } + }, + "KEYS_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "keys.delete" + } + }, + "EXPERIMENTAL_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "experimental.get" + } + }, + "EXPERIMENTAL_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "experimental.update" + } + }, + "EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "export" + } + }, + "NETWORK_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "network.get" + } + }, + "NETWORK_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "network.update" + } + }, + "CHATCOMPLETIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chatCompletions" + } + }, + "CHATS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chats.*" + } + }, + "CHATS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chats.get" + } + }, + "CHATS_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chats.delete" + } + }, + "CHATSSETTINGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chatsSettings.*" + } + }, + "CHATSSETTINGS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chatsSettings.get" + } + }, + "CHATSSETTINGS_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chatsSettings.update" + } + }, + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "*.get" + } + }, + "WEBHOOKS_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhooks.get" + } + }, + "WEBHOOKS_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhooks.update" + } + }, + "WEBHOOKS_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhooks.delete" + } + }, + "WEBHOOKS_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhooks.create" + } + }, + "WEBHOOKS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "webhooks.*" + } + }, + "INDEXES_COMPACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexes.compact" + } + }, + "FIELDS_POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fields.post" + } + }, + "TASKS_COMPACT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tasks.compact" + } + }, + "DYNAMICSEARCHRULES_GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamicSearchRules.get" + } + }, + "DYNAMICSEARCHRULES_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamicSearchRules.create" + } + }, + "DYNAMICSEARCHRULES_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamicSearchRules.update" + } + }, + "DYNAMICSEARCHRULES_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamicSearchRules.delete" + } + }, + "DYNAMICSEARCHRULES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamicSearchRules.*" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#PaginationViewKeyViewResultsItemActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Action" + }, + "traits": { + "smithy.api#documentation": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." + } + }, + "com.meilisearch.api#PaginationViewKeyViewResultsItemIndexesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." + } + }, + "com.meilisearch.api#PaginationViewKeyViewResultsItem": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`.", + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`.", + "com.distilled.openapi#nullable": {} + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code.", + "smithy.api#required": {} + } + }, + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes.", + "smithy.api#required": {} + } + }, + "actions": { + "target": "com.meilisearch.api#PaginationViewKeyViewResultsItemActionsList", + "traits": { + "smithy.api#documentation": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions.", + "smithy.api#required": {} + } + }, + "indexes": { + "target": "com.meilisearch.api#PaginationViewKeyViewResultsItemIndexesList", + "traits": { + "smithy.api#documentation": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\".", + "smithy.api#required": {} + } + }, + "expiresAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire.", + "com.distilled.openapi#nullable": {} + } + }, + "createdAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance." + } + }, + "com.meilisearch.api#PaginationViewKeyViewResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#PaginationViewKeyViewResultsItem" + }, + "traits": { + "smithy.api#documentation": "Items for the current page." + } + }, + "com.meilisearch.api#ListApiKeys": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#ListApiKeysRequest" + }, + "output": { + "target": "com.meilisearch.api#PaginationViewKeyView" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/keys", + "code": 200 + }, + "smithy.api#documentation": "List API keys\n\nReturn all API keys configured on the instance. Results are paginated and can be filtered by offset and limit. The key value itself is never returned after creation.\n\n**Note:** Expired keys are included in the response but deleted keys are not.\nKeys are returned in descending order of creation date." + } + }, + "com.meilisearch.api#CreateApiKeyRequestActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Action" + }, + "traits": { + "smithy.api#documentation": "A list of actions permitted for the key. `[\"*\"]` for all actions. The\n`*` character can be used as a wildcard when located at the last\nposition. e.g. `documents.*` to authorize access on all documents\nendpoints.\n\nValid actions include: `search`, `documents.add`,\n`documents.get`, `documents.delete`, `indexes.create`, `indexes.get`,\n`indexes.update`, `indexes.delete`, `indexes.swap`, `tasks.get`,\n`tasks.cancel`, `tasks.delete`, `settings.get`, `settings.update`,\n`stats.get`, `dumps.create`, `snapshots.create`, `version`, `keys.get`,\n`keys.create`, `keys.update`, `keys.delete`. Use `*` to grant all actions." + } + }, + "com.meilisearch.api#CreateApiKeyRequestIndexesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "A list of accessible indexes permitted for the key. `[\"*\"]` for all\nindexes. The `*` character can be used as a wildcard when located at\nthe last position. e.g. `products_*` to allow access to all indexes\nwhose names start with `products_`." + } + }, + "com.meilisearch.api#CreateApiKeyRequest": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description for the key. `null` if empty.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable name for the key. `null` if empty.", + "com.distilled.openapi#nullable": {} + } + }, + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch.", + "com.distilled.openapi#nullable": {} + } + }, + "actions": { + "target": "com.meilisearch.api#CreateApiKeyRequestActionsList", + "traits": { + "smithy.api#documentation": "A list of actions permitted for the key. `[\"*\"]` for all actions. The\n`*` character can be used as a wildcard when located at the last\nposition. e.g. `documents.*` to authorize access on all documents\nendpoints.\n\nValid actions include: `search`, `documents.add`,\n`documents.get`, `documents.delete`, `indexes.create`, `indexes.get`,\n`indexes.update`, `indexes.delete`, `indexes.swap`, `tasks.get`,\n`tasks.cancel`, `tasks.delete`, `settings.get`, `settings.update`,\n`stats.get`, `dumps.create`, `snapshots.create`, `version`, `keys.get`,\n`keys.create`, `keys.update`, `keys.delete`. Use `*` to grant all actions.", + "smithy.api#required": {} + } + }, + "indexes": { + "target": "com.meilisearch.api#CreateApiKeyRequestIndexesList", + "traits": { + "smithy.api#documentation": "A list of accessible indexes permitted for the key. `[\"*\"]` for all\nindexes. The `*` character can be used as a wildcard when located at\nthe last position. e.g. `products_*` to allow access to all indexes\nwhose names start with `products_`.", + "smithy.api#required": {} + } + }, + "expiresAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Represent the expiration date and time as RFC 3339 format. `null`\nequals to no expiration time. Set to `null` to create a key that never\nexpires. Once a key is past its expiry date, using it returns an error.", + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#KeyView": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A human-readable name for the API key. Use this to identify the purpose\nof each key, such as \"Frontend Search Key\" or \"Admin Key for CI/CD\".\nThis is optional and can be `null`.", + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A longer description explaining the purpose or usage of this API key.\nUseful for documenting why the key was created and how it should be\nused. This is optional and can be `null`.", + "com.distilled.openapi#nullable": {} + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The actual API key string to use in the `Authorization: Bearer `\nheader when making requests to Meilisearch. Keep this value secret and\nnever expose it in client-side code.", + "smithy.api#required": {} + } + }, + "uid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier (UUID) for this API key. Use this to update or\ndelete the key. The UID remains constant even if the key's name or\ndescription changes.", + "smithy.api#required": {} + } + }, + "actions": { + "target": "com.meilisearch.api#KeyViewActionsList", + "traits": { + "smithy.api#documentation": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions.", + "smithy.api#required": {} + } + }, + "indexes": { + "target": "com.meilisearch.api#KeyViewIndexesList", + "traits": { + "smithy.api#documentation": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\".", + "smithy.api#required": {} + } + }, + "expiresAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The expiration date and time of the key in RFC 3339 format. After this\ntime, the key will no longer be valid for authentication. Set to `null`\nfor keys that never expire.", + "com.distilled.openapi#nullable": {} + } + }, + "createdAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when this API key was created, formatted as an\nRFC 3339 date-time string. This is automatically set by Meilisearch\nand cannot be modified.", + "smithy.api#required": {} + } + }, + "updatedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date and time when this API key was last modified, formatted as an\nRFC 3339 date-time string. This is automatically updated by Meilisearch\nwhen the key's name or description changes.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents an API key used for authenticating requests to Meilisearch.\nEach key has specific permissions defined by its actions and can be scoped\nto particular indexes. Keys provide fine-grained access control for your\nMeilisearch instance." + } + }, + "com.meilisearch.api#KeyViewActionsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Action" + }, + "traits": { + "smithy.api#documentation": "The list of actions (permissions) this key is allowed to perform.\nExamples include `documents.add`, `search`, `indexes.create`,\n`settings.update`, etc. Use `*` to grant all permissions." + } + }, + "com.meilisearch.api#KeyViewIndexesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "The list of index UIDs this key can access. Use `*` to grant access to\nall indexes, including future ones. Patterns are also supported, e.g.,\n`movies_*` matches any index starting with \"movies_\"." + } + }, + "com.meilisearch.api#CreateApiKey": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#CreateApiKeyRequest" + }, + "output": { + "target": "com.meilisearch.api#KeyView" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/keys", + "code": 200 + }, + "smithy.api#documentation": "Create API key\n\nCreate a new API key with the specified name, description, actions, and index scopes. The key value is returned only once at creation time; store it securely.\n\n**Required fields:** `actions`, `indexes`, `expiresAt`.\n**Optional fields:** `name`, `description`, `uid`.\n\nSet `expiresAt` to `null` to create a key that never expires.\nUse `\"*\"` in the `actions` array to grant all permissions (not recommended for production).\nUse `[\"*\"]` in the `indexes` array to grant access to all indexes." + } + }, + "com.meilisearch.api#GetApiKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The `uid` or `key` field of an existing API key." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetApiKey": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetApiKeyRequest" + }, + "output": { + "target": "com.meilisearch.api#KeyView" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/keys/{key}", + "code": 200 + }, + "smithy.api#documentation": "Get API key\n\nRetrieve a single API key by its `uid` or by its `key` value." + } + }, + "com.meilisearch.api#PatchApiKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The `uid` or `key` field of an existing API key." + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A new description for the API key. Pass `null` to remove the existing\ndescription. Useful for documenting the purpose or usage of the key.", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A new human-readable name for the API key. Pass `null` to remove the\nexisting name. Use this to identify keys by purpose, such as\n\"Production Search Key\" or \"CI/CD Indexing Key\".", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchApiKey": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchApiKeyRequest" + }, + "output": { + "target": "com.meilisearch.api#KeyView" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/keys/{key}", + "code": 200 + }, + "smithy.api#documentation": "Update API key\n\nUpdate the name and description of an API key.\n\nUpdates are partial: only the fields you send are changed, and any fields not present in the payload remain unchanged.\n\n**Note:** Only `name` and `description` can be updated. The fields `actions`, `indexes`,\n`expiresAt`, and `uid` cannot be modified after key creation." + } + }, + "com.meilisearch.api#DeleteApiKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The `uid` or `key` field of an existing API key." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteApiKey": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteApiKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/keys/{key}", + "code": 200 + }, + "smithy.api#documentation": "Delete API key\n\nPermanently delete the specified API key. The key will no longer be valid for authentication." + } + }, + "com.meilisearch.api#UpdateStderrTargetRequest": { + "type": "structure", + "members": { + "target": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#UpdateStderrTarget": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#UpdateStderrTargetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/logs/stderr", + "code": 200 + }, + "smithy.api#documentation": "Update target of the console logs\n\nConfigure at runtime the level of the console logs written to stderr (e.g. debug, info, warn, error)." + } + }, + "com.meilisearch.api#LogMode": { + "type": "enum", + "members": { + "HUMAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "human" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + }, + "PROFILE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "profile" + } + } + }, + "traits": { + "smithy.api#documentation": "Format for log output" + } + }, + "com.meilisearch.api#GetLogsRequest": { + "type": "structure", + "members": { + "target": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Log targets to filter. Format: code_part=log_level (e.g.,\nmilli=trace,actix_web=off)" + } + }, + "mode": { + "target": "com.meilisearch.api#LogMode" + }, + "profileMemory": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable memory profiling (only useful with profile mode, significantly\nslows down the engine)" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetLogsResponse": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#rawResponse": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetLogs": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetLogsRequest" + }, + "output": { + "target": "com.meilisearch.api#GetLogsResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/logs/stream", + "code": 200 + }, + "smithy.api#documentation": "Retrieve logs\n\nStream logs over HTTP. The format of the logs depends on the configuration specified in the payload. The logs are sent as multi-part, and the stream never stops, so ensure your client can handle a long-lived connection. To stop receiving logs, call the `DELETE /logs/stream` route.\n\nOnly one client can listen at a time. An error is returned if you call this route while it is already in use by another client." + } + }, + "com.meilisearch.api#CancelLogs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/logs/stream", + "code": 200 + }, + "smithy.api#documentation": "Stop retrieving logs\n\nCall this route to make the engine stop sending logs to the client that opened the `POST /logs/stream` connection." + } + }, + "com.meilisearch.api#GetMetrics": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/metrics", + "code": 200 + }, + "smithy.api#documentation": "Get Prometheus metrics\n\nReturn metrics for the engine in Prometheus format. This is an [experimental feature](https://www.meilisearch.com/docs/learn/experimental/overview) and must be enabled before use." + } + }, + "com.meilisearch.api#SearchQueryWithIndex": { + "type": "structure", + "members": { + "indexUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Index unique identifier", + "smithy.api#required": {} + } + }, + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Query string", + "com.distilled.openapi#nullable": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents to skip", + "com.distilled.openapi#nullable": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned", + "com.distilled.openapi#nullable": {} + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Request a specific page of results", + "com.distilled.openapi#nullable": {} + } + }, + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned for a page", + "com.distilled.openapi#nullable": {} + } + }, + "attributesToRetrieve": { + "target": "com.meilisearch.api#SearchQueryWithIndexAttributesToRetrieveList", + "traits": { + "smithy.api#documentation": "Attributes to display in the returned documents", + "com.distilled.openapi#nullable": {} + } + }, + "attributesToCrop": { + "target": "com.meilisearch.api#SearchQueryWithIndexAttributesToCropList", + "traits": { + "smithy.api#documentation": "Attributes whose values have to be cropped", + "com.distilled.openapi#nullable": {} + } + }, + "cropLength": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum length of cropped value in words" + } + }, + "cropMarker": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String marking crop boundaries" + } + }, + "attributesToHighlight": { + "target": "com.meilisearch.api#SearchQueryWithIndexAttributesToHighlightList", + "traits": { + "smithy.api#documentation": "Highlight matching terms contained in an attribute", + "com.distilled.openapi#nullable": {} + } + }, + "highlightPreTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String inserted at the start of a highlighted term" + } + }, + "highlightPostTag": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "String inserted at the end of a highlighted term" + } + }, + "showMatchesPosition": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Return matching terms location" + } + }, + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Filter queries by an attribute's value" + } + }, + "sort": { + "target": "com.meilisearch.api#SearchQueryWithIndexSortList", + "traits": { + "smithy.api#documentation": "Sort search results by an attribute's value", + "com.distilled.openapi#nullable": {} + } + }, + "distinct": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Restrict search to documents with unique values of specified\nattribute", + "com.distilled.openapi#nullable": {} + } + }, + "facets": { + "target": "com.meilisearch.api#AttributePatterns", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "matchingStrategy": { + "target": "com.meilisearch.api#MatchingStrategy" + }, + "attributesToSearchOn": { + "target": "com.meilisearch.api#SearchQueryWithIndexAttributesToSearchOnList", + "traits": { + "smithy.api#documentation": "Restrict search to the specified attributes", + "com.distilled.openapi#nullable": {} + } + }, + "rankingScoreThreshold": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "Exclude results below the specified ranking score", + "com.distilled.openapi#nullable": {} + } + }, + "locales": { + "target": "com.meilisearch.api#SearchQueryWithIndexLocalesList", + "traits": { + "smithy.api#documentation": "Languages to use for query tokenization", + "com.distilled.openapi#nullable": {} + } + }, + "hybrid": { + "target": "com.meilisearch.api#HybridQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "vector": { + "target": "com.meilisearch.api#SearchQueryWithIndexVectorList", + "traits": { + "smithy.api#documentation": "Search using a custom query vector", + "com.distilled.openapi#nullable": {} + } + }, + "retrieveVectors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Return document and query vector data" + } + }, + "media": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Perform AI-powered search queries with multimodal content" + } + }, + "personalize": { + "target": "com.meilisearch.api#Personalize", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "useNetwork": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "When `true`, runs the query on the whole network (all shards covered exactly once).\n\nWhen `false`, the query runs locally.\n\nWhen omitted or `null`, the default value depends on whether the sharding is enabled for the instance:\n\n- If the instance has sharding enabled (has a leader), defaults to `true`.\n- Otherwise defaults to `false`.\n\nIt also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features).\n\nValues: `true` = use the whole network; `false` = local, default = see above.\n\nWhen using the network, the index must exist with compatible settings on all remotes.", + "com.distilled.openapi#nullable": {} + } + }, + "showRankingScore": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Display the global ranking score of a document" + } + }, + "showRankingScoreDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Adds a detailed global ranking score field" + } + }, + "showPerformanceDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Adds a detailed performance details field", + "com.distilled.openapi#nullable": {} + } + }, + "federationOptions": { + "target": "com.meilisearch.api#FederationOptions", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A `SearchQuery` + an index UID and optional FederationOptions." + } + }, + "com.meilisearch.api#SearchQueryWithIndexAttributesToRetrieveList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes to display in the returned documents" + } + }, + "com.meilisearch.api#SearchQueryWithIndexAttributesToCropList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Attributes whose values have to be cropped" + } + }, + "com.meilisearch.api#SearchQueryWithIndexAttributesToHighlightList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Highlight matching terms contained in an attribute" + } + }, + "com.meilisearch.api#SearchQueryWithIndexSortList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Sort search results by an attribute's value" + } + }, + "com.meilisearch.api#SearchQueryWithIndexAttributesToSearchOnList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Restrict search to the specified attributes" + } + }, + "com.meilisearch.api#SearchQueryWithIndexLocalesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Locale" + }, + "traits": { + "smithy.api#documentation": "Languages to use for query tokenization" + } + }, + "com.meilisearch.api#SearchQueryWithIndexVectorList": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": { + "smithy.api#documentation": "Search using a custom query vector" + } + }, + "com.meilisearch.api#FederationOptions": { + "type": "structure", + "members": { + "weight": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#documentation": "A multiplicative factor applied to the ranking score for hits from this query.\n\nValues less than 1.0 make hits from this query less likely to appear in final results; values greater than 1.0 make them more likely.\n\nMust be a positive number. Default: `1.0`." + } + }, + "remote": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Remote server to send this query to", + "com.distilled.openapi#nullable": {} + } + }, + "queryPosition": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Position of this query in the list of queries", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Options for federated multi-search queries" + } + }, + "com.meilisearch.api#MultiSearchWithPostRequestQueriesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchQueryWithIndex" + }, + "traits": { + "smithy.api#documentation": "An array of search queries to execute. Each query can target a\ndifferent index and have its own parameters. When `federation` is\n`null`, results are returned separately for each query. When\n`federation` is set, results are merged.\n\nEach query object must include `indexUid` to specify which index to search." + } + }, + "com.meilisearch.api#Federation": { + "type": "structure", + "members": { + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of results to return across all queries" + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results to skip" + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "facetsByIndex": { + "target": "com.meilisearch.api#FederationFacetsByIndexMap", + "traits": { + "smithy.api#documentation": "Facets to retrieve per index" + } + }, + "mergeFacets": { + "target": "com.meilisearch.api#MergeFacets", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "distinct": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Restrict search to documents with unique values of the specified attribute across all queries.\n\n1. This applies across all queries in the request, regardless of index or remote of origin.\n2. This overrides the index-level distinct attribute.\n3. This requires that the passed field can be set as distinct in all the participating indexes.", + "com.distilled.openapi#nullable": {} + } + }, + "showPerformanceDetails": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include performance details in the response" + } + }, + "personalize": { + "target": "com.meilisearch.api#Personalize", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for federated multi-search" + } + }, + "com.meilisearch.api#FederationFacetsByIndexMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#AttributePatterns" + }, + "traits": { + "smithy.api#documentation": "Facets to retrieve per index" + } + }, + "com.meilisearch.api#MergeFacets": { + "type": "structure", + "members": { + "maxValuesPerFacet": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The maximum number of facet values to return for each facet after\nmerging. Values from all indexes are combined and sorted before\ntruncation. If not specified, uses the default limit from the index\nsettings.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Options for merging facets from multiple indexes in federated search.\nWhen multiple indexes are queried, this controls how their facet values\nare combined into a single facet distribution." + } + }, + "com.meilisearch.api#MultiSearchWithPostRequest": { + "type": "structure", + "members": { + "queries": { + "target": "com.meilisearch.api#MultiSearchWithPostRequestQueriesList", + "traits": { + "smithy.api#documentation": "An array of search queries to execute. Each query can target a\ndifferent index and have its own parameters. When `federation` is\n`null`, results are returned separately for each query. When\n`federation` is set, results are merged.\n\nEach query object must include `indexUid` to specify which index to search.", + "smithy.api#required": {} + } + }, + "federation": { + "target": "com.meilisearch.api#Federation", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#MultiSearchWithPostResponseHitsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchHit" + }, + "traits": { + "smithy.api#documentation": "Combined search results from all queries" + } + }, + "com.meilisearch.api#Vec": { + "type": "list", + "member": { + "target": "smithy.api#Double" + }, + "traits": {} + }, + "com.meilisearch.api#MultiSearchWithPostResponseQueryVectorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Vec" + }, + "traits": {} + }, + "com.meilisearch.api#MultiSearchWithPostResponseFacetDistributionValueMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#MultiSearchWithPostResponseFacetDistributionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseFacetDistributionValueMap" + }, + "traits": {} + }, + "com.meilisearch.api#MultiSearchWithPostResponseFacetStatsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetStats" + }, + "traits": { + "smithy.api#documentation": "Merged facet statistics across all indexes" + } + }, + "com.meilisearch.api#FederatedFacets": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ComputedFacets" + }, + "traits": {} + }, + "com.meilisearch.api#ComputedFacets": { + "type": "structure", + "members": { + "distribution": { + "target": "com.meilisearch.api#ComputedFacetsDistributionMap", + "traits": { + "smithy.api#documentation": "Count of documents for each facet value", + "smithy.api#required": {} + } + }, + "stats": { + "target": "com.meilisearch.api#ComputedFacetsStatsMap", + "traits": { + "smithy.api#documentation": "Numeric statistics for each facet", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Computed facet data from a search" + } + }, + "com.meilisearch.api#ComputedFacetsDistributionValueMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#ComputedFacetsDistributionMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ComputedFacetsDistributionValueMap" + }, + "traits": { + "smithy.api#documentation": "Count of documents for each facet value" + } + }, + "com.meilisearch.api#ComputedFacetsStatsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#FacetStats" + }, + "traits": { + "smithy.api#documentation": "Numeric statistics for each facet" + } + }, + "com.meilisearch.api#MultiSearchWithPostResponseMetadataList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SearchMetadata" + }, + "traits": { + "smithy.api#documentation": "Metadata for each query" + } + }, + "com.meilisearch.api#MultiSearchWithPostResponseRemoteErrorsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#ResponseError" + }, + "traits": { + "smithy.api#documentation": "Errors from remote servers" + } + }, + "com.meilisearch.api#MultiSearchWithPostResponse": { + "type": "structure", + "members": { + "hitsPerPage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of results per page." + } + }, + "page": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Current page index (1-based)." + } + }, + "totalPages": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of result pages." + } + }, + "totalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Exhaustive total number of matching documents." + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of documents returned." + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents skipped." + } + }, + "estimatedTotalHits": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Estimated total number of matches (not exhaustive).\n\nPrioritizes relevancy and performance." + } + }, + "hits": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseHitsList", + "traits": { + "smithy.api#documentation": "Combined search results from all queries", + "smithy.api#required": {} + } + }, + "queryVectors": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseQueryVectorsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "processingTimeMs": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total processing time in milliseconds", + "smithy.api#required": {} + } + }, + "facetDistribution": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseFacetDistributionMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "facetStats": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseFacetStatsMap", + "traits": { + "smithy.api#documentation": "Merged facet statistics across all indexes", + "com.distilled.openapi#nullable": {} + } + }, + "facetsByIndex": { + "target": "com.meilisearch.api#FederatedFacets", + "traits": { + "smithy.api#documentation": "Facets grouped by index" + } + }, + "requestUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier for the request", + "com.distilled.openapi#nullable": {} + } + }, + "metadata": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseMetadataList", + "traits": { + "smithy.api#documentation": "Metadata for each query", + "com.distilled.openapi#nullable": {} + } + }, + "remoteErrors": { + "target": "com.meilisearch.api#MultiSearchWithPostResponseRemoteErrorsMap", + "traits": { + "smithy.api#documentation": "Errors from remote servers", + "com.distilled.openapi#nullable": {} + } + }, + "semanticHitCount": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "performanceDetails": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#MultiSearchWithPost": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#MultiSearchWithPostRequest" + }, + "output": { + "target": "com.meilisearch.api#MultiSearchWithPostResponse" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/multi-search", + "code": 200 + }, + "smithy.api#documentation": "Perform a multi-search\n\nRun multiple search queries in a single API request.\n\nEach query can target a different index, so you can search across several indexes at once and get one combined response.\n\n**Warning:** If Meilisearch encounters an error processing any query in the request, it immediately\nstops and returns an error message for the first error encountered. Partial results are not returned." + } + }, + "com.meilisearch.api#Network": { + "type": "structure", + "members": { + "remotes": { + "target": "com.meilisearch.api#NetworkRemotesMap", + "traits": { + "smithy.api#documentation": "Map of remote instance names to their configurations\n\n- Pass `null` as a value for a remote to remove it from the configuration.\n- Removing a remote will also remove it from all shards.\n- Remotes that don't appear in this list will be unmodified by the network call.", + "com.distilled.openapi#nullable": {} + } + }, + "shards": { + "target": "com.meilisearch.api#NetworkShardsMap", + "traits": { + "smithy.api#documentation": "Map of shard names to their configurations.\n\n- Pass `null` as a value for a shard to remove it from the configuration.\n- Shards that don't appear in this list will be unmodified by the network call.", + "com.distilled.openapi#nullable": {} + } + }, + "previousShards": { + "target": "com.meilisearch.api#NetworkPreviousShardsMap", + "traits": { + "smithy.api#documentation": "Previous shard configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances", + "com.distilled.openapi#nullable": {} + } + }, + "self": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of this instance in the network", + "com.distilled.openapi#nullable": {} + } + }, + "leader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the leader instance in the network", + "com.distilled.openapi#nullable": {} + } + }, + "previousRemotes": { + "target": "com.meilisearch.api#NetworkPreviousRemotesMap", + "traits": { + "smithy.api#documentation": "Previous remote configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Network topology configuration for distributed Meilisearch" + } + }, + "com.meilisearch.api#Remote": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL of the remote instance\n\n- If the URL of the remote instance is resolving to a non-global IP, make sure that\n `--experimental-allowed-ip-networks` allows it. For details on how use this parameter,\n refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks).", + "com.distilled.openapi#nullable": {} + } + }, + "searchApiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key for search operations on this remote", + "com.distilled.openapi#nullable": {} + } + }, + "writeApiKey": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "API key for write operations on this remote", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for a remote Meilisearch instance" + } + }, + "com.meilisearch.api#NetworkRemotesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Remote" + }, + "traits": { + "smithy.api#documentation": "Map of remote instance names to their configurations\n\n- Pass `null` as a value for a remote to remove it from the configuration.\n- Removing a remote will also remove it from all shards.\n- Remotes that don't appear in this list will be unmodified by the network call." + } + }, + "com.meilisearch.api#Shard": { + "type": "structure", + "members": { + "remotes": { + "target": "com.meilisearch.api#ShardRemotesList", + "traits": { + "smithy.api#documentation": "List of remotes that own this shard.\n\n- The remotes must be part of the network's configuration\n- Setting this to a non-`null` value will replace all existing remotes for this shard.\n- `addRemotes` and `removeRemotes` are applied after `remotes` if multiple options are present.", + "com.distilled.openapi#nullable": {} + } + }, + "addRemotes": { + "target": "com.meilisearch.api#ShardAddRemotesList", + "traits": { + "smithy.api#documentation": "Remotes to add to the list of owners of this shard.\n\n- The remotes must be part of the network's configuration\n- Setting this to non-`null` will append the listed remotes to the list of owners of this shard.\n- `remotes` is applied before `addRemotes`\n- `removeRemotes` is applied after `addRemotes`", + "com.distilled.openapi#nullable": {} + } + }, + "removeRemotes": { + "target": "com.meilisearch.api#ShardRemoveRemotesList", + "traits": { + "smithy.api#documentation": "Remotes to remove from the list of owners of this shard.\n\n- The remotes may or may not be part of the network's configuration\n- Setting this to non-`null` will remove the listed remotes from the list of owners of this shard.\n- `remotes` and `addRemotes` are applied before `removeRemotes`\n- Remotes removed from the configuration are automatically removed from all shards and it is not necessary\n to explicitly pass them as `removeRemotes`.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Configuration for a named shard of the network\n\nDocuments are distributed among the various declared shards.\nRemotes own shards, meaning they own the documents that belong to these shards." + } + }, + "com.meilisearch.api#ShardRemotesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "List of remotes that own this shard.\n\n- The remotes must be part of the network's configuration\n- Setting this to a non-`null` value will replace all existing remotes for this shard.\n- `addRemotes` and `removeRemotes` are applied after `remotes` if multiple options are present." + } + }, + "com.meilisearch.api#ShardAddRemotesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Remotes to add to the list of owners of this shard.\n\n- The remotes must be part of the network's configuration\n- Setting this to non-`null` will append the listed remotes to the list of owners of this shard.\n- `remotes` is applied before `addRemotes`\n- `removeRemotes` is applied after `addRemotes`" + } + }, + "com.meilisearch.api#ShardRemoveRemotesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Remotes to remove from the list of owners of this shard.\n\n- The remotes may or may not be part of the network's configuration\n- Setting this to non-`null` will remove the listed remotes from the list of owners of this shard.\n- `remotes` and `addRemotes` are applied before `removeRemotes`\n- Remotes removed from the configuration are automatically removed from all shards and it is not necessary\n to explicitly pass them as `removeRemotes`." + } + }, + "com.meilisearch.api#NetworkShardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Shard" + }, + "traits": { + "smithy.api#documentation": "Map of shard names to their configurations.\n\n- Pass `null` as a value for a shard to remove it from the configuration.\n- Shards that don't appear in this list will be unmodified by the network call." + } + }, + "com.meilisearch.api#NetworkPreviousShardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Shard" + }, + "traits": { + "smithy.api#documentation": "Previous shard configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances" + } + }, + "com.meilisearch.api#NetworkPreviousRemotesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Remote" + }, + "traits": { + "smithy.api#documentation": "Previous remote configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances" + } + }, + "com.meilisearch.api#GetNetwork": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#Network" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/network", + "code": 200 + }, + "smithy.api#documentation": "Get network topology\n\nReturn the list of Meilisearch instances currently known to this node (self and remotes)." + } + }, + "com.meilisearch.api#PatchNetworkRequestRemotesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Remote" + }, + "traits": { + "smithy.api#documentation": "Map of remote instance names to their configurations\n\n- Pass `null` as a value for a remote to remove it from the configuration.\n- Removing a remote will also remove it from all shards.\n- Remotes that don't appear in this list will be unmodified by the network call." + } + }, + "com.meilisearch.api#PatchNetworkRequestShardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Shard" + }, + "traits": { + "smithy.api#documentation": "Map of shard names to their configurations.\n\n- Pass `null` as a value for a shard to remove it from the configuration.\n- Shards that don't appear in this list will be unmodified by the network call." + } + }, + "com.meilisearch.api#PatchNetworkRequestPreviousShardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Shard" + }, + "traits": { + "smithy.api#documentation": "Previous shard configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances" + } + }, + "com.meilisearch.api#PatchNetworkRequestPreviousRemotesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#Remote" + }, + "traits": { + "smithy.api#documentation": "Previous remote configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances" + } + }, + "com.meilisearch.api#PatchNetworkRequest": { + "type": "structure", + "members": { + "remotes": { + "target": "com.meilisearch.api#PatchNetworkRequestRemotesMap", + "traits": { + "smithy.api#documentation": "Map of remote instance names to their configurations\n\n- Pass `null` as a value for a remote to remove it from the configuration.\n- Removing a remote will also remove it from all shards.\n- Remotes that don't appear in this list will be unmodified by the network call.", + "com.distilled.openapi#nullable": {} + } + }, + "shards": { + "target": "com.meilisearch.api#PatchNetworkRequestShardsMap", + "traits": { + "smithy.api#documentation": "Map of shard names to their configurations.\n\n- Pass `null` as a value for a shard to remove it from the configuration.\n- Shards that don't appear in this list will be unmodified by the network call.", + "com.distilled.openapi#nullable": {} + } + }, + "previousShards": { + "target": "com.meilisearch.api#PatchNetworkRequestPreviousShardsMap", + "traits": { + "smithy.api#documentation": "Previous shard configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances", + "com.distilled.openapi#nullable": {} + } + }, + "self": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of this instance in the network", + "com.distilled.openapi#nullable": {} + } + }, + "leader": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the leader instance in the network", + "com.distilled.openapi#nullable": {} + } + }, + "previousRemotes": { + "target": "com.meilisearch.api#PatchNetworkRequestPreviousRemotesMap", + "traits": { + "smithy.api#documentation": "Previous remote configurations\n\nThis field should not be passed by end-users. It is used in internal communications between Meilisearch instances", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchNetwork": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchNetworkRequest" + }, + "output": { + "target": "com.meilisearch.api#Network" + }, + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/network", + "code": 200 + }, + "smithy.api#documentation": "Configure network topology\n\nAdd or remove remote nodes from the network. Changes apply to the current instance’s view of the cluster." + } + }, + "com.meilisearch.api#Origin": { + "type": "structure", + "members": { + "remoteName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The name of the remote Meilisearch instance where this task originated.\nThis corresponds to a remote defined in the network configuration.", + "smithy.api#required": {} + } + }, + "taskUid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The unique task identifier on the originating remote. This allows\ntracking the same task across different nodes in the network.", + "smithy.api#required": {} + } + }, + "networkVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The version of the network topology when this task was created. Used to\nensure consistent task routing during network topology changes." + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the origin of a task in a distributed Meilisearch\ndeployment. This tracks where a task was originally created before being\nreplicated to other nodes." + } + }, + "com.meilisearch.api#Message": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#MessageCase0" + }, + "Case1": { + "target": "com.meilisearch.api#MessageCase1" + }, + "Case2": { + "target": "com.meilisearch.api#MessageCase2" + } + }, + "traits": {} + }, + "com.meilisearch.api#MessageCase0Type": { + "type": "enum", + "members": { + "EXPORTNOINDEXFORREMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exportNoIndexForRemote" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#MessageCase0": { + "type": "structure", + "members": { + "remote": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the remote that will no longer export any document to this instance.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#MessageCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The specified remote will not longer export any document to this instance.\n\nSend this message to remotes that are blocked waiting on the specified remote to export its documents." + } + }, + "com.meilisearch.api#MessageCase1Type": { + "type": "enum", + "members": { + "IMPORTFINISHEDFORREMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "importFinishedForRemote" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#MessageCase1": { + "type": "structure", + "members": { + "remote": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the remote that finished importing its documents.", + "smithy.api#required": {} + } + }, + "successful": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the import was successful.\n\nDocuments from shards that no longer belong to remotes are only deleted if all remotes are successful\nimporting their documents.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#MessageCase1Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The specified remote is finished importing its documents.\n\nSend this message to remotes that are blocked waiting on the specified remote to finish importing its documents." + } + }, + "com.meilisearch.api#MessageCase2Type": { + "type": "enum", + "members": { + "STATUSCHANGEFORREMOTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "statusChangeForRemote" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#MessageCase2": { + "type": "structure", + "members": { + "remote": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the remote whose status will be changed.", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.meilisearch.api#Status", + "traits": { + "smithy.api#documentation": "The new status for the remote.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#MessageCase2Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The specified remote will see it's status change.\n\nSend this message to change the accessiblity of a remote." + } + }, + "com.meilisearch.api#PostNetworkChangeRequest": { + "type": "structure", + "members": { + "origin": { + "target": "com.meilisearch.api#Origin", + "traits": { + "smithy.api#documentation": "The origin of this message\n\nGet it in the details of the network topology change task that is currently processing.", + "smithy.api#required": {} + } + }, + "message": { + "target": "com.meilisearch.api#Message", + "traits": { + "smithy.api#documentation": "Message to send to control the network topology change task.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PostNetworkChange": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PostNetworkChangeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/network/control", + "code": 200 + }, + "smithy.api#documentation": "Network control\n\nSend messages to control the progress of a network topology change task.\n\nThe route is mostly used internally when sending a PATCH to the network, but is accessible for manual control as well." + } + }, + "com.meilisearch.api#RenderQueryTemplate": { + "type": "structure", + "members": { + "kind": { + "target": "com.meilisearch.api#RenderQueryTemplateKind", + "traits": { + "smithy.api#documentation": "Kind of template or fragment to fetch.\n\nDetermines which other parameters are allowed and mandatory.", + "smithy.api#required": {} + } + }, + "indexUid": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedder": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Embedder to fetch the template or fragment from.\n\n- Mandatory for `kind`s: `documentTemplate`, `chatDocumentTemplate`, `indexingFragment` and `searchFragment`.", + "com.distilled.openapi#nullable": {} + } + }, + "fragment": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Name of the fragment to fetch.\n\n- Mandatory for `kind`s: `indexingFragment` and `searchFragment`.", + "com.distilled.openapi#nullable": {} + } + }, + "inline": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Inline value of the template or fragment.\n\n- Mandatory for `kind`s: `inlineDocumentTemplate` and `inlineFragment`." + } + }, + "documentTemplateMaxBytes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "If present, truncate document template rendering to the specified number of bytes.\n\n- Available for `kind`s: `documentTemplate`, `inlineDocumentTemplate` and `chatDocumentTemplate`\n- If present for `documentTemplate` overrides the setting of the index.\n- If missing for `documentTemplate`, the setting of the index is used.\n- If missing for `inlineDocumentTemplate`, the default value of 400 bytes is used.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#RenderQueryTemplateKind": { + "type": "enum", + "members": { + "DOCUMENTTEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documentTemplate" + } + }, + "CHATDOCUMENTTEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chatDocumentTemplate" + } + }, + "INDEXINGFRAGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexingFragment" + } + }, + "SEARCHFRAGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "searchFragment" + } + }, + "INLINEDOCUMENTTEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inlineDocumentTemplate" + } + }, + "INLINEFRAGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inlineFragment" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#RenderQueryInput": { + "type": "structure", + "members": { + "kind": { + "target": "com.meilisearch.api#RenderQueryInputKind", + "traits": { + "smithy.api#required": {} + } + }, + "indexUid": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "inline": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.meilisearch.api#RenderQueryInputKind": { + "type": "enum", + "members": { + "INDEXDOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexDocument" + } + }, + "INLINEDOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inlineDocument" + } + }, + "INLINESEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inlineSearch" + } + } + }, + "traits": {} + }, + "com.meilisearch.api#RenderPostRequest": { + "type": "structure", + "members": { + "template": { + "target": "com.meilisearch.api#RenderQueryTemplate", + "traits": { + "smithy.api#documentation": "Template/fragment to fetch for rendering.\n\nUse its `kind` parameter to determine the type of template or fragment to fetch.", + "smithy.api#required": {} + } + }, + "input": { + "target": "com.meilisearch.api#RenderQueryInput", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#RenderResult": { + "type": "structure", + "members": { + "template": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "**Un**rendered template or fragment, fetched in index or echoed back from inline template in request.", + "smithy.api#required": {} + } + }, + "rendered": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Result of rendering the template by injecting the `input` to the template.\n\n`null` if `input` was `null` or missing in the request." + } + } + }, + "traits": {} + }, + "com.meilisearch.api#RenderPost": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#RenderPostRequest" + }, + "output": { + "target": "com.meilisearch.api#RenderResult" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + }, + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/render-template", + "code": 200 + }, + "smithy.api#documentation": "Render template\n\nRender a template, either fetched from the settings of an index (embedder document template,\nchat document template, indexing or search fragment) or provided inline, by injecting the\ngiven input (a document from an index, an inline document, or a search query).\n\nReturns the template and the rendered result, allowing to preview how Meilisearch renders\ntemplates without indexing any document.\n\nThis route is only available when the `renderRoute` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled." + } + }, + "com.meilisearch.api#CreateSnapshot": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/snapshots", + "code": 200 + }, + "smithy.api#documentation": "Create snapshot\n\nTrigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist." + } + }, + "com.meilisearch.api#GetStatsRequest": { + "type": "structure", + "members": { + "showInternalDatabaseSizes": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "showInternalDatabaseSizes", + "smithy.api#documentation": "If `true`, adds `internalDatabaseSizes` to the response." + } + }, + "sizeFormat": { + "target": "com.meilisearch.api#SizeFormat", + "traits": { + "smithy.api#httpQuery": "sizeFormat", + "smithy.api#documentation": "Specify how to format the sizes:\n\n- `\"raw\"` (default): format sizes as a number of bytes\n- `\"human\"`: format sizes as a human-readable string with an appropriate unit." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#Stats": { + "type": "structure", + "members": { + "databaseSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Total disk space used by the database in bytes", + "smithy.api#required": {} + } + }, + "usedDatabaseSize": { + "target": "com.meilisearch.api#Size", + "traits": { + "smithy.api#documentation": "Actual size of the data in the database in bytes", + "smithy.api#required": {} + } + }, + "lastUpdate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date of the last update in RFC 3339 format. Null if no update has been\nprocessed", + "com.distilled.openapi#nullable": {} + } + }, + "indexes": { + "target": "com.meilisearch.api#StatsIndexesMap", + "traits": { + "smithy.api#documentation": "Statistics for each index", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Global statistics for the Meilisearch instance" + } + }, + "com.meilisearch.api#StatsIndexesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#IndexStats" + }, + "traits": { + "smithy.api#documentation": "Statistics for each index" + } + }, + "com.meilisearch.api#GetStats": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetStatsRequest" + }, + "output": { + "target": "com.meilisearch.api#Stats" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/stats", + "code": 200 + }, + "smithy.api#documentation": "Get stats of all indexes\n\nReturn statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index." + } + }, + "com.meilisearch.api#SwapIndexesPayload": { + "type": "structure", + "members": { + "indexes": { + "target": "com.meilisearch.api#SwapIndexesPayloadIndexesList", + "traits": { + "smithy.api#documentation": "Array of the two index names to be swapped", + "smithy.api#required": {} + } + }, + "rename": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "If true, rename the first index to the second instead of swapping" + } + } + }, + "traits": { + "smithy.api#documentation": "Request body for swapping two indexes" + } + }, + "com.meilisearch.api#SwapIndexesPayloadIndexesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "Array of the two index names to be swapped" + } + }, + "com.meilisearch.api#SwapIndexesRequestBodyList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#SwapIndexesPayload" + }, + "traits": {} + }, + "com.meilisearch.api#SwapIndexesRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.meilisearch.api#SwapIndexesRequestBodyList", + "traits": { + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SwapIndexes": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#SwapIndexesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/swap-indexes", + "code": 200 + }, + "smithy.api#documentation": "Swap indexes\n\nSwap the documents, primary key, settings, and task history of two or more indexes.\n\nIndexes are swapped in pairs; a single request can include multiple pairs.\nThe operation is atomic: either all swaps succeed or none do. In the task history, every mention of one index uid is replaced by the other and vice versa.\nEnqueued tasks are left unmodified." + } + }, + "com.meilisearch.api#GetTasksRequestBatchUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequestUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequestCanceledByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequestTypesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequestStatusesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Status" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequestIndexUidsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#GetTasksRequest": { + "type": "structure", + "members": { + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "limit", + "smithy.api#documentation": "Maximum number of batches to return." + } + }, + "from": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "from", + "smithy.api#documentation": "`uid` of the first batch returned." + } + }, + "reverse": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reverse", + "smithy.api#documentation": "If `true`, returns results in the reverse order, from oldest to most recent." + } + }, + "batchUids": { + "target": "com.meilisearch.api#GetTasksRequestBatchUidsList", + "traits": { + "smithy.api#httpQuery": "batchUids", + "smithy.api#documentation": "Permits to filter tasks by their batch uid. By default, when the\n`batchUids` query parameter is not set, all task uids are returned.\nIt's possible to specify several batch uids by separating them with\nthe `,` character." + } + }, + "uids": { + "target": "com.meilisearch.api#GetTasksRequestUidsList", + "traits": { + "smithy.api#httpQuery": "uids", + "smithy.api#documentation": "Permits to filter tasks by their uid. By default, when the uids query\nparameter is not set, all task uids are returned. It's possible to\nspecify several uids by separating them with the `,` character." + } + }, + "canceledBy": { + "target": "com.meilisearch.api#GetTasksRequestCanceledByList", + "traits": { + "smithy.api#httpQuery": "canceledBy", + "smithy.api#documentation": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character." + } + }, + "types": { + "target": "com.meilisearch.api#GetTasksRequestTypesList", + "traits": { + "smithy.api#httpQuery": "types", + "smithy.api#documentation": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character." + } + }, + "statuses": { + "target": "com.meilisearch.api#GetTasksRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses", + "smithy.api#documentation": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter." + } + }, + "indexUids": { + "target": "com.meilisearch.api#GetTasksRequestIndexUidsList", + "traits": { + "smithy.api#httpQuery": "indexUids", + "smithy.api#documentation": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character." + } + }, + "afterEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format." + } + }, + "beforeEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format." + } + }, + "afterStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format." + } + }, + "beforeStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format." + } + }, + "afterFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format." + } + }, + "beforeFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#AllTasks": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#AllTasksResultsList", + "traits": { + "smithy.api#documentation": "Array of task objects matching the query", + "smithy.api#required": {} + } + }, + "total": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Total number of tasks matching the query", + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of tasks returned", + "smithy.api#required": {} + } + }, + "from": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The first task uid returned", + "com.distilled.openapi#nullable": {} + } + }, + "next": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Value to pass as `from` parameter to get the next page. When `null`, there are no more tasks to retrieve.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a paginated list of tasks" + } + }, + "com.meilisearch.api#TaskView": { + "type": "structure", + "members": { + "uid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The unique sequential identifier assigned to this task. Task UIDs are\nassigned in order of creation and can be used to retrieve specific\ntask information or track task dependencies.", + "smithy.api#required": {} + } + }, + "batchUid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The unique identifier of the batch that processed this task. Multiple\ntasks may share the same batch UID if they were processed together\nfor efficiency. This is `null` for tasks that haven't been processed.", + "com.distilled.openapi#nullable": {} + } + }, + "indexUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The unique identifier of the index this task operates on. This is\n`null` for global tasks like `dumpCreation` or `taskDeletion` that\ndon't target a specific index.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.meilisearch.api#Status", + "traits": { + "smithy.api#documentation": "The current processing status of the task. Possible values are:\n`enqueued` (waiting), `processing` (executing), `succeeded`,\n`failed`, or `canceled`.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#Kind", + "traits": { + "smithy.api#documentation": "The type of operation this task performs. Examples include\n`documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`,\n`indexCreation`, `indexDeletion`, `dumpCreation`, etc.", + "smithy.api#required": {} + } + }, + "canceledBy": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "If this task was canceled, this field contains the UID of the\n`taskCancelation` task that canceled it. This is `null` for tasks\nthat were not canceled.", + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Contains type-specific information about the task, such as the number\nof documents processed, settings that were applied, or filters that\nwere used. The structure varies depending on the task type.", + "com.distilled.openapi#nullable": {} + } + }, + "error": { + "target": "com.meilisearch.api#ResponseError", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "duration": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The total time spent processing this task, formatted as an ISO-8601\nduration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks\nthat haven't finished processing yet.", + "com.distilled.openapi#nullable": {} + } + }, + "enqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this task was added to the queue, formatted as an\nRFC 3339 date-time string. All tasks have an enqueued timestamp as\nit's set when the task is created.", + "smithy.api#required": {} + } + }, + "startedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when Meilisearch began processing this task, formatted\nas an RFC 3339 date-time string. This is `null` for tasks that are\nstill in the queue waiting to be processed." + } + }, + "finishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The timestamp when this task finished processing (whether successfully\nor with an error), formatted as an RFC 3339 date-time string. This is\n`null` for tasks that haven't finished yet." + } + }, + "network": { + "target": "com.meilisearch.api#DbTaskNetwork", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom metadata string that was attached to this task when it was\ncreated. This can be used to associate tasks with external systems,\ntrack task origins, or add any application-specific information.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents the current state and details of an asynchronous task.\n\nTasks are created when you perform operations like adding documents,\nupdating settings, or creating indexes. Use this view to monitor task\nprogress and check for errors." + } + }, + "com.meilisearch.api#Kind": { + "type": "enum", + "members": { + "DOCUMENTADDITIONORUPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documentAdditionOrUpdate" + } + }, + "DOCUMENTEDITION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documentEdition" + } + }, + "DOCUMENTDELETION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "documentDeletion" + } + }, + "SETTINGSUPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "settingsUpdate" + } + }, + "INDEXCREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexCreation" + } + }, + "INDEXDELETION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexDeletion" + } + }, + "INDEXUPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexUpdate" + } + }, + "INDEXSWAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexSwap" + } + }, + "TASKCANCELATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "taskCancelation" + } + }, + "TASKDELETION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "taskDeletion" + } + }, + "DUMPCREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dumpCreation" + } + }, + "SNAPSHOTCREATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snapshotCreation" + } + }, + "EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "export" + } + }, + "UPGRADEDATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "upgradeDatabase" + } + }, + "INDEXCOMPACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexCompaction" + } + }, + "NETWORKTOPOLOGYCHANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "networkTopologyChange" + } + }, + "DSRUPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dsrUpdate" + } + }, + "DSRCLEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dsrClear" + } + } + }, + "traits": { + "smithy.api#documentation": "The type of the task." + } + }, + "com.meilisearch.api#DbTaskNetwork": { + "type": "union", + "members": { + "Case0": { + "target": "com.meilisearch.api#DbTaskNetworkCase0" + }, + "Case1": { + "target": "com.meilisearch.api#DbTaskNetworkCase1" + }, + "Case2": { + "target": "com.meilisearch.api#DbTaskNetworkCase2" + } + }, + "traits": {} + }, + "com.meilisearch.api#DbTaskNetworkCase0": { + "type": "structure", + "members": { + "origin": { + "target": "com.meilisearch.api#Origin", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Tasks that were duplicated from `origin`" + } + }, + "com.meilisearch.api#RemoteTask": { + "type": "structure", + "members": { + "taskUid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The unique task identifier assigned by the remote Meilisearch instance.\nPresent when the task was successfully replicated to the remote.", + "com.distilled.openapi#nullable": {} + } + }, + "error": { + "target": "com.meilisearch.api#ResponseError", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Represents a task that was replicated to a remote Meilisearch instance.\nContains either the remote task UID on success, or an error if\nreplication failed." + } + }, + "com.meilisearch.api#DbTaskNetworkCase1RemoteTasksMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.meilisearch.api#RemoteTask" + }, + "traits": {} + }, + "com.meilisearch.api#DbTaskNetworkCase1": { + "type": "structure", + "members": { + "remote_tasks": { + "target": "com.meilisearch.api#DbTaskNetworkCase1RemoteTasksMap", + "traits": { + "smithy.api#required": {} + } + }, + "network_version": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Tasks that were duplicated as `remote_tasks`" + } + }, + "com.meilisearch.api#ImportData": { + "type": "structure", + "members": { + "remoteName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Remote that this task is imported from", + "smithy.api#required": {} + } + }, + "indexName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Index relevant to this task", + "com.distilled.openapi#nullable": {} + } + }, + "documentCount": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Number of documents in this task", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Import data stored in a task" + } + }, + "com.meilisearch.api#DbTaskNetworkCase2": { + "type": "structure", + "members": { + "import_from": { + "target": "com.meilisearch.api#ImportData", + "traits": { + "smithy.api#required": {} + } + }, + "network_change": { + "target": "com.meilisearch.api#Origin", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Document import tasks sent in the context of `network_change`" + } + }, + "com.meilisearch.api#AllTasksResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#TaskView" + }, + "traits": { + "smithy.api#documentation": "Array of task objects matching the query" + } + }, + "com.meilisearch.api#GetTasks": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetTasksRequest" + }, + "output": { + "target": "com.meilisearch.api#AllTasks" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/tasks", + "code": 200 + }, + "smithy.api#documentation": "List tasks\n\nThe `/tasks` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on).\n\nTasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as `indexUids`, `statuses`, `types`, and date ranges." + } + }, + "com.meilisearch.api#DeleteTasksRequestUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequestBatchUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequestCanceledByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequestTypesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Kind" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequestStatusesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Status" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequestIndexUidsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#DeleteTasksRequest": { + "type": "structure", + "members": { + "uids": { + "target": "com.meilisearch.api#DeleteTasksRequestUidsList", + "traits": { + "smithy.api#httpQuery": "uids", + "smithy.api#documentation": "Permits to select tasks by their uid. When the `uids` query\nparameter is set to `*`, all task uids included. It's possible to\nspecify several uids by separating them with the `,` character." + } + }, + "batchUids": { + "target": "com.meilisearch.api#DeleteTasksRequestBatchUidsList", + "traits": { + "smithy.api#httpQuery": "batchUids", + "smithy.api#documentation": "Lets you filter tasks by their `batchUid`." + } + }, + "canceledBy": { + "target": "com.meilisearch.api#DeleteTasksRequestCanceledByList", + "traits": { + "smithy.api#httpQuery": "canceledBy", + "smithy.api#documentation": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character." + } + }, + "types": { + "target": "com.meilisearch.api#DeleteTasksRequestTypesList", + "traits": { + "smithy.api#httpQuery": "types", + "smithy.api#documentation": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character." + } + }, + "statuses": { + "target": "com.meilisearch.api#DeleteTasksRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses", + "smithy.api#documentation": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter." + } + }, + "indexUids": { + "target": "com.meilisearch.api#DeleteTasksRequestIndexUidsList", + "traits": { + "smithy.api#httpQuery": "indexUids", + "smithy.api#documentation": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character." + } + }, + "afterEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format." + } + }, + "beforeEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format." + } + }, + "afterStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format." + } + }, + "beforeStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format." + } + }, + "afterFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format." + } + }, + "beforeFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#SummarizedTaskView": { + "type": "structure", + "members": { + "taskUid": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Unique sequential identifier of the task.", + "smithy.api#required": {} + } + }, + "indexUid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the targeted index. Null for global tasks.", + "com.distilled.openapi#nullable": {} + } + }, + "status": { + "target": "com.meilisearch.api#Status", + "traits": { + "smithy.api#documentation": "Status of the task. Possible values are `enqueued`, `processing`,\n`succeeded`, `failed`, and `canceled`.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.meilisearch.api#Kind", + "traits": { + "smithy.api#documentation": "Type of operation performed by the task.", + "smithy.api#required": {} + } + }, + "enqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Date and time when the task was enqueued.", + "smithy.api#required": {} + } + }, + "customMetadata": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Custom metadata attached to this task at creation. Use it to associate\ntasks with external systems or add application-specific information.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A summarized view of a task, returned when a task is enqueued" + } + }, + "com.meilisearch.api#DeleteTasks": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteTasksRequest" + }, + "output": { + "target": "com.meilisearch.api#SummarizedTaskView" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + }, + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/tasks", + "code": 200 + }, + "smithy.api#documentation": "Delete tasks\n\nPermanently delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) matching the given filters. You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to delete.\n\n**Note:** Only finished tasks (`succeeded`, `failed`, or `canceled`) can be deleted.\nYou cannot delete `enqueued` or `processing` tasks.\n\n**Note:** Task deletion is atomic — either all matched tasks are deleted or none are.\n\n**Note:** Each filter parameter accepts `*` to match all values (e.g., `statuses=*`)." + } + }, + "com.meilisearch.api#CancelTasksRequestUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequestBatchUidsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequestCanceledByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequestTypesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Kind" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequestStatusesList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#Status" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequestIndexUidsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.meilisearch.api#CancelTasksRequest": { + "type": "structure", + "members": { + "uids": { + "target": "com.meilisearch.api#CancelTasksRequestUidsList", + "traits": { + "smithy.api#httpQuery": "uids", + "smithy.api#documentation": "Permits to select tasks by their uid. When the `uids` query\nparameter is set to `*`, all task uids included. It's possible to\nspecify several uids by separating them with the `,` character." + } + }, + "batchUids": { + "target": "com.meilisearch.api#CancelTasksRequestBatchUidsList", + "traits": { + "smithy.api#httpQuery": "batchUids", + "smithy.api#documentation": "Lets you filter tasks by their `batchUid`." + } + }, + "canceledBy": { + "target": "com.meilisearch.api#CancelTasksRequestCanceledByList", + "traits": { + "smithy.api#httpQuery": "canceledBy", + "smithy.api#documentation": "Permits to filter tasks using the uid of the task that canceled them.\nIt's possible to specify several task uids by separating them with\nthe `,` character." + } + }, + "types": { + "target": "com.meilisearch.api#CancelTasksRequestTypesList", + "traits": { + "smithy.api#httpQuery": "types", + "smithy.api#documentation": "Permits to filter tasks by their related type. By default, when `types`\nquery parameter is not set, all task types are returned. It's possible\nto specify several types by separating them with the `,` character." + } + }, + "statuses": { + "target": "com.meilisearch.api#CancelTasksRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses", + "smithy.api#documentation": "Permits to filter tasks by their status. By default, when `statuses`\nquery parameter is not set, all task statuses are returned. It's\npossible to specify several statuses by separating them with the `,`\ncharacter." + } + }, + "indexUids": { + "target": "com.meilisearch.api#CancelTasksRequestIndexUidsList", + "traits": { + "smithy.api#httpQuery": "indexUids", + "smithy.api#documentation": "Permits to filter tasks by their related index. By default, when\n`indexUids` query parameter is not set, the tasks of all the indexes\nare returned. It is possible to specify several indexes by separating\nthem with the `,` character." + } + }, + "afterEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued after the given date. Supports RFC 3339 date format." + } + }, + "beforeEnqueuedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeEnqueuedAt", + "smithy.api#documentation": "Permits to filter tasks based on their enqueuedAt time. Matches tasks\nenqueued before the given date. Supports RFC 3339 date format." + } + }, + "afterStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted after the given date. Supports RFC 3339 date format." + } + }, + "beforeStartedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeStartedAt", + "smithy.api#documentation": "Permits to filter tasks based on their startedAt time. Matches tasks\nstarted before the given date. Supports RFC 3339 date format." + } + }, + "afterFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "afterFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished after the given date. Supports RFC 3339 date format." + } + }, + "beforeFinishedAt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "beforeFinishedAt", + "smithy.api#documentation": "Permits to filter tasks based on their finishedAt time. Matches tasks\nfinished before the given date. Supports RFC 3339 date format." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#CancelTasks": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#CancelTasksRequest" + }, + "output": { + "target": "com.meilisearch.api#SummarizedTaskView" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/tasks/cancel", + "code": 200 + }, + "smithy.api#documentation": "Cancel tasks\n\nCancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to cancel.\n\n**Note:** Task cancellation is atomic — either all matched tasks are canceled or none are.\n\n**Note:** Each filter parameter accepts `*` to match all values (e.g., `statuses=*`).\n\n**Tip:** You can cancel `taskCancelation` type tasks as long as they are `enqueued` or `processing`,\nbecause cancellation tasks are processed in reverse order of enqueueing." + } + }, + "com.meilisearch.api#TaskCompactionSummary": { + "type": "structure", + "members": { + "preSize": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Size of the task queue database before compaction." + } + }, + "postSize": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Size of the task queue database after compaction." + } + }, + "status": { + "target": "com.meilisearch.api#Status", + "traits": { + "smithy.api#documentation": "Outcome of the compaction operation.", + "smithy.api#required": {} + } + }, + "actionRequired": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Follow-up action required after a successful compaction.", + "com.distilled.openapi#nullable": {} + } + }, + "errorMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Error message if compaction failed.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#CompactTaskQueue": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#TaskCompactionSummary" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/tasks/compact", + "code": 200 + }, + "smithy.api#documentation": "Compact task queue\n\nTrigger a compaction process on the task queue database and return its size before and\nafter compaction. A successful compaction requires restarting the instance before it can\nsafely resume normal writes." + } + }, + "com.meilisearch.api#GetTasksStream": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/tasks/stream", + "code": 200 + }, + "smithy.api#documentation": "Stream tasks changes\n\nThe `/tasks/stream` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on).\n\nTasks are sent throught an SSE stream any time their status changes, i.e., enqueued, processing, succeeded, failed." + } + }, + "com.meilisearch.api#GetTaskRequest": { + "type": "structure", + "members": { + "task_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The task identifier." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetTask": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetTaskRequest" + }, + "output": { + "target": "com.meilisearch.api#TaskView" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/tasks/{task_id}", + "code": 200 + }, + "smithy.api#documentation": "Get task\n\nRetrieve a single [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations) by its uid." + } + }, + "com.meilisearch.api#GetTaskDocumentsFileRequest": { + "type": "structure", + "members": { + "task_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "The task identifier." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetTaskDocumentsFile": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetTaskDocumentsFileRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/tasks/{task_id}/documents", + "code": 200 + }, + "smithy.api#documentation": "Get task's document payload\n\nRetrieve the document payload that was sent with this [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations).\nOnly available for document-related tasks that are enqueued or processing." + } + }, + "com.meilisearch.api#VersionResponse": { + "type": "structure", + "members": { + "commitSha": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The commit used to compile this build of Meilisearch.", + "smithy.api#required": {} + } + }, + "commitDate": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The date of this build.", + "smithy.api#required": {} + } + }, + "pkgVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The version of Meilisearch.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.meilisearch.api#GetVersion": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#VersionResponse" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/version", + "code": 200 + }, + "smithy.api#documentation": "Get version\n\nReturn the current Meilisearch version, including the commit SHA and build date." + } + }, + "com.meilisearch.api#WebhookResults": { + "type": "structure", + "members": { + "results": { + "target": "com.meilisearch.api#WebhookResultsResultsList", + "traits": { + "smithy.api#documentation": "All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Response containing a list of all registered webhooks." + } + }, + "com.meilisearch.api#WebhookWithMetadataRedactedAuthorization": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#WebhookWithMetadataRedactedAuthorizationHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + }, + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the webhook.", + "smithy.api#required": {} + } + }, + "isEditable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the webhook can be edited.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Webhook object with metadata and redacted authorization headers." + } + }, + "com.meilisearch.api#WebhookWithMetadataRedactedAuthorizationHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#WebhookResultsResultsList": { + "type": "list", + "member": { + "target": "com.meilisearch.api#WebhookWithMetadataRedactedAuthorization" + }, + "traits": { + "smithy.api#documentation": "All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability." + } + }, + "com.meilisearch.api#GetWebhooks": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "com.meilisearch.api#WebhookResults" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/webhooks", + "code": 200 + }, + "smithy.api#documentation": "List webhooks\n\nReturn all webhooks registered on the instance. Each webhook is returned with its URL, optional headers, and UUID (the key value is never returned)." + } + }, + "com.meilisearch.api#PostWebhookRequestHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#PostWebhookRequest": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#PostWebhookRequestHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PostWebhookResponseHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#PostWebhookResponse": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#PostWebhookResponseHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + }, + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the webhook.", + "smithy.api#required": {} + } + }, + "isEditable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the webhook can be edited.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#PostWebhook": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PostWebhookRequest" + }, + "output": { + "target": "com.meilisearch.api#PostWebhookResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + } + ], + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/webhooks", + "code": 200 + }, + "smithy.api#documentation": "Create webhook\n\nRegister a new webhook to receive task completion notifications. You can optionally set custom headers (e.g. for authentication) and configure the callback URL." + } + }, + "com.meilisearch.api#GetWebhookRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Universally unique identifier of the webhook." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#GetWebhookResponseHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#GetWebhookResponse": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#GetWebhookResponseHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + }, + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the webhook.", + "smithy.api#required": {} + } + }, + "isEditable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the webhook can be edited.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#GetWebhook": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#GetWebhookRequest" + }, + "output": { + "target": "com.meilisearch.api#GetWebhookResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/webhooks/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "Get webhook\n\nRetrieve a single webhook by its UUID." + } + }, + "com.meilisearch.api#PatchWebhookRequestHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#PatchWebhookRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Universally unique identifier of the webhook." + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#PatchWebhookRequestHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#PatchWebhookResponseHeadersMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests." + } + }, + "com.meilisearch.api#PatchWebhookResponse": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "URL endpoint to call when tasks complete.", + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "com.meilisearch.api#PatchWebhookResponseHeadersMap", + "traits": { + "smithy.api#documentation": "HTTP headers to include in webhook requests.", + "com.distilled.openapi#nullable": {} + } + }, + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Unique identifier of the webhook.", + "smithy.api#required": {} + } + }, + "isEditable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether the webhook can be edited.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.meilisearch.api#PatchWebhook": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#PatchWebhookRequest" + }, + "output": { + "target": "com.meilisearch.api#PatchWebhookResponse" + }, + "errors": [ + { + "target": "com.meilisearch.api#BadRequest" + }, + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/webhooks/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "Update webhook\n\nUpdate the URL or headers of an existing webhook identified by its UUID." + } + }, + "com.meilisearch.api#DeleteWebhookRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Universally unique identifier of the webhook." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.meilisearch.api#DeleteWebhook": { + "type": "operation", + "input": { + "target": "com.meilisearch.api#DeleteWebhookRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.meilisearch.api#NotFound" + } + ], + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/webhooks/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "Delete webhook\n\nPermanently remove a webhook by its UUID. The webhook will no longer receive task notifications." + } + }, + "com.meilisearch.api#NotFound": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 404, + "com.distilled.openapi#errorMatchers": [ + { + "status": 404 + } + ] + } + }, + "com.meilisearch.api#BadRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#error": "client", + "smithy.api#httpError": 400, + "com.distilled.openapi#errorMatchers": [ + { + "status": 400 + } + ] + } + }, + "com.meilisearch.api#Meilisearch": { + "type": "service", + "version": "1.53.0", + "operations": [ + { + "target": "com.meilisearch.api#GetBatches" + }, + { + "target": "com.meilisearch.api#GetBatchesStream" + }, + { + "target": "com.meilisearch.api#GetBatch" + }, + { + "target": "com.meilisearch.api#ListWorkspaces" + }, + { + "target": "com.meilisearch.api#GetChat" + }, + { + "target": "com.meilisearch.api#DeleteChat" + }, + { + "target": "com.meilisearch.api#Chat" + }, + { + "target": "com.meilisearch.api#GetSettings" + }, + { + "target": "com.meilisearch.api#PatchSettings" + }, + { + "target": "com.meilisearch.api#ResetSettings" + }, + { + "target": "com.meilisearch.api#CreateDump" + }, + { + "target": "com.meilisearch.api#ListRules" + }, + { + "target": "com.meilisearch.api#ClearRules" + }, + { + "target": "com.meilisearch.api#GetRule" + }, + { + "target": "com.meilisearch.api#UpdateOrCreateRule" + }, + { + "target": "com.meilisearch.api#DeleteRule" + }, + { + "target": "com.meilisearch.api#GetFeatures" + }, + { + "target": "com.meilisearch.api#PatchFeatures" + }, + { + "target": "com.meilisearch.api#Export" + }, + { + "target": "com.meilisearch.api#GetHealth" + }, + { + "target": "com.meilisearch.api#ListIndexes" + }, + { + "target": "com.meilisearch.api#CreateIndex" + }, + { + "target": "com.meilisearch.api#GetIndex" + }, + { + "target": "com.meilisearch.api#UpdateIndex" + }, + { + "target": "com.meilisearch.api#DeleteIndex" + }, + { + "target": "com.meilisearch.api#Compact" + }, + { + "target": "com.meilisearch.api#GetDocuments" + }, + { + "target": "com.meilisearch.api#ReplaceDocuments" + }, + { + "target": "com.meilisearch.api#UpdateDocuments" + }, + { + "target": "com.meilisearch.api#ClearAllDocuments" + }, + { + "target": "com.meilisearch.api#DeleteDocumentsByFilter" + }, + { + "target": "com.meilisearch.api#DeleteDocumentsBatch" + }, + { + "target": "com.meilisearch.api#EditDocumentsByFunction" + }, + { + "target": "com.meilisearch.api#DocumentsByQueryPost" + }, + { + "target": "com.meilisearch.api#GetDocument" + }, + { + "target": "com.meilisearch.api#DeleteDocument" + }, + { + "target": "com.meilisearch.api#Search" + }, + { + "target": "com.meilisearch.api#PostIndexFields" + }, + { + "target": "com.meilisearch.api#SearchWithUrlQuery" + }, + { + "target": "com.meilisearch.api#SearchWithPost" + }, + { + "target": "com.meilisearch.api#GetAll" + }, + { + "target": "com.meilisearch.api#UpdateAll" + }, + { + "target": "com.meilisearch.api#DeleteAll" + }, + { + "target": "com.meilisearch.api#Getchat" + }, + { + "target": "com.meilisearch.api#Patchchat" + }, + { + "target": "com.meilisearch.api#Deletechat" + }, + { + "target": "com.meilisearch.api#Getdictionary" + }, + { + "target": "com.meilisearch.api#Putdictionary" + }, + { + "target": "com.meilisearch.api#Deletedictionary" + }, + { + "target": "com.meilisearch.api#GetdisplayedAttributes" + }, + { + "target": "com.meilisearch.api#PutdisplayedAttributes" + }, + { + "target": "com.meilisearch.api#DeletedisplayedAttributes" + }, + { + "target": "com.meilisearch.api#GetdistinctAttribute" + }, + { + "target": "com.meilisearch.api#PutdistinctAttribute" + }, + { + "target": "com.meilisearch.api#DeletedistinctAttribute" + }, + { + "target": "com.meilisearch.api#Getembedders" + }, + { + "target": "com.meilisearch.api#Patchembedders" + }, + { + "target": "com.meilisearch.api#Deleteembedders" + }, + { + "target": "com.meilisearch.api#GetfacetSearch" + }, + { + "target": "com.meilisearch.api#PutfacetSearch" + }, + { + "target": "com.meilisearch.api#DeletefacetSearch" + }, + { + "target": "com.meilisearch.api#Getfaceting" + }, + { + "target": "com.meilisearch.api#Patchfaceting" + }, + { + "target": "com.meilisearch.api#Deletefaceting" + }, + { + "target": "com.meilisearch.api#GetfilterableAttributes" + }, + { + "target": "com.meilisearch.api#PutfilterableAttributes" + }, + { + "target": "com.meilisearch.api#DeletefilterableAttributes" + }, + { + "target": "com.meilisearch.api#GetforeignKeys" + }, + { + "target": "com.meilisearch.api#PutforeignKeys" + }, + { + "target": "com.meilisearch.api#DeleteforeignKeys" + }, + { + "target": "com.meilisearch.api#GetlocalizedAttributes" + }, + { + "target": "com.meilisearch.api#PutlocalizedAttributes" + }, + { + "target": "com.meilisearch.api#DeletelocalizedAttributes" + }, + { + "target": "com.meilisearch.api#GetnonSeparatorTokens" + }, + { + "target": "com.meilisearch.api#PutnonSeparatorTokens" + }, + { + "target": "com.meilisearch.api#DeletenonSeparatorTokens" + }, + { + "target": "com.meilisearch.api#Getpagination" + }, + { + "target": "com.meilisearch.api#Patchpagination" + }, + { + "target": "com.meilisearch.api#Deletepagination" + }, + { + "target": "com.meilisearch.api#GetprefixSearch" + }, + { + "target": "com.meilisearch.api#PutprefixSearch" + }, + { + "target": "com.meilisearch.api#DeleteprefixSearch" + }, + { + "target": "com.meilisearch.api#GetproximityPrecision" + }, + { + "target": "com.meilisearch.api#PutproximityPrecision" + }, + { + "target": "com.meilisearch.api#DeleteproximityPrecision" + }, + { + "target": "com.meilisearch.api#GetrankingRules" + }, + { + "target": "com.meilisearch.api#PutrankingRules" + }, + { + "target": "com.meilisearch.api#DeleterankingRules" + }, + { + "target": "com.meilisearch.api#GetsearchCutoffMs" + }, + { + "target": "com.meilisearch.api#PutsearchCutoffMs" + }, + { + "target": "com.meilisearch.api#DeletesearchCutoffMs" + }, + { + "target": "com.meilisearch.api#GetsearchableAttributes" + }, + { + "target": "com.meilisearch.api#PutsearchableAttributes" + }, + { + "target": "com.meilisearch.api#DeletesearchableAttributes" + }, + { + "target": "com.meilisearch.api#GetseparatorTokens" + }, + { + "target": "com.meilisearch.api#PutseparatorTokens" + }, + { + "target": "com.meilisearch.api#DeleteseparatorTokens" + }, + { + "target": "com.meilisearch.api#GetsortableAttributes" + }, + { + "target": "com.meilisearch.api#PutsortableAttributes" + }, + { + "target": "com.meilisearch.api#DeletesortableAttributes" + }, + { + "target": "com.meilisearch.api#GetstopWords" + }, + { + "target": "com.meilisearch.api#PutstopWords" + }, + { + "target": "com.meilisearch.api#DeletestopWords" + }, + { + "target": "com.meilisearch.api#Getsynonyms" + }, + { + "target": "com.meilisearch.api#Putsynonyms" + }, + { + "target": "com.meilisearch.api#Deletesynonyms" + }, + { + "target": "com.meilisearch.api#GettypoTolerance" + }, + { + "target": "com.meilisearch.api#PatchtypoTolerance" + }, + { + "target": "com.meilisearch.api#DeletetypoTolerance" + }, + { + "target": "com.meilisearch.api#SimilarGet" + }, + { + "target": "com.meilisearch.api#SimilarPost" + }, + { + "target": "com.meilisearch.api#GetIndexStats" + }, + { + "target": "com.meilisearch.api#ListApiKeys" + }, + { + "target": "com.meilisearch.api#CreateApiKey" + }, + { + "target": "com.meilisearch.api#GetApiKey" + }, + { + "target": "com.meilisearch.api#PatchApiKey" + }, + { + "target": "com.meilisearch.api#DeleteApiKey" + }, + { + "target": "com.meilisearch.api#UpdateStderrTarget" + }, + { + "target": "com.meilisearch.api#GetLogs" + }, + { + "target": "com.meilisearch.api#CancelLogs" + }, + { + "target": "com.meilisearch.api#GetMetrics" + }, + { + "target": "com.meilisearch.api#MultiSearchWithPost" + }, + { + "target": "com.meilisearch.api#GetNetwork" + }, + { + "target": "com.meilisearch.api#PatchNetwork" + }, + { + "target": "com.meilisearch.api#PostNetworkChange" + }, + { + "target": "com.meilisearch.api#RenderPost" + }, + { + "target": "com.meilisearch.api#CreateSnapshot" + }, + { + "target": "com.meilisearch.api#GetStats" + }, + { + "target": "com.meilisearch.api#SwapIndexes" + }, + { + "target": "com.meilisearch.api#GetTasks" + }, + { + "target": "com.meilisearch.api#DeleteTasks" + }, + { + "target": "com.meilisearch.api#CancelTasks" + }, + { + "target": "com.meilisearch.api#CompactTaskQueue" + }, + { + "target": "com.meilisearch.api#GetTasksStream" + }, + { + "target": "com.meilisearch.api#GetTask" + }, + { + "target": "com.meilisearch.api#GetTaskDocumentsFile" + }, + { + "target": "com.meilisearch.api#GetVersion" + }, + { + "target": "com.meilisearch.api#GetWebhooks" + }, + { + "target": "com.meilisearch.api#PostWebhook" + }, + { + "target": "com.meilisearch.api#GetWebhook" + }, + { + "target": "com.meilisearch.api#PatchWebhook" + }, + { + "target": "com.meilisearch.api#DeleteWebhook" + } + ], + "traits": { + "smithy.api#title": "meilisearch", + "smithy.api#documentation": "Meilisearch HTTP server" + } + } + } +} diff --git a/packages/meilisearch/package.json b/packages/meilisearch/package.json new file mode 100644 index 000000000..0c14f8868 --- /dev/null +++ b/packages/meilisearch/package.json @@ -0,0 +1,85 @@ +{ + "name": "@distilled.cloud/meilisearch", + "version": "1.0.0-rc.8", + "repository": { + "type": "git", + "url": "https://github.com/alchemy-run/distilled", + "directory": "packages/meilisearch" + }, + "license": "Apache-2.0", + "type": "module", + "sideEffects": false, + "files": [ + "lib", + "src" + ], + "exports": { + ".": { + "types": "./lib/index.d.ts", + "bun": "./src/index.ts", + "worker": "./src/index.ts", + "default": "./lib/index.js" + }, + "./Credentials": { + "types": "./lib/credentials.d.ts", + "bun": "./src/credentials.ts", + "worker": "./src/credentials.ts", + "default": "./lib/credentials.js" + }, + "./Errors": { + "types": "./lib/errors.d.ts", + "bun": "./src/errors.ts", + "worker": "./src/errors.ts", + "default": "./lib/errors.js" + }, + "./Traits": { + "types": "./lib/traits.d.ts", + "bun": "./src/traits.ts", + "worker": "./src/traits.ts", + "default": "./lib/traits.js" + }, + "./Pagination": { + "types": "./lib/pagination.d.ts", + "bun": "./src/pagination.ts", + "worker": "./src/pagination.ts", + "default": "./lib/pagination.js" + }, + "./Protocol": { + "types": "./lib/protocol.d.ts", + "bun": "./src/protocol.ts", + "worker": "./src/protocol.ts", + "default": "./lib/protocol.js" + }, + "./Retry": { + "types": "./lib/retry.d.ts", + "bun": "./src/retry.ts", + "worker": "./src/retry.ts", + "default": "./lib/retry.js" + }, + "./*": { + "types": "./lib/services/*.d.ts", + "bun": "./src/services/*.ts", + "worker": "./src/services/*.ts", + "default": "./lib/services/*.js" + } + }, + "scripts": { + "build": "tsc -b", + "convert": "bun scripts/convert.ts", + "generate": "bun scripts/convert.ts && bun scripts/generate.ts", + "typecheck": "tsc -p tsconfig.json", + "specs:fetch": "git submodule update --force --init --depth=1 specs/spec-mirror-meilisearch", + "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-meilisearch" + }, + "dependencies": { + "@distilled.cloud/core": "workspace:*" + }, + "devDependencies": { + "@types/bun": "catalog:tooling", + "@types/node": "catalog:tooling", + "@effect/platform-bun": "catalog:effect" + }, + "peerDependencies": { + "effect": "catalog:effect" + } +} diff --git a/packages/meilisearch/scripts/convert.ts b/packages/meilisearch/scripts/convert.ts new file mode 100644 index 000000000..daa5c234b --- /dev/null +++ b/packages/meilisearch/scripts/convert.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env bun +/** + * convert — turn the Meilisearch OpenAPI spec into a Smithy 2.0 JSON model. + * + * Input: specs/spec-mirror-meilisearch/specs/openapi.json (spec submodule) + * patches/*.patch.json (RFC-6902 patches to the OpenAPI document) + * Output: .generated-specs/meilisearch.json + * + * The OpenAPI→Smithy converter lives in + * `@distilled.cloud/core/codegen/openapi`; this script is Meilisearch's + * pipeline config. `scripts/generate.ts` compiles the model into src/services. + */ +import * as path from "node:path"; +import { runOpenApiConvert } from "@distilled.cloud/core/codegen/openapi-cli"; + +await runOpenApiConvert({ + root: path.resolve(import.meta.dir, ".."), + specs: [ + { + name: "meilisearch", + specPath: "specs/spec-mirror-meilisearch/specs/openapi.json", + }, + ], + // OpenAPI-document patches (v0 layout: flat patches/*.patch.json). The + // smithy-model patch chain in generate.ts is disabled (`patchesDir: false`). + patchesDir: "patches", + options: { + namespace: "com.meilisearch.api", + serviceName: "Meilisearch", + skipDeprecated: true, + }, +}); diff --git a/packages/meilisearch/scripts/generate.ts b/packages/meilisearch/scripts/generate.ts new file mode 100644 index 000000000..8d05b2183 --- /dev/null +++ b/packages/meilisearch/scripts/generate.ts @@ -0,0 +1,93 @@ +#!/usr/bin/env bun +/** + * generate — turn the Smithy JSON model in .generated-specs into the + * Meilisearch Effect SDK. + * + * Input: .generated-specs/meilisearch.json (written by scripts/convert.ts) + * Output: src/services/meilisearch.ts + src/services/index.ts + * + * The smithy→SDK compiler and CLI pipeline live in + * `@distilled.cloud/core/codegen`; this script is Meilisearch's provider spec. + * Meilisearch keeps the wire's camelCase member names on the TS surface, so + * no member renaming or wire dictionaries appear here. + */ +import type { SdkSpec } from "@distilled.cloud/core/codegen/generator"; +import { runGeneratorCli } from "@distilled.cloud/core/codegen/cli"; + +const NULLABLE_TRAIT = "com.distilled.openapi#nullable"; +const ERROR_MATCHERS_TRAIT = "com.distilled.openapi#errorMatchers"; +const RAW_RESPONSE_TRAIT = "com.distilled.openapi#rawResponse"; +const SENSITIVE_TRAIT = "smithy.api#sensitive"; + +/** Meilisearch's provider spec for the shared smithy→SDK compiler. */ +const meilisearchSpec: SdkSpec = { + nullableTrait: NULLABLE_TRAIT, + errorMatchersTrait: ERROR_MATCHERS_TRAIT, + + extraBindings: [ + { + // Sole member of a synthesized wrapper for bare array/scalar response + // bodies; as the response's only member, the response IS the payload. + trait: RAW_RESPONSE_TRAIT, + binding: "rawResponse", + pipe: "T.RawResponse()", + rootPipe: "T.RawResponseRoot()", + }, + ], + + // Sensitive strings (API keys): the schema member carries T.SensitiveValue; + // the REST protocol delivers Redacted values and accepts string | Redacted + // on input. + memberTraitPipes: { + [SENSITIVE_TRAIT]: "T.SensitiveValue", + }, + memberTsType: (m) => + SENSITIVE_TRAIT in m.traits + ? `string | Redacted.Redacted${m.nullable ? " | null" : ""}` + : undefined, + + // Unions surface as TS type unions over an opaque schema — the REST + // protocol passes union content through verbatim (wire names ARE the TS + // names), so no runtime case discrimination is needed. + union: ({ name, caseTargets, tsRef }) => [ + `export type ${name} = ${caseTargets.map(tsRef).join(" | ") || "unknown"};`, + `export const ${name} = /*@__PURE__*/ S.Unknown as any as S.Schema<${name}>;\n`, + ], + + // One pagination profile: Meilisearch's cursor mode (`from` in, `next` + // out), traversed by core's paginateCursor. + paginationProfiles: { + cursor: { + strategy: "paginateCursor", + itemsFallback: "results", + }, + }, + + operationDecl: { + contextType: "MeilisearchOpContext", + commonErrorType: "MeilisearchOpError", + commonErrorClasses: ["UnknownMeilisearchError"], + protocol: "MeilisearchProtocol", + retry: "Retry.Retry", + }, + + sourceNote: ".generated-specs (specs/spec-mirror-meilisearch)", + + // Sensitive member types reference Redacted; pull the import in when used. + postProcess: (code) => + code.includes("Redacted.Redacted<") + ? code.replace( + `import * as S from "@distilled.cloud/core/schema";\n`, + `import * as S from "@distilled.cloud/core/schema";\nimport * as Redacted from "effect/Redacted";\n`, + ) + : code, +}; + +runGeneratorCli({ + description: "Generate the Meilisearch Effect SDK from the Smithy model", + root: `${import.meta.dir}/..`, + // patches/ holds OpenAPI-document patches consumed by scripts/convert.ts; + // there is no smithy-model patch chain. + patchesDir: false, + spec: () => meilisearchSpec, +}); diff --git a/packages/meilisearch/src/credentials.ts b/packages/meilisearch/src/credentials.ts new file mode 100644 index 000000000..21f0cba6e --- /dev/null +++ b/packages/meilisearch/src/credentials.ts @@ -0,0 +1,57 @@ +/** + * Meilisearch credentials — hand-written. + * + * The `Credentials` service holds an *effect* that resolves the current + * credentials on every request (the protocol layer resolves it per request + * on the calling fiber). Auth is a bearer API key (master key or a key + * created via `/keys`). + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import { ConfigError } from "@distilled.cloud/core/errors"; + +export const DEFAULT_API_BASE_URL = "http://localhost:7700"; + +export interface Config { + readonly apiKey: Redacted.Redacted; + readonly apiBaseUrl: string; +} + +export class Credentials extends Context.Service< + Credentials, + Effect.Effect +>()("MeilisearchCredentials") {} + +/** Layer from a plain API key + optional base URL. */ +export const fromApiKey = (config: { + readonly apiKey: string; + readonly apiBaseUrl?: string; +}): Layer.Layer => + Layer.succeed( + Credentials, + Effect.succeed({ + apiKey: Redacted.make(config.apiKey), + apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL, + }), + ); + +/** Reads MEILISEARCH_API_KEY (required) and MEILISEARCH_API_BASE_URL (optional). */ +export const CredentialsFromEnv: Layer.Layer = Layer.succeed( + Credentials, + Effect.gen(function* () { + const apiKey = process.env.MEILISEARCH_API_KEY; + + if (!apiKey) { + return yield* new ConfigError({ + message: "MEILISEARCH_API_KEY environment variable is required", + }); + } + + return { + apiKey: Redacted.make(apiKey), + apiBaseUrl: process.env.MEILISEARCH_API_BASE_URL ?? DEFAULT_API_BASE_URL, + }; + }).pipe(Effect.orDie), +); diff --git a/packages/meilisearch/src/errors.ts b/packages/meilisearch/src/errors.ts new file mode 100644 index 000000000..678fd0ff7 --- /dev/null +++ b/packages/meilisearch/src/errors.ts @@ -0,0 +1,50 @@ +/** + * Meilisearch-specific error types. + * + * Re-exports the common HTTP errors from core and adds the Meilisearch + * fallback errors. Note the generated service module additionally defines + * its own per-status matcher classes (BadRequest/NotFound/…) for the + * statuses each operation declares — those share `_tag`s with the core + * classes here, so `catchTag` works against either. + */ +export { + BadGateway, + BadRequest, + Conflict, + ConfigError, + Forbidden, + GatewayTimeout, + InternalServerError, + Locked, + NotFound, + ServiceUnavailable, + TooManyRequests, + Unauthorized, + UnprocessableEntity, + HTTP_STATUS_MAP, + DEFAULT_ERRORS, + API_ERRORS, +} from "@distilled.cloud/core/errors"; +export type { DefaultErrors } from "@distilled.cloud/core/errors"; + +import * as Schema from "effect/Schema"; +import * as Category from "@distilled.cloud/core/category"; + +/** Unknown Meilisearch error — returned when nothing else matches the failure. */ +export class UnknownMeilisearchError extends Schema.TaggedError()( + "UnknownMeilisearchError", + { + code: Schema.optional(Schema.String), + message: Schema.optional(Schema.String), + body: Schema.Unknown, + }, +).pipe(Category.withServerError) {} + +/** Schema parse error wrapper. */ +export class MeilisearchParseError extends Schema.TaggedError()( + "MeilisearchParseError", + { + body: Schema.Unknown, + cause: Schema.Unknown, + }, +).pipe(Category.withParseError) {} diff --git a/packages/meilisearch/src/index.ts b/packages/meilisearch/src/index.ts new file mode 100644 index 000000000..b29c6ece7 --- /dev/null +++ b/packages/meilisearch/src/index.ts @@ -0,0 +1,27 @@ +/** + * @distilled.cloud/meilisearch — Meilisearch SDK for Effect. + * + * `./services` is generated by `scripts/generate.ts` from the Smithy model + * in `.generated-specs` (written by `scripts/convert.ts` from the OpenAPI + * spec). Everything else in this folder is hand-written. + * + * @example + * ```ts + * import * as Meilisearch from "@distilled.cloud/meilisearch"; + * + * const indexes = yield* Meilisearch.Services.meilisearch.listIndexes({}); + * ``` + */ +export * from "./credentials.ts"; +export * from "./errors.ts"; +export * as T from "./traits.ts"; +export { + MeilisearchProtocol, + type MeilisearchOpError, + type MeilisearchOpContext, +} from "./protocol.ts"; +export { paginateCursor } from "./pagination.ts"; +export * as Retry from "./retry.ts"; +export * as Services from "./services/index.ts"; +export * from "./services/meilisearch.ts"; +export { BadRequest, NotFound } from "./services/meilisearch.ts"; diff --git a/packages/meilisearch/src/pagination.ts b/packages/meilisearch/src/pagination.ts new file mode 100644 index 000000000..fa8af6873 --- /dev/null +++ b/packages/meilisearch/src/pagination.ts @@ -0,0 +1,8 @@ +/** + * Meilisearch pagination — hand-written. + * + * Meilisearch's task/batch list operations are cursor-mode (`from` in, + * `next` out); generated operations pass core's {@link paginateCursor} + * strategy to `API.makePaginated`. + */ +export { paginateCursor } from "@distilled.cloud/core/pagination"; diff --git a/packages/meilisearch/src/protocol.ts b/packages/meilisearch/src/protocol.ts new file mode 100644 index 000000000..f3c72b157 --- /dev/null +++ b/packages/meilisearch/src/protocol.ts @@ -0,0 +1,68 @@ +/** + * MeilisearchProtocol — hand-written. + * + * Meilisearch speaks plain bearer-authenticated JSON REST (no response + * envelope), so the whole protocol is one `makeRestProtocol` call from + * `core/protocol-rest`: + * + * request: credentials → `Authorization: Bearer ` + base URL + * (default http://localhost:7700), resolved from the calling + * fiber on every request + * + * response: 2xx JSON is the payload (sensitive members delivered as + * `Redacted`); non-2xx `{ code?, message }` bodies map to the + * operation's typed error classes by status, then the shared + * HTTP-status classes, then {@link UnknownMeilisearchError}. + */ +import * as Effect from "effect/Effect"; +import type * as Layer from "effect/Layer"; +import * as Redacted from "effect/Redacted"; +import type * as HttpClient from "effect/unstable/http/HttpClient"; +import type * as HttpClientError from "effect/unstable/http/HttpClientError"; +import type * as API from "@distilled.cloud/core/api"; +import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest"; +import type { API_ERRORS, ConfigError } from "@distilled.cloud/core/errors"; +import { Credentials, type Config } from "./credentials.ts"; +import { UnknownMeilisearchError } from "./errors.ts"; + +/** + * Error channel shared by every generated Meilisearch operation. Generated + * service files annotate operations with `API.OperationMethod` explicitly so the compiler + * never infers these back out of the schema generics. + */ +export type MeilisearchOpError = + | InstanceType<(typeof API_ERRORS)[number]> + | UnknownMeilisearchError + | ConfigError + | HttpClientError.HttpClientError; + +/** Context (requirements) shared by every generated Meilisearch operation. */ +export type MeilisearchOpContext = Credentials | HttpClient.HttpClient; + +export const MeilisearchProtocol: Layer.Layer = + makeRestProtocol({ + // The Credentials service holds an effect — resolving it here (per + // request, on the calling fiber) picks up context-provided credentials. + credentials: Effect.gen(function* () { + const resolve = yield* Credentials; + return yield* resolve; + }), + baseUrl: (creds) => creds.apiBaseUrl, + headers: (creds) => ({ + Authorization: `Bearer ${Redacted.value(creds.apiKey)}`, + }), + // Meilisearch's error body is `{ message, code, type, link }` — the + // factory's default lenient envelope covers `code`/`message`. + unknownError: ({ code, message, body }) => + new UnknownMeilisearchError({ + code: + typeof code === "string" + ? code + : code !== undefined + ? String(code) + : undefined, + message, + body, + }), + }); diff --git a/packages/meilisearch/src/retry.ts b/packages/meilisearch/src/retry.ts new file mode 100644 index 000000000..666ec5414 --- /dev/null +++ b/packages/meilisearch/src/retry.ts @@ -0,0 +1,56 @@ +/** + * Meilisearch retry configuration. + * + * Defines the per-SDK `Retry` Context.Service tag that generated operations + * wire into `API.make`. Callers can install a blanket retry policy at the + * layer level and have every Meilisearch API call below it pick it up: + * + * @example + * ```ts + * import * as Meilisearch from "@distilled.cloud/meilisearch"; + * + * myEffect.pipe(Meilisearch.Retry.transient); + * Effect.provide(myEffect, Layer.succeed(Meilisearch.Retry.Retry, customPolicy)); + * ``` + */ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Layer from "effect/Layer"; +import { + type Policy, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +export { + type Options, + type Factory, + type Policy, + makeDefault, + jittered, + capped, + throttlingOptions, + transientOptions, + throttlingFactory, + transientFactory, +} from "@distilled.cloud/core/retry"; + +/** Context tag for configuring retry behavior of Meilisearch API calls. */ +export class Retry extends Context.Service()( + "MeilisearchRetry", +) {} + +/** Provides a custom retry policy to every Meilisearch API call below it. */ +export const policy = (optionsOrFactory: Policy) => + Effect.provide(Layer.succeed(Retry, optionsOrFactory)); + +/** Disables all automatic retries. */ +export const none = Effect.provide( + Layer.succeed(Retry, { while: () => false }), +); + +/** Apply the throttling retry policy (retries throttling errors indefinitely). */ +export const throttling = policy(throttlingFactory); + +/** Apply the transient retry policy (retries all transient errors indefinitely). */ +export const transient = policy(transientFactory); diff --git a/packages/meilisearch/src/services/index.ts b/packages/meilisearch/src/services/index.ts new file mode 100644 index 000000000..a695d0dd6 --- /dev/null +++ b/packages/meilisearch/src/services/index.ts @@ -0,0 +1,2 @@ +// AUTO-GENERATED by scripts/generate.ts. Do not edit. +export * as meilisearch from "./meilisearch.ts"; diff --git a/packages/meilisearch/src/services/meilisearch.ts b/packages/meilisearch/src/services/meilisearch.ts new file mode 100644 index 000000000..154a17b75 --- /dev/null +++ b/packages/meilisearch/src/services/meilisearch.ts @@ -0,0 +1,11616 @@ +// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-meilisearch). Do not edit. +import * as S from "@distilled.cloud/core/schema"; +import * as Redacted from "effect/Redacted"; +import * as API from "@distilled.cloud/core/api"; +import * as C from "@distilled.cloud/core/category"; +import * as T from "../traits.ts"; +import { + MeilisearchProtocol, + type MeilisearchOpError, + type MeilisearchOpContext, +} from "../protocol.ts"; +import { UnknownMeilisearchError } from "../errors.ts"; +import * as Retry from "../retry.ts"; + +export type { MeilisearchOpError, MeilisearchOpContext }; + +export class BadRequest + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("BadRequest", { + code: S.Number, + message: S.String, + }).pipe(C.withBadRequestError), + [{ status: 400 }], + ) {} + +export class NotFound + extends /*@__PURE__*/ T.applyErrorMatchers( + /*@__PURE__*/ S.TaggedError()("NotFound", { + code: S.Number, + message: S.String, + }).pipe(C.withBadRequestError), + [{ status: 404 }], + ) {} + +export interface CancelLogsRequest {} +export const CancelLogsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/logs/stream", code: 200 }), + ), +).annotate({ + identifier: "CancelLogsRequest", +}) as any as S.Schema; + +export interface CancelLogsResponse {} +export const CancelLogsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CancelLogsResponse", +}) as any as S.Schema; + +export type CancelTasksRequestUidsList = Array; +export const CancelTasksRequestUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CancelTasksRequestBatchUidsList = Array; +export const CancelTasksRequestBatchUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CancelTasksRequestCanceledByList = Array; +export const CancelTasksRequestCanceledByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** The type of the task. */ +export type Kind = + | "documentAdditionOrUpdate" + | "documentEdition" + | "documentDeletion" + | "settingsUpdate" + | "indexCreation" + | "indexDeletion" + | "indexUpdate" + | "indexSwap" + | "taskCancelation" + | "taskDeletion" + | "dumpCreation" + | "snapshotCreation" + | "export" + | "upgradeDatabase" + | "indexCompaction" + | "networkTopologyChange" + | "dsrUpdate" + | "dsrClear"; +export const Kind = /*@__PURE__*/ S.String; + +export type CancelTasksRequestTypesList = Array; +export const CancelTasksRequestTypesList = /*@__PURE__*/ S.Array( + Kind, +) as any as S.Schema; + +/** The status of a task. */ +export type Status = + | "enqueued" + | "processing" + | "succeeded" + | "failed" + | "canceled"; +export const Status = /*@__PURE__*/ S.String; + +export type CancelTasksRequestStatusesList = Array; +export const CancelTasksRequestStatusesList = /*@__PURE__*/ S.Array( + Status, +) as any as S.Schema; + +export type CancelTasksRequestIndexUidsList = Array; +export const CancelTasksRequestIndexUidsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface CancelTasksRequest { + /** Permits to select tasks by their uid. When the `uids` query parameter is set to `*`, all task uids included. It's possible to specify several uids by separating them with the `,` character. */ + uids?: CancelTasksRequestUidsList; + /** Lets you filter tasks by their `batchUid`. */ + batchUids?: CancelTasksRequestBatchUidsList; + /** Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character. */ + canceledBy?: CancelTasksRequestCanceledByList; + /** Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character. */ + types?: CancelTasksRequestTypesList; + /** Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character. */ + statuses?: CancelTasksRequestStatusesList; + /** Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character. */ + indexUids?: CancelTasksRequestIndexUidsList; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format. */ + afterEnqueuedAt?: string; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format. */ + beforeEnqueuedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format. */ + afterStartedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format. */ + beforeStartedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format. */ + afterFinishedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format. */ + beforeFinishedAt?: string; +} +export const CancelTasksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uids: S.optional(CancelTasksRequestUidsList.pipe(T.Query())), + batchUids: S.optional(CancelTasksRequestBatchUidsList.pipe(T.Query())), + canceledBy: S.optional(CancelTasksRequestCanceledByList.pipe(T.Query())), + types: S.optional(CancelTasksRequestTypesList.pipe(T.Query())), + statuses: S.optional(CancelTasksRequestStatusesList.pipe(T.Query())), + indexUids: S.optional(CancelTasksRequestIndexUidsList.pipe(T.Query())), + afterEnqueuedAt: S.optional(S.String.pipe(T.Query())), + beforeEnqueuedAt: S.optional(S.String.pipe(T.Query())), + afterStartedAt: S.optional(S.String.pipe(T.Query())), + beforeStartedAt: S.optional(S.String.pipe(T.Query())), + afterFinishedAt: S.optional(S.String.pipe(T.Query())), + beforeFinishedAt: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "POST", uri: "/tasks/cancel", code: 200 })), +).annotate({ + identifier: "CancelTasksRequest", +}) as any as S.Schema; + +/** A summarized view of a task, returned when a task is enqueued */ +export interface SummarizedTaskView { + /** Unique sequential identifier of the task. */ + taskUid: number; + /** Unique identifier of the targeted index. Null for global tasks. */ + indexUid?: string | null; + /** Status of the task. Possible values are `enqueued`, `processing`, `succeeded`, `failed`, and `canceled`. */ + status: Status; + /** Type of operation performed by the task. */ + type: Kind; + /** Date and time when the task was enqueued. */ + enqueuedAt: string; + /** Custom metadata attached to this task at creation. Use it to associate tasks with external systems or add application-specific information. */ + customMetadata?: string | null; +} +export const SummarizedTaskView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskUid: S.Number, + indexUid: S.optional(S.NullOr(S.String)), + status: Status, + type: Kind, + enqueuedAt: S.String, + customMetadata: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "SummarizedTaskView", +}) as any as S.Schema; + +/** A text content part of a message. */ +export interface ChatCompletionRequestMessageContentPartText { + text: string; +} +export const ChatCompletionRequestMessageContentPartText = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + text: S.String, + }), + ).annotate({ + identifier: "ChatCompletionRequestMessageContentPartText", + }) as any as S.Schema; + +export type ChatCompletionRequestDeveloperMessageContentCase1List = + Array; +export const ChatCompletionRequestDeveloperMessageContentCase1List = + /*@__PURE__*/ S.Array( + ChatCompletionRequestMessageContentPartText, + ) as any as S.Schema; + +/** The contents of a developer message: either a text string or an array of text content parts. */ +export type ChatCompletionRequestDeveloperMessageContent = + | string + | ChatCompletionRequestDeveloperMessageContentCase1List; +export const ChatCompletionRequestDeveloperMessageContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ChatCompletionRequestMessageCase0Role = "developer"; +export const ChatCompletionRequestMessageCase0Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase0 { + /** The contents of the developer message. */ + content: ChatCompletionRequestDeveloperMessageContent; + /** An optional name for the participant. Provides the model information to differentiate between participants of the same role. */ + name?: string | null; + role: ChatCompletionRequestMessageCase0Role; +} +export const ChatCompletionRequestMessageCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: ChatCompletionRequestDeveloperMessageContent, + name: S.optional(S.NullOr(S.String)), + role: ChatCompletionRequestMessageCase0Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase0", +}) as any as S.Schema; + +export type ChatCompletionRequestSystemMessageContentPartType = "text"; +export const ChatCompletionRequestSystemMessageContentPartType = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestSystemMessageContentPart { + text: string; + type: ChatCompletionRequestSystemMessageContentPartType | (string & {}); +} +export const ChatCompletionRequestSystemMessageContentPart = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + text: S.String, + type: ChatCompletionRequestSystemMessageContentPartType, + }), + ).annotate({ + identifier: "ChatCompletionRequestSystemMessageContentPart", + }) as any as S.Schema; + +/** An array of content parts with a defined type. For system messages, only type `text` is supported. */ +export type ChatCompletionRequestSystemMessageContentCase1List = + Array; +export const ChatCompletionRequestSystemMessageContentCase1List = + /*@__PURE__*/ S.Array( + ChatCompletionRequestSystemMessageContentPart, + ) as any as S.Schema; + +/** The contents of a system message: either a text string or an array of text content parts. */ +export type ChatCompletionRequestSystemMessageContent = + | string + | ChatCompletionRequestSystemMessageContentCase1List; +export const ChatCompletionRequestSystemMessageContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ChatCompletionRequestMessageCase1Role = "system"; +export const ChatCompletionRequestMessageCase1Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase1 { + /** The contents of the system message. */ + content: ChatCompletionRequestSystemMessageContent; + /** An optional name for the participant. Provides the model information to differentiate between participants of the same role. */ + name?: string | null; + role: ChatCompletionRequestMessageCase1Role; +} +export const ChatCompletionRequestMessageCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: ChatCompletionRequestSystemMessageContent, + name: S.optional(S.NullOr(S.String)), + role: ChatCompletionRequestMessageCase1Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase1", +}) as any as S.Schema; + +export type ChatCompletionRequestUserMessageContentPartCase0Type = "text"; +export const ChatCompletionRequestUserMessageContentPartCase0Type = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestUserMessageContentPartCase0 { + text: string; + type: ChatCompletionRequestUserMessageContentPartCase0Type; +} +export const ChatCompletionRequestUserMessageContentPartCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + text: S.String, + type: ChatCompletionRequestUserMessageContentPartCase0Type, + }), + ).annotate({ + identifier: "ChatCompletionRequestUserMessageContentPartCase0", + }) as any as S.Schema; + +/** Specifies the detail level of the image. */ +export type ImageDetail = "auto" | "low" | "high"; +export const ImageDetail = /*@__PURE__*/ S.String; + +/** An image URL with optional detail level. */ +export interface ImageUrl { + /** Either a URL of the image or the base64 encoded image data. */ + url: string; + detail?: ImageDetail | (string & {}) | null; +} +export const ImageUrl = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.String, + detail: S.optional(S.NullOr(ImageDetail)), + }), +).annotate({ identifier: "ImageUrl" }) as any as S.Schema; + +export type ChatCompletionRequestUserMessageContentPartCase1Type = "image_url"; +export const ChatCompletionRequestUserMessageContentPartCase1Type = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestUserMessageContentPartCase1 { + image_url: ImageUrl; + type: ChatCompletionRequestUserMessageContentPartCase1Type; +} +export const ChatCompletionRequestUserMessageContentPartCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + image_url: ImageUrl, + type: ChatCompletionRequestUserMessageContentPartCase1Type, + }), + ).annotate({ + identifier: "ChatCompletionRequestUserMessageContentPartCase1", + }) as any as S.Schema; + +/** The format of the encoded audio data. */ +export type InputAudioFormat = "wav" | "mp3"; +export const InputAudioFormat = /*@__PURE__*/ S.String; + +/** Input audio data for an audio content part. */ +export interface InputAudio { + /** Base64 encoded audio data. */ + data: string; + /** The format of the encoded audio data. Currently supports "wav" and "mp3". */ + format: InputAudioFormat | (string & {}); +} +export const InputAudio = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: S.String, + format: InputAudioFormat, + }), +).annotate({ identifier: "InputAudio" }) as any as S.Schema; + +export type ChatCompletionRequestUserMessageContentPartCase2Type = + "input_audio"; +export const ChatCompletionRequestUserMessageContentPartCase2Type = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestUserMessageContentPartCase2 { + input_audio: InputAudio; + type: ChatCompletionRequestUserMessageContentPartCase2Type; +} +export const ChatCompletionRequestUserMessageContentPartCase2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + input_audio: InputAudio, + type: ChatCompletionRequestUserMessageContentPartCase2Type, + }), + ).annotate({ + identifier: "ChatCompletionRequestUserMessageContentPartCase2", + }) as any as S.Schema; + +/** A content part in a user message (text, image, or audio). */ +export type ChatCompletionRequestUserMessageContentPart = + | ChatCompletionRequestUserMessageContentPartCase0 + | ChatCompletionRequestUserMessageContentPartCase1 + | ChatCompletionRequestUserMessageContentPartCase2; +export const ChatCompletionRequestUserMessageContentPart = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text, image, or audio inputs. */ +export type ChatCompletionRequestUserMessageContentCase1List = + Array; +export const ChatCompletionRequestUserMessageContentCase1List = + /*@__PURE__*/ S.Array( + ChatCompletionRequestUserMessageContentPart, + ) as any as S.Schema; + +/** The contents of a user message: either a text string or an array of content parts (text, image, or audio). */ +export type ChatCompletionRequestUserMessageContent = + | string + | ChatCompletionRequestUserMessageContentCase1List; +export const ChatCompletionRequestUserMessageContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ChatCompletionRequestMessageCase2Role = "user"; +export const ChatCompletionRequestMessageCase2Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase2 { + /** The contents of the user message. */ + content: ChatCompletionRequestUserMessageContent; + /** An optional name for the participant. Provides the model information to differentiate between participants of the same role. */ + name?: string | null; + role: ChatCompletionRequestMessageCase2Role; +} +export const ChatCompletionRequestMessageCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: ChatCompletionRequestUserMessageContent, + name: S.optional(S.NullOr(S.String)), + role: ChatCompletionRequestMessageCase2Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase2", +}) as any as S.Schema; + +export type ChatCompletionRequestAssistantMessageContentPartCase0Type = "text"; +export const ChatCompletionRequestAssistantMessageContentPartCase0Type = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestAssistantMessageContentPartCase0 { + text: string; + type: ChatCompletionRequestAssistantMessageContentPartCase0Type; +} +export const ChatCompletionRequestAssistantMessageContentPartCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + text: S.String, + type: ChatCompletionRequestAssistantMessageContentPartCase0Type, + }), + ).annotate({ + identifier: "ChatCompletionRequestAssistantMessageContentPartCase0", + }) as any as S.Schema; + +export type ChatCompletionRequestAssistantMessageContentPartCase1Type = + "refusal"; +export const ChatCompletionRequestAssistantMessageContentPartCase1Type = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestAssistantMessageContentPartCase1 { + /** The refusal message generated by the model. */ + refusal: string; + type: ChatCompletionRequestAssistantMessageContentPartCase1Type; +} +export const ChatCompletionRequestAssistantMessageContentPartCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + refusal: S.String, + type: ChatCompletionRequestAssistantMessageContentPartCase1Type, + }), + ).annotate({ + identifier: "ChatCompletionRequestAssistantMessageContentPartCase1", + }) as any as S.Schema; + +/** A content part in an assistant message (text or refusal). */ +export type ChatCompletionRequestAssistantMessageContentPart = + | ChatCompletionRequestAssistantMessageContentPartCase0 + | ChatCompletionRequestAssistantMessageContentPartCase1; +export const ChatCompletionRequestAssistantMessageContentPart = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`. */ +export type ChatCompletionRequestAssistantMessageContentCase1List = + Array; +export const ChatCompletionRequestAssistantMessageContentCase1List = + /*@__PURE__*/ S.Array( + ChatCompletionRequestAssistantMessageContentPart, + ) as any as S.Schema; + +/** The contents of an assistant message: either a text string or an array of content parts (text or refusal). */ +export type ChatCompletionRequestAssistantMessageContent = + | string + | ChatCompletionRequestAssistantMessageContentCase1List; +export const ChatCompletionRequestAssistantMessageContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Data about a previous audio response from the model, used in multi-turn conversations. */ +export interface ChatCompletionRequestAssistantMessageAudio { + /** Unique identifier for a previous audio response from the model. */ + id: string; +} +export const ChatCompletionRequestAssistantMessageAudio = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + }), + ).annotate({ + identifier: "ChatCompletionRequestAssistantMessageAudio", + }) as any as S.Schema; + +/** The type of a tool. Currently, only `function` is supported. */ +export type ChatCompletionToolType = "function"; +export const ChatCompletionToolType = /*@__PURE__*/ S.String; + +/** The name and arguments of a function that should be called, as generated by the model. */ +export interface FunctionCall { + /** The name of the function to call. */ + name: string; + /** The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. */ + arguments: string; +} +export const FunctionCall = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + arguments: S.String, + }), +).annotate({ identifier: "FunctionCall" }) as any as S.Schema; + +/** A tool call generated by the model. */ +export interface ChatCompletionMessageToolCall { + /** The ID of the tool call. */ + id: string; + type?: ChatCompletionToolType | (string & {}) | null; + /** The function that the model called. */ + function: FunctionCall; +} +export const ChatCompletionMessageToolCall = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + type: S.optional(S.NullOr(ChatCompletionToolType)), + function: FunctionCall, + }), +).annotate({ + identifier: "ChatCompletionMessageToolCall", +}) as any as S.Schema; + +export type ChatCompletionRequestMessageCase3ToolCallsList = + Array; +export const ChatCompletionRequestMessageCase3ToolCallsList = + /*@__PURE__*/ S.Array( + ChatCompletionMessageToolCall, + ) as any as S.Schema; + +export type ChatCompletionRequestMessageCase3Role = "assistant"; +export const ChatCompletionRequestMessageCase3Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase3 { + content?: ChatCompletionRequestAssistantMessageContent | null; + /** The refusal message by the assistant. */ + refusal?: string | null; + /** An optional name for the participant. Provides the model information to differentiate between participants of the same role. */ + name?: string | null; + audio?: ChatCompletionRequestAssistantMessageAudio | null; + tool_calls?: ChatCompletionRequestMessageCase3ToolCallsList | null; + function_call?: FunctionCall | null; + role: ChatCompletionRequestMessageCase3Role; +} +export const ChatCompletionRequestMessageCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.optional(S.NullOr(ChatCompletionRequestAssistantMessageContent)), + refusal: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + audio: S.optional(S.NullOr(ChatCompletionRequestAssistantMessageAudio)), + tool_calls: S.optional( + S.NullOr(ChatCompletionRequestMessageCase3ToolCallsList), + ), + function_call: S.optional(S.NullOr(FunctionCall)), + role: ChatCompletionRequestMessageCase3Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase3", +}) as any as S.Schema; + +export type ChatCompletionRequestToolMessageContentPartType = "text"; +export const ChatCompletionRequestToolMessageContentPartType = + /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestToolMessageContentPart { + text: string; + type: ChatCompletionRequestToolMessageContentPartType | (string & {}); +} +export const ChatCompletionRequestToolMessageContentPart = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + text: S.String, + type: ChatCompletionRequestToolMessageContentPartType, + }), + ).annotate({ + identifier: "ChatCompletionRequestToolMessageContentPart", + }) as any as S.Schema; + +/** An array of content parts with a defined type. For tool messages, only type `text` is supported. */ +export type ChatCompletionRequestToolMessageContentCase1List = + Array; +export const ChatCompletionRequestToolMessageContentCase1List = + /*@__PURE__*/ S.Array( + ChatCompletionRequestToolMessageContentPart, + ) as any as S.Schema; + +/** The contents of a tool message: either a text string or an array of text content parts. */ +export type ChatCompletionRequestToolMessageContent = + | string + | ChatCompletionRequestToolMessageContentCase1List; +export const ChatCompletionRequestToolMessageContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type ChatCompletionRequestMessageCase4Role = "tool"; +export const ChatCompletionRequestMessageCase4Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase4 { + /** The contents of the tool message. */ + content: ChatCompletionRequestToolMessageContent; + tool_call_id: string; + role: ChatCompletionRequestMessageCase4Role; +} +export const ChatCompletionRequestMessageCase4 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: ChatCompletionRequestToolMessageContent, + tool_call_id: S.String, + role: ChatCompletionRequestMessageCase4Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase4", +}) as any as S.Schema; + +export type ChatCompletionRequestMessageCase5Role = "function"; +export const ChatCompletionRequestMessageCase5Role = /*@__PURE__*/ S.String; + +export interface ChatCompletionRequestMessageCase5 { + /** The return value from the function call, to return to the model. */ + content?: string | null; + /** The name of the function to call. */ + name: string; + role: ChatCompletionRequestMessageCase5Role; +} +export const ChatCompletionRequestMessageCase5 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.optional(S.NullOr(S.String)), + name: S.String, + role: ChatCompletionRequestMessageCase5Role, + }), +).annotate({ + identifier: "ChatCompletionRequestMessageCase5", +}) as any as S.Schema; + +/** A message in the chat completion conversation. Tagged by `role` (system, user, assistant, tool, developer, or function). */ +export type ChatCompletionRequestMessage = + | ChatCompletionRequestMessageCase0 + | ChatCompletionRequestMessageCase1 + | ChatCompletionRequestMessageCase2 + | ChatCompletionRequestMessageCase3 + | ChatCompletionRequestMessageCase4 + | ChatCompletionRequestMessageCase5; +export const ChatCompletionRequestMessage = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). */ +export type ChatRequestMessagesList = Array; +export const ChatRequestMessagesList = /*@__PURE__*/ S.Array( + ChatCompletionRequestMessage, +) as any as S.Schema; + +/** Constrains effort on reasoning for reasoning models. Supported values are `low`, `medium`, and `high`. */ +export type ReasoningEffort = "low" | "medium" | "high"; +export const ReasoningEffort = /*@__PURE__*/ S.String; + +/** Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. */ +export type ChatRequestLogitBiasMap = { [key: string]: unknown | undefined }; +export const ChatRequestLogitBiasMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Output types that you would like the model to generate for this request. Most models are capable of generating text, which is the default: `["text"]` The `gpt-4o-audio-preview` model can also be used to [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]` */ +export type ChatCompletionModalities = "text" | "audio"; +export const ChatCompletionModalities = /*@__PURE__*/ S.String; + +/** Output types that you would like the model to generate for this request. Most models are capable of generating text, which is the default: `["text"]`. */ +export type ChatRequestModalitiesList = Array< + ChatCompletionModalities | (string & {}) +>; +export const ChatRequestModalitiesList = /*@__PURE__*/ S.Array( + ChatCompletionModalities, +) as any as S.Schema; + +/** An array of content parts with a defined type. Supported options differ based on the [model](https://platform.openai.com/docs/models) being used to generate the response. Can contain text inputs. */ +export type PredictionContentContentCase1List = + Array; +export const PredictionContentContentCase1List = /*@__PURE__*/ S.Array( + ChatCompletionRequestMessageContentPartText, +) as any as S.Schema; + +/** The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. */ +export type PredictionContentContent = + | string + | PredictionContentContentCase1List; +export const PredictionContentContent = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type PredictionContentType = "content"; +export const PredictionContentType = /*@__PURE__*/ S.String; + +/** The type of the predicted content you want to provide. This type is currently always `content`. */ +export interface PredictionContent { + /** The type of the predicted content you want to provide. This type is currently always `content`. */ + content: PredictionContentContent; + type: PredictionContentType | (string & {}); +} +export const PredictionContent = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: PredictionContentContent, + type: PredictionContentType, + }), +).annotate({ + identifier: "PredictionContent", +}) as any as S.Schema; + +/** The voice the model uses to respond in audio output. */ +export type ChatCompletionAudioVoice = + | "alloy" + | "ash" + | "ballad" + | "coral" + | "echo" + | "sage" + | "shimmer" + | "verse"; +export const ChatCompletionAudioVoice = /*@__PURE__*/ S.String; + +/** Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`. */ +export type ChatCompletionAudioFormat = + | "wav" + | "mp3" + | "flac" + | "opus" + | "pcm16"; +export const ChatCompletionAudioFormat = /*@__PURE__*/ S.String; + +/** Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. */ +export interface ChatCompletionAudio { + /** The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive). */ + voice: ChatCompletionAudioVoice | (string & {}); + /** Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`. */ + format: ChatCompletionAudioFormat | (string & {}); +} +export const ChatCompletionAudio = /*@__PURE__*/ S.suspend(() => + S.Struct({ + voice: ChatCompletionAudioVoice, + format: ChatCompletionAudioFormat, + }), +).annotate({ + identifier: "ChatCompletionAudio", +}) as any as S.Schema; + +export type ResponseFormatCase0Type = "text"; +export const ResponseFormatCase0Type = /*@__PURE__*/ S.String; + +/** The type of response format being defined: `text` */ +export interface ResponseFormatCase0 { + type: ResponseFormatCase0Type; +} +export const ResponseFormatCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: ResponseFormatCase0Type, + }), +).annotate({ + identifier: "ResponseFormatCase0", +}) as any as S.Schema; + +export type ResponseFormatCase1Type = "json_object"; +export const ResponseFormatCase1Type = /*@__PURE__*/ S.String; + +/** The type of response format being defined: `json_object` */ +export interface ResponseFormatCase1 { + type: ResponseFormatCase1Type; +} +export const ResponseFormatCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: ResponseFormatCase1Type, + }), +).annotate({ + identifier: "ResponseFormatCase1", +}) as any as S.Schema; + +/** A JSON Schema-based response format specification for Structured Outputs. */ +export interface ResponseFormatJsonSchema { + /** A description of what the response format is for, used by the model to determine how to respond in the format. */ + description?: string | null; + /** The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */ + name: string; + /** The schema for the response format, described as a JSON Schema object. */ + schema?: unknown; + /** Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). */ + strict?: boolean | null; +} +export const ResponseFormatJsonSchema = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: S.String, + schema: S.optional(S.Unknown), + strict: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "ResponseFormatJsonSchema", +}) as any as S.Schema; + +export type ResponseFormatCase2Type = "json_schema"; +export const ResponseFormatCase2Type = /*@__PURE__*/ S.String; + +/** The type of response format being defined: `json_schema` */ +export interface ResponseFormatCase2 { + json_schema: ResponseFormatJsonSchema; + type: ResponseFormatCase2Type; +} +export const ResponseFormatCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + json_schema: ResponseFormatJsonSchema, + type: ResponseFormatCase2Type, + }), +).annotate({ + identifier: "ResponseFormatCase2", +}) as any as S.Schema; + +/** An object specifying the format that the model must output (text, JSON object, or JSON schema). */ +export type ResponseFormat = + | ResponseFormatCase0 + | ResponseFormatCase1 + | ResponseFormatCase2; +export const ResponseFormat = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Specifies the latency tier to use for processing the request. */ +export type ServiceTier = "auto" | "default"; +export const ServiceTier = /*@__PURE__*/ S.String; + +export type StopCase1List = Array; +export const StopCase1List = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Up to 4 sequences where the API will stop generating further tokens. */ +export type Stop = string | StopCase1List; +export const Stop = /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Options for streaming response. Only set this when you set `stream: true`. */ +export interface ChatCompletionStreamOptions { + /** If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value. */ + include_usage: boolean; +} +export const ChatCompletionStreamOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include_usage: S.Boolean, + }), +).annotate({ + identifier: "ChatCompletionStreamOptions", +}) as any as S.Schema; + +/** A function definition for tool use, described as a JSON Schema object. */ +export interface FunctionObject { + /** The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string | null; + /** The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list. */ + parameters?: unknown; + /** Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling). */ + strict?: boolean | null; +} +export const FunctionObject = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + description: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.Unknown), + strict: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ identifier: "FunctionObject" }) as any as S.Schema; + +/** A tool the model may call. Currently, only functions are supported as a tool. */ +export interface ChatCompletionTool { + type: ChatCompletionToolType | (string & {}); + function: FunctionObject; +} +export const ChatCompletionTool = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: ChatCompletionToolType, + function: FunctionObject, + }), +).annotate({ + identifier: "ChatCompletionTool", +}) as any as S.Schema; + +/** A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. */ +export type ChatRequestToolsList = Array; +export const ChatRequestToolsList = /*@__PURE__*/ S.Array( + ChatCompletionTool, +) as any as S.Schema; + +export type ChatCompletionToolChoiceOptionCase0 = "none"; +export const ChatCompletionToolChoiceOptionCase0 = /*@__PURE__*/ S.String; + +export type ChatCompletionToolChoiceOptionCase1 = "auto"; +export const ChatCompletionToolChoiceOptionCase1 = /*@__PURE__*/ S.String; + +export type ChatCompletionToolChoiceOptionCase2 = "required"; +export const ChatCompletionToolChoiceOptionCase2 = /*@__PURE__*/ S.String; + +/** A wrapper for a function name reference. */ +export interface FunctionName { + /** The name of the function to call. */ + name: string; +} +export const FunctionName = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + }), +).annotate({ identifier: "FunctionName" }) as any as S.Schema; + +/** Specifies a tool the model should use. Use to force the model to call a specific function. */ +export interface ChatCompletionNamedToolChoice { + /** The type of the tool. Currently, only `function` is supported. */ + type: ChatCompletionToolType | (string & {}); + function: FunctionName; +} +export const ChatCompletionNamedToolChoice = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: ChatCompletionToolType, + function: FunctionName, + }), +).annotate({ + identifier: "ChatCompletionNamedToolChoice", +}) as any as S.Schema; + +export interface ChatCompletionToolChoiceOptionCase3 { + named: ChatCompletionNamedToolChoice; +} +export const ChatCompletionToolChoiceOptionCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + named: ChatCompletionNamedToolChoice, + }), +).annotate({ + identifier: "ChatCompletionToolChoiceOptionCase3", +}) as any as S.Schema; + +/** Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. `none` is the default when no tools are present. `auto` is the default if tools are present.present. */ +export type ChatCompletionToolChoiceOption = + | ChatCompletionToolChoiceOptionCase0 + | ChatCompletionToolChoiceOptionCase1 + | ChatCompletionToolChoiceOptionCase2 + | ChatCompletionToolChoiceOptionCase3; +export const ChatCompletionToolChoiceOption = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** The model does not call a function, and responds to the end-user. */ +export type ChatCompletionFunctionCallCase0 = "none"; +export const ChatCompletionFunctionCallCase0 = /*@__PURE__*/ S.String; + +/** The model can pick between an end-user or calling a function. */ +export type ChatCompletionFunctionCallCase1 = "auto"; +export const ChatCompletionFunctionCallCase1 = /*@__PURE__*/ S.String; + +/** Forces the model to call the specified function. */ +export interface ChatCompletionFunctionCallCase2Function { + name: string; +} +export const ChatCompletionFunctionCallCase2Function = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + name: S.String, + }), +).annotate({ + identifier: "ChatCompletionFunctionCallCase2Function", +}) as any as S.Schema; + +/** Forces the model to call the specified function. */ +export interface ChatCompletionFunctionCallCase2 { + /** Forces the model to call the specified function. */ + Function: ChatCompletionFunctionCallCase2Function; +} +export const ChatCompletionFunctionCallCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + Function: ChatCompletionFunctionCallCase2Function, + }), +).annotate({ + identifier: "ChatCompletionFunctionCallCase2", +}) as any as S.Schema; + +/** Deprecated in favor of `tool_choice`. Controls which (if any) function is called by the model. */ +export type ChatCompletionFunctionCall = + | ChatCompletionFunctionCallCase0 + | ChatCompletionFunctionCallCase1 + | ChatCompletionFunctionCallCase2; +export const ChatCompletionFunctionCall = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Deprecated: A function the model may generate JSON inputs for. Use `ChatCompletionTool` instead. */ +export interface ChatCompletionFunctions { + /** The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */ + name: string; + /** A description of what the function does, used by the model to choose when and how to call the function. */ + description?: string | null; + /** The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list. */ + parameters: unknown; +} +export const ChatCompletionFunctions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + description: S.optional(S.NullOr(S.String)), + parameters: S.Unknown, + }), +).annotate({ + identifier: "ChatCompletionFunctions", +}) as any as S.Schema; + +/** Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for. */ +export type ChatRequestFunctionsList = Array; +export const ChatRequestFunctionsList = /*@__PURE__*/ S.Array( + ChatCompletionFunctions, +) as any as S.Schema; + +export interface ChatRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; + /** A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio). */ + messages: ChatRequestMessagesList; + /** ID of the model to use. See the [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) table for details on which models work with the Chat API. */ + model: string; + /** Whether or not to store the output of this chat completion request for use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products. */ + store?: boolean | null; + reasoning_effort?: ReasoningEffort | (string & {}) | null; + /** Developer-defined tags and values used for filtering completions in the [dashboard](https://platform.openai.com/chat-completions). */ + metadata?: unknown; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. */ + frequency_penalty?: number | null; + /** Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. */ + logit_bias?: ChatRequestLogitBiasMap | null; + /** Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. */ + logprobs?: boolean | null; + /** An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used. */ + top_logprobs?: number | null; + /** The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning). */ + max_tokens?: number | null; + /** An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning). */ + max_completion_tokens?: number | null; + /** How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. */ + n?: number | null; + /** Output types that you would like the model to generate for this request. Most models are capable of generating text, which is the default: `["text"]`. */ + modalities?: ChatRequestModalitiesList | null; + prediction?: PredictionContent | null; + audio?: ChatCompletionAudio | null; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. */ + presence_penalty?: number | null; + response_format?: ResponseFormat | null; + /** This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. */ + seed?: number | null; + service_tier?: ServiceTier | (string & {}) | null; + stop?: Stop | null; + /** If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). */ + stream?: boolean | null; + stream_options?: ChatCompletionStreamOptions | null; + /** What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. */ + temperature?: number | null; + /** An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. */ + top_p?: number | null; + /** A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. */ + tools?: ChatRequestToolsList | null; + tool_choice?: ChatCompletionToolChoiceOption | null; + /** Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. */ + parallel_tool_calls?: boolean | null; + /** A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */ + user?: string | null; + function_call?: ChatCompletionFunctionCall | null; + /** Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for. */ + functions?: ChatRequestFunctionsList | null; +} +export const ChatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + messages: ChatRequestMessagesList, + model: S.String, + store: S.optional(S.NullOr(S.Boolean)), + reasoning_effort: S.optional(S.NullOr(ReasoningEffort)), + metadata: S.optional(S.Unknown), + frequency_penalty: S.optional(S.NullOr(S.Number)), + logit_bias: S.optional(S.NullOr(ChatRequestLogitBiasMap)), + logprobs: S.optional(S.NullOr(S.Boolean)), + top_logprobs: S.optional(S.NullOr(S.Number)), + max_tokens: S.optional(S.NullOr(S.Number)), + max_completion_tokens: S.optional(S.NullOr(S.Number)), + n: S.optional(S.NullOr(S.Number)), + modalities: S.optional(S.NullOr(ChatRequestModalitiesList)), + prediction: S.optional(S.NullOr(PredictionContent)), + audio: S.optional(S.NullOr(ChatCompletionAudio)), + presence_penalty: S.optional(S.NullOr(S.Number)), + response_format: S.optional(S.NullOr(ResponseFormat)), + seed: S.optional(S.NullOr(S.Number)), + service_tier: S.optional(S.NullOr(ServiceTier)), + stop: S.optional(S.NullOr(Stop)), + stream: S.optional(S.NullOr(S.Boolean)), + stream_options: S.optional(S.NullOr(ChatCompletionStreamOptions)), + temperature: S.optional(S.NullOr(S.Number)), + top_p: S.optional(S.NullOr(S.Number)), + tools: S.optional(S.NullOr(ChatRequestToolsList)), + tool_choice: S.optional(S.NullOr(ChatCompletionToolChoiceOption)), + parallel_tool_calls: S.optional(S.NullOr(S.Boolean)), + user: S.optional(S.NullOr(S.String)), + function_call: S.optional(S.NullOr(ChatCompletionFunctionCall)), + functions: S.optional(S.NullOr(ChatRequestFunctionsList)), + }).pipe( + T.Http({ + method: "POST", + uri: "/chats/{workspace_uid}/chat/completions", + code: 200, + }), + ), +).annotate({ identifier: "ChatRequest" }) as any as S.Schema; + +/** The tool calls generated by the model, such as function calls. */ +export type ChatCompletionResponseMessageToolCallsList = + Array; +export const ChatCompletionResponseMessageToolCallsList = /*@__PURE__*/ S.Array( + ChatCompletionMessageToolCall, +) as any as S.Schema; + +/** The role of the author of a message. */ +export type Role = "system" | "user" | "assistant" | "tool" | "function"; +export const Role = /*@__PURE__*/ S.String; + +/** Audio data in a chat completion response message. */ +export interface ChatCompletionResponseMessageAudio { + /** Unique identifier for this audio response. */ + id: string; + /** The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations. */ + expires_at: number; + /** Base64 encoded audio bytes generated by the model, in the format specified in the request. */ + data: string; + /** Transcript of the audio generated by the model. */ + transcript: string; +} +export const ChatCompletionResponseMessageAudio = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + expires_at: S.Number, + data: S.String, + transcript: S.String, + }), +).annotate({ + identifier: "ChatCompletionResponseMessageAudio", +}) as any as S.Schema; + +/** A chat completion message generated by the model. */ +export interface ChatCompletionResponseMessage { + /** The contents of the message. */ + content?: string | null; + /** The refusal message generated by the model. */ + refusal?: string | null; + /** The tool calls generated by the model, such as function calls. */ + tool_calls?: ChatCompletionResponseMessageToolCallsList | null; + /** The role of the author of this message. */ + role: Role; + function_call?: FunctionCall | null; + audio?: ChatCompletionResponseMessageAudio | null; +} +export const ChatCompletionResponseMessage = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.optional(S.NullOr(S.String)), + refusal: S.optional(S.NullOr(S.String)), + tool_calls: S.optional( + S.NullOr(ChatCompletionResponseMessageToolCallsList), + ), + role: Role, + function_call: S.optional(S.NullOr(FunctionCall)), + audio: S.optional(S.NullOr(ChatCompletionResponseMessageAudio)), + }), +).annotate({ + identifier: "ChatCompletionResponseMessage", +}) as any as S.Schema; + +/** The reason the model stopped generating tokens. */ +export type FinishReason = + | "stop" + | "length" + | "tool_calls" + | "content_filter" + | "function_call"; +export const FinishReason = /*@__PURE__*/ S.String; + +/** A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */ +export type ChatCompletionTokenLogprobBytesList = Array; +export const ChatCompletionTokenLogprobBytesList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */ +export type TopLogprobsBytesList = Array; +export const TopLogprobsBytesList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** A most likely token and its log probability at a given position. */ +export interface TopLogprobs { + /** The token. */ + token: string; + /** The log probability of this token. */ + logprob: number; + /** A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */ + bytes?: TopLogprobsBytesList | null; +} +export const TopLogprobs = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String, + logprob: S.Number, + bytes: S.optional(S.NullOr(TopLogprobsBytesList)), + }), +).annotate({ identifier: "TopLogprobs" }) as any as S.Schema; + +/** List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. */ +export type ChatCompletionTokenLogprobTopLogprobsList = Array; +export const ChatCompletionTokenLogprobTopLogprobsList = /*@__PURE__*/ S.Array( + TopLogprobs, +) as any as S.Schema; + +/** Log probability information for an output token. */ +export interface ChatCompletionTokenLogprob { + /** The token. */ + token: string; + /** The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. */ + logprob: number; + /** A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */ + bytes?: ChatCompletionTokenLogprobBytesList | null; + /** List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. */ + top_logprobs: ChatCompletionTokenLogprobTopLogprobsList; +} +export const ChatCompletionTokenLogprob = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String, + logprob: S.Number, + bytes: S.optional(S.NullOr(ChatCompletionTokenLogprobBytesList)), + top_logprobs: ChatCompletionTokenLogprobTopLogprobsList, + }), +).annotate({ + identifier: "ChatCompletionTokenLogprob", +}) as any as S.Schema; + +/** A list of message content tokens with log probability information. */ +export type ChatChoiceLogprobsContentList = Array; +export const ChatChoiceLogprobsContentList = /*@__PURE__*/ S.Array( + ChatCompletionTokenLogprob, +) as any as S.Schema; + +export type ChatChoiceLogprobsRefusalList = Array; +export const ChatChoiceLogprobsRefusalList = /*@__PURE__*/ S.Array( + ChatCompletionTokenLogprob, +) as any as S.Schema; + +/** Log probability information for a chat completion choice. */ +export interface ChatChoiceLogprobs { + /** A list of message content tokens with log probability information. */ + content?: ChatChoiceLogprobsContentList | null; + refusal?: ChatChoiceLogprobsRefusalList | null; +} +export const ChatChoiceLogprobs = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.optional(S.NullOr(ChatChoiceLogprobsContentList)), + refusal: S.optional(S.NullOr(ChatChoiceLogprobsRefusalList)), + }), +).annotate({ + identifier: "ChatChoiceLogprobs", +}) as any as S.Schema; + +/** A chat completion choice generated by the model. */ +export interface ChatChoice { + /** The index of the choice in the list of choices. */ + index: number; + message: ChatCompletionResponseMessage; + finish_reason?: FinishReason | null; + logprobs?: ChatChoiceLogprobs | null; +} +export const ChatChoice = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index: S.Number, + message: ChatCompletionResponseMessage, + finish_reason: S.optional(S.NullOr(FinishReason)), + logprobs: S.optional(S.NullOr(ChatChoiceLogprobs)), + }), +).annotate({ identifier: "ChatChoice" }) as any as S.Schema; + +/** A list of chat completion choices. Can be more than one if `n` is greater than 1. */ +export type CreateChatCompletionResponseChoicesList = Array; +export const CreateChatCompletionResponseChoicesList = /*@__PURE__*/ S.Array( + ChatChoice, +) as any as S.Schema; + +/** The service tier used for processing the request, as returned in the response. */ +export type ServiceTierResponse = "scale" | "default" | "auto"; +export const ServiceTierResponse = /*@__PURE__*/ S.String; + +/** Breakdown of tokens used in a completion. */ +export interface PromptTokensDetails { + /** Audio input tokens present in the prompt. */ + audio_tokens?: number | null; + /** Cached tokens present in the prompt. */ + cached_tokens?: number | null; +} +export const PromptTokensDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + audio_tokens: S.optional(S.NullOr(S.Number)), + cached_tokens: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "PromptTokensDetails", +}) as any as S.Schema; + +/** Breakdown of tokens used in a completion. */ +export interface CompletionTokensDetails { + accepted_prediction_tokens?: number | null; + /** Audio input tokens generated by the model. */ + audio_tokens?: number | null; + /** Tokens generated by the model for reasoning. */ + reasoning_tokens?: number | null; + /** When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits. */ + rejected_prediction_tokens?: number | null; +} +export const CompletionTokensDetails = /*@__PURE__*/ S.suspend(() => + S.Struct({ + accepted_prediction_tokens: S.optional(S.NullOr(S.Number)), + audio_tokens: S.optional(S.NullOr(S.Number)), + reasoning_tokens: S.optional(S.NullOr(S.Number)), + rejected_prediction_tokens: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "CompletionTokensDetails", +}) as any as S.Schema; + +/** Usage statistics for the completion request. */ +export interface CompletionUsage { + /** Number of tokens in the prompt. */ + prompt_tokens: number; + /** Number of tokens in the generated completion. */ + completion_tokens: number; + /** Total number of tokens used in the request (prompt + completion). */ + total_tokens: number; + prompt_tokens_details?: PromptTokensDetails | null; + completion_tokens_details?: CompletionTokensDetails | null; +} +export const CompletionUsage = /*@__PURE__*/ S.suspend(() => + S.Struct({ + prompt_tokens: S.Number, + completion_tokens: S.Number, + total_tokens: S.Number, + prompt_tokens_details: S.optional(S.NullOr(PromptTokensDetails)), + completion_tokens_details: S.optional(S.NullOr(CompletionTokensDetails)), + }), +).annotate({ + identifier: "CompletionUsage", +}) as any as S.Schema; + +/** Represents a chat completion response returned by model, based on the provided input. */ +export interface CreateChatCompletionResponse { + /** A unique identifier for the chat completion. */ + id: string; + /** A list of chat completion choices. Can be more than one if `n` is greater than 1. */ + choices: CreateChatCompletionResponseChoicesList; + /** The Unix timestamp (in seconds) of when the chat completion was created. */ + created: number; + /** The model used for the chat completion. */ + model: string; + service_tier?: ServiceTierResponse | null; + /** This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. */ + system_fingerprint?: string | null; + /** The object type, which is always `chat.completion`. */ + object: string; + usage?: CompletionUsage | null; +} +export const CreateChatCompletionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String, + choices: CreateChatCompletionResponseChoicesList, + created: S.Number, + model: S.String, + service_tier: S.optional(S.NullOr(ServiceTierResponse)), + system_fingerprint: S.optional(S.NullOr(S.String)), + object: S.String, + usage: S.optional(S.NullOr(CompletionUsage)), + }), +).annotate({ + identifier: "CreateChatCompletionResponse", +}) as any as S.Schema; + +export interface ClearAllDocumentsRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; +} +export const ClearAllDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + customMetadata: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/documents", + code: 200, + }), + ), +).annotate({ + identifier: "ClearAllDocumentsRequest", +}) as any as S.Schema; + +export interface ClearAllDocumentsResponse {} +export const ClearAllDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "ClearAllDocumentsResponse", +}) as any as S.Schema; + +export interface ClearRulesRequest {} +export const ClearRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/dynamic-search-rules", code: 200 }), + ), +).annotate({ + identifier: "ClearRulesRequest", +}) as any as S.Schema; + +export interface ClearRulesResponse {} +export const ClearRulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "ClearRulesResponse", +}) as any as S.Schema; + +export interface CompactRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const CompactRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/indexes/{index_uid}/compact", code: 200 }), + ), +).annotate({ identifier: "CompactRequest" }) as any as S.Schema; + +export interface CompactResponse {} +export const CompactResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CompactResponse", +}) as any as S.Schema; + +export interface CompactTaskQueueRequest {} +export const CompactTaskQueueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/tasks/compact", code: 200 }), + ), +).annotate({ + identifier: "CompactTaskQueueRequest", +}) as any as S.Schema; + +export interface TaskCompactionSummary { + /** Size of the task queue database before compaction. */ + preSize?: string; + /** Size of the task queue database after compaction. */ + postSize?: string; + /** Outcome of the compaction operation. */ + status: Status; + /** Follow-up action required after a successful compaction. */ + actionRequired?: string | null; + /** Error message if compaction failed. */ + errorMessage?: string | null; +} +export const TaskCompactionSummary = /*@__PURE__*/ S.suspend(() => + S.Struct({ + preSize: S.optional(S.String), + postSize: S.optional(S.String), + status: Status, + actionRequired: S.optional(S.NullOr(S.String)), + errorMessage: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "TaskCompactionSummary", +}) as any as S.Schema; + +export type Action = + | "*" + | "search" + | "documents.*" + | "documents.add" + | "documents.get" + | "documents.delete" + | "indexes.*" + | "indexes.create" + | "indexes.get" + | "indexes.update" + | "indexes.delete" + | "indexes.swap" + | "tasks.*" + | "tasks.cancel" + | "tasks.delete" + | "tasks.get" + | "settings.*" + | "settings.get" + | "settings.update" + | "stats.*" + | "stats.get" + | "metrics.*" + | "metrics.get" + | "dumps.*" + | "dumps.create" + | "snapshots.*" + | "snapshots.create" + | "version" + | "keys.create" + | "keys.get" + | "keys.update" + | "keys.delete" + | "experimental.get" + | "experimental.update" + | "export" + | "network.get" + | "network.update" + | "chatCompletions" + | "chats.*" + | "chats.get" + | "chats.delete" + | "chatsSettings.*" + | "chatsSettings.get" + | "chatsSettings.update" + | "*.get" + | "webhooks.get" + | "webhooks.update" + | "webhooks.delete" + | "webhooks.create" + | "webhooks.*" + | "indexes.compact" + | "fields.post" + | "tasks.compact" + | "dynamicSearchRules.get" + | "dynamicSearchRules.create" + | "dynamicSearchRules.update" + | "dynamicSearchRules.delete" + | "dynamicSearchRules.*"; +export const Action = /*@__PURE__*/ S.String; + +/** A list of actions permitted for the key. `["*"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints. Valid actions include: `search`, `documents.add`, `documents.get`, `documents.delete`, `indexes.create`, `indexes.get`, `indexes.update`, `indexes.delete`, `indexes.swap`, `tasks.get`, `tasks.cancel`, `tasks.delete`, `settings.get`, `settings.update`, `stats.get`, `dumps.create`, `snapshots.create`, `version`, `keys.get`, `keys.create`, `keys.update`, `keys.delete`. Use `*` to grant all actions. */ +export type CreateApiKeyRequestActionsList = Array; +export const CreateApiKeyRequestActionsList = /*@__PURE__*/ S.Array( + Action, +) as any as S.Schema; + +/** A list of accessible indexes permitted for the key. `["*"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`. */ +export type CreateApiKeyRequestIndexesList = Array; +export const CreateApiKeyRequestIndexesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface CreateApiKeyRequest { + /** A description for the key. `null` if empty. */ + description?: string | null; + /** A human-readable name for the key. `null` if empty. */ + name?: string | null; + /** A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch. */ + uid?: string | null; + /** A list of actions permitted for the key. `["*"]` for all actions. The `*` character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints. Valid actions include: `search`, `documents.add`, `documents.get`, `documents.delete`, `indexes.create`, `indexes.get`, `indexes.update`, `indexes.delete`, `indexes.swap`, `tasks.get`, `tasks.cancel`, `tasks.delete`, `settings.get`, `settings.update`, `stats.get`, `dumps.create`, `snapshots.create`, `version`, `keys.get`, `keys.create`, `keys.update`, `keys.delete`. Use `*` to grant all actions. */ + actions: CreateApiKeyRequestActionsList; + /** A list of accessible indexes permitted for the key. `["*"]` for all indexes. The `*` character can be used as a wildcard when located at the last position. e.g. `products_*` to allow access to all indexes whose names start with `products_`. */ + indexes: CreateApiKeyRequestIndexesList; + /** Represent the expiration date and time as RFC 3339 format. `null` equals to no expiration time. Set to `null` to create a key that never expires. Once a key is past its expiry date, using it returns an error. */ + expiresAt: string | null; +} +export const CreateApiKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + uid: S.optional(S.NullOr(S.String)), + actions: CreateApiKeyRequestActionsList, + indexes: CreateApiKeyRequestIndexesList, + expiresAt: S.NullOr(S.String), + }).pipe(T.Http({ method: "POST", uri: "/keys", code: 200 })), +).annotate({ + identifier: "CreateApiKeyRequest", +}) as any as S.Schema; + +/** The list of actions (permissions) this key is allowed to perform. Examples include `documents.add`, `search`, `indexes.create`, `settings.update`, etc. Use `*` to grant all permissions. */ +export type KeyViewActionsList = Array; +export const KeyViewActionsList = /*@__PURE__*/ S.Array( + Action, +) as any as S.Schema; + +/** The list of index UIDs this key can access. Use `*` to grant access to all indexes, including future ones. Patterns are also supported, e.g., `movies_*` matches any index starting with "movies_". */ +export type KeyViewIndexesList = Array; +export const KeyViewIndexesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Represents an API key used for authenticating requests to Meilisearch. Each key has specific permissions defined by its actions and can be scoped to particular indexes. Keys provide fine-grained access control for your Meilisearch instance. */ +export interface KeyView { + /** A human-readable name for the API key. Use this to identify the purpose of each key, such as "Frontend Search Key" or "Admin Key for CI/CD". This is optional and can be `null`. */ + name?: string | null; + /** A longer description explaining the purpose or usage of this API key. Useful for documenting why the key was created and how it should be used. This is optional and can be `null`. */ + description?: string | null; + /** The actual API key string to use in the `Authorization: Bearer ` header when making requests to Meilisearch. Keep this value secret and never expose it in client-side code. */ + key: string; + /** The unique identifier (UUID) for this API key. Use this to update or delete the key. The UID remains constant even if the key's name or description changes. */ + uid: string; + /** The list of actions (permissions) this key is allowed to perform. Examples include `documents.add`, `search`, `indexes.create`, `settings.update`, etc. Use `*` to grant all permissions. */ + actions: KeyViewActionsList; + /** The list of index UIDs this key can access. Use `*` to grant access to all indexes, including future ones. Patterns are also supported, e.g., `movies_*` matches any index starting with "movies_". */ + indexes: KeyViewIndexesList; + /** The expiration date and time of the key in RFC 3339 format. After this time, the key will no longer be valid for authentication. Set to `null` for keys that never expire. */ + expiresAt?: string | null; + /** The date and time when this API key was created, formatted as an RFC 3339 date-time string. This is automatically set by Meilisearch and cannot be modified. */ + createdAt: string; + /** The date and time when this API key was last modified, formatted as an RFC 3339 date-time string. This is automatically updated by Meilisearch when the key's name or description changes. */ + updatedAt: string; +} +export const KeyView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + key: S.String, + uid: S.String, + actions: KeyViewActionsList, + indexes: KeyViewIndexesList, + expiresAt: S.optional(S.NullOr(S.String)), + createdAt: S.String, + updatedAt: S.String, + }), +).annotate({ identifier: "KeyView" }) as any as S.Schema; + +export interface CreateDumpRequest {} +export const CreateDumpRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "POST", uri: "/dumps", code: 200 })), +).annotate({ + identifier: "CreateDumpRequest", +}) as any as S.Schema; + +export interface CreateDumpResponse {} +export const CreateDumpResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDumpResponse", +}) as any as S.Schema; + +export interface CreateIndexRequest { + /** Unique identifier for the index */ + uid: string; + /** [Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index */ + primaryKey?: string | null; +} +export const CreateIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String, + primaryKey: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "POST", uri: "/indexes", code: 200 })), +).annotate({ + identifier: "CreateIndexRequest", +}) as any as S.Schema; + +export interface CreateIndexResponse {} +export const CreateIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateIndexResponse", +}) as any as S.Schema; + +export interface CreateSnapshotRequest {} +export const CreateSnapshotRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "POST", uri: "/snapshots", code: 200 })), +).annotate({ + identifier: "CreateSnapshotRequest", +}) as any as S.Schema; + +export interface CreateSnapshotResponse {} +export const CreateSnapshotResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSnapshotResponse", +}) as any as S.Schema; + +export interface DeleteAllRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteAllRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteAllRequest", +}) as any as S.Schema; + +export interface DeleteAllResponse {} +export const DeleteAllResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteAllResponse", +}) as any as S.Schema; + +export interface DeleteApiKeyRequest { + /** The `uid` or `key` field of an existing API key. */ + key: string; +} +export const DeleteApiKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/keys/{key}", code: 200 })), +).annotate({ + identifier: "DeleteApiKeyRequest", +}) as any as S.Schema; + +export interface DeleteApiKeyResponse {} +export const DeleteApiKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteApiKeyResponse", +}) as any as S.Schema; + +export interface DeletechatRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletechatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/chat", + code: 200, + }), + ), +).annotate({ + identifier: "DeletechatRequest", +}) as any as S.Schema; + +export interface DeletechatResponse {} +export const DeletechatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletechatResponse", +}) as any as S.Schema; + +export interface DeleteChatRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; +} +export const DeleteChatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/chats/{workspace_uid}", code: 200 }), + ), +).annotate({ + identifier: "DeleteChatRequest", +}) as any as S.Schema; + +export interface DeleteChatResponse {} +export const DeleteChatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteChatResponse", +}) as any as S.Schema; + +export interface DeletedictionaryRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletedictionaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/dictionary", + code: 200, + }), + ), +).annotate({ + identifier: "DeletedictionaryRequest", +}) as any as S.Schema; + +export interface DeletedictionaryResponse {} +export const DeletedictionaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletedictionaryResponse", +}) as any as S.Schema; + +export interface DeletedisplayedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletedisplayedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/displayed-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "DeletedisplayedAttributesRequest", +}) as any as S.Schema; + +export interface DeletedisplayedAttributesResponse {} +export const DeletedisplayedAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletedisplayedAttributesResponse", +}) as any as S.Schema; + +export interface DeletedistinctAttributeRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletedistinctAttributeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/distinct-attribute", + code: 200, + }), + ), +).annotate({ + identifier: "DeletedistinctAttributeRequest", +}) as any as S.Schema; + +export interface DeletedistinctAttributeResponse {} +export const DeletedistinctAttributeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletedistinctAttributeResponse", +}) as any as S.Schema; + +export interface DeleteDocumentRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Document identifier. */ + document_id: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; +} +export const DeleteDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + document_id: S.String.pipe(T.Label()), + customMetadata: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/documents/{document_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteDocumentRequest", +}) as any as S.Schema; + +export interface DeleteDocumentResponse {} +export const DeleteDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDocumentResponse", +}) as any as S.Schema; + +export type DeleteDocumentsBatchRequestBodyList = Array; +export const DeleteDocumentsBatchRequestBodyList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export interface DeleteDocumentsBatchRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; + body: DeleteDocumentsBatchRequestBodyList; +} +export const DeleteDocumentsBatchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + customMetadata: S.optional(S.String.pipe(T.Query())), + body: DeleteDocumentsBatchRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/documents/delete-batch", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteDocumentsBatchRequest", +}) as any as S.Schema; + +export interface DeleteDocumentsBatchResponse {} +export const DeleteDocumentsBatchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDocumentsBatchResponse", +}) as any as S.Schema; + +export interface DeleteDocumentsByFilterRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; + /** Filter expression to match documents for deletion. Attributes must be in `filterableAttributes` before they can be used. Accepts a string or an array of arrays. Sending an empty filter will return a `bad_request` error. */ + filter: unknown; +} +export const DeleteDocumentsByFilterRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + customMetadata: S.optional(S.String.pipe(T.Query())), + filter: S.Unknown, + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/documents/delete", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteDocumentsByFilterRequest", +}) as any as S.Schema; + +export interface DeleteDocumentsByFilterResponse {} +export const DeleteDocumentsByFilterResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDocumentsByFilterResponse", +}) as any as S.Schema; + +export interface DeleteembeddersRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteembeddersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/embedders", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteembeddersRequest", +}) as any as S.Schema; + +export interface DeleteembeddersResponse {} +export const DeleteembeddersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteembeddersResponse", +}) as any as S.Schema; + +export interface DeletefacetingRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletefacetingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/faceting", + code: 200, + }), + ), +).annotate({ + identifier: "DeletefacetingRequest", +}) as any as S.Schema; + +export interface DeletefacetingResponse {} +export const DeletefacetingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletefacetingResponse", +}) as any as S.Schema; + +export interface DeletefacetSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletefacetSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/facet-search", + code: 200, + }), + ), +).annotate({ + identifier: "DeletefacetSearchRequest", +}) as any as S.Schema; + +export interface DeletefacetSearchResponse {} +export const DeletefacetSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletefacetSearchResponse", +}) as any as S.Schema; + +export interface DeletefilterableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletefilterableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/filterable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "DeletefilterableAttributesRequest", +}) as any as S.Schema; + +export interface DeletefilterableAttributesResponse {} +export const DeletefilterableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletefilterableAttributesResponse", +}) as any as S.Schema; + +export interface DeleteforeignKeysRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteforeignKeysRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/foreign-keys", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteforeignKeysRequest", +}) as any as S.Schema; + +export interface DeleteforeignKeysResponse {} +export const DeleteforeignKeysResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteforeignKeysResponse", +}) as any as S.Schema; + +export interface DeleteIndexRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/indexes/{index_uid}", code: 200 })), +).annotate({ + identifier: "DeleteIndexRequest", +}) as any as S.Schema; + +export interface DeleteIndexResponse {} +export const DeleteIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteIndexResponse", +}) as any as S.Schema; + +export interface DeletelocalizedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletelocalizedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/localized-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "DeletelocalizedAttributesRequest", +}) as any as S.Schema; + +export interface DeletelocalizedAttributesResponse {} +export const DeletelocalizedAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletelocalizedAttributesResponse", +}) as any as S.Schema; + +export interface DeletenonSeparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletenonSeparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/non-separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "DeletenonSeparatorTokensRequest", +}) as any as S.Schema; + +export interface DeletenonSeparatorTokensResponse {} +export const DeletenonSeparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletenonSeparatorTokensResponse", +}) as any as S.Schema; + +export interface DeletepaginationRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletepaginationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/pagination", + code: 200, + }), + ), +).annotate({ + identifier: "DeletepaginationRequest", +}) as any as S.Schema; + +export interface DeletepaginationResponse {} +export const DeletepaginationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletepaginationResponse", +}) as any as S.Schema; + +export interface DeleteprefixSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteprefixSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/prefix-search", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteprefixSearchRequest", +}) as any as S.Schema; + +export interface DeleteprefixSearchResponse {} +export const DeleteprefixSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteprefixSearchResponse", +}) as any as S.Schema; + +export interface DeleteproximityPrecisionRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteproximityPrecisionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/proximity-precision", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteproximityPrecisionRequest", +}) as any as S.Schema; + +export interface DeleteproximityPrecisionResponse {} +export const DeleteproximityPrecisionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteproximityPrecisionResponse", +}) as any as S.Schema; + +export interface DeleterankingRulesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleterankingRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/ranking-rules", + code: 200, + }), + ), +).annotate({ + identifier: "DeleterankingRulesRequest", +}) as any as S.Schema; + +export interface DeleterankingRulesResponse {} +export const DeleterankingRulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleterankingRulesResponse", +}) as any as S.Schema; + +export interface DeleteRuleRequest { + /** Unique identifier of the search rule. */ + uid: string; +} +export const DeleteRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/dynamic-search-rules/{uid}", code: 200 }), + ), +).annotate({ + identifier: "DeleteRuleRequest", +}) as any as S.Schema; + +export interface DeleteRuleResponse {} +export const DeleteRuleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteRuleResponse", +}) as any as S.Schema; + +export interface DeletesearchableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletesearchableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/searchable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "DeletesearchableAttributesRequest", +}) as any as S.Schema; + +export interface DeletesearchableAttributesResponse {} +export const DeletesearchableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletesearchableAttributesResponse", +}) as any as S.Schema; + +export interface DeletesearchCutoffMsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletesearchCutoffMsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/search-cutoff-ms", + code: 200, + }), + ), +).annotate({ + identifier: "DeletesearchCutoffMsRequest", +}) as any as S.Schema; + +export interface DeletesearchCutoffMsResponse {} +export const DeletesearchCutoffMsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletesearchCutoffMsResponse", +}) as any as S.Schema; + +export interface DeleteseparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeleteseparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteseparatorTokensRequest", +}) as any as S.Schema; + +export interface DeleteseparatorTokensResponse {} +export const DeleteseparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteseparatorTokensResponse", +}) as any as S.Schema; + +export interface DeletesortableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletesortableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/sortable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "DeletesortableAttributesRequest", +}) as any as S.Schema; + +export interface DeletesortableAttributesResponse {} +export const DeletesortableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletesortableAttributesResponse", +}) as any as S.Schema; + +export interface DeletestopWordsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletestopWordsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/stop-words", + code: 200, + }), + ), +).annotate({ + identifier: "DeletestopWordsRequest", +}) as any as S.Schema; + +export interface DeletestopWordsResponse {} +export const DeletestopWordsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletestopWordsResponse", +}) as any as S.Schema; + +export interface DeletesynonymsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletesynonymsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/synonyms", + code: 200, + }), + ), +).annotate({ + identifier: "DeletesynonymsRequest", +}) as any as S.Schema; + +export interface DeletesynonymsResponse {} +export const DeletesynonymsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletesynonymsResponse", +}) as any as S.Schema; + +export type DeleteTasksRequestUidsList = Array; +export const DeleteTasksRequestUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type DeleteTasksRequestBatchUidsList = Array; +export const DeleteTasksRequestBatchUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type DeleteTasksRequestCanceledByList = Array; +export const DeleteTasksRequestCanceledByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type DeleteTasksRequestTypesList = Array; +export const DeleteTasksRequestTypesList = /*@__PURE__*/ S.Array( + Kind, +) as any as S.Schema; + +export type DeleteTasksRequestStatusesList = Array; +export const DeleteTasksRequestStatusesList = /*@__PURE__*/ S.Array( + Status, +) as any as S.Schema; + +export type DeleteTasksRequestIndexUidsList = Array; +export const DeleteTasksRequestIndexUidsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface DeleteTasksRequest { + /** Permits to select tasks by their uid. When the `uids` query parameter is set to `*`, all task uids included. It's possible to specify several uids by separating them with the `,` character. */ + uids?: DeleteTasksRequestUidsList; + /** Lets you filter tasks by their `batchUid`. */ + batchUids?: DeleteTasksRequestBatchUidsList; + /** Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character. */ + canceledBy?: DeleteTasksRequestCanceledByList; + /** Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character. */ + types?: DeleteTasksRequestTypesList; + /** Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character. */ + statuses?: DeleteTasksRequestStatusesList; + /** Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character. */ + indexUids?: DeleteTasksRequestIndexUidsList; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format. */ + afterEnqueuedAt?: string; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format. */ + beforeEnqueuedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format. */ + afterStartedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format. */ + beforeStartedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format. */ + afterFinishedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format. */ + beforeFinishedAt?: string; +} +export const DeleteTasksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uids: S.optional(DeleteTasksRequestUidsList.pipe(T.Query())), + batchUids: S.optional(DeleteTasksRequestBatchUidsList.pipe(T.Query())), + canceledBy: S.optional(DeleteTasksRequestCanceledByList.pipe(T.Query())), + types: S.optional(DeleteTasksRequestTypesList.pipe(T.Query())), + statuses: S.optional(DeleteTasksRequestStatusesList.pipe(T.Query())), + indexUids: S.optional(DeleteTasksRequestIndexUidsList.pipe(T.Query())), + afterEnqueuedAt: S.optional(S.String.pipe(T.Query())), + beforeEnqueuedAt: S.optional(S.String.pipe(T.Query())), + afterStartedAt: S.optional(S.String.pipe(T.Query())), + beforeStartedAt: S.optional(S.String.pipe(T.Query())), + afterFinishedAt: S.optional(S.String.pipe(T.Query())), + beforeFinishedAt: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "DELETE", uri: "/tasks", code: 200 })), +).annotate({ + identifier: "DeleteTasksRequest", +}) as any as S.Schema; + +export interface DeletetypoToleranceRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const DeletetypoToleranceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/indexes/{index_uid}/settings/typo-tolerance", + code: 200, + }), + ), +).annotate({ + identifier: "DeletetypoToleranceRequest", +}) as any as S.Schema; + +export interface DeletetypoToleranceResponse {} +export const DeletetypoToleranceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletetypoToleranceResponse", +}) as any as S.Schema; + +export interface DeleteWebhookRequest { + /** Universally unique identifier of the webhook. */ + uuid: string; +} +export const DeleteWebhookRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/webhooks/{uuid}", code: 200 })), +).annotate({ + identifier: "DeleteWebhookRequest", +}) as any as S.Schema; + +export interface DeleteWebhookResponse {} +export const DeleteWebhookResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteWebhookResponse", +}) as any as S.Schema; + +/** Array of document attributes to include in the response. If not specified, all attributes listed in the `displayedAttributes` setting are returned. Use this to reduce response size by only requesting the fields you need. Example: `["title", "description", "price"]`. */ +export type DocumentsByQueryPostRequestFieldsList = Array; +export const DocumentsByQueryPostRequestFieldsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Array of specific document IDs to retrieve. Only documents with matching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all documents matching other criteria are returned. This is useful for fetching specific known documents. */ +export type DocumentsByQueryPostRequestIdsList = Array; +export const DocumentsByQueryPostRequestIdsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Array of attributes to sort the documents by. Each entry should be in the format `attribute:direction` where direction is either `asc` (ascending) or `desc` (descending). Example: `["price:asc", "rating:desc"]` sorts by price ascending, then by rating descending. */ +export type DocumentsByQueryPostRequestSortList = Array; +export const DocumentsByQueryPostRequestSortList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface DocumentsByQueryPostRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Number of documents to skip in the response. Use together with `limit` for pagination through large document sets. For example, to get documents 151-170, set `offset=150` and `limit=20`. Defaults to `0`. */ + offset?: number; + /** Maximum number of documents to return in a single response. Use together with `offset` for pagination. Higher values return more results but may increase response time and memory usage. Defaults to `20`. */ + limit?: number; + /** Array of document attributes to include in the response. If not specified, all attributes listed in the `displayedAttributes` setting are returned. Use this to reduce response size by only requesting the fields you need. Example: `["title", "description", "price"]`. */ + fields?: DocumentsByQueryPostRequestFieldsList | null; + /** When `true`, includes the vector embeddings in the response for documents that have them. This is useful when you need to inspect or export vector data. Note that this can significantly increase response size. Defaults to `false`. */ + retrieveVectors?: boolean; + /** Array of specific document IDs to retrieve. Only documents with matching [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values will be returned. If not specified, all documents matching other criteria are returned. This is useful for fetching specific known documents. */ + ids?: DocumentsByQueryPostRequestIdsList | null; + /** Filter expression to select which documents to return. Attributes must be added to the `filterableAttributes` index setting before they can be used in filters. Accepts a string or an array of arrays of strings for AND/OR combinations. Example string: `"genres = action AND rating > 4"`. Example array: `[["genres = action", "genres = comedy"], "rating > 4"]` (inner array = OR, outer = AND). */ + filter?: unknown; + /** Array of attributes to sort the documents by. Each entry should be in the format `attribute:direction` where direction is either `asc` (ascending) or `desc` (descending). Example: `["price:asc", "rating:desc"]` sorts by price ascending, then by rating descending. */ + sort?: DocumentsByQueryPostRequestSortList | null; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean | null; +} +export const DocumentsByQueryPostRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + offset: S.optional(S.Number), + limit: S.optional(S.Number), + fields: S.optional(S.NullOr(DocumentsByQueryPostRequestFieldsList)), + retrieveVectors: S.optional(S.Boolean), + ids: S.optional(S.NullOr(DocumentsByQueryPostRequestIdsList)), + filter: S.optional(S.Unknown), + sort: S.optional(S.NullOr(DocumentsByQueryPostRequestSortList)), + useNetwork: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/documents/fetch", + code: 200, + }), + ), +).annotate({ + identifier: "DocumentsByQueryPostRequest", +}) as any as S.Schema; + +/** Items for the current page. */ +export type PaginationViewValueResultsList = Array; +export const PaginationViewValueResultsList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export interface PaginationViewValue { + /** Items for the current page. */ + results: PaginationViewValueResultsList; + /** Number of items skipped. */ + offset: number; + /** Maximum number of items returned. */ + limit: number; + /** Total number of items matching the query. */ + total: number; +} +export const PaginationViewValue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: PaginationViewValueResultsList, + offset: S.Number, + limit: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "PaginationViewValue", +}) as any as S.Schema; + +export interface EditDocumentsByFunctionRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; + /** Filter expression to select which documents to edit. If omitted, all documents in the index will be processed. Attributes must be in `filterableAttributes` to be used. */ + filter?: unknown; + /** Arbitrary data to pass into the function scope. By default the function only has access to the current document being edited via the `doc` variable. */ + context?: unknown; + /** A [RHAI](https://rhai.rs) function string to apply to each document. The function has access to a `doc` variable representing the current document. Modify `doc` fields to update the document. Return `null` or `()` to delete the document. To enable this feature: `PATCH /experimental-features/ {"editDocumentsByFunction": true}`. */ + function: string; +} +export const EditDocumentsByFunctionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + customMetadata: S.optional(S.String.pipe(T.Query())), + filter: S.optional(S.Unknown), + context: S.optional(S.Unknown), + function: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/documents/edit", + code: 200, + }), + ), +).annotate({ + identifier: "EditDocumentsByFunctionRequest", +}) as any as S.Schema; + +export interface EditDocumentsByFunctionResponse {} +export const EditDocumentsByFunctionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "EditDocumentsByFunctionResponse", +}) as any as S.Schema; + +/** Export settings for a specific index */ +export interface ExportIndexSettings { + /** Filter expression to select which documents to export */ + filter?: string | null; + /** Whether to override settings on the destination index */ + overrideSettings?: boolean | null; +} +export const ExportIndexSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + filter: S.optional(S.NullOr(S.String)), + overrideSettings: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "ExportIndexSettings", +}) as any as S.Schema; + +/** Index patterns to export with their settings */ +export type ExportRequestIndexesMap = { + [key: string]: ExportIndexSettings | undefined; +}; +export const ExportRequestIndexesMap = /*@__PURE__*/ S.Record( + S.String, + ExportIndexSettings, +) as any as S.Schema; + +export interface ExportRequest { + /** URL of the destination Meilisearch instance */ + url?: string; + /** API key for authenticating with the destination instance */ + apiKey?: string | Redacted.Redacted | null; + /** Maximum payload size per request */ + payloadSize?: string | null; + /** Index patterns to export with their settings */ + indexes?: ExportRequestIndexesMap | null; +} +export const ExportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.String), + apiKey: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), + payloadSize: S.optional(S.NullOr(S.String)), + indexes: S.optional(S.NullOr(ExportRequestIndexesMap)), + }).pipe(T.Http({ method: "POST", uri: "/export", code: 200 })), +).annotate({ identifier: "ExportRequest" }) as any as S.Schema; + +export interface ExportResponse {} +export const ExportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ identifier: "ExportResponse" }) as any as S.Schema; + +export interface GetAllRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetAllRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/indexes/{index_uid}/settings", code: 200 }), + ), +).annotate({ identifier: "GetAllRequest" }) as any as S.Schema; + +/** Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ +export type SettingsUncheckedDisplayedAttributesList = Array; +export const SettingsUncheckedDisplayedAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ +export type SettingsUncheckedSearchableAttributesList = Array; +export const SettingsUncheckedSearchableAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Patterns to match attribute names. Use `*` as a wildcard to match any characters. For example, `["price_*", "stock"]` matches `price_usd`, `price_eur`, and `stock`. */ +export type FilterableAttributesPatternsAttributePatternsList = Array; +export const FilterableAttributesPatternsAttributePatternsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Controls which filter operators are allowed for an attribute. This provides fine-grained control over filtering capabilities. */ +export interface FilterFeatures { + /** When `true`, enables equality operators: `=`, `!=`, and `IN`. These allow filtering for exact matches or membership in a set of values. Also enables `IS EMPTY`, `IS NULL`, and `EXISTS` operators. Defaults to `true`. */ + equality?: boolean; + /** When `true`, enables comparison operators: `<`, `>`, `<=`, `>=`, and `TO` (range). These allow filtering based on numeric or string comparisons. Defaults to `false`. */ + comparison?: boolean; +} +export const FilterFeatures = /*@__PURE__*/ S.suspend(() => + S.Struct({ + equality: S.optional(S.Boolean), + comparison: S.optional(S.Boolean), + }), +).annotate({ identifier: "FilterFeatures" }) as any as S.Schema; + +/** Controls which filtering and faceting operations are enabled for matching attributes. This allows restricting certain operations on specific fields for security or performance reasons. */ +export interface FilterableAttributesFeatures { + /** When `true`, allows searching within facet values for matching attributes. This enables the facet search feature which lets users search for specific facet values. Defaults to `false`. */ + facetSearch?: boolean; + /** Controls which filter operators are allowed for matching attributes. See `FilterFeatures` for available options. */ + filter?: FilterFeatures; +} +export const FilterableAttributesFeatures = /*@__PURE__*/ S.suspend(() => + S.Struct({ + facetSearch: S.optional(S.Boolean), + filter: S.optional(FilterFeatures), + }), +).annotate({ + identifier: "FilterableAttributesFeatures", +}) as any as S.Schema; + +/** Defines a set of attribute patterns with specific filtering and faceting features. This allows fine-grained control over which operations are allowed on matched attributes. */ +export interface FilterableAttributesPatterns { + /** Patterns to match attribute names. Use `*` as a wildcard to match any characters. For example, `["price_*", "stock"]` matches `price_usd`, `price_eur`, and `stock`. */ + attributePatterns: FilterableAttributesPatternsAttributePatternsList; + /** The filtering and faceting features enabled for attributes matching these patterns. If not specified, defaults to equality filtering enabled. */ + features?: FilterableAttributesFeatures; +} +export const FilterableAttributesPatterns = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributePatterns: FilterableAttributesPatternsAttributePatternsList, + features: S.optional(FilterableAttributesFeatures), + }), +).annotate({ + identifier: "FilterableAttributesPatterns", +}) as any as S.Schema; + +export type FilterableAttributesRule = string | FilterableAttributesPatterns; +export const FilterableAttributesRule = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`. */ +export type SettingsUncheckedFilterableAttributesList = + Array; +export const SettingsUncheckedFilterableAttributesList = /*@__PURE__*/ S.Array( + FilterableAttributesRule, +) as any as S.Schema; + +/** Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ +export type SettingsUncheckedSortableAttributesList = Array; +export const SettingsUncheckedSortableAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface ForeignKey { + foreignIndexUid: string; + fieldName: string; +} +export const ForeignKey = /*@__PURE__*/ S.suspend(() => + S.Struct({ + foreignIndexUid: S.String, + fieldName: S.String, + }), +).annotate({ identifier: "ForeignKey" }) as any as S.Schema; + +/** Foreign keys to use for cross-index filtering search. */ +export type SettingsUncheckedForeignKeysList = Array; +export const SettingsUncheckedForeignKeysList = /*@__PURE__*/ S.Array( + ForeignKey, +) as any as S.Schema; + +/** [Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`). */ +export type SettingsUncheckedRankingRulesList = Array; +export const SettingsUncheckedRankingRulesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Words ignored when present in search queries. */ +export type SettingsUncheckedStopWordsList = Array; +export const SettingsUncheckedStopWordsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Characters that are not treated as word separators. Removed from the default separator set. */ +export type SettingsUncheckedNonSeparatorTokensList = Array; +export const SettingsUncheckedNonSeparatorTokensList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Characters that delimit words. Added on top of the default separators. */ +export type SettingsUncheckedSeparatorTokensList = Array; +export const SettingsUncheckedSeparatorTokensList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Strings Meilisearch parses as a single term. Useful for names or domain terms. */ +export type SettingsUncheckedDictionaryList = Array; +export const SettingsUncheckedDictionaryList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type SettingsUncheckedSynonymsValueList = Array; +export const SettingsUncheckedSynonymsValueList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms). */ +export type SettingsUncheckedSynonymsMap = { + [key: string]: SettingsUncheckedSynonymsValueList | undefined; +}; +export const SettingsUncheckedSynonymsMap = /*@__PURE__*/ S.Record( + S.String, + SettingsUncheckedSynonymsValueList, +) as any as S.Schema; + +/** Minimum word length required before typos are allowed. This helps prevent matching very short words with typos, which can lead to irrelevant results. */ +export interface MinWordSizeTyposSetting { + /** Minimum word length to accept one typo. Shorter words must match exactly. For example, if set to 5, "apple" can have one typo but "app" cannot. */ + oneTypo?: number | null; + /** Minimum word length to accept two typos. Must be greater than or equal to `oneTypo`. For example, if set to 9, "computing" can have two typos. */ + twoTypos?: number | null; +} +export const MinWordSizeTyposSetting = /*@__PURE__*/ S.suspend(() => + S.Struct({ + oneTypo: S.optional(S.NullOr(S.Number)), + twoTypos: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "MinWordSizeTyposSetting", +}) as any as S.Schema; + +/** Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly. */ +export type TypoSettingsDisableOnWordsList = Array; +export const TypoSettingsDisableOnWordsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs. */ +export type TypoSettingsDisableOnAttributesList = Array; +export const TypoSettingsDisableOnAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Typo tolerance: how spelling mistakes in queries are handled. */ +export interface TypoSettings { + /** When true, typo tolerance is enabled. When false, only exact matches are returned. */ + enabled?: boolean | null; + minWordSizeForTypos?: MinWordSizeTyposSetting | null; + /** Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly. */ + disableOnWords?: TypoSettingsDisableOnWordsList | null; + /** Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs. */ + disableOnAttributes?: TypoSettingsDisableOnAttributesList | null; + /** When true, typo tolerance is disabled on numeric tokens. For example, 123 will not match 132. */ + disableOnNumbers?: boolean | null; +} +export const TypoSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + enabled: S.optional(S.NullOr(S.Boolean)), + minWordSizeForTypos: S.optional(S.NullOr(MinWordSizeTyposSetting)), + disableOnWords: S.optional(S.NullOr(TypoSettingsDisableOnWordsList)), + disableOnAttributes: S.optional( + S.NullOr(TypoSettingsDisableOnAttributesList), + ), + disableOnNumbers: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ identifier: "TypoSettings" }) as any as S.Schema; + +export type FacetValuesSort = "alpha" | "count"; +export const FacetValuesSort = /*@__PURE__*/ S.String; + +/** Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets. */ +export type FacetingSettingsSortFacetValuesByMap = { + [key: string]: FacetValuesSort | (string & {}) | undefined; +}; +export const FacetingSettingsSortFacetValuesByMap = /*@__PURE__*/ S.Record( + S.String, + FacetValuesSort, +) as any as S.Schema; + +/** Faceting: maximum number of facet values and how they are sorted. */ +export interface FacetingSettings { + /** Maximum number of facet values returned per facet. Values are sorted in ascending lexicographical order. */ + maxValuesPerFacet?: number | null; + /** Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets. */ + sortFacetValuesBy?: FacetingSettingsSortFacetValuesByMap | null; +} +export const FacetingSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + maxValuesPerFacet: S.optional(S.NullOr(S.Number)), + sortFacetValuesBy: S.optional( + S.NullOr(FacetingSettingsSortFacetValuesByMap), + ), + }), +).annotate({ + identifier: "FacetingSettings", +}) as any as S.Schema; + +/** Pagination: cap on how many results a search can return. */ +export interface PaginationSettings { + /** Maximum number of search results Meilisearch can return. Limit and offset cannot go beyond this value. */ + maxTotalHits?: number | null; +} +export const PaginationSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + maxTotalHits: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "PaginationSettings", +}) as any as S.Schema; + +export type EmbedderSource = + | "openAi" + | "huggingFace" + | "ollama" + | "userProvided" + | "rest" + | "composite"; +export const EmbedderSource = /*@__PURE__*/ S.String; + +export type OverridePooling = "useModel" | "forceCls" | "forceMean"; +export const OverridePooling = /*@__PURE__*/ S.String; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ +export type EmbeddingSettingsIndexingFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const EmbeddingSettingsIndexingFragmentsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type EmbeddingSettingsSearchFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const EmbeddingSettingsSearchFragmentsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type EmbeddingSettingsHeadersMap = { [key: string]: string | undefined }; +export const EmbeddingSettingsHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - Only available for `indexingEmbedder`, not `searchEmbedder`. - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ +export type SubEmbeddingSettingsIndexingFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const SubEmbeddingSettingsIndexingFragmentsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type SubEmbeddingSettingsSearchFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const SubEmbeddingSettingsSearchFragmentsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type SubEmbeddingSettingsHeadersMap = { + [key: string]: string | undefined; +}; +export const SubEmbeddingSettingsHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** Sub-embedder config for composite embedders. Used by `indexingEmbedder` (vectorize documents at index time) and `searchEmbedder` (vectorize queries at search time). Same fields as a top-level embedder, except no `binaryQuantized`, `distribution`, `documentTemplate`/`documentTemplateMaxBytes` for searchEmbedder. */ +export interface SubEmbeddingSettings { + source?: EmbedderSource | (string & {}) | null; + /** Model name. - Available for `openAi`, `huggingFace`, `ollama`. - Mandatory for `ollama`. - For `openAi`/`huggingFace` optional with defaults. - 🏗️ Changing the value of this parameter always regenerates embeddings. */ + model?: string | null; + /** Model revision (e.g. Hugging Face commit SHA). - Only available for `huggingFace`. - If unset, latest is used. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + revision?: string | null; + pooling?: OverridePooling | (string & {}) | null; + /** API key sent to the embedder. - If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables. - If not set for other sources, no bearer token is sent. - This setting is partially hidden when returned by the settings - 🌱 Changing the value of this parameter never regenerates embeddings */ + apiKey?: string | Redacted.Redacted | null; + /** Number of dimensions of the embedding vectors. - Available for `userProvided`, `openAi`, `ollama`, `rest`. - Mandatory for `userProvided`. - For `openAi`/`ollama`/`rest` inferred if omitted. - 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings - 🌱 For other sources, changing the value of this parameter never regenerates embeddings */ + dimensions?: number | null; + /** [Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document. - Only available for `indexingEmbedder`, not `searchEmbedder`. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text. */ + documentTemplate?: string | null; + /** Max size in bytes of the rendered document template. Longer output is truncated. - Only available for `indexingEmbedder`, not `searchEmbedder`. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text. - 🌱 When decreased, embeddings are never regenerated */ + documentTemplateMaxBytes?: number | null; + /** URL of the embedder API. - Mandatory for `rest`. Optional for `openAi` and `ollama`. - 🌱 When modified for `openAi``, embeddings are never regenerated - 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated - If targetting URL resolving to a non-global IP (such as `localhost`), make sure that `--experimental-allowed-ip-networks` allows it. For details on how use this parameter, refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks). */ + url?: string | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - Only available for `indexingEmbedder`, not `searchEmbedder`. - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ + indexingFragments?: SubEmbeddingSettingsIndexingFragmentsMap | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ + searchFragments?: SubEmbeddingSettingsSearchFragmentsMap | null; + /** Request body template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{text}}"` for the input. - Mandatory for `rest`. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + request?: unknown; + /** Response template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{embedding}}"` where the embedding array is. - Mandatory for `rest`. */ + response?: unknown; + /** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ + headers?: SubEmbeddingSettingsHeadersMap | null; +} +export const SubEmbeddingSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + source: S.optional(S.NullOr(EmbedderSource)), + model: S.optional(S.NullOr(S.String)), + revision: S.optional(S.NullOr(S.String)), + pooling: S.optional(S.NullOr(OverridePooling)), + apiKey: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), + dimensions: S.optional(S.NullOr(S.Number)), + documentTemplate: S.optional(S.NullOr(S.String)), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + url: S.optional(S.NullOr(S.String)), + indexingFragments: S.optional( + S.NullOr(SubEmbeddingSettingsIndexingFragmentsMap), + ), + searchFragments: S.optional( + S.NullOr(SubEmbeddingSettingsSearchFragmentsMap), + ), + request: S.optional(S.Unknown), + response: S.optional(S.Unknown), + headers: S.optional(S.NullOr(SubEmbeddingSettingsHeadersMap)), + }), +).annotate({ + identifier: "SubEmbeddingSettings", +}) as any as S.Schema; + +/** Describes the mean and sigma of distribution of embedding similarity in the embedding space. The intended use is to make the similarity score more comparable to the regular ranking score. This allows to correct effects where results are too "packed" around a certain value. */ +export interface DistributionShift { + /** Value where the results are "packed". Similarity scores are translated so that they are packed around 0.5 instead */ + current_mean: number; + /** standard deviation of a similarity score. Set below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed. */ + current_sigma: number; +} +export const DistributionShift = /*@__PURE__*/ S.suspend(() => + S.Struct({ + current_mean: S.Number, + current_sigma: S.Number, + }), +).annotate({ + identifier: "DistributionShift", +}) as any as S.Schema; + +/** Embedder configuration for [AI-powered / hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). */ +export interface EmbeddingSettings { + source?: EmbedderSource | (string & {}) | null; + /** Model name. - Available for `openAi`, `huggingFace`, `ollama`. - Mandatory for `ollama`. - For `openAi`/`huggingFace` optional with defaults. - 🏗️ Changing the value of this parameter always regenerates embeddings. */ + model?: string | null; + /** Model revision (e.g. Hugging Face commit SHA). - Only available for `huggingFace`. - If unset, latest is used. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + revision?: string | null; + pooling?: OverridePooling | (string & {}) | null; + /** API key sent to the embedder. - If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables. - If not set for other sources, no bearer token is sent. - This setting is partially hidden when returned by the settings - 🌱 Changing the value of this parameter never regenerates embeddings */ + apiKey?: string | Redacted.Redacted | null; + /** Number of dimensions of the embedding vectors. - Available for `userProvided`, `openAi`, `ollama`, `rest`. - Mandatory for `userProvided`. - For `openAi`/`ollama`/`rest` inferred if omitted. - 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings - 🌱 For other sources, changing the value of this parameter never regenerates embeddings */ + dimensions?: number | null; + /** When true, vectors are stored as 1-bit (smaller, faster, less precise). - Available for all sources. - Irreversible once enabled. - 🏗️ When set to true, embeddings are not regenerated, but they are binary quantized, which takes time. */ + binaryQuantized?: boolean | null; + /** [Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text. */ + documentTemplate?: string | null; + /** Max size in bytes of the rendered document template. Longer output is truncated. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text. - 🌱 When decreased, embeddings are never regenerated */ + documentTemplateMaxBytes?: number | null; + /** URL of the embedder API. - Mandatory for `rest`. Optional for `openAi` and `ollama`. - 🌱 When modified for `openAi``, embeddings are never regenerated - 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated - If targetting URL resolving to a non-global IP (such as `localhost`), make sure that `--experimental-allowed-ip-networks` allows it. For details on how use this parameter, refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks). */ + url?: string | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ + indexingFragments?: EmbeddingSettingsIndexingFragmentsMap | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ + searchFragments?: EmbeddingSettingsSearchFragmentsMap | null; + /** Request body template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{text}}"` for the input. - Mandatory for `rest`. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + request?: unknown; + /** Response template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{embedding}}"` where the embedding array is. - Mandatory for `rest`. */ + response?: unknown; + /** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ + headers?: EmbeddingSettingsHeadersMap | null; + searchEmbedder?: SubEmbeddingSettings | null; + indexingEmbedder?: SubEmbeddingSettings | null; + distribution?: DistributionShift | null; +} +export const EmbeddingSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + source: S.optional(S.NullOr(EmbedderSource)), + model: S.optional(S.NullOr(S.String)), + revision: S.optional(S.NullOr(S.String)), + pooling: S.optional(S.NullOr(OverridePooling)), + apiKey: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), + dimensions: S.optional(S.NullOr(S.Number)), + binaryQuantized: S.optional(S.NullOr(S.Boolean)), + documentTemplate: S.optional(S.NullOr(S.String)), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + url: S.optional(S.NullOr(S.String)), + indexingFragments: S.optional( + S.NullOr(EmbeddingSettingsIndexingFragmentsMap), + ), + searchFragments: S.optional(S.NullOr(EmbeddingSettingsSearchFragmentsMap)), + request: S.optional(S.Unknown), + response: S.optional(S.Unknown), + headers: S.optional(S.NullOr(EmbeddingSettingsHeadersMap)), + searchEmbedder: S.optional(S.NullOr(SubEmbeddingSettings)), + indexingEmbedder: S.optional(S.NullOr(SubEmbeddingSettings)), + distribution: S.optional(S.NullOr(DistributionShift)), + }), +).annotate({ + identifier: "EmbeddingSettings", +}) as any as S.Schema; + +/** [Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.). */ +export type SettingsUncheckedEmbeddersMap = { + [key: string]: EmbeddingSettings | undefined; +}; +export const SettingsUncheckedEmbeddersMap = /*@__PURE__*/ S.Record( + S.String, + EmbeddingSettings, +) as any as S.Schema; + +/** Patterns to match attribute names. Use `*` as a wildcard to match any characters. For example, `["title_*", "description"]` matches `title_en`, `title_fr`, and `description`. */ +export type LocalizedAttributesRuleViewAttributePatternsList = Array; +export const LocalizedAttributesRuleViewAttributePatternsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type Locale = + | "af" + | "ak" + | "am" + | "ar" + | "az" + | "be" + | "bn" + | "bg" + | "ca" + | "cs" + | "da" + | "de" + | "el" + | "en" + | "eo" + | "et" + | "fi" + | "fr" + | "gu" + | "he" + | "hi" + | "hr" + | "hu" + | "hy" + | "id" + | "it" + | "jv" + | "ja" + | "kn" + | "ka" + | "km" + | "ko" + | "la" + | "lv" + | "lt" + | "ml" + | "mr" + | "mk" + | "my" + | "ne" + | "nl" + | "nb" + | "or" + | "pa" + | "fa" + | "pl" + | "pt" + | "ro" + | "ru" + | "si" + | "sk" + | "sl" + | "sn" + | "es" + | "sr" + | "sv" + | "ta" + | "te" + | "tl" + | "th" + | "tk" + | "tr" + | "uk" + | "ur" + | "uz" + | "vi" + | "yi" + | "zh" + | "zu" + | "afr" + | "aka" + | "amh" + | "ara" + | "aze" + | "bel" + | "ben" + | "bul" + | "cat" + | "ces" + | "dan" + | "deu" + | "ell" + | "eng" + | "epo" + | "est" + | "fin" + | "fra" + | "guj" + | "heb" + | "hin" + | "hrv" + | "hun" + | "hye" + | "ind" + | "ita" + | "jav" + | "jpn" + | "kan" + | "kat" + | "khm" + | "kor" + | "lat" + | "lav" + | "lit" + | "mal" + | "mar" + | "mkd" + | "mya" + | "nep" + | "nld" + | "nob" + | "ori" + | "pan" + | "pes" + | "pol" + | "por" + | "ron" + | "rus" + | "sin" + | "slk" + | "slv" + | "sna" + | "spa" + | "srp" + | "swe" + | "tam" + | "tel" + | "tgl" + | "tha" + | "tuk" + | "tur" + | "ukr" + | "urd" + | "uzb" + | "vie" + | "yid" + | "zho" + | "zul" + | "cmn"; +export const Locale = /*@__PURE__*/ S.String; + +/** The list of locales (languages) to apply to matching attributes. When these attributes are indexed, Meilisearch will use language-specific tokenization rules. Examples: `["en", "fr"]` or `["jpn", "zho"]`. */ +export type LocalizedAttributesRuleViewLocalesList = Array< + Locale | (string & {}) +>; +export const LocalizedAttributesRuleViewLocalesList = /*@__PURE__*/ S.Array( + Locale, +) as any as S.Schema; + +/** Defines a rule for associating specific locales (languages) with attributes. This allows Meilisearch to use language-specific tokenization and processing for matched attributes, improving search quality for multilingual content. */ +export interface LocalizedAttributesRuleView { + /** Patterns to match attribute names. Use `*` as a wildcard to match any characters. For example, `["title_*", "description"]` matches `title_en`, `title_fr`, and `description`. */ + attributePatterns: LocalizedAttributesRuleViewAttributePatternsList; + /** The list of locales (languages) to apply to matching attributes. When these attributes are indexed, Meilisearch will use language-specific tokenization rules. Examples: `["en", "fr"]` or `["jpn", "zho"]`. */ + locales: LocalizedAttributesRuleViewLocalesList; +} +export const LocalizedAttributesRuleView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributePatterns: LocalizedAttributesRuleViewAttributePatternsList, + locales: LocalizedAttributesRuleViewLocalesList, + }), +).annotate({ + identifier: "LocalizedAttributesRuleView", +}) as any as S.Schema; + +/** Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes. */ +export type SettingsUncheckedLocalizedAttributesList = + Array; +export const SettingsUncheckedLocalizedAttributesList = /*@__PURE__*/ S.Array( + LocalizedAttributesRuleView, +) as any as S.Schema; + +export type PrefixSearchSettings = "indexingTime" | "disabled"; +export const PrefixSearchSettings = /*@__PURE__*/ S.String; + +/** Hybrid search: balance between keyword and semantic search. */ +export interface HybridQuery { + /** Balance between keyword (0.0) and semantic (1.0) search. */ + semanticRatio?: number; + /** Name of the embedder from the index embedders setting (`embedder` in JSON). Used to vectorize the query. */ + embedder: string; +} +export const HybridQuery = /*@__PURE__*/ S.suspend(() => + S.Struct({ + semanticRatio: S.optional(S.Number), + embedder: S.String, + }), +).annotate({ identifier: "HybridQuery" }) as any as S.Schema; + +/** Sort order: array of strings like `attribute:asc` or `attribute:desc`. */ +export type ChatSearchParamsSortList = Array; +export const ChatSearchParamsSortList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Strategy used to match query terms within documents */ +export type MatchingStrategy = "last" | "all" | "frequency"; +export const MatchingStrategy = /*@__PURE__*/ S.String; + +/** Attributes on which to run the search. If unset, all searchable attributes are used. */ +export type ChatSearchParamsAttributesToSearchOnList = Array; +export const ChatSearchParamsAttributesToSearchOnList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Search parameters applied when the LLM queries this index. */ +export interface ChatSearchParams { + hybrid?: HybridQuery | null; + /** Maximum number of documents returned per search performed by the LLM. */ + limit?: number | null; + /** Sort order: array of strings like `attribute:asc` or `attribute:desc`. */ + sort?: ChatSearchParamsSortList | null; + /** Attribute used to return at most one document per distinct value. */ + distinct?: string | null; + matchingStrategy?: MatchingStrategy | (string & {}) | null; + /** Attributes on which to run the search. If unset, all searchable attributes are used. */ + attributesToSearchOn?: ChatSearchParamsAttributesToSearchOnList | null; + rankingScoreThreshold?: number | null; +} +export const ChatSearchParams = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hybrid: S.optional(S.NullOr(HybridQuery)), + limit: S.optional(S.NullOr(S.Number)), + sort: S.optional(S.NullOr(ChatSearchParamsSortList)), + distinct: S.optional(S.NullOr(S.String)), + matchingStrategy: S.optional(S.NullOr(MatchingStrategy)), + attributesToSearchOn: S.optional( + S.NullOr(ChatSearchParamsAttributesToSearchOnList), + ), + rankingScoreThreshold: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "ChatSearchParams", +}) as any as S.Schema; + +/** [Chat (conversation)](https://www.meilisearch.com/docs/learn/chat/getting_started_with_chat) settings: how the index is described to the LLM and how it is queried. */ +export interface ChatSettings { + /** Index description shown to the LLM so it can decide when and how to query this index. */ + description?: string | null; + /** Liquid template that defines the text sent to the LLM for each document. */ + documentTemplate?: string | null; + /** Maximum size in bytes of the rendered document template. Longer text is truncated. */ + documentTemplateMaxBytes?: number | null; + searchParameters?: ChatSearchParams | null; +} +export const ChatSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + documentTemplate: S.optional(S.NullOr(S.String)), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + searchParameters: S.optional(S.NullOr(ChatSearchParams)), + }), +).annotate({ identifier: "ChatSettings" }) as any as S.Schema; + +/** Index settings: every option you can configure for search and index behavior. Used as the request body for PATCH settings. Only the fields you send are updated; pass `null` to reset a setting to its default. See also: [Configuring index settings on the Cloud](https://www.meilisearch.com/docs/learn/configuration/configuring_index_settings). */ +export interface SettingsUnchecked { + /** Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ + displayedAttributes?: SettingsUncheckedDisplayedAttributesList | null; + /** Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ + searchableAttributes?: SettingsUncheckedSearchableAttributesList | null; + /** Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`. */ + filterableAttributes?: SettingsUncheckedFilterableAttributesList | null; + /** Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ + sortableAttributes?: SettingsUncheckedSortableAttributesList | null; + /** Foreign keys to use for cross-index filtering search. */ + foreignKeys?: SettingsUncheckedForeignKeysList | null; + /** [Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`). */ + rankingRules?: SettingsUncheckedRankingRulesList | null; + /** Words ignored when present in search queries. */ + stopWords?: SettingsUncheckedStopWordsList | null; + /** Characters that are not treated as word separators. Removed from the default separator set. */ + nonSeparatorTokens?: SettingsUncheckedNonSeparatorTokensList | null; + /** Characters that delimit words. Added on top of the default separators. */ + separatorTokens?: SettingsUncheckedSeparatorTokensList | null; + /** Strings Meilisearch parses as a single term. Useful for names or domain terms. */ + dictionary?: SettingsUncheckedDictionaryList | null; + /** Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms). */ + synonyms?: SettingsUncheckedSynonymsMap | null; + /** Field whose value must be unique in the returned documents. One document per distinct value. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute). */ + distinctAttribute?: string | null; + /** Precision for the proximity ranking rule and phrase search: `byWord` (exact distance) or `byAttribute` (same attribute). */ + proximityPrecision?: string | null; + typoTolerance?: TypoSettings | null; + faceting?: FacetingSettings | null; + pagination?: PaginationSettings | null; + /** [Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.). */ + embedders?: SettingsUncheckedEmbeddersMap | null; + /** Maximum duration of a search in milliseconds. If reached, the search stops and returns results computed so far. When null, 1500 ms is used. */ + searchCutoffMs?: number | null; + /** Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes. */ + localizedAttributes?: SettingsUncheckedLocalizedAttributesList | null; + /** When true, [facet search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters) is enabled. When false, the facet-search endpoint is disabled. */ + facetSearch?: boolean | null; + prefixSearch?: PrefixSearchSettings | null; + chat?: ChatSettings | null; +} +export const SettingsUnchecked = /*@__PURE__*/ S.suspend(() => + S.Struct({ + displayedAttributes: S.optional( + S.NullOr(SettingsUncheckedDisplayedAttributesList), + ), + searchableAttributes: S.optional( + S.NullOr(SettingsUncheckedSearchableAttributesList), + ), + filterableAttributes: S.optional( + S.NullOr(SettingsUncheckedFilterableAttributesList), + ), + sortableAttributes: S.optional( + S.NullOr(SettingsUncheckedSortableAttributesList), + ), + foreignKeys: S.optional(S.NullOr(SettingsUncheckedForeignKeysList)), + rankingRules: S.optional(S.NullOr(SettingsUncheckedRankingRulesList)), + stopWords: S.optional(S.NullOr(SettingsUncheckedStopWordsList)), + nonSeparatorTokens: S.optional( + S.NullOr(SettingsUncheckedNonSeparatorTokensList), + ), + separatorTokens: S.optional(S.NullOr(SettingsUncheckedSeparatorTokensList)), + dictionary: S.optional(S.NullOr(SettingsUncheckedDictionaryList)), + synonyms: S.optional(S.NullOr(SettingsUncheckedSynonymsMap)), + distinctAttribute: S.optional(S.NullOr(S.String)), + proximityPrecision: S.optional(S.NullOr(S.String)), + typoTolerance: S.optional(S.NullOr(TypoSettings)), + faceting: S.optional(S.NullOr(FacetingSettings)), + pagination: S.optional(S.NullOr(PaginationSettings)), + embedders: S.optional(S.NullOr(SettingsUncheckedEmbeddersMap)), + searchCutoffMs: S.optional(S.NullOr(S.Number)), + localizedAttributes: S.optional( + S.NullOr(SettingsUncheckedLocalizedAttributesList), + ), + facetSearch: S.optional(S.NullOr(S.Boolean)), + prefixSearch: S.optional(S.NullOr(PrefixSearchSettings)), + chat: S.optional(S.NullOr(ChatSettings)), + }), +).annotate({ + identifier: "SettingsUnchecked", +}) as any as S.Schema; + +export interface GetApiKeyRequest { + /** The `uid` or `key` field of an existing API key. */ + key: string; +} +export const GetApiKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/keys/{key}", code: 200 })), +).annotate({ + identifier: "GetApiKeyRequest", +}) as any as S.Schema; + +export interface GetBatchRequest { + /** The unique batch identifier. */ + batch_id: string; +} +export const GetBatchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + batch_id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/batches/{batch_id}", code: 200 })), +).annotate({ + identifier: "GetBatchRequest", +}) as any as S.Schema; + +/** Information about a single processing step within a batch or task. Each step has a name, current progress, and total items to process. */ +export interface ProgressStepView { + /** A human-readable name describing what this processing step is doing. Examples include "indexing documents", "computing embeddings", "building word cache", etc. */ + currentStep: string; + /** The number of items that have been processed so far in this step. Compare with `total` to calculate the percentage complete for this specific step. */ + finished: number; + /** The total number of items to process in this step. When `finished` equals `total`, this step is complete and processing moves to the next step. */ + total: number; +} +export const ProgressStepView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + currentStep: S.String, + finished: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "ProgressStepView", +}) as any as S.Schema; + +/** A hierarchical list of processing steps currently being executed. Steps are listed from outermost to innermost, with each step representing a more granular operation within its parent step. */ +export type ProgressViewStepsList = Array; +export const ProgressViewStepsList = /*@__PURE__*/ S.Array( + ProgressStepView, +) as any as S.Schema; + +/** Real-time progress information for a batch or task that is currently being processed. Use this to display progress bars or status updates to users. */ +export interface ProgressView { + /** A hierarchical list of processing steps currently being executed. Steps are listed from outermost to innermost, with each step representing a more granular operation within its parent step. */ + steps: ProgressViewStepsList; + /** The overall completion percentage of the operation (0.0 to 100.0). This is calculated by combining the progress of all nested steps, weighted by their relative importance. */ + percentage: number; +} +export const ProgressView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + steps: ProgressViewStepsList, + percentage: S.Number, + }), +).annotate({ identifier: "ProgressView" }) as any as S.Schema; + +/** Count of tasks by status */ +export type BatchStatsViewStatusMap = { [key: string]: number | undefined }; +export const BatchStatsViewStatusMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +/** Count of tasks by type */ +export type BatchStatsViewTypesMap = { [key: string]: number | undefined }; +export const BatchStatsViewTypesMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +/** Count of tasks by index UID */ +export type BatchStatsViewIndexUidsMap = { [key: string]: number | undefined }; +export const BatchStatsViewIndexUidsMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +/** Detailed progress trace information */ +export type BatchStatsViewProgressTraceMap = { + [key: string]: unknown | undefined; +}; +export const BatchStatsViewProgressTraceMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Write channel congestion metrics */ +export type BatchStatsViewWriteChannelCongestionMap = { + [key: string]: unknown | undefined; +}; +export const BatchStatsViewWriteChannelCongestionMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Internal database size information */ +export type BatchStatsViewInternalDatabaseSizesMap = { + [key: string]: unknown | undefined; +}; +export const BatchStatsViewInternalDatabaseSizesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Statistics for embedder requests */ +export interface EmbedderStatsView { + /** Total number of embedder requests */ + total: number; + /** Number of failed embedder requests */ + failed: number; + /** Last error message from the embedder */ + lastError?: string | null; +} +export const EmbedderStatsView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + total: S.Number, + failed: S.Number, + lastError: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "EmbedderStatsView", +}) as any as S.Schema; + +/** Provides comprehensive statistics about a batch's execution. Includes task counts, status breakdowns, and AI embedder usage. This information is useful for monitoring system performance and understanding batch composition. */ +export interface BatchStatsView { + /** Total number of tasks in the batch */ + totalNbTasks: number; + /** Count of tasks by status */ + status: BatchStatsViewStatusMap; + /** Count of tasks by type */ + types: BatchStatsViewTypesMap; + /** Count of tasks by index UID */ + indexUids: BatchStatsViewIndexUidsMap; + /** Detailed progress trace information */ + progressTrace?: BatchStatsViewProgressTraceMap; + /** Write channel congestion metrics */ + writeChannelCongestion?: BatchStatsViewWriteChannelCongestionMap | null; + /** Internal database size information */ + internalDatabaseSizes?: BatchStatsViewInternalDatabaseSizesMap; + /** Statistics about AI embedder API requests made during batch processing. Includes total requests, successful/failed counts, and response times. Only present when the batch involved vector embedding operations. */ + embedderRequests?: EmbedderStatsView; +} +export const BatchStatsView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + totalNbTasks: S.Number, + status: BatchStatsViewStatusMap, + types: BatchStatsViewTypesMap, + indexUids: BatchStatsViewIndexUidsMap, + progressTrace: S.optional(BatchStatsViewProgressTraceMap), + writeChannelCongestion: S.optional( + S.NullOr(BatchStatsViewWriteChannelCongestionMap), + ), + internalDatabaseSizes: S.optional(BatchStatsViewInternalDatabaseSizesMap), + embedderRequests: S.optional(EmbedderStatsView), + }), +).annotate({ identifier: "BatchStatsView" }) as any as S.Schema; + +/** Represents a batch of tasks that were processed together. */ +export interface BatchView { + /** The unique sequential identifier assigned to this batch. Batch UIDs are assigned in order of creation and can be used to retrieve specific batch information or correlate tasks that were processed together. */ + uid: number; + progress?: ProgressView | null; + /** Aggregated details from all tasks in this batch. For example, if the batch contains multiple document addition tasks, this will show the total number of documents received and indexed across all tasks. */ + details: unknown; + /** Statistical information about the batch, including the number of tasks by status, the types of tasks included, and the indexes affected. Useful for understanding the composition and outcome of the batch. */ + stats: BatchStatsView; + /** The total time spent processing this batch, formatted as an ISO-8601 duration (e.g., `PT2.5S` for 2.5 seconds). This is `null` for batches that haven't finished processing yet. */ + duration?: string | null; + /** The timestamp when Meilisearch began processing this batch, formatted as an RFC 3339 date-time string. All batches have a start time as it's set when processing begins. */ + startedAt?: string; + /** The timestamp when this batch finished processing, formatted as an RFC 3339 date-time string. This is `null` for batches that are still being processed. */ + finishedAt?: string | null; + /** Explains why the batch was finalized and stopped accepting more tasks. Common reasons include reaching the maximum batch size, encountering incompatible tasks, or processing being explicitly triggered. */ + batchStrategy?: string; +} +export const BatchView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.Number, + progress: S.optional(S.NullOr(ProgressView)), + details: S.Unknown, + stats: BatchStatsView, + duration: S.optional(S.NullOr(S.String)), + startedAt: S.optional(S.String), + finishedAt: S.optional(S.NullOr(S.String)), + batchStrategy: S.optional(S.String), + }), +).annotate({ identifier: "BatchView" }) as any as S.Schema; + +export type GetBatchesRequestBatchUidsList = Array; +export const GetBatchesRequestBatchUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetBatchesRequestUidsList = Array; +export const GetBatchesRequestUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetBatchesRequestCanceledByList = Array; +export const GetBatchesRequestCanceledByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetBatchesRequestTypesList = Array; +export const GetBatchesRequestTypesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetBatchesRequestStatusesList = Array; +export const GetBatchesRequestStatusesList = /*@__PURE__*/ S.Array( + Status, +) as any as S.Schema; + +export type GetBatchesRequestIndexUidsList = Array; +export const GetBatchesRequestIndexUidsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface GetBatchesRequest { + /** Maximum number of batches to return. */ + limit?: number; + /** `uid` of the first batch returned. */ + from?: number; + /** If `true`, returns results in the reverse order, from oldest to most recent. */ + reverse?: boolean; + /** Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character. */ + batchUids?: GetBatchesRequestBatchUidsList; + /** Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character. */ + uids?: GetBatchesRequestUidsList; + /** Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character. */ + canceledBy?: GetBatchesRequestCanceledByList; + /** Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character. */ + types?: GetBatchesRequestTypesList; + /** Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character. */ + statuses?: GetBatchesRequestStatusesList; + /** Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character. */ + indexUids?: GetBatchesRequestIndexUidsList; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format. */ + afterEnqueuedAt?: string; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format. */ + beforeEnqueuedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format. */ + afterStartedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format. */ + beforeStartedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format. */ + afterFinishedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format. */ + beforeFinishedAt?: string; +} +export const GetBatchesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + limit: S.optional(S.Number.pipe(T.Query())), + from: S.optional(S.Number.pipe(T.Query())), + reverse: S.optional(S.Boolean.pipe(T.Query())), + batchUids: S.optional(GetBatchesRequestBatchUidsList.pipe(T.Query())), + uids: S.optional(GetBatchesRequestUidsList.pipe(T.Query())), + canceledBy: S.optional(GetBatchesRequestCanceledByList.pipe(T.Query())), + types: S.optional(GetBatchesRequestTypesList.pipe(T.Query())), + statuses: S.optional(GetBatchesRequestStatusesList.pipe(T.Query())), + indexUids: S.optional(GetBatchesRequestIndexUidsList.pipe(T.Query())), + afterEnqueuedAt: S.optional(S.String.pipe(T.Query())), + beforeEnqueuedAt: S.optional(S.String.pipe(T.Query())), + afterStartedAt: S.optional(S.String.pipe(T.Query())), + beforeStartedAt: S.optional(S.String.pipe(T.Query())), + afterFinishedAt: S.optional(S.String.pipe(T.Query())), + beforeFinishedAt: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/batches", code: 200 })), +).annotate({ + identifier: "GetBatchesRequest", +}) as any as S.Schema; + +/** Array of batch objects */ +export type AllBatchesResultsList = Array; +export const AllBatchesResultsList = /*@__PURE__*/ S.Array( + BatchView, +) as any as S.Schema; + +/** Response containing a paginated list of batches */ +export interface AllBatches { + /** Array of batch objects */ + results: AllBatchesResultsList; + /** Total number of batches */ + total: number; + /** Maximum number of batches returned */ + limit: number; + /** The first batch uid returned */ + from?: number | null; + /** Value to send in from to fetch the next slice of results */ + next?: number | null; +} +export const AllBatches = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: AllBatchesResultsList, + total: S.Number, + limit: S.Number, + from: S.optional(S.NullOr(S.Number)), + next: S.optional(S.NullOr(S.Number)), + }), +).annotate({ identifier: "AllBatches" }) as any as S.Schema; + +export interface GetBatchesStreamRequest {} +export const GetBatchesStreamRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/batches/stream", code: 200 }), + ), +).annotate({ + identifier: "GetBatchesStreamRequest", +}) as any as S.Schema; + +export interface GetBatchesStreamResponse {} +export const GetBatchesStreamResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetBatchesStreamResponse", +}) as any as S.Schema; + +export interface GetchatRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetchatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/chat", + code: 200, + }), + ), +).annotate({ identifier: "GetchatRequest" }) as any as S.Schema; + +export interface GetChatRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; +} +export const GetChatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/chats/{workspace_uid}", code: 200 })), +).annotate({ identifier: "GetChatRequest" }) as any as S.Schema; + +export interface GetChatResponse {} +export const GetChatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetChatResponse", +}) as any as S.Schema; + +export interface GetdictionaryRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetdictionaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/dictionary", + code: 200, + }), + ), +).annotate({ + identifier: "GetdictionaryRequest", +}) as any as S.Schema; + +export type GetdictionaryResponseBodyList = Array; +export const GetdictionaryResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetdictionaryResponse = GetdictionaryResponseBodyList; +export const GetdictionaryResponse = /*@__PURE__*/ S.suspend(() => + GetdictionaryResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetdictionaryResponse", +}) as any as S.Schema; + +export interface GetdisplayedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetdisplayedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/displayed-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "GetdisplayedAttributesRequest", +}) as any as S.Schema; + +export type GetdisplayedAttributesResponseBodyList = Array; +export const GetdisplayedAttributesResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetdisplayedAttributesResponse = + GetdisplayedAttributesResponseBodyList; +export const GetdisplayedAttributesResponse = /*@__PURE__*/ S.suspend(() => + GetdisplayedAttributesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetdisplayedAttributesResponse", +}) as any as S.Schema; + +export interface GetdistinctAttributeRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetdistinctAttributeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/distinct-attribute", + code: 200, + }), + ), +).annotate({ + identifier: "GetdistinctAttributeRequest", +}) as any as S.Schema; + +export type GetdistinctAttributeResponse = string; +export const GetdistinctAttributeResponse = /*@__PURE__*/ S.suspend(() => + S.String.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetdistinctAttributeResponse", +}) as any as S.Schema; + +export type GetDocumentRequestFieldsList = Array; +export const GetDocumentRequestFieldsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface GetDocumentRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** The document identifier. */ + document_id: string; + /** Comma-separated list of document attributes to include in the response. Use `*` to retrieve all attributes. By default, all attributes listed in the `displayedAttributes` setting are returned. Example: `title,description,price`. */ + fields?: GetDocumentRequestFieldsList; + /** When `true`, includes the vector embeddings in the response for this document. This is useful when you need to inspect or export vector data. Note that this can significantly increase response size if the document has multiple embedders configured. Defaults to `false`. */ + retrieveVectors?: boolean; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean; +} +export const GetDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + document_id: S.String.pipe(T.Label()), + fields: S.optional(GetDocumentRequestFieldsList.pipe(T.Query())), + retrieveVectors: S.optional(S.Boolean.pipe(T.Query())), + useNetwork: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/documents/{document_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDocumentRequest", +}) as any as S.Schema; + +export type GetDocumentResponse = unknown; +export const GetDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Unknown.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetDocumentResponse", +}) as any as S.Schema; + +export type GetDocumentsRequestFieldsList = Array; +export const GetDocumentsRequestFieldsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetDocumentsRequestIdsList = Array; +export const GetDocumentsRequestIdsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface GetDocumentsRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Number of documents to skip in the response. Use this parameter together with `limit` to paginate through large document sets. For example, to get documents 21-40, set `offset=20` and `limit=20`. Defaults to `0`. */ + offset?: number; + /** Maximum number of documents to return in a single response. Use together with `offset` for pagination. Defaults to `20`. */ + limit?: number; + /** Comma-separated list of document attributes to include in the response. Use `*` to retrieve all attributes. By default, all attributes are returned. Example: `title,description,price`. */ + fields?: GetDocumentsRequestFieldsList; + /** When `true`, includes vector embeddings in the response for documents that have them. This is useful when you need to inspect or export vector data. Defaults to `false`. */ + retrieveVectors?: boolean; + /** Comma-separated list of document IDs to retrieve. Only documents with matching IDs will be returned. If not specified, all documents matching other criteria are returned. */ + ids?: GetDocumentsRequestIdsList; + /** Filter expression to select which documents to return. Attributes must be added to the `filterableAttributes` index setting before they can be used in filters. Only accepts string expressions (not array syntax). Example: `genres = action AND rating > 4`. */ + filter?: string; + /** Attribute(s) to sort the documents by. Format: `attribute:asc` or `attribute:desc`. Multiple sort criteria can be comma-separated. Example: `price:asc,rating:desc`. */ + sort?: string; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean; +} +export const GetDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + offset: S.optional(S.Number.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + fields: S.optional(GetDocumentsRequestFieldsList.pipe(T.Query())), + retrieveVectors: S.optional(S.Boolean.pipe(T.Query())), + ids: S.optional(GetDocumentsRequestIdsList.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + sort: S.optional(S.String.pipe(T.Query())), + useNetwork: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/indexes/{index_uid}/documents", code: 200 }), + ), +).annotate({ + identifier: "GetDocumentsRequest", +}) as any as S.Schema; + +export interface GetembeddersRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetembeddersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/embedders", + code: 200, + }), + ), +).annotate({ + identifier: "GetembeddersRequest", +}) as any as S.Schema; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ +export type SettingEmbeddingSettingsInnerIndexingFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const SettingEmbeddingSettingsInnerIndexingFragmentsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type SettingEmbeddingSettingsInnerSearchFragmentsMap = { + [key: string]: unknown | undefined; +}; +export const SettingEmbeddingSettingsInnerSearchFragmentsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ +export type SettingEmbeddingSettingsInnerHeadersMap = { + [key: string]: string | undefined; +}; +export const SettingEmbeddingSettingsInnerHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +/** Embedder configuration for [AI-powered / hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). */ +export interface SettingEmbeddingSettingsInner { + source?: EmbedderSource | (string & {}) | null; + /** Model name. - Available for `openAi`, `huggingFace`, `ollama`. - Mandatory for `ollama`. - For `openAi`/`huggingFace` optional with defaults. - 🏗️ Changing the value of this parameter always regenerates embeddings. */ + model?: string | null; + /** Model revision (e.g. Hugging Face commit SHA). - Only available for `huggingFace`. - If unset, latest is used. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + revision?: string | null; + pooling?: OverridePooling | (string & {}) | null; + /** API key sent to the embedder. - If not set for source `openAi`, the key is read from the `OPENAI_API_KEY` then `MEILI_OPENAI_API_KEY` environment variables. - If not set for other sources, no bearer token is sent. - This setting is partially hidden when returned by the settings - 🌱 Changing the value of this parameter never regenerates embeddings */ + apiKey?: string | Redacted.Redacted | null; + /** Number of dimensions of the embedding vectors. - Available for `userProvided`, `openAi`, `ollama`, `rest`. - Mandatory for `userProvided`. - For `openAi`/`ollama`/`rest` inferred if omitted. - 🏗️ For `openAi`, changing the value of this parameter always regenerates embeddings - 🌱 For other sources, changing the value of this parameter never regenerates embeddings */ + dimensions?: number | null; + /** When true, vectors are stored as 1-bit (smaller, faster, less precise). - Available for all sources. - Irreversible once enabled. - 🏗️ When set to true, embeddings are not regenerated, but they are binary quantized, which takes time. */ + binaryQuantized?: boolean | null; + /** [Liquid template](https://shopify.github.io/liquid/) to build the text sent to the embedder for each document. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text. */ + documentTemplate?: string | null; + /** Max size in bytes of the rendered document template. Longer output is truncated. - Available for `openAi`, `huggingFace`, `ollama`, `rest`. - 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text. - 🌱 When decreased, embeddings are never regenerated */ + documentTemplateMaxBytes?: number | null; + /** URL of the embedder API. - Mandatory for `rest`. Optional for `openAi` and `ollama`. - 🌱 When modified for `openAi``, embeddings are never regenerated - 🏗️ When modified for `ollama` and `rest`, embeddings are always regenerated - If targetting URL resolving to a non-global IP (such as `localhost`), make sure that `--experimental-allowed-ip-networks` allows it. For details on how use this parameter, refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks). */ + url?: string | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at indexing time. For `rest` with multimodal; key is fragment name, value the payload. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🏗️ When a fragment is deleted by passing `null` to its name, the corresponding embeddings are removed from documents. - 🏗️ When a fragment is modified, the corresponding embeddings are regenerated if their rendered version changes. */ + indexingFragments?: SettingEmbeddingSettingsInnerIndexingFragmentsMap | null; + /** Fragments (with [Liquid](https://shopify.github.io/liquid/)) sent to the embedder at search time. For `rest` with multimodal. See also [Image search with multimodal embeddings](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings) - 🌱 Changing the value of this parameter never regenerates embeddings */ + searchFragments?: SettingEmbeddingSettingsInnerSearchFragmentsMap | null; + /** Request body template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{text}}"` for the input. - Mandatory for `rest`. - 🏗️ Changing the value of this parameter always regenerates embeddings */ + request?: unknown; + /** Response template for `rest` embedder. See also [Configure a REST embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/configure_rest_embedder) - Use `"{{embedding}}"` where the embedding array is. - Mandatory for `rest`. */ + response?: unknown; + /** Extra HTTP headers sent to the embedder. - Available for `rest`. - 🌱 Changing the value of this parameter never regenerates embeddings */ + headers?: SettingEmbeddingSettingsInnerHeadersMap | null; + searchEmbedder?: SubEmbeddingSettings | null; + indexingEmbedder?: SubEmbeddingSettings | null; + distribution?: DistributionShift | null; +} +export const SettingEmbeddingSettingsInner = /*@__PURE__*/ S.suspend(() => + S.Struct({ + source: S.optional(S.NullOr(EmbedderSource)), + model: S.optional(S.NullOr(S.String)), + revision: S.optional(S.NullOr(S.String)), + pooling: S.optional(S.NullOr(OverridePooling)), + apiKey: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), + dimensions: S.optional(S.NullOr(S.Number)), + binaryQuantized: S.optional(S.NullOr(S.Boolean)), + documentTemplate: S.optional(S.NullOr(S.String)), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + url: S.optional(S.NullOr(S.String)), + indexingFragments: S.optional( + S.NullOr(SettingEmbeddingSettingsInnerIndexingFragmentsMap), + ), + searchFragments: S.optional( + S.NullOr(SettingEmbeddingSettingsInnerSearchFragmentsMap), + ), + request: S.optional(S.Unknown), + response: S.optional(S.Unknown), + headers: S.optional(S.NullOr(SettingEmbeddingSettingsInnerHeadersMap)), + searchEmbedder: S.optional(S.NullOr(SubEmbeddingSettings)), + indexingEmbedder: S.optional(S.NullOr(SubEmbeddingSettings)), + distribution: S.optional(S.NullOr(DistributionShift)), + }), +).annotate({ + identifier: "SettingEmbeddingSettingsInner", +}) as any as S.Schema; + +/** Configuration for one [embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and hybrid search. Set `source` (`openAi`, `huggingFace`, `ollama`, `rest`, `userProvided`), then the options that apply: `model`, `apiKey`, `documentTemplate`, `dimensions`, `url`, etc. */ +export interface SettingEmbeddingSettings { + inner?: SettingEmbeddingSettingsInner | null; +} +export const SettingEmbeddingSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + inner: S.optional(S.NullOr(SettingEmbeddingSettingsInner)), + }), +).annotate({ + identifier: "SettingEmbeddingSettings", +}) as any as S.Schema; + +export type GetembeddersResponseBodyMap = { + [key: string]: SettingEmbeddingSettings | undefined; +}; +export const GetembeddersResponseBodyMap = /*@__PURE__*/ S.Record( + S.String, + SettingEmbeddingSettings, +) as any as S.Schema; + +export type GetembeddersResponse = GetembeddersResponseBodyMap; +export const GetembeddersResponse = /*@__PURE__*/ S.suspend(() => + GetembeddersResponseBodyMap.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetembeddersResponse", +}) as any as S.Schema; + +export interface GetfacetingRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetfacetingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/faceting", + code: 200, + }), + ), +).annotate({ + identifier: "GetfacetingRequest", +}) as any as S.Schema; + +export interface GetfacetSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetfacetSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/facet-search", + code: 200, + }), + ), +).annotate({ + identifier: "GetfacetSearchRequest", +}) as any as S.Schema; + +export type GetfacetSearchResponse = boolean; +export const GetfacetSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Boolean.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetfacetSearchResponse", +}) as any as S.Schema; + +export interface GetFeaturesRequest {} +export const GetFeaturesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/experimental-features", code: 200 }), + ), +).annotate({ + identifier: "GetFeaturesRequest", +}) as any as S.Schema; + +/** Experimental features that can be toggled at runtime */ +export interface RuntimeTogglableFeatures { + /** Enable the /metrics endpoint for Prometheus metrics */ + metrics?: boolean | null; + /** Enable the /logs route for log configuration */ + logsRoute?: boolean | null; + /** Enable the `GET /tasks/stream` and `GET /batches/stream` SSE-based routes */ + tasksStreamingRoute?: boolean | null; + /** Enable document editing via JavaScript functions */ + editDocumentsByFunction?: boolean | null; + /** Enable the CONTAINS filter operator */ + containsFilter?: boolean | null; + /** Enable dynamic search rules and the `/dynamic-search-rules` routes */ + dynamicSearchRules?: boolean | null; + /** Enable network features for distributed search */ + network?: boolean | null; + /** Enable the route to get documents from tasks */ + getTaskDocumentsRoute?: boolean | null; + /** Enable the route to compact the task queue database */ + taskQueueCompactionRoute?: boolean | null; + /** Enable composite embedders for multi-source embeddings */ + compositeEmbedders?: boolean | null; + /** Enable chat completion capabilities */ + chatCompletions?: boolean | null; + /** Enable multimodal search with images and other media */ + multimodal?: boolean | null; + /** Enable foreign key support for document hydration */ + foreignKeys?: boolean | null; + /** Disable documents fetch queue */ + disableDocumentsFetchQueue?: boolean | null; + /** Enable legacy search pipeline */ + legacySearch?: boolean | null; + /** Enable the `POST /render-template` route */ + renderRoute?: boolean | null; +} +export const RuntimeTogglableFeatures = /*@__PURE__*/ S.suspend(() => + S.Struct({ + metrics: S.optional(S.NullOr(S.Boolean)), + logsRoute: S.optional(S.NullOr(S.Boolean)), + tasksStreamingRoute: S.optional(S.NullOr(S.Boolean)), + editDocumentsByFunction: S.optional(S.NullOr(S.Boolean)), + containsFilter: S.optional(S.NullOr(S.Boolean)), + dynamicSearchRules: S.optional(S.NullOr(S.Boolean)), + network: S.optional(S.NullOr(S.Boolean)), + getTaskDocumentsRoute: S.optional(S.NullOr(S.Boolean)), + taskQueueCompactionRoute: S.optional(S.NullOr(S.Boolean)), + compositeEmbedders: S.optional(S.NullOr(S.Boolean)), + chatCompletions: S.optional(S.NullOr(S.Boolean)), + multimodal: S.optional(S.NullOr(S.Boolean)), + foreignKeys: S.optional(S.NullOr(S.Boolean)), + disableDocumentsFetchQueue: S.optional(S.NullOr(S.Boolean)), + legacySearch: S.optional(S.NullOr(S.Boolean)), + renderRoute: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "RuntimeTogglableFeatures", +}) as any as S.Schema; + +export interface GetfilterableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetfilterableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/filterable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "GetfilterableAttributesRequest", +}) as any as S.Schema; + +export type GetfilterableAttributesResponseBodyList = + Array; +export const GetfilterableAttributesResponseBodyList = /*@__PURE__*/ S.Array( + FilterableAttributesRule, +) as any as S.Schema; + +export type GetfilterableAttributesResponse = + GetfilterableAttributesResponseBodyList; +export const GetfilterableAttributesResponse = /*@__PURE__*/ S.suspend(() => + GetfilterableAttributesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetfilterableAttributesResponse", +}) as any as S.Schema; + +export interface GetforeignKeysRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetforeignKeysRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/foreign-keys", + code: 200, + }), + ), +).annotate({ + identifier: "GetforeignKeysRequest", +}) as any as S.Schema; + +export type GetforeignKeysResponseBodyList = Array; +export const GetforeignKeysResponseBodyList = /*@__PURE__*/ S.Array( + ForeignKey, +) as any as S.Schema; + +export type GetforeignKeysResponse = GetforeignKeysResponseBodyList; +export const GetforeignKeysResponse = /*@__PURE__*/ S.suspend(() => + GetforeignKeysResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetforeignKeysResponse", +}) as any as S.Schema; + +export interface GetHealthRequest {} +export const GetHealthRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/health", code: 200 })), +).annotate({ + identifier: "GetHealthRequest", +}) as any as S.Schema; + +export type HealthStatus = "available" | "mustRestart"; +export const HealthStatus = /*@__PURE__*/ S.String; + +export interface HealthResponse { + /** The status of the instance. */ + status: HealthStatus; +} +export const HealthResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: HealthStatus, + }), +).annotate({ identifier: "HealthResponse" }) as any as S.Schema; + +export interface GetIndexRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/indexes/{index_uid}", code: 200 })), +).annotate({ + identifier: "GetIndexRequest", +}) as any as S.Schema; + +/** An index containing searchable documents */ +export interface IndexView { + /** Unique identifier for the index. Once created, it cannot be changed */ + uid: string; + /** Creation date of the index, represented in RFC 3339 format */ + createdAt: string; + /** Latest date of index update, represented in RFC 3339 format */ + updatedAt: string; + /** [Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index */ + primaryKey?: string | null; +} +export const IndexView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String, + createdAt: S.String, + updatedAt: S.String, + primaryKey: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "IndexView" }) as any as S.Schema; + +export type SizeFormat = "human" | "raw"; +export const SizeFormat = /*@__PURE__*/ S.String; + +export interface GetIndexStatsRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** If `true`, adds `internalDatabaseSizes` to the response. */ + showInternalDatabaseSizes?: boolean; + /** Specify how to format the sizes: - `"raw"` (default): format sizes as a number of bytes - `"human"`: format sizes as a human-readable string with an appropriate unit. */ + sizeFormat?: SizeFormat | (string & {}); +} +export const GetIndexStatsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + showInternalDatabaseSizes: S.optional(S.Boolean.pipe(T.Query())), + sizeFormat: S.optional(SizeFormat.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/indexes/{index_uid}/stats", code: 200 }), + ), +).annotate({ + identifier: "GetIndexStatsRequest", +}) as any as S.Schema; + +export type Size = number | string; +export const Size = /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Size of all the internal databases for the index. Database names can change from version to version. */ +export type IndexStatsInternalDatabaseSizesMap = { + [key: string]: Size | undefined; +}; +export const IndexStatsInternalDatabaseSizesMap = /*@__PURE__*/ S.Record( + S.String, + Size, +) as any as S.Schema; + +/** Association of every field name with the number of times it occurs in the documents. */ +export type IndexStatsFieldDistributionMap = { + [key: string]: number | undefined; +}; +export const IndexStatsFieldDistributionMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +/** Stats of an `Index`, as known to the `stats` route. */ +export interface IndexStats { + /** Number of documents in the index */ + numberOfDocuments: number; + /** Size of the index' DB, in bytes. */ + indexSize: Size; + /** Size of the used pages of the index' DB, in bytes. */ + usedIndexSize: Size; + /** Size of the documents database, in bytes. */ + rawDocumentDbSize: Size; + /** Average size of a document in the documents database. */ + avgDocumentSize: Size; + /** Whether or not the index is currently ingesting document */ + isIndexing: boolean; + /** Size of all the internal databases for the index. Database names can change from version to version. */ + internalDatabaseSizes?: IndexStatsInternalDatabaseSizesMap; + /** Number of embeddings in the index */ + numberOfEmbeddings?: number | null; + /** Number of embedded documents in the index */ + numberOfEmbeddedDocuments?: number | null; + /** Association of every field name with the number of times it occurs in the documents. */ + fieldDistribution: IndexStatsFieldDistributionMap; +} +export const IndexStats = /*@__PURE__*/ S.suspend(() => + S.Struct({ + numberOfDocuments: S.Number, + indexSize: Size, + usedIndexSize: Size, + rawDocumentDbSize: Size, + avgDocumentSize: Size, + isIndexing: S.Boolean, + internalDatabaseSizes: S.optional(IndexStatsInternalDatabaseSizesMap), + numberOfEmbeddings: S.optional(S.NullOr(S.Number)), + numberOfEmbeddedDocuments: S.optional(S.NullOr(S.Number)), + fieldDistribution: IndexStatsFieldDistributionMap, + }), +).annotate({ identifier: "IndexStats" }) as any as S.Schema; + +export interface GetlocalizedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetlocalizedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/localized-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "GetlocalizedAttributesRequest", +}) as any as S.Schema; + +export type GetlocalizedAttributesResponseBodyList = + Array; +export const GetlocalizedAttributesResponseBodyList = /*@__PURE__*/ S.Array( + LocalizedAttributesRuleView, +) as any as S.Schema; + +export type GetlocalizedAttributesResponse = + GetlocalizedAttributesResponseBodyList; +export const GetlocalizedAttributesResponse = /*@__PURE__*/ S.suspend(() => + GetlocalizedAttributesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetlocalizedAttributesResponse", +}) as any as S.Schema; + +/** Format for log output */ +export type LogMode = "human" | "json" | "profile"; +export const LogMode = /*@__PURE__*/ S.String; + +export interface GetLogsRequest { + /** Log targets to filter. Format: code_part=log_level (e.g., milli=trace,actix_web=off) */ + target?: string; + mode?: LogMode | (string & {}); + /** Enable memory profiling (only useful with profile mode, significantly slows down the engine) */ + profileMemory?: boolean; +} +export const GetLogsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + target: S.optional(S.String), + mode: S.optional(LogMode), + profileMemory: S.optional(S.Boolean), + }).pipe(T.Http({ method: "POST", uri: "/logs/stream", code: 200 })), +).annotate({ identifier: "GetLogsRequest" }) as any as S.Schema; + +export type GetLogsResponse = string; +export const GetLogsResponse = /*@__PURE__*/ S.suspend(() => + S.String.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetLogsResponse", +}) as any as S.Schema; + +export interface GetMetricsRequest {} +export const GetMetricsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/metrics", code: 200 })), +).annotate({ + identifier: "GetMetricsRequest", +}) as any as S.Schema; + +export interface GetMetricsResponse {} +export const GetMetricsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricsResponse", +}) as any as S.Schema; + +export interface GetNetworkRequest {} +export const GetNetworkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/network", code: 200 })), +).annotate({ + identifier: "GetNetworkRequest", +}) as any as S.Schema; + +/** Configuration for a remote Meilisearch instance */ +export interface Remote { + /** URL of the remote instance - If the URL of the remote instance is resolving to a non-global IP, make sure that `--experimental-allowed-ip-networks` allows it. For details on how use this parameter, refer to [this documentation](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#allow-requests-to-private-networks). */ + url?: string | null; + /** API key for search operations on this remote */ + searchApiKey?: string | null; + /** API key for write operations on this remote */ + writeApiKey?: string | null; +} +export const Remote = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + searchApiKey: S.optional(S.NullOr(S.String)), + writeApiKey: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "Remote" }) as any as S.Schema; + +/** Map of remote instance names to their configurations - Pass `null` as a value for a remote to remove it from the configuration. - Removing a remote will also remove it from all shards. - Remotes that don't appear in this list will be unmodified by the network call. */ +export type NetworkRemotesMap = { [key: string]: Remote | undefined }; +export const NetworkRemotesMap = /*@__PURE__*/ S.Record( + S.String, + Remote, +) as any as S.Schema; + +/** List of remotes that own this shard. - The remotes must be part of the network's configuration - Setting this to a non-`null` value will replace all existing remotes for this shard. - `addRemotes` and `removeRemotes` are applied after `remotes` if multiple options are present. */ +export type ShardRemotesList = Array; +export const ShardRemotesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Remotes to add to the list of owners of this shard. - The remotes must be part of the network's configuration - Setting this to non-`null` will append the listed remotes to the list of owners of this shard. - `remotes` is applied before `addRemotes` - `removeRemotes` is applied after `addRemotes` */ +export type ShardAddRemotesList = Array; +export const ShardAddRemotesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Remotes to remove from the list of owners of this shard. - The remotes may or may not be part of the network's configuration - Setting this to non-`null` will remove the listed remotes from the list of owners of this shard. - `remotes` and `addRemotes` are applied before `removeRemotes` - Remotes removed from the configuration are automatically removed from all shards and it is not necessary to explicitly pass them as `removeRemotes`. */ +export type ShardRemoveRemotesList = Array; +export const ShardRemoveRemotesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Configuration for a named shard of the network Documents are distributed among the various declared shards. Remotes own shards, meaning they own the documents that belong to these shards. */ +export interface Shard { + /** List of remotes that own this shard. - The remotes must be part of the network's configuration - Setting this to a non-`null` value will replace all existing remotes for this shard. - `addRemotes` and `removeRemotes` are applied after `remotes` if multiple options are present. */ + remotes?: ShardRemotesList | null; + /** Remotes to add to the list of owners of this shard. - The remotes must be part of the network's configuration - Setting this to non-`null` will append the listed remotes to the list of owners of this shard. - `remotes` is applied before `addRemotes` - `removeRemotes` is applied after `addRemotes` */ + addRemotes?: ShardAddRemotesList | null; + /** Remotes to remove from the list of owners of this shard. - The remotes may or may not be part of the network's configuration - Setting this to non-`null` will remove the listed remotes from the list of owners of this shard. - `remotes` and `addRemotes` are applied before `removeRemotes` - Remotes removed from the configuration are automatically removed from all shards and it is not necessary to explicitly pass them as `removeRemotes`. */ + removeRemotes?: ShardRemoveRemotesList | null; +} +export const Shard = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remotes: S.optional(S.NullOr(ShardRemotesList)), + addRemotes: S.optional(S.NullOr(ShardAddRemotesList)), + removeRemotes: S.optional(S.NullOr(ShardRemoveRemotesList)), + }), +).annotate({ identifier: "Shard" }) as any as S.Schema; + +/** Map of shard names to their configurations. - Pass `null` as a value for a shard to remove it from the configuration. - Shards that don't appear in this list will be unmodified by the network call. */ +export type NetworkShardsMap = { [key: string]: Shard | undefined }; +export const NetworkShardsMap = /*@__PURE__*/ S.Record( + S.String, + Shard, +) as any as S.Schema; + +/** Previous shard configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ +export type NetworkPreviousShardsMap = { [key: string]: Shard | undefined }; +export const NetworkPreviousShardsMap = /*@__PURE__*/ S.Record( + S.String, + Shard, +) as any as S.Schema; + +/** Previous remote configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ +export type NetworkPreviousRemotesMap = { [key: string]: Remote | undefined }; +export const NetworkPreviousRemotesMap = /*@__PURE__*/ S.Record( + S.String, + Remote, +) as any as S.Schema; + +/** Network topology configuration for distributed Meilisearch */ +export interface Network { + /** Map of remote instance names to their configurations - Pass `null` as a value for a remote to remove it from the configuration. - Removing a remote will also remove it from all shards. - Remotes that don't appear in this list will be unmodified by the network call. */ + remotes?: NetworkRemotesMap | null; + /** Map of shard names to their configurations. - Pass `null` as a value for a shard to remove it from the configuration. - Shards that don't appear in this list will be unmodified by the network call. */ + shards?: NetworkShardsMap | null; + /** Previous shard configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ + previousShards?: NetworkPreviousShardsMap | null; + /** Name of this instance in the network */ + self?: string | null; + /** Name of the leader instance in the network */ + leader?: string | null; + /** Previous remote configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ + previousRemotes?: NetworkPreviousRemotesMap | null; +} +export const Network = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remotes: S.optional(S.NullOr(NetworkRemotesMap)), + shards: S.optional(S.NullOr(NetworkShardsMap)), + previousShards: S.optional(S.NullOr(NetworkPreviousShardsMap)), + self: S.optional(S.NullOr(S.String)), + leader: S.optional(S.NullOr(S.String)), + previousRemotes: S.optional(S.NullOr(NetworkPreviousRemotesMap)), + }), +).annotate({ identifier: "Network" }) as any as S.Schema; + +export interface GetnonSeparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetnonSeparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/non-separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "GetnonSeparatorTokensRequest", +}) as any as S.Schema; + +export type GetnonSeparatorTokensResponseBodyList = Array; +export const GetnonSeparatorTokensResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetnonSeparatorTokensResponse = + GetnonSeparatorTokensResponseBodyList; +export const GetnonSeparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + GetnonSeparatorTokensResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetnonSeparatorTokensResponse", +}) as any as S.Schema; + +export interface GetpaginationRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetpaginationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/pagination", + code: 200, + }), + ), +).annotate({ + identifier: "GetpaginationRequest", +}) as any as S.Schema; + +export interface GetprefixSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetprefixSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/prefix-search", + code: 200, + }), + ), +).annotate({ + identifier: "GetprefixSearchRequest", +}) as any as S.Schema; + +export type GetprefixSearchResponse = PrefixSearchSettings; +export const GetprefixSearchResponse = /*@__PURE__*/ S.suspend(() => + PrefixSearchSettings.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetprefixSearchResponse", +}) as any as S.Schema; + +export interface GetproximityPrecisionRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetproximityPrecisionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/proximity-precision", + code: 200, + }), + ), +).annotate({ + identifier: "GetproximityPrecisionRequest", +}) as any as S.Schema; + +export type ProximityPrecisionView = "byWord" | "byAttribute"; +export const ProximityPrecisionView = /*@__PURE__*/ S.String; + +export type GetproximityPrecisionResponse = ProximityPrecisionView; +export const GetproximityPrecisionResponse = /*@__PURE__*/ S.suspend(() => + ProximityPrecisionView.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetproximityPrecisionResponse", +}) as any as S.Schema; + +export interface GetrankingRulesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetrankingRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/ranking-rules", + code: 200, + }), + ), +).annotate({ + identifier: "GetrankingRulesRequest", +}) as any as S.Schema; + +/** Sorted by decreasing number of matched query terms. */ +export type RankingRuleViewCase0 = "words"; +export const RankingRuleViewCase0 = /*@__PURE__*/ S.String; + +/** Sorted by increasing number of typos. */ +export type RankingRuleViewCase1 = "typo"; +export const RankingRuleViewCase1 = /*@__PURE__*/ S.String; + +/** Sorted by increasing distance between matched query terms. */ +export type RankingRuleViewCase2 = "proximity"; +export const RankingRuleViewCase2 = /*@__PURE__*/ S.String; + +/** Documents with query words contained in more important attributes and at a closer-to-the-front position in it are considered better. */ +export type RankingRuleViewCase3 = "attribute"; +export const RankingRuleViewCase3 = /*@__PURE__*/ S.String; + +/** Documents with query words contained in more important attributes are considered better. Position of the query words in an attribute is not considered. */ +export type RankingRuleViewCase4 = "attributeRank"; +export const RankingRuleViewCase4 = /*@__PURE__*/ S.String; + +/** Documents with query words that are closer to the front of an attribute are considered better. Attribute rank is not considered. */ +export type RankingRuleViewCase5 = "wordPosition"; +export const RankingRuleViewCase5 = /*@__PURE__*/ S.String; + +/** Dynamically sort at query time the documents. None, one or multiple Asc/Desc sortable attributes can be used in place of this criterion at query time. */ +export type RankingRuleViewCase6 = "sort"; +export const RankingRuleViewCase6 = /*@__PURE__*/ S.String; + +/** Sorted by the similarity of the matched words with the query words. */ +export type RankingRuleViewCase7 = "exactness"; +export const RankingRuleViewCase7 = /*@__PURE__*/ S.String; + +/** Sorted by the increasing value of the field specified. */ +export interface RankingRuleViewCase8 { + /** Sorted by the increasing value of the field specified. */ + asc: string; +} +export const RankingRuleViewCase8 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + asc: S.String, + }), +).annotate({ + identifier: "RankingRuleViewCase8", +}) as any as S.Schema; + +/** Sorted by the decreasing value of the field specified. */ +export interface RankingRuleViewCase9 { + /** Sorted by the decreasing value of the field specified. */ + desc: string; +} +export const RankingRuleViewCase9 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + desc: S.String, + }), +).annotate({ + identifier: "RankingRuleViewCase9", +}) as any as S.Schema; + +export type RankingRuleView = + | RankingRuleViewCase0 + | RankingRuleViewCase1 + | RankingRuleViewCase2 + | RankingRuleViewCase3 + | RankingRuleViewCase4 + | RankingRuleViewCase5 + | RankingRuleViewCase6 + | RankingRuleViewCase7 + | RankingRuleViewCase8 + | RankingRuleViewCase9; +export const RankingRuleView = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetrankingRulesResponseBodyList = Array; +export const GetrankingRulesResponseBodyList = /*@__PURE__*/ S.Array( + RankingRuleView, +) as any as S.Schema; + +export type GetrankingRulesResponse = GetrankingRulesResponseBodyList; +export const GetrankingRulesResponse = /*@__PURE__*/ S.suspend(() => + GetrankingRulesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetrankingRulesResponse", +}) as any as S.Schema; + +export interface GetRuleRequest { + /** Unique identifier of the search rule. */ + uid: string; +} +export const GetRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/dynamic-search-rules/{uid}", code: 200 }), + ), +).annotate({ identifier: "GetRuleRequest" }) as any as S.Schema; + +export interface TimeCondition { + /** Start of the time range where this rule can be considered active. Specify as a RFC3339 datetime. */ + start?: string | null; + /** End of the time range where this rule can be considered active. Specify as a RFC3339 datetime. */ + end?: string | null; +} +export const TimeCondition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + start: S.optional(S.NullOr(S.String)), + end: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "TimeCondition" }) as any as S.Schema; + +export interface QueryCondition { + /** If present and non-null, specifies either: - That this rule can only be active when the search query is empty - That this rule can only be active when the search query is non-empty (contains at least one word) */ + isEmpty?: boolean | null; + /** If present and non-null, specifies that the rule can only be active if all the specified words are present in the search query. */ + words?: string | null; +} +export const QueryCondition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + isEmpty: S.optional(S.NullOr(S.Boolean)), + words: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "QueryCondition" }) as any as S.Schema; + +export type FilterConditionValuesMap = { [key: string]: unknown | undefined }; +export const FilterConditionValuesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface FilterCondition { + values?: FilterConditionValuesMap; +} +export const FilterCondition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + values: S.optional(FilterConditionValuesMap), + }), +).annotate({ + identifier: "FilterCondition", +}) as any as S.Schema; + +export interface Conditions { + time?: TimeCondition | null; + query?: QueryCondition | null; + filter?: FilterCondition | null; +} +export const Conditions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + time: S.optional(S.NullOr(TimeCondition)), + query: S.optional(S.NullOr(QueryCondition)), + filter: S.optional(S.NullOr(FilterCondition)), + }), +).annotate({ identifier: "Conditions" }) as any as S.Schema; + +export interface Selector { + indexUid?: string | null; + id: string; +} +export const Selector = /*@__PURE__*/ S.suspend(() => + S.Struct({ + indexUid: S.optional(S.NullOr(S.String)), + id: S.String, + }), +).annotate({ identifier: "Selector" }) as any as S.Schema; + +export interface RuleAction { + /** Target document selector for this action. */ + selector: Selector; + /** Action payload to apply to the selected document. */ + action: unknown; +} +export const RuleAction = /*@__PURE__*/ S.suspend(() => + S.Struct({ + selector: Selector, + action: S.Unknown, + }), +).annotate({ identifier: "RuleAction" }) as any as S.Schema; + +/** Actions to apply when the dynamic search rule matches. */ +export type DynamicSearchRuleActionsList = Array; +export const DynamicSearchRuleActionsList = /*@__PURE__*/ S.Array( + RuleAction, +) as any as S.Schema; + +export interface DynamicSearchRule { + /** Unique identifier of the dynamic search rule. */ + uid: string; + /** Human-readable description of the dynamic search rule. */ + description?: string | null; + /** Date time of the last update of this rule. */ + lastUpdatedAt?: string | null; + /** Precedence of the dynamic search rule. Lower numeric values take precedence over higher ones. If omitted, the rule is treated as having the lowest precedence. This precedence is used to resolve conflicts between matching rules: - If the same document is selected by multiple rules, the smallest `priority` number wins - If different documents are pinned to the same position, they are ordered by ascending `priority` */ + precedence?: number | null; + /** Whether the dynamic search rule is active. */ + active?: boolean; + /** Conditions that must match before the dynamic search rule applies. */ + conditions?: Conditions; + /** Actions to apply when the dynamic search rule matches. */ + actions: DynamicSearchRuleActionsList; +} +export const DynamicSearchRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String, + description: S.optional(S.NullOr(S.String)), + lastUpdatedAt: S.optional(S.NullOr(S.String)), + precedence: S.optional(S.NullOr(S.Number)), + active: S.optional(S.Boolean), + conditions: S.optional(Conditions), + actions: DynamicSearchRuleActionsList, + }), +).annotate({ + identifier: "DynamicSearchRule", +}) as any as S.Schema; + +export interface GetsearchableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetsearchableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/searchable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "GetsearchableAttributesRequest", +}) as any as S.Schema; + +export type GetsearchableAttributesResponseBodyList = Array; +export const GetsearchableAttributesResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetsearchableAttributesResponse = + GetsearchableAttributesResponseBodyList; +export const GetsearchableAttributesResponse = /*@__PURE__*/ S.suspend(() => + GetsearchableAttributesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetsearchableAttributesResponse", +}) as any as S.Schema; + +export interface GetsearchCutoffMsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetsearchCutoffMsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/search-cutoff-ms", + code: 200, + }), + ), +).annotate({ + identifier: "GetsearchCutoffMsRequest", +}) as any as S.Schema; + +export type GetsearchCutoffMsResponse = number; +export const GetsearchCutoffMsResponse = /*@__PURE__*/ S.suspend(() => + S.Number.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetsearchCutoffMsResponse", +}) as any as S.Schema; + +export interface GetseparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetseparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "GetseparatorTokensRequest", +}) as any as S.Schema; + +export type GetseparatorTokensResponseBodyList = Array; +export const GetseparatorTokensResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetseparatorTokensResponse = GetseparatorTokensResponseBodyList; +export const GetseparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + GetseparatorTokensResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetseparatorTokensResponse", +}) as any as S.Schema; + +export interface GetSettingsRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; +} +export const GetSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/chats/{workspace_uid}/settings", + code: 200, + }), + ), +).annotate({ + identifier: "GetSettingsRequest", +}) as any as S.Schema; + +export interface GetSettingsResponse {} +export const GetSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSettingsResponse", +}) as any as S.Schema; + +export interface GetsortableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetsortableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/sortable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "GetsortableAttributesRequest", +}) as any as S.Schema; + +export type GetsortableAttributesResponseBodyList = Array; +export const GetsortableAttributesResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetsortableAttributesResponse = + GetsortableAttributesResponseBodyList; +export const GetsortableAttributesResponse = /*@__PURE__*/ S.suspend(() => + GetsortableAttributesResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetsortableAttributesResponse", +}) as any as S.Schema; + +export interface GetStatsRequest { + /** If `true`, adds `internalDatabaseSizes` to the response. */ + showInternalDatabaseSizes?: boolean; + /** Specify how to format the sizes: - `"raw"` (default): format sizes as a number of bytes - `"human"`: format sizes as a human-readable string with an appropriate unit. */ + sizeFormat?: SizeFormat | (string & {}); +} +export const GetStatsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + showInternalDatabaseSizes: S.optional(S.Boolean.pipe(T.Query())), + sizeFormat: S.optional(SizeFormat.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/stats", code: 200 })), +).annotate({ + identifier: "GetStatsRequest", +}) as any as S.Schema; + +/** Statistics for each index */ +export type StatsIndexesMap = { [key: string]: IndexStats | undefined }; +export const StatsIndexesMap = /*@__PURE__*/ S.Record( + S.String, + IndexStats, +) as any as S.Schema; + +/** Global statistics for the Meilisearch instance */ +export interface Stats { + /** Total disk space used by the database in bytes */ + databaseSize: Size; + /** Actual size of the data in the database in bytes */ + usedDatabaseSize: Size; + /** Date of the last update in RFC 3339 format. Null if no update has been processed */ + lastUpdate?: string | null; + /** Statistics for each index */ + indexes: StatsIndexesMap; +} +export const Stats = /*@__PURE__*/ S.suspend(() => + S.Struct({ + databaseSize: Size, + usedDatabaseSize: Size, + lastUpdate: S.optional(S.NullOr(S.String)), + indexes: StatsIndexesMap, + }), +).annotate({ identifier: "Stats" }) as any as S.Schema; + +export interface GetstopWordsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetstopWordsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/stop-words", + code: 200, + }), + ), +).annotate({ + identifier: "GetstopWordsRequest", +}) as any as S.Schema; + +export type GetstopWordsResponseBodyList = Array; +export const GetstopWordsResponseBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetstopWordsResponse = GetstopWordsResponseBodyList; +export const GetstopWordsResponse = /*@__PURE__*/ S.suspend(() => + GetstopWordsResponseBodyList.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetstopWordsResponse", +}) as any as S.Schema; + +export interface GetsynonymsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GetsynonymsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/synonyms", + code: 200, + }), + ), +).annotate({ + identifier: "GetsynonymsRequest", +}) as any as S.Schema; + +export type GetsynonymsResponseBodyValueList = Array; +export const GetsynonymsResponseBodyValueList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetsynonymsResponseBodyMap = { + [key: string]: GetsynonymsResponseBodyValueList | undefined; +}; +export const GetsynonymsResponseBodyMap = /*@__PURE__*/ S.Record( + S.String, + GetsynonymsResponseBodyValueList, +) as any as S.Schema; + +export type GetsynonymsResponse = GetsynonymsResponseBodyMap; +export const GetsynonymsResponse = /*@__PURE__*/ S.suspend(() => + GetsynonymsResponseBodyMap.pipe(T.RawResponseRoot()), +).annotate({ + identifier: "GetsynonymsResponse", +}) as any as S.Schema; + +export interface GetTaskRequest { + /** The task identifier. */ + task_id: number; +} +export const GetTaskRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + task_id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/tasks/{task_id}", code: 200 })), +).annotate({ identifier: "GetTaskRequest" }) as any as S.Schema; + +export type Code = + | "api_key_already_exists" + | "api_key_not_found" + | "index_scoped_api_key_with_global_action" + | "bad_parameter" + | "bad_request" + | "database_size_limit_reached" + | "document_not_found" + | "dump_already_processing" + | "dump_not_found" + | "dump_process_failed" + | "duplicate_index_found" + | "immutable_api_key_actions" + | "immutable_api_key_created_at" + | "immutable_api_key_expires_at" + | "immutable_api_key_indexes" + | "immutable_api_key_key" + | "immutable_api_key_uid" + | "immutable_api_key_updated_at" + | "immutable_index_created_at" + | "immutable_index_updated_at" + | "import_task_already_received" + | "import_task_unknown_remote" + | "receive_import_finished_unknown_remote" + | "import_task_without_network_task" + | "index_already_exists" + | "index_creation_failed" + | "index_not_found" + | "index_primary_key_already_exists" + | "index_primary_key_multiple_candidates_found" + | "index_primary_key_no_candidate_found" + | "internal" + | "invalid_api_key" + | "invalid_api_key_actions" + | "invalid_api_key_description" + | "invalid_api_key_expires_at" + | "invalid_api_key_indexes" + | "invalid_api_key_limit" + | "invalid_api_key_name" + | "invalid_api_key_offset" + | "invalid_api_key_uid" + | "invalid_content_type" + | "invalid_document_csv_delimiter" + | "invalid_document_fields" + | "invalid_document_retrieve_vectors" + | "missing_document_filter" + | "missing_document_edition_function" + | "inconsistent_document_change_headers" + | "invalid_document_filter" + | "invalid_document_sort" + | "invalid_document_use_network" + | "invalid_document_retrieve" + | "invalid_document_geo_field" + | "invalid_document_geojson_field" + | "invalid_header_value" + | "invalid_vector_dimensions" + | "invalid_vectors_type" + | "invalid_document_id" + | "invalid_document_ids" + | "invalid_document_limit" + | "invalid_document_offset" + | "invalid_search_embedder" + | "invalid_similar_embedder" + | "invalid_search_hybrid_query" + | "invalid_index_limit" + | "invalid_index_offset" + | "invalid_index_primary_key" + | "invalid_index_custom_metadata" + | "invalid_skip_creation" + | "invalid_index_uid" + | "invalid_multi_search_facets" + | "invalid_multi_search_facets_by_index" + | "invalid_multi_search_facet_order" + | "invalid_multi_search_query_personalization" + | "invalid_multi_search_query_show_performance_details" + | "invalid_multi_search_federated" + | "invalid_multi_search_federation_options" + | "invalid_multi_search_max_values_per_facet" + | "invalid_multi_search_merge_facets" + | "invalid_multi_search_query_facets" + | "invalid_multi_search_distinct" + | "invalid_multi_search_query_pagination" + | "invalid_multi_search_query_ranking_rules" + | "invalid_multi_search_query_position" + | "invalid_multi_search_remote" + | "invalid_multi_search_weight" + | "invalid_network_leader" + | "invalid_network_remotes" + | "invalid_network_shards" + | "invalid_network_self" + | "invalid_network_search_api_key" + | "invalid_network_write_api_key" + | "invalid_network_url" + | "invalid_search_attributes_to_search_on" + | "invalid_search_attributes_to_crop" + | "invalid_search_attributes_to_highlight" + | "invalid_similar_attributes_to_retrieve" + | "invalid_similar_retrieve_vectors" + | "invalid_search_attributes_to_retrieve" + | "invalid_search_ranking_score_threshold" + | "invalid_similar_ranking_score_threshold" + | "invalid_search_retrieve_vectors" + | "invalid_search_crop_length" + | "invalid_search_crop_marker" + | "invalid_search_facets" + | "invalid_search_semantic_ratio" + | "invalid_search_locales" + | "invalid_facet_search_exhaustive_facet_count" + | "invalid_facet_search_facet_name" + | "invalid_similar_id" + | "invalid_search_filter" + | "invalid_similar_filter" + | "invalid_search_highlight_post_tag" + | "invalid_search_highlight_pre_tag" + | "invalid_search_hits_per_page" + | "invalid_similar_limit" + | "invalid_search_limit" + | "invalid_search_matching_strategy" + | "invalid_similar_offset" + | "invalid_search_offset" + | "invalid_search_page" + | "invalid_search_q" + | "invalid_facet_search_query" + | "invalid_facet_search_name" + | "facet_search_disabled" + | "invalid_search_vector" + | "invalid_search_media" + | "invalid_search_show_matches_position" + | "invalid_search_show_ranking_score" + | "invalid_similar_show_ranking_score" + | "invalid_search_show_ranking_score_details" + | "invalid_search_show_performance_details" + | "invalid_search_use_network" + | "invalid_similar_show_ranking_score_details" + | "invalid_similar_show_performance_details" + | "invalid_search_sort" + | "invalid_search_distinct" + | "invalid_search_personalize" + | "invalid_search_personalize_user_context" + | "invalid_search_media_and_vector" + | "invalid_settings_displayed_attributes" + | "invalid_settings_distinct_attribute" + | "invalid_settings_proximity_precision" + | "invalid_settings_facet_search" + | "invalid_settings_prefix_search" + | "invalid_settings_faceting" + | "invalid_settings_filterable_attributes" + | "invalid_settings_foreign_keys" + | "invalid_settings_pagination" + | "invalid_settings_search_cutoff_ms" + | "invalid_settings_embedders" + | "invalid_settings_ranking_rules" + | "invalid_settings_searchable_attributes" + | "invalid_settings_sortable_attributes" + | "invalid_settings_stop_words" + | "invalid_settings_non_separator_tokens" + | "invalid_settings_separator_tokens" + | "invalid_settings_dictionary" + | "invalid_settings_synonyms" + | "invalid_settings_typo_tolerance" + | "invalid_settings_localized_attributes" + | "invalid_state" + | "invalid_stats_show_internal_database_sizes" + | "invalid_stats_size_format" + | "invalid_store_file" + | "invalid_swap_duplicate_index_found" + | "invalid_swap_indexes" + | "invalid_swap_rename" + | "invalid_task_after_enqueued_at" + | "invalid_task_after_finished_at" + | "invalid_task_after_started_at" + | "invalid_task_before_enqueued_at" + | "invalid_task_before_finished_at" + | "invalid_task_before_started_at" + | "invalid_task_canceled_by" + | "invalid_task_from" + | "invalid_task_limit" + | "invalid_task_reverse" + | "invalid_task_statuses" + | "invalid_task_types" + | "invalid_task_uids" + | "invalid_batch_uids" + | "io_error" + | "feature_not_enabled" + | "malformed_payload" + | "max_fields_limit_exceeded" + | "missing_api_key_actions" + | "missing_api_key_expires_at" + | "missing_api_key_indexes" + | "missing_authorization_header" + | "missing_content_type" + | "missing_document_id" + | "missing_facet_search_facet_name" + | "missing_index_uid" + | "missing_master_key" + | "missing_network_url" + | "missing_payload" + | "missing_search_hybrid" + | "missing_swap_indexes" + | "missing_task_filters" + | "network_version_mismatch" + | "no_space_left_on_device" + | "not_leader" + | "payload_too_large" + | "remote_bad_response" + | "remote_bad_request" + | "unknown_remote" + | "remote_could_not_send_request" + | "remote_invalid_api_key" + | "remote_remote_error" + | "remote_timeout" + | "too_many_search_requests" + | "task_not_found" + | "task_file_not_found" + | "batch_not_found" + | "too_many_open_files" + | "too_many_vectors" + | "unexpected_network_previous_remotes" + | "network_version_too_old" + | "unprocessed_network_task" + | "unretrievable_document" + | "unretrievable_error_code" + | "unsupported_media_type" + | "invalid_s3_snapshot_request" + | "invalid_s3_snapshot_parameters" + | "s3_snapshot_server_error" + | "vector_embedding_error" + | "not_found_similar_id" + | "invalid_document_edition_context" + | "invalid_document_edition_function_filter" + | "edit_documents_by_function_error" + | "invalid_settings_index_chat" + | "invalid_export_url" + | "invalid_export_api_key" + | "invalid_export_payload_size" + | "invalid_export_indexes_patterns" + | "invalid_export_index_filter" + | "invalid_export_index_override_settings" + | "unimplemented_external_function_calling" + | "unimplemented_non_streaming_chat_completions" + | "unimplemented_multi_choice_chat_completions" + | "chat_not_found" + | "invalid_chat_setting_document_template" + | "invalid_chat_completion_org_id" + | "invalid_chat_completion_project_id" + | "invalid_chat_completion_api_version" + | "invalid_chat_completion_deployment_id" + | "invalid_chat_completion_source" + | "invalid_chat_completion_base_api" + | "invalid_chat_completion_api_key" + | "invalid_chat_completion_prompts" + | "invalid_chat_completion_system_prompt" + | "invalid_chat_completion_search_description_prompt" + | "invalid_chat_completion_search_query_param_prompt" + | "invalid_chat_completion_search_filter_param_prompt" + | "invalid_chat_completion_search_index_uid_param_prompt" + | "invalid_chat_completion_pre_query_prompt" + | "invalid_index_fields_filter" + | "invalid_index_fields_filter_attribute_patterns" + | "invalid_index_fields_filter_displayed" + | "invalid_index_fields_filter_searchable" + | "invalid_index_fields_filter_sortable" + | "invalid_index_fields_filter_distinct" + | "invalid_index_fields_filter_ranking_rule" + | "invalid_index_fields_filter_filterable" + | "requires_enterprise_edition" + | "invalid_render_template" + | "invalid_render_input" + | "render_document_not_found" + | "template_parsing_error" + | "template_rendering_error" + | "invalid_webhooks" + | "invalid_webhook_url" + | "invalid_webhook_headers" + | "immutable_webhook" + | "invalid_webhook_uuid" + | "webhook_not_found" + | "immutable_webhook_uuid" + | "immutable_webhook_is_editable" + | "invalid_dynamic_search_rule_offset" + | "invalid_dynamic_search_rule_limit" + | "invalid_dynamic_search_rule_filter" + | "invalid_dynamic_search_rule_description" + | "invalid_dynamic_search_rule_priority" + | "invalid_dynamic_search_rule_active" + | "invalid_dynamic_search_rule_conditions" + | "invalid_dynamic_search_rule_actions" + | "invalid_dynamic_search_rule_filter_query" + | "invalid_dynamic_search_rule_filter_active" + | "dynamic_search_rule_not_found"; +export const Code = /*@__PURE__*/ S.String; + +export type ErrorType = "internal" | "invalid_request" | "auth" | "system"; +export const ErrorType = /*@__PURE__*/ S.String; + +export interface ResponseError { + /** The error message. */ + message: string; + /** The error code. */ + code: Code; + /** The error type. */ + type: ErrorType; + /** A link to the documentation about this specific error. */ + link: string; +} +export const ResponseError = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message: S.String, + code: Code, + type: ErrorType, + link: S.String, + }), +).annotate({ identifier: "ResponseError" }) as any as S.Schema; + +/** Information about the origin of a task in a distributed Meilisearch deployment. This tracks where a task was originally created before being replicated to other nodes. */ +export interface Origin { + /** The name of the remote Meilisearch instance where this task originated. This corresponds to a remote defined in the network configuration. */ + remoteName: string; + /** The unique task identifier on the originating remote. This allows tracking the same task across different nodes in the network. */ + taskUid: number; + /** The version of the network topology when this task was created. Used to ensure consistent task routing during network topology changes. */ + networkVersion?: string; +} +export const Origin = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remoteName: S.String, + taskUid: S.Number, + networkVersion: S.optional(S.String), + }), +).annotate({ identifier: "Origin" }) as any as S.Schema; + +/** Tasks that were duplicated from `origin` */ +export interface DbTaskNetworkCase0 { + origin: Origin; +} +export const DbTaskNetworkCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + origin: Origin, + }), +).annotate({ + identifier: "DbTaskNetworkCase0", +}) as any as S.Schema; + +/** Represents a task that was replicated to a remote Meilisearch instance. Contains either the remote task UID on success, or an error if replication failed. */ +export interface RemoteTask { + /** The unique task identifier assigned by the remote Meilisearch instance. Present when the task was successfully replicated to the remote. */ + taskUid?: number | null; + error?: ResponseError | null; +} +export const RemoteTask = /*@__PURE__*/ S.suspend(() => + S.Struct({ + taskUid: S.optional(S.NullOr(S.Number)), + error: S.optional(S.NullOr(ResponseError)), + }), +).annotate({ identifier: "RemoteTask" }) as any as S.Schema; + +export type DbTaskNetworkCase1RemoteTasksMap = { + [key: string]: RemoteTask | undefined; +}; +export const DbTaskNetworkCase1RemoteTasksMap = /*@__PURE__*/ S.Record( + S.String, + RemoteTask, +) as any as S.Schema; + +/** Tasks that were duplicated as `remote_tasks` */ +export interface DbTaskNetworkCase1 { + remote_tasks: DbTaskNetworkCase1RemoteTasksMap; + network_version?: string; +} +export const DbTaskNetworkCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remote_tasks: DbTaskNetworkCase1RemoteTasksMap, + network_version: S.optional(S.String), + }), +).annotate({ + identifier: "DbTaskNetworkCase1", +}) as any as S.Schema; + +/** Import data stored in a task */ +export interface ImportData { + /** Remote that this task is imported from */ + remoteName: string; + /** Index relevant to this task */ + indexName?: string | null; + /** Number of documents in this task */ + documentCount: number; +} +export const ImportData = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remoteName: S.String, + indexName: S.optional(S.NullOr(S.String)), + documentCount: S.Number, + }), +).annotate({ identifier: "ImportData" }) as any as S.Schema; + +/** Document import tasks sent in the context of `network_change` */ +export interface DbTaskNetworkCase2 { + import_from: ImportData; + network_change: Origin; +} +export const DbTaskNetworkCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + import_from: ImportData, + network_change: Origin, + }), +).annotate({ + identifier: "DbTaskNetworkCase2", +}) as any as S.Schema; + +export type DbTaskNetwork = + | DbTaskNetworkCase0 + | DbTaskNetworkCase1 + | DbTaskNetworkCase2; +export const DbTaskNetwork = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Represents the current state and details of an asynchronous task. Tasks are created when you perform operations like adding documents, updating settings, or creating indexes. Use this view to monitor task progress and check for errors. */ +export interface TaskView { + /** The unique sequential identifier assigned to this task. Task UIDs are assigned in order of creation and can be used to retrieve specific task information or track task dependencies. */ + uid: number; + /** The unique identifier of the batch that processed this task. Multiple tasks may share the same batch UID if they were processed together for efficiency. This is `null` for tasks that haven't been processed. */ + batchUid?: number | null; + /** The unique identifier of the index this task operates on. This is `null` for global tasks like `dumpCreation` or `taskDeletion` that don't target a specific index. */ + indexUid?: string | null; + /** The current processing status of the task. Possible values are: `enqueued` (waiting), `processing` (executing), `succeeded`, `failed`, or `canceled`. */ + status: Status; + /** The type of operation this task performs. Examples include `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `dumpCreation`, etc. */ + type: Kind; + /** If this task was canceled, this field contains the UID of the `taskCancelation` task that canceled it. This is `null` for tasks that were not canceled. */ + canceledBy?: number | null; + /** Contains type-specific information about the task, such as the number of documents processed, settings that were applied, or filters that were used. The structure varies depending on the task type. */ + details?: unknown | null; + error?: ResponseError | null; + /** The total time spent processing this task, formatted as an ISO-8601 duration (e.g., `PT0.5S` for 0.5 seconds). This is `null` for tasks that haven't finished processing yet. */ + duration?: string | null; + /** The timestamp when this task was added to the queue, formatted as an RFC 3339 date-time string. All tasks have an enqueued timestamp as it's set when the task is created. */ + enqueuedAt: string; + /** The timestamp when Meilisearch began processing this task, formatted as an RFC 3339 date-time string. This is `null` for tasks that are still in the queue waiting to be processed. */ + startedAt?: string; + /** The timestamp when this task finished processing (whether successfully or with an error), formatted as an RFC 3339 date-time string. This is `null` for tasks that haven't finished yet. */ + finishedAt?: string; + network?: DbTaskNetwork | null; + /** Custom metadata string that was attached to this task when it was created. This can be used to associate tasks with external systems, track task origins, or add any application-specific information. */ + customMetadata?: string | null; +} +export const TaskView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.Number, + batchUid: S.optional(S.NullOr(S.Number)), + indexUid: S.optional(S.NullOr(S.String)), + status: Status, + type: Kind, + canceledBy: S.optional(S.NullOr(S.Number)), + details: S.optional(S.NullOr(S.Unknown)), + error: S.optional(S.NullOr(ResponseError)), + duration: S.optional(S.NullOr(S.String)), + enqueuedAt: S.String, + startedAt: S.optional(S.String), + finishedAt: S.optional(S.String), + network: S.optional(S.NullOr(DbTaskNetwork)), + customMetadata: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "TaskView" }) as any as S.Schema; + +export interface GetTaskDocumentsFileRequest { + /** The task identifier. */ + task_id: number; +} +export const GetTaskDocumentsFileRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + task_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/tasks/{task_id}/documents", code: 200 }), + ), +).annotate({ + identifier: "GetTaskDocumentsFileRequest", +}) as any as S.Schema; + +export interface GetTaskDocumentsFileResponse {} +export const GetTaskDocumentsFileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskDocumentsFileResponse", +}) as any as S.Schema; + +export type GetTasksRequestBatchUidsList = Array; +export const GetTasksRequestBatchUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetTasksRequestUidsList = Array; +export const GetTasksRequestUidsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetTasksRequestCanceledByList = Array; +export const GetTasksRequestCanceledByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetTasksRequestTypesList = Array; +export const GetTasksRequestTypesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetTasksRequestStatusesList = Array; +export const GetTasksRequestStatusesList = /*@__PURE__*/ S.Array( + Status, +) as any as S.Schema; + +export type GetTasksRequestIndexUidsList = Array; +export const GetTasksRequestIndexUidsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface GetTasksRequest { + /** Maximum number of batches to return. */ + limit?: number; + /** `uid` of the first batch returned. */ + from?: number; + /** If `true`, returns results in the reverse order, from oldest to most recent. */ + reverse?: boolean; + /** Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character. */ + batchUids?: GetTasksRequestBatchUidsList; + /** Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character. */ + uids?: GetTasksRequestUidsList; + /** Permits to filter tasks using the uid of the task that canceled them. It's possible to specify several task uids by separating them with the `,` character. */ + canceledBy?: GetTasksRequestCanceledByList; + /** Permits to filter tasks by their related type. By default, when `types` query parameter is not set, all task types are returned. It's possible to specify several types by separating them with the `,` character. */ + types?: GetTasksRequestTypesList; + /** Permits to filter tasks by their status. By default, when `statuses` query parameter is not set, all task statuses are returned. It's possible to specify several statuses by separating them with the `,` character. */ + statuses?: GetTasksRequestStatusesList; + /** Permits to filter tasks by their related index. By default, when `indexUids` query parameter is not set, the tasks of all the indexes are returned. It is possible to specify several indexes by separating them with the `,` character. */ + indexUids?: GetTasksRequestIndexUidsList; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued after the given date. Supports RFC 3339 date format. */ + afterEnqueuedAt?: string; + /** Permits to filter tasks based on their enqueuedAt time. Matches tasks enqueued before the given date. Supports RFC 3339 date format. */ + beforeEnqueuedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started after the given date. Supports RFC 3339 date format. */ + afterStartedAt?: string; + /** Permits to filter tasks based on their startedAt time. Matches tasks started before the given date. Supports RFC 3339 date format. */ + beforeStartedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished after the given date. Supports RFC 3339 date format. */ + afterFinishedAt?: string; + /** Permits to filter tasks based on their finishedAt time. Matches tasks finished before the given date. Supports RFC 3339 date format. */ + beforeFinishedAt?: string; +} +export const GetTasksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + limit: S.optional(S.Number.pipe(T.Query())), + from: S.optional(S.Number.pipe(T.Query())), + reverse: S.optional(S.Boolean.pipe(T.Query())), + batchUids: S.optional(GetTasksRequestBatchUidsList.pipe(T.Query())), + uids: S.optional(GetTasksRequestUidsList.pipe(T.Query())), + canceledBy: S.optional(GetTasksRequestCanceledByList.pipe(T.Query())), + types: S.optional(GetTasksRequestTypesList.pipe(T.Query())), + statuses: S.optional(GetTasksRequestStatusesList.pipe(T.Query())), + indexUids: S.optional(GetTasksRequestIndexUidsList.pipe(T.Query())), + afterEnqueuedAt: S.optional(S.String.pipe(T.Query())), + beforeEnqueuedAt: S.optional(S.String.pipe(T.Query())), + afterStartedAt: S.optional(S.String.pipe(T.Query())), + beforeStartedAt: S.optional(S.String.pipe(T.Query())), + afterFinishedAt: S.optional(S.String.pipe(T.Query())), + beforeFinishedAt: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/tasks", code: 200 })), +).annotate({ + identifier: "GetTasksRequest", +}) as any as S.Schema; + +/** Array of task objects matching the query */ +export type AllTasksResultsList = Array; +export const AllTasksResultsList = /*@__PURE__*/ S.Array( + TaskView, +) as any as S.Schema; + +/** Response containing a paginated list of tasks */ +export interface AllTasks { + /** Array of task objects matching the query */ + results: AllTasksResultsList; + /** Total number of tasks matching the query */ + total: number; + /** Maximum number of tasks returned */ + limit: number; + /** The first task uid returned */ + from?: number | null; + /** Value to pass as `from` parameter to get the next page. When `null`, there are no more tasks to retrieve. */ + next?: number | null; +} +export const AllTasks = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: AllTasksResultsList, + total: S.Number, + limit: S.Number, + from: S.optional(S.NullOr(S.Number)), + next: S.optional(S.NullOr(S.Number)), + }), +).annotate({ identifier: "AllTasks" }) as any as S.Schema; + +export interface GetTasksStreamRequest {} +export const GetTasksStreamRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/tasks/stream", code: 200 })), +).annotate({ + identifier: "GetTasksStreamRequest", +}) as any as S.Schema; + +export interface GetTasksStreamResponse {} +export const GetTasksStreamResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTasksStreamResponse", +}) as any as S.Schema; + +export interface GettypoToleranceRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const GettypoToleranceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/indexes/{index_uid}/settings/typo-tolerance", + code: 200, + }), + ), +).annotate({ + identifier: "GettypoToleranceRequest", +}) as any as S.Schema; + +export interface GetVersionRequest {} +export const GetVersionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/version", code: 200 })), +).annotate({ + identifier: "GetVersionRequest", +}) as any as S.Schema; + +export interface VersionResponse { + /** The commit used to compile this build of Meilisearch. */ + commitSha: string; + /** The date of this build. */ + commitDate: string; + /** The version of Meilisearch. */ + pkgVersion: string; +} +export const VersionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + commitSha: S.String, + commitDate: S.String, + pkgVersion: S.String, + }), +).annotate({ + identifier: "VersionResponse", +}) as any as S.Schema; + +export interface GetWebhookRequest { + /** Universally unique identifier of the webhook. */ + uuid: string; +} +export const GetWebhookRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/webhooks/{uuid}", code: 200 })), +).annotate({ + identifier: "GetWebhookRequest", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type GetWebhookResponseHeadersMap = { + [key: string]: string | undefined; +}; +export const GetWebhookResponseHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface GetWebhookResponse { + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: GetWebhookResponseHeadersMap | null; + /** Unique identifier of the webhook. */ + uuid: string; + /** Whether the webhook can be edited. */ + isEditable: boolean; +} +export const GetWebhookResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(GetWebhookResponseHeadersMap)), + uuid: S.String, + isEditable: S.Boolean, + }), +).annotate({ + identifier: "GetWebhookResponse", +}) as any as S.Schema; + +export interface GetWebhooksRequest {} +export const GetWebhooksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/webhooks", code: 200 })), +).annotate({ + identifier: "GetWebhooksRequest", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type WebhookWithMetadataRedactedAuthorizationHeadersMap = { + [key: string]: string | undefined; +}; +export const WebhookWithMetadataRedactedAuthorizationHeadersMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +/** Webhook object with metadata and redacted authorization headers. */ +export interface WebhookWithMetadataRedactedAuthorization { + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: WebhookWithMetadataRedactedAuthorizationHeadersMap | null; + /** Unique identifier of the webhook. */ + uuid: string; + /** Whether the webhook can be edited. */ + isEditable: boolean; +} +export const WebhookWithMetadataRedactedAuthorization = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + headers: S.optional( + S.NullOr(WebhookWithMetadataRedactedAuthorizationHeadersMap), + ), + uuid: S.String, + isEditable: S.Boolean, + }), +).annotate({ + identifier: "WebhookWithMetadataRedactedAuthorization", +}) as any as S.Schema; + +/** All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability. */ +export type WebhookResultsResultsList = + Array; +export const WebhookResultsResultsList = /*@__PURE__*/ S.Array( + WebhookWithMetadataRedactedAuthorization, +) as any as S.Schema; + +/** Response containing a list of all registered webhooks. */ +export interface WebhookResults { + /** All webhooks configured on the instance. Each entry includes UUID, URL, headers (authorization redacted), and editability. */ + results: WebhookResultsResultsList; +} +export const WebhookResults = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: WebhookResultsResultsList, + }), +).annotate({ identifier: "WebhookResults" }) as any as S.Schema; + +export interface ListApiKeysRequest { + /** Number of keys to skip. Use with `limit` for pagination. Defaults to 0. */ + offset?: number; + /** Maximum number of keys to return. Use with `offset` for pagination. Defaults to 20. */ + limit?: number; +} +export const ListApiKeysRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + offset: S.optional(S.Number.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/keys", code: 200 })), +).annotate({ + identifier: "ListApiKeysRequest", +}) as any as S.Schema; + +/** The list of actions (permissions) this key is allowed to perform. Examples include `documents.add`, `search`, `indexes.create`, `settings.update`, etc. Use `*` to grant all permissions. */ +export type PaginationViewKeyViewResultsItemActionsList = Array; +export const PaginationViewKeyViewResultsItemActionsList = + /*@__PURE__*/ S.Array( + Action, + ) as any as S.Schema; + +/** The list of index UIDs this key can access. Use `*` to grant access to all indexes, including future ones. Patterns are also supported, e.g., `movies_*` matches any index starting with "movies_". */ +export type PaginationViewKeyViewResultsItemIndexesList = Array; +export const PaginationViewKeyViewResultsItemIndexesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Represents an API key used for authenticating requests to Meilisearch. Each key has specific permissions defined by its actions and can be scoped to particular indexes. Keys provide fine-grained access control for your Meilisearch instance. */ +export interface PaginationViewKeyViewResultsItem { + /** A human-readable name for the API key. Use this to identify the purpose of each key, such as "Frontend Search Key" or "Admin Key for CI/CD". This is optional and can be `null`. */ + name?: string | null; + /** A longer description explaining the purpose or usage of this API key. Useful for documenting why the key was created and how it should be used. This is optional and can be `null`. */ + description?: string | null; + /** The actual API key string to use in the `Authorization: Bearer ` header when making requests to Meilisearch. Keep this value secret and never expose it in client-side code. */ + key: string; + /** The unique identifier (UUID) for this API key. Use this to update or delete the key. The UID remains constant even if the key's name or description changes. */ + uid: string; + /** The list of actions (permissions) this key is allowed to perform. Examples include `documents.add`, `search`, `indexes.create`, `settings.update`, etc. Use `*` to grant all permissions. */ + actions: PaginationViewKeyViewResultsItemActionsList; + /** The list of index UIDs this key can access. Use `*` to grant access to all indexes, including future ones. Patterns are also supported, e.g., `movies_*` matches any index starting with "movies_". */ + indexes: PaginationViewKeyViewResultsItemIndexesList; + /** The expiration date and time of the key in RFC 3339 format. After this time, the key will no longer be valid for authentication. Set to `null` for keys that never expire. */ + expiresAt?: string | null; + /** The date and time when this API key was created, formatted as an RFC 3339 date-time string. This is automatically set by Meilisearch and cannot be modified. */ + createdAt: string; + /** The date and time when this API key was last modified, formatted as an RFC 3339 date-time string. This is automatically updated by Meilisearch when the key's name or description changes. */ + updatedAt: string; +} +export const PaginationViewKeyViewResultsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + key: S.String, + uid: S.String, + actions: PaginationViewKeyViewResultsItemActionsList, + indexes: PaginationViewKeyViewResultsItemIndexesList, + expiresAt: S.optional(S.NullOr(S.String)), + createdAt: S.String, + updatedAt: S.String, + }), +).annotate({ + identifier: "PaginationViewKeyViewResultsItem", +}) as any as S.Schema; + +/** Items for the current page. */ +export type PaginationViewKeyViewResultsList = + Array; +export const PaginationViewKeyViewResultsList = /*@__PURE__*/ S.Array( + PaginationViewKeyViewResultsItem, +) as any as S.Schema; + +export interface PaginationViewKeyView { + /** Items for the current page. */ + results: PaginationViewKeyViewResultsList; + /** Number of items skipped. */ + offset: number; + /** Maximum number of items returned. */ + limit: number; + /** Total number of items matching the query. */ + total: number; +} +export const PaginationViewKeyView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: PaginationViewKeyViewResultsList, + offset: S.Number, + limit: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "PaginationViewKeyView", +}) as any as S.Schema; + +export interface ListIndexesRequest { + /** The number of indexes to skip before starting to retrieve anything. */ + offset?: number; + /** The number of indexes to retrieve. */ + limit?: number; +} +export const ListIndexesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + offset: S.optional(S.Number.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/indexes", code: 200 })), +).annotate({ + identifier: "ListIndexesRequest", +}) as any as S.Schema; + +/** An index containing searchable documents */ +export interface PaginationViewIndexViewResultsItem { + /** Unique identifier for the index. Once created, it cannot be changed */ + uid: string; + /** Creation date of the index, represented in RFC 3339 format */ + createdAt: string; + /** Latest date of index update, represented in RFC 3339 format */ + updatedAt: string; + /** [Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index */ + primaryKey?: string | null; +} +export const PaginationViewIndexViewResultsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String, + createdAt: S.String, + updatedAt: S.String, + primaryKey: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "PaginationViewIndexViewResultsItem", +}) as any as S.Schema; + +/** Items for the current page. */ +export type PaginationViewIndexViewResultsList = + Array; +export const PaginationViewIndexViewResultsList = /*@__PURE__*/ S.Array( + PaginationViewIndexViewResultsItem, +) as any as S.Schema; + +export interface PaginationViewIndexView { + /** Items for the current page. */ + results: PaginationViewIndexViewResultsList; + /** Number of items skipped. */ + offset: number; + /** Maximum number of items returned. */ + limit: number; + /** Total number of items matching the query. */ + total: number; +} +export const PaginationViewIndexView = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: PaginationViewIndexViewResultsList, + offset: S.Number, + limit: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "PaginationViewIndexView", +}) as any as S.Schema; + +export interface ListRulesFilter { + /** Only include rules whose names match these patterns (e.g. `["black-friday", "promo*"]`). */ + query?: string | null; + /** Only include rules that are active (true) or not active (false). */ + active?: boolean | null; +} +export const ListRulesFilter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.optional(S.NullOr(S.String)), + active: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "ListRulesFilter", +}) as any as S.Schema; + +export interface ListRulesRequest { + /** Number of rules to skip. Defaults to 0. */ + offset?: number; + /** Maximum number of rules to return. Default to 20. */ + limit?: number; + filter?: ListRulesFilter | null; +} +export const ListRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + offset: S.optional(S.Number), + limit: S.optional(S.Number), + filter: S.optional(S.NullOr(ListRulesFilter)), + }).pipe(T.Http({ method: "POST", uri: "/dynamic-search-rules", code: 200 })), +).annotate({ + identifier: "ListRulesRequest", +}) as any as S.Schema; + +/** Actions to apply when the dynamic search rule matches. */ +export type PaginationViewDynamicSearchRuleResultsItemActionsList = + Array; +export const PaginationViewDynamicSearchRuleResultsItemActionsList = + /*@__PURE__*/ S.Array( + RuleAction, + ) as any as S.Schema; + +export interface PaginationViewDynamicSearchRuleResultsItem { + /** Unique identifier of the dynamic search rule. */ + uid: string; + /** Human-readable description of the dynamic search rule. */ + description?: string | null; + /** Date time of the last update of this rule. */ + lastUpdatedAt?: string | null; + /** Precedence of the dynamic search rule. Lower numeric values take precedence over higher ones. If omitted, the rule is treated as having the lowest precedence. This precedence is used to resolve conflicts between matching rules: - If the same document is selected by multiple rules, the smallest `priority` number wins - If different documents are pinned to the same position, they are ordered by ascending `priority` */ + precedence?: number | null; + /** Whether the dynamic search rule is active. */ + active?: boolean; + /** Conditions that must match before the dynamic search rule applies. */ + conditions?: Conditions; + /** Actions to apply when the dynamic search rule matches. */ + actions: PaginationViewDynamicSearchRuleResultsItemActionsList; +} +export const PaginationViewDynamicSearchRuleResultsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String, + description: S.optional(S.NullOr(S.String)), + lastUpdatedAt: S.optional(S.NullOr(S.String)), + precedence: S.optional(S.NullOr(S.Number)), + active: S.optional(S.Boolean), + conditions: S.optional(Conditions), + actions: PaginationViewDynamicSearchRuleResultsItemActionsList, + }), + ).annotate({ + identifier: "PaginationViewDynamicSearchRuleResultsItem", + }) as any as S.Schema; + +/** Items for the current page. */ +export type PaginationViewDynamicSearchRuleResultsList = + Array; +export const PaginationViewDynamicSearchRuleResultsList = /*@__PURE__*/ S.Array( + PaginationViewDynamicSearchRuleResultsItem, +) as any as S.Schema; + +export interface PaginationViewDynamicSearchRule { + /** Items for the current page. */ + results: PaginationViewDynamicSearchRuleResultsList; + /** Number of items skipped. */ + offset: number; + /** Maximum number of items returned. */ + limit: number; + /** Total number of items matching the query. */ + total: number; +} +export const PaginationViewDynamicSearchRule = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: PaginationViewDynamicSearchRuleResultsList, + offset: S.Number, + limit: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "PaginationViewDynamicSearchRule", +}) as any as S.Schema; + +export interface ListWorkspacesRequest {} +export const ListWorkspacesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/chats", code: 200 })), +).annotate({ + identifier: "ListWorkspacesRequest", +}) as any as S.Schema; + +export interface ListWorkspacesResponse {} +export const ListWorkspacesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "ListWorkspacesResponse", +}) as any as S.Schema; + +/** Attributes to display in the returned documents */ +export type SearchQueryWithIndexAttributesToRetrieveList = Array; +export const SearchQueryWithIndexAttributesToRetrieveList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Attributes whose values have to be cropped */ +export type SearchQueryWithIndexAttributesToCropList = Array; +export const SearchQueryWithIndexAttributesToCropList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Highlight matching terms contained in an attribute */ +export type SearchQueryWithIndexAttributesToHighlightList = Array; +export const SearchQueryWithIndexAttributesToHighlightList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Sort search results by an attribute's value */ +export type SearchQueryWithIndexSortList = Array; +export const SearchQueryWithIndexSortList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** An array of attribute name patterns. Each pattern can be an exact attribute name, or include wildcards (`*`) at the start, end, or both. Examples: `["title", "description_*", "*_date", "*content*"]`. */ +export type AttributePatternsPatternsList = Array; +export const AttributePatternsPatternsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** A collection of patterns used to match attribute names. Patterns can include wildcards (`*`) for flexible matching. For example, `title` matches exactly, `overview_*` matches any attribute starting with `overview_`, and `*_date` matches any attribute ending with `_date`. */ +export interface AttributePatterns { + /** An array of attribute name patterns. Each pattern can be an exact attribute name, or include wildcards (`*`) at the start, end, or both. Examples: `["title", "description_*", "*_date", "*content*"]`. */ + patterns: AttributePatternsPatternsList; +} +export const AttributePatterns = /*@__PURE__*/ S.suspend(() => + S.Struct({ + patterns: AttributePatternsPatternsList, + }), +).annotate({ + identifier: "AttributePatterns", +}) as any as S.Schema; + +/** Restrict search to the specified attributes */ +export type SearchQueryWithIndexAttributesToSearchOnList = Array; +export const SearchQueryWithIndexAttributesToSearchOnList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Languages to use for query tokenization */ +export type SearchQueryWithIndexLocalesList = Array; +export const SearchQueryWithIndexLocalesList = /*@__PURE__*/ S.Array( + Locale, +) as any as S.Schema; + +/** Search using a custom query vector */ +export type SearchQueryWithIndexVectorList = Array; +export const SearchQueryWithIndexVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** Configuration for [personalized search](https://www.meilisearch.com/docs/learn/personalization/making_personalized_search_queries) results. When enabled, results are tailored to the user profile described in `userContext`. */ +export interface Personalize { + /** String describing the user (e.g. preferences, behavior). Used to return different results for different profiles. */ + userContext: string; +} +export const Personalize = /*@__PURE__*/ S.suspend(() => + S.Struct({ + userContext: S.String, + }), +).annotate({ identifier: "Personalize" }) as any as S.Schema; + +/** Options for federated multi-search queries */ +export interface FederationOptions { + /** A multiplicative factor applied to the ranking score for hits from this query. Values less than 1.0 make hits from this query less likely to appear in final results; values greater than 1.0 make them more likely. Must be a positive number. Default: `1.0`. */ + weight?: number; + /** Remote server to send this query to */ + remote?: string | null; + /** Position of this query in the list of queries */ + queryPosition?: number | null; +} +export const FederationOptions = /*@__PURE__*/ S.suspend(() => + S.Struct({ + weight: S.optional(S.Number), + remote: S.optional(S.NullOr(S.String)), + queryPosition: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "FederationOptions", +}) as any as S.Schema; + +/** A `SearchQuery` + an index UID and optional FederationOptions. */ +export interface SearchQueryWithIndex { + /** Index unique identifier */ + indexUid: string; + /** Query string */ + q?: string | null; + /** Number of documents to skip */ + offset?: number | null; + /** Maximum number of documents returned */ + limit?: number | null; + /** Request a specific page of results */ + page?: number | null; + /** Maximum number of documents returned for a page */ + hitsPerPage?: number | null; + /** Attributes to display in the returned documents */ + attributesToRetrieve?: SearchQueryWithIndexAttributesToRetrieveList | null; + /** Attributes whose values have to be cropped */ + attributesToCrop?: SearchQueryWithIndexAttributesToCropList | null; + /** Maximum length of cropped value in words */ + cropLength?: number; + /** String marking crop boundaries */ + cropMarker?: string; + /** Highlight matching terms contained in an attribute */ + attributesToHighlight?: SearchQueryWithIndexAttributesToHighlightList | null; + /** String inserted at the start of a highlighted term */ + highlightPreTag?: string; + /** String inserted at the end of a highlighted term */ + highlightPostTag?: string; + /** Return matching terms location */ + showMatchesPosition?: boolean; + /** Filter queries by an attribute's value */ + filter?: unknown; + /** Sort search results by an attribute's value */ + sort?: SearchQueryWithIndexSortList | null; + /** Restrict search to documents with unique values of specified attribute */ + distinct?: string | null; + facets?: AttributePatterns | null; + matchingStrategy?: MatchingStrategy | (string & {}); + /** Restrict search to the specified attributes */ + attributesToSearchOn?: SearchQueryWithIndexAttributesToSearchOnList | null; + /** Exclude results below the specified ranking score */ + rankingScoreThreshold?: number | null; + /** Languages to use for query tokenization */ + locales?: SearchQueryWithIndexLocalesList | null; + hybrid?: HybridQuery | null; + /** Search using a custom query vector */ + vector?: SearchQueryWithIndexVectorList | null; + /** Return document and query vector data */ + retrieveVectors?: boolean; + /** Perform AI-powered search queries with multimodal content */ + media?: unknown; + personalize?: Personalize | null; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean | null; + /** Display the global ranking score of a document */ + showRankingScore?: boolean; + /** Adds a detailed global ranking score field */ + showRankingScoreDetails?: boolean; + /** Adds a detailed performance details field */ + showPerformanceDetails?: boolean | null; + federationOptions?: FederationOptions | null; +} +export const SearchQueryWithIndex = /*@__PURE__*/ S.suspend(() => + S.Struct({ + indexUid: S.String, + q: S.optional(S.NullOr(S.String)), + offset: S.optional(S.NullOr(S.Number)), + limit: S.optional(S.NullOr(S.Number)), + page: S.optional(S.NullOr(S.Number)), + hitsPerPage: S.optional(S.NullOr(S.Number)), + attributesToRetrieve: S.optional( + S.NullOr(SearchQueryWithIndexAttributesToRetrieveList), + ), + attributesToCrop: S.optional( + S.NullOr(SearchQueryWithIndexAttributesToCropList), + ), + cropLength: S.optional(S.Number), + cropMarker: S.optional(S.String), + attributesToHighlight: S.optional( + S.NullOr(SearchQueryWithIndexAttributesToHighlightList), + ), + highlightPreTag: S.optional(S.String), + highlightPostTag: S.optional(S.String), + showMatchesPosition: S.optional(S.Boolean), + filter: S.optional(S.Unknown), + sort: S.optional(S.NullOr(SearchQueryWithIndexSortList)), + distinct: S.optional(S.NullOr(S.String)), + facets: S.optional(S.NullOr(AttributePatterns)), + matchingStrategy: S.optional(MatchingStrategy), + attributesToSearchOn: S.optional( + S.NullOr(SearchQueryWithIndexAttributesToSearchOnList), + ), + rankingScoreThreshold: S.optional(S.NullOr(S.Number)), + locales: S.optional(S.NullOr(SearchQueryWithIndexLocalesList)), + hybrid: S.optional(S.NullOr(HybridQuery)), + vector: S.optional(S.NullOr(SearchQueryWithIndexVectorList)), + retrieveVectors: S.optional(S.Boolean), + media: S.optional(S.Unknown), + personalize: S.optional(S.NullOr(Personalize)), + useNetwork: S.optional(S.NullOr(S.Boolean)), + showRankingScore: S.optional(S.Boolean), + showRankingScoreDetails: S.optional(S.Boolean), + showPerformanceDetails: S.optional(S.NullOr(S.Boolean)), + federationOptions: S.optional(S.NullOr(FederationOptions)), + }), +).annotate({ + identifier: "SearchQueryWithIndex", +}) as any as S.Schema; + +/** An array of search queries to execute. Each query can target a different index and have its own parameters. When `federation` is `null`, results are returned separately for each query. When `federation` is set, results are merged. Each query object must include `indexUid` to specify which index to search. */ +export type MultiSearchWithPostRequestQueriesList = Array; +export const MultiSearchWithPostRequestQueriesList = /*@__PURE__*/ S.Array( + SearchQueryWithIndex, +) as any as S.Schema; + +/** Facets to retrieve per index */ +export type FederationFacetsByIndexMap = { + [key: string]: AttributePatterns | undefined; +}; +export const FederationFacetsByIndexMap = /*@__PURE__*/ S.Record( + S.String, + AttributePatterns, +) as any as S.Schema; + +/** Options for merging facets from multiple indexes in federated search. When multiple indexes are queried, this controls how their facet values are combined into a single facet distribution. */ +export interface MergeFacets { + /** The maximum number of facet values to return for each facet after merging. Values from all indexes are combined and sorted before truncation. If not specified, uses the default limit from the index settings. */ + maxValuesPerFacet?: number | null; +} +export const MergeFacets = /*@__PURE__*/ S.suspend(() => + S.Struct({ + maxValuesPerFacet: S.optional(S.NullOr(S.Number)), + }), +).annotate({ identifier: "MergeFacets" }) as any as S.Schema; + +/** Configuration for federated multi-search */ +export interface Federation { + /** Maximum number of results to return across all queries */ + limit?: number; + /** Number of results to skip */ + offset?: number; + page?: number | null; + hitsPerPage?: number | null; + /** Facets to retrieve per index */ + facetsByIndex?: FederationFacetsByIndexMap; + mergeFacets?: MergeFacets | null; + /** Restrict search to documents with unique values of the specified attribute across all queries. 1. This applies across all queries in the request, regardless of index or remote of origin. 2. This overrides the index-level distinct attribute. 3. This requires that the passed field can be set as distinct in all the participating indexes. */ + distinct?: string | null; + /** Whether to include performance details in the response */ + showPerformanceDetails?: boolean; + personalize?: Personalize | null; +} +export const Federation = /*@__PURE__*/ S.suspend(() => + S.Struct({ + limit: S.optional(S.Number), + offset: S.optional(S.Number), + page: S.optional(S.NullOr(S.Number)), + hitsPerPage: S.optional(S.NullOr(S.Number)), + facetsByIndex: S.optional(FederationFacetsByIndexMap), + mergeFacets: S.optional(S.NullOr(MergeFacets)), + distinct: S.optional(S.NullOr(S.String)), + showPerformanceDetails: S.optional(S.Boolean), + personalize: S.optional(S.NullOr(Personalize)), + }), +).annotate({ identifier: "Federation" }) as any as S.Schema; + +export interface MultiSearchWithPostRequest { + /** An array of search queries to execute. Each query can target a different index and have its own parameters. When `federation` is `null`, results are returned separately for each query. When `federation` is set, results are merged. Each query object must include `indexUid` to specify which index to search. */ + queries: MultiSearchWithPostRequestQueriesList; + federation?: Federation | null; +} +export const MultiSearchWithPostRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + queries: MultiSearchWithPostRequestQueriesList, + federation: S.optional(S.NullOr(Federation)), + }).pipe(T.Http({ method: "POST", uri: "/multi-search", code: 200 })), +).annotate({ + identifier: "MultiSearchWithPostRequest", +}) as any as S.Schema; + +/** Document with highlighted and cropped attributes. Present when `attributesToHighlight` or `attributesToCrop` was set. */ +export type SearchHitFormattedMap = { [key: string]: unknown | undefined }; +export const SearchHitFormattedMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Byte indices of individual matched characters when the match spans multiple positions (e.g., for prefix matches). This is `null` for simple contiguous matches. */ +export type MatchBoundsIndicesList = Array; +export const MatchBoundsIndicesList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** Represents the position of a matching term in a document field. Used to indicate where query terms were found within attribute values, enabling features like highlighting and match position display. */ +export interface MatchBounds { + /** The byte offset where the match begins within the attribute value. This is a zero-indexed position from the start of the string. */ + start: number; + /** The length in bytes of the matched text. Combined with `start`, this defines the exact substring that matched the query term. */ + length: number; + /** Byte indices of individual matched characters when the match spans multiple positions (e.g., for prefix matches). This is `null` for simple contiguous matches. */ + indices?: MatchBoundsIndicesList | null; +} +export const MatchBounds = /*@__PURE__*/ S.suspend(() => + S.Struct({ + start: S.Number, + length: S.Number, + indices: S.optional(S.NullOr(MatchBoundsIndicesList)), + }), +).annotate({ identifier: "MatchBounds" }) as any as S.Schema; + +export type SearchHitMatchesPositionValueList = Array; +export const SearchHitMatchesPositionValueList = /*@__PURE__*/ S.Array( + MatchBounds, +) as any as S.Schema; + +/** Byte offsets (`start`, `length`) of each matched term per attribute. Present when `showMatchesPosition` was true. */ +export type SearchHitMatchesPositionMap = { + [key: string]: SearchHitMatchesPositionValueList | undefined; +}; +export const SearchHitMatchesPositionMap = /*@__PURE__*/ S.Record( + S.String, + SearchHitMatchesPositionValueList, +) as any as S.Schema; + +/** Per-rule score breakdown (words, typo, proximity, etc.). Present when `showRankingScoreDetails` was true. */ +export type SearchHitRankingScoreDetailsMap = { + [key: string]: unknown | undefined; +}; +export const SearchHitRankingScoreDetailsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** A single search result hit. */ +export interface SearchHit { + /** Document with highlighted and cropped attributes. Present when `attributesToHighlight` or `attributesToCrop` was set. */ + _formatted?: SearchHitFormattedMap; + /** Byte offsets (`start`, `length`) of each matched term per attribute. Present when `showMatchesPosition` was true. */ + _matchesPosition?: SearchHitMatchesPositionMap | null; + /** Global [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) from 0.0 to 1.0. Present when `showRankingScore` was true. */ + _rankingScore?: number | null; + /** Per-rule score breakdown (words, typo, proximity, etc.). Present when `showRankingScoreDetails` was true. */ + _rankingScoreDetails?: SearchHitRankingScoreDetailsMap | null; +} +export const SearchHit = /*@__PURE__*/ S.suspend(() => + S.Struct({ + _formatted: S.optional(SearchHitFormattedMap), + _matchesPosition: S.optional(S.NullOr(SearchHitMatchesPositionMap)), + _rankingScore: S.optional(S.NullOr(S.Number)), + _rankingScoreDetails: S.optional(S.NullOr(SearchHitRankingScoreDetailsMap)), + }), +).annotate({ identifier: "SearchHit" }) as any as S.Schema; + +/** Combined search results from all queries */ +export type MultiSearchWithPostResponseHitsList = Array; +export const MultiSearchWithPostResponseHitsList = /*@__PURE__*/ S.Array( + SearchHit, +) as any as S.Schema; + +export type Vec = Array; +export const Vec = /*@__PURE__*/ S.Array(S.Number) as any as S.Schema; + +export type MultiSearchWithPostResponseQueryVectorsMap = { + [key: string]: Vec | undefined; +}; +export const MultiSearchWithPostResponseQueryVectorsMap = + /*@__PURE__*/ S.Record( + S.String, + Vec, + ) as any as S.Schema; + +export type MultiSearchWithPostResponseFacetDistributionValueMap = { + [key: string]: number | undefined; +}; +export const MultiSearchWithPostResponseFacetDistributionValueMap = + /*@__PURE__*/ S.Record( + S.String, + S.Number, + ) as any as S.Schema; + +export type MultiSearchWithPostResponseFacetDistributionMap = { + [key: string]: + | MultiSearchWithPostResponseFacetDistributionValueMap + | undefined; +}; +export const MultiSearchWithPostResponseFacetDistributionMap = + /*@__PURE__*/ S.Record( + S.String, + MultiSearchWithPostResponseFacetDistributionValueMap, + ) as any as S.Schema; + +/** Minimum and maximum numeric values for a facet. Present when the facet attribute has numeric values among matching documents. */ +export interface FacetStats { + /** Lowest numeric value for this facet among matching documents. */ + min: number; + /** Highest numeric value for this facet among matching documents. */ + max: number; +} +export const FacetStats = /*@__PURE__*/ S.suspend(() => + S.Struct({ + min: S.Number, + max: S.Number, + }), +).annotate({ identifier: "FacetStats" }) as any as S.Schema; + +/** Merged facet statistics across all indexes */ +export type MultiSearchWithPostResponseFacetStatsMap = { + [key: string]: FacetStats | undefined; +}; +export const MultiSearchWithPostResponseFacetStatsMap = /*@__PURE__*/ S.Record( + S.String, + FacetStats, +) as any as S.Schema; + +export type ComputedFacetsDistributionValueMap = { + [key: string]: number | undefined; +}; +export const ComputedFacetsDistributionValueMap = /*@__PURE__*/ S.Record( + S.String, + S.Number, +) as any as S.Schema; + +/** Count of documents for each facet value */ +export type ComputedFacetsDistributionMap = { + [key: string]: ComputedFacetsDistributionValueMap | undefined; +}; +export const ComputedFacetsDistributionMap = /*@__PURE__*/ S.Record( + S.String, + ComputedFacetsDistributionValueMap, +) as any as S.Schema; + +/** Numeric statistics for each facet */ +export type ComputedFacetsStatsMap = { [key: string]: FacetStats | undefined }; +export const ComputedFacetsStatsMap = /*@__PURE__*/ S.Record( + S.String, + FacetStats, +) as any as S.Schema; + +/** Computed facet data from a search */ +export interface ComputedFacets { + /** Count of documents for each facet value */ + distribution: ComputedFacetsDistributionMap; + /** Numeric statistics for each facet */ + stats: ComputedFacetsStatsMap; +} +export const ComputedFacets = /*@__PURE__*/ S.suspend(() => + S.Struct({ + distribution: ComputedFacetsDistributionMap, + stats: ComputedFacetsStatsMap, + }), +).annotate({ identifier: "ComputedFacets" }) as any as S.Schema; + +export type FederatedFacets = { [key: string]: ComputedFacets | undefined }; +export const FederatedFacets = /*@__PURE__*/ S.Record( + S.String, + ComputedFacets, +) as any as S.Schema; + +/** Metadata about a search query (included when requested via header). */ +export interface SearchMetadata { + /** Query string set for the query, if not already present in the response. Only set if: 1. the metadata corresponds to a query in a federated search request, **and** 2. that federated search request query is not a placeholder search (empty or missing `q`) Never set for regular search and non-federated multi-search because the query(ies) are already present in the response. */ + query?: string | null; + /** Unique identifier for the query. */ + queryUid: string; + /** UID of the index that was searched. */ + indexUid: string; + /** [Primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index. */ + primaryKey?: string | null; + /** Remote that processed the query (federated search only). */ + remote?: string | null; +} +export const SearchMetadata = /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.optional(S.NullOr(S.String)), + queryUid: S.String, + indexUid: S.String, + primaryKey: S.optional(S.NullOr(S.String)), + remote: S.optional(S.NullOr(S.String)), + }), +).annotate({ identifier: "SearchMetadata" }) as any as S.Schema; + +/** Metadata for each query */ +export type MultiSearchWithPostResponseMetadataList = Array; +export const MultiSearchWithPostResponseMetadataList = /*@__PURE__*/ S.Array( + SearchMetadata, +) as any as S.Schema; + +/** Errors from remote servers */ +export type MultiSearchWithPostResponseRemoteErrorsMap = { + [key: string]: ResponseError | undefined; +}; +export const MultiSearchWithPostResponseRemoteErrorsMap = + /*@__PURE__*/ S.Record( + S.String, + ResponseError, + ) as any as S.Schema; + +export interface MultiSearchWithPostResponse { + /** Number of results per page. */ + hitsPerPage?: number; + /** Current page index (1-based). */ + page?: number; + /** Exhaustive total number of result pages. */ + totalPages?: number; + /** Exhaustive total number of matching documents. */ + totalHits?: number; + /** Maximum number of documents returned. */ + limit?: number; + /** Number of documents skipped. */ + offset?: number; + /** Estimated total number of matches (not exhaustive). Prioritizes relevancy and performance. */ + estimatedTotalHits?: number; + /** Combined search results from all queries */ + hits: MultiSearchWithPostResponseHitsList; + queryVectors?: MultiSearchWithPostResponseQueryVectorsMap | null; + /** Total processing time in milliseconds */ + processingTimeMs: number; + facetDistribution?: MultiSearchWithPostResponseFacetDistributionMap | null; + /** Merged facet statistics across all indexes */ + facetStats?: MultiSearchWithPostResponseFacetStatsMap | null; + /** Facets grouped by index */ + facetsByIndex?: FederatedFacets; + /** Unique identifier for the request */ + requestUid?: string | null; + /** Metadata for each query */ + metadata?: MultiSearchWithPostResponseMetadataList | null; + /** Errors from remote servers */ + remoteErrors?: MultiSearchWithPostResponseRemoteErrorsMap | null; + semanticHitCount?: number | null; + performanceDetails?: unknown; +} +export const MultiSearchWithPostResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hitsPerPage: S.optional(S.Number), + page: S.optional(S.Number), + totalPages: S.optional(S.Number), + totalHits: S.optional(S.Number), + limit: S.optional(S.Number), + offset: S.optional(S.Number), + estimatedTotalHits: S.optional(S.Number), + hits: MultiSearchWithPostResponseHitsList, + queryVectors: S.optional( + S.NullOr(MultiSearchWithPostResponseQueryVectorsMap), + ), + processingTimeMs: S.Number, + facetDistribution: S.optional( + S.NullOr(MultiSearchWithPostResponseFacetDistributionMap), + ), + facetStats: S.optional(S.NullOr(MultiSearchWithPostResponseFacetStatsMap)), + facetsByIndex: S.optional(FederatedFacets), + requestUid: S.optional(S.NullOr(S.String)), + metadata: S.optional(S.NullOr(MultiSearchWithPostResponseMetadataList)), + remoteErrors: S.optional( + S.NullOr(MultiSearchWithPostResponseRemoteErrorsMap), + ), + semanticHitCount: S.optional(S.NullOr(S.Number)), + performanceDetails: S.optional(S.Unknown), + }), +).annotate({ + identifier: "MultiSearchWithPostResponse", +}) as any as S.Schema; + +export interface PatchApiKeyRequest { + /** The `uid` or `key` field of an existing API key. */ + key: string; + /** A new description for the API key. Pass `null` to remove the existing description. Useful for documenting the purpose or usage of the key. */ + description?: string | null; + /** A new human-readable name for the API key. Pass `null` to remove the existing name. Use this to identify keys by purpose, such as "Production Search Key" or "CI/CD Indexing Key". */ + name?: string | null; +} +export const PatchApiKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PATCH", uri: "/keys/{key}", code: 200 })), +).annotate({ + identifier: "PatchApiKeyRequest", +}) as any as S.Schema; + +export interface PatchchatRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Index description shown to the LLM so it can decide when and how to query this index. */ + description?: string | null; + /** Liquid template that defines the text sent to the LLM for each document. */ + documentTemplate?: string | null; + /** Maximum size in bytes of the rendered document template. Longer text is truncated. */ + documentTemplateMaxBytes?: number | null; + searchParameters?: ChatSearchParams | null; +} +export const PatchchatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + description: S.optional(S.NullOr(S.String)), + documentTemplate: S.optional(S.NullOr(S.String)), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + searchParameters: S.optional(S.NullOr(ChatSearchParams)), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings/chat", + code: 200, + }), + ), +).annotate({ + identifier: "PatchchatRequest", +}) as any as S.Schema; + +export interface PatchchatResponse {} +export const PatchchatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchchatResponse", +}) as any as S.Schema; + +export type PatchembeddersRequestBodyMap = { + [key: string]: SettingEmbeddingSettings | undefined; +}; +export const PatchembeddersRequestBodyMap = /*@__PURE__*/ S.Record( + S.String, + SettingEmbeddingSettings, +) as any as S.Schema; + +export interface PatchembeddersRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PatchembeddersRequestBodyMap; +} +export const PatchembeddersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PatchembeddersRequestBodyMap.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings/embedders", + code: 200, + }), + ), +).annotate({ + identifier: "PatchembeddersRequest", +}) as any as S.Schema; + +export interface PatchembeddersResponse {} +export const PatchembeddersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchembeddersResponse", +}) as any as S.Schema; + +/** Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets. */ +export type PatchfacetingRequestSortFacetValuesByMap = { + [key: string]: FacetValuesSort | (string & {}) | undefined; +}; +export const PatchfacetingRequestSortFacetValuesByMap = /*@__PURE__*/ S.Record( + S.String, + FacetValuesSort, +) as any as S.Schema; + +export interface PatchfacetingRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Maximum number of facet values returned per facet. Values are sorted in ascending lexicographical order. */ + maxValuesPerFacet?: number | null; + /** Sort order per facet: by descending count (`count`) or ascending alphanumeric (`alpha`). Key `*` applies to all facets. */ + sortFacetValuesBy?: PatchfacetingRequestSortFacetValuesByMap | null; +} +export const PatchfacetingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + maxValuesPerFacet: S.optional(S.NullOr(S.Number)), + sortFacetValuesBy: S.optional( + S.NullOr(PatchfacetingRequestSortFacetValuesByMap), + ), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings/faceting", + code: 200, + }), + ), +).annotate({ + identifier: "PatchfacetingRequest", +}) as any as S.Schema; + +export interface PatchfacetingResponse {} +export const PatchfacetingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchfacetingResponse", +}) as any as S.Schema; + +export interface PatchFeaturesRequest { + /** Enable the /metrics endpoint for Prometheus metrics */ + metrics?: boolean | null; + /** Enable the /logs route for log configuration */ + logsRoute?: boolean | null; + /** Enable the `GET /tasks/stream` and `GET /batches/stream` SSE-based routes */ + tasksStreamingRoute?: boolean | null; + /** Enable document editing via JavaScript functions */ + editDocumentsByFunction?: boolean | null; + /** Enable the CONTAINS filter operator */ + containsFilter?: boolean | null; + /** Enable dynamic search rules and the `/dynamic-search-rules` routes */ + dynamicSearchRules?: boolean | null; + /** Enable network features for distributed search */ + network?: boolean | null; + /** Enable the route to get documents from tasks */ + getTaskDocumentsRoute?: boolean | null; + /** Enable the route to compact the task queue database */ + taskQueueCompactionRoute?: boolean | null; + /** Enable composite embedders for multi-source embeddings */ + compositeEmbedders?: boolean | null; + /** Enable chat completion capabilities */ + chatCompletions?: boolean | null; + /** Enable multimodal search with images and other media */ + multimodal?: boolean | null; + /** Enable foreign key support for document hydration */ + foreignKeys?: boolean | null; + /** Disable documents fetch queue */ + disableDocumentsFetchQueue?: boolean | null; + /** Enable legacy search pipeline */ + legacySearch?: boolean | null; + /** Enable the `POST /render-template` route */ + renderRoute?: boolean | null; +} +export const PatchFeaturesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + metrics: S.optional(S.NullOr(S.Boolean)), + logsRoute: S.optional(S.NullOr(S.Boolean)), + tasksStreamingRoute: S.optional(S.NullOr(S.Boolean)), + editDocumentsByFunction: S.optional(S.NullOr(S.Boolean)), + containsFilter: S.optional(S.NullOr(S.Boolean)), + dynamicSearchRules: S.optional(S.NullOr(S.Boolean)), + network: S.optional(S.NullOr(S.Boolean)), + getTaskDocumentsRoute: S.optional(S.NullOr(S.Boolean)), + taskQueueCompactionRoute: S.optional(S.NullOr(S.Boolean)), + compositeEmbedders: S.optional(S.NullOr(S.Boolean)), + chatCompletions: S.optional(S.NullOr(S.Boolean)), + multimodal: S.optional(S.NullOr(S.Boolean)), + foreignKeys: S.optional(S.NullOr(S.Boolean)), + disableDocumentsFetchQueue: S.optional(S.NullOr(S.Boolean)), + legacySearch: S.optional(S.NullOr(S.Boolean)), + renderRoute: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ method: "PATCH", uri: "/experimental-features", code: 200 }), + ), +).annotate({ + identifier: "PatchFeaturesRequest", +}) as any as S.Schema; + +/** Map of remote instance names to their configurations - Pass `null` as a value for a remote to remove it from the configuration. - Removing a remote will also remove it from all shards. - Remotes that don't appear in this list will be unmodified by the network call. */ +export type PatchNetworkRequestRemotesMap = { + [key: string]: Remote | undefined; +}; +export const PatchNetworkRequestRemotesMap = /*@__PURE__*/ S.Record( + S.String, + Remote, +) as any as S.Schema; + +/** Map of shard names to their configurations. - Pass `null` as a value for a shard to remove it from the configuration. - Shards that don't appear in this list will be unmodified by the network call. */ +export type PatchNetworkRequestShardsMap = { [key: string]: Shard | undefined }; +export const PatchNetworkRequestShardsMap = /*@__PURE__*/ S.Record( + S.String, + Shard, +) as any as S.Schema; + +/** Previous shard configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ +export type PatchNetworkRequestPreviousShardsMap = { + [key: string]: Shard | undefined; +}; +export const PatchNetworkRequestPreviousShardsMap = /*@__PURE__*/ S.Record( + S.String, + Shard, +) as any as S.Schema; + +/** Previous remote configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ +export type PatchNetworkRequestPreviousRemotesMap = { + [key: string]: Remote | undefined; +}; +export const PatchNetworkRequestPreviousRemotesMap = /*@__PURE__*/ S.Record( + S.String, + Remote, +) as any as S.Schema; + +export interface PatchNetworkRequest { + /** Map of remote instance names to their configurations - Pass `null` as a value for a remote to remove it from the configuration. - Removing a remote will also remove it from all shards. - Remotes that don't appear in this list will be unmodified by the network call. */ + remotes?: PatchNetworkRequestRemotesMap | null; + /** Map of shard names to their configurations. - Pass `null` as a value for a shard to remove it from the configuration. - Shards that don't appear in this list will be unmodified by the network call. */ + shards?: PatchNetworkRequestShardsMap | null; + /** Previous shard configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ + previousShards?: PatchNetworkRequestPreviousShardsMap | null; + /** Name of this instance in the network */ + self?: string | null; + /** Name of the leader instance in the network */ + leader?: string | null; + /** Previous remote configurations This field should not be passed by end-users. It is used in internal communications between Meilisearch instances */ + previousRemotes?: PatchNetworkRequestPreviousRemotesMap | null; +} +export const PatchNetworkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remotes: S.optional(S.NullOr(PatchNetworkRequestRemotesMap)), + shards: S.optional(S.NullOr(PatchNetworkRequestShardsMap)), + previousShards: S.optional(S.NullOr(PatchNetworkRequestPreviousShardsMap)), + self: S.optional(S.NullOr(S.String)), + leader: S.optional(S.NullOr(S.String)), + previousRemotes: S.optional( + S.NullOr(PatchNetworkRequestPreviousRemotesMap), + ), + }).pipe(T.Http({ method: "PATCH", uri: "/network", code: 200 })), +).annotate({ + identifier: "PatchNetworkRequest", +}) as any as S.Schema; + +export interface PatchpaginationRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Maximum number of search results Meilisearch can return. Limit and offset cannot go beyond this value. */ + maxTotalHits?: number | null; +} +export const PatchpaginationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + maxTotalHits: S.optional(S.NullOr(S.Number)), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings/pagination", + code: 200, + }), + ), +).annotate({ + identifier: "PatchpaginationRequest", +}) as any as S.Schema; + +export interface PatchpaginationResponse {} +export const PatchpaginationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchpaginationResponse", +}) as any as S.Schema; + +/** LLM provider for chat completions */ +export type ChatCompletionSource = + | "openAi" + | "mistral" + | "azureOpenAi" + | "vLlm"; +export const ChatCompletionSource = /*@__PURE__*/ S.String; + +/** Custom prompts for chat completions */ +export interface PatchSettingsRequestPrompts { + /** System prompt for the LLM */ + system?: string | null; + /** Description of the search function for the LLM */ + searchDescription?: string | null; + /** Description of the query parameter for search */ + searchQParam?: string | null; + /** Description of the filter parameter for search */ + searchFilterParam?: string | null; + searchIndexUidParam?: string | null; +} +export const PatchSettingsRequestPrompts = /*@__PURE__*/ S.suspend(() => + S.Struct({ + system: S.optional(S.NullOr(S.String)), + searchDescription: S.optional(S.NullOr(S.String)), + searchQParam: S.optional(S.NullOr(S.String)), + searchFilterParam: S.optional(S.NullOr(S.String)), + searchIndexUidParam: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "PatchSettingsRequestPrompts", +}) as any as S.Schema; + +export interface PatchSettingsRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; + source?: ChatCompletionSource | (string & {}) | null; + /** Organization ID for the LLM provider */ + orgId?: string | null; + /** Project ID for the LLM provider */ + projectId?: string | null; + /** API version for the LLM provider */ + apiVersion?: string | null; + /** Deployment ID for Azure OpenAI */ + deploymentId?: string | null; + /** Base URL for the LLM API */ + baseUrl?: string | null; + /** API key for authentication with the LLM provider */ + apiKey?: string | Redacted.Redacted | null; + /** Custom prompts for chat completions */ + prompts?: PatchSettingsRequestPrompts | null; +} +export const PatchSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + source: S.optional(S.NullOr(ChatCompletionSource)), + orgId: S.optional(S.NullOr(S.String)), + projectId: S.optional(S.NullOr(S.String)), + apiVersion: S.optional(S.NullOr(S.String)), + deploymentId: S.optional(S.NullOr(S.String)), + baseUrl: S.optional(S.NullOr(S.String)), + apiKey: S.optional(S.NullOr(S.String).pipe(T.SensitiveValue({}))), + prompts: S.optional(S.NullOr(PatchSettingsRequestPrompts)), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/chats/{workspace_uid}/settings", + code: 200, + }), + ), +).annotate({ + identifier: "PatchSettingsRequest", +}) as any as S.Schema; + +export interface PatchSettingsResponse {} +export const PatchSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchSettingsResponse", +}) as any as S.Schema; + +/** Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly. */ +export type PatchtypoToleranceRequestDisableOnWordsList = Array; +export const PatchtypoToleranceRequestDisableOnWordsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs. */ +export type PatchtypoToleranceRequestDisableOnAttributesList = Array; +export const PatchtypoToleranceRequestDisableOnAttributesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface PatchtypoToleranceRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** When true, typo tolerance is enabled. When false, only exact matches are returned. */ + enabled?: boolean | null; + minWordSizeForTypos?: MinWordSizeTyposSetting | null; + /** Words for which typo tolerance is disabled. Use for brand names or terms that must match exactly. */ + disableOnWords?: PatchtypoToleranceRequestDisableOnWordsList | null; + /** Attributes for which typo tolerance is disabled. Those attributes only return exact matches. Useful for fields like product codes or IDs. */ + disableOnAttributes?: PatchtypoToleranceRequestDisableOnAttributesList | null; + /** When true, typo tolerance is disabled on numeric tokens. For example, 123 will not match 132. */ + disableOnNumbers?: boolean | null; +} +export const PatchtypoToleranceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + enabled: S.optional(S.NullOr(S.Boolean)), + minWordSizeForTypos: S.optional(S.NullOr(MinWordSizeTyposSetting)), + disableOnWords: S.optional( + S.NullOr(PatchtypoToleranceRequestDisableOnWordsList), + ), + disableOnAttributes: S.optional( + S.NullOr(PatchtypoToleranceRequestDisableOnAttributesList), + ), + disableOnNumbers: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings/typo-tolerance", + code: 200, + }), + ), +).annotate({ + identifier: "PatchtypoToleranceRequest", +}) as any as S.Schema; + +export interface PatchtypoToleranceResponse {} +export const PatchtypoToleranceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PatchtypoToleranceResponse", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type PatchWebhookRequestHeadersMap = { + [key: string]: string | undefined; +}; +export const PatchWebhookRequestHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface PatchWebhookRequest { + /** Universally unique identifier of the webhook. */ + uuid: string; + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: PatchWebhookRequestHeadersMap | null; +} +export const PatchWebhookRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + url: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(PatchWebhookRequestHeadersMap)), + }).pipe(T.Http({ method: "PATCH", uri: "/webhooks/{uuid}", code: 200 })), +).annotate({ + identifier: "PatchWebhookRequest", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type PatchWebhookResponseHeadersMap = { + [key: string]: string | undefined; +}; +export const PatchWebhookResponseHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface PatchWebhookResponse { + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: PatchWebhookResponseHeadersMap | null; + /** Unique identifier of the webhook. */ + uuid: string; + /** Whether the webhook can be edited. */ + isEditable: boolean; +} +export const PatchWebhookResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(PatchWebhookResponseHeadersMap)), + uuid: S.String, + isEditable: S.Boolean, + }), +).annotate({ + identifier: "PatchWebhookResponse", +}) as any as S.Schema; + +/** Filter fields by attribute name patterns or by capability (displayed, searchable, sortable, etc.). All criteria are ANDed. */ +export interface ListFieldsFilter { + attributePatterns?: AttributePatterns | null; + /** Only include fields that are displayed (true) or not displayed (false) in search results. */ + displayed?: boolean | null; + /** Only include fields that are searchable (true) or not searchable (false). */ + searchable?: boolean | null; + /** Only include fields that are sortable (true) or not sortable (false). */ + sortable?: boolean | null; + /** Only include fields that are used as distinct attribute (true) or not (false). */ + distinct?: boolean | null; + /** Only include fields that have a custom ranking rule (asc/desc) (true) or not (false). */ + rankingRule?: boolean | null; + /** Only include fields that are filterable (true) or not filterable (false). */ + filterable?: boolean | null; +} +export const ListFieldsFilter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributePatterns: S.optional(S.NullOr(AttributePatterns)), + displayed: S.optional(S.NullOr(S.Boolean)), + searchable: S.optional(S.NullOr(S.Boolean)), + sortable: S.optional(S.NullOr(S.Boolean)), + distinct: S.optional(S.NullOr(S.Boolean)), + rankingRule: S.optional(S.NullOr(S.Boolean)), + filterable: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "ListFieldsFilter", +}) as any as S.Schema; + +export interface PostIndexFieldsRequest { + /** Unique identifier of the index whose fields to list. */ + index_uid: string; + /** Number of fields to skip. Defaults to 0. */ + offset?: number; + /** Maximum number of fields to return. Defaults to 20. */ + limit?: number; + filter?: ListFieldsFilter | null; +} +export const PostIndexFieldsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + offset: S.optional(S.Number), + limit: S.optional(S.Number), + filter: S.optional(S.NullOr(ListFieldsFilter)), + }).pipe( + T.Http({ method: "POST", uri: "/indexes/{index_uid}/fields", code: 200 }), + ), +).annotate({ + identifier: "PostIndexFieldsRequest", +}) as any as S.Schema; + +export interface FieldDisplayConfig { + enabled: boolean; +} +export const FieldDisplayConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + enabled: S.Boolean, + }), +).annotate({ + identifier: "FieldDisplayConfig", +}) as any as S.Schema; + +export type FieldSearchConfig = FieldDisplayConfig; +export const FieldSearchConfig = FieldDisplayConfig; + +export type FieldSortableConfig = FieldDisplayConfig; +export const FieldSortableConfig = FieldDisplayConfig; + +export type FieldDistinctConfig = FieldDisplayConfig; +export const FieldDistinctConfig = FieldDisplayConfig; + +export type FieldRankingRuleConfigOrderList = Array; +export const FieldRankingRuleConfigOrderList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface FieldRankingRuleConfig { + enabled: boolean; + order?: FieldRankingRuleConfigOrderList; +} +export const FieldRankingRuleConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + enabled: S.Boolean, + order: S.optional(FieldRankingRuleConfigOrderList), + }), +).annotate({ + identifier: "FieldRankingRuleConfig", +}) as any as S.Schema; + +export interface FieldFilterableConfig { + enabled: boolean; + sortBy: FacetValuesSort; + facetSearch: boolean; + equality: boolean; + comparison: boolean; +} +export const FieldFilterableConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + enabled: S.Boolean, + sortBy: FacetValuesSort, + facetSearch: S.Boolean, + equality: S.Boolean, + comparison: S.Boolean, + }), +).annotate({ + identifier: "FieldFilterableConfig", +}) as any as S.Schema; + +export type FieldLocalizedConfigLocalesList = Array; +export const FieldLocalizedConfigLocalesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface FieldLocalizedConfig { + locales: FieldLocalizedConfigLocalesList; +} +export const FieldLocalizedConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + locales: FieldLocalizedConfigLocalesList, + }), +).annotate({ + identifier: "FieldLocalizedConfig", +}) as any as S.Schema; + +export interface PaginationViewFieldResultsItem { + name: string; + displayed: FieldDisplayConfig; + searchable: FieldDisplayConfig; + sortable: FieldDisplayConfig; + distinct: FieldDisplayConfig; + rankingRule: FieldRankingRuleConfig; + filterable: FieldFilterableConfig; + localized: FieldLocalizedConfig; +} +export const PaginationViewFieldResultsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + displayed: FieldDisplayConfig, + searchable: FieldDisplayConfig, + sortable: FieldDisplayConfig, + distinct: FieldDisplayConfig, + rankingRule: FieldRankingRuleConfig, + filterable: FieldFilterableConfig, + localized: FieldLocalizedConfig, + }), +).annotate({ + identifier: "PaginationViewFieldResultsItem", +}) as any as S.Schema; + +/** Items for the current page. */ +export type PaginationViewFieldResultsList = + Array; +export const PaginationViewFieldResultsList = /*@__PURE__*/ S.Array( + PaginationViewFieldResultsItem, +) as any as S.Schema; + +export interface PaginationViewField { + /** Items for the current page. */ + results: PaginationViewFieldResultsList; + /** Number of items skipped. */ + offset: number; + /** Maximum number of items returned. */ + limit: number; + /** Total number of items matching the query. */ + total: number; +} +export const PaginationViewField = /*@__PURE__*/ S.suspend(() => + S.Struct({ + results: PaginationViewFieldResultsList, + offset: S.Number, + limit: S.Number, + total: S.Number, + }), +).annotate({ + identifier: "PaginationViewField", +}) as any as S.Schema; + +export type MessageCase0Type = "exportNoIndexForRemote"; +export const MessageCase0Type = /*@__PURE__*/ S.String; + +/** The specified remote will not longer export any document to this instance. Send this message to remotes that are blocked waiting on the specified remote to export its documents. */ +export interface MessageCase0 { + /** Name of the remote that will no longer export any document to this instance. */ + remote: string; + type: MessageCase0Type; +} +export const MessageCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remote: S.String, + type: MessageCase0Type, + }), +).annotate({ identifier: "MessageCase0" }) as any as S.Schema; + +export type MessageCase1Type = "importFinishedForRemote"; +export const MessageCase1Type = /*@__PURE__*/ S.String; + +/** The specified remote is finished importing its documents. Send this message to remotes that are blocked waiting on the specified remote to finish importing its documents. */ +export interface MessageCase1 { + /** Name of the remote that finished importing its documents. */ + remote: string; + /** Whether the import was successful. Documents from shards that no longer belong to remotes are only deleted if all remotes are successful importing their documents. */ + successful: boolean; + type: MessageCase1Type; +} +export const MessageCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remote: S.String, + successful: S.Boolean, + type: MessageCase1Type, + }), +).annotate({ identifier: "MessageCase1" }) as any as S.Schema; + +export type MessageCase2Type = "statusChangeForRemote"; +export const MessageCase2Type = /*@__PURE__*/ S.String; + +/** The specified remote will see it's status change. Send this message to change the accessiblity of a remote. */ +export interface MessageCase2 { + /** Name of the remote whose status will be changed. */ + remote: string; + /** The new status for the remote. */ + status: Status | (string & {}); + type: MessageCase2Type; +} +export const MessageCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + remote: S.String, + status: Status, + type: MessageCase2Type, + }), +).annotate({ identifier: "MessageCase2" }) as any as S.Schema; + +export type Message = MessageCase0 | MessageCase1 | MessageCase2; +export const Message = /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PostNetworkChangeRequest { + /** The origin of this message Get it in the details of the network topology change task that is currently processing. */ + origin: Origin; + /** Message to send to control the network topology change task. */ + message: Message; +} +export const PostNetworkChangeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + origin: Origin, + message: Message, + }).pipe(T.Http({ method: "POST", uri: "/network/control", code: 200 })), +).annotate({ + identifier: "PostNetworkChangeRequest", +}) as any as S.Schema; + +export interface PostNetworkChangeResponse {} +export const PostNetworkChangeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PostNetworkChangeResponse", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type PostWebhookRequestHeadersMap = { + [key: string]: string | undefined; +}; +export const PostWebhookRequestHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface PostWebhookRequest { + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: PostWebhookRequestHeadersMap | null; +} +export const PostWebhookRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(PostWebhookRequestHeadersMap)), + }).pipe(T.Http({ method: "POST", uri: "/webhooks", code: 200 })), +).annotate({ + identifier: "PostWebhookRequest", +}) as any as S.Schema; + +/** HTTP headers to include in webhook requests. */ +export type PostWebhookResponseHeadersMap = { + [key: string]: string | undefined; +}; +export const PostWebhookResponseHeadersMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export interface PostWebhookResponse { + /** URL endpoint to call when tasks complete. */ + url?: string | null; + /** HTTP headers to include in webhook requests. */ + headers?: PostWebhookResponseHeadersMap | null; + /** Unique identifier of the webhook. */ + uuid: string; + /** Whether the webhook can be edited. */ + isEditable: boolean; +} +export const PostWebhookResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(PostWebhookResponseHeadersMap)), + uuid: S.String, + isEditable: S.Boolean, + }), +).annotate({ + identifier: "PostWebhookResponse", +}) as any as S.Schema; + +export type PutdictionaryRequestBodyList = Array; +export const PutdictionaryRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutdictionaryRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutdictionaryRequestBodyList; +} +export const PutdictionaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutdictionaryRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/dictionary", + code: 200, + }), + ), +).annotate({ + identifier: "PutdictionaryRequest", +}) as any as S.Schema; + +export interface PutdictionaryResponse {} +export const PutdictionaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutdictionaryResponse", +}) as any as S.Schema; + +export type PutdisplayedAttributesRequestBodyList = Array; +export const PutdisplayedAttributesRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutdisplayedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutdisplayedAttributesRequestBodyList; +} +export const PutdisplayedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutdisplayedAttributesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/displayed-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "PutdisplayedAttributesRequest", +}) as any as S.Schema; + +export interface PutdisplayedAttributesResponse {} +export const PutdisplayedAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutdisplayedAttributesResponse", +}) as any as S.Schema; + +export interface PutdistinctAttributeRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const PutdistinctAttributeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/distinct-attribute", + code: 200, + }), + ), +).annotate({ + identifier: "PutdistinctAttributeRequest", +}) as any as S.Schema; + +export interface PutdistinctAttributeResponse {} +export const PutdistinctAttributeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutdistinctAttributeResponse", +}) as any as S.Schema; + +export interface PutfacetSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const PutfacetSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/facet-search", + code: 200, + }), + ), +).annotate({ + identifier: "PutfacetSearchRequest", +}) as any as S.Schema; + +export interface PutfacetSearchResponse {} +export const PutfacetSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutfacetSearchResponse", +}) as any as S.Schema; + +export type PutfilterableAttributesRequestBodyList = + Array; +export const PutfilterableAttributesRequestBodyList = /*@__PURE__*/ S.Array( + FilterableAttributesRule, +) as any as S.Schema; + +export interface PutfilterableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutfilterableAttributesRequestBodyList; +} +export const PutfilterableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutfilterableAttributesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/filterable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "PutfilterableAttributesRequest", +}) as any as S.Schema; + +export interface PutfilterableAttributesResponse {} +export const PutfilterableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutfilterableAttributesResponse", +}) as any as S.Schema; + +export type PutforeignKeysRequestBodyList = Array; +export const PutforeignKeysRequestBodyList = /*@__PURE__*/ S.Array( + ForeignKey, +) as any as S.Schema; + +export interface PutforeignKeysRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutforeignKeysRequestBodyList; +} +export const PutforeignKeysRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutforeignKeysRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/foreign-keys", + code: 200, + }), + ), +).annotate({ + identifier: "PutforeignKeysRequest", +}) as any as S.Schema; + +export interface PutforeignKeysResponse {} +export const PutforeignKeysResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutforeignKeysResponse", +}) as any as S.Schema; + +export type PutlocalizedAttributesRequestBodyList = + Array; +export const PutlocalizedAttributesRequestBodyList = /*@__PURE__*/ S.Array( + LocalizedAttributesRuleView, +) as any as S.Schema; + +export interface PutlocalizedAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutlocalizedAttributesRequestBodyList; +} +export const PutlocalizedAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutlocalizedAttributesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/localized-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "PutlocalizedAttributesRequest", +}) as any as S.Schema; + +export interface PutlocalizedAttributesResponse {} +export const PutlocalizedAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutlocalizedAttributesResponse", +}) as any as S.Schema; + +export type PutnonSeparatorTokensRequestBodyList = Array; +export const PutnonSeparatorTokensRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutnonSeparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutnonSeparatorTokensRequestBodyList; +} +export const PutnonSeparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutnonSeparatorTokensRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/non-separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "PutnonSeparatorTokensRequest", +}) as any as S.Schema; + +export interface PutnonSeparatorTokensResponse {} +export const PutnonSeparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutnonSeparatorTokensResponse", +}) as any as S.Schema; + +export interface PutprefixSearchRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PrefixSearchSettings | (string & {}); +} +export const PutprefixSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PrefixSearchSettings.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/prefix-search", + code: 200, + }), + ), +).annotate({ + identifier: "PutprefixSearchRequest", +}) as any as S.Schema; + +export interface PutprefixSearchResponse {} +export const PutprefixSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutprefixSearchResponse", +}) as any as S.Schema; + +export interface PutproximityPrecisionRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: ProximityPrecisionView | (string & {}); +} +export const PutproximityPrecisionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: ProximityPrecisionView.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/proximity-precision", + code: 200, + }), + ), +).annotate({ + identifier: "PutproximityPrecisionRequest", +}) as any as S.Schema; + +export interface PutproximityPrecisionResponse {} +export const PutproximityPrecisionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutproximityPrecisionResponse", +}) as any as S.Schema; + +export type PutrankingRulesRequestBodyList = Array; +export const PutrankingRulesRequestBodyList = /*@__PURE__*/ S.Array( + RankingRuleView, +) as any as S.Schema; + +export interface PutrankingRulesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutrankingRulesRequestBodyList; +} +export const PutrankingRulesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutrankingRulesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/ranking-rules", + code: 200, + }), + ), +).annotate({ + identifier: "PutrankingRulesRequest", +}) as any as S.Schema; + +export interface PutrankingRulesResponse {} +export const PutrankingRulesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutrankingRulesResponse", +}) as any as S.Schema; + +export type PutsearchableAttributesRequestBodyList = Array; +export const PutsearchableAttributesRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutsearchableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutsearchableAttributesRequestBodyList; +} +export const PutsearchableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutsearchableAttributesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/searchable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "PutsearchableAttributesRequest", +}) as any as S.Schema; + +export interface PutsearchableAttributesResponse {} +export const PutsearchableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutsearchableAttributesResponse", +}) as any as S.Schema; + +export interface PutsearchCutoffMsRequest { + /** Unique identifier of the index. */ + index_uid: string; +} +export const PutsearchCutoffMsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/search-cutoff-ms", + code: 200, + }), + ), +).annotate({ + identifier: "PutsearchCutoffMsRequest", +}) as any as S.Schema; + +export interface PutsearchCutoffMsResponse {} +export const PutsearchCutoffMsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutsearchCutoffMsResponse", +}) as any as S.Schema; + +export type PutseparatorTokensRequestBodyList = Array; +export const PutseparatorTokensRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutseparatorTokensRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutseparatorTokensRequestBodyList; +} +export const PutseparatorTokensRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutseparatorTokensRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/separator-tokens", + code: 200, + }), + ), +).annotate({ + identifier: "PutseparatorTokensRequest", +}) as any as S.Schema; + +export interface PutseparatorTokensResponse {} +export const PutseparatorTokensResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutseparatorTokensResponse", +}) as any as S.Schema; + +export type PutsortableAttributesRequestBodyList = Array; +export const PutsortableAttributesRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutsortableAttributesRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutsortableAttributesRequestBodyList; +} +export const PutsortableAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutsortableAttributesRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/sortable-attributes", + code: 200, + }), + ), +).annotate({ + identifier: "PutsortableAttributesRequest", +}) as any as S.Schema; + +export interface PutsortableAttributesResponse {} +export const PutsortableAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutsortableAttributesResponse", +}) as any as S.Schema; + +export type PutstopWordsRequestBodyList = Array; +export const PutstopWordsRequestBodyList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutstopWordsRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutstopWordsRequestBodyList; +} +export const PutstopWordsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutstopWordsRequestBodyList.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/stop-words", + code: 200, + }), + ), +).annotate({ + identifier: "PutstopWordsRequest", +}) as any as S.Schema; + +export interface PutstopWordsResponse {} +export const PutstopWordsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutstopWordsResponse", +}) as any as S.Schema; + +export type PutsynonymsRequestBodyValueList = Array; +export const PutsynonymsRequestBodyValueList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type PutsynonymsRequestBodyMap = { + [key: string]: PutsynonymsRequestBodyValueList | undefined; +}; +export const PutsynonymsRequestBodyMap = /*@__PURE__*/ S.Record( + S.String, + PutsynonymsRequestBodyValueList, +) as any as S.Schema; + +export interface PutsynonymsRequest { + /** Unique identifier of the index. */ + index_uid: string; + body: PutsynonymsRequestBodyMap; +} +export const PutsynonymsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + body: PutsynonymsRequestBodyMap.pipe(T.HttpBody()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/indexes/{index_uid}/settings/synonyms", + code: 200, + }), + ), +).annotate({ + identifier: "PutsynonymsRequest", +}) as any as S.Schema; + +export interface PutsynonymsResponse {} +export const PutsynonymsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutsynonymsResponse", +}) as any as S.Schema; + +export type RenderQueryTemplateKind = + | "documentTemplate" + | "chatDocumentTemplate" + | "indexingFragment" + | "searchFragment" + | "inlineDocumentTemplate" + | "inlineFragment"; +export const RenderQueryTemplateKind = /*@__PURE__*/ S.String; + +export interface RenderQueryTemplate { + /** Kind of template or fragment to fetch. Determines which other parameters are allowed and mandatory. */ + kind: RenderQueryTemplateKind | (string & {}); + indexUid?: string | null; + /** Embedder to fetch the template or fragment from. - Mandatory for `kind`s: `documentTemplate`, `chatDocumentTemplate`, `indexingFragment` and `searchFragment`. */ + embedder?: string | null; + /** Name of the fragment to fetch. - Mandatory for `kind`s: `indexingFragment` and `searchFragment`. */ + fragment?: string | null; + /** Inline value of the template or fragment. - Mandatory for `kind`s: `inlineDocumentTemplate` and `inlineFragment`. */ + inline?: unknown; + /** If present, truncate document template rendering to the specified number of bytes. - Available for `kind`s: `documentTemplate`, `inlineDocumentTemplate` and `chatDocumentTemplate` - If present for `documentTemplate` overrides the setting of the index. - If missing for `documentTemplate`, the setting of the index is used. - If missing for `inlineDocumentTemplate`, the default value of 400 bytes is used. */ + documentTemplateMaxBytes?: number | null; +} +export const RenderQueryTemplate = /*@__PURE__*/ S.suspend(() => + S.Struct({ + kind: RenderQueryTemplateKind, + indexUid: S.optional(S.NullOr(S.String)), + embedder: S.optional(S.NullOr(S.String)), + fragment: S.optional(S.NullOr(S.String)), + inline: S.optional(S.Unknown), + documentTemplateMaxBytes: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "RenderQueryTemplate", +}) as any as S.Schema; + +export type RenderQueryInputKind = + | "indexDocument" + | "inlineDocument" + | "inlineSearch"; +export const RenderQueryInputKind = /*@__PURE__*/ S.String; + +export interface RenderQueryInput { + kind: RenderQueryInputKind | (string & {}); + indexUid?: string | null; + id?: string | null; + inline?: unknown; +} +export const RenderQueryInput = /*@__PURE__*/ S.suspend(() => + S.Struct({ + kind: RenderQueryInputKind, + indexUid: S.optional(S.NullOr(S.String)), + id: S.optional(S.NullOr(S.String)), + inline: S.optional(S.Unknown), + }), +).annotate({ + identifier: "RenderQueryInput", +}) as any as S.Schema; + +export interface RenderPostRequest { + /** Template/fragment to fetch for rendering. Use its `kind` parameter to determine the type of template or fragment to fetch. */ + template: RenderQueryTemplate; + input?: RenderQueryInput | null; +} +export const RenderPostRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + template: RenderQueryTemplate, + input: S.optional(S.NullOr(RenderQueryInput)), + }).pipe(T.Http({ method: "POST", uri: "/render-template", code: 200 })), +).annotate({ + identifier: "RenderPostRequest", +}) as any as S.Schema; + +export interface RenderResult { + /** **Un**rendered template or fragment, fetched in index or echoed back from inline template in request. */ + template: unknown; + /** Result of rendering the template by injecting the `input` to the template. `null` if `input` was `null` or missing in the request. */ + rendered?: unknown; +} +export const RenderResult = /*@__PURE__*/ S.suspend(() => + S.Struct({ + template: S.Unknown, + rendered: S.optional(S.Unknown), + }), +).annotate({ identifier: "RenderResult" }) as any as S.Schema; + +export interface ReplaceDocumentsRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document. This parameter is optional and can only be set the first time documents are added to an index. Subsequent attempts to specify it will be ignored if the primary key has already been set. */ + primaryKey?: string; + /** Customize the CSV column delimiter when importing CSV documents. Must be a single ASCII character. Only valid when the content type is `text/csv`; using this parameter with `application/json` or `application/x-ndjson` will return an error. Default: `,`. */ + csvDelimiter?: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; + /** When set to `true`, only updates existing documents and skips creating new ones. Documents that don't already exist in the index will be ignored. This is useful for partial updates where you only want to modify existing records without adding new ones. */ + skipCreation?: boolean; +} +export const ReplaceDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + primaryKey: S.optional(S.String.pipe(T.Query())), + csvDelimiter: S.optional(S.String.pipe(T.Query())), + customMetadata: S.optional(S.String.pipe(T.Query())), + skipCreation: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/documents", + code: 200, + }), + ), +).annotate({ + identifier: "ReplaceDocumentsRequest", +}) as any as S.Schema; + +export interface ReplaceDocumentsResponse {} +export const ReplaceDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "ReplaceDocumentsResponse", +}) as any as S.Schema; + +export interface ResetSettingsRequest { + /** The unique identifier of the chat workspace. */ + workspace_uid: string; +} +export const ResetSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + workspace_uid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/chats/{workspace_uid}/settings", + code: 200, + }), + ), +).annotate({ + identifier: "ResetSettingsRequest", +}) as any as S.Schema; + +export interface ResetSettingsResponse {} +export const ResetSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "ResetSettingsResponse", +}) as any as S.Schema; + +/** Custom query vector for semantic search */ +export type SearchRequestVectorList = Array; +export const SearchRequestVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** Restrict search to specified attributes */ +export type SearchRequestAttributesToSearchOnList = Array; +export const SearchRequestAttributesToSearchOnList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Languages to use for query processing */ +export type SearchRequestLocalesList = Array; +export const SearchRequestLocalesList = /*@__PURE__*/ S.Array( + Locale, +) as any as S.Schema; + +export interface SearchRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Query string to search for matching facet values. If not specified, Meilisearch returns all facet values for the `facetName`, limited to 100 results. Note: only the first word is used for matching. */ + facetQuery?: string | null; + /** Name of the facet attribute to search. Must be present in the index's `filterableAttributes` list. */ + facetName: string; + /** Query string to filter the underlying documents before computing facet values. This affects which facet values appear and their counts, but does not filter the facet values themselves. */ + q?: string | null; + /** Custom query vector for semantic search */ + vector?: SearchRequestVectorList | null; + /** Multimodal content for AI-powered search */ + media?: unknown; + hybrid?: HybridQuery | null; + /** Filter expression to restrict which documents are considered when computing facet values. Attributes must be in `filterableAttributes` before they can be used in filters. */ + filter?: unknown; + matchingStrategy?: MatchingStrategy | (string & {}); + /** Restrict search to specified attributes */ + attributesToSearchOn?: SearchRequestAttributesToSearchOnList | null; + /** Minimum ranking score threshold (0.0 to 1.0) that documents must achieve to be considered when computing facet counts. Documents with scores below this threshold are excluded from facet value counts. */ + rankingScoreThreshold?: number | null; + /** Languages to use for query processing */ + locales?: SearchRequestLocalesList | null; + /** Return exhaustive facet count instead of an estimate */ + exhaustiveFacetCount?: boolean | null; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean | null; +} +export const SearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + facetQuery: S.optional(S.NullOr(S.String)), + facetName: S.String, + q: S.optional(S.NullOr(S.String)), + vector: S.optional(S.NullOr(SearchRequestVectorList)), + media: S.optional(S.Unknown), + hybrid: S.optional(S.NullOr(HybridQuery)), + filter: S.optional(S.Unknown), + matchingStrategy: S.optional(MatchingStrategy), + attributesToSearchOn: S.optional( + S.NullOr(SearchRequestAttributesToSearchOnList), + ), + rankingScoreThreshold: S.optional(S.NullOr(S.Number)), + locales: S.optional(S.NullOr(SearchRequestLocalesList)), + exhaustiveFacetCount: S.optional(S.NullOr(S.Boolean)), + useNetwork: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ + method: "POST", + uri: "/indexes/{index_uid}/facet-search", + code: 200, + }), + ), +).annotate({ identifier: "SearchRequest" }) as any as S.Schema; + +/** Schema representation of a facet value hit (for OpenAPI documentation only). */ +export interface FacetValueHitSchema { + /** The facet value that matched the query. */ + value: string; + /** Number of documents with this facet value among the search results. */ + count: number; +} +export const FacetValueHitSchema = /*@__PURE__*/ S.suspend(() => + S.Struct({ + value: S.String, + count: S.Number, + }), +).annotate({ + identifier: "FacetValueHitSchema", +}) as any as S.Schema; + +/** Array of matching facet values with their document counts, sorted lexicographically in ascending order (or by count if `sortFacetValuesBy` is set to `"count"`). */ +export type FacetSearchResultFacetHitsList = Array; +export const FacetSearchResultFacetHitsList = /*@__PURE__*/ S.Array( + FacetValueHitSchema, +) as any as S.Schema; + +/** Errors from remote shards. Only present in federated search when some remotes failed. */ +export type FacetSearchResultRemoteErrorsMap = { + [key: string]: ResponseError | undefined; +}; +export const FacetSearchResultRemoteErrorsMap = /*@__PURE__*/ S.Record( + S.String, + ResponseError, +) as any as S.Schema; + +/** Result of a facet search operation. */ +export interface FacetSearchResult { + /** Array of matching facet values with their document counts, sorted lexicographically in ascending order (or by count if `sortFacetValuesBy` is set to `"count"`). */ + facetHits: FacetSearchResultFacetHitsList; + /** The original `facetQuery` from the request. `null` if no query was provided. */ + facetQuery?: string | null; + /** Time in milliseconds Meilisearch took to process the request. */ + processingTimeMs: number; + /** Errors from remote shards. Only present in federated search when some remotes failed. */ + remoteErrors?: FacetSearchResultRemoteErrorsMap | null; +} +export const FacetSearchResult = /*@__PURE__*/ S.suspend(() => + S.Struct({ + facetHits: FacetSearchResultFacetHitsList, + facetQuery: S.optional(S.NullOr(S.String)), + processingTimeMs: S.Number, + remoteErrors: S.optional(S.NullOr(FacetSearchResultRemoteErrorsMap)), + }), +).annotate({ + identifier: "FacetSearchResult", +}) as any as S.Schema; + +/** List of attributes to include in each returned document. Use `["*"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used. Attributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response. */ +export type SearchWithPostRequestAttributesToRetrieveList = Array; +export const SearchWithPostRequestAttributesToRetrieveList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Attributes whose values should be cropped to a short excerpt. The cropped text appears in each hit's `_formatted` object. Length is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax. Use `["*"]` to crop all attributes in `attributesToRetrieve`. When possible, the crop is centered around the matching terms. */ +export type SearchWithPostRequestAttributesToCropList = Array; +export const SearchWithPostRequestAttributesToCropList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Attributes in which matching query terms should be highlighted. The highlighted text appears in each hit's `_formatted` object. Use `["*"]` to highlight in all attributes from `attributesToRetrieve`. By default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`. Highlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0). Supported value types are string, number, array, and object. Note: highlights matches within all listed attributes, even those not in `searchableAttributes`. */ +export type SearchWithPostRequestAttributesToHighlightList = Array; +export const SearchWithPostRequestAttributesToHighlightList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Sort results by one or more attributes and their order. Use the format `["attribute:asc", "attribute:desc"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used. For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters. The first attribute in the list has precedence. See [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ +export type SearchWithPostRequestSortList = Array; +export const SearchWithPostRequestSortList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Restrict the search to the listed attributes only. Each attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list. The order of attributes in this parameter does not affect relevancy. */ +export type SearchWithPostRequestAttributesToSearchOnList = Array; +export const SearchWithPostRequestAttributesToSearchOnList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Explicitly specify the language(s) of the query. Pass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0). This overrides auto-detection; use it when auto-detection is wrong for the query or the documents. See also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language). */ +export type SearchWithPostRequestLocalesList = Array; +export const SearchWithPostRequestLocalesList = /*@__PURE__*/ S.Array( + Locale, +) as any as S.Schema; + +/** Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). The array length must match the dimensions of the embedder configured in the index. This parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings). When used with `hybrid`, documents are ranked by vector similarity. You can also use it to override an embedder's automatic vector generation. */ +export type SearchWithPostRequestVectorList = Array; +export const SearchWithPostRequestVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface SearchWithPostRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Sets the search terms. Meilisearch returns documents that match this query. The query supports [prefix search](https://www.meilisearch.com/docs/learn/engine/prefix) and [typo tolerance](https://www.meilisearch.com/docs/learn/relevancy/typo_tolerance_settings). Meilisearch only considers the first ten words; terms are normalized (lowercase, accents ignored). Omit or leave empty for a placeholder search: no query terms are applied, so Meilisearch returns all searchable documents in the index, ordered by [ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Enclose terms in double quotes (`"`) for phrase search: only documents containing that exact sequence of words are returned (e.g. `"Winter Feast"`). Use a minus sign (`-`) before a word or phrase to exclude it from results. */ + q?: string | null; + /** Number of documents to skip at the start of the results. Use together with `limit` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination) (e.g. offset=20 and limit=20 returns results 21–40). This parameter is ignored when `page` or `hitsPerPage` is set; in that case the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`. */ + offset?: number; + /** Maximum number of documents to return in the response. Use with `offset` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This parameter is ignored when `page` or `hitsPerPage` is set. The value cannot exceed the index [maxTotalHits](https://www.meilisearch.com/docs/reference/api/settings/update-pagination#body-max-total-hits-one-of-0) setting. */ + limit?: number; + /** Request a specific results page (1-indexed). Use together with `hitsPerPage`. When this parameter is set, the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`. `page` and `hitsPerPage` take precedence over `offset` and `limit`. */ + page?: number | null; + /** Maximum number of documents per page for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This value determines `totalPages`; use it together with `page`. When set, the response includes `totalHits` and `totalPages`. Set to 0 to obtain the exhaustive `totalHits` count without returning any documents. */ + hitsPerPage?: number | null; + /** List of attributes to include in each returned document. Use `["*"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used. Attributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response. */ + attributesToRetrieve?: SearchWithPostRequestAttributesToRetrieveList | null; + /** Attributes whose values should be cropped to a short excerpt. The cropped text appears in each hit's `_formatted` object. Length is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax. Use `["*"]` to crop all attributes in `attributesToRetrieve`. When possible, the crop is centered around the matching terms. */ + attributesToCrop?: SearchWithPostRequestAttributesToCropList | null; + /** Maximum number of words to include in cropped values. This parameter only applies when `attributesToCrop` is set. Both query terms and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0) count toward this length. */ + cropLength?: number; + /** String used to mark crop boundaries in cropped text. If null or empty, no markers are inserted. Markers are only added where content was actually removed. */ + cropMarker?: string; + /** Attributes in which matching query terms should be highlighted. The highlighted text appears in each hit's `_formatted` object. Use `["*"]` to highlight in all attributes from `attributesToRetrieve`. By default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`. Highlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0). Supported value types are string, number, array, and object. Note: highlights matches within all listed attributes, even those not in `searchableAttributes`. */ + attributesToHighlight?: SearchWithPostRequestAttributesToHighlightList | null; + /** String to insert before each highlighted term. Can be any string (e.g. ``, `*`). If null or empty, nothing is inserted at the start of a match. */ + highlightPreTag?: string; + /** String to insert after each highlighted term. Should be used together with `highlightPreTag` to avoid malformed output (e.g. unclosed HTML tags). */ + highlightPostTag?: string; + /** When true, each hit includes a `_matchesPosition` object with the byte offset (`start` and `length`) of each matched term. This is useful when you need custom highlighting. Note: reports match positions in all attributes, even non-searchable ones. Positions are measured in bytes, not characters. */ + showMatchesPosition?: boolean; + /** A [filter](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) expression to narrow results. All attributes used in the expression must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). You can pass a string (e.g. `"(genres = horror OR genres = mystery) AND director = 'Jordan Peele'"`) or an array (e.g. `[["genres = horror", "genres = mystery"], "director = 'Jordan Peele'"]`). For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoRadius(lat, lng, distance_in_meters)`, `_geoBoundingBox([lat,lng],[lat,lng])`, or `_geoPolygon([lat,lng], ...)` (GeoJSON only for polygon). */ + filter?: unknown; + /** Sort results by one or more attributes and their order. Use the format `["attribute:asc", "attribute:desc"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used. For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters. The first attribute in the list has precedence. See [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ + sort?: SearchWithPostRequestSortList | null; + /** Return only one document per distinct value of the given attribute (e.g. deduplicate by product_id). The attribute must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). This overrides the index [distinctAttribute](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-distinct-attribute-one-of-0) setting for this request. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute). */ + distinct?: string | null; + facets?: AttributePatterns | null; + matchingStrategy?: MatchingStrategy | (string & {}); + /** Restrict the search to the listed attributes only. Each attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list. The order of attributes in this parameter does not affect relevancy. */ + attributesToSearchOn?: SearchWithPostRequestAttributesToSearchOnList | null; + /** Exclude from the results any document whose [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) is below this value (between 0.0 and 1.0). Excluded hits do not count toward `estimatedTotalHits`, `totalHits`, or facet distribution. When used together with `page` and `hitsPerPage`, this parameter may reduce performance because Meilisearch must score all matching documents. */ + rankingScoreThreshold?: number | null; + /** Explicitly specify the language(s) of the query. Pass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0). This overrides auto-detection; use it when auto-detection is wrong for the query or the documents. See also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language). */ + locales?: SearchWithPostRequestLocalesList | null; + hybrid?: HybridQuery | null; + /** Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). The array length must match the dimensions of the embedder configured in the index. This parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings). When used with `hybrid`, documents are ranked by vector similarity. You can also use it to override an embedder's automatic vector generation. */ + vector?: SearchWithPostRequestVectorList | null; + /** When true, the response includes document and query embeddings in each hit's `_vectors` field. The `_vectors` field must be listed in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) for it to appear. */ + retrieveVectors?: boolean; + /** For [multimodal search](https://www.meilisearch.com/docs/learn/ai_powered_search/image_search_with_multimodal_embeddings): provide data (e.g. image, text) that populates a single search fragment configured in index settings. A search fragment is a named slot that defines which media or fields are sent to the embedder. An embedder is required; this parameter is incompatible with `vector`. POST only. */ + media?: unknown; + personalize?: Personalize | null; + /** When `true`, runs the query on the whole network (all shards covered exactly once). When `false`, the query runs locally. When omitted or `null`, the default value depends on whether the sharding is enabled for the instance: - If the instance has sharding enabled (has a leader), defaults to `true`. - Otherwise defaults to `false`. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` = local, default = see above. When using the network, the index must exist with compatible settings on all remotes. */ + useNetwork?: boolean | null; + /** When true, each document includes a `_rankingScore` between 0.0 and 1.0; a higher value means the document is more relevant. See [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score). The `sort` ranking rule does not affect the value of `_rankingScore`. */ + showRankingScore?: boolean; + /** When true, each document includes `_rankingScoreDetails`, which breaks down the score contribution of each [ranking rule](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Useful for debugging relevancy. */ + showRankingScoreDetails?: boolean; + /** When true, the response includes a `performanceDetails` object with a timing breakdown of the query processing. */ + showPerformanceDetails?: boolean; +} +export const SearchWithPostRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + q: S.optional(S.NullOr(S.String)), + offset: S.optional(S.Number), + limit: S.optional(S.Number), + page: S.optional(S.NullOr(S.Number)), + hitsPerPage: S.optional(S.NullOr(S.Number)), + attributesToRetrieve: S.optional( + S.NullOr(SearchWithPostRequestAttributesToRetrieveList), + ), + attributesToCrop: S.optional( + S.NullOr(SearchWithPostRequestAttributesToCropList), + ), + cropLength: S.optional(S.Number), + cropMarker: S.optional(S.String), + attributesToHighlight: S.optional( + S.NullOr(SearchWithPostRequestAttributesToHighlightList), + ), + highlightPreTag: S.optional(S.String), + highlightPostTag: S.optional(S.String), + showMatchesPosition: S.optional(S.Boolean), + filter: S.optional(S.Unknown), + sort: S.optional(S.NullOr(SearchWithPostRequestSortList)), + distinct: S.optional(S.NullOr(S.String)), + facets: S.optional(S.NullOr(AttributePatterns)), + matchingStrategy: S.optional(MatchingStrategy), + attributesToSearchOn: S.optional( + S.NullOr(SearchWithPostRequestAttributesToSearchOnList), + ), + rankingScoreThreshold: S.optional(S.NullOr(S.Number)), + locales: S.optional(S.NullOr(SearchWithPostRequestLocalesList)), + hybrid: S.optional(S.NullOr(HybridQuery)), + vector: S.optional(S.NullOr(SearchWithPostRequestVectorList)), + retrieveVectors: S.optional(S.Boolean), + media: S.optional(S.Unknown), + personalize: S.optional(S.NullOr(Personalize)), + useNetwork: S.optional(S.NullOr(S.Boolean)), + showRankingScore: S.optional(S.Boolean), + showRankingScoreDetails: S.optional(S.Boolean), + showPerformanceDetails: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "POST", uri: "/indexes/{index_uid}/search", code: 200 }), + ), +).annotate({ + identifier: "SearchWithPostRequest", +}) as any as S.Schema; + +/** Matching documents. Each hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`. */ +export type SearchWithPostResponseHitsList = Array; +export const SearchWithPostResponseHitsList = /*@__PURE__*/ S.Array( + SearchHit, +) as any as S.Schema; + +/** Query embedding used for the search. Present when vector or hybrid search was used. */ +export type SearchWithPostResponseQueryVectorList = Array; +export const SearchWithPostResponseQueryVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** Count of matching documents per facet value for each requested facet. Present when `facets` was set. */ +export type SearchWithPostResponseFacetDistributionMap = { + [key: string]: unknown | undefined; +}; +export const SearchWithPostResponseFacetDistributionMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Minimum and maximum numeric values per facet. Present for numeric facets when `facets` was set. */ +export type SearchWithPostResponseFacetStatsMap = { + [key: string]: FacetStats | undefined; +}; +export const SearchWithPostResponseFacetStatsMap = /*@__PURE__*/ S.Record( + S.String, + FacetStats, +) as any as S.Schema; + +/** Errors from remote shards. Federated search only. */ +export type SearchWithPostResponseRemoteErrorsMap = { + [key: string]: ResponseError | undefined; +}; +export const SearchWithPostResponseRemoteErrorsMap = /*@__PURE__*/ S.Record( + S.String, + ResponseError, +) as any as S.Schema; + +export interface SearchWithPostResponse { + /** Number of results per page. */ + hitsPerPage?: number; + /** Current page index (1-based). */ + page?: number; + /** Exhaustive total number of result pages. */ + totalPages?: number; + /** Exhaustive total number of matching documents. */ + totalHits?: number; + /** Maximum number of documents returned. */ + limit?: number; + /** Number of documents skipped. */ + offset?: number; + /** Estimated total number of matches (not exhaustive). Prioritizes relevancy and performance. */ + estimatedTotalHits?: number; + /** Matching documents. Each hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`. */ + hits: SearchWithPostResponseHitsList; + /** Query string that produced this response. */ + query: string; + /** Query embedding used for the search. Present when vector or hybrid search was used. */ + queryVector?: SearchWithPostResponseQueryVectorList | null; + /** Time taken to process the query, in milliseconds. */ + processingTimeMs: number; + /** Count of matching documents per facet value for each requested facet. Present when `facets` was set. */ + facetDistribution?: SearchWithPostResponseFacetDistributionMap | null; + /** Minimum and maximum numeric values per facet. Present for numeric facets when `facets` was set. */ + facetStats?: SearchWithPostResponseFacetStatsMap | null; + /** UUID v7 identifying this search request. */ + requestUid?: string | null; + metadata?: SearchMetadata | null; + /** Timing breakdown per processing step. Present when `showPerformanceDetails` was true. */ + performanceDetails?: unknown; + /** Errors from remote shards. Federated search only. */ + remoteErrors?: SearchWithPostResponseRemoteErrorsMap | null; + /** Exhaustive number of semantic search matches. AI-powered (hybrid/semantic) searches only. */ + semanticHitCount?: number | null; +} +export const SearchWithPostResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hitsPerPage: S.optional(S.Number), + page: S.optional(S.Number), + totalPages: S.optional(S.Number), + totalHits: S.optional(S.Number), + limit: S.optional(S.Number), + offset: S.optional(S.Number), + estimatedTotalHits: S.optional(S.Number), + hits: SearchWithPostResponseHitsList, + query: S.String, + queryVector: S.optional(S.NullOr(SearchWithPostResponseQueryVectorList)), + processingTimeMs: S.Number, + facetDistribution: S.optional( + S.NullOr(SearchWithPostResponseFacetDistributionMap), + ), + facetStats: S.optional(S.NullOr(SearchWithPostResponseFacetStatsMap)), + requestUid: S.optional(S.NullOr(S.String)), + metadata: S.optional(S.NullOr(SearchMetadata)), + performanceDetails: S.optional(S.Unknown), + remoteErrors: S.optional(S.NullOr(SearchWithPostResponseRemoteErrorsMap)), + semanticHitCount: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "SearchWithPostResponse", +}) as any as S.Schema; + +export type SearchWithUrlQueryRequestAttributesToRetrieveList = Array; +export const SearchWithUrlQueryRequestAttributesToRetrieveList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type SearchWithUrlQueryRequestAttributesToCropList = Array; +export const SearchWithUrlQueryRequestAttributesToCropList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type SearchWithUrlQueryRequestAttributesToHighlightList = Array; +export const SearchWithUrlQueryRequestAttributesToHighlightList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type SearchWithUrlQueryRequestFacetsList = Array; +export const SearchWithUrlQueryRequestFacetsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type SearchWithUrlQueryRequestAttributesToSearchOnList = Array; +export const SearchWithUrlQueryRequestAttributesToSearchOnList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type SearchWithUrlQueryRequestLocalesList = Array< + Locale | (string & {}) +>; +export const SearchWithUrlQueryRequestLocalesList = /*@__PURE__*/ S.Array( + Locale, +) as any as S.Schema; + +export type SearchWithUrlQueryRequestVectorList = Array; +export const SearchWithUrlQueryRequestVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface SearchWithUrlQueryRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Sets the search terms. Meilisearch returns documents that match this query. The query supports [prefix search](https://www.meilisearch.com/docs/learn/engine/prefix) and [typo tolerance](https://www.meilisearch.com/docs/learn/relevancy/typo_tolerance_settings). Meilisearch only considers the first ten words; terms are normalized (lowercase, accents ignored). Omit or leave empty for a placeholder search: no query terms are applied, so Meilisearch returns all searchable documents in the index, ordered by [ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Enclose terms in double quotes (`"`) for phrase search: only documents containing that exact sequence of words are returned (e.g. `"Winter Feast"`). Use a minus sign (`-`) before a word or phrase to exclude it from results. */ + q?: string; + /** Number of documents to skip at the start of the results. Use together with `limit` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination) (e.g. offset=20 and limit=20 returns results 21–40). This parameter is ignored when `page` or `hitsPerPage` is set; in that case the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`. */ + offset?: number; + /** Maximum number of documents to return in the response. Use with `offset` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This parameter is ignored when `page` or `hitsPerPage` is set. The value cannot exceed the index [maxTotalHits](https://www.meilisearch.com/docs/reference/api/settings/update-pagination#body-max-total-hits-one-of-0) setting. */ + limit?: number; + /** Request a specific results page (1-indexed). Use together with `hitsPerPage`. When this parameter is set, the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`. `page` and `hitsPerPage` take precedence over `offset` and `limit`. */ + page?: number; + /** Maximum number of documents per page for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This value determines `totalPages`; use it together with `page`. When set, the response includes `totalHits` and `totalPages`. Set to 0 to obtain the exhaustive `totalHits` count without returning any documents. */ + hitsPerPage?: number; + /** List of attributes to include in each returned document. Use `["*"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used. Attributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response. */ + attributesToRetrieve?: SearchWithUrlQueryRequestAttributesToRetrieveList; + /** Attributes whose values should be cropped to a short excerpt. The cropped text appears in each hit's `_formatted` object. Length is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax. Use `["*"]` to crop all attributes in `attributesToRetrieve`. When possible, the crop is centered around the matching terms. */ + attributesToCrop?: SearchWithUrlQueryRequestAttributesToCropList; + /** Maximum number of words to include in cropped values. This parameter only applies when `attributesToCrop` is set. Both query terms and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0) count toward this length. */ + cropLength?: number; + /** String used to mark crop boundaries in cropped text. If null or empty, no markers are inserted. Markers are only added where content was actually removed. */ + cropMarker?: string; + /** Attributes in which matching query terms should be highlighted. The highlighted text appears in each hit's `_formatted` object. Use `["*"]` to highlight in all attributes from `attributesToRetrieve`. By default, matches are wrapped in `` and ``; you can override this with `highlightPreTag` and `highlightPostTag`. Highlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0). Supported value types are string, number, array, and object. Note: highlights matches within all listed attributes, even those not in `searchableAttributes`. */ + attributesToHighlight?: SearchWithUrlQueryRequestAttributesToHighlightList; + /** String to insert before each highlighted term. Can be any string (e.g. ``, `*`). If null or empty, nothing is inserted at the start of a match. */ + highlightPreTag?: string; + /** String to insert after each highlighted term. Should be used together with `highlightPreTag` to avoid malformed output (e.g. unclosed HTML tags). */ + highlightPostTag?: string; + /** When true, each hit includes a `_matchesPosition` object with the byte offset (`start` and `length`) of each matched term. This is useful when you need custom highlighting. Note: reports match positions in all attributes, even non-searchable ones. Positions are measured in bytes, not characters. */ + showMatchesPosition?: boolean; + /** A [filter](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) expression to narrow results. All attributes used in the expression must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). Pass a string (e.g. `"(genres = horror OR genres = mystery) AND director = 'Jordan Peele'"`). For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoRadius(lat, lng, distance_in_meters)`, `_geoBoundingBox([lat,lng],[lat,lng])`, or `_geoPolygon([lat,lng], ...)` (GeoJSON only for polygon). GET route accepts a string only; the value must be URL-encoded. */ + filter?: string; + /** Sort results by one or more attributes and their order. Use the format `["attribute:asc", "attribute:desc"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used. For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters. The first attribute in the list has precedence. See [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ + sort?: string; + /** Return only one document per distinct value of the given attribute (e.g. deduplicate by product_id). The attribute must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). This overrides the index [distinctAttribute](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-distinct-attribute-one-of-0) setting for this request. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute). */ + distinct?: string; + /** Return the count of matches per facet value for the listed attributes. The response includes `facetDistribution` and, for numeric facets, `facetStats` (min/max). This route also supports patterns, i.e., "title", "dogs.*", "*", which can match over the [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). The number of values returned per facet is limited by the index [maxValuesPerFacet](https://www.meilisearch.com/docs/reference/api/settings/update-faceting#body-max-values-per-facet-one-of-0) setting; attributes not in filterableAttributes are ignored. More info: [faceting](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). */ + facets?: SearchWithUrlQueryRequestFacetsList; + /** How to match query terms when there are not enough results to satisfy `limit`. **`last`**: Returns documents containing all query terms first. If there are not enough such results, Meilisearch removes one query term at a time, starting from the end of the query (e.g. for "big fat cat", then "big fat", then "big"). **`all`**: Only returns documents that contain all query terms. Meilisearch does not relax the query even if fewer than `limit` documents match. **`frequency`**: Returns documents containing all query terms first. If there are not enough, removes one term at a time starting with the word that is most frequent in the dataset, giving more weight to rarer terms (e.g. in "white cotton shirt", prioritizes documents containing "white" if "shirt" is very common). Default: `last`. */ + matchingStrategy?: MatchingStrategy | (string & {}); + /** Restrict the search to the listed attributes only. Each attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list. The order of attributes in this parameter does not affect relevancy. */ + attributesToSearchOn?: SearchWithUrlQueryRequestAttributesToSearchOnList; + /** Exclude from the results any document whose [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) is below this value (between 0.0 and 1.0). Excluded hits do not count toward `estimatedTotalHits`, `totalHits`, or facet distribution. When used together with `page` and `hitsPerPage`, this parameter may reduce performance because Meilisearch must score all matching documents. */ + rankingScoreThreshold?: number; + /** Explicitly specify the language(s) of the query. Pass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0). This overrides auto-detection; use it when auto-detection is wrong for the query or the documents. See also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language). */ + locales?: SearchWithUrlQueryRequestLocalesList; + /** Name of the embedder for [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search), which combines keyword and semantic search. Must match an embedder configured in the index settings. Required when `vector` or `hybridSemanticRatio` is set. */ + hybridEmbedder?: string; + /** Balance between keyword and semantic search: 0.0 means keyword-only results, 1.0 means semantic-only. When `q` is empty and this value is greater than 0, Meilisearch performs a pure semantic search. Requires `hybridEmbedder` when set. */ + hybridSemanticRatio?: number; + /** Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). The array length must match the dimensions of the embedder configured in the index. This parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings). When used with `hybrid`, documents are ranked by vector similarity. You can also use it to override an embedder's automatic vector generation. */ + vector?: SearchWithUrlQueryRequestVectorList; + /** When true, the response includes document and query embeddings in each hit's `_vectors` field. The `_vectors` field must be listed in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) for it to appear. */ + retrieveVectors?: boolean; + /** For [personalized search](https://www.meilisearch.com/docs/learn/personalization/making_personalized_search_queries): a string describing the user (e.g. preferences or behavior). Results are then tailored to that profile. Personalization must be [enabled](https://www.meilisearch.com/docs/reference/api/experimental-features/configure-experimental-features) (e.g. Cohere key for self-hosted instances). */ + personalizeUserContext?: string; + /** When `true`, runs the query on the whole network (all shards covered, documents deduplicated across remotes). When `false` or omitted, the query runs locally. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` or omitted = local (default). When using the network, the index must exist with compatible settings on all remotes. Documents with the same id are assumed identical for deduplication. */ + useNetwork?: boolean; + /** When true, each document includes a `_rankingScore` between 0.0 and 1.0; a higher value means the document is more relevant. See [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score). The `sort` ranking rule does not affect the value of `_rankingScore`. */ + showRankingScore?: boolean; + /** When true, each document includes `_rankingScoreDetails`, which breaks down the score contribution of each [ranking rule](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Useful for debugging relevancy. */ + showRankingScoreDetails?: boolean; + /** When true, the response includes a `performanceDetails` object with a timing breakdown of the query processing. */ + showPerformanceDetails?: boolean; +} +export const SearchWithUrlQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + q: S.optional(S.String.pipe(T.Query())), + offset: S.optional(S.Number.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + page: S.optional(S.Number.pipe(T.Query())), + hitsPerPage: S.optional(S.Number.pipe(T.Query())), + attributesToRetrieve: S.optional( + SearchWithUrlQueryRequestAttributesToRetrieveList.pipe(T.Query()), + ), + attributesToCrop: S.optional( + SearchWithUrlQueryRequestAttributesToCropList.pipe(T.Query()), + ), + cropLength: S.optional(S.Number.pipe(T.Query())), + cropMarker: S.optional(S.String.pipe(T.Query())), + attributesToHighlight: S.optional( + SearchWithUrlQueryRequestAttributesToHighlightList.pipe(T.Query()), + ), + highlightPreTag: S.optional(S.String.pipe(T.Query())), + highlightPostTag: S.optional(S.String.pipe(T.Query())), + showMatchesPosition: S.optional(S.Boolean.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + sort: S.optional(S.String.pipe(T.Query())), + distinct: S.optional(S.String.pipe(T.Query())), + facets: S.optional(SearchWithUrlQueryRequestFacetsList.pipe(T.Query())), + matchingStrategy: S.optional(MatchingStrategy.pipe(T.Query())), + attributesToSearchOn: S.optional( + SearchWithUrlQueryRequestAttributesToSearchOnList.pipe(T.Query()), + ), + rankingScoreThreshold: S.optional(S.Number.pipe(T.Query())), + locales: S.optional(SearchWithUrlQueryRequestLocalesList.pipe(T.Query())), + hybridEmbedder: S.optional(S.String.pipe(T.Query())), + hybridSemanticRatio: S.optional(S.Number.pipe(T.Query())), + vector: S.optional(SearchWithUrlQueryRequestVectorList.pipe(T.Query())), + retrieveVectors: S.optional(S.Boolean.pipe(T.Query())), + personalizeUserContext: S.optional(S.String.pipe(T.Query())), + useNetwork: S.optional(S.Boolean.pipe(T.Query())), + showRankingScore: S.optional(S.Boolean.pipe(T.Query())), + showRankingScoreDetails: S.optional(S.Boolean.pipe(T.Query())), + showPerformanceDetails: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/indexes/{index_uid}/search", code: 200 }), + ), +).annotate({ + identifier: "SearchWithUrlQueryRequest", +}) as any as S.Schema; + +/** Matching documents. Each hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`. */ +export type SearchWithUrlQueryResponseHitsList = Array; +export const SearchWithUrlQueryResponseHitsList = /*@__PURE__*/ S.Array( + SearchHit, +) as any as S.Schema; + +/** Query embedding used for the search. Present when vector or hybrid search was used. */ +export type SearchWithUrlQueryResponseQueryVectorList = Array; +export const SearchWithUrlQueryResponseQueryVectorList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** Count of matching documents per facet value for each requested facet. Present when `facets` was set. */ +export type SearchWithUrlQueryResponseFacetDistributionMap = { + [key: string]: unknown | undefined; +}; +export const SearchWithUrlQueryResponseFacetDistributionMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Minimum and maximum numeric values per facet. Present for numeric facets when `facets` was set. */ +export type SearchWithUrlQueryResponseFacetStatsMap = { + [key: string]: FacetStats | undefined; +}; +export const SearchWithUrlQueryResponseFacetStatsMap = /*@__PURE__*/ S.Record( + S.String, + FacetStats, +) as any as S.Schema; + +/** Errors from remote shards. Federated search only. */ +export type SearchWithUrlQueryResponseRemoteErrorsMap = { + [key: string]: ResponseError | undefined; +}; +export const SearchWithUrlQueryResponseRemoteErrorsMap = /*@__PURE__*/ S.Record( + S.String, + ResponseError, +) as any as S.Schema; + +export interface SearchWithUrlQueryResponse { + /** Number of results per page. */ + hitsPerPage?: number; + /** Current page index (1-based). */ + page?: number; + /** Exhaustive total number of result pages. */ + totalPages?: number; + /** Exhaustive total number of matching documents. */ + totalHits?: number; + /** Maximum number of documents returned. */ + limit?: number; + /** Number of documents skipped. */ + offset?: number; + /** Estimated total number of matches (not exhaustive). Prioritizes relevancy and performance. */ + estimatedTotalHits?: number; + /** Matching documents. Each hit contains document fields and, when requested, `_formatted`, `_matchesPosition`, `_rankingScore`, `_rankingScoreDetails`, `_geoDistance`. */ + hits: SearchWithUrlQueryResponseHitsList; + /** Query string that produced this response. */ + query: string; + /** Query embedding used for the search. Present when vector or hybrid search was used. */ + queryVector?: SearchWithUrlQueryResponseQueryVectorList | null; + /** Time taken to process the query, in milliseconds. */ + processingTimeMs: number; + /** Count of matching documents per facet value for each requested facet. Present when `facets` was set. */ + facetDistribution?: SearchWithUrlQueryResponseFacetDistributionMap | null; + /** Minimum and maximum numeric values per facet. Present for numeric facets when `facets` was set. */ + facetStats?: SearchWithUrlQueryResponseFacetStatsMap | null; + /** UUID v7 identifying this search request. */ + requestUid?: string | null; + metadata?: SearchMetadata | null; + /** Timing breakdown per processing step. Present when `showPerformanceDetails` was true. */ + performanceDetails?: unknown; + /** Errors from remote shards. Federated search only. */ + remoteErrors?: SearchWithUrlQueryResponseRemoteErrorsMap | null; + /** Exhaustive number of semantic search matches. AI-powered (hybrid/semantic) searches only. */ + semanticHitCount?: number | null; +} +export const SearchWithUrlQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hitsPerPage: S.optional(S.Number), + page: S.optional(S.Number), + totalPages: S.optional(S.Number), + totalHits: S.optional(S.Number), + limit: S.optional(S.Number), + offset: S.optional(S.Number), + estimatedTotalHits: S.optional(S.Number), + hits: SearchWithUrlQueryResponseHitsList, + query: S.String, + queryVector: S.optional( + S.NullOr(SearchWithUrlQueryResponseQueryVectorList), + ), + processingTimeMs: S.Number, + facetDistribution: S.optional( + S.NullOr(SearchWithUrlQueryResponseFacetDistributionMap), + ), + facetStats: S.optional(S.NullOr(SearchWithUrlQueryResponseFacetStatsMap)), + requestUid: S.optional(S.NullOr(S.String)), + metadata: S.optional(S.NullOr(SearchMetadata)), + performanceDetails: S.optional(S.Unknown), + remoteErrors: S.optional( + S.NullOr(SearchWithUrlQueryResponseRemoteErrorsMap), + ), + semanticHitCount: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "SearchWithUrlQueryResponse", +}) as any as S.Schema; + +export type SimilarGetRequestAttributesToRetrieveList = Array; +export const SimilarGetRequestAttributesToRetrieveList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface SimilarGetRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** The unique identifier ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value) of the target document. Meilisearch will find and return documents that are semantically similar to this document based on their vector embeddings. This is a required parameter. */ + id: string; + /** The name of the embedder to use for finding similar documents. This must match one of the embedders configured in your index settings. The embedder determines how document similarity is calculated based on vector embeddings. */ + embedder: string; + /** Number of similar documents to skip in the response. Use together with `limit` for pagination through large result sets. For example, to get similar documents 21-40, set `offset=20` and `limit=20`. Defaults to `0`. */ + offset?: number; + /** Maximum number of similar documents to return in a single response. Use together with `offset` for pagination. Higher values return more results but may increase response time. Defaults to `20`. */ + limit?: number; + /** Comma-separated list of document attributes to include in the response. Use `*` to retrieve all attributes. By default, all attributes listed in the `displayedAttributes` setting are returned. Example: `title,description,price`. */ + attributes_to_retrieve?: SimilarGetRequestAttributesToRetrieveList; + /** When `true`, includes the vector embeddings for each returned document. Useful for debugging or when you need to inspect the vector data. Note that this can significantly increase response size. Defaults to `false`. */ + retrieve_vectors?: boolean; + /** Filter expression to narrow down which documents can be returned as similar. Uses the same syntax as search filters. Only documents matching this filter will be considered when finding similar documents. Example: `genres = action AND year > 2000`. */ + filter?: string; + /** When `true`, includes a global `_rankingScore` field in each document showing how similar it is to the target document. The score is a value between 0 and 1, where higher values indicate greater similarity. Defaults to `false`. */ + show_ranking_score?: boolean; + /** When `true`, includes a detailed `_rankingScoreDetails` object in each document breaking down how the similarity score was calculated. Useful for debugging and understanding why certain documents are considered more similar. Defaults to `false`. */ + show_ranking_score_details?: boolean; + /** When `true`, includes a `_performanceDetails` object showing the performance details of the search. */ + show_performance_details?: boolean; + /** Minimum ranking score threshold (between 0.0 and 1.0) that documents must meet to be included in results. Documents with a similarity score below this threshold will be excluded. Useful for ensuring only highly similar documents are returned. */ + ranking_score_threshold?: number; +} +export const SimilarGetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + id: S.String.pipe(T.Query()), + embedder: S.String.pipe(T.Query()), + offset: S.optional(S.Number.pipe(T.Query())), + limit: S.optional(S.Number.pipe(T.Query())), + attributes_to_retrieve: S.optional( + SimilarGetRequestAttributesToRetrieveList.pipe(T.Query()), + ), + retrieve_vectors: S.optional(S.Boolean.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + show_ranking_score: S.optional(S.Boolean.pipe(T.Query())), + show_ranking_score_details: S.optional(S.Boolean.pipe(T.Query())), + show_performance_details: S.optional(S.Boolean.pipe(T.Query())), + ranking_score_threshold: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/indexes/{index_uid}/similar", code: 200 }), + ), +).annotate({ + identifier: "SimilarGetRequest", +}) as any as S.Schema; + +/** Results of the query */ +export type SimilarGetResponseHitsList = Array; +export const SimilarGetResponseHitsList = /*@__PURE__*/ S.Array( + SearchHit, +) as any as S.Schema; + +export interface SimilarGetResponse { + /** Number of results per page. */ + hitsPerPage?: number; + /** Current page index (1-based). */ + page?: number; + /** Exhaustive total number of result pages. */ + totalPages?: number; + /** Exhaustive total number of matching documents. */ + totalHits?: number; + /** Maximum number of documents returned. */ + limit?: number; + /** Number of documents skipped. */ + offset?: number; + /** Estimated total number of matches (not exhaustive). Prioritizes relevancy and performance. */ + estimatedTotalHits?: number; + /** Results of the query */ + hits: SimilarGetResponseHitsList; + /** Document ID that was used as reference */ + id: string; + /** Processing time of the query in milliseconds */ + processingTimeMs: number; + /** Performance details of the query */ + performanceDetails?: unknown; +} +export const SimilarGetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hitsPerPage: S.optional(S.Number), + page: S.optional(S.Number), + totalPages: S.optional(S.Number), + totalHits: S.optional(S.Number), + limit: S.optional(S.Number), + offset: S.optional(S.Number), + estimatedTotalHits: S.optional(S.Number), + hits: SimilarGetResponseHitsList, + id: S.String, + processingTimeMs: S.Number, + performanceDetails: S.optional(S.Unknown), + }), +).annotate({ + identifier: "SimilarGetResponse", +}) as any as S.Schema; + +/** Attributes to display in the returned documents */ +export type SimilarPostRequestAttributesToRetrieveList = Array; +export const SimilarPostRequestAttributesToRetrieveList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface SimilarPostRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Document ID to find similar documents for */ + id: string; + /** Number of documents to skip */ + offset?: number; + /** Maximum number of documents returned */ + limit?: number; + /** Filter queries by an attribute's value */ + filter?: unknown; + /** Name of the embedder to use for semantic similarity */ + embedder: string; + /** Attributes to display in the returned documents */ + attributesToRetrieve?: SimilarPostRequestAttributesToRetrieveList | null; + /** Return document vector data */ + retrieveVectors?: boolean; + /** Display the global ranking score of a document */ + showRankingScore?: boolean; + /** Adds a detailed global ranking score field */ + showRankingScoreDetails?: boolean; + /** Adds a detailed performance details field */ + showPerformanceDetails?: boolean; + /** Excludes results with low ranking scores */ + rankingScoreThreshold?: number; +} +export const SimilarPostRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + id: S.String, + offset: S.optional(S.Number), + limit: S.optional(S.Number), + filter: S.optional(S.Unknown), + embedder: S.String, + attributesToRetrieve: S.optional( + S.NullOr(SimilarPostRequestAttributesToRetrieveList), + ), + retrieveVectors: S.optional(S.Boolean), + showRankingScore: S.optional(S.Boolean), + showRankingScoreDetails: S.optional(S.Boolean), + showPerformanceDetails: S.optional(S.Boolean), + rankingScoreThreshold: S.optional(S.Number), + }).pipe( + T.Http({ method: "POST", uri: "/indexes/{index_uid}/similar", code: 200 }), + ), +).annotate({ + identifier: "SimilarPostRequest", +}) as any as S.Schema; + +/** Results of the query */ +export type SimilarPostResponseHitsList = Array; +export const SimilarPostResponseHitsList = /*@__PURE__*/ S.Array( + SearchHit, +) as any as S.Schema; + +export interface SimilarPostResponse { + /** Number of results per page. */ + hitsPerPage?: number; + /** Current page index (1-based). */ + page?: number; + /** Exhaustive total number of result pages. */ + totalPages?: number; + /** Exhaustive total number of matching documents. */ + totalHits?: number; + /** Maximum number of documents returned. */ + limit?: number; + /** Number of documents skipped. */ + offset?: number; + /** Estimated total number of matches (not exhaustive). Prioritizes relevancy and performance. */ + estimatedTotalHits?: number; + /** Results of the query */ + hits: SimilarPostResponseHitsList; + /** Document ID that was used as reference */ + id: string; + /** Processing time of the query in milliseconds */ + processingTimeMs: number; + /** Performance details of the query */ + performanceDetails?: unknown; +} +export const SimilarPostResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({ + hitsPerPage: S.optional(S.Number), + page: S.optional(S.Number), + totalPages: S.optional(S.Number), + totalHits: S.optional(S.Number), + limit: S.optional(S.Number), + offset: S.optional(S.Number), + estimatedTotalHits: S.optional(S.Number), + hits: SimilarPostResponseHitsList, + id: S.String, + processingTimeMs: S.Number, + performanceDetails: S.optional(S.Unknown), + }), +).annotate({ + identifier: "SimilarPostResponse", +}) as any as S.Schema; + +/** Array of the two index names to be swapped */ +export type SwapIndexesPayloadIndexesList = Array; +export const SwapIndexesPayloadIndexesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Request body for swapping two indexes */ +export interface SwapIndexesPayload { + /** Array of the two index names to be swapped */ + indexes: SwapIndexesPayloadIndexesList; + /** If true, rename the first index to the second instead of swapping */ + rename?: boolean; +} +export const SwapIndexesPayload = /*@__PURE__*/ S.suspend(() => + S.Struct({ + indexes: SwapIndexesPayloadIndexesList, + rename: S.optional(S.Boolean), + }), +).annotate({ + identifier: "SwapIndexesPayload", +}) as any as S.Schema; + +export type SwapIndexesRequestBodyList = Array; +export const SwapIndexesRequestBodyList = /*@__PURE__*/ S.Array( + SwapIndexesPayload, +) as any as S.Schema; + +export interface SwapIndexesRequest { + body: SwapIndexesRequestBodyList; +} +export const SwapIndexesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: SwapIndexesRequestBodyList.pipe(T.HttpBody()), + }).pipe(T.Http({ method: "POST", uri: "/swap-indexes", code: 200 })), +).annotate({ + identifier: "SwapIndexesRequest", +}) as any as S.Schema; + +export interface SwapIndexesResponse {} +export const SwapIndexesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "SwapIndexesResponse", +}) as any as S.Schema; + +/** Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ +export type UpdateAllRequestDisplayedAttributesList = Array; +export const UpdateAllRequestDisplayedAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ +export type UpdateAllRequestSearchableAttributesList = Array; +export const UpdateAllRequestSearchableAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`. */ +export type UpdateAllRequestFilterableAttributesList = + Array; +export const UpdateAllRequestFilterableAttributesList = /*@__PURE__*/ S.Array( + FilterableAttributesRule, +) as any as S.Schema; + +/** Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ +export type UpdateAllRequestSortableAttributesList = Array; +export const UpdateAllRequestSortableAttributesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Foreign keys to use for cross-index filtering search. */ +export type UpdateAllRequestForeignKeysList = Array; +export const UpdateAllRequestForeignKeysList = /*@__PURE__*/ S.Array( + ForeignKey, +) as any as S.Schema; + +/** [Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`). */ +export type UpdateAllRequestRankingRulesList = Array; +export const UpdateAllRequestRankingRulesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Words ignored when present in search queries. */ +export type UpdateAllRequestStopWordsList = Array; +export const UpdateAllRequestStopWordsList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Characters that are not treated as word separators. Removed from the default separator set. */ +export type UpdateAllRequestNonSeparatorTokensList = Array; +export const UpdateAllRequestNonSeparatorTokensList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Characters that delimit words. Added on top of the default separators. */ +export type UpdateAllRequestSeparatorTokensList = Array; +export const UpdateAllRequestSeparatorTokensList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Strings Meilisearch parses as a single term. Useful for names or domain terms. */ +export type UpdateAllRequestDictionaryList = Array; +export const UpdateAllRequestDictionaryList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type UpdateAllRequestSynonymsValueList = Array; +export const UpdateAllRequestSynonymsValueList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +/** Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms). */ +export type UpdateAllRequestSynonymsMap = { + [key: string]: UpdateAllRequestSynonymsValueList | undefined; +}; +export const UpdateAllRequestSynonymsMap = /*@__PURE__*/ S.Record( + S.String, + UpdateAllRequestSynonymsValueList, +) as any as S.Schema; + +/** [Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.). */ +export type UpdateAllRequestEmbeddersMap = { + [key: string]: EmbeddingSettings | undefined; +}; +export const UpdateAllRequestEmbeddersMap = /*@__PURE__*/ S.Record( + S.String, + EmbeddingSettings, +) as any as S.Schema; + +/** Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes. */ +export type UpdateAllRequestLocalizedAttributesList = + Array; +export const UpdateAllRequestLocalizedAttributesList = /*@__PURE__*/ S.Array( + LocalizedAttributesRuleView, +) as any as S.Schema; + +export interface UpdateAllRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** Fields returned in search results. Affects only search endpoints, not get-document endpoints. See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ + displayedAttributes?: UpdateAllRequestDisplayedAttributesList | null; + /** Fields searched for query words, in order of importance. Defines [attribute ranking order](https://www.meilisearch.com/docs/learn/relevancy/attribute_ranking_order). See [displayed and searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes). */ + searchableAttributes?: UpdateAllRequestSearchableAttributesList | null; + /** Attributes that can be used as [filters](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) and [facets](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters). Strings or objects with `attributePatterns` and `features`. */ + filterableAttributes?: UpdateAllRequestFilterableAttributesList | null; + /** Attributes that can be used to [sort search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results). */ + sortableAttributes?: UpdateAllRequestSortableAttributesList | null; + /** Foreign keys to use for cross-index filtering search. */ + foreignKeys?: UpdateAllRequestForeignKeysList | null; + /** [Ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules) in order of importance. Built-in rules and custom sort rules (`attribute:asc` or `attribute:desc`). */ + rankingRules?: UpdateAllRequestRankingRulesList | null; + /** Words ignored when present in search queries. */ + stopWords?: UpdateAllRequestStopWordsList | null; + /** Characters that are not treated as word separators. Removed from the default separator set. */ + nonSeparatorTokens?: UpdateAllRequestNonSeparatorTokensList | null; + /** Characters that delimit words. Added on top of the default separators. */ + separatorTokens?: UpdateAllRequestSeparatorTokensList | null; + /** Strings Meilisearch parses as a single term. Useful for names or domain terms. */ + dictionary?: UpdateAllRequestDictionaryList | null; + /** Pairs of words or phrases treated as equivalent for search. Key maps to an array of [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms). */ + synonyms?: UpdateAllRequestSynonymsMap | null; + /** Field whose value must be unique in the returned documents. One document per distinct value. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute). */ + distinctAttribute?: string | null; + /** Precision for the proximity ranking rule and phrase search: `byWord` (exact distance) or `byAttribute` (same attribute). */ + proximityPrecision?: string | null; + typoTolerance?: TypoSettings | null; + faceting?: FacetingSettings | null; + pagination?: PaginationSettings | null; + /** [Embedders](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search) used for semantic and [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). Map of embedder name to config (`source`, `model`, `documentTemplate`, etc.). */ + embedders?: UpdateAllRequestEmbeddersMap | null; + /** Maximum duration of a search in milliseconds. If reached, the search stops and returns results computed so far. When null, 1500 ms is used. */ + searchCutoffMs?: number | null; + /** Locales and attribute patterns for [language-specific tokenization](https://www.meilisearch.com/docs/learn/resources/language). Affects searchable, filterable, and sortable attributes. */ + localizedAttributes?: UpdateAllRequestLocalizedAttributesList | null; + /** When true, [facet search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters) is enabled. When false, the facet-search endpoint is disabled. */ + facetSearch?: boolean | null; + prefixSearch?: PrefixSearchSettings | (string & {}) | null; + chat?: ChatSettings | null; +} +export const UpdateAllRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + displayedAttributes: S.optional( + S.NullOr(UpdateAllRequestDisplayedAttributesList), + ), + searchableAttributes: S.optional( + S.NullOr(UpdateAllRequestSearchableAttributesList), + ), + filterableAttributes: S.optional( + S.NullOr(UpdateAllRequestFilterableAttributesList), + ), + sortableAttributes: S.optional( + S.NullOr(UpdateAllRequestSortableAttributesList), + ), + foreignKeys: S.optional(S.NullOr(UpdateAllRequestForeignKeysList)), + rankingRules: S.optional(S.NullOr(UpdateAllRequestRankingRulesList)), + stopWords: S.optional(S.NullOr(UpdateAllRequestStopWordsList)), + nonSeparatorTokens: S.optional( + S.NullOr(UpdateAllRequestNonSeparatorTokensList), + ), + separatorTokens: S.optional(S.NullOr(UpdateAllRequestSeparatorTokensList)), + dictionary: S.optional(S.NullOr(UpdateAllRequestDictionaryList)), + synonyms: S.optional(S.NullOr(UpdateAllRequestSynonymsMap)), + distinctAttribute: S.optional(S.NullOr(S.String)), + proximityPrecision: S.optional(S.NullOr(S.String)), + typoTolerance: S.optional(S.NullOr(TypoSettings)), + faceting: S.optional(S.NullOr(FacetingSettings)), + pagination: S.optional(S.NullOr(PaginationSettings)), + embedders: S.optional(S.NullOr(UpdateAllRequestEmbeddersMap)), + searchCutoffMs: S.optional(S.NullOr(S.Number)), + localizedAttributes: S.optional( + S.NullOr(UpdateAllRequestLocalizedAttributesList), + ), + facetSearch: S.optional(S.NullOr(S.Boolean)), + prefixSearch: S.optional(S.NullOr(PrefixSearchSettings)), + chat: S.optional(S.NullOr(ChatSettings)), + }).pipe( + T.Http({ + method: "PATCH", + uri: "/indexes/{index_uid}/settings", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateAllRequest", +}) as any as S.Schema; + +export interface UpdateAllResponse {} +export const UpdateAllResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateAllResponse", +}) as any as S.Schema; + +export interface UpdateDocumentsRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document. This parameter is optional and can only be set the first time documents are added to an index. Subsequent attempts to specify it will be ignored if the primary key has already been set. */ + primaryKey?: string; + /** Customize the CSV column delimiter when importing CSV documents. Must be a single ASCII character. Only valid when the content type is `text/csv`; using this parameter with `application/json` or `application/x-ndjson` will return an error. Default: `,`. */ + csvDelimiter?: string; + /** A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application. */ + customMetadata?: string; + /** When set to `true`, only updates existing documents and skips creating new ones. Documents that don't already exist in the index will be ignored. This is useful for partial updates where you only want to modify existing records without adding new ones. */ + skipCreation?: boolean; +} +export const UpdateDocumentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + primaryKey: S.optional(S.String.pipe(T.Query())), + csvDelimiter: S.optional(S.String.pipe(T.Query())), + customMetadata: S.optional(S.String.pipe(T.Query())), + skipCreation: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "PUT", uri: "/indexes/{index_uid}/documents", code: 200 }), + ), +).annotate({ + identifier: "UpdateDocumentsRequest", +}) as any as S.Schema; + +export interface UpdateDocumentsResponse {} +export const UpdateDocumentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateDocumentsResponse", +}) as any as S.Schema; + +export interface UpdateIndexRequest { + /** Unique identifier of the index. */ + index_uid: string; + /** New [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) of the index */ + primaryKey?: string | null; + /** New uid for the index (for renaming) */ + uid?: string | null; +} +export const UpdateIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + index_uid: S.String.pipe(T.Label()), + primaryKey: S.optional(S.NullOr(S.String)), + uid: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PATCH", uri: "/indexes/{index_uid}", code: 200 })), +).annotate({ + identifier: "UpdateIndexRequest", +}) as any as S.Schema; + +export interface UpdateIndexResponse {} +export const UpdateIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateIndexResponse", +}) as any as S.Schema; + +/** Actions to apply when the dynamic search rule matches. */ +export type UpdateOrCreateRuleRequestActionsList = Array; +export const UpdateOrCreateRuleRequestActionsList = /*@__PURE__*/ S.Array( + RuleAction, +) as any as S.Schema; + +export interface UpdateOrCreateRuleRequest { + /** Unique identifier of the search rule. */ + uid: string; + /** Human-readable description of the dynamic search rule. */ + description?: string | null; + /** Precedence of the dynamic search rule. Lower numeric values take precedence over higher ones. If omitted, the rule is treated as having the lowest precedence. This precedence is used to resolve conflicts between matching rules: - If the same document is selected by multiple rules, the smallest `priority` number wins - If different documents are pinned to the same position, they are ordered by ascending `priority` */ + precedence?: number | null; + /** Whether the dynamic search rule is active. */ + active?: boolean | null; + conditions?: Conditions | null; + /** Actions to apply when the dynamic search rule matches. */ + actions?: UpdateOrCreateRuleRequestActionsList | null; +} +export const UpdateOrCreateRuleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uid: S.String.pipe(T.Label()), + description: S.optional(S.NullOr(S.String)), + precedence: S.optional(S.NullOr(S.Number)), + active: S.optional(S.NullOr(S.Boolean)), + conditions: S.optional(S.NullOr(Conditions)), + actions: S.optional(S.NullOr(UpdateOrCreateRuleRequestActionsList)), + }).pipe( + T.Http({ method: "PATCH", uri: "/dynamic-search-rules/{uid}", code: 200 }), + ), +).annotate({ + identifier: "UpdateOrCreateRuleRequest", +}) as any as S.Schema; + +export interface UpdateOrCreateRuleResponse {} +export const UpdateOrCreateRuleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateOrCreateRuleResponse", +}) as any as S.Schema; + +export interface UpdateStderrTargetRequest { + /** Log targets to filter. Format: code_part=log_level (e.g., milli=trace,actix_web=off) */ + target?: string; +} +export const UpdateStderrTargetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + target: S.optional(S.String), + }).pipe(T.Http({ method: "POST", uri: "/logs/stderr", code: 200 })), +).annotate({ + identifier: "UpdateStderrTargetRequest", +}) as any as S.Schema; + +export interface UpdateStderrTargetResponse {} +export const UpdateStderrTargetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateStderrTargetResponse", +}) as any as S.Schema; + +export type CancelLogsError = MeilisearchOpError; +/** Stop retrieving logs Call this route to make the engine stop sending logs to the client that opened the `POST /logs/stream` connection. */ +export const cancelLogs: API.OperationMethod< + CancelLogsRequest, + CancelLogsResponse, + CancelLogsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CancelLogsRequest, + output: CancelLogsResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CancelTasksError = BadRequest | MeilisearchOpError; +/** Cancel tasks Cancel enqueued and/or processing [tasks](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to cancel. **Note:** Task cancellation is atomic — either all matched tasks are canceled or none are. **Note:** Each filter parameter accepts `*` to match all values (e.g., `statuses=*`). **Tip:** You can cancel `taskCancelation` type tasks as long as they are `enqueued` or `processing`, because cancellation tasks are processed in reverse order of enqueueing. */ +export const cancelTasks: API.OperationMethod< + CancelTasksRequest, + SummarizedTaskView, + CancelTasksError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CancelTasksRequest, + output: SummarizedTaskView, + errors: [BadRequest, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ChatError = NotFound | MeilisearchOpError; +/** Request a chat completion Answer a conversational question with the OpenAI-compatible chat completions API, using the documents of the authorized indexes as context. Only streamed responses (`stream: true`) are supported. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const chat: API.OperationMethod< + ChatRequest, + CreateChatCompletionResponse, + ChatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ChatRequest, + output: CreateChatCompletionResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ClearAllDocumentsError = NotFound | MeilisearchOpError; +/** Delete all documents Permanently delete all documents in the specified index. Settings and index metadata are preserved. */ +export const clearAllDocuments: API.OperationMethod< + ClearAllDocumentsRequest, + ClearAllDocumentsResponse, + ClearAllDocumentsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ClearAllDocumentsRequest, + output: ClearAllDocumentsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ClearRulesError = MeilisearchOpError; +/** Delete all search rules. This will delete **all** the currently defined search rules. */ +export const clearRules: API.OperationMethod< + ClearRulesRequest, + ClearRulesResponse, + ClearRulesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ClearRulesRequest, + output: ClearRulesResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CompactError = NotFound | MeilisearchOpError; +/** Compact index Trigger a compaction process on the specified index. Compaction reorganizes the index database to reclaim space and improve read performance. */ +export const compact: API.OperationMethod< + CompactRequest, + CompactResponse, + CompactError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CompactRequest, + output: CompactResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CompactTaskQueueError = MeilisearchOpError; +/** Compact task queue Trigger a compaction process on the task queue database and return its size before and after compaction. A successful compaction requires restarting the instance before it can safely resume normal writes. */ +export const compactTaskQueue: API.OperationMethod< + CompactTaskQueueRequest, + TaskCompactionSummary, + CompactTaskQueueError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CompactTaskQueueRequest, + output: TaskCompactionSummary, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CreateApiKeyError = MeilisearchOpError; +/** Create API key Create a new API key with the specified name, description, actions, and index scopes. The key value is returned only once at creation time; store it securely. **Required fields:** `actions`, `indexes`, `expiresAt`. **Optional fields:** `name`, `description`, `uid`. Set `expiresAt` to `null` to create a key that never expires. Use `"*"` in the `actions` array to grant all permissions (not recommended for production). Use `["*"]` in the `indexes` array to grant access to all indexes. */ +export const createApiKey: API.OperationMethod< + CreateApiKeyRequest, + KeyView, + CreateApiKeyError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateApiKeyRequest, + output: KeyView, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CreateDumpError = MeilisearchOpError; +/** Create dump Trigger a dump creation process. When complete, a dump file is written to the [dump directory](https://www.meilisearch.com/docs/learn/self_hosted/configure_meilisearch_at_launch#dump-directory). The directory is created if it does not exist. */ +export const createDump: API.OperationMethod< + CreateDumpRequest, + CreateDumpResponse, + CreateDumpError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDumpRequest, + output: CreateDumpResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CreateIndexError = MeilisearchOpError; +/** Create index Create a new index with an optional [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key). If no primary key is provided, Meilisearch will [infer one](https://www.meilisearch.com/docs/learn/getting_started/primary_key#meilisearch-guesses-your-primary-key) from the first batch of documents. */ +export const createIndex: API.OperationMethod< + CreateIndexRequest, + CreateIndexResponse, + CreateIndexError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateIndexRequest, + output: CreateIndexResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type CreateSnapshotError = MeilisearchOpError; +/** Create snapshot Trigger a snapshot creation process. When complete, a snapshot file is written to the snapshot directory. The directory is created if it does not exist. */ +export const createSnapshot: API.OperationMethod< + CreateSnapshotRequest, + CreateSnapshotResponse, + CreateSnapshotError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSnapshotRequest, + output: CreateSnapshotResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteAllError = NotFound | MeilisearchOpError; +/** Reset all settings Resets all settings of the index to their default values. */ +export const deleteAll: API.OperationMethod< + DeleteAllRequest, + DeleteAllResponse, + DeleteAllError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteAllRequest, + output: DeleteAllResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteApiKeyError = NotFound | MeilisearchOpError; +/** Delete API key Permanently delete the specified API key. The key will no longer be valid for authentication. */ +export const deleteApiKey: API.OperationMethod< + DeleteApiKeyRequest, + DeleteApiKeyResponse, + DeleteApiKeyError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteApiKeyRequest, + output: DeleteApiKeyResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletechatError = NotFound | MeilisearchOpError; +/** Reset chat Resets the `chat` setting to its default value. */ +export const deletechat: API.OperationMethod< + DeletechatRequest, + DeletechatResponse, + DeletechatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletechatRequest, + output: DeletechatResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteChatError = NotFound | MeilisearchOpError; +/** Delete a chat workspace Delete a chat workspace and its settings by its unique identifier. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const deleteChat: API.OperationMethod< + DeleteChatRequest, + DeleteChatResponse, + DeleteChatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteChatRequest, + output: DeleteChatResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletedictionaryError = NotFound | MeilisearchOpError; +/** Reset dictionary Resets the `dictionary` setting to its default value. */ +export const deletedictionary: API.OperationMethod< + DeletedictionaryRequest, + DeletedictionaryResponse, + DeletedictionaryError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletedictionaryRequest, + output: DeletedictionaryResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletedisplayedAttributesError = NotFound | MeilisearchOpError; +/** Reset displayedAttributes Resets the `displayedAttributes` setting to its default value. */ +export const deletedisplayedAttributes: API.OperationMethod< + DeletedisplayedAttributesRequest, + DeletedisplayedAttributesResponse, + DeletedisplayedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletedisplayedAttributesRequest, + output: DeletedisplayedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletedistinctAttributeError = NotFound | MeilisearchOpError; +/** Reset distinctAttribute Resets the `distinctAttribute` setting to its default value. */ +export const deletedistinctAttribute: API.OperationMethod< + DeletedistinctAttributeRequest, + DeletedistinctAttributeResponse, + DeletedistinctAttributeError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletedistinctAttributeRequest, + output: DeletedistinctAttributeResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteDocumentError = NotFound | MeilisearchOpError; +/** Delete document Delete a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key). */ +export const deleteDocument: API.OperationMethod< + DeleteDocumentRequest, + DeleteDocumentResponse, + DeleteDocumentError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDocumentRequest, + output: DeleteDocumentResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteDocumentsBatchError = NotFound | MeilisearchOpError; +/** Delete documents by batch Delete multiple documents in one request by providing an array of [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) values. */ +export const deleteDocumentsBatch: API.OperationMethod< + DeleteDocumentsBatchRequest, + DeleteDocumentsBatchResponse, + DeleteDocumentsBatchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDocumentsBatchRequest, + output: DeleteDocumentsBatchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteDocumentsByFilterError = NotFound | MeilisearchOpError; +/** Delete documents by filter Delete all documents in the index that match the given filter expression. */ +export const deleteDocumentsByFilter: API.OperationMethod< + DeleteDocumentsByFilterRequest, + DeleteDocumentsByFilterResponse, + DeleteDocumentsByFilterError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDocumentsByFilterRequest, + output: DeleteDocumentsByFilterResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteembeddersError = NotFound | MeilisearchOpError; +/** Reset embedders Resets the `embedders` setting to its default value. */ +export const deleteembedders: API.OperationMethod< + DeleteembeddersRequest, + DeleteembeddersResponse, + DeleteembeddersError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteembeddersRequest, + output: DeleteembeddersResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletefacetingError = NotFound | MeilisearchOpError; +/** Reset faceting Resets the `faceting` setting to its default value. */ +export const deletefaceting: API.OperationMethod< + DeletefacetingRequest, + DeletefacetingResponse, + DeletefacetingError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletefacetingRequest, + output: DeletefacetingResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletefacetSearchError = NotFound | MeilisearchOpError; +/** Reset facetSearch Resets the `facetSearch` setting to its default value. */ +export const deletefacetSearch: API.OperationMethod< + DeletefacetSearchRequest, + DeletefacetSearchResponse, + DeletefacetSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletefacetSearchRequest, + output: DeletefacetSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletefilterableAttributesError = NotFound | MeilisearchOpError; +/** Reset filterableAttributes Resets the `filterableAttributes` setting to its default value. */ +export const deletefilterableAttributes: API.OperationMethod< + DeletefilterableAttributesRequest, + DeletefilterableAttributesResponse, + DeletefilterableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletefilterableAttributesRequest, + output: DeletefilterableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteforeignKeysError = NotFound | MeilisearchOpError; +/** Reset foreignKeys Resets the `foreignKeys` setting to its default value. */ +export const deleteforeignKeys: API.OperationMethod< + DeleteforeignKeysRequest, + DeleteforeignKeysResponse, + DeleteforeignKeysError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteforeignKeysRequest, + output: DeleteforeignKeysResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteIndexError = NotFound | MeilisearchOpError; +/** Delete index Permanently delete an index and all its documents, settings, and task history. */ +export const deleteIndex: API.OperationMethod< + DeleteIndexRequest, + DeleteIndexResponse, + DeleteIndexError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteIndexRequest, + output: DeleteIndexResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletelocalizedAttributesError = NotFound | MeilisearchOpError; +/** Reset localizedAttributes Resets the `localizedAttributes` setting to its default value. */ +export const deletelocalizedAttributes: API.OperationMethod< + DeletelocalizedAttributesRequest, + DeletelocalizedAttributesResponse, + DeletelocalizedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletelocalizedAttributesRequest, + output: DeletelocalizedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletenonSeparatorTokensError = NotFound | MeilisearchOpError; +/** Reset nonSeparatorTokens Resets the `nonSeparatorTokens` setting to its default value. */ +export const deletenonSeparatorTokens: API.OperationMethod< + DeletenonSeparatorTokensRequest, + DeletenonSeparatorTokensResponse, + DeletenonSeparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletenonSeparatorTokensRequest, + output: DeletenonSeparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletepaginationError = NotFound | MeilisearchOpError; +/** Reset pagination Resets the `pagination` setting to its default value. */ +export const deletepagination: API.OperationMethod< + DeletepaginationRequest, + DeletepaginationResponse, + DeletepaginationError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletepaginationRequest, + output: DeletepaginationResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteprefixSearchError = NotFound | MeilisearchOpError; +/** Reset prefixSearch Resets the `prefixSearch` setting to its default value. */ +export const deleteprefixSearch: API.OperationMethod< + DeleteprefixSearchRequest, + DeleteprefixSearchResponse, + DeleteprefixSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteprefixSearchRequest, + output: DeleteprefixSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteproximityPrecisionError = NotFound | MeilisearchOpError; +/** Reset proximityPrecision Resets the `proximityPrecision` setting to its default value. */ +export const deleteproximityPrecision: API.OperationMethod< + DeleteproximityPrecisionRequest, + DeleteproximityPrecisionResponse, + DeleteproximityPrecisionError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteproximityPrecisionRequest, + output: DeleteproximityPrecisionResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleterankingRulesError = NotFound | MeilisearchOpError; +/** Reset rankingRules Resets the `rankingRules` setting to its default value. */ +export const deleterankingRules: API.OperationMethod< + DeleterankingRulesRequest, + DeleterankingRulesResponse, + DeleterankingRulesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleterankingRulesRequest, + output: DeleterankingRulesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteRuleError = MeilisearchOpError; +/** Delete a search rule Delete a search rule by its unique identifier. */ +export const deleteRule: API.OperationMethod< + DeleteRuleRequest, + DeleteRuleResponse, + DeleteRuleError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteRuleRequest, + output: DeleteRuleResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletesearchableAttributesError = NotFound | MeilisearchOpError; +/** Reset searchableAttributes Resets the `searchableAttributes` setting to its default value. */ +export const deletesearchableAttributes: API.OperationMethod< + DeletesearchableAttributesRequest, + DeletesearchableAttributesResponse, + DeletesearchableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletesearchableAttributesRequest, + output: DeletesearchableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletesearchCutoffMsError = NotFound | MeilisearchOpError; +/** Reset searchCutoffMs Resets the `searchCutoffMs` setting to its default value. */ +export const deletesearchCutoffMs: API.OperationMethod< + DeletesearchCutoffMsRequest, + DeletesearchCutoffMsResponse, + DeletesearchCutoffMsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletesearchCutoffMsRequest, + output: DeletesearchCutoffMsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteseparatorTokensError = NotFound | MeilisearchOpError; +/** Reset separatorTokens Resets the `separatorTokens` setting to its default value. */ +export const deleteseparatorTokens: API.OperationMethod< + DeleteseparatorTokensRequest, + DeleteseparatorTokensResponse, + DeleteseparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteseparatorTokensRequest, + output: DeleteseparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletesortableAttributesError = NotFound | MeilisearchOpError; +/** Reset sortableAttributes Resets the `sortableAttributes` setting to its default value. */ +export const deletesortableAttributes: API.OperationMethod< + DeletesortableAttributesRequest, + DeletesortableAttributesResponse, + DeletesortableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletesortableAttributesRequest, + output: DeletesortableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletestopWordsError = NotFound | MeilisearchOpError; +/** Reset stopWords Resets the `stopWords` setting to its default value. */ +export const deletestopWords: API.OperationMethod< + DeletestopWordsRequest, + DeletestopWordsResponse, + DeletestopWordsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletestopWordsRequest, + output: DeletestopWordsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletesynonymsError = NotFound | MeilisearchOpError; +/** Reset synonyms Resets the `synonyms` setting to its default value. */ +export const deletesynonyms: API.OperationMethod< + DeletesynonymsRequest, + DeletesynonymsResponse, + DeletesynonymsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletesynonymsRequest, + output: DeletesynonymsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteTasksError = BadRequest | NotFound | MeilisearchOpError; +/** Delete tasks Permanently delete [tasks](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) matching the given filters. You must provide at least one filter (e.g. `uids`, `indexUids`, `statuses`) to specify which tasks to delete. **Note:** Only finished tasks (`succeeded`, `failed`, or `canceled`) can be deleted. You cannot delete `enqueued` or `processing` tasks. **Note:** Task deletion is atomic — either all matched tasks are deleted or none are. **Note:** Each filter parameter accepts `*` to match all values (e.g., `statuses=*`). */ +export const deleteTasks: API.OperationMethod< + DeleteTasksRequest, + SummarizedTaskView, + DeleteTasksError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTasksRequest, + output: SummarizedTaskView, + errors: [BadRequest, NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeletetypoToleranceError = NotFound | MeilisearchOpError; +/** Reset typoTolerance Resets the `typoTolerance` setting to its default value. */ +export const deletetypoTolerance: API.OperationMethod< + DeletetypoToleranceRequest, + DeletetypoToleranceResponse, + DeletetypoToleranceError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletetypoToleranceRequest, + output: DeletetypoToleranceResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DeleteWebhookError = NotFound | MeilisearchOpError; +/** Delete webhook Permanently remove a webhook by its UUID. The webhook will no longer receive task notifications. */ +export const deleteWebhook: API.OperationMethod< + DeleteWebhookRequest, + DeleteWebhookResponse, + DeleteWebhookError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteWebhookRequest, + output: DeleteWebhookResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type DocumentsByQueryPostError = NotFound | MeilisearchOpError; +/** List documents with POST Retrieve a set of documents with optional filtering, sorting, and pagination. Use the request body to specify filters, sort order, and which fields to return. **Note:** Sending an empty payload (`{}`) returns all documents in the index. **Note:** Documents are not returned following the order of their primary keys. */ +export const documentsByQueryPost: API.OperationMethod< + DocumentsByQueryPostRequest, + PaginationViewValue, + DocumentsByQueryPostError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DocumentsByQueryPostRequest, + output: PaginationViewValue, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type EditDocumentsByFunctionError = NotFound | MeilisearchOpError; +/** Edit documents by function Use a [RHAI function](https://rhai.rs/book/engine/hello-world.html) to edit one or more documents directly in Meilisearch. The function receives each document and returns the modified document. This feature is experimental and must be enabled through the experimental route. */ +export const editDocumentsByFunction: API.OperationMethod< + EditDocumentsByFunctionRequest, + EditDocumentsByFunctionResponse, + EditDocumentsByFunctionError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: EditDocumentsByFunctionRequest, + output: EditDocumentsByFunctionResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ExportError = MeilisearchOpError; +/** Export to a remote Meilisearch Trigger an export that sends documents and settings from this instance to a remote Meilisearch server. Configure the remote URL and optional API key in the request body. */ +export const Export: API.OperationMethod< + ExportRequest, + ExportResponse, + ExportError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ExportRequest, + output: ExportResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetAllError = NotFound | MeilisearchOpError; +/** List all settings Returns all settings of the index. Each setting is returned with its current value or the default if not set. */ +export const getAll: API.OperationMethod< + GetAllRequest, + SettingsUnchecked, + GetAllError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAllRequest, + output: SettingsUnchecked, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetApiKeyError = NotFound | MeilisearchOpError; +/** Get API key Retrieve a single API key by its `uid` or by its `key` value. */ +export const getApiKey: API.OperationMethod< + GetApiKeyRequest, + KeyView, + GetApiKeyError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetApiKeyRequest, + output: KeyView, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetBatchError = NotFound | MeilisearchOpError; +/** Get batch Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. Retrieve a single batch by its unique identifier to monitor its progress and performance. */ +export const getBatch: API.OperationMethod< + GetBatchRequest, + BatchView, + GetBatchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBatchRequest, + output: BatchView, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetBatchesError = MeilisearchOpError; +/** List batches Meilisearch groups compatible tasks ([asynchronous operations](https://www.meilisearch.com/docs/learn/async/asynchronous_operations)) into batches for efficient processing. For example, multiple document additions to the same index may be batched together. List batches to monitor their progress and performance. Batches are always returned in descending order of uid. This means that by default, the most recently created batch objects appear first. Batch results are paginated and can be filtered with query parameters. */ +export const getBatches: API.OperationMethod< + GetBatchesRequest, + AllBatches, + GetBatchesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBatchesRequest, + output: AllBatches, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetBatchesStreamError = MeilisearchOpError; +/** Stream batches changes The `/batches/stream` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on). Batches are sent throught an SSE stream any time their progress or status changes, i.e., enqueued, processing, succeeded, failed. */ +export const getBatchesStream: API.OperationMethod< + GetBatchesStreamRequest, + GetBatchesStreamResponse, + GetBatchesStreamError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBatchesStreamRequest, + output: GetBatchesStreamResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetchatError = NotFound | MeilisearchOpError; +/** Get chat Returns the current value of the `chat` setting for the index. */ +export const getchat: API.OperationMethod< + GetchatRequest, + ChatSettings, + GetchatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetchatRequest, + output: ChatSettings, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetChatError = NotFound | MeilisearchOpError; +/** Get a chat workspace Get the details of a chat workspace by its unique identifier. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const getChat: API.OperationMethod< + GetChatRequest, + GetChatResponse, + GetChatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetChatRequest, + output: GetChatResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetdictionaryError = NotFound | MeilisearchOpError; +/** Get dictionary Returns the current value of the `dictionary` setting for the index. */ +export const getdictionary: API.OperationMethod< + GetdictionaryRequest, + GetdictionaryResponse, + GetdictionaryError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetdictionaryRequest, + output: GetdictionaryResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetdisplayedAttributesError = NotFound | MeilisearchOpError; +/** Get displayedAttributes Returns the current value of the `displayedAttributes` setting for the index. */ +export const getdisplayedAttributes: API.OperationMethod< + GetdisplayedAttributesRequest, + GetdisplayedAttributesResponse, + GetdisplayedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetdisplayedAttributesRequest, + output: GetdisplayedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetdistinctAttributeError = NotFound | MeilisearchOpError; +/** Get distinctAttribute Returns the current value of the `distinctAttribute` setting for the index. */ +export const getdistinctAttribute: API.OperationMethod< + GetdistinctAttributeRequest, + GetdistinctAttributeResponse, + GetdistinctAttributeError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetdistinctAttributeRequest, + output: GetdistinctAttributeResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentError = NotFound | MeilisearchOpError; +/** Get document Retrieve a single document by its [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) value. */ +export const getDocument: API.OperationMethod< + GetDocumentRequest, + GetDocumentResponse, + GetDocumentError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentRequest, + output: GetDocumentResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentsError = NotFound | MeilisearchOpError; +/** List documents with GET Retrieve documents in batches using query parameters for offset, limit, and optional filtering. **Deprecated:** This endpoint will be deprecated in a future release. Use `POST /indexes/{index_uid}/documents/fetch` instead, which supports more parameters and array-based filter expressions. **Note:** Documents are not returned following the order of their primary keys. */ +export const getDocuments: API.OperationMethod< + GetDocumentsRequest, + PaginationViewValue, + GetDocumentsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentsRequest, + output: PaginationViewValue, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetembeddersError = NotFound | MeilisearchOpError; +/** Get embedders Returns the current value of the `embedders` setting for the index. */ +export const getembedders: API.OperationMethod< + GetembeddersRequest, + GetembeddersResponse, + GetembeddersError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetembeddersRequest, + output: GetembeddersResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetfacetingError = NotFound | MeilisearchOpError; +/** Get faceting Returns the current value of the `faceting` setting for the index. */ +export const getfaceting: API.OperationMethod< + GetfacetingRequest, + FacetingSettings, + GetfacetingError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetfacetingRequest, + output: FacetingSettings, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetfacetSearchError = NotFound | MeilisearchOpError; +/** Get facetSearch Returns the current value of the `facetSearch` setting for the index. */ +export const getfacetSearch: API.OperationMethod< + GetfacetSearchRequest, + GetfacetSearchResponse, + GetfacetSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetfacetSearchRequest, + output: GetfacetSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetFeaturesError = MeilisearchOpError; +/** List experimental features Return all experimental features that can be toggled via this API, and whether each one is currently enabled or disabled. */ +export const getFeatures: API.OperationMethod< + GetFeaturesRequest, + RuntimeTogglableFeatures, + GetFeaturesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFeaturesRequest, + output: RuntimeTogglableFeatures, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetfilterableAttributesError = NotFound | MeilisearchOpError; +/** Get filterableAttributes Returns the current value of the `filterableAttributes` setting for the index. */ +export const getfilterableAttributes: API.OperationMethod< + GetfilterableAttributesRequest, + GetfilterableAttributesResponse, + GetfilterableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetfilterableAttributesRequest, + output: GetfilterableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetforeignKeysError = NotFound | MeilisearchOpError; +/** Get foreignKeys Returns the current value of the `foreignKeys` setting for the index. */ +export const getforeignKeys: API.OperationMethod< + GetforeignKeysRequest, + GetforeignKeysResponse, + GetforeignKeysError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetforeignKeysRequest, + output: GetforeignKeysResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetHealthError = MeilisearchOpError; +/** Get health The health check endpoint enables you to periodically test the health of your Meilisearch instance. Returns a simple status indicating that the server is available. The engine will return `available` status with a `200` status code when the instance is healthy. It will return `mustRestart` status with a `500` status code if the instance requires a restart. This restart is required after a compaction of the task queue for example. */ +export const getHealth: API.OperationMethod< + GetHealthRequest, + HealthResponse, + GetHealthError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetHealthRequest, + output: HealthResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetIndexError = NotFound | MeilisearchOpError; +/** Get index Retrieve the metadata of a single index: its uid, [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key), and creation/update timestamps. */ +export const getIndex: API.OperationMethod< + GetIndexRequest, + IndexView, + GetIndexError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetIndexRequest, + output: IndexView, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetIndexStatsError = NotFound | MeilisearchOpError; +/** Get stats of index Return statistics for a single index: document count, database size, indexing status, and field distribution. */ +export const getIndexStats: API.OperationMethod< + GetIndexStatsRequest, + IndexStats, + GetIndexStatsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetIndexStatsRequest, + output: IndexStats, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetlocalizedAttributesError = NotFound | MeilisearchOpError; +/** Get localizedAttributes Returns the current value of the `localizedAttributes` setting for the index. */ +export const getlocalizedAttributes: API.OperationMethod< + GetlocalizedAttributesRequest, + GetlocalizedAttributesResponse, + GetlocalizedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetlocalizedAttributesRequest, + output: GetlocalizedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetLogsError = BadRequest | MeilisearchOpError; +/** Retrieve logs Stream logs over HTTP. The format of the logs depends on the configuration specified in the payload. The logs are sent as multi-part, and the stream never stops, so ensure your client can handle a long-lived connection. To stop receiving logs, call the `DELETE /logs/stream` route. Only one client can listen at a time. An error is returned if you call this route while it is already in use by another client. */ +export const getLogs: API.OperationMethod< + GetLogsRequest, + GetLogsResponse, + GetLogsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetLogsRequest, + output: GetLogsResponse, + errors: [BadRequest, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetMetricsError = MeilisearchOpError; +/** Get Prometheus metrics Return metrics for the engine in Prometheus format. This is an [experimental feature](https://www.meilisearch.com/docs/learn/experimental/overview) and must be enabled before use. */ +export const getMetrics: API.OperationMethod< + GetMetricsRequest, + GetMetricsResponse, + GetMetricsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricsRequest, + output: GetMetricsResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetNetworkError = MeilisearchOpError; +/** Get network topology Return the list of Meilisearch instances currently known to this node (self and remotes). */ +export const getNetwork: API.OperationMethod< + GetNetworkRequest, + Network, + GetNetworkError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNetworkRequest, + output: Network, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetnonSeparatorTokensError = NotFound | MeilisearchOpError; +/** Get nonSeparatorTokens Returns the current value of the `nonSeparatorTokens` setting for the index. */ +export const getnonSeparatorTokens: API.OperationMethod< + GetnonSeparatorTokensRequest, + GetnonSeparatorTokensResponse, + GetnonSeparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetnonSeparatorTokensRequest, + output: GetnonSeparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetpaginationError = NotFound | MeilisearchOpError; +/** Get pagination Returns the current value of the `pagination` setting for the index. */ +export const getpagination: API.OperationMethod< + GetpaginationRequest, + PaginationSettings, + GetpaginationError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetpaginationRequest, + output: PaginationSettings, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetprefixSearchError = NotFound | MeilisearchOpError; +/** Get prefixSearch Returns the current value of the `prefixSearch` setting for the index. */ +export const getprefixSearch: API.OperationMethod< + GetprefixSearchRequest, + GetprefixSearchResponse, + GetprefixSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetprefixSearchRequest, + output: GetprefixSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetproximityPrecisionError = NotFound | MeilisearchOpError; +/** Get proximityPrecision Returns the current value of the `proximityPrecision` setting for the index. */ +export const getproximityPrecision: API.OperationMethod< + GetproximityPrecisionRequest, + GetproximityPrecisionResponse, + GetproximityPrecisionError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetproximityPrecisionRequest, + output: GetproximityPrecisionResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetrankingRulesError = NotFound | MeilisearchOpError; +/** Get rankingRules Returns the current value of the `rankingRules` setting for the index. */ +export const getrankingRules: API.OperationMethod< + GetrankingRulesRequest, + GetrankingRulesResponse, + GetrankingRulesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetrankingRulesRequest, + output: GetrankingRulesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetRuleError = NotFound | MeilisearchOpError; +/** Get a search rule Retrieve a single search rule by its unique identifier. */ +export const getRule: API.OperationMethod< + GetRuleRequest, + DynamicSearchRule, + GetRuleError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetRuleRequest, + output: DynamicSearchRule, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetsearchableAttributesError = NotFound | MeilisearchOpError; +/** Get searchableAttributes Returns the current value of the `searchableAttributes` setting for the index. */ +export const getsearchableAttributes: API.OperationMethod< + GetsearchableAttributesRequest, + GetsearchableAttributesResponse, + GetsearchableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetsearchableAttributesRequest, + output: GetsearchableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetsearchCutoffMsError = NotFound | MeilisearchOpError; +/** Get searchCutoffMs Returns the current value of the `searchCutoffMs` setting for the index. */ +export const getsearchCutoffMs: API.OperationMethod< + GetsearchCutoffMsRequest, + GetsearchCutoffMsResponse, + GetsearchCutoffMsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetsearchCutoffMsRequest, + output: GetsearchCutoffMsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetseparatorTokensError = NotFound | MeilisearchOpError; +/** Get separatorTokens Returns the current value of the `separatorTokens` setting for the index. */ +export const getseparatorTokens: API.OperationMethod< + GetseparatorTokensRequest, + GetseparatorTokensResponse, + GetseparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetseparatorTokensRequest, + output: GetseparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetSettingsError = NotFound | MeilisearchOpError; +/** Get settings of a chat workspace Get the settings of a chat workspace, such as the LLM source, the base prompts, and the search parameters. The API key is never returned. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const getSettings: API.OperationMethod< + GetSettingsRequest, + GetSettingsResponse, + GetSettingsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSettingsRequest, + output: GetSettingsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetsortableAttributesError = NotFound | MeilisearchOpError; +/** Get sortableAttributes Returns the current value of the `sortableAttributes` setting for the index. */ +export const getsortableAttributes: API.OperationMethod< + GetsortableAttributesRequest, + GetsortableAttributesResponse, + GetsortableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetsortableAttributesRequest, + output: GetsortableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetStatsError = MeilisearchOpError; +/** Get stats of all indexes Return statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index. */ +export const getStats: API.OperationMethod< + GetStatsRequest, + Stats, + GetStatsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetStatsRequest, + output: Stats, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetstopWordsError = NotFound | MeilisearchOpError; +/** Get stopWords Returns the current value of the `stopWords` setting for the index. */ +export const getstopWords: API.OperationMethod< + GetstopWordsRequest, + GetstopWordsResponse, + GetstopWordsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetstopWordsRequest, + output: GetstopWordsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetsynonymsError = NotFound | MeilisearchOpError; +/** Get synonyms Returns the current value of the `synonyms` setting for the index. */ +export const getsynonyms: API.OperationMethod< + GetsynonymsRequest, + GetsynonymsResponse, + GetsynonymsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetsynonymsRequest, + output: GetsynonymsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetTaskError = NotFound | MeilisearchOpError; +/** Get task Retrieve a single [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations) by its uid. */ +export const getTask: API.OperationMethod< + GetTaskRequest, + TaskView, + GetTaskError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskRequest, + output: TaskView, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetTaskDocumentsFileError = NotFound | MeilisearchOpError; +/** Get task's document payload Retrieve the document payload that was sent with this [task](https://www.meilisearch.com/docs/learn/async/asynchronous_operations). Only available for document-related tasks that are enqueued or processing. */ +export const getTaskDocumentsFile: API.OperationMethod< + GetTaskDocumentsFileRequest, + GetTaskDocumentsFileResponse, + GetTaskDocumentsFileError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskDocumentsFileRequest, + output: GetTaskDocumentsFileResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetTasksError = MeilisearchOpError; +/** List tasks The `/tasks` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on). Tasks are returned in descending order of uid by default, so the most recently created or updated tasks appear first. Results are paginated and can be filtered using query parameters such as `indexUids`, `statuses`, `types`, and date ranges. */ +export const getTasks: API.OperationMethod< + GetTasksRequest, + AllTasks, + GetTasksError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTasksRequest, + output: AllTasks, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetTasksStreamError = MeilisearchOpError; +/** Stream tasks changes The `/tasks/stream` route returns information about [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html) (indexing, document updates, settings changes, and so on). Tasks are sent throught an SSE stream any time their status changes, i.e., enqueued, processing, succeeded, failed. */ +export const getTasksStream: API.OperationMethod< + GetTasksStreamRequest, + GetTasksStreamResponse, + GetTasksStreamError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTasksStreamRequest, + output: GetTasksStreamResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GettypoToleranceError = NotFound | MeilisearchOpError; +/** Get typoTolerance Returns the current value of the `typoTolerance` setting for the index. */ +export const gettypoTolerance: API.OperationMethod< + GettypoToleranceRequest, + TypoSettings, + GettypoToleranceError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GettypoToleranceRequest, + output: TypoSettings, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetVersionError = MeilisearchOpError; +/** Get version Return the current Meilisearch version, including the commit SHA and build date. */ +export const getVersion: API.OperationMethod< + GetVersionRequest, + VersionResponse, + GetVersionError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetVersionRequest, + output: VersionResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetWebhookError = NotFound | MeilisearchOpError; +/** Get webhook Retrieve a single webhook by its UUID. */ +export const getWebhook: API.OperationMethod< + GetWebhookRequest, + GetWebhookResponse, + GetWebhookError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWebhookRequest, + output: GetWebhookResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type GetWebhooksError = MeilisearchOpError; +/** List webhooks Return all webhooks registered on the instance. Each webhook is returned with its URL, optional headers, and UUID (the key value is never returned). */ +export const getWebhooks: API.OperationMethod< + GetWebhooksRequest, + WebhookResults, + GetWebhooksError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetWebhooksRequest, + output: WebhookResults, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ListApiKeysError = MeilisearchOpError; +/** List API keys Return all API keys configured on the instance. Results are paginated and can be filtered by offset and limit. The key value itself is never returned after creation. **Note:** Expired keys are included in the response but deleted keys are not. Keys are returned in descending order of creation date. */ +export const listApiKeys: API.OperationMethod< + ListApiKeysRequest, + PaginationViewKeyView, + ListApiKeysError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListApiKeysRequest, + output: PaginationViewKeyView, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ListIndexesError = MeilisearchOpError; +/** List all indexes Returns a paginated list of indexes. Use the `offset` and `limit` query parameters to page through results. */ +export const listIndexes: API.OperationMethod< + ListIndexesRequest, + PaginationViewIndexView, + ListIndexesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListIndexesRequest, + output: PaginationViewIndexView, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ListRulesError = MeilisearchOpError; +/** List search rules Return all search rules configured on the instance. */ +export const listRules: API.OperationMethod< + ListRulesRequest, + PaginationViewDynamicSearchRule, + ListRulesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListRulesRequest, + output: PaginationViewDynamicSearchRule, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ListWorkspacesError = MeilisearchOpError; +/** List chat workspaces List all chat workspaces registered on the instance, with pagination. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const listWorkspaces: API.OperationMethod< + ListWorkspacesRequest, + ListWorkspacesResponse, + ListWorkspacesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ListWorkspacesRequest, + output: ListWorkspacesResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type MultiSearchWithPostError = MeilisearchOpError; +/** Perform a multi-search Run multiple search queries in a single API request. Each query can target a different index, so you can search across several indexes at once and get one combined response. **Warning:** If Meilisearch encounters an error processing any query in the request, it immediately stops and returns an error message for the first error encountered. Partial results are not returned. */ +export const multiSearchWithPost: API.OperationMethod< + MultiSearchWithPostRequest, + MultiSearchWithPostResponse, + MultiSearchWithPostError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: MultiSearchWithPostRequest, + output: MultiSearchWithPostResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchApiKeyError = NotFound | MeilisearchOpError; +/** Update API key Update the name and description of an API key. Updates are partial: only the fields you send are changed, and any fields not present in the payload remain unchanged. **Note:** Only `name` and `description` can be updated. The fields `actions`, `indexes`, `expiresAt`, and `uid` cannot be modified after key creation. */ +export const patchApiKey: API.OperationMethod< + PatchApiKeyRequest, + KeyView, + PatchApiKeyError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchApiKeyRequest, + output: KeyView, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchchatError = NotFound | MeilisearchOpError; +/** Update chat Updates the `chat` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const patchchat: API.OperationMethod< + PatchchatRequest, + PatchchatResponse, + PatchchatError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchchatRequest, + output: PatchchatResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchembeddersError = NotFound | MeilisearchOpError; +/** Update embedders Updates the `embedders` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const patchembedders: API.OperationMethod< + PatchembeddersRequest, + PatchembeddersResponse, + PatchembeddersError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchembeddersRequest, + output: PatchembeddersResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchfacetingError = NotFound | MeilisearchOpError; +/** Update faceting Updates the `faceting` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const patchfaceting: API.OperationMethod< + PatchfacetingRequest, + PatchfacetingResponse, + PatchfacetingError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchfacetingRequest, + output: PatchfacetingResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchFeaturesError = MeilisearchOpError; +/** Configure experimental features Enable or disable experimental features at runtime. */ +export const patchFeatures: API.OperationMethod< + PatchFeaturesRequest, + RuntimeTogglableFeatures, + PatchFeaturesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchFeaturesRequest, + output: RuntimeTogglableFeatures, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchNetworkError = MeilisearchOpError; +/** Configure network topology Add or remove remote nodes from the network. Changes apply to the current instance’s view of the cluster. */ +export const patchNetwork: API.OperationMethod< + PatchNetworkRequest, + Network, + PatchNetworkError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchNetworkRequest, + output: Network, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchpaginationError = NotFound | MeilisearchOpError; +/** Update pagination Updates the `pagination` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const patchpagination: API.OperationMethod< + PatchpaginationRequest, + PatchpaginationResponse, + PatchpaginationError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchpaginationRequest, + output: PatchpaginationResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchSettingsError = NotFound | MeilisearchOpError; +/** Update settings of a chat workspace Partially update the settings of a chat workspace, such as the LLM source, the base prompts, and the search parameters. Fields set to `null` are reset to their default value, and missing fields are left unchanged. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const patchSettings: API.OperationMethod< + PatchSettingsRequest, + PatchSettingsResponse, + PatchSettingsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchSettingsRequest, + output: PatchSettingsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchtypoToleranceError = NotFound | MeilisearchOpError; +/** Update typoTolerance Updates the `typoTolerance` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const patchtypoTolerance: API.OperationMethod< + PatchtypoToleranceRequest, + PatchtypoToleranceResponse, + PatchtypoToleranceError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchtypoToleranceRequest, + output: PatchtypoToleranceResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PatchWebhookError = BadRequest | NotFound | MeilisearchOpError; +/** Update webhook Update the URL or headers of an existing webhook identified by its UUID. */ +export const patchWebhook: API.OperationMethod< + PatchWebhookRequest, + PatchWebhookResponse, + PatchWebhookError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PatchWebhookRequest, + output: PatchWebhookResponse, + errors: [BadRequest, NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PostIndexFieldsError = NotFound | MeilisearchOpError; +/** List index fields Returns a paginated list of fields in the index with their metadata: whether they are displayed, searchable, sortable, filterable, distinct, have a custom ranking rule (asc/desc), and for filterable fields the sort order for facet values. */ +export const postIndexFields: API.OperationMethod< + PostIndexFieldsRequest, + PaginationViewField, + PostIndexFieldsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostIndexFieldsRequest, + output: PaginationViewField, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PostNetworkChangeError = MeilisearchOpError; +/** Network control Send messages to control the progress of a network topology change task. The route is mostly used internally when sending a PATCH to the network, but is accessible for manual control as well. */ +export const postNetworkChange: API.OperationMethod< + PostNetworkChangeRequest, + PostNetworkChangeResponse, + PostNetworkChangeError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostNetworkChangeRequest, + output: PostNetworkChangeResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PostWebhookError = BadRequest | MeilisearchOpError; +/** Create webhook Register a new webhook to receive task completion notifications. You can optionally set custom headers (e.g. for authentication) and configure the callback URL. */ +export const postWebhook: API.OperationMethod< + PostWebhookRequest, + PostWebhookResponse, + PostWebhookError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostWebhookRequest, + output: PostWebhookResponse, + errors: [BadRequest, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutdictionaryError = NotFound | MeilisearchOpError; +/** Update dictionary Updates the `dictionary` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putdictionary: API.OperationMethod< + PutdictionaryRequest, + PutdictionaryResponse, + PutdictionaryError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutdictionaryRequest, + output: PutdictionaryResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutdisplayedAttributesError = NotFound | MeilisearchOpError; +/** Update displayedAttributes Updates the `displayedAttributes` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putdisplayedAttributes: API.OperationMethod< + PutdisplayedAttributesRequest, + PutdisplayedAttributesResponse, + PutdisplayedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutdisplayedAttributesRequest, + output: PutdisplayedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutdistinctAttributeError = NotFound | MeilisearchOpError; +/** Update distinctAttribute Updates the `distinctAttribute` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putdistinctAttribute: API.OperationMethod< + PutdistinctAttributeRequest, + PutdistinctAttributeResponse, + PutdistinctAttributeError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutdistinctAttributeRequest, + output: PutdistinctAttributeResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutfacetSearchError = NotFound | MeilisearchOpError; +/** Update facetSearch Updates the `facetSearch` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putfacetSearch: API.OperationMethod< + PutfacetSearchRequest, + PutfacetSearchResponse, + PutfacetSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutfacetSearchRequest, + output: PutfacetSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutfilterableAttributesError = NotFound | MeilisearchOpError; +/** Update filterableAttributes Updates the `filterableAttributes` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putfilterableAttributes: API.OperationMethod< + PutfilterableAttributesRequest, + PutfilterableAttributesResponse, + PutfilterableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutfilterableAttributesRequest, + output: PutfilterableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutforeignKeysError = NotFound | MeilisearchOpError; +/** Update foreignKeys Updates the `foreignKeys` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putforeignKeys: API.OperationMethod< + PutforeignKeysRequest, + PutforeignKeysResponse, + PutforeignKeysError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutforeignKeysRequest, + output: PutforeignKeysResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutlocalizedAttributesError = NotFound | MeilisearchOpError; +/** Update localizedAttributes Updates the `localizedAttributes` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putlocalizedAttributes: API.OperationMethod< + PutlocalizedAttributesRequest, + PutlocalizedAttributesResponse, + PutlocalizedAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutlocalizedAttributesRequest, + output: PutlocalizedAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutnonSeparatorTokensError = NotFound | MeilisearchOpError; +/** Update nonSeparatorTokens Updates the `nonSeparatorTokens` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putnonSeparatorTokens: API.OperationMethod< + PutnonSeparatorTokensRequest, + PutnonSeparatorTokensResponse, + PutnonSeparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutnonSeparatorTokensRequest, + output: PutnonSeparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutprefixSearchError = NotFound | MeilisearchOpError; +/** Update prefixSearch Updates the `prefixSearch` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putprefixSearch: API.OperationMethod< + PutprefixSearchRequest, + PutprefixSearchResponse, + PutprefixSearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutprefixSearchRequest, + output: PutprefixSearchResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutproximityPrecisionError = NotFound | MeilisearchOpError; +/** Update proximityPrecision Updates the `proximityPrecision` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putproximityPrecision: API.OperationMethod< + PutproximityPrecisionRequest, + PutproximityPrecisionResponse, + PutproximityPrecisionError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutproximityPrecisionRequest, + output: PutproximityPrecisionResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutrankingRulesError = NotFound | MeilisearchOpError; +/** Update rankingRules Updates the `rankingRules` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putrankingRules: API.OperationMethod< + PutrankingRulesRequest, + PutrankingRulesResponse, + PutrankingRulesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutrankingRulesRequest, + output: PutrankingRulesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutsearchableAttributesError = NotFound | MeilisearchOpError; +/** Update searchableAttributes Updates the `searchableAttributes` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putsearchableAttributes: API.OperationMethod< + PutsearchableAttributesRequest, + PutsearchableAttributesResponse, + PutsearchableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutsearchableAttributesRequest, + output: PutsearchableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutsearchCutoffMsError = NotFound | MeilisearchOpError; +/** Update searchCutoffMs Updates the `searchCutoffMs` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putsearchCutoffMs: API.OperationMethod< + PutsearchCutoffMsRequest, + PutsearchCutoffMsResponse, + PutsearchCutoffMsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutsearchCutoffMsRequest, + output: PutsearchCutoffMsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutseparatorTokensError = NotFound | MeilisearchOpError; +/** Update separatorTokens Updates the `separatorTokens` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putseparatorTokens: API.OperationMethod< + PutseparatorTokensRequest, + PutseparatorTokensResponse, + PutseparatorTokensError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutseparatorTokensRequest, + output: PutseparatorTokensResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutsortableAttributesError = NotFound | MeilisearchOpError; +/** Update sortableAttributes Updates the `sortableAttributes` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putsortableAttributes: API.OperationMethod< + PutsortableAttributesRequest, + PutsortableAttributesResponse, + PutsortableAttributesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutsortableAttributesRequest, + output: PutsortableAttributesResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutstopWordsError = NotFound | MeilisearchOpError; +/** Update stopWords Updates the `stopWords` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putstopWords: API.OperationMethod< + PutstopWordsRequest, + PutstopWordsResponse, + PutstopWordsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutstopWordsRequest, + output: PutstopWordsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type PutsynonymsError = NotFound | MeilisearchOpError; +/** Update synonyms Updates the `synonyms` setting for the index. Send the new value in the request body; send null to reset to default. */ +export const putsynonyms: API.OperationMethod< + PutsynonymsRequest, + PutsynonymsResponse, + PutsynonymsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutsynonymsRequest, + output: PutsynonymsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type RenderPostError = BadRequest | NotFound | MeilisearchOpError; +/** Render template Render a template, either fetched from the settings of an index (embedder document template, chat document template, indexing or search fragment) or provided inline, by injecting the given input (a document from an index, an inline document, or a search query). Returns the template and the rendered result, allowing to preview how Meilisearch renders templates without indexing any document. This route is only available when the `renderRoute` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const renderPost: API.OperationMethod< + RenderPostRequest, + RenderResult, + RenderPostError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: RenderPostRequest, + output: RenderResult, + errors: [BadRequest, NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ReplaceDocumentsError = NotFound | MeilisearchOpError; +/** Add or replace documents Add a list of documents or replace them if they already exist. If you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed. If the provided index does not exist, it will be created. **Accepted content types:** `application/json`, `application/x-ndjson`, `text/csv`. **Note:** Use the reserved `_geo` object to add geo coordinates: `{"lat": 48.8566, "lng": 2.3522}`. For a partial update see [add or update documents route](/docs/reference/api/documents/add-or-update-documents). */ +export const replaceDocuments: API.OperationMethod< + ReplaceDocumentsRequest, + ReplaceDocumentsResponse, + ReplaceDocumentsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ReplaceDocumentsRequest, + output: ReplaceDocumentsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type ResetSettingsError = NotFound | MeilisearchOpError; +/** Reset the settings of a chat workspace Reset all the settings of a chat workspace to their default value. This route is only available when the `chatCompletions` [experimental feature](https://www.meilisearch.com/docs/resources/help/experimental_features_overview) is enabled. */ +export const resetSettings: API.OperationMethod< + ResetSettingsRequest, + ResetSettingsResponse, + ResetSettingsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: ResetSettingsRequest, + output: ResetSettingsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SearchError = NotFound | MeilisearchOpError; +/** Search for facet values Search for facet values matching a query within a given facet attribute. Use this to build autocomplete or dropdown UIs for facet filters. **Prerequisite:** The `facetName` attribute must be in the index's `filterableAttributes` list. Facet search will not work without this configuration. **Note:** Facet search only considers the first word of `facetQuery`. Searching for `Jane` returns `Jane Austen`, but searching for `Austen` does not. **Note:** Numeric facet values are not searchable. Convert numbers to strings if you need to search them as facets. */ +export const search: API.OperationMethod< + SearchRequest, + FacetSearchResult, + SearchError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SearchRequest, + output: FacetSearchResult, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SearchWithPostError = NotFound | MeilisearchOpError; +/** Search with POST Search for documents matching a query in the given index. > Equivalent to the [search with GET route](/docs/reference/api/search/search-with-get) in the Meilisearch API. **Note:** By default this endpoint returns at most 1000 results. Configure `pagination.maxTotalHits` in index settings to change this limit. */ +export const searchWithPost: API.OperationMethod< + SearchWithPostRequest, + SearchWithPostResponse, + SearchWithPostError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SearchWithPostRequest, + output: SearchWithPostResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SearchWithUrlQueryError = NotFound | MeilisearchOpError; +/** Search with GET Search for documents matching a query in the given index. > Equivalent to the [search with POST route](/docs/reference/api/search/search-with-post) in the Meilisearch API. **Note:** By default this endpoint returns at most 1000 results. Configure `pagination.maxTotalHits` in index settings to change this limit. **Note:** The GET route only accepts string filter expressions. Use the POST route if you need array-of-array filter syntax. */ +export const searchWithUrlQuery: API.OperationMethod< + SearchWithUrlQueryRequest, + SearchWithUrlQueryResponse, + SearchWithUrlQueryError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SearchWithUrlQueryRequest, + output: SearchWithUrlQueryResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SimilarGetError = NotFound | MeilisearchOpError; +/** Get similar documents with GET Retrieve documents similar to a reference document identified by its id. > Useful for “more like this” or recommendations. */ +export const similarGet: API.OperationMethod< + SimilarGetRequest, + SimilarGetResponse, + SimilarGetError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SimilarGetRequest, + output: SimilarGetResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SimilarPostError = NotFound | MeilisearchOpError; +/** Get similar documents with POST Retrieve documents similar to a reference document identified by its id. > Useful for “more like this” or recommendations. */ +export const similarPost: API.OperationMethod< + SimilarPostRequest, + SimilarPostResponse, + SimilarPostError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SimilarPostRequest, + output: SimilarPostResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type SwapIndexesError = MeilisearchOpError; +/** Swap indexes Swap the documents, primary key, settings, and task history of two or more indexes. Indexes are swapped in pairs; a single request can include multiple pairs. The operation is atomic: either all swaps succeed or none do. In the task history, every mention of one index uid is replaced by the other and vice versa. Enqueued tasks are left unmodified. */ +export const swapIndexes: API.OperationMethod< + SwapIndexesRequest, + SwapIndexesResponse, + SwapIndexesError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: SwapIndexesRequest, + output: SwapIndexesResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type UpdateAllError = NotFound | MeilisearchOpError; +/** Update all settings Updates one or more settings for the index. Only the fields sent in the body are changed. Pass null for a setting to reset it to its default. If the index does not exist, it is created. See also: [Configuring index settings on the Cloud](https://www.meilisearch.com/docs/learn/configuration/configuring_index_settings). */ +export const updateAll: API.OperationMethod< + UpdateAllRequest, + UpdateAllResponse, + UpdateAllError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateAllRequest, + output: UpdateAllResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type UpdateDocumentsError = NotFound | MeilisearchOpError; +/** Add or update documents Add a list of documents or update them if they already exist. If you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged. **Important:** Partial updates apply only to top-level fields. Updating an object attribute replaces the entire object, removing any subfields not present in the update. Dot notation in an update request creates a new flat attribute rather than updating an existing nested field. If the provided index does not exist, it will be created. **Accepted content types:** `application/json`, `application/x-ndjson`, `text/csv`. **Note:** Use the reserved `_geo` object to add geo coordinates: `{"lat": 48.8566, "lng": 2.3522}`. To completely overwrite a document, see [add or replace documents route](/docs/reference/api/documents/add-or-replace-documents). */ +export const updateDocuments: API.OperationMethod< + UpdateDocumentsRequest, + UpdateDocumentsResponse, + UpdateDocumentsError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDocumentsRequest, + output: UpdateDocumentsResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type UpdateIndexError = NotFound | MeilisearchOpError; +/** Update index Update the [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) or uid of an index. Returns an error if the index does not exist or if it already contains documents ([primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) cannot be changed in that case). */ +export const updateIndex: API.OperationMethod< + UpdateIndexRequest, + UpdateIndexResponse, + UpdateIndexError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateIndexRequest, + output: UpdateIndexResponse, + errors: [NotFound, UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type UpdateOrCreateRuleError = MeilisearchOpError; +/** Create or update a search rule Partially update a search rule by replacing the provided fields. If the rule doesn't exist, it will be created. */ +export const updateOrCreateRule: API.OperationMethod< + UpdateOrCreateRuleRequest, + UpdateOrCreateRuleResponse, + UpdateOrCreateRuleError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateOrCreateRuleRequest, + output: UpdateOrCreateRuleResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); + +export type UpdateStderrTargetError = MeilisearchOpError; +/** Update target of the console logs Configure at runtime the level of the console logs written to stderr (e.g. debug, info, warn, error). */ +export const updateStderrTarget: API.OperationMethod< + UpdateStderrTargetRequest, + UpdateStderrTargetResponse, + UpdateStderrTargetError, + MeilisearchOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateStderrTargetRequest, + output: UpdateStderrTargetResponse, + errors: [UnknownMeilisearchError], + protocol: MeilisearchProtocol, + retry: Retry.Retry, +})); diff --git a/packages/meilisearch/src/traits.ts b/packages/meilisearch/src/traits.ts new file mode 100644 index 000000000..332d23e1f --- /dev/null +++ b/packages/meilisearch/src/traits.ts @@ -0,0 +1,44 @@ +/** + * Meilisearch SDK trait surface — hand-written. + * + * Re-exports the generic protocol traits from core (so generated operations + * import everything from one place). Meilisearch has no envelope of its own; + * the REST-protocol traits (SensitiveValue / RawResponse) come from + * `core/protocol-rest`. + */ +export { + Body, + Header, + Query, + Label, + Http, + ResponseCode, + HttpBody, + FormDataFile, + KeyDictionary, + UnionCases, + applyErrorMatchers, + getErrorMatchers, + type HttpTrait, + type ErrorMatcher, + bodySymbol, + headerSymbol, + querySymbol, + labelSymbol, + httpSymbol, + responseCodeSymbol, + httpBodySymbol, + formDataFileSymbol, + keyDictionarySymbol, + unionCasesSymbol, + errorMatchersSymbol, +} from "@distilled.cloud/core/trait"; + +export { + SensitiveValue, + RawResponse, + RawResponseRoot, + sensitiveValueSymbol, + rawResponseSymbol, + rawResponseRootSymbol, +} from "@distilled.cloud/core/protocol-rest"; diff --git a/packages/meilisearch/tsconfig.json b/packages/meilisearch/tsconfig.json new file mode 100644 index 000000000..56b16e575 --- /dev/null +++ b/packages/meilisearch/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "outDir": "./lib", + "rootDir": "./src", + "paths": { + "@distilled.cloud/core/*": ["../core/src/*"] + } + }, + "references": [{ "path": "../core" }] +} diff --git a/packages/meilisearch/tsconfig.scripts.json b/packages/meilisearch/tsconfig.scripts.json new file mode 100644 index 000000000..be37c3474 --- /dev/null +++ b/packages/meilisearch/tsconfig.scripts.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["scripts/**/*.ts"], + "compilerOptions": { + "composite": true, + "noEmit": false, + "emitDeclarationOnly": true, + "outDir": "./.scripts-types", + "rootDir": "./scripts", + "tsBuildInfoFile": "./.scripts-types/tsconfig.scripts.tsbuildinfo", + // Resolve @distilled.cloud/core/* to src (the bun condition), matching + // how the scripts actually run under bun. + "rewriteRelativeImportExtensions": false, + "customConditions": ["bun"] + }, + "references": [{ "path": "../core" }] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a5b177f1..0088672fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -389,6 +389,25 @@ importers: specifier: catalog:tooling version: 26.4.0 + packages/meilisearch: + dependencies: + '@distilled.cloud/core': + specifier: workspace:* + version: link:../core + effect: + specifier: catalog:effect + version: 4.0.0-rc.112 + devDependencies: + '@effect/platform-bun': + specifier: catalog:effect + version: 4.0.0-rc.112(effect@4.0.0-rc.112) + '@types/bun': + specifier: catalog:tooling + version: 1.4.0 + '@types/node': + specifier: catalog:tooling + version: 26.4.0 + packages/modal: dependencies: '@distilled.cloud/core': diff --git a/stacks/distilled-submodules/SpecRepos.ts b/stacks/distilled-submodules/SpecRepos.ts index 97e991a7b..a1ecd5de6 100644 --- a/stacks/distilled-submodules/SpecRepos.ts +++ b/stacks/distilled-submodules/SpecRepos.ts @@ -62,6 +62,7 @@ export const SPEC_REPOS: readonly SpecRepo[] = [ { package: "hetzner" }, { package: "huggingface" }, { package: "kubernetes" }, + { package: "meilisearch" }, { package: "mongodb-atlas" }, { package: "modal" }, { package: "neon" }, diff --git a/stacks/distilled-submodules/spec-repos/meilisearch/fetch-specs.ts b/stacks/distilled-submodules/spec-repos/meilisearch/fetch-specs.ts new file mode 100644 index 000000000..74fcb8e0e --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/meilisearch/fetch-specs.ts @@ -0,0 +1,95 @@ +#!/usr/bin/env bun +/** + * Fetches the Meilisearch OpenAPI spec (and a vendor docs snapshot) to + * ../specs/. + * + * Meilisearch publishes ONE OpenAPI 3.1 document — the same file its docs + * site offers for download. There is no git repo required; the mirror + * snapshots the published JSON plus the docs index. + * + * Usage: + * bun run fetch-specs.ts + * + * Specs are saved to: + * ../specs/openapi.json + * ../specs/llms.txt + */ + +const OPENAPI_SPEC_URL = + "https://www.meilisearch.com/docs/assets/open-api/meilisearch-openapi.json"; +const DOCS_INDEX_URL = "https://www.meilisearch.com/docs/llms.txt"; +const SPECS_DIR = "../specs"; +const OPENAPI_PATH = `${SPECS_DIR}/openapi.json`; +const DOCS_INDEX_PATH = `${SPECS_DIR}/llms.txt`; + +import { existsSync, mkdirSync } from "fs"; + +if (!existsSync(SPECS_DIR)) { + mkdirSync(SPECS_DIR, { recursive: true }); +} + +async function fetchJson(url: string): Promise> { + const response = await fetch(url, { + headers: { + accept: "application/json", + "user-agent": "distilled.cloud-meilisearch-spec-mirror", + }, + }); + if (!response.ok) { + throw new Error( + `Failed to fetch ${url}: ${response.status} ${response.statusText}`, + ); + } + return (await response.json()) as Record; +} + +async function fetchText(url: string): Promise { + const response = await fetch(url, { + headers: { + accept: "text/plain, text/markdown, */*", + "user-agent": "distilled.cloud-meilisearch-spec-mirror", + }, + }); + if (!response.ok) { + throw new Error( + `Failed to fetch ${url}: ${response.status} ${response.statusText}`, + ); + } + return await response.text(); +} + +async function main() { + console.log(`Fetching OpenAPI spec from ${OPENAPI_SPEC_URL}...`); + const spec = await fetchJson(OPENAPI_SPEC_URL); + + // Fail here rather than three steps later in the generator: a login page or + // a gutted response is still valid JSON, but it is not an OpenAPI document. + if (typeof spec.openapi !== "string" || spec.paths === undefined) { + throw new Error( + `${OPENAPI_SPEC_URL} returned JSON without \`openapi\`/\`paths\` — not an OpenAPI document`, + ); + } + + console.log(`Writing spec to ${OPENAPI_PATH}...`); + await Bun.write(OPENAPI_PATH, JSON.stringify(spec, null, 2) + "\n"); + + console.log(`Fetching vendor docs index from ${DOCS_INDEX_URL}...`); + const docsIndex = await fetchText(DOCS_INDEX_URL); + if (docsIndex.trim().length === 0) { + throw new Error(`${DOCS_INDEX_URL} returned an empty document`); + } + console.log(`Writing docs index to ${DOCS_INDEX_PATH}...`); + await Bun.write( + DOCS_INDEX_PATH, + docsIndex.endsWith("\n") ? docsIndex : docsIndex + "\n", + ); + + console.log( + `Done! OpenAPI ${spec.openapi} — ${Object.keys(spec.paths as object).length} paths`, + ); +} + +main().catch((err) => { + console.error("Fatal error:", err); + process.exit(1); +}); diff --git a/stacks/distilled-submodules/spec-repos/meilisearch/package.json b/stacks/distilled-submodules/spec-repos/meilisearch/package.json new file mode 100644 index 000000000..0b2eb8944 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/meilisearch/package.json @@ -0,0 +1,27 @@ +{ + "name": "meilisearch-spec", + "private": true, + "type": "module", + "scripts": { + "fetch-specs": "bun run fetch-specs.ts", + "tsc": "tsc --noEmit", + "lint": "oxlint .", + "fmt": "oxfmt --write .", + "fmt:check": "oxfmt --check .", + "check": "bun run tsc && bun run lint && bun run fmt:check" + }, + "workspaces": { + "catalog": { + "@typescript/native-preview": "latest", + "oxfmt": "0.21.0", + "oxlint": "1.36.0" + } + }, + "dependencies": { + "@typescript/native-preview": "catalog:" + }, + "devDependencies": { + "oxfmt": "catalog:", + "oxlint": "catalog:" + } +} diff --git a/stacks/distilled-submodules/spec-repos/meilisearch/readme.md b/stacks/distilled-submodules/spec-repos/meilisearch/readme.md new file mode 100644 index 000000000..6d3d75bda --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/meilisearch/readme.md @@ -0,0 +1,26 @@ +# spec-mirror-meilisearch + +A git mirror of Meilisearch's [OpenAPI spec](https://www.meilisearch.com/docs/assets/open-api/meilisearch-openapi.json). The spec is fetched and committed as a JSON file so the repo serves as a versioned snapshot. + +The mirror is updated every 24 hours and is designed to be used as a stable git submodule. + +## Usage as a submodule + +```sh +git submodule add https://github.com/distilled-mirror/spec-mirror-meilisearch.git +``` + +## Updating specs + +From `.meta/`: + +```sh +bun install +bun run fetch-specs +``` + +--- + +This repository is managed by the `distilled-submodules` Alchemy stack in +[alchemy-run/distilled](https://github.com/alchemy-run/distilled) (`stacks/distilled-submodules`). +Its scaffolding is generated — edit it there, not here. diff --git a/tsconfig.json b/tsconfig.json index 7289e61be..e6b9c81dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,60 +1,176 @@ { "files": [], "references": [ - { "path": "./packages/core/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.json" }, - { "path": "./packages/cloudflare/tsconfig.scripts.json" }, - { "path": "./packages/aws/tsconfig.json" }, - { "path": "./packages/aws/tsconfig.scripts.json" }, - { "path": "./packages/axiom/tsconfig.json" }, - { "path": "./packages/axiom/tsconfig.scripts.json" }, - { "path": "./packages/azure/tsconfig.json" }, - { "path": "./packages/azure/tsconfig.scripts.json" }, - { "path": "./packages/coinbase/tsconfig.json" }, - { "path": "./packages/coinbase/tsconfig.scripts.json" }, - { "path": "./packages/discord/tsconfig.json" }, - { "path": "./packages/discord/tsconfig.scripts.json" }, - { "path": "./packages/expo-eas/tsconfig.json" }, - { "path": "./packages/expo-eas/tsconfig.scripts.json" }, - { "path": "./packages/fly-io/tsconfig.json" }, - { "path": "./packages/fly-io/tsconfig.scripts.json" }, - { "path": "./packages/gcp/tsconfig.json" }, - { "path": "./packages/gcp/tsconfig.scripts.json" }, - { "path": "./packages/github/tsconfig.json" }, - { "path": "./packages/github/tsconfig.scripts.json" }, - { "path": "./packages/hetzner/tsconfig.json" }, - { "path": "./packages/hetzner/tsconfig.scripts.json" }, - { "path": "./packages/huggingface/tsconfig.json" }, - { "path": "./packages/huggingface/tsconfig.scripts.json" }, - { "path": "./packages/kubernetes/tsconfig.json" }, - { "path": "./packages/kubernetes/tsconfig.scripts.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.json" }, - { "path": "./packages/mongodb-atlas/tsconfig.scripts.json" }, - { "path": "./packages/modal/tsconfig.json" }, - { "path": "./packages/modal/tsconfig.scripts.json" }, - { "path": "./packages/neon/tsconfig.json" }, - { "path": "./packages/neon/tsconfig.scripts.json" }, - { "path": "./packages/planetscale/tsconfig.json" }, - { "path": "./packages/planetscale/tsconfig.scripts.json" }, - { "path": "./packages/posthog/tsconfig.json" }, - { "path": "./packages/posthog/tsconfig.scripts.json" }, - { "path": "./packages/prisma-postgres/tsconfig.json" }, - { "path": "./packages/prisma-postgres/tsconfig.scripts.json" }, - { "path": "./packages/railway/tsconfig.json" }, - { "path": "./packages/railway/tsconfig.scripts.json" }, - { "path": "./packages/stripe/tsconfig.json" }, - { "path": "./packages/stripe/tsconfig.scripts.json" }, - { "path": "./packages/supabase/tsconfig.json" }, - { "path": "./packages/supabase/tsconfig.scripts.json" }, - { "path": "./packages/turso/tsconfig.json" }, - { "path": "./packages/turso/tsconfig.scripts.json" }, - { "path": "./packages/typesense/tsconfig.json" }, - { "path": "./packages/typesense/tsconfig.scripts.json" }, - { "path": "./packages/vercel/tsconfig.json" }, - { "path": "./packages/vercel/tsconfig.scripts.json" }, - { "path": "./packages/whop/tsconfig.json" }, - { "path": "./packages/whop/tsconfig.scripts.json" }, - { "path": "./packages/workos/tsconfig.json" }, - { "path": "./packages/workos/tsconfig.scripts.json" } + { + "path": "./packages/core/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.json" + }, + { + "path": "./packages/cloudflare/tsconfig.scripts.json" + }, + { + "path": "./packages/aws/tsconfig.json" + }, + { + "path": "./packages/aws/tsconfig.scripts.json" + }, + { + "path": "./packages/axiom/tsconfig.json" + }, + { + "path": "./packages/axiom/tsconfig.scripts.json" + }, + { + "path": "./packages/azure/tsconfig.json" + }, + { + "path": "./packages/azure/tsconfig.scripts.json" + }, + { + "path": "./packages/coinbase/tsconfig.json" + }, + { + "path": "./packages/coinbase/tsconfig.scripts.json" + }, + { + "path": "./packages/discord/tsconfig.json" + }, + { + "path": "./packages/discord/tsconfig.scripts.json" + }, + { + "path": "./packages/expo-eas/tsconfig.json" + }, + { + "path": "./packages/expo-eas/tsconfig.scripts.json" + }, + { + "path": "./packages/fly-io/tsconfig.json" + }, + { + "path": "./packages/fly-io/tsconfig.scripts.json" + }, + { + "path": "./packages/gcp/tsconfig.json" + }, + { + "path": "./packages/gcp/tsconfig.scripts.json" + }, + { + "path": "./packages/github/tsconfig.json" + }, + { + "path": "./packages/github/tsconfig.scripts.json" + }, + { + "path": "./packages/hetzner/tsconfig.json" + }, + { + "path": "./packages/hetzner/tsconfig.scripts.json" + }, + { + "path": "./packages/huggingface/tsconfig.json" + }, + { + "path": "./packages/huggingface/tsconfig.scripts.json" + }, + { + "path": "./packages/kubernetes/tsconfig.json" + }, + { + "path": "./packages/kubernetes/tsconfig.scripts.json" + }, + { + "path": "./packages/meilisearch/tsconfig.json" + }, + { + "path": "./packages/meilisearch/tsconfig.scripts.json" + }, + { + "path": "./packages/modal/tsconfig.json" + }, + { + "path": "./packages/modal/tsconfig.scripts.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.json" + }, + { + "path": "./packages/mongodb-atlas/tsconfig.scripts.json" + }, + { + "path": "./packages/neon/tsconfig.json" + }, + { + "path": "./packages/neon/tsconfig.scripts.json" + }, + { + "path": "./packages/planetscale/tsconfig.json" + }, + { + "path": "./packages/planetscale/tsconfig.scripts.json" + }, + { + "path": "./packages/posthog/tsconfig.json" + }, + { + "path": "./packages/posthog/tsconfig.scripts.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.json" + }, + { + "path": "./packages/prisma-postgres/tsconfig.scripts.json" + }, + { + "path": "./packages/railway/tsconfig.json" + }, + { + "path": "./packages/railway/tsconfig.scripts.json" + }, + { + "path": "./packages/stripe/tsconfig.json" + }, + { + "path": "./packages/stripe/tsconfig.scripts.json" + }, + { + "path": "./packages/supabase/tsconfig.json" + }, + { + "path": "./packages/supabase/tsconfig.scripts.json" + }, + { + "path": "./packages/turso/tsconfig.json" + }, + { + "path": "./packages/turso/tsconfig.scripts.json" + }, + { + "path": "./packages/typesense/tsconfig.json" + }, + { + "path": "./packages/typesense/tsconfig.scripts.json" + }, + { + "path": "./packages/vercel/tsconfig.json" + }, + { + "path": "./packages/vercel/tsconfig.scripts.json" + }, + { + "path": "./packages/whop/tsconfig.json" + }, + { + "path": "./packages/whop/tsconfig.scripts.json" + }, + { + "path": "./packages/workos/tsconfig.json" + }, + { + "path": "./packages/workos/tsconfig.scripts.json" + } ] }