diff --git a/.gitmodules b/.gitmodules index 979dc33e4..624353372 100644 --- a/.gitmodules +++ b/.gitmodules @@ -283,3 +283,8 @@ url = https://github.com/distilled-mirror/spec-mirror-mercury.git ignore = dirty shallow = true +[submodule "packages/metabase/specs/spec-mirror-metabase"] + path = packages/metabase/specs/spec-mirror-metabase + url = https://github.com/distilled-mirror/spec-mirror-metabase.git + ignore = dirty + shallow = true diff --git a/packages/metabase/.generated-specs/metabase.json b/packages/metabase/.generated-specs/metabase.json new file mode 100644 index 000000000..f8d83c23e --- /dev/null +++ b/packages/metabase/.generated-specs/metabase.json @@ -0,0 +1,46192 @@ +{ + "smithy": "2.0", + "metadata": { + "suppressions": [ + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "UnreferencedShape", + "namespace": "*" + } + ], + "distilled.finalized": true + }, + "shapes": { + "com.metabase.api#GetActionRequest": { + "type": "structure", + "members": { + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "model-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAction": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetActionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/action", + "code": 200 + }, + "smithy.api#documentation": "GET /api/action\n\nReturns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional\n `?model-id=` to limit to actions on a particular model." + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForInsert": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForInsertCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForInsertCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForInsertCase2" + }, + "Case3": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForInsertCase3" + } + }, + "traits": { + "smithy.api#documentation": "Schema for inserting a new Action (REST API or internally)." + } + }, + "com.metabase.api#MetabaseParametersSchemaParameterMappings": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMapping" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterMapping": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashcard": { + "target": "smithy.api#Document" + }, + "parameter_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "target": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "parameter_mapping must be a map with :parameter_id and :target keys" + } + }, + "com.metabase.api#MetabaseLibSchemaParameterTarget": { + "type": "union", + "members": { + "MetabaseLibSchemaParameterDimension": { + "target": "smithy.api#Document" + }, + "MetabaseLibSchemaParameterVariable": { + "target": "com.metabase.api#MetabaseLibSchemaParameterVariable" + }, + "MetabaseLibSchemaParameterTextTag": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTextTag" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterVariable": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterTextTag": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "A :text-tag parameter :target applies to parameterized text cards in viz settings" + } + }, + "com.metabase.api#MetabaseActionsSchemaType": { + "type": "enum", + "members": { + "HTTP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "http" + } + }, + "IMPLICIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "implicit" + } + }, + "QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query" + } + } + }, + "traits": { + "smithy.api#documentation": "Unsupported action type" + } + }, + "com.metabase.api#MetabaseActionsSchemaHttpActionTemplate": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "headers": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "method": { + "target": "com.metabase.api#MetabaseActionsSchemaHttpActionTemplateMethod", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaHttpActionTemplateMethod": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GET" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POST" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PUT" + } + }, + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + }, + "PATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PATCH" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameters": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameter": { + "type": "structure", + "members": { + "filteringParameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterFilteringParametersList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings2", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "sectionId": { + "target": "smithy.api#String" + }, + "values_source_config": { + "target": "com.metabase.api#MetabaseParametersSchemaValuesSourceConfig", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "display-name", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "values_query_type": { + "target": "com.metabase.api#MetabaseParametersSchemaValuesQueryType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaParameterType", + "traits": { + "smithy.api#required": {} + } + }, + "temporal_units": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterTemporalUnitsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "target": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget" + }, + "values_source_type": { + "target": "com.metabase.api#MetabaseParametersSchemaValuesSourceType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "options": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterOptions", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "default": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + }, + "isMultiSelect": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "parameter must be a map with :id and :type keys" + } + }, + "com.metabase.api#MetabaseParametersSchemaParameterFilteringParametersList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterMappingsCase0List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMapping" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterMappingsCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMapping" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterMappings2": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappingsCase0List" + }, + "Case1": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappingsCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaValuesSourceConfig": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer" + }, + "label_field": { + "target": "smithy.api#Document" + }, + "value_field": { + "target": "smithy.api#Document" + }, + "values": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid source_options within a Parameter" + } + }, + "com.metabase.api#MetabaseLibSchemaParameterParameterValue": { + "type": "union", + "members": { + "MetabaseLibSchemaParameterParameterValueScalar": { + "target": "smithy.api#Document" + }, + "Case1": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValueCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterParameterValueCase1List": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaValuesQueryType": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "list" + } + }, + "SEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterType": { + "type": "enum", + "members": { + "NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number" + } + }, + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "boolean" + } + }, + "DATE_SINGLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/single" + } + }, + "ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "id" + } + }, + "CATEGORY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "category" + } + }, + "LOCATION_CITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location/city" + } + }, + "LOCATION_STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location/state" + } + }, + "LOCATION_ZIP_CODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location/zip_code" + } + }, + "LOCATION_COUNTRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location/country" + } + }, + "DATE_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/range" + } + }, + "DATE_MONTH_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/month-year" + } + }, + "DATE_QUARTER_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/quarter-year" + } + }, + "DATE_RELATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/relative" + } + }, + "DATE_ALL_OPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date/all-options" + } + }, + "TEMPORAL_UNIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "temporal-unit" + } + }, + "NUMBER_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number/!=" + } + }, + "NUMBER_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number/<=" + } + }, + "NUMBER_4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number/=" + } + }, + "NUMBER_5": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number/>=" + } + }, + "NUMBER_BETWEEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "number/between" + } + }, + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/!=" + } + }, + "STRING_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/=" + } + }, + "STRING_CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/contains" + } + }, + "STRING_DOES_NOT_CONTAIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/does-not-contain" + } + }, + "STRING_ENDS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/ends-with" + } + }, + "STRING_STARTS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "string/starts-with" + } + }, + "BOOLEAN_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "boolean/=" + } + } + }, + "traits": { + "smithy.api#documentation": "Valid parameter :type" + } + }, + "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit": { + "type": "enum", + "members": { + "DAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day" + } + }, + "DAY_OF_MONTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-month" + } + }, + "DAY_OF_WEEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-week" + } + }, + "DAY_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-year" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "HOUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hour" + } + }, + "HOUR_OF_DAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hour-of-day" + } + }, + "MILLISECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "millisecond" + } + }, + "MINUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minute" + } + }, + "MINUTE_OF_HOUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minute-of-hour" + } + }, + "MONTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "month" + } + }, + "MONTH_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "month-of-year" + } + }, + "QUARTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "quarter" + } + }, + "QUARTER_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "quarter-of-year" + } + }, + "SECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "second" + } + }, + "SECOND_OF_MINUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "second-of-minute" + } + }, + "WEEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "week" + } + }, + "WEEK_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "week-of-year" + } + }, + "YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "year" + } + }, + "YEAR_OF_ERA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "year-of-era" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterTemporalUnitsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaValuesSourceType": { + "type": "enum", + "members": { + "STATIC_LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "static-list" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterParameterOptions": { + "type": "structure", + "members": { + "case_sensitive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "case-sensitive" + } + }, + "include_current": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "include-current" + } + } + }, + "traits": { + "smithy.api#documentation": "Options the frontend attaches to a parameter value." + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForInsertCase0": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "response_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType", + "traits": { + "smithy.api#required": {} + } + }, + "template": { + "target": "com.metabase.api#MetabaseActionsSchemaHttpActionTemplate", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "error_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaImplicitActionKind": { + "type": "enum", + "members": { + "ROW_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "row/create" + } + }, + "ROW_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "row/update" + } + }, + "ROW_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "row/delete" + } + }, + "BULK_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bulk/create" + } + }, + "BULK_UPDATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bulk/update" + } + }, + "BULK_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bulk/delete" + } + } + }, + "traits": { + "smithy.api#documentation": "Unsupported implicit action kind" + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForInsertCase1": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "kind": { + "target": "com.metabase.api#MetabaseActionsSchemaImplicitActionKind", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType", + "traits": { + "smithy.api#required": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery": { + "type": "union", + "members": { + "MetabaseLibBeSchemaEmptyQuery": { + "target": "smithy.api#Document" + }, + "MetabaseLibBeSchemaMaybeLegacyQuery": { + "target": "com.metabase.api#MetabaseLibSchemaQuery" + } + }, + "traits": { + "smithy.api#documentation": "value must be a valid MBQL query, or an empty query." + } + }, + "com.metabase.api#MetabaseLibSchemaQuery": { + "type": "structure", + "members": { + "lib_metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/metadata" + } + }, + "show_column_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-column-totals", + "com.distilled.openapi#nullable": {} + } + }, + "pivot_rows": { + "target": "com.metabase.api#MetabaseLibSchemaQueryPivotRowsList", + "traits": { + "smithy.api#jsonName": "pivot-rows", + "com.distilled.openapi#nullable": {} + } + }, + "update_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "update-row" + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "com.metabase.api#MetabaseLibSchemaSettingsSettings" + }, + "constraints": { + "target": "com.metabase.api#MetabaseLibSchemaConstraintsConstraints" + }, + "info": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfo" + }, + "show_row_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-row-totals", + "com.distilled.openapi#nullable": {} + } + }, + "middleware": { + "target": "com.metabase.api#MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions" + }, + "database": { + "target": "com.metabase.api#MetabaseLibSchemaQueryDatabase" + }, + "pivot_measures": { + "target": "com.metabase.api#MetabaseLibSchemaQueryPivotMeasuresList", + "traits": { + "smithy.api#jsonName": "pivot-measures", + "com.distilled.openapi#nullable": {} + } + }, + "stages": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "pivot_cols": { + "target": "com.metabase.api#MetabaseLibSchemaQueryPivotColsList", + "traits": { + "smithy.api#jsonName": "pivot-cols", + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameters" + }, + "create_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "create-row" + } + }, + "was_pivot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by\n `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query\n results.", + "smithy.api#jsonName": "was-pivot", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaQueryPivotRowsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaActionsRow": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaSettingsSettings": { + "type": "structure", + "members": { + "include_sensitive_fields": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to include fields with visibility_type :sensitive when fetching query metadata.", + "smithy.api#jsonName": "include-sensitive-fields" + } + }, + "report_timezone": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The timezone the query should be ran in, overriding the default report timezone for the instance.", + "smithy.api#jsonName": "report-timezone" + } + } + }, + "traits": { + "smithy.api#documentation": "Options that tweak the behavior of the query processor." + } + }, + "com.metabase.api#MetabaseLibSchemaConstraintsConstraints": { + "type": "structure", + "members": { + "max_results": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of results to allow for a query with aggregations. If `max-results-bare-rows` is unset, this\n applies to all queries", + "smithy.api#jsonName": "max-results" + } + }, + "max_results_bare_rows": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of results to allow for a query with no aggregations. If set, this should be LOWER than\n `:max-results`.", + "smithy.api#jsonName": "max-results-bare-rows" + } + } + }, + "traits": { + "smithy.api#documentation": "Additional constraints added to a query limiting the maximum number of rows that can be returned. Mostly useful\n because native queries don't support the MBQL `:limit` clause. For MBQL queries, if `:limit` is set, it will\n override these values." + } + }, + "com.metabase.api#MetabaseLibSchemaInfoInfo": { + "type": "structure", + "members": { + "query_hash": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "query-hash", + "com.distilled.openapi#nullable": {} + } + }, + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "action-id", + "com.distilled.openapi#nullable": {} + } + }, + "lens_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lens-id", + "com.distilled.openapi#nullable": {} + } + }, + "pivot_original_query": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfoPivotOriginalQueryMap", + "traits": { + "smithy.api#jsonName": "pivot/original-query", + "com.distilled.openapi#nullable": {} + } + }, + "executed_by": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "executed-by", + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "card-id", + "com.distilled.openapi#nullable": {} + } + }, + "pivot_result_metadata": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfoPivotResultMetadata", + "traits": { + "smithy.api#jsonName": "pivot/result-metadata", + "com.distilled.openapi#nullable": {} + } + }, + "transform_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "transform-id", + "com.distilled.openapi#nullable": {} + } + }, + "context": { + "target": "com.metabase.api#MetabaseLibSchemaInfoContext", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "dashboard-id", + "com.distilled.openapi#nullable": {} + } + }, + "lens_params": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfoLensParamsMap", + "traits": { + "smithy.api#jsonName": "lens-params", + "com.distilled.openapi#nullable": {} + } + }, + "metadata_model_metadata": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfoMetadataModelMetadataList", + "traits": { + "smithy.api#jsonName": "metadata/model-metadata", + "com.distilled.openapi#nullable": {} + } + }, + "pulse_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "pulse-id", + "com.distilled.openapi#nullable": {} + } + }, + "card_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "card-name", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for query `:info` dictionary, which is used for informational purposes to record information about how a query\n was executed in QueryExecution and other places. It is considered bad form for middleware to change its behavior\n based on this information, don't do it!\n\n TODO - this schema is somewhat misleading because if you use a function\n like [[metabase.query-processor/userland-query]] some of these keys (e.g. `:context`) are in fact required" + } + }, + "com.metabase.api#MetabaseLibSchemaInfoInfoPivotOriginalQueryMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumn": { + "type": "structure", + "members": { + "visibility_type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnVisibilityType", + "traits": { + "smithy.api#jsonName": "visibility-type", + "com.distilled.openapi#nullable": {} + } + }, + "fk_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "fk-join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "metabase_lib_metadata_result_metadata_field_ref": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/field-ref", + "com.distilled.openapi#nullable": {} + } + }, + "lib_external_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingExternal", + "traits": { + "smithy.api#jsonName": "lib/external-remap", + "com.distilled.openapi#nullable": {} + } + }, + "inherited_temporal_unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "smithy.api#jsonName": "inherited-temporal-unit", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-column-alias", + "com.distilled.openapi#nullable": {} + } + }, + "database_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "database-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_temporal_unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "smithy.api#jsonName": "lib/temporal-unit", + "com.distilled.openapi#nullable": {} + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnSettingsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fingerprint": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprint", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source_uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-uuid", + "com.distilled.openapi#nullable": {} + } + }, + "qp_implicit_field_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/implicit-field?", + "com.distilled.openapi#nullable": {} + } + }, + "lib_ref_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-name", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "effective_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "effective-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_deduplicated_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/deduplicated-name", + "com.distilled.openapi#nullable": {} + } + }, + "base_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "base-type" + } + }, + "lib_transformation_added_base_type": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/transformation-added-base-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "fk_field_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "fk-field-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_from_model_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/from-model?", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "lib_card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "lib/card-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_breakout_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/breakout?", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_effective_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-effective-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "nfc_path": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnNfcPathList", + "traits": { + "smithy.api#jsonName": "nfc-path", + "com.distilled.openapi#nullable": {} + } + }, + "qp_native_sandbox_column_propagate_coercion_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.propagate-coercion?" + } + }, + "has_field_values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnHasFieldValues", + "traits": { + "smithy.api#jsonName": "has-field-values", + "com.distilled.openapi#nullable": {} + } + }, + "lib_internal_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternal", + "traits": { + "smithy.api#jsonName": "lib/internal-remap", + "com.distilled.openapi#nullable": {} + } + }, + "selected_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "selected?" + } + }, + "fk_field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "fk-field-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_binning": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinning", + "traits": { + "smithy.api#jsonName": "lib/original-binning", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "qp_native_sandbox_column_force_coercion_strategy": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.force-coercion-strategy" + } + }, + "lib_binning": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinning", + "traits": { + "smithy.api#jsonName": "lib/binning", + "com.distilled.openapi#nullable": {} + } + }, + "metabase_lib_metadata_result_metadata_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnLegacySource", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/source", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnSource", + "traits": { + "smithy.api#jsonName": "lib/source", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean" + }, + "lib_ref_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-name", + "com.distilled.openapi#nullable": {} + } + }, + "semantic_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "semantic-type", + "com.distilled.openapi#nullable": {} + } + }, + "fk_target_field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "fk-target-field-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_simple_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/simple-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_desired_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/desired-column-alias", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnVisibilityType": { + "type": "enum", + "members": { + "RETIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retired" + } + }, + "SENSITIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sensitive" + } + }, + "NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "normal" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + }, + "DETAILS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "details-only" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingExternal": { + "type": "structure", + "members": { + "field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "field-id" + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "lib/type" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "External remapping (Dimension) for a column. From the [[metabase.warehouse-schema.models.dimension]] with `type =\n external` associated with a `Field` in the application database.\n See [[metabase.query-processor.middleware.add-remaps]] for what this means." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnSettingsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprint": { + "type": "structure", + "members": { + "experimental": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap" + }, + "global": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintGlobal" + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific" + } + }, + "traits": { + "smithy.api#documentation": "Schema for a Field 'fingerprint' generated as part of the analysis stage. Used to power the 'classification'\n sub-stage of analysis. Stored as the `fingerprint` column of Field." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintGlobal": { + "type": "structure", + "members": { + "distinct_count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "distinct-count" + } + }, + "nil_": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "nil%", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Fingerprint values that Fields of all types should have." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific": { + "type": "structure", + "members": { + "type_DateTime": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintTemporal", + "traits": { + "smithy.api#jsonName": "type/DateTime" + } + }, + "type_Number": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintNumber", + "traits": { + "smithy.api#jsonName": "type/Number" + } + }, + "type_Text": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintText", + "traits": { + "smithy.api#jsonName": "type/Text" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for type-specific fingerprint information." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintTemporal": { + "type": "structure", + "members": { + "earliest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "latest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "mode_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "mode-fraction", + "com.distilled.openapi#nullable": {} + } + }, + "top_3_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "top-3-fraction", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for fingerprint information for Fields deriving from `:type/Temporal`." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintNumber": { + "type": "structure", + "members": { + "mode_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "mode-fraction", + "com.distilled.openapi#nullable": {} + } + }, + "min": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "q1": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "max": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "avg": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "sd": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "skewness": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "q3": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "top_3_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "top-3-fraction", + "com.distilled.openapi#nullable": {} + } + }, + "excess_kurtosis": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "excess-kurtosis", + "com.distilled.openapi#nullable": {} + } + }, + "zero_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "zero-fraction", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for fingerprint information for Fields deriving from `:type/Number`." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprintText": { + "type": "structure", + "members": { + "average_length": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "average-length", + "com.distilled.openapi#nullable": {} + } + }, + "mode_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "mode-fraction", + "com.distilled.openapi#nullable": {} + } + }, + "percent_blank": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "percent-blank", + "com.distilled.openapi#nullable": {} + } + }, + "percent_email": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "percent-email", + "com.distilled.openapi#nullable": {} + } + }, + "percent_json": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "percent-json", + "com.distilled.openapi#nullable": {} + } + }, + "percent_state": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "percent-state", + "com.distilled.openapi#nullable": {} + } + }, + "percent_url": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "percent-url", + "com.distilled.openapi#nullable": {} + } + }, + "top_3_fraction": { + "target": "smithy.api#Double", + "traits": { + "smithy.api#jsonName": "top-3-fraction", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for fingerprint information for Fields deriving from `:type/Text`." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnNfcPathList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnHasFieldValues": { + "type": "enum", + "members": { + "AUTO_LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "auto-list" + } + }, + "LIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "list" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "SEARCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternal": { + "type": "structure", + "members": { + "human_readable_values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "human-readable-values" + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "lib/type" + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternalValuesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Internal remapping (FieldValues) for a column. From [[metabase.warehouse-schema.models.dimension]] with `type =\n internal` and the [[metabase.warehouse-schema.models.field-values]] associated with a `Field` in the application\n database. See [[metabase.query-processor.middleware.add-remaps]] for what this means." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternalValuesList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaBinningBinning": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinningCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinningCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinningCase2" + } + }, + "traits": { + "smithy.api#documentation": "Schema for `:binning` options passed to a `:field` clause." + } + }, + "com.metabase.api#MetabaseLibSchemaBinningBinningCase0": { + "type": "structure", + "members": { + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaBinningBinningCase1": { + "type": "structure", + "members": { + "bin_width": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "bin-width" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaBinningBinningCase2": { + "type": "structure", + "members": { + "num_bins": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "num-bins" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnLegacySource": { + "type": "enum", + "members": { + "AGGREGATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aggregation" + } + }, + "FIELDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fields" + } + }, + "BREAKOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "breakout" + } + }, + "NATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "native" + } + } + }, + "traits": { + "smithy.api#documentation": "Possible values for `column.source` -- this is added by [[metabase.lib.metadata.result-metadata]] for historical\n reasons (it is used in a few places in the FE). DO NOT use this in the backend for any purpose, use `:lib/source`\n instead." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataColumnSource": { + "type": "enum", + "members": { + "SOURCE_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/card" + } + }, + "SOURCE_NATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/native" + } + }, + "SOURCE_PREVIOUS_STAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/previous-stage" + } + }, + "SOURCE_TABLE_DEFAULTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/table-defaults" + } + }, + "SOURCE_AGGREGATIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/aggregations" + } + }, + "SOURCE_JOINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/joins" + } + }, + "SOURCE_EXPRESSIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/expressions" + } + }, + "SOURCE_IMPLICITLY_JOINABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source/implicitly-joinable" + } + } + }, + "traits": { + "smithy.api#documentation": "`:lib/source` -- where a column came from with respect to the current stage.\n\n Traditionally, `:lib/source` meant something slightly different -- it denoted what part of the current stage a\n column came from, and thus included two additional options -- `:source/fields`, for columns used by `:fields`, and\n `:source/breakouts`, for columns used in `:breakout`. This was not really useful information and made `:lib/source`\n itself useless for determining if a column was 'inherited' or not (i.e., whether it came from a previous stage,\n source card, or a join, and should get field name refs instead of field ID refs --\n see [[metabase.lib.field.util/inherited-column?]])." + } + }, + "com.metabase.api#MetabaseLibSchemaInfoInfoPivotResultMetadataCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumn" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaInfoInfoPivotResultMetadata": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Document" + }, + "Case1": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfoPivotResultMetadataCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaInfoContext": { + "type": "enum", + "members": { + "ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "action" + } + }, + "AD_HOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ad-hoc" + } + }, + "AGENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "agent" + } + }, + "CACHE_REFRESH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cache-refresh" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MAP_TILES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "map-tiles" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "PULSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pulse" + } + }, + "DASHBOARD_SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard-subscription" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "CSV_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv-download" + } + }, + "XLSX_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx-download" + } + }, + "JSON_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json-download" + } + }, + "PUBLIC_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-dashboard" + } + }, + "PUBLIC_QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-question" + } + }, + "PUBLIC_CSV_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-csv-download" + } + }, + "PUBLIC_XLSX_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-xlsx-download" + } + }, + "PUBLIC_JSON_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-json-download" + } + }, + "EMBEDDED_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedded-dashboard" + } + }, + "EMBEDDED_QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedded-question" + } + }, + "EMBEDDED_CSV_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedded-csv-download" + } + }, + "EMBEDDED_XLSX_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedded-xlsx-download" + } + }, + "EMBEDDED_JSON_DOWNLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedded-json-download" + } + }, + "TABLE_GRID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table-grid" + } + }, + "TABLE_ROWS_SAMPLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table-rows-sample" + } + }, + "TRANSFORM_INSPECTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform-inspector" + } + }, + "SLACKBOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "slackbot" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for `info.context`; used for informational purposes to record how a query was executed." + } + }, + "com.metabase.api#MetabaseLibSchemaInfoInfoLensParamsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumn": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0" + }, + "MetabaseLegacyMbqlSchemaLegacyColumnMetadata": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadata" + } + }, + "traits": { + "smithy.api#documentation": "Schema for the maps in card `:result-metadata` and similar. These can be either\n `:metabase.lib.schema.metadata/result-metadata` (i.e., kebab-cased) maps, or map snake_cased as returned by QP\n metadata, but they should NOT be a mixture of both -- if we mixed them somehow there is a bug in our code." + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0": { + "type": "structure", + "members": { + "visibility_type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnVisibilityType", + "traits": { + "smithy.api#jsonName": "visibility-type", + "com.distilled.openapi#nullable": {} + } + }, + "fk_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "fk-join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "metabase_lib_metadata_result_metadata_field_ref": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/field-ref", + "com.distilled.openapi#nullable": {} + } + }, + "lib_external_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingExternal", + "traits": { + "smithy.api#jsonName": "lib/external-remap", + "com.distilled.openapi#nullable": {} + } + }, + "inherited_temporal_unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "smithy.api#jsonName": "inherited-temporal-unit", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-column-alias", + "com.distilled.openapi#nullable": {} + } + }, + "database_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "database-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_temporal_unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "smithy.api#jsonName": "lib/temporal-unit", + "com.distilled.openapi#nullable": {} + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fingerprint": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprint", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source_uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-uuid", + "com.distilled.openapi#nullable": {} + } + }, + "qp_implicit_field_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/implicit-field?", + "com.distilled.openapi#nullable": {} + } + }, + "lib_ref_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-name", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "effective_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "effective-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_deduplicated_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/deduplicated-name", + "com.distilled.openapi#nullable": {} + } + }, + "base_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "base-type" + } + }, + "lib_transformation_added_base_type": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/transformation-added-base-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "fk_field_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "fk-field-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_from_model_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/from-model?", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "lib_card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "lib/card-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_breakout_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/breakout?", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_effective_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-effective-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "nfc_path": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList", + "traits": { + "smithy.api#jsonName": "nfc-path", + "com.distilled.openapi#nullable": {} + } + }, + "qp_native_sandbox_column_propagate_coercion_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.propagate-coercion?" + } + }, + "has_field_values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnHasFieldValues", + "traits": { + "smithy.api#jsonName": "has-field-values", + "com.distilled.openapi#nullable": {} + } + }, + "lib_internal_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternal", + "traits": { + "smithy.api#jsonName": "lib/internal-remap", + "com.distilled.openapi#nullable": {} + } + }, + "selected_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "selected?" + } + }, + "fk_field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "fk-field-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_binning": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinning", + "traits": { + "smithy.api#jsonName": "lib/original-binning", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "qp_native_sandbox_column_force_coercion_strategy": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.force-coercion-strategy" + } + }, + "lib_binning": { + "target": "com.metabase.api#MetabaseLibSchemaBinningBinning", + "traits": { + "smithy.api#jsonName": "lib/binning", + "com.distilled.openapi#nullable": {} + } + }, + "metabase_lib_metadata_result_metadata_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnLegacySource", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/source", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnSource", + "traits": { + "smithy.api#jsonName": "lib/source", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean" + }, + "lib_ref_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-name", + "com.distilled.openapi#nullable": {} + } + }, + "semantic_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "semantic-type", + "com.distilled.openapi#nullable": {} + } + }, + "fk_target_field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "fk-target-field-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_simple_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/simple-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_desired_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/desired-column-alias", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions." + } + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadata": { + "type": "structure", + "members": { + "metabase_lib_metadata_result_metadata_field_ref": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/field-ref", + "com.distilled.openapi#nullable": {} + } + }, + "field_ref": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_external_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingExternal", + "traits": { + "smithy.api#jsonName": "lib/external-remap", + "com.distilled.openapi#nullable": {} + } + }, + "lib_source_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-column-alias", + "com.distilled.openapi#nullable": {} + } + }, + "remapped_from": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_temporal_unit": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit", + "traits": { + "smithy.api#jsonName": "lib/temporal-unit", + "com.distilled.openapi#nullable": {} + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fingerprint": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataFingerprintFingerprint", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visibility_type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnVisibilityType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "base_type": { + "target": "smithy.api#String" + }, + "lib_source_uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/source-uuid", + "com.distilled.openapi#nullable": {} + } + }, + "qp_implicit_field_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/implicit-field?", + "com.distilled.openapi#nullable": {} + } + }, + "lib_ref_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-name", + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_deduplicated_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name.", + "smithy.api#jsonName": "lib/deduplicated-name", + "com.distilled.openapi#nullable": {} + } + }, + "coercion_strategy": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_transformation_added_base_type": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/transformation-added-base-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_from_model_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/from-model?", + "com.distilled.openapi#nullable": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "lib_card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "lib/card-id", + "com.distilled.openapi#nullable": {} + } + }, + "lib_expression_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/expression-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_breakout_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "lib/breakout?", + "com.distilled.openapi#nullable": {} + } + }, + "semantic_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fk_field_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_effective_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-effective-type", + "com.distilled.openapi#nullable": {} + } + }, + "lib_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "table_id": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaSourceTable", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_field_values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnHasFieldValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "qp_native_sandbox_column_propagate_coercion_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.propagate-coercion?" + } + }, + "lib_internal_remap": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnRemappingInternal", + "traits": { + "smithy.api#jsonName": "lib/internal-remap", + "com.distilled.openapi#nullable": {} + } + }, + "converted_timezone": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "selected_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "selected?" + } + }, + "fk_join_alias": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnLegacySource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fk_field_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "remapped_to": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "binning_info": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "nfc_path": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_binning": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning", + "traits": { + "smithy.api#jsonName": "lib/original-binning", + "com.distilled.openapi#nullable": {} + } + }, + "effective_type": { + "target": "smithy.api#String" + }, + "lib_original_join_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-join-alias", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/original-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "qp_native_sandbox_column_force_coercion_strategy": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "qp/native-sandbox-column.force-coercion-strategy" + } + }, + "lib_binning": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning", + "traits": { + "smithy.api#jsonName": "lib/binning", + "com.distilled.openapi#nullable": {} + } + }, + "metabase_lib_metadata_result_metadata_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnLegacySource", + "traits": { + "smithy.api#jsonName": "metabase.lib.metadata.result-metadata/source", + "com.distilled.openapi#nullable": {} + } + }, + "inherited_temporal_unit": { + "target": "com.metabase.api#MetabaseLibSchemaTemporalBucketingUnit", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_source": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnSource", + "traits": { + "smithy.api#jsonName": "lib/source", + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean" + }, + "lib_ref_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/ref-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "lib_original_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names.", + "smithy.api#jsonName": "lib/original-name", + "com.distilled.openapi#nullable": {} + } + }, + "database_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_simple_display_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/simple-display-name", + "com.distilled.openapi#nullable": {} + } + }, + "fk_target_field_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "lib_desired_column_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "lib/desired-column-alias", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for a single legacy metadata column. This is the pre-Lib equivalent of\n `:metabase.lib.schema.metadata/column`." + } + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit": { + "type": "enum", + "members": { + "DAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day" + } + }, + "DAY_OF_MONTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-month" + } + }, + "DAY_OF_WEEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-week" + } + }, + "DAY_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "day-of-year" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "HOUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hour" + } + }, + "HOUR_OF_DAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hour-of-day" + } + }, + "MILLISECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "millisecond" + } + }, + "MINUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minute" + } + }, + "MINUTE_OF_HOUR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minute-of-hour" + } + }, + "MONTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "month" + } + }, + "MONTH_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "month-of-year" + } + }, + "QUARTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "quarter" + } + }, + "QUARTER_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "quarter-of-year" + } + }, + "SECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "second" + } + }, + "SECOND_OF_MINUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "second-of-minute" + } + }, + "WEEK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "week" + } + }, + "WEEK_OF_YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "week-of-year" + } + }, + "YEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "year" + } + }, + "YEAR_OF_ERA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "year-of-era" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaSourceTable": { + "type": "union", + "members": { + "MetabaseLibSchemaIdTable": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Schema for a valid value for the `:source-table` clause of an MBQL query." + } + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo": { + "type": "structure", + "members": { + "bin_width": { + "target": "smithy.api#Document" + }, + "binning_strategy": { + "target": "com.metabase.api#MetabaseLibSchemaBinningStrategy" + }, + "num_bins": { + "target": "smithy.api#Integer" + }, + "strategy": { + "target": "com.metabase.api#MetabaseLibSchemaBinningStrategy", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaBinningStrategy": { + "type": "enum", + "members": { + "BIN_WIDTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bin-width" + } + }, + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "NUM_BINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "num-bins" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase0": { + "type": "structure", + "members": { + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase1": { + "type": "structure", + "members": { + "bin_width": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "bin-width" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase2": { + "type": "structure", + "members": { + "num_bins": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "num-bins" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase2" + } + }, + "traits": { + "smithy.api#documentation": "Schema for `:binning` options passed to a `:field` clause." + } + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase0": { + "type": "structure", + "members": { + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase1": { + "type": "structure", + "members": { + "bin_width": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "bin-width" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase2": { + "type": "structure", + "members": { + "num_bins": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "num-bins" + } + }, + "strategy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase2" + } + }, + "traits": { + "smithy.api#documentation": "Schema for `:binning` options passed to a `:field` clause." + } + }, + "com.metabase.api#MetabaseLibSchemaInfoInfoMetadataModelMetadataList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumn" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions": { + "type": "structure", + "members": { + "process_viz_settings_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to process a question's visualization settings and include them in the result metadata so that they can\n incorporated into an export. Used by `metabase.query-processor.middleware.visualization-settings`; default\n `false`.", + "smithy.api#jsonName": "process-viz-settings?", + "com.distilled.openapi#nullable": {} + } + }, + "skip_results_metadata_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Should we skip adding `results_metadata` to query results after running the query? Used by\n `metabase.query-processor.middleware.results-metadata`; default `false`. (Note: we may change the name of this\n column in the near future, to `result_metadata`, to fix inconsistencies in how we name things.)", + "smithy.api#jsonName": "skip-results-metadata?" + } + }, + "add_default_userland_constraints_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to add some default `max-results` and `max-results-bare-rows` constraints. By default, none are added,\n although the functions that ultimately power most API endpoints tend to set this to `true`. See\n `add-constraints` middleware for more details.", + "smithy.api#jsonName": "add-default-userland-constraints?", + "com.distilled.openapi#nullable": {} + } + }, + "disable_max_results_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Disable applying a default limit on the query results. Handled in the `add-default-limit` middleware. If true,\n this will override the `:max-results` and `:max-results-bare-rows` values in `Constraints`.", + "smithy.api#jsonName": "disable-max-results?" + } + }, + "ignore_cached_results_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to ignore any cached results and re-run the query. Used by the query results cache middleware; default\n `false`.", + "smithy.api#jsonName": "ignore-cached-results?", + "com.distilled.openapi#nullable": {} + } + }, + "format_rows_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Should we skip converting datetime types to ISO-8601 strings with appropriate timezone when post-processing\n results? Used by `metabase.query-processor.middleware.format-rows`default `false`.", + "smithy.api#jsonName": "format-rows?" + } + }, + "js_int_to_string_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether to convert bigint values in results to strings so that they can be parsed losslessly by JavaScript\n clients. Used by `metabase.query-processor.middleware.large-int`; default `false`.", + "smithy.api#jsonName": "js-int-to-string?", + "com.distilled.openapi#nullable": {} + } + }, + "disable_mbql__native_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Disable the MBQL->native middleware. If you do this, the query will not work at all, so there are no cases where\n you should set this yourself. This is only used by the `metabase.query-processor.preprocess/preprocess` function to\n get the fully pre-processed query without attempting to convert it to native.", + "smithy.api#jsonName": "disable-mbql->native?" + } + }, + "userland_query_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Userland queries are ones ran as a result of an API call, Pulse, or the like. Special handling is done in\n certain userland-only middleware for such queries -- results are returned in a slightly different format, and\n QueryExecution entries are normally saved, unless you pass `:no-save` as the option.", + "smithy.api#jsonName": "userland-query?", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Additional options that can be used to toggle middleware on or off." + } + }, + "com.metabase.api#MetabaseLibSchemaQueryDatabase": { + "type": "union", + "members": { + "MetabaseLibSchemaIdSavedQuestionsVirtualDatabase": { + "target": "smithy.api#Document" + }, + "MetabaseLibSchemaIdDatabase": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaQueryPivotMeasuresList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaQueryPivotColsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaParameterParameters": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameter" + }, + "traits": { + "smithy.api#documentation": "Schema for a list of `:parameters` as passed in to a query." + } + }, + "com.metabase.api#MetabaseLibSchemaParameterParameter": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String" + }, + "name": { + "target": "smithy.api#String" + }, + "slug": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + }, + "required": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaParameterType", + "traits": { + "smithy.api#required": {} + } + }, + "target": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget" + }, + "options": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterOptions", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "default": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + } + }, + "traits": { + "smithy.api#documentation": "parameter must be a map with a :type key" + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForInsertCase2": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType", + "traits": { + "smithy.api#required": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaActionForInsertCase3": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "response_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "kind": { + "target": "com.metabase.api#MetabaseActionsSchemaImplicitActionKind", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType", + "traits": { + "smithy.api#required": {} + } + }, + "template": { + "target": "com.metabase.api#MetabaseActionsSchemaHttpActionTemplate", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "error_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateActionRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForInsert", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAction": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateActionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/action", + "code": 200 + }, + "smithy.api#documentation": "POST /api/action\n\nCreate a new action." + } + }, + "com.metabase.api#GetAction2": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/action/public", + "code": 200 + }, + "smithy.api#documentation": "GET /api/action/public\n\nFetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled." + } + }, + "com.metabase.api#GetActionByActionIdRequest": { + "type": "structure", + "members": { + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetActionByActionId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetActionByActionIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/action/{action_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/action/{action-id}\n\nFetch an Action." + } + }, + "com.metabase.api#DeleteActionRequest": { + "type": "structure", + "members": { + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteAction": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteActionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/action/{action_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/action/{action-id}\n\nDelete an Action." + } + }, + "com.metabase.api#MetabaseActionsSchemaPrefetchParameterValues": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "value must be a JSON object mapping parameter ids to scalar values." + } + }, + "com.metabase.api#GetActionExecuteRequest": { + "type": "structure", + "members": { + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaPrefetchParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetActionExecute": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetActionExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/action/{action_id}/execute", + "code": 200 + }, + "smithy.api#documentation": "GET /api/action/{action-id}/execute\n\nFetches the values for filling in execution parameters. Pass PK parameters and values to select." + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForUpdate": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase2" + }, + "Case3": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase3" + } + }, + "traits": { + "smithy.api#documentation": "Schema for updating an Action (REST API or internally)." + } + }, + "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase0": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "response_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String" + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType" + }, + "template": { + "target": "com.metabase.api#MetabaseActionsSchemaHttpActionTemplate", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "error_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model_id": { + "target": "smithy.api#Integer" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase1": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String" + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "kind": { + "target": "com.metabase.api#MetabaseActionsSchemaImplicitActionKind", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType" + }, + "model_id": { + "target": "smithy.api#Integer" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase2": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String" + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType" + }, + "model_id": { + "target": "smithy.api#Integer" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsSchemaActionForUpdateCase3": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "response_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String" + }, + "archived": { + "target": "smithy.api#Boolean" + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "kind": { + "target": "com.metabase.api#MetabaseActionsSchemaImplicitActionKind", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseActionsSchemaType" + }, + "template": { + "target": "com.metabase.api#MetabaseActionsSchemaHttpActionTemplate", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "error_handle": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model_id": { + "target": "smithy.api#Integer" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutActionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "body": { + "target": "com.metabase.api#MetabaseActionsSchemaActionForUpdate", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutAction": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutActionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/action/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/action/{id}\n\nUpdate an Action." + } + }, + "com.metabase.api#MetabaseActionsSchemaExecuteParameterValues": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "value must map parameter ids to scalar values." + } + }, + "com.metabase.api#CreateActionExecuteRequestBody": { + "type": "structure", + "members": { + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaExecuteParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateActionExecuteRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "body": { + "target": "com.metabase.api#CreateActionExecuteRequestBody", + "traits": { + "smithy.api#httpPayload": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateActionExecute": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateActionExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/action/{id}/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/action/{id}/execute\n\nExecute the Action.\n\n `parameters` should be the mapped dashboard parameters with values." + } + }, + "com.metabase.api#CreateActionPublicLinkRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateActionPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateActionPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/action/{id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "POST /api/action/{id}/public_link\n\nGenerate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this\n Action has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled." + } + }, + "com.metabase.api#DeleteActionPublicLinkRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteActionPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteActionPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/action/{id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/action/{id}/public_link\n\nDelete the publicly-accessible link to this Dashboard." + } + }, + "com.metabase.api#GetActivityMostRecentlyViewedDashboard": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/activity/most_recently_viewed_dashboard", + "code": 200 + }, + "smithy.api#documentation": "GET /api/activity/most_recently_viewed_dashboard\n\nGet the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards\n in the last 24 hours." + } + }, + "com.metabase.api#GetActivityPopularItems": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/activity/popular_items", + "code": 200 + }, + "smithy.api#documentation": "GET /api/activity/popular_items\n\nGet the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything\n archived, deleted, etc it can usually still get 5." + } + }, + "com.metabase.api#GetActivityRecentsRequestContextItem": { + "type": "enum", + "members": { + "SELECTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "selections" + } + }, + "VIEWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "views" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetActivityRecentsRequestContextList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetActivityRecentsRequestContextItem" + }, + "traits": {} + }, + "com.metabase.api#GetActivityRecentsRequest": { + "type": "structure", + "members": { + "context": { + "target": "com.metabase.api#GetActivityRecentsRequestContextList", + "traits": { + "smithy.api#httpQuery": "context", + "smithy.api#required": {} + } + }, + "include_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_metadata" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetActivityRecents": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetActivityRecentsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/activity/recents", + "code": 200 + }, + "smithy.api#documentation": "GET /api/activity/recents\n\nGet a list of recent items the current user has been viewing most recently under the `:recents` key.\n Allows for filtering by context: views or selections" + } + }, + "com.metabase.api#CreateActivityRecentRequestContext": { + "type": "enum", + "members": { + "SELECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "selection" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateActivityRecentRequestModel": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateActivityRecentRequest": { + "type": "structure", + "members": { + "context": { + "target": "com.metabase.api#CreateActivityRecentRequestContext", + "traits": { + "smithy.api#required": {} + } + }, + "model": { + "target": "com.metabase.api#CreateActivityRecentRequestModel", + "traits": { + "smithy.api#required": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateActivityRecent": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateActivityRecentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/activity/recents", + "code": 200 + }, + "smithy.api#documentation": "POST /api/activity/recents\n\nAdds a model to the list of recently selected items." + } + }, + "com.metabase.api#CreateAgentCollectionRequest": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parent_collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/collection", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/collection\n\nCreate a new Collection.\n\n Pass `parent_collection_id` to nest under another collection; omit for a root-level collection.\n The caller must have write access to the parent (or root, if no parent given)." + } + }, + "com.metabase.api#CreateAgentConstructNativeQueryRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "sql": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentConstructNativeQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentConstructNativeQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/construct-native-query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/construct-native-query\n\nConstruct a native (raw SQL) query against a database.\n\n Wraps `sql` into a serialized native query and returns it base64-encoded — the same\n `{\"query\": }` shape as /v2/construct-query — so it can be saved as a question via\n /v1/question (the MCP layer swaps the base64 for a `query_handle`).\n\n This endpoint does NOT execute the SQL; to run native SQL ad hoc use /v1/execute-sql. The\n MBQL execution endpoints (/v1/execute, /v2/query) reject native queries by design, so a\n handle produced here is for saving, not for /v2/query execution." + } + }, + "com.metabase.api#CreateAgentDashboardRequestQuestionIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateAgentDashboardRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "question_ids": { + "target": "com.metabase.api#CreateAgentDashboardRequestQuestionIdsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/dashboard", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/dashboard\n\nCreate a new dashboard, optionally populated with saved questions.\n\n Pass `question_ids` to add existing saved questions as cards on the dashboard.\n Cards are automatically positioned on the grid based on their display type.\n If `collection_id` is omitted the dashboard is saved to the caller's personal collection.\n Pass an explicit `null` to save it to the root collection.\n The response `collection_path` is the saved location." + } + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutation": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase2" + } + }, + "traits": { + "smithy.api#documentation": "One dashcard mutation. Discriminated on `:action`:\n - `add` : requires `card_id`. Auto-positioned. Optional `display_size`(\"wide\", \"tall\", or \"full\").\n - `remove` : requires `dashcard_id`.\n - `move` : requires `dashcard_id` and `position` (\"top\" or \"bottom\")." + } + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase0DisplaySize": { + "type": "enum", + "members": { + "WIDE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wide" + } + }, + "TALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tall" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase0": { + "type": "structure", + "members": { + "action": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "display_size": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase0DisplaySize", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase1": { + "type": "structure", + "members": { + "action": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase2Position": { + "type": "enum", + "members": { + "TOP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "top" + } + }, + "BOTTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bottom" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase2": { + "type": "structure", + "members": { + "action": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "position": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutationCase2Position", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutAgentDashboardRequestDashcardsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseAgentApiApiDashcardMutation" + }, + "traits": {} + }, + "com.metabase.api#PutAgentDashboardRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashcards": { + "target": "com.metabase.api#PutAgentDashboardRequestDashcardsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutAgentDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutAgentDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/agent/v1/dashboard/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/agent/v1/dashboard/{id}\n\nUpdate a dashboard. Patch semantics - only fields you pass are changed.\n\n Metadata: `name`, `description`, `collection_id`, `archived`. Dashcard mutations\n are submitted under `dashcards` as a list of `{action: add|remove|move, ...}`\n entries applied in order. `add` requires `card_id`; `remove` and `move` require\n `dashcard_id`." + } + }, + "com.metabase.api#CreateAgentExecuteRequest": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentExecute": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/execute\n\nExecute an MBQL query and return results.\n\n Accepts a base64-encoded MBQL query (as returned by /v1/construct-query) and executes it,\n returning results with column metadata.\n\n Response format:\n - On success: {:data {:cols [...] :rows [...]} :row_count N :status :completed :running_time M}\n - On failure: {:status :failed :error \"message\" ...}\n\n Standard userspace query limits are enforced (2000 rows for simple queries, 10000 for aggregated)." + } + }, + "com.metabase.api#CreateAgentExecuteSqlRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "sql": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentExecuteSql": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentExecuteSqlRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/execute-sql", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/execute-sql\n\nExecute a raw SQL query against a database. Returns rows + column metadata.\n\n Requires the user to have native-query permission on the target database; the QP\n middleware enforces this. The instance-level `mcp-execute-sql-enabled` setting\n must also be on (it is by default)." + } + }, + "com.metabase.api#MetabaseAgentApiApiCardDisplay": { + "type": "enum", + "members": { + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bar" + } + }, + "LINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "line" + } + }, + "PIE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pie" + } + }, + "SCATTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scatter" + } + }, + "AREA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "area" + } + }, + "ROW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "row" + } + }, + "COMBO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "combo" + } + }, + "PIVOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pivot" + } + }, + "SCALAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "scalar" + } + }, + "SMARTSCALAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "smartscalar" + } + }, + "GAUGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gauge" + } + }, + "PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "progress" + } + }, + "FUNNEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "funnel" + } + }, + "MAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "map" + } + }, + "WATERFALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "waterfall" + } + }, + "SANKEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sankey" + } + } + }, + "traits": { + "smithy.api#documentation": "Display types accepted by Card. Validates LLM-passed values so a bogus\n value (e.g. `\"potato\"`) gets a 400 rather than persisting junk." + } + }, + "com.metabase.api#CreateAgentMetricRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "com.metabase.api#MetabaseAgentApiApiCardDisplay", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentMetric": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentMetricRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/metric", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/metric\n\nSave a previously constructed query as a named metric.\n\n A metric is a reusable aggregation (a `Card` of type `metric`): the underlying query must have\n exactly one aggregation and at most one date/datetime grouping. The `query` parameter accepts a\n `query_handle` (UUID) returned by `construct_query`, or a base64-encoded MBQL string. MCP callers\n should always use the handle.\n Optionally specify display type, description, collection, and visualization settings.\n If `collection_id` is omitted the metric is saved to the caller's personal collection.\n Pass an explicit `null` to save it to the root collection.\n The response `collection_path` is the saved location." + } + }, + "com.metabase.api#PutAgentMetricRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "com.metabase.api#MetabaseAgentApiApiCardDisplay", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutAgentMetric": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutAgentMetricRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/agent/v1/metric/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/agent/v1/metric/{id}\n\nUpdate a saved metric. Patch semantics - only fields that you pass are changed.\n\n Set `collection_id` to move the metric to a different collection. Set `archived: true` to archive.\n Pass `query` (a query_handle from construct_query, or a base64 MBQL string) to replace the underlying\n query; the replacement must still be a valid metric (exactly one aggregation, at most one\n date/datetime grouping). The target card must be a metric — use `update_question` for questions." + } + }, + "com.metabase.api#GetAgentPing": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/agent/v1/ping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/agent/v1/ping\n\nHealth check endpoint for the Agent API." + } + }, + "com.metabase.api#CreateAgentQuestionRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "com.metabase.api#MetabaseAgentApiApiCardDisplay", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentQuestion": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentQuestionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/question", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/question\n\nSave a previously constructed query as a named question (card).\n\n The `query` parameter accepts a `query_handle` (UUID) returned by `construct_query` (MBQL) or\n `construct_native_query` (native SQL), or a base64-encoded query string. MCP callers should\n always use the handle.\n Optionally specify display type, description, collection, and visualization settings.\n If `collection_id` is omitted the question is saved to the caller's personal collection.\n Pass an explicit `null` to save it to the root collection.\n The response `collection_path` is the saved location.\n\n Saving a native (raw SQL) query requires native-query permission on the target database." + } + }, + "com.metabase.api#PutAgentQuestionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "com.metabase.api#MetabaseAgentApiApiCardDisplay", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutAgentQuestion": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutAgentQuestionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/agent/v1/question/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/agent/v1/question/{id}\n\nUpdate a saved question (card). Patch semantics - only fields that you pass are changed.\n\n Set `collection_id` to move the card to a different collection. Set `archived: true` to archive.\n Pass `query` (a query_handle from construct_query or construct_native_query, or a base64 query\n string) to replace the underlying query. Replacing it with a native (raw SQL) query requires\n native-query permission on the target database." + } + }, + "com.metabase.api#CreateAgentQuestionQueryRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentQuestionQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentQuestionQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/question/{id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/question/{id}/query\n\nRun a saved question (card) and return its results.\n\n Executes the query stored on the card under the caller's permissions and returns rows +\n column metadata — the same response shape as /v1/execute.\n\n Parameterized questions are NOT supported: if the card declares parameters or input\n template tags (field filters / variables), this returns a 400. Run it in Metabase, or\n save a parameterless version." + } + }, + "com.metabase.api#CreateAgentReadResourceRequestUrisList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateAgentReadResourceRequest": { + "type": "structure", + "members": { + "uris": { + "target": "com.metabase.api#CreateAgentReadResourceRequestUrisList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentReadResource": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentReadResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/read-resource", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/read-resource\n\nRead one or more Metabase resources via metabase:// URI patterns.\n\n Dispatches into the shared URI resolver in `metabase.metabot.tools.resources`,\n which validates URIs, fetches entities with per-URI permission checks, and\n returns a map of `{:resources ... :output ...}`. Up to 5 URIs per call." + } + }, + "com.metabase.api#CreateAgentSearchRequestSemanticQueriesCase0List": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateAgentSearchRequestSemanticQueries": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateAgentSearchRequestSemanticQueriesCase0List" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateAgentSearchRequestTermQueriesCase0List": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateAgentSearchRequestTermQueries": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateAgentSearchRequestTermQueriesCase0List" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateAgentSearchRequest": { + "type": "structure", + "members": { + "semantic_queries": { + "target": "com.metabase.api#CreateAgentSearchRequestSemanticQueries", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "term_queries": { + "target": "com.metabase.api#CreateAgentSearchRequestTermQueries", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v1/search", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v1/search\n\nSearch for tables, models, metrics, saved questions, dashboards, and collections.\n\n Supports both term-based and semantic search queries. Results are ranked using\n Reciprocal Rank Fusion when both query types are provided." + } + }, + "com.metabase.api#CreateAgentConstructQueryRequest": { + "type": "structure", + "members": { + "prompt": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentConstructQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentConstructQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v2/construct-query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v2/construct-query\n\nConstruct an MBQL query from a portable MBQL 5 representations JSON payload.\n\n The body is `{\"query\": }` where `` is a JSON object\n matching `::lib.schema/external-query` — see the `construct_notebook_query` tool\n documentation for the format reference. Returns a base64-encoded MBQL query that can be\n executed via /v1/execute or paginated via /v2/query." + } + }, + "com.metabase.api#MetabaseAgentApiApiQueryRequest": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseAgentApiApiQueryRequestCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseAgentApiApiQueryRequestCase1" + }, + "MetabaseAgentApiApiConstructQueryRequest": { + "target": "com.metabase.api#MetabaseAgentApiApiConstructQueryRequest" + } + }, + "traits": { + "smithy.api#documentation": "Request body for /v2/query, one of three shapes:\n - `{:continuation_token }` from a prior response (pagination);\n - `{:query }` — a query_handle resolved by the MCP layer to its stored base64\n MBQL; already resolved, so it's executed directly (like /v1/execute) rather than re-run\n through the representations pipeline;\n - `{:query }` — a fresh portable MBQL 5 payload, same shape as\n /v2/construct-query.\n\n The string-vs-object `:query` distinction is what the `:dispatch` keys on. Each branch is a\n closed map, so top-level keys it doesn't declare (e.g. the legacy `source_entity` /\n `referenced_entities` envelope, or a `:query` sent alongside a `:continuation_token`) are\n dropped before the handler runs." + } + }, + "com.metabase.api#MetabaseAgentApiApiQueryRequestCase0": { + "type": "structure", + "members": { + "continuation_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiQueryRequestCase1": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseAgentApiApiConstructQueryRequest": { + "type": "structure", + "members": { + "prompt": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Request body for /v2/construct-query and the fresh-query branch of /v2/query.\n A single `:query` key whose value is a JSON object matching\n [[metabase.lib.schema/external-query]] — the canonical portable MBQL 5 wire format. The\n query is fully self-describing: the database is derived from the first stage's\n `source-table:` or `source-card:`, all field references are portable FKs\n (`[, , , ]`), and there is no auxiliary\n `source_entity` / `referenced_entities` envelope. See\n `resources/metabot/prompts/tools/construct_notebook_query.md` for the full format reference\n (including operators, joins, expressions, multi-stage queries, and FK conventions).\n\n Closed map: any extra top-level keys (notably the legacy `source_entity` /\n `referenced_entities` envelope from before the repr migration) are dropped during request\n decoding, so a caller still sending the old shape is served.\n\n The inner `:query` value is intentionally typed as an open map ([[ms/Map]]) at this boundary\n rather than `::lib.schema/external-query`. Being open matters: a closed map with no declared\n entries would have every key stripped before the handler saw it. Reasons for not naming the\n real schema:\n\n 1. Deep MBQL-shape validation runs inside the representations pipeline\n (`metabot.tools.construct/execute-representations-query` calls `repr/validate-query`\n after the repair pass), so the boundary check would be redundant.\n\n 2. The strict-tool manifest lint (`assert-optional-fields-nullable!`) walks every map\n reachable from the tool input schema. `::external-query` references `::query`, which\n carries several `:optional` keys (`:lib/metadata`, `:database`, `:settings`, …) that\n are not `[:maybe ...]` — for sound reasons unrelated to this endpoint. Recursing into\n them would force a wide schema change just to satisfy the lint at the agent boundary." + } + }, + "com.metabase.api#CreateAgentQueryRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#MetabaseAgentApiApiQueryRequest", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAgentQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAgentQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/agent/v2/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/agent/v2/query\n\nExecute a portable MBQL 5 representations JSON query and stream the results, with\n continuation-token pagination.\n\n Accepts either a JSON body (same shape as /v2/construct-query) or a `continuation_token`\n from a previous response. Returns results with column metadata and an optional\n `continuation_token` for fetching the next page." + } + }, + "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequest": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "image_base64": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timeline_events": { + "target": "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAiEntityAnalysisAnalyzeChart": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAiEntityAnalysisAnalyzeChartRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ai-entity-analysis/analyze-chart", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ai-entity-analysis/analyze-chart\n\nAnalyze a chart image using an AI vision model. This function sends the image data to a separate external AI service\n for analysis." + } + }, + "com.metabase.api#GetAlertRequest": { + "type": "structure", + "members": { + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "user_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAlert": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAlertRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/alert", + "code": 200 + }, + "smithy.api#documentation": "GET /api/alert\n\nFetch alerts which the current user has created or will receive, or all alerts if the user is an admin.\n The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users." + } + }, + "com.metabase.api#GetAlertByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAlertById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAlertByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/alert/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/alert/{id}\n\nFetch an alert by ID" + } + }, + "com.metabase.api#DeleteAlertSubscriptionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteAlertSubscription": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteAlertSubscriptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/alert/{id}/subscription", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/alert/{id}/subscription\n\nFor users to unsubscribe themselves from the given alert." + } + }, + "com.metabase.api#CreateAnalyticsProxyRequestDataItemMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsProxyRequestDataList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateAnalyticsProxyRequestDataItemMap" + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsProxyRequest": { + "type": "structure", + "members": { + "data": { + "target": "com.metabase.api#CreateAnalyticsProxyRequestDataList", + "traits": { + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAnalyticsProxy": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAnalyticsProxyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/analytics-proxy", + "code": 200 + }, + "smithy.api#documentation": "POST /api/analytics-proxy\n\nForward a Snowplow `tp2` payload to `sp.metabase.com` server-side, bypassing the customer page's\n `connect-src` CSP." + } + }, + "com.metabase.api#GetAnalyticsAnonymousStats": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/analytics/anonymous-stats", + "code": 200 + }, + "smithy.api#documentation": "GET /api/analytics/anonymous-stats\n\nAnonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see\n what is being phoned home." + } + }, + "com.metabase.api#CreateAnalyticsInternalRequestEventsItemLabelsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsInternalRequestEventsItemOp": { + "type": "enum", + "members": { + "INC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inc" + } + }, + "DEC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dec" + } + }, + "SET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "set" + } + }, + "OBSERVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "observe" + } + }, + "CLEAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "clear" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsInternalRequestEventsItem": { + "type": "structure", + "members": { + "amount": { + "target": "smithy.api#Double", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "labels": { + "target": "com.metabase.api#CreateAnalyticsInternalRequestEventsItemLabelsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "metric": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "op": { + "target": "com.metabase.api#CreateAnalyticsInternalRequestEventsItemOp", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsInternalRequestEventsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateAnalyticsInternalRequestEventsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateAnalyticsInternalRequest": { + "type": "structure", + "members": { + "events": { + "target": "com.metabase.api#CreateAnalyticsInternalRequestEventsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateAnalyticsInternal": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateAnalyticsInternalRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/analytics/internal", + "code": 200 + }, + "smithy.api#documentation": "POST /api/analytics/internal\n\nReceive a batch of internal analytics events from the frontend and record them as Prometheus metrics." + } + }, + "com.metabase.api#GetKey": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/api-key", + "code": 200 + }, + "smithy.api#documentation": "GET /api/api-key\n\nGet a list of API keys with the default scope. Non-paginated." + } + }, + "com.metabase.api#CreateKeyRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/api-key", + "code": 200 + }, + "smithy.api#documentation": "POST /api/api-key\n\nCreate a new API key (and an associated `User`) with the provided name and group ID." + } + }, + "com.metabase.api#GetKeyCount": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/api-key/count", + "code": 200 + }, + "smithy.api#documentation": "GET /api/api-key/count\n\nGet the count of API keys in the DB with the default scope." + } + }, + "com.metabase.api#PutKeyRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/api-key/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/api-key/{id}\n\nUpdate an API key by changing its group and/or its name" + } + }, + "com.metabase.api#DeleteKeyRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/api-key/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/api-key/{id}\n\nDelete an ApiKey" + } + }, + "com.metabase.api#PutKeyRegenerateRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutKeyRegenerate": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutKeyRegenerateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/api-key/{id}/regenerate", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/api-key/{id}/regenerate\n\nRegenerate an API Key" + } + }, + "com.metabase.api#GetAutomagicDashboardsDatabaseCandidatesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardsDatabaseCandidates": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardsDatabaseCandidatesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/database/{id}/candidates", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/database/{id}/candidates\n\nReturn a list of candidates for automagic dashboards ordered by interestingness." + } + }, + "com.metabase.api#GetAutomagicDashboardsModelIndexPrimaryKeyRequest": { + "type": "structure", + "members": { + "model_index_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "pk_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardsModelIndexPrimaryKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardsModelIndexPrimaryKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/model_index/{model_index_id}/primary_key/{pk_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id}\n\nReturn an automagic dashboard for an entity detail specified by `entity`\n with id `id` and a primary key of `indexed-value`." + } + }, + "com.metabase.api#GetAutomagicDashboardRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Document" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardRequestShow", + "traits": { + "smithy.api#httpQuery": "show" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}\n\nReturn an automagic dashboard for entity `entity` with id `id`." + } + }, + "com.metabase.api#GetAutomagicDashboardCellRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardCellRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "cell_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardCellRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardCell": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardCellRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}\n\nReturn an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query\n `cell-query`." + } + }, + "com.metabase.api#GetAutomagicDashboardCellCompareRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellCompareRequestComparisonEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellCompareRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellCompareRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardCellCompareRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellCompareRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellCompareRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "cell_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "comparison_entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellCompareRequestComparisonEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + } + }, + "comparison_entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardCellCompareRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardCellCompare": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardCellCompareRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}\n\nReturn an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id\n `comparison-entity-id-or-query.`." + } + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "cell_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashboard_template": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "invalid value for dashboard template name" + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplate": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/rule/{prefix}/{dashboard_template}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}\n\nReturn an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using\n dashboard-template `dashboard-template`." + } + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "cell_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashboard_template": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "invalid value for dashboard template name" + } + }, + "comparison_entity": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + } + }, + "comparison_entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompare": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/rule/{prefix}/{dashboard_template}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}\n\nReturn an automagic comparison dashboard for cell in automagic dashboard for entity `entity`\n with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity\n `comparison-entity` with id `comparison-entity-id-or-query.`." + } + }, + "com.metabase.api#GetAutomagicDashboardCompareRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCompareRequestComparisonEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCompareRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCompareRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardCompareRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardCompareRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardCompareRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "comparison_entity": { + "target": "com.metabase.api#GetAutomagicDashboardCompareRequestComparisonEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + } + }, + "comparison_entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardCompareRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardCompare": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardCompareRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query}\n\nReturn an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity`\n with id `comparison-entity-id-or-query.`" + } + }, + "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadataRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata\n\nReturn all metadata for an automagic dashboard for entity `entity` with id `id`." + } + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashboard_template": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "invalid value for dashboard template name" + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplate": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/rule/{prefix}/{dashboard_template}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}\n\nReturn an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`." + } + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "FIELD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "field" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity": { + "type": "enum", + "members": { + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestShowCase0": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestShowCase0" + }, + "Case1": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashboard_template": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "invalid value for dashboard template name" + } + }, + "comparison_entity": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Invalid comparison entity type. Can only be one of \"table\", \"segment\", or \"adhoc\"" + } + }, + "comparison_entity_id_or_query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "show": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow", + "traits": { + "smithy.api#httpQuery": "show", + "smithy.api#documentation": "invalid show value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompare": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompareRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/automagic-dashboards/{entity}/{entity_id_or_query}/rule/{prefix}/{dashboard_template}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query}\n\nReturn an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template\n `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`." + } + }, + "com.metabase.api#GetBookmark": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/bookmark", + "code": 200 + }, + "smithy.api#documentation": "GET /api/bookmark\n\nFetch all bookmarks for the user" + } + }, + "com.metabase.api#PutBookmarkOrderingRequestOrderingsItemType": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutBookmarkOrderingRequestOrderingsItem": { + "type": "structure", + "members": { + "item_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#PutBookmarkOrderingRequestOrderingsItemType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutBookmarkOrderingRequestOrderingsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutBookmarkOrderingRequestOrderingsItem" + }, + "traits": {} + }, + "com.metabase.api#PutBookmarkOrderingRequest": { + "type": "structure", + "members": { + "orderings": { + "target": "com.metabase.api#PutBookmarkOrderingRequestOrderingsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutBookmarkOrdering": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutBookmarkOrderingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/bookmark/ordering", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/bookmark/ordering\n\nSets the order of bookmarks for user." + } + }, + "com.metabase.api#UpdateBookmarkRequestModel": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateBookmarkRequest": { + "type": "structure", + "members": { + "model": { + "target": "com.metabase.api#UpdateBookmarkRequestModel", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateBookmark": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateBookmarkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/bookmark/{model}/{id}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/bookmark/{model}/{id}\n\nCreate a new bookmark for user." + } + }, + "com.metabase.api#DeleteBookmarkRequestModel": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#DeleteBookmarkRequest": { + "type": "structure", + "members": { + "model": { + "target": "com.metabase.api#DeleteBookmarkRequestModel", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteBookmark": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteBookmarkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/bookmark/{model}/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/bookmark/{model}/{id}\n\nDelete a bookmark. Will delete a bookmark assigned to the user making the request by model and id." + } + }, + "com.metabase.api#GetBugReportingConnectionPoolDetails": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/bug-reporting/connection-pool-details", + "code": 200 + }, + "smithy.api#documentation": "GET /api/bug-reporting/connection-pool-details\n\nReturns database connection pool info for the current Metabase instance." + } + }, + "com.metabase.api#GetBugReportingDetails": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/bug-reporting/details", + "code": 200 + }, + "smithy.api#documentation": "GET /api/bug-reporting/details\n\nReturns version and system information relevant to filing a bug report against Metabase." + } + }, + "com.metabase.api#GetCacheRequestModelItem": { + "type": "enum", + "members": { + "ROOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "root" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCacheRequestModelList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetCacheRequestModelItem" + }, + "traits": {} + }, + "com.metabase.api#GetCacheRequestSortColumn": { + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "POLICY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "policy" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCacheRequestSortDirection": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCacheRequest": { + "type": "structure", + "members": { + "model": { + "target": "com.metabase.api#GetCacheRequestModelList", + "traits": { + "smithy.api#httpQuery": "model", + "smithy.api#documentation": "Type of model" + } + }, + "collection": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "collection", + "smithy.api#documentation": "Collection id to filter results. Returns everything if not supplied." + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#documentation": "Model id to get configuration for." + } + }, + "sort_column": { + "target": "com.metabase.api#GetCacheRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort_column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetCacheRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort_direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCache": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCacheRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/cache", + "code": 200 + }, + "smithy.api#documentation": "GET /api/cache\n\nReturn cache configuration. Supports pagination via `limit` and `offset` query parameters,\n and sorting via `sort_column` and `sort_direction`." + } + }, + "com.metabase.api#PutCacheRequestModel": { + "type": "enum", + "members": { + "ROOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "root" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategy": { + "type": "union", + "members": { + "MetabaseCacheApiCacheStrategyEe": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyEe" + }, + "MetabaseCacheApiCacheStrategyOss": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyOss" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyEe": { + "type": "union", + "members": { + "MetabaseCacheApiCacheStrategyNocache": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyNocache" + }, + "MetabaseCacheApiCacheStrategyTtl": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyTtl" + }, + "MetabaseCacheApiCacheStrategyEeDuration": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyEeDuration" + }, + "MetabaseCacheApiCacheStrategyEeSchedule": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyEeSchedule" + } + }, + "traits": { + "smithy.api#documentation": "cache strategy :type must be one of :nocache, :ttl, :duration, :schedule" + } + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyNocache": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyTtl": { + "type": "structure", + "members": { + "min_duration_ms": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "multiplier": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyEeDuration": { + "type": "structure", + "members": { + "duration": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "refresh_automatically": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "unit": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyEeDurationUnit", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyEeDurationUnit": { + "type": "enum", + "members": { + "HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hours" + } + }, + "MINUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minutes" + } + }, + "SECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "seconds" + } + }, + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "days" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyEeSchedule": { + "type": "structure", + "members": { + "refresh_automatically": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseCacheApiCacheStrategyOss": { + "type": "union", + "members": { + "MetabaseCacheApiCacheStrategyNocache": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyNocache" + }, + "MetabaseCacheApiCacheStrategyTtl": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategyTtl" + } + }, + "traits": { + "smithy.api#documentation": "cache strategy :type must be one of :nocache, :ttl" + } + }, + "com.metabase.api#PutCacheRequest": { + "type": "structure", + "members": { + "model": { + "target": "com.metabase.api#PutCacheRequestModel", + "traits": { + "smithy.api#required": {} + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "strategy": { + "target": "com.metabase.api#MetabaseCacheApiCacheStrategy", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutCache": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutCacheRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/cache", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/cache\n\nStore cache configuration." + } + }, + "com.metabase.api#DeleteCacheRequestModel": { + "type": "enum", + "members": { + "ROOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "root" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + } + }, + "traits": {} + }, + "com.metabase.api#DeleteCacheRequestModelIdList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#DeleteCacheRequest": { + "type": "structure", + "members": { + "model": { + "target": "com.metabase.api#DeleteCacheRequestModel", + "traits": { + "smithy.api#required": {} + } + }, + "model_id": { + "target": "com.metabase.api#DeleteCacheRequestModelIdList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteCache": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteCacheRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/cache", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/cache\n\nDelete cache configurations." + } + }, + "com.metabase.api#CreateCacheInvalidateRequestDatabaseList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCacheInvalidateRequestDashboardList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCacheInvalidateRequestQuestionList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCacheInvalidateRequest": { + "type": "structure", + "members": { + "include": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "include", + "smithy.api#documentation": "All cache configuration overrides should invalidate cache too" + } + }, + "database": { + "target": "com.metabase.api#CreateCacheInvalidateRequestDatabaseList", + "traits": { + "smithy.api#httpQuery": "database", + "smithy.api#documentation": "A list of database ids" + } + }, + "dashboard": { + "target": "com.metabase.api#CreateCacheInvalidateRequestDashboardList", + "traits": { + "smithy.api#httpQuery": "dashboard", + "smithy.api#documentation": "A list of dashboard ids" + } + }, + "question": { + "target": "com.metabase.api#CreateCacheInvalidateRequestQuestionList", + "traits": { + "smithy.api#httpQuery": "question", + "smithy.api#documentation": "A list of question ids" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCacheInvalidate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCacheInvalidateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/cache/invalidate", + "code": 200 + }, + "smithy.api#documentation": "POST /api/cache/invalidate\n\nInvalidate cache entries.\n\n Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be\n supplied).\n\n `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without\n touching all nested configurations, or you want your invalidation to trickle down to every card." + } + }, + "com.metabase.api#GetCardRequestF": { + "type": "enum", + "members": { + "ARCHIVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archived" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "USING_MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "using_model" + } + }, + "BOOKMARKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bookmarked" + } + }, + "USING_SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "using_segment" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "MINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mine" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCardRequest": { + "type": "structure", + "members": { + "f": { + "target": "com.metabase.api#GetCardRequestF", + "traits": { + "smithy.api#httpQuery": "f" + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "model_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card\n\nGet all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is\n `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and\n `archived`. See corresponding implementation functions above for the specific behavior of each filter\n option. :card_index:" + } + }, + "com.metabase.api#MetabaseLibSchemaMetadataCardResultMetadata": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataLibOrLegacyColumn" + }, + "traits": { + "smithy.api#documentation": "Schema for the `:result-metadata` for a Card (Saved Question, Model, or v2 Metric)." + } + }, + "com.metabase.api#CreateCardRequestCollectionId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibSchemaMetadataCardType": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": { + "smithy.api#documentation": "All acceptable card types.\n\n Previously (< 49), we only had 2 card types: question and model, which were differentiated using the boolean\n `dataset` column. Soon we'll have more card types (e.g: metric) and we will longer be able to use a boolean column\n to differentiate between all types. So we've added a new `type` column for this purpose.\n\n Migrating all the code to use `report_card.type` will be quite an effort, we decided that we'll migrate it\n gradually." + } + }, + "com.metabase.api#CreateCardRequestSize": { + "type": "structure", + "members": { + "size_x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "size_y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateCardRequest": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "entity_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "result_metadata": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataCardResultMetadata", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "com.metabase.api#CreateCardRequestCollectionId", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataCardType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "com.metabase.api#CreateCardRequestSize", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card\n\nCreate a new `Card`. Card `type` can be `question`, `metric`, or `model`." + } + }, + "com.metabase.api#CreateCardCollectionRequestCardIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCardCollectionRequest": { + "type": "structure", + "members": { + "card_ids": { + "target": "com.metabase.api#CreateCardCollectionRequestCardIdsList", + "traits": { + "smithy.api#required": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/collections", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/collections\n\nBulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with\n `collection_id`, or remove them from any Collections by passing a `null` `collection_id`." + } + }, + "com.metabase.api#GetCardEmbeddable": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/embeddable", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/embeddable\n\nFetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints\n and a signed JWT." + } + }, + "com.metabase.api#MetabaseParametersSchemaParameterValues": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterWithValue" + }, + "traits": {} + }, + "com.metabase.api#MetabaseParametersSchemaParameterWithValue": { + "type": "structure", + "members": { + "default": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "options": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterOptions", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "target": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaParameterType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "value": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameterValue" + } + }, + "traits": { + "smithy.api#documentation": "parameter must be a map with an :id key" + } + }, + "com.metabase.api#CreateCardPivotCardQueryRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardPivotCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardPivotCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/pivot/{card_id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/pivot/{card-id}/query\n\nRun the query associated with a Card." + } + }, + "com.metabase.api#GetCard2": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/public", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/public\n\nFetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled." + } + }, + "com.metabase.api#GetCardParamSearchRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{card_id}/params/{param_key}/search/{query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{card-id}/params/{param-key}/search/{query}\n\nFetch possible values of the parameter whose ID is `:param-key` that contain `:query`.\n\n ;; fetch values for Card 1 parameter 'abc' that contain 'Orange';\n GET /api/queries/1/params/abc/search/Orange\n\n Currently limited to first 1000 results." + } + }, + "com.metabase.api#GetCardParamValuesRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{card_id}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{card-id}/params/{param-key}/values\n\nFetch possible values of the parameter whose ID is `:param-key`.\n\n ;; fetch values for Card 1 parameter 'abc' that are possible\n GET /api/queries/1/params/abc/values" + } + }, + "com.metabase.api#CreateCardPublicLinkRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/{card_id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/{card-id}/public_link\n\nGenerate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has\n already been shared, it will return the existing public link rather than creating a new one.) Public sharing must\n be enabled." + } + }, + "com.metabase.api#DeleteCardPublicLinkRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteCardPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteCardPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/card/{card_id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/card/{card-id}/public_link\n\nDelete the publicly-accessible link to this Card." + } + }, + "com.metabase.api#CreateCardQueryRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "collection_preview": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/{card_id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/{card-id}/query\n\nRun the query associated with a Card." + } + }, + "com.metabase.api#UpdateCardQueryRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#UpdateCardQueryRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "com.metabase.api#UpdateCardQueryRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "csv_include_bom": { + "target": "smithy.api#Boolean" + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pivot_results": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/{card_id}/query/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/{card-id}/query/{export-format}\n\nRun the query associated with a Card, and return its results as a file in the specified format.\n\n `csv_include_bom`, `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content\n or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use\n HTML `form` actions)." + } + }, + "com.metabase.api#GetCardByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "legacy_mbql": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "legacy-mbql" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{id}\n\nGet `Card` with ID.\n\n As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL)\n instead, you can specify `?legacy-mbql=true`." + } + }, + "com.metabase.api#PutCardRequestEmbeddingParamsValue": { + "type": "enum", + "members": { + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled" + } + }, + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enabled" + } + }, + "LOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "locked" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutCardRequestEmbeddingParamsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutCardRequestEmbeddingParamsValue" + }, + "traits": {} + }, + "com.metabase.api#PutCardRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "delete_old_dashcards": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "delete_old_dashcards" + } + }, + "enable_embedding": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_preview": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedding_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedding_params": { + "target": "com.metabase.api#PutCardRequestEmbeddingParamsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "result_metadata": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataCardResultMetadata", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataCardType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/card/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/card/{id}\n\nUpdate a `Card`." + } + }, + "com.metabase.api#DeleteCardRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/card/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/card/{id}\n\nHard delete a Card. To soft delete, use `PUT /api/queries/:id`" + } + }, + "com.metabase.api#CreateCardCopyRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardCopy": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardCopyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/card/{id}/copy", + "code": 200 + }, + "smithy.api#documentation": "POST /api/card/{id}/copy\n\nCopy a `Card`, with the new name 'Copy of _name_'" + } + }, + "com.metabase.api#GetCardDashboardsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardDashboards": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardDashboardsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{id}/dashboards", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{id}/dashboards\n\nGet a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in." + } + }, + "com.metabase.api#GetCardParamRemappingRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{id}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{id}/params/{param-key}/remapping\n\nFetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Card 1 parameter 'abc' for value 100\n GET /api/queries/1/params/abc/remapping?value=100" + } + }, + "com.metabase.api#GetCardQueryMetadataRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardQueryMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardQueryMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{id}/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{id}/query_metadata\n\nGet all of the required query metadata for a card." + } + }, + "com.metabase.api#GetCardSeriesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "last_cursor": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "last_cursor" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "exclude_ids": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "exclude_ids" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardSeries": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardSeriesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/card/{id}/series", + "code": 200 + }, + "smithy.api#documentation": "GET /api/card/{id}/series\n\nFetches a list of compatible series with the card with id `card_id`.\n\n - `last_cursor` with value is the id of the last card from the previous page to fetch the next page.\n - `query` to search card by name.\n - `exclude_ids` to filter out a list of card ids" + } + }, + "com.metabase.api#CreateCardsDashboardRequestCardIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCardsDashboardRequest": { + "type": "structure", + "members": { + "card_ids": { + "target": "com.metabase.api#CreateCardsDashboardRequestCardIdsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardsDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardsDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/cards/dashboards", + "code": 200 + }, + "smithy.api#documentation": "POST /api/cards/dashboards\n\nGet the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id`\n and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or\n `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be\n present." + } + }, + "com.metabase.api#CreateCardsMoveRequestCardIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCardsMoveRequest": { + "type": "structure", + "members": { + "card_ids": { + "target": "com.metabase.api#CreateCardsMoveRequestCardIdsList", + "traits": { + "smithy.api#required": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCardsMove": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCardsMoveRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/cards/move", + "code": 200 + }, + "smithy.api#documentation": "POST /api/cards/move\n\nMoves a number of Cards to a single collection or dashboard.\n\n For now, just either succeed or fail as a batch - we can think more about error handling later down the road." + } + }, + "com.metabase.api#GetChannelRequest": { + "type": "structure", + "members": { + "include_inactive": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetChannel": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetChannelRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/channel", + "code": 200 + }, + "smithy.api#documentation": "GET /api/channel\n\nGet all channels" + } + }, + "com.metabase.api#CreateChannelRequestBodyCase0DetailsAuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase0DetailsFeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase0DetailsMethod": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase0Details": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#CreateChannelRequestBodyCase0DetailsAuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#CreateChannelRequestBodyCase0DetailsFeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#CreateChannelRequestBodyCase0DetailsMethod" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase0": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#CreateChannelRequestBodyCase0Details", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase1": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase2Details": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase2": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#CreateChannelRequestBodyCase2Details", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase0": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1AuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1FeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1Method": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1AuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1FeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1Method" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3Details": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase0" + }, + "Case1": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3DetailsCase1" + }, + "Case2": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBodyCase3": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3Details", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequestBody": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateChannelRequestBodyCase0" + }, + "Case1": { + "target": "com.metabase.api#CreateChannelRequestBodyCase1" + }, + "Case2": { + "target": "com.metabase.api#CreateChannelRequestBodyCase2" + }, + "Case3": { + "target": "com.metabase.api#CreateChannelRequestBodyCase3" + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#CreateChannelRequestBody", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateChannel": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateChannelRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/channel", + "code": 200 + }, + "smithy.api#documentation": "POST /api/channel\n\nCreate a channel" + } + }, + "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsAuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsFeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsMethod": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase0Details": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsAuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsFeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase0DetailsMethod" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase0": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase0Details", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase1": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase2Details": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase2": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase2Details", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase0": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1FeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1Method": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1FeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1Method" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3Details": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase0" + }, + "Case1": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3DetailsCase1" + }, + "Case2": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBodyCase3": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3Details", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Must be a namespaced channel. E.g: channel/http", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequestBody": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase0" + }, + "Case1": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase1" + }, + "Case2": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase2" + }, + "Case3": { + "target": "com.metabase.api#CreateChannelTestRequestBodyCase3" + } + }, + "traits": {} + }, + "com.metabase.api#CreateChannelTestRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#CreateChannelTestRequestBody", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateChannelTest": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateChannelTestRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/channel/test", + "code": 200 + }, + "smithy.api#documentation": "POST /api/channel/test\n\nTest a channel connection" + } + }, + "com.metabase.api#GetChannelByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetChannelById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetChannelByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/channel/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/channel/{id}\n\nGet a channel" + } + }, + "com.metabase.api#PutChannelRequestBodyCase0DetailsAuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase0DetailsFeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase0DetailsMethod": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase0Details": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#PutChannelRequestBodyCase0DetailsAuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#PutChannelRequestBodyCase0DetailsFeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#PutChannelRequestBodyCase0DetailsMethod" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase0": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#PutChannelRequestBodyCase0Details", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase1": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase2Details": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase2": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#PutChannelRequestBodyCase2Details", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3DetailsCase0": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1AuthMethod": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "header" + } + }, + "QUERY_PARAM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-param" + } + }, + "REQUEST_BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "request-body" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1FeFormType": { + "type": "enum", + "members": { + "API_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api-key" + } + }, + "BEARER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bearer" + } + }, + "BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1Method": { + "type": "enum", + "members": { + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "get" + } + }, + "POST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "post" + } + }, + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "put" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1": { + "type": "structure", + "members": { + "auth_info": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#jsonName": "auth-info" + } + }, + "auth_method": { + "target": "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1AuthMethod", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "auth-method" + } + }, + "fe_form_type": { + "target": "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1FeFormType", + "traits": { + "smithy.api#jsonName": "fe-form-type" + } + }, + "method": { + "target": "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1Method" + }, + "url": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "value must be a valid URL.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3Details": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#PutChannelRequestBodyCase3DetailsCase0" + }, + "Case1": { + "target": "com.metabase.api#PutChannelRequestBodyCase3DetailsCase1" + }, + "Case2": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBodyCase3": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "com.metabase.api#PutChannelRequestBodyCase3Details", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequestBody": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#PutChannelRequestBodyCase0" + }, + "Case1": { + "target": "com.metabase.api#PutChannelRequestBodyCase1" + }, + "Case2": { + "target": "com.metabase.api#PutChannelRequestBodyCase2" + }, + "Case3": { + "target": "com.metabase.api#PutChannelRequestBodyCase3" + } + }, + "traits": {} + }, + "com.metabase.api#PutChannelRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "body": { + "target": "com.metabase.api#PutChannelRequestBody", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutChannel": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutChannelRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/channel/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/channel/{id}\n\nUpdate a channel" + } + }, + "com.metabase.api#GetCloudMigration": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/cloud-migration", + "code": 200 + }, + "smithy.api#documentation": "GET /api/cloud-migration\n\nGet the latest cloud migration, if any." + } + }, + "com.metabase.api#CreateCloudMigration": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/cloud-migration", + "code": 200 + }, + "smithy.api#documentation": "POST /api/cloud-migration\n\nInitiate a new cloud migration." + } + }, + "com.metabase.api#PutCloudMigrationCancel": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/cloud-migration/cancel", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/cloud-migration/cancel\n\nCancel any ongoing cloud migrations, if any." + } + }, + "com.metabase.api#GetCollectionRequest": { + "type": "structure", + "members": { + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "exclude_other_user_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude-other-user-collections" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "namespace" + } + }, + "personal_only": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "personal-only" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection\n\nFetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an\n additional property of each Collection so you can tell which of these you have write permissions for.)\n\n By default, this returns non-archived Collections, but instead you can show archived ones by passing\n `?archived=true`.\n\n By default, admin users will see all collections. To hide other user's collections pass in\n `?exclude-other-user-collections=true`.\n\n If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`." + } + }, + "com.metabase.api#CreateCollectionRequestAuthorityLevel": { + "type": "enum", + "members": { + "OFFICIAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "official" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateCollectionRequest": { + "type": "structure", + "members": { + "authority_level": { + "target": "com.metabase.api#CreateCollectionRequestAuthorityLevel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parent_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/collection", + "code": 200 + }, + "smithy.api#documentation": "POST /api/collection\n\nCreate a new Collection." + } + }, + "com.metabase.api#GetCollectionGraphRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "namespace" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionGraph": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionGraphRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/graph", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/graph\n\nFetch a graph of all Collection Permissions." + } + }, + "com.metabase.api#PutCollectionGraphRequest": { + "type": "structure", + "members": { + "force": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "force" + } + }, + "skip_graph": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip-graph" + } + }, + "groups": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "revision": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutCollectionGraph": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutCollectionGraphRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/collection/graph", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/collection/graph\n\nDo a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that\n are present in the request, and leave the rest unchanged.\n\n If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted\n as-is, and has the potential to clobber other writes that happened since the last read.\n\n If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions\n graph." + } + }, + "com.metabase.api#GetCollectionRootRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "namespace" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionRoot": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionRootRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/root", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/root\n\nReturn the 'Root' Collection object with standard details added" + } + }, + "com.metabase.api#GetCollectionRootDashboardQuestionCandidates": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/root/dashboard-question-candidates", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/root/dashboard-question-candidates\n\nFind cards in the root collection that can be moved into dashboards in the root collection. (Same as the above\n endpoint, but for the root collection)" + } + }, + "com.metabase.api#GetCollectionRootItemsRequestModelsItem": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "NO_MODELS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_models" + } + }, + "TIMELINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeline" + } + }, + "SNIPPET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snippet" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "PULSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pulse" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequestModelsList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetCollectionRootItemsRequestModelsItem" + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequestCollectionType": { + "type": "enum", + "members": { + "REMOTE_SYNCED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remote-synced" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequestPinnedState": { + "type": "enum", + "members": { + "IS_NOT_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "is_not_pinned" + } + }, + "IS_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "is_pinned" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequestSortColumn": { + "type": "enum", + "members": { + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "LAST_EDITED_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_edited_by" + } + }, + "LAST_EDITED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_edited_at" + } + }, + "DESCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "description" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionRootItemsRequest": { + "type": "structure", + "members": { + "models": { + "target": "com.metabase.api#GetCollectionRootItemsRequestModelsList", + "traits": { + "smithy.api#httpQuery": "models" + } + }, + "collection_type": { + "target": "com.metabase.api#GetCollectionRootItemsRequestCollectionType", + "traits": { + "smithy.api#httpQuery": "collection_type" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "namespace" + } + }, + "include_library": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_library" + } + }, + "pinned_state": { + "target": "com.metabase.api#GetCollectionRootItemsRequestPinnedState", + "traits": { + "smithy.api#httpQuery": "pinned_state" + } + }, + "sort_column": { + "target": "com.metabase.api#GetCollectionRootItemsRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort_column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetCollectionRootItemsRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort_direction" + } + }, + "official_collections_first": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "official_collections_first" + } + }, + "show_dashboard_questions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "show_dashboard_questions" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionRootItems": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionRootItemsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/root/items", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/root/items\n\nFetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection\n doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no\n `collection_id` exist. It does, however, have its own set of Permissions.\n\n This endpoint will actually show objects with no `collection_id` for Users that have Root Collection\n permissions, but for people without Root Collection perms, we'll just show the objects that have an effective\n location of `/`.\n\n This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the\n top-level objects you're allowed to access.\n\n By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as\n `snippets`, you can pass the `?namespace=` parameter.\n\n By default, library collections are excluded from the results; to include them, pass `?include_library=true`.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too." + } + }, + "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequestBody": { + "type": "structure", + "members": { + "card_ids": { + "target": "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList" + } + }, + "traits": {} + }, + "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequestBody", + "traits": { + "smithy.api#httpPayload": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/collection/root/move-dashboard-question-candidates", + "code": 200 + }, + "smithy.api#documentation": "POST /api/collection/root/move-dashboard-question-candidates\n\nMove candidate cards to the dashboards they appear in (for the root collection)" + } + }, + "com.metabase.api#GetCollectionTrash": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/trash", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/trash\n\nFetch the trash collection, as in `/api/collection/:trash-id`" + } + }, + "com.metabase.api#GetCollectionTreeRequestNamespacesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#GetCollectionTreeRequest": { + "type": "structure", + "members": { + "exclude_archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude-archived" + } + }, + "exclude_other_user_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude-other-user-collections" + } + }, + "include_library": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-library" + } + }, + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "namespace" + } + }, + "namespaces": { + "target": "com.metabase.api#GetCollectionTreeRequestNamespacesList", + "traits": { + "smithy.api#httpQuery": "namespaces" + } + }, + "shallow": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "shallow" + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "collection-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionTree": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionTreeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/tree", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/tree\n\nSimilar to `GET /`, but returns Collections in a tree structure, e.g.\n\n ```\n [{:name \"A\"\n :below #{:card :dataset}\n :children [{:name \"B\"}\n {:name \"C\"\n :here #{:dataset :card}\n :below #{:dataset :card}\n :children [{:name \"D\"\n :here #{:dataset}\n :children [{:name \"E\"}]}\n {:name \"F\"\n :here #{:card}\n :children [{:name \"G\"}]}]}]}\n {:name \"H\"}]\n ```\n\n The here and below keys indicate the types of items at this particular level of the tree (here) and in its\n subtree (below).\n\n TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at\n some point in the future.\n\n By default, looks at the `analytics` (if enabled) and regular (`nil`) namespaces. You can optionally pass a\n `namespace` argument, or one or many `namespaces`, to specify the particular collection namespaces you wish to look\n at. For example, `namespaces=analytics&namespaces=` would match the default behavior.\n\n When `shallow` is true, takes an optional `collection-id` and returns only the requested collection (or\n the root, if `collection-id` is `nil`)." + } + }, + "com.metabase.api#GetCollectionByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/{id}\n\nFetch a specific Collection with standard details added" + } + }, + "com.metabase.api#PutCollectionRequestAuthorityLevel": { + "type": "enum", + "members": { + "OFFICIAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "official" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutCollectionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "authority_level": { + "target": "com.metabase.api#PutCollectionRequestAuthorityLevel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parent_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/collection/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/collection/{id}\n\nModify an existing Collection, including archiving or unarchiving it, or moving it." + } + }, + "com.metabase.api#DeleteCollectionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/collection/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/collection/{id}\n\nDeletes a collection permanently" + } + }, + "com.metabase.api#GetCollectionDashboardQuestionCandidatesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionDashboardQuestionCandidates": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionDashboardQuestionCandidatesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/{id}/dashboard-question-candidates", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/{id}/dashboard-question-candidates\n\nFind cards in this collection that can be moved into dashboards in this collection.\n\n To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a\n dashboard question." + } + }, + "com.metabase.api#GetCollectionItemsRequestModelsItem": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "NO_MODELS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no_models" + } + }, + "TIMELINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeline" + } + }, + "SNIPPET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snippet" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "PULSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pulse" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionItemsRequestModelsList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetCollectionItemsRequestModelsItem" + }, + "traits": {} + }, + "com.metabase.api#GetCollectionItemsRequestPinnedState": { + "type": "enum", + "members": { + "IS_NOT_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "is_not_pinned" + } + }, + "IS_PINNED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "is_pinned" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionItemsRequestSortColumn": { + "type": "enum", + "members": { + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "LAST_EDITED_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_edited_by" + } + }, + "LAST_EDITED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_edited_at" + } + }, + "DESCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "description" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionItemsRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCollectionItemsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "models": { + "target": "com.metabase.api#GetCollectionItemsRequestModelsList", + "traits": { + "smithy.api#httpQuery": "models" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "pinned_state": { + "target": "com.metabase.api#GetCollectionItemsRequestPinnedState", + "traits": { + "smithy.api#httpQuery": "pinned_state" + } + }, + "sort_column": { + "target": "com.metabase.api#GetCollectionItemsRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort_column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetCollectionItemsRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort_direction" + } + }, + "official_collections_first": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "official_collections_first" + } + }, + "show_dashboard_questions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "show_dashboard_questions" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCollectionItems": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCollectionItemsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/collection/{id}/items", + "code": 200 + }, + "smithy.api#documentation": "GET /api/collection/{id}/items\n\nFetch a specific Collection's items with the following options:\n\n * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models\n * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`.\n * `pinned_state` - when `is_pinned`, return pinned objects only.\n when `is_not_pinned`, return non pinned objects only.\n when `all`, return everything. By default returns everything.\n\n Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is\n changed, that should too." + } + }, + "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequestBody": { + "type": "structure", + "members": { + "card_ids": { + "target": "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList" + } + }, + "traits": {} + }, + "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "body": { + "target": "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequestBody", + "traits": { + "smithy.api#httpPayload": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/collection/{id}/move-dashboard-question-candidates", + "code": 200 + }, + "smithy.api#documentation": "POST /api/collection/{id}/move-dashboard-question-candidates\n\nMove candidate cards to the dashboards they appear in." + } + }, + "com.metabase.api#GetCommentRequestTargetType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetCommentRequest": { + "type": "structure", + "members": { + "target_type": { + "target": "com.metabase.api#GetCommentRequestTargetType", + "traits": { + "smithy.api#httpQuery": "target_type", + "smithy.api#required": {} + } + }, + "target_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "target_id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetComment": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCommentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/comment", + "code": 200 + }, + "smithy.api#documentation": "GET /api/comment\n\nGet comments for an entity" + } + }, + "com.metabase.api#CreateCommentRequestTargetType": { + "type": "enum", + "members": { + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateCommentRequest": { + "type": "structure", + "members": { + "child_target_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "content": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "parent_comment_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "target_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "target_type": { + "target": "com.metabase.api#CreateCommentRequestTargetType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateComment": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCommentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/comment", + "code": 200 + }, + "smithy.api#documentation": "POST /api/comment\n\nCreate a new comment" + } + }, + "com.metabase.api#GetCommentMentions": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/comment/mentions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/comment/mentions\n\nGet a list of entities suitable for mentions. NOTE: only users for now." + } + }, + "com.metabase.api#PutCommentRequest": { + "type": "structure", + "members": { + "comment_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "content": { + "target": "smithy.api#Document" + }, + "is_resolved": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutComment": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutCommentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/comment/{comment_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/comment/{comment-id}\n\nUpdate a comment" + } + }, + "com.metabase.api#DeleteCommentRequest": { + "type": "structure", + "members": { + "comment_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteComment": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteCommentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/comment/{comment_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/comment/{comment-id}\n\nSoft delete a comment" + } + }, + "com.metabase.api#CreateCommentReactionRequest": { + "type": "structure", + "members": { + "comment_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "emoji": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateCommentReaction": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateCommentReactionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/comment/{comment_id}/reaction", + "code": 200 + }, + "smithy.api#documentation": "POST /api/comment/{comment-id}/reaction\n\nToggle a reaction on a comment" + } + }, + "com.metabase.api#CreateDashboardRequest": { + "type": "structure", + "members": { + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard\n\nCreate a new Dashboard." + } + }, + "com.metabase.api#GetDashboardEmbeddable": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/embeddable", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/embeddable\n\nFetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding\n endpoints and a signed JWT." + } + }, + "com.metabase.api#GetDashboardParamsValidFilterFieldsRequestFilteredList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetDashboardParamsValidFilterFieldsRequestFilteringList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetDashboardParamsValidFilterFieldsRequest": { + "type": "structure", + "members": { + "filtered": { + "target": "com.metabase.api#GetDashboardParamsValidFilterFieldsRequestFilteredList", + "traits": { + "smithy.api#httpQuery": "filtered", + "smithy.api#required": {} + } + }, + "filtering": { + "target": "com.metabase.api#GetDashboardParamsValidFilterFieldsRequestFilteringList", + "traits": { + "smithy.api#httpQuery": "filtering" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamsValidFilterFields": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamsValidFilterFieldsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/params/valid-filter-fields", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/params/valid-filter-fields\n\nUtility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in\n parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each\n `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query\n with these Fields.\n\n e.g. in a chain filter query like\n\n GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100\n\n Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not\n filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1\n can be found. You can use this endpoint to determine which of those Fields is actually used:\n\n GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3\n ;; ->\n {1 [2 3]}\n\n Results are returned as a map of\n\n `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query" + } + }, + "com.metabase.api#CreateDashboardPivotDashboardDashcardCardQueryRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardPivotDashboardDashcardCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardPivotDashboardDashcardCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/pivot/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query\n\nRun a pivot table query for a specific DashCard." + } + }, + "com.metabase.api#GetDashboard": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/public", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/public\n\nFetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is\n enabled." + } + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesItemId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesItem": { + "type": "structure", + "members": { + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesItemId", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesItem" + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItemCardId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItemCard": { + "type": "structure", + "members": { + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItemCardId", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsItem": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_x": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_y": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "col": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "row": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "series": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItemSeriesList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItemCard", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestDashcardsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestTabsItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero." + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestTabsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateDashboardSaveRequestTabsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequestWidth": { + "type": "enum", + "members": { + "FIXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fixed" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardSaveRequest": { + "type": "structure", + "members": { + "auto_apply_filters": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashcards": { + "target": "com.metabase.api#CreateDashboardSaveRequestDashcardsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tabs": { + "target": "com.metabase.api#CreateDashboardSaveRequestTabsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "width": { + "target": "com.metabase.api#CreateDashboardSaveRequestWidth", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardSave": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardSaveRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/save", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/save\n\nSave a denormalized description of dashboard." + } + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem": { + "type": "structure", + "members": { + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList": { + "type": "list", + "member": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem" + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemCardId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemCard": { + "type": "structure", + "members": { + "dataset_query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemCardId", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItem": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_x": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_y": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "col": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "row": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "series": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItemCard", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsList": { + "type": "list", + "member": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsItem" + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestTabsItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero." + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestTabsList": { + "type": "list", + "member": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestTabsItem" + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequestWidth": { + "type": "enum", + "members": { + "FIXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fixed" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateDashboardSaveCollectionRequest": { + "type": "structure", + "members": { + "parent_collection_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "auto_apply_filters": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashcards": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestDashcardsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tabs": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestTabsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "width": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequestWidth", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDashboardSaveCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDashboardSaveCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/save/collection/{parent_collection_id}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/save/collection/{parent-collection-id}\n\nSave a denormalized description of dashboard into collection with ID `:parent-collection-id`." + } + }, + "com.metabase.api#CreateDashboardDashcardCardQueryRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashboard_load_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardDashcardCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardDashcardCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query\n\nRun the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it." + } + }, + "com.metabase.api#UpdateDashboardDashcardCardQueryRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#UpdateDashboardDashcardCardQueryRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "com.metabase.api#UpdateDashboardDashcardCardQueryRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pivot_results": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDashboardDashcardCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDashboardDashcardCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}\n\nRun the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return\n its results as a file in the specified format.\n\n `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint\n is normally used to power 'Download Results' buttons that use HTML `form` actions)." + } + }, + "com.metabase.api#GetDashboardDashcardExecuteRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaPrefetchParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardDashcardExecute": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardDashcardExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/execute", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute\n\nFetches the values for filling in execution parameters. Pass PK parameters and values to select." + } + }, + "com.metabase.api#MetabaseActionsSchemaExecuteParameterValuesStringKeys": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "value must map parameter ids to scalar values." + } + }, + "com.metabase.api#CreateDashboardDashcardExecuteRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaExecuteParameterValuesStringKeys", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardDashcardExecute": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardDashcardExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute\n\nExecute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values.\n `extra_parameters` should be the extra, user entered parameter values." + } + }, + "com.metabase.api#CreateDashboardPublicLinkRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{dashboard_id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{dashboard-id}/public_link\n\nGenerate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this\n Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public\n sharing must be enabled." + } + }, + "com.metabase.api#DeleteDashboardPublicLinkRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteDashboardPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteDashboardPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/dashboard/{dashboard_id}/public_link", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/dashboard/{dashboard-id}/public_link\n\nDelete the publicly-accessible link to this Dashboard." + } + }, + "com.metabase.api#CreateDashboardCopyRequest": { + "type": "structure", + "members": { + "from_dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_deep_copy": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardCopy": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardCopyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{from_dashboard_id}/copy", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{from-dashboard-id}/copy\n\nCopy a Dashboard." + } + }, + "com.metabase.api#GetDashboardByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}\n\nGet Dashboard with ID." + } + }, + "com.metabase.api#PutDashboardRequestWidth": { + "type": "enum", + "members": { + "FIXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fixed" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestEmbeddingParamsValue": { + "type": "enum", + "members": { + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disabled" + } + }, + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "enabled" + } + }, + "LOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "locked" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestEmbeddingParamsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutDashboardRequestEmbeddingParamsValue" + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestTabsItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero." + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestTabsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardRequestTabsItem" + }, + "traits": { + "smithy.api#documentation": "value must be seq of maps in which ids are unique" + } + }, + "com.metabase.api#PutDashboardRequestDashcardsItemInlineParametersList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestDashcardsItemSeriesItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestDashcardsItemSeriesList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardRequestDashcardsItemSeriesItem" + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestDashcardsItem": { + "type": "structure", + "members": { + "inline_parameters": { + "target": "com.metabase.api#PutDashboardRequestDashcardsItemInlineParametersList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "size_y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "col": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "row": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "series": { + "target": "com.metabase.api#PutDashboardRequestDashcardsItemSeriesList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardRequestDashcardsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardRequestDashcardsItem" + }, + "traits": { + "smithy.api#documentation": "value must be seq of maps in which ids are unique" + } + }, + "com.metabase.api#PutDashboardRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "enable_embedding": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "auto_apply_filters": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "width": { + "target": "com.metabase.api#PutDashboardRequestWidth" + }, + "embedding_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "show_in_getting_started": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "embedding_params": { + "target": "com.metabase.api#PutDashboardRequestEmbeddingParamsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tabs": { + "target": "com.metabase.api#PutDashboardRequestTabsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashcards": { + "target": "com.metabase.api#PutDashboardRequestDashcardsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/dashboard/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/dashboard/{id}\n\nUpdate a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same\n structure as the response from `GET /api/dashboard/:id`." + } + }, + "com.metabase.api#DeleteDashboardRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/dashboard/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/dashboard/{id}\n\nHard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id`\n\n This will remove also any questions/models/segments/metrics that use this database." + } + }, + "com.metabase.api#PutDashboardCardsRequestCardsItemInlineParametersList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutDashboardCardsRequestCardsItemSeriesItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardCardsRequestCardsItemSeriesList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardCardsRequestCardsItemSeriesItem" + }, + "traits": {} + }, + "com.metabase.api#PutDashboardCardsRequestCardsItem": { + "type": "structure", + "members": { + "inline_parameters": { + "target": "com.metabase.api#PutDashboardCardsRequestCardsItemInlineParametersList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_tab_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterMappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "size_x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "size_y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "col": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "row": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "series": { + "target": "com.metabase.api#PutDashboardCardsRequestCardsItemSeriesList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "action_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardCardsRequestCardsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardCardsRequestCardsItem" + }, + "traits": { + "smithy.api#documentation": "value must be seq of maps in which ids are unique" + } + }, + "com.metabase.api#PutDashboardCardsRequestTabsItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "position": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero." + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDashboardCardsRequestTabsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutDashboardCardsRequestTabsItem" + }, + "traits": { + "smithy.api#documentation": "value must be seq of maps in which ids are unique" + } + }, + "com.metabase.api#PutDashboardCardsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "cards": { + "target": "com.metabase.api#PutDashboardCardsRequestCardsList", + "traits": { + "smithy.api#documentation": "value must be seq of maps in which ids are unique", + "smithy.api#required": {} + } + }, + "tabs": { + "target": "com.metabase.api#PutDashboardCardsRequestTabsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutDashboardCards": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutDashboardCardsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/dashboard/{id}/cards", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/dashboard/{id}/cards\n\n(DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.)\n Update `Cards` and `Tabs` on a Dashboard. Request body should have the form:\n\n {:cards [{:id ... ; DashboardCard ID\n :size_x ...\n :size_y ...\n :row ...\n :col ...\n :parameter_mappings ...\n :series [{:id 123\n ...}]}\n ...]\n :tabs [{:id ... ; DashboardTab ID\n :name ...}]}" + } + }, + "com.metabase.api#GetDashboardItemsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardItems": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardItemsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/items", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/items\n\nGet Dashboard with ID." + } + }, + "com.metabase.api#GetDashboardParamRemappingRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/params/{param-key}/remapping\n\nFetch the remapped value for a given value of the parameter with ID `:param-key`.\n\n ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100\n GET /api/dashboard/1/params/abc/remapping?value=100" + } + }, + "com.metabase.api#GetDashboardParamSearchRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/params/{param_key}/search/{query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/params/{param-key}/search/{query}\n\nFetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict\n these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set\n ;; to 100\n GET /api/dashboard/1/params/abc/search/Cam?def=100\n\n Currently limited to first 1000 results." + } + }, + "com.metabase.api#GetDashboardParamValuesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/params/{param-key}/values\n\nFetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally\n restrict these values by passing query parameters like `other-parameter=value` e.g.\n\n ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100\n GET /api/dashboard/1/params/abc/values?def=100" + } + }, + "com.metabase.api#CreateDashboardPdfRequestPaperSize": { + "type": "enum", + "members": { + "A4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "a4" + } + }, + "LETTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "letter" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDashboardPdfRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "paper_size": { + "target": "com.metabase.api#CreateDashboardPdfRequestPaperSize", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardPdf": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardPdfRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dashboard/{id}/pdf", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dashboard/{id}/pdf\n\nRender Dashboard with ID to a PDF (server-side, the same way dashboard subscriptions render charts) and stream it\n back as a file download.\n\n `parameters` are runtime parameter overrides -- the same shape the dashcard query endpoints accept: a sequence of\n `{:id ... :value ...}` maps, or a JSON-encoded string of that sequence (the string form lets an HTML `
`\n action drive the download). Parameters left unspecified fall back to the dashboard's own defaults.\n\n `paper_size` is `\"a4\"` (default) or `\"letter\"`." + } + }, + "com.metabase.api#GetDashboardQueryMetadataRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardQueryMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardQueryMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/query_metadata\n\nGet all of the required query metadata for the cards on dashboard." + } + }, + "com.metabase.api#GetDashboardRelatedRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardRelated": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardRelatedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/dashboard/{id}/related", + "code": 200 + }, + "smithy.api#documentation": "GET /api/dashboard/{id}/related\n\nReturn related entities." + } + }, + "com.metabase.api#CreateDataStudioTableDiscardValueRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableDiscardValueRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableDiscardValueRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableDiscardValueRequest": { + "type": "structure", + "members": { + "database_ids": { + "target": "com.metabase.api#CreateDataStudioTableDiscardValueRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateDataStudioTableDiscardValueRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateDataStudioTableDiscardValueRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataStudioTableDiscardValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDataStudioTableDiscardValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/data-studio/table/discard-values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/data-studio/table/discard-values\n\nBatch version of /table/:id/discard_values. Takes an abstract table selection as /table/edit does." + } + }, + "com.metabase.api#MetabaseDataStudioApiTableDataAuthorities": { + "type": "enum", + "members": { + "COMPUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "computed" + } + }, + "AUTHORITATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authoritative" + } + }, + "UNCONFIGURED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unconfigured" + } + }, + "INGESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ingested" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseDataStudioApiTableDataLayers": { + "type": "enum", + "members": { + "FINAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "final" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableEditRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseDataStudioApiTableDataSources": { + "type": "enum", + "members": { + "SOURCE_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source-data" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknown" + } + }, + "INGESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ingested" + } + }, + "METABASE_TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-transform" + } + }, + "UPLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "upload" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableEditRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableEditRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableEditRequest": { + "type": "structure", + "members": { + "data_authority": { + "target": "com.metabase.api#MetabaseDataStudioApiTableDataAuthorities", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_layer": { + "target": "com.metabase.api#MetabaseDataStudioApiTableDataLayers", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "table_ids": { + "target": "com.metabase.api#CreateDataStudioTableEditRequestTableIdsList" + }, + "owner_email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_source": { + "target": "com.metabase.api#MetabaseDataStudioApiTableDataSources", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schema_ids": { + "target": "com.metabase.api#CreateDataStudioTableEditRequestSchemaIdsList" + }, + "entity_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "database_ids": { + "target": "com.metabase.api#CreateDataStudioTableEditRequestDatabaseIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataStudioTableEdit": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDataStudioTableEditRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/data-studio/table/edit", + "code": 200 + }, + "smithy.api#documentation": "POST /api/data-studio/table/edit\n\nBulk updating tables." + } + }, + "com.metabase.api#CreateDataStudioTableRescanValueRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableRescanValueRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableRescanValueRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableRescanValueRequest": { + "type": "structure", + "members": { + "database_ids": { + "target": "com.metabase.api#CreateDataStudioTableRescanValueRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateDataStudioTableRescanValueRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateDataStudioTableRescanValueRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataStudioTableRescanValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDataStudioTableRescanValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/data-studio/table/rescan-values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/data-studio/table/rescan-values\n\nBatch version of /table/:id/rescan_values. Takes an abstract table selection as /table/edit does." + } + }, + "com.metabase.api#CreateDataStudioTableSelectionRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSelectionRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSelectionRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSelectionRequest": { + "type": "structure", + "members": { + "database_ids": { + "target": "com.metabase.api#CreateDataStudioTableSelectionRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateDataStudioTableSelectionRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateDataStudioTableSelectionRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataStudioTableSelection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDataStudioTableSelectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/data-studio/table/selection", + "code": 200 + }, + "smithy.api#documentation": "POST /api/data-studio/table/selection\n\nGets information about selected tables" + } + }, + "com.metabase.api#CreateDataStudioTableSyncSchemaRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSyncSchemaRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSyncSchemaRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDataStudioTableSyncSchemaRequest": { + "type": "structure", + "members": { + "database_ids": { + "target": "com.metabase.api#CreateDataStudioTableSyncSchemaRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateDataStudioTableSyncSchemaRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateDataStudioTableSyncSchemaRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataStudioTableSyncSchema": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDataStudioTableSyncSchemaRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/data-studio/table/sync-schema", + "code": 200 + }, + "smithy.api#documentation": "POST /api/data-studio/table/sync-schema\n\nBatch version of /table/:id/sync_schema. Takes an abstract table selection as /table/edit does.\n - Currently checks policy before returning (so you might receive a 4xx on e.g. AuthZ policy failure)\n - The sync itself is however, asynchronous. This call may return before all tables synced." + } + }, + "com.metabase.api#GetDatabaseRequestInclude": { + "type": "enum", + "members": { + "TABLES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tables" + } + }, + "SCHEMAS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "schemas" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetDatabaseRequest": { + "type": "structure", + "members": { + "include": { + "target": "com.metabase.api#GetDatabaseRequestInclude", + "traits": { + "smithy.api#httpQuery": "include", + "smithy.api#documentation": "include must be either empty, 'tables', or 'schemas'" + } + }, + "include_analytics": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_analytics" + } + }, + "saved": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "saved" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "exclude_uneditable_details": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude_uneditable_details" + } + }, + "include_only_uploadable": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_only_uploadable" + } + }, + "router_database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "router_database_id" + } + }, + "can_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-query" + } + }, + "can_write_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-write-metadata" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database\n\nFetch all `Databases`.\n\n * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`.\n\n * `include=schemas` hydrates a `:schemas` list on each DB (only schemas with visible\n tables the current user can read), matching the per-DB `/api/database/:id/schemas`\n response. Lets clients avoid N round-trips when populating a database/schema picker.\n\n * `saved` means we should include the saved questions virtual database. Default: `false`.\n\n * `include_editable_data_model` will only include DBs for which the current user has data model editing\n permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if\n Enterprise Edition code is available the advanced-permissions feature is enabled.\n\n * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no\n effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.\n\n * `include_only_uploadable` will only include DBs into which Metabase can insert new data.\n\n * `can-query` will only include DBs for which the current user has query permissions. Default: `false`.\n\n * `can-write-metadata` will only include DBs for which the current user has data model editing permissions\n for at least one table in the database. Default: `false`.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for\n `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user\n lacks permission to change the database details." + } + }, + "com.metabase.api#CreateDatabaseRequestConnectionSource": { + "type": "enum", + "members": { + "ADMIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "admin" + } + }, + "SETUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "setup" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseSyncSchedulesExpandedSchedulesMap": { + "type": "structure", + "members": { + "cache_field_values": { + "target": "com.metabase.api#MetabaseUtilCronScheduleMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "metadata_sync": { + "target": "com.metabase.api#MetabaseUtilCronScheduleMap" + } + }, + "traits": { + "smithy.api#documentation": "value must be a valid map of schedule maps for a DB." + } + }, + "com.metabase.api#MetabaseUtilCronScheduleMap": { + "type": "structure", + "members": { + "schedule_day": { + "target": "com.metabase.api#MetabaseUtilCronScheduleMapScheduleDay", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedule_frame": { + "target": "com.metabase.api#MetabaseUtilCronScheduleMapScheduleFrame", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedule_hour": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedule_minute": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedule_type": { + "target": "com.metabase.api#MetabaseUtilCronScheduleMapScheduleType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "value must be a valid schedule map. See schema in metabase.util.cron for details." + } + }, + "com.metabase.api#MetabaseUtilCronScheduleMapScheduleDay": { + "type": "enum", + "members": { + "SUN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sun" + } + }, + "MON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mon" + } + }, + "TUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tue" + } + }, + "WED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "wed" + } + }, + "THU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "thu" + } + }, + "FRI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fri" + } + }, + "SAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sat" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseUtilCronScheduleMapScheduleFrame": { + "type": "enum", + "members": { + "FIRST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "first" + } + }, + "MID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mid" + } + }, + "LAST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseUtilCronScheduleMapScheduleType": { + "type": "enum", + "members": { + "HOURLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hourly" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily" + } + }, + "WEEKLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "weekly" + } + }, + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDatabaseRequest": { + "type": "structure", + "members": { + "provider_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "is_on_demand": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "engine": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid database engine.", + "smithy.api#required": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "is_full_sync": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "connection_source": { + "target": "com.metabase.api#CreateDatabaseRequestConnectionSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "auto_run_queries": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_stub": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedules": { + "target": "com.metabase.api#MetabaseSyncSchedulesExpandedSchedulesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database\n\nAdd a new `Database`." + } + }, + "com.metabase.api#CreateDatabaseSampleDatabase": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/sample_database", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/sample_database\n\nAdd the sample database as a new `Database`." + } + }, + "com.metabase.api#CreateDatabaseValidateRequestDetails": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "engine": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid database engine.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDatabaseValidateRequest": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#CreateDatabaseValidateRequestDetails", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabaseValidate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseValidateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/validate", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/validate\n\nValidate that we can connect to a database given a set of details." + } + }, + "com.metabase.api#GetDatabaseByIdRequestInclude": { + "type": "enum", + "members": { + "TABLES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tables" + } + }, + "TABLES_FIELDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tables.fields" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetDatabaseByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include": { + "target": "com.metabase.api#GetDatabaseByIdRequestInclude", + "traits": { + "smithy.api#httpQuery": "include" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "exclude_uneditable_details": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "exclude_uneditable_details" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}\n\nGet a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables\n belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the\n DB\n (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the\n returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata.\n\n Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in\n [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database`\n in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the\n database details." + } + }, + "com.metabase.api#PutDatabaseRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "provider_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "write_data_details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_on_demand": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "engine": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_full_sync": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "auto_run_queries": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_stub": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "admin_details": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "refingerprint": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schedules": { + "target": "com.metabase.api#MetabaseSyncSchedulesExpandedSchedulesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/database/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/database/{id}\n\nUpdate a `Database`." + } + }, + "com.metabase.api#DeleteDatabaseRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/database/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/database/{id}\n\nDelete a `Database`." + } + }, + "com.metabase.api#GetDatabaseAutocompleteSuggestionsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "prefix" + } + }, + "substring": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "substring" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseAutocompleteSuggestions": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseAutocompleteSuggestionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/autocomplete_suggestions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/autocomplete_suggestions\n\nReturn a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but\n `substring` will have priority if both are present.\n\n This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables`\n and `Fields` in this `Database`.\n\n Tables are returned in the format `[table_name \"Table\"]`;\n When Fields have a semantic_type, they are returned in the format `[field_name \"table_name base_type semantic_type\"]`\n When Fields lack a semantic_type, they are returned in the format `[field_name \"table_name base_type\"]`" + } + }, + "com.metabase.api#GetDatabaseCardAutocompleteSuggestionsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#required": {} + } + }, + "include_dashboard_questions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_dashboard_questions" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseCardAutocompleteSuggestions": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseCardAutocompleteSuggestionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/card_autocomplete_suggestions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/card_autocomplete_suggestions\n\nReturn a list of `Card` autocomplete suggestions for a given `query` in a given `Database`.\n\n This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. {{#...}}." + } + }, + "com.metabase.api#CreateDatabaseDiscardValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabaseDiscardValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseDiscardValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/{id}/discard_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/{id}/discard_values\n\nDiscards all saved field values for this `Database`." + } + }, + "com.metabase.api#CreateDatabaseDismissSpinnerRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabaseDismissSpinner": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseDismissSpinnerRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/{id}/dismiss_spinner", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/{id}/dismiss_spinner\n\nManually set the initial sync status of the `Database` and corresponding\n tables to be `complete` (see #20863)" + } + }, + "com.metabase.api#GetDatabaseFieldsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseFields": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseFieldsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/fields", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/fields\n\nGet a list of all `Fields` in `Database`." + } + }, + "com.metabase.api#MetabaseDriverConnectionConnectionType": { + "type": "enum", + "members": { + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + }, + "WRITE_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "write-data" + } + }, + "ADMIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "admin" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetDatabaseHealthcheckRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "connection_type": { + "target": "com.metabase.api#MetabaseDriverConnectionConnectionType", + "traits": { + "smithy.api#httpQuery": "connection-type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseHealthcheck": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseHealthcheckRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/healthcheck", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/healthcheck\n\nReports whether the database can currently connect" + } + }, + "com.metabase.api#GetDatabaseIdfieldsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseIdfields": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseIdfieldsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/idfields", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/idfields\n\nGet a list of all primary key `Fields` for `Database`." + } + }, + "com.metabase.api#GetDatabaseMetadataRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_hidden": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_hidden" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "remove_inactive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "remove_inactive" + } + }, + "skip_fields": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip_fields" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/metadata\n\nGet metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values.\n By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.\n\n Passing include_editable_data_model will only return tables for which the current user has data model editing\n permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present.\n In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID\n and tables, with no additional metadata." + } + }, + "com.metabase.api#CreateDatabaseRescanValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabaseRescanValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseRescanValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/{id}/rescan_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/{id}/rescan_values\n\nTrigger a manual scan of the field values for this `Database`." + } + }, + "com.metabase.api#GetDatabaseSchemaRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "schema" + } + }, + "include_hidden": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_hidden" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "can_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-query" + } + }, + "can_write_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-write-metadata" + } + }, + "include_measures": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_measures" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSchema": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSchemaRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/schema", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/schema\n\nReturn a list of Tables for a Database whose schema is the `schema` query parameter, or `nil` or an\n empty string when no `schema` is given. Unlike the `/:id/schema/:schema` route, the query parameter\n supports schema names containing slashes, which are rejected at the HTTP layer when percent-encoded in\n the URL path (#77353).\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for" + } + }, + "com.metabase.api#GetDatabaseSchemaBySchemaRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "include_hidden": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_hidden" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "can_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-query" + } + }, + "can_write_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-write-metadata" + } + }, + "include_measures": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_measures" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSchemaBySchema": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSchemaBySchemaRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/schema/{schema}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/schema/{schema}\n\nReturns a list of Tables for the given Database `id` and `schema`.\n\n Schema names containing slashes, backslashes, or percent signs are rejected at the HTTP layer when\n percent-encoded in the URL path; pass those as the `schema` query parameter of `GET /:id/schema/`\n instead (#77353).\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can query\n - `can-write-metadata=true` - filter to only tables the user can edit metadata for" + } + }, + "com.metabase.api#GetDatabaseSchemasRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + }, + "include_hidden": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_hidden" + } + }, + "can_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-query" + } + }, + "can_write_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-write-metadata" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSchemas": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSchemasRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/schemas", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/schemas\n\nReturns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables.\n\n Optional filters:\n - `can-query=true` - filter to only schemas containing tables the user can query\n - `can-write-metadata=true` - filter to only schemas containing tables the user can edit metadata for" + } + }, + "com.metabase.api#GetDatabaseSettingsAvailableRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSettingsAvailable": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSettingsAvailableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/settings-available", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/settings-available\n\nGet all database-local settings and their availability for the given database." + } + }, + "com.metabase.api#CreateDatabaseSyncSchemaRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatabaseSyncSchema": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatabaseSyncSchemaRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/database/{id}/sync_schema", + "code": 200 + }, + "smithy.api#documentation": "POST /api/database/{id}/sync_schema\n\nTrigger a manual update of the schema metadata for this `Database`." + } + }, + "com.metabase.api#GetDatabaseSyncableSchemasRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSyncableSchemas": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSyncableSchemasRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/syncable_schemas", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/syncable_schemas\n\nReturns a list of all syncable schemas found for the database `id`." + } + }, + "com.metabase.api#GetDatabaseUsageInfoRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseUsageInfo": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseUsageInfoRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{id}/usage_info", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{id}/usage_info\n\nGet usage info for a database.\n Returns a map with keys are models and values are the number of entities that use this database." + } + }, + "com.metabase.api#GetDatabaseDatasetsRequest": { + "type": "structure", + "members": { + "virtual_db": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseDatasets": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseDatasetsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{virtual_db}/datasets", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{virtual-db}/datasets\n\nReturns a list of all the datasets found for the saved questions virtual database." + } + }, + "com.metabase.api#GetDatabaseDatasetRequest": { + "type": "structure", + "members": { + "virtual_db": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseDataset": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseDatasetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{virtual_db}/datasets/{schema}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{virtual-db}/datasets/{schema}\n\nReturns a list of Tables for the datasets virtual database." + } + }, + "com.metabase.api#GetDatabaseMetadataRequest2": { + "type": "structure", + "members": { + "virtual_db": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseMetadata2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseMetadataRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{virtual_db}/metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{virtual-db}/metadata\n\nEndpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend\n and allowing it to treat the Saved Questions virtual DB just like any other database." + } + }, + "com.metabase.api#GetDatabaseSchemaBySchemaRequest2": { + "type": "structure", + "members": { + "virtual_db": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSchemaBySchema2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSchemaBySchemaRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{virtual_db}/schema/{schema}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{virtual-db}/schema/{schema}\n\nReturns a list of Tables for the saved questions virtual database." + } + }, + "com.metabase.api#GetDatabaseSchemasRequest2": { + "type": "structure", + "members": { + "virtual_db": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDatabaseSchemas2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDatabaseSchemasRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/database/{virtual_db}/schemas", + "code": 200 + }, + "smithy.api#documentation": "GET /api/database/{virtual-db}/schemas\n\nReturns a list of all the schemas found for the saved questions virtual database." + } + }, + "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrInternalQuery": { + "type": "union", + "members": { + "MetabaseLibBeSchemaInternalQuery": { + "target": "com.metabase.api#MetabaseLibBeSchemaInternalQuery" + }, + "MetabaseLibBeSchemaMaybeLegacyQuery": { + "target": "com.metabase.api#MetabaseLibSchemaQuery" + } + }, + "traits": { + "smithy.api#documentation": "value must be a valid MBQL query, or an internal audit query." + } + }, + "com.metabase.api#MetabaseLibBeSchemaInternalQuery": { + "type": "structure", + "members": { + "args": { + "target": "com.metabase.api#MetabaseLibBeSchemaInternalQueryArgsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "limit": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "offset": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A legacy internal audit query, e.g. `{:type :internal, :fn ...}`. These are not MBQL; the audit-app middleware\n validates the `:fn` and `:args` against the queries it defines." + } + }, + "com.metabase.api#MetabaseLibBeSchemaInternalQueryArgsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrInternalQuery", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDataset": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset\n\nExecute a query and retrieve the results in the usual format. The query will not use the cache." + } + }, + "com.metabase.api#CreateDatasetNativeRequest": { + "type": "structure", + "members": { + "database": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pretty": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatasetNative": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetNativeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/native", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/native\n\nFetch a native version of an MBQL query.\n\n Display path: workspace remapping is suppressed via\n [[ws.table-remapping/with-display-context]] so the user sees canonical-schema SQL\n in the 'Show me the SQL' panel. The query still executes against the workspace\n isolation schema at warehouse time (separate code path); this endpoint only\n affects what the user reads." + } + }, + "com.metabase.api#CreateDatasetParameterRemappingRequestFieldIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetParameterRemappingRequest": { + "type": "structure", + "members": { + "field_ids": { + "target": "com.metabase.api#CreateDatasetParameterRemappingRequestFieldIdsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter", + "traits": { + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatasetParameterRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetParameterRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/parameter/remapping", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/parameter/remapping\n\nReturn the remapped parameter values for cards or dashboards that are being edited." + } + }, + "com.metabase.api#UpdateDatasetParameterSearchRequestFieldIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#UpdateDatasetParameterSearchRequest": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "field_ids": { + "target": "com.metabase.api#UpdateDatasetParameterSearchRequestFieldIdsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDatasetParameterSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDatasetParameterSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/parameter/search/{query}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/parameter/search/{query}\n\nReturn parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`." + } + }, + "com.metabase.api#CreateDatasetParameterValueRequestFieldIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetParameterValueRequest": { + "type": "structure", + "members": { + "field_ids": { + "target": "com.metabase.api#CreateDatasetParameterValueRequestFieldIdsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameter": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatasetParameterValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetParameterValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/parameter/values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/parameter/values\n\nReturn parameter values for cards or dashboards that are being edited." + } + }, + "com.metabase.api#CreateDatasetPivotRequestPivotRowsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetPivotRequestDatabase": { + "type": "union", + "members": { + "MetabaseLibSchemaIdSavedQuestionsVirtualDatabase": { + "target": "smithy.api#Document" + }, + "MetabaseLibSchemaIdDatabase": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetPivotRequestPivotMeasuresList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetPivotRequestPivotColsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetPivotRequest": { + "type": "structure", + "members": { + "lib_metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/metadata" + } + }, + "show_column_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-column-totals", + "com.distilled.openapi#nullable": {} + } + }, + "pivot_rows": { + "target": "com.metabase.api#CreateDatasetPivotRequestPivotRowsList", + "traits": { + "smithy.api#jsonName": "pivot-rows", + "com.distilled.openapi#nullable": {} + } + }, + "update_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "update-row" + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "com.metabase.api#MetabaseLibSchemaSettingsSettings" + }, + "constraints": { + "target": "com.metabase.api#MetabaseLibSchemaConstraintsConstraints" + }, + "info": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfo" + }, + "show_row_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-row-totals", + "com.distilled.openapi#nullable": {} + } + }, + "middleware": { + "target": "com.metabase.api#MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions" + }, + "database": { + "target": "com.metabase.api#CreateDatasetPivotRequestDatabase" + }, + "pivot_measures": { + "target": "com.metabase.api#CreateDatasetPivotRequestPivotMeasuresList", + "traits": { + "smithy.api#jsonName": "pivot-measures", + "com.distilled.openapi#nullable": {} + } + }, + "stages": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "pivot_cols": { + "target": "com.metabase.api#CreateDatasetPivotRequestPivotColsList", + "traits": { + "smithy.api#jsonName": "pivot-cols", + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameters" + }, + "create_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "create-row" + } + }, + "was_pivot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by\n `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query\n results.", + "smithy.api#jsonName": "was-pivot", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatasetPivot": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetPivotRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/pivot", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/pivot\n\nGenerate a pivoted dataset for an ad-hoc query" + } + }, + "com.metabase.api#CreateDatasetQueryMetadataRequestPivotRowsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetQueryMetadataRequestDatabase": { + "type": "union", + "members": { + "MetabaseLibSchemaIdSavedQuestionsVirtualDatabase": { + "target": "smithy.api#Document" + }, + "MetabaseLibSchemaIdDatabase": { + "target": "smithy.api#Integer" + } + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetQueryMetadataRequestPivotMeasuresList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetQueryMetadataRequestPivotColsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateDatasetQueryMetadataRequest": { + "type": "structure", + "members": { + "lib_metadata": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/metadata" + } + }, + "show_column_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-column-totals", + "com.distilled.openapi#nullable": {} + } + }, + "pivot_rows": { + "target": "com.metabase.api#CreateDatasetQueryMetadataRequestPivotRowsList", + "traits": { + "smithy.api#jsonName": "pivot-rows", + "com.distilled.openapi#nullable": {} + } + }, + "update_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "update-row" + } + }, + "lib_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#jsonName": "lib/type" + } + }, + "settings": { + "target": "com.metabase.api#MetabaseLibSchemaSettingsSettings" + }, + "constraints": { + "target": "com.metabase.api#MetabaseLibSchemaConstraintsConstraints" + }, + "info": { + "target": "com.metabase.api#MetabaseLibSchemaInfoInfo" + }, + "show_row_totals": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "show-row-totals", + "com.distilled.openapi#nullable": {} + } + }, + "middleware": { + "target": "com.metabase.api#MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions" + }, + "database": { + "target": "com.metabase.api#CreateDatasetQueryMetadataRequestDatabase" + }, + "pivot_measures": { + "target": "com.metabase.api#CreateDatasetQueryMetadataRequestPivotMeasuresList", + "traits": { + "smithy.api#jsonName": "pivot-measures", + "com.distilled.openapi#nullable": {} + } + }, + "stages": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "pivot_cols": { + "target": "com.metabase.api#CreateDatasetQueryMetadataRequestPivotColsList", + "traits": { + "smithy.api#jsonName": "pivot-cols", + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseLibSchemaParameterParameters" + }, + "create_row": { + "target": "com.metabase.api#MetabaseLibSchemaActionsRow", + "traits": { + "smithy.api#jsonName": "create-row" + } + }, + "was_pivot": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by\n `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query\n results.", + "smithy.api#jsonName": "was-pivot", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDatasetQueryMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDatasetQueryMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/query_metadata\n\nGet all of the required query metadata for an ad-hoc query.\n\n You can pass `{:settings {:include-sensitive-fields true}}` in the query to include fields with\n visibility_type :sensitive in the response." + } + }, + "com.metabase.api#UpdateDatasetRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#UpdateDatasetRequest": { + "type": "structure", + "members": { + "export_format": { + "target": "com.metabase.api#UpdateDatasetRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "csv_include_bom": { + "target": "smithy.api#Boolean" + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "pivot_results": { + "target": "smithy.api#Boolean" + }, + "query": { + "target": "com.metabase.api#MetabaseLibBeSchemaMaybeLegacyOrInternalQuery", + "traits": { + "smithy.api#required": {} + } + }, + "visualization_settings": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDataset": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDatasetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/dataset/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/dataset/{export-format}\n\nExecute a query and download the result data as a file in the specified format." + } + }, + "com.metabase.api#GetDocument": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/document", + "code": 200 + }, + "smithy.api#documentation": "GET /api/document\n\nGets existing `Documents`." + } + }, + "com.metabase.api#CreateDocumentRequestCardsValueParameterMappingsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateDocumentRequestCardsValueResultMetadataList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateDocumentRequestCardsValue": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "entity_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#CreateDocumentRequestCardsValueParameterMappingsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "result_metadata": { + "target": "com.metabase.api#CreateDocumentRequestCardsValueResultMetadataList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateDocumentRequestCardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#CreateDocumentRequestCardsValue" + }, + "traits": {} + }, + "com.metabase.api#MetabaseDocumentsProseMirrorAst": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A prose-mirror document AST as it arrives at the API. Normalized to keyword keys, the same form the app-DB\n `:document` column transform yields." + } + }, + "com.metabase.api#CreateDocumentRequest": { + "type": "structure", + "members": { + "cards": { + "target": "com.metabase.api#CreateDocumentRequestCardsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "document": { + "target": "com.metabase.api#MetabaseDocumentsProseMirrorAst", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDocument": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDocumentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/document", + "code": 200 + }, + "smithy.api#documentation": "POST /api/document\n\nCreate a new `Document`." + } + }, + "com.metabase.api#GetDocument2": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/document/public", + "code": 200 + }, + "smithy.api#documentation": "GET /api/document/public\n\nList all Documents that have public links.\n\n Returns a sequence of Documents that have been publicly shared. Each Document includes its `:id`, `:name`,\n and `:public_uuid`. Documents are only actually accessible via the public endpoint if public sharing is\n currently enabled. Archived Documents are excluded from the results.\n\n This endpoint is used to populate the public links listing in the Admin settings UI.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting." + } + }, + "com.metabase.api#GetDocumentByDocumentIdRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDocumentByDocumentId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDocumentByDocumentIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/document/{document_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/document/{document-id}\n\nReturns an existing Document by ID." + } + }, + "com.metabase.api#PutDocumentRequestCardsValueParameterMappingsList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#PutDocumentRequestCardsValueResultMetadataList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#PutDocumentRequestCardsValue": { + "type": "structure", + "members": { + "visualization_settings": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "entity_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dataset_query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "parameter_mappings": { + "target": "com.metabase.api#PutDocumentRequestCardsValueParameterMappingsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "result_metadata": { + "target": "com.metabase.api#PutDocumentRequestCardsValueResultMetadataList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cache_ttl": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutDocumentRequestCardsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutDocumentRequestCardsValue" + }, + "traits": {} + }, + "com.metabase.api#PutDocumentRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cards": { + "target": "com.metabase.api#PutDocumentRequestCardsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "document": { + "target": "com.metabase.api#MetabaseDocumentsProseMirrorAst", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutDocument": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutDocumentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/document/{document_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/document/{document-id}\n\nUpdates an existing `Document`." + } + }, + "com.metabase.api#DeleteDocumentRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteDocument": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteDocumentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/document/{document_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/document/{document-id}\n\nPermanently deletes an archived Document." + } + }, + "com.metabase.api#UpdateDocumentCardQueryRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pivot_results": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDocumentCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDocumentCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/document/{document_id}/card/{card_id}/query/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/document/{document-id}/card/{card-id}/query/{export-format}\n\nDownload query results for a Card embedded in a Document.\n\n Returns query results in the requested format. The user must have read access to the document\n to download results. If the card's query fails, standard query error responses are returned.\n\n Route parameters:\n - document-id: ID of the document containing the card\n - card-id: ID of the card to download results from\n - export-format: Output format (csv, xlsx, json)\n\n Body parameters (snake_case):\n - parameters: Optional query parameters (array of maps or JSON string)\n - format_rows: Whether to apply formatting to results (boolean, default false)\n - pivot_results: Whether to pivot results (boolean, default false)" + } + }, + "com.metabase.api#CreateDocumentPublicLinkRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDocumentPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDocumentPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/document/{document_id}/public-link", + "code": 200 + }, + "smithy.api#documentation": "POST /api/document/{document-id}/public-link\n\nGenerate a publicly-accessible UUID for a Document.\n\n Creates a public link that allows viewing the Document without authentication. If the Document already has\n a public UUID, returns the existing one rather than generating a new one. This enables sharing the Document\n via `GET /api/ee/public/document/:uuid`.\n\n Returns a map containing `:uuid` (the public UUID string).\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting." + } + }, + "com.metabase.api#DeleteDocumentPublicLinkRequest": { + "type": "structure", + "members": { + "document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteDocumentPublicLink": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteDocumentPublicLinkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/document/{document_id}/public-link", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/document/{document-id}/public-link\n\nRemove the public link for a Document.\n\n Deletes the public UUID from the Document, making it no longer accessible via the public sharing endpoint.\n This revokes public access to the Document - the existing public link will no longer work.\n\n Returns a 204 No Content response on success.\n\n Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting.\n Throws a 404 if the Document doesn't exist, is archived, or doesn't have a public link." + } + }, + "com.metabase.api#CreateDocumentCopyRequest": { + "type": "structure", + "members": { + "from_document_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDocumentCopy": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDocumentCopyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/document/{from_document_id}/copy", + "code": 200 + }, + "smithy.api#documentation": "POST /api/document/{from-document-id}/copy\n\nCopy a Document." + } + }, + "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionIdOrExpression": { + "type": "union", + "members": { + "MetabaseEnterpriseActionV2ApiApiActionId": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionId" + }, + "MetabaseEnterpriseActionV2ApiApiActionExpression": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#documentation": "All the various ways of referring to an action with the v2 APIs." + } + }, + "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionId": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Primitive actions, saved actions, and packed encodings from the picker." + } + }, + "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "A map from parameter name / column name to a value. Keys are keywords: the request decoder keywordizes map keys and\n the handler reads them via `(keyword ...)`, so the FE never sends anything else.\n\n Same shape as [[metabase.actions.schema/execute-parameter-values]] and for the same two reasons. Decoding sees a\n permissive `[:map-of :keyword :any]`, because `:map-of` *drops* an entry whose value fails rather than rejecting\n it -- a bad cell would silently go missing from the write instead of 400ing. And `parameter.value` must be\n validated against rather than decoded through: its `:decode/normalize` rewrites a bad value to `nil`, which for an\n action that writes would store NULL instead of rejecting the request." + } + }, + "com.metabase.api#MetabaseActionsTypesScopeRaw": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase2" + }, + "Case3": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase3" + }, + "Case4": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase4" + }, + "Case5": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase5" + }, + "Case6": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase6" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase0": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "dashboard-id" + } + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase1": { + "type": "structure", + "members": { + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "dashcard-id" + } + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase2": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "card-id" + } + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase3": { + "type": "structure", + "members": { + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "model-id" + } + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase4": { + "type": "structure", + "members": { + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "table-id" + } + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase5": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String" + }, + "webhook_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "webhook-id" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase6Unknown": { + "type": "enum", + "members": { + "MODEL_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model-action" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseActionsTypesScopeRawCase6": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String" + }, + "unknown": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRawCase6Unknown", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeActionV2ExecuteRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionIdOrExpression", + "traits": { + "smithy.api#required": {} + } + }, + "input": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap" + }, + "params": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap" + }, + "scope": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRaw", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeActionV2Execute": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeActionV2ExecuteRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/action-v2/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/action-v2/execute\n\nExecute an action with a single input.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `input` - a single map. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for `input`.\n\n Returns the outputs from the performed action." + } + }, + "com.metabase.api#CreateEeActionV2ExecuteBulkRequestInputsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap" + }, + "traits": {} + }, + "com.metabase.api#CreateEeActionV2ExecuteBulkRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionIdOrExpression", + "traits": { + "smithy.api#required": {} + } + }, + "inputs": { + "target": "com.metabase.api#CreateEeActionV2ExecuteBulkRequestInputsList", + "traits": { + "smithy.api#required": {} + } + }, + "params": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap" + }, + "scope": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRaw", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeActionV2ExecuteBulk": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeActionV2ExecuteBulkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/action-v2/execute-bulk", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/action-v2/execute-bulk\n\nExecute an action with multiple inputs.\n\n This is typically more efficient than calling execute with each input individually, for example by performing batch\n SQL operations.\n\n Takes:\n - `action` - an identifier or an expression for what we want to execute.\n - `scope` - where the action is being invoked from.\n - `inputs` - a list of maps. currently these are typically a database table row pk, or query result.\n - `params` (optional) - a map of values for the parameters taken by the action's mapping.\n\n The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn.\n If there is no mapping, `params` are simply used as overrides for each map within `inputs`.\n\n Returns the outputs from the performed action." + } + }, + "com.metabase.api#CreateEeActionV2ExecuteFormRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiApiActionIdOrExpression", + "traits": { + "smithy.api#required": {} + } + }, + "input": { + "target": "com.metabase.api#MetabaseEnterpriseActionV2ApiActionValueMap" + }, + "scope": { + "target": "com.metabase.api#MetabaseActionsTypesScopeRaw", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeActionV2ExecuteForm": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeActionV2ExecuteFormRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/action-v2/execute-form", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/action-v2/execute-form\n\nTemporary endpoint for describing an actions parameters\n such that they can be presented correctly in a modal ahead of execution." + } + }, + "com.metabase.api#GetEeAdvancedPermissionsApplicationGraph": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/advanced-permissions/application/graph", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/advanced-permissions/application/graph\n\nFetch a graph of Application Permissions." + } + }, + "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap" + }, + "traits": {} + }, + "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequest": { + "type": "structure", + "members": { + "skip_graph": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip-graph" + } + }, + "force": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "force" + } + }, + "groups": { + "target": "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap", + "traits": { + "smithy.api#required": {} + } + }, + "revision": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeAdvancedPermissionsApplicationGraph": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeAdvancedPermissionsApplicationGraphRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/advanced-permissions/application/graph", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/advanced-permissions/application/graph\n\nDo a batch update of Application Permissions by passing a modified graph." + } + }, + "com.metabase.api#GetEeAdvancedPermissionsImpersonationRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "group_id" + } + }, + "db_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "db_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeAdvancedPermissionsImpersonation": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeAdvancedPermissionsImpersonationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/advanced-permissions/impersonation", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/advanced-permissions/impersonation\n\nFetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id`\n are provided." + } + }, + "com.metabase.api#DeleteEeAdvancedPermissionsImpersonationRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeAdvancedPermissionsImpersonation": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeAdvancedPermissionsImpersonationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/advanced-permissions/impersonation/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/advanced-permissions/impersonation/{id}\n\nDelete a Connection Impersonation entry." + } + }, + "com.metabase.api#GetEeAiControlsPermissions": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/permissions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/permissions\n\nList all metabot permissions for all groups, filling in defaults for missing entries." + } + }, + "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItemPermType": { + "type": "enum", + "members": { + "PERMISSION_METABOT_NLQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "permission/metabot-nlq" + } + }, + "PERMISSION_METABOT_SQL_GENERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "permission/metabot-sql-generation" + } + }, + "PERMISSION_METABOT_OTHER_TOOLS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "permission/metabot-other-tools" + } + }, + "PERMISSION_METABOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "permission/metabot" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItemPermValue": { + "type": "enum", + "members": { + "YES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "yes" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItem": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "perm_type": { + "target": "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItemPermType", + "traits": { + "smithy.api#required": {} + } + }, + "perm_value": { + "target": "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItemPermValue", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsItem" + }, + "traits": {} + }, + "com.metabase.api#PutEeAiControlsPermissionsRequest": { + "type": "structure", + "members": { + "permissions": { + "target": "com.metabase.api#PutEeAiControlsPermissionsRequestPermissionsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeAiControlsPermissions": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeAiControlsPermissionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/ai-controls/permissions", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/ai-controls/permissions\n\nUpdate metabot permissions for all groups. Upserts each permission entry and returns the full\n permissions list with defaults filled in." + } + }, + "com.metabase.api#CreateEeAiControlsPermissionsAdvanced": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/ai-controls/permissions/advanced", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/ai-controls/permissions/advanced\n\nSwitch to advanced group-level permissions. Removes any custom permissions from the All Users group." + } + }, + "com.metabase.api#DeleteEeAiControlsPermissionsAdvanced": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/ai-controls/permissions/advanced", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/ai-controls/permissions/advanced\n\nSwitch back to simple permissions. Removes any custom permissions from all specific groups, keeping only Admins and All Users." + } + }, + "com.metabase.api#GetEeAiControlsUsageGroup": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/usage/group", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/usage/group\n\nGet all group-level metabot usage limits." + } + }, + "com.metabase.api#GetEeAiControlsUsageGroupByGroupIdRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeAiControlsUsageGroupByGroupId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeAiControlsUsageGroupByGroupIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/usage/group/{group_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/usage/group/{group-id}\n\nGet the metabot usage limit for a specific group. Returns `max_usage: null` if no limit is set." + } + }, + "com.metabase.api#PutEeAiControlsUsageGroupRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "max_usage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeAiControlsUsageGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeAiControlsUsageGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/ai-controls/usage/group/{group_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/ai-controls/usage/group/{group-id}\n\nSet or update the metabot usage limit for a specific group. Pass `max_usage: null` to remove the limit." + } + }, + "com.metabase.api#GetEeAiControlsUsageInstance": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/usage/instance", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/usage/instance\n\nGet the instance-wide metabot usage limit. Returns `max_usage: null` if no limit is set (unlimited)." + } + }, + "com.metabase.api#PutEeAiControlsUsageInstanceRequest": { + "type": "structure", + "members": { + "max_usage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeAiControlsUsageInstance": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeAiControlsUsageInstanceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/ai-controls/usage/instance", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/ai-controls/usage/instance\n\nSet or update the instance-wide metabot usage limit. Pass `max_usage: null` to remove the limit (unlimited)." + } + }, + "com.metabase.api#GetEeAiControlsUsageTenant": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/usage/tenant", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/usage/tenant\n\nGet all tenant-level metabot usage limits." + } + }, + "com.metabase.api#GetEeAiControlsUsageTenantByTenantIdRequest": { + "type": "structure", + "members": { + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeAiControlsUsageTenantByTenantId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeAiControlsUsageTenantByTenantIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/ai-controls/usage/tenant/{tenant_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/ai-controls/usage/tenant/{tenant-id}\n\nGet the metabot usage limit for a specific tenant. Returns `max_usage: null` if no limit is set." + } + }, + "com.metabase.api#PutEeAiControlsUsageTenantRequest": { + "type": "structure", + "members": { + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "max_usage": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeAiControlsUsageTenant": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeAiControlsUsageTenantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/ai-controls/usage/tenant/{tenant_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/ai-controls/usage/tenant/{tenant-id}\n\nSet or update the metabot usage limit for a specific tenant. Pass `max_usage: null` to remove the limit." + } + }, + "com.metabase.api#CreateEeAuditAppAnalyticsDevExport": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/audit-app/analytics-dev/export", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/audit-app/analytics-dev/export\n\nExport analytics content as a .tar.gz file for local development.\n\n Only available when MB_ANALYTICS_DEV_MODE=true. Returns a tarball containing\n the analytics YAMLs in canonical format, ready to commit to source control.\n\n Requires superuser permissions." + } + }, + "com.metabase.api#GetEeAuditAppUserAuditInfo": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/audit-app/user/audit-info", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/audit-app/user/audit-info\n\nGets audit info for the current user if he has permissions to access the audit collection.\n Otherwise return an empty map." + } + }, + "com.metabase.api#DeleteEeAuditAppUserSubscriptionsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeAuditAppUserSubscriptions": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeAuditAppUserSubscriptionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/audit-app/user/{id}/subscriptions", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/audit-app/user/{id}/subscriptions\n\nDelete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them).\n Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user." + } + }, + "com.metabase.api#GetEeBilling": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/billing", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/billing\n\nGet billing information. This acts as a proxy between `metabase-billing-info-url` and the client,\n using the embedding token and signed in user's email to fetch the billing information." + } + }, + "com.metabase.api#GetEeCloudAddOnsAddons": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/cloud-add-ons/addons", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/cloud-add-ons/addons\n\nGet addons information from the Metabase Store API." + } + }, + "com.metabase.api#GetEeCloudAddOnsPlans": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/cloud-add-ons/plans", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/cloud-add-ons/plans\n\nGet plans information from the Metabase Store API." + } + }, + "com.metabase.api#UpdateEeCloudAddOnsRequestProductType": { + "type": "enum", + "members": { + "METABASE_AI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai" + } + }, + "METABASE_AI_TIERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai-tiered" + } + }, + "METABASE_AI_MANAGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai-managed" + } + }, + "PYTHON_EXECUTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "python-execution" + } + }, + "TRANSFORMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms" + } + }, + "TRANSFORMS_BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-basic" + } + }, + "TRANSFORMS_ADVANCED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-advanced" + } + }, + "TRANSFORMS_BASIC_METERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-basic-metered" + } + }, + "TRANSFORMS_ADVANCED_METERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-advanced-metered" + } + }, + "DWH_RENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dwh-rent" + } + }, + "ETL_CONNECTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "etl-connections" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeCloudAddOnsRequest": { + "type": "structure", + "members": { + "product_type": { + "target": "com.metabase.api#UpdateEeCloudAddOnsRequestProductType", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "quantity": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "terms_of_service": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateEeCloudAddOns": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateEeCloudAddOnsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/cloud-add-ons/{product_type}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/cloud-add-ons/{product-type}\n\nPurchase an add-on." + } + }, + "com.metabase.api#DeleteEeCloudAddOnsRequestProductType": { + "type": "enum", + "members": { + "METABASE_AI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai" + } + }, + "METABASE_AI_TIERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai-tiered" + } + }, + "METABASE_AI_MANAGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-ai-managed" + } + }, + "PYTHON_EXECUTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "python-execution" + } + }, + "TRANSFORMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms" + } + }, + "TRANSFORMS_BASIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-basic" + } + }, + "TRANSFORMS_ADVANCED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-advanced" + } + }, + "TRANSFORMS_BASIC_METERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-basic-metered" + } + }, + "TRANSFORMS_ADVANCED_METERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transforms-advanced-metered" + } + }, + "DWH_RENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dwh-rent" + } + }, + "ETL_CONNECTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "etl-connections" + } + } + }, + "traits": {} + }, + "com.metabase.api#DeleteEeCloudAddOnsRequest": { + "type": "structure", + "members": { + "product_type": { + "target": "com.metabase.api#DeleteEeCloudAddOnsRequestProductType", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeCloudAddOns": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeCloudAddOnsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/cloud-add-ons/{product_type}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/cloud-add-ons/{product-type}\n\nRemove an add-on." + } + }, + "com.metabase.api#UpdateEeCloudProxyRequestBody": { + "type": "structure", + "members": { + "force_end_trial": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "force-end-trial" + } + }, + "new_plan_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "new-plan-alias" + } + }, + "plan_alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "plan-alias" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeCloudProxyRequest": { + "type": "structure", + "members": { + "operation_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "body": { + "target": "com.metabase.api#UpdateEeCloudProxyRequestBody", + "traits": { + "smithy.api#httpPayload": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateEeCloudProxy": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateEeCloudProxyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/cloud-proxy/{operation_id}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/cloud-proxy/{operation-id}\n\nProxy a call to the Metabase Store API via harbormaster client.\n This endpoint is used only for hosted instances, and calls Harbormaster Store using a OpenAPI client.\n :operation-id is the operation-id of the Harbormaster Store endpoint.\n All parameters for the operation are taken in the POST body." + } + }, + "com.metabase.api#GetEeContentTranslationCsv": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/content-translation/csv", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/content-translation/csv\n\nProvides content translation dictionary in CSV" + } + }, + "com.metabase.api#GetEeContentTranslationDictionaryRequest": { + "type": "structure", + "members": { + "locale": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "locale", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeContentTranslationDictionary": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeContentTranslationDictionaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/content-translation/dictionary", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/content-translation/dictionary\n\nFetch the content translation dictionary for authenticated users (auth-based embedding flows)." + } + }, + "com.metabase.api#GetEeContentTranslationDictionaryByTokenRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeContentTranslationDictionaryByToken": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeContentTranslationDictionaryByTokenRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/content-translation/dictionary/{token}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/content-translation/dictionary/{token}\n\nFetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`." + } + }, + "com.metabase.api#CreateEeContentTranslationUploadDictionaryRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeContentTranslationUploadDictionaryRequest": { + "type": "structure", + "members": { + "file": { + "target": "com.metabase.api#CreateEeContentTranslationUploadDictionaryRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeContentTranslationUploadDictionary": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeContentTranslationUploadDictionaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/content-translation/upload-dictionary", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/ee/content-translation/upload-dictionary\n\nUpload a CSV of content translations", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#GetEeCustomVizPlugin": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin\n\nList all registered custom visualization plugins." + } + }, + "com.metabase.api#CreateEeCustomVizPluginRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeCustomVizPluginRequest": { + "type": "structure", + "members": { + "file": { + "target": "com.metabase.api#CreateEeCustomVizPluginRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeCustomVizPlugin": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeCustomVizPluginRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/custom-viz-plugin", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/ee/custom-viz-plugin\n\nRegister a new custom visualization plugin from an uploaded tar.gz bundle.\n\n The archive must contain `metabase-plugin.json` at the root and\n `dist/index.js` for the JS bundle. The only static asset served from the bundle\n is the manifest `icon` (under `dist/assets/`); plugins do not ship arbitrary\n assets. The plugin's `identifier` is taken from the manifest's `name` field.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#CreateEeCustomVizPluginDevRequest": { + "type": "structure", + "members": { + "dev_bundle_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "identifier": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeCustomVizPluginDev": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeCustomVizPluginDevRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/custom-viz-plugin/dev", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/custom-viz-plugin/dev\n\nRegister a dev-only custom visualization plugin from a local dev server.\n No bundle upload is required — files are served from the dev server URL.\n Requires custom viz plugin dev mode to be enabled." + } + }, + "com.metabase.api#GetEeCustomVizPluginList": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin/list", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin/list\n\nList active and enabled custom visualization plugins. Available to any authenticated user.\n Plugins with incompatible Metabase version requirements are excluded.\n Dev-only plugins are excluded when dev mode is disabled." + } + }, + "com.metabase.api#GetEeCustomVizPluginSandboxHost": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin/sandbox-host", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin/sandbox-host\n\nServe a minimal HTML document used as the iframe `src` for the near-membrane custom-viz\n sandbox. The response carries a per-document `Content-Security-Policy` that permits\n `'unsafe-eval'` only inside this iframe, so the main Metabase document keeps its strict\n nonce-based CSP." + } + }, + "com.metabase.api#PutEeCustomVizPluginRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "enabled": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeCustomVizPlugin": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeCustomVizPluginRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/custom-viz-plugin/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/custom-viz-plugin/{id}\n\nUpdate a custom visualization plugin. Currently only `enabled` may be toggled." + } + }, + "com.metabase.api#DeleteEeCustomVizPluginRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeCustomVizPlugin": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeCustomVizPluginRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/custom-viz-plugin/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/custom-viz-plugin/{id}\n\nRemove a custom visualization plugin and evict its on-disk cache." + } + }, + "com.metabase.api#GetEeCustomVizPluginAssetRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "path", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeCustomVizPluginAsset": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeCustomVizPluginAssetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin/{id}/asset", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin/{id}/asset\n\nServe the plugin's icon image from its bundle.\n The asset path is passed as a `path` query parameter (e.g. `?path=icon.svg`)\n and must match the manifest `icon`. Only the icon is served — plugins do not\n ship arbitrary assets.\n In dev mode, proxies from the dev base URL if set." + } + }, + "com.metabase.api#GetEeCustomVizPluginBundleRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeCustomVizPluginBundle": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeCustomVizPluginBundleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin/{id}/bundle", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin/{id}/bundle\n\nServe the JS bundle for a plugin from the on-disk cache.\n Returns application/javascript with ETag and Cache-Control headers.\n In dev mode, proxies from `dev_bundle_url` if set." + } + }, + "com.metabase.api#PutEeCustomVizPluginBundleRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater or equal to than zero.", + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeCustomVizPluginBundleRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "file": { + "target": "com.metabase.api#PutEeCustomVizPluginBundleRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeCustomVizPluginBundle": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeCustomVizPluginBundleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/custom-viz-plugin/{id}/bundle", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "PUT /api/ee/custom-viz-plugin/{id}/bundle\n\nReplace the bundle for an existing plugin. Accepts a multipart tar.gz upload in\n the same format as the `POST /` endpoint. The manifest's `name` field must\n match the plugin's existing `identifier`.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#GetEeCustomVizPluginDevSseRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeCustomVizPluginDevSse": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeCustomVizPluginDevSseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/custom-viz-plugin/{id}/dev-sse", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/custom-viz-plugin/{id}/dev-sse\n\nProxy Server-Sent Events from the plugin's dev server.\n Connects to `{dev_bundle_url}/__sse` and forwards events to the browser.\n This avoids the need for a CSP exception for the dev server origin.\n Requires custom viz plugin dev mode to be enabled." + } + }, + "com.metabase.api#PutEeCustomVizPluginDevUrlRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dev_bundle_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeCustomVizPluginDevUrl": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeCustomVizPluginDevUrlRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/custom-viz-plugin/{id}/dev-url", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/custom-viz-plugin/{id}/dev-url\n\nSet or clear the dev base URL for a plugin (e.g. `http://localhost:5174`).\n The bundle is fetched from `{base}/index.js` and assets from `{base}/assets/{name}`.\n Persisted to the database so it survives server restarts.\n Requires custom viz plugin dev mode to be enabled." + } + }, + "com.metabase.api#CreateEeCustomVizPluginRefreshRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeCustomVizPluginRefresh": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeCustomVizPluginRefreshRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/custom-viz-plugin/{id}/refresh", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/custom-viz-plugin/{id}/refresh\n\nRe-fetch the manifest from the dev server for a dev-only plugin. For uploaded\n plugins this is a no-op — to update an upload-backed plugin, PUT a new bundle\n to `/:id/bundle`." + } + }, + "com.metabase.api#GetEeDataComplexityScoreComplexityRequest": { + "type": "structure", + "members": { + "force_recalculation": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "force-recalculation" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDataComplexityScoreComplexity": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDataComplexityScoreComplexityRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/data-complexity-score/complexity", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/data-complexity-score/complexity\n\nReturn the most recently stored Data Complexity Score for this instance.\n Pass `force-recalculation=true` to recompute, persist, and return a fresh score.\n Superuser-only." + } + }, + "com.metabase.api#CreateEeDataStudioTablePublishTableRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTablePublishTableRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTablePublishTableRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTablePublishTableRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "database_ids": { + "target": "com.metabase.api#CreateEeDataStudioTablePublishTableRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateEeDataStudioTablePublishTableRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateEeDataStudioTablePublishTableRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeDataStudioTablePublishTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeDataStudioTablePublishTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/data-studio/table/publish-tables", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/data-studio/table/publish-tables\n\nSet collection for each of selected tables and all upstream dependencies recursively." + } + }, + "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestTableIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequest": { + "type": "structure", + "members": { + "database_ids": { + "target": "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList" + }, + "schema_ids": { + "target": "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList" + }, + "table_ids": { + "target": "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequestTableIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeDataStudioTableUnpublishTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeDataStudioTableUnpublishTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/data-studio/table/unpublish-tables", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/data-studio/table/unpublish-tables\n\nUnset collection for each of selected tables and all downstream dependents recursively." + } + }, + "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType": { + "type": "enum", + "members": { + "INCLUSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inclusion" + } + }, + "EXCLUSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclusion" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters": { + "type": "structure", + "members": { + "schema_filters_patterns": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "schema-filters-patterns" + } + }, + "schema_filters_type": { + "target": "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "schema-filters-type" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "replicationSchemaFilters": { + "target": "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/database-replication/connection/{database_id}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/database-replication/connection/{database-id}\n\nCreate a new PG replication connection for the specified database." + } + }, + "com.metabase.api#DeleteEeDatabaseReplicationConnectionDatabaseRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeDatabaseReplicationConnectionDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeDatabaseReplicationConnectionDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/database-replication/connection/{database_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/database-replication/connection/{database-id}\n\nDelete PG replication connection for the specified database." + } + }, + "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType": { + "type": "enum", + "members": { + "INCLUSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "inclusion" + } + }, + "EXCLUSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclusion" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters": { + "type": "structure", + "members": { + "schema_filters_patterns": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "schema-filters-patterns" + } + }, + "schema_filters_type": { + "target": "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "schema-filters-type" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "replicationSchemaFilters": { + "target": "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreview": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreviewRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/database-replication/connection/{database_id}/preview", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/database-replication/connection/{database-id}/preview\n\nReturn info about pg-replication connection that is about to be created." + } + }, + "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequest": { + "type": "structure", + "members": { + "check_connection_details": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "check_connection_details" + } + }, + "destinations": { + "target": "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList", + "traits": { + "smithy.api#required": {} + } + }, + "router_database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/database-routing/destination-database", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/database-routing/destination-database\n\nCreate new Destination Databases.\n\n Note that unlike the normal `POST /api/database` endpoint, this endpoint does not test that the database is actually\n reachable before adding it — destination details are not required to be valid at creation time, and an\n unreachable destination is fine." + } + }, + "com.metabase.api#PutEeDatabaseRoutingRouterDatabaseRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "user_attribute": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeDatabaseRoutingRouterDatabase": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeDatabaseRoutingRouterDatabaseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/database-routing/router-database/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/database-routing/router-database/{id}\n\nUpdates an existing Database with the `user_attribute` to route on. Will either:\n - turn an existing Database into a Router database\n - change the `user_attribute` used to route for an existing Router database, or\n - turn a Router database into a regular Database\n depending on the value of `user_attribute`" + } + }, + "com.metabase.api#GetEeDependenciesBackfillStatus": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/backfill-status", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/backfill-status\n\nReturns whether the dependency backfill has pending work.\n `complete` is true when there are no stale or outdated entities awaiting processing." + } + }, + "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes": { + "type": "enum", + "members": { + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "SNIPPET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "snippet" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "SANDBOX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sandbox" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes", + "traits": { + "smithy.api#httpQuery": "type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDependenciesGraph": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDependenciesGraphRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/graph", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/graph\n\nThis endpoint takes an :id and a supported entity :type, and returns a graph of all its upstream dependencies.\n The graph is represented by a list of :nodes and a list of :edges. Each node has an :id, :type, :data (which\n depends on the node type), and a map of :dependent_counts per entity type. Each edge is a :model/Dependency." + } + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestTypes": { + "type": "union", + "members": { + "MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase0": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase1Item": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase1Item" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypes": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase0" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestSortColumn": { + "type": "enum", + "members": { + "DEPENDENTS_WITH_ERRORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependents-with-errors" + } + }, + "DEPENDENTS_ERRORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependents-errors" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "LOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBreakingRequest": { + "type": "structure", + "members": { + "types": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestTypes", + "traits": { + "smithy.api#httpQuery": "types" + } + }, + "card_types": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestCardTypes", + "traits": { + "smithy.api#httpQuery": "card-types" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "include_personal_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-personal-collections" + } + }, + "sort_column": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDependenciesGraphBreaking": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDependenciesGraphBreakingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/graph/breaking", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/graph/breaking\n\nReturns a list of entities that are breaking other entities (sources of errors).\n These are tables or cards that other entities depend on, where those dependents\n have validation errors traced back to this source entity.\n\n Accepts optional parameters for filtering:\n - `types`: List of source entity types - only `:card` or `:table` (default: both)\n - `card-types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`)\n - `query`: Search string to filter by name or location\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of breaking source entities\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit" + } + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentTypes": { + "type": "union", + "members": { + "MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase0": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypes": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase0" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestSortColumn": { + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "VIEW_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "view-count" + } + }, + "LOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphBrokenRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#required": {} + } + }, + "dependent_types": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentTypes", + "traits": { + "smithy.api#httpQuery": "dependent-types" + } + }, + "dependent_card_types": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestDependentCardTypes", + "traits": { + "smithy.api#httpQuery": "dependent-card-types" + } + }, + "include_personal_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-personal-collections" + } + }, + "sort_column": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDependenciesGraphBroken": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDependenciesGraphBrokenRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/graph/broken", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/graph/broken\n\nReturns the broken dependents for a specific source entity.\n These are entities that have validation errors traced back to the specified source.\n\n Required parameters:\n - `id`: The ID of the source entity\n - `type`: The type of the source entity (card, table)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)" + } + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentTypes": { + "type": "union", + "members": { + "MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase0": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypes": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase0" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestSortColumn": { + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "VIEW_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "view-count" + } + }, + "LOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphDependentsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes", + "traits": { + "smithy.api#httpQuery": "type", + "smithy.api#required": {} + } + }, + "dependent_types": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentTypes", + "traits": { + "smithy.api#httpQuery": "dependent-types" + } + }, + "dependent_card_types": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestDependentCardTypes", + "traits": { + "smithy.api#httpQuery": "dependent-card-types" + } + }, + "broken": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "broken" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "include_personal_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-personal-collections" + } + }, + "sort_column": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDependenciesGraphDependents": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDependenciesGraphDependentsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/graph/dependents", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/graph/dependents\n\nReturns a list of dependents for the specified entity.\n\n Required parameters:\n - `id`: The ID of the entity\n - `type`: The type of the entity (card, table, dashboard, etc.)\n\n Optional parameters:\n - `dependent-types`: Dependency types to filter by. Can be single value or array.\n If not provided, returns all types. Example: ?dependent-types=card&dependent-types=dashboard\n - `dependent-card-types`: Card types to filter by when dependent-types includes :card.\n Ignored if dependent-types doesn't include :card. Example: ?dependent-card-types=question&dependent-card-types=model\n - `broken`: Return only broken entities (default: false)\n - `query`: Search string to filter results by name or location (case-insensitive)\n - `include-personal-collections`: Include items in personal collections (default: false)\n - `sort-column`: Column to sort by - name, location, or view-count (default: name)\n - `sort-direction`: Sort direction - asc or desc (default: asc)" + } + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestTypes": { + "type": "union", + "members": { + "MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes": { + "target": "com.metabase.api#MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase0": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item": { + "type": "enum", + "members": { + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase1List": { + "type": "list", + "member": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item" + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypes": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase0" + }, + "Case1": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypesCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestSortColumn": { + "type": "enum", + "members": { + "DEPENDENTS_WITH_ERRORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependents-with-errors" + } + }, + "DEPENDENTS_ERRORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependents-errors" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "LOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "location" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestSortDirection": { + "type": "enum", + "members": { + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + }, + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeDependenciesGraphUnreferencedRequest": { + "type": "structure", + "members": { + "types": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestTypes", + "traits": { + "smithy.api#httpQuery": "types" + } + }, + "card_types": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestCardTypes", + "traits": { + "smithy.api#httpQuery": "card-types" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "include_personal_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-personal-collections" + } + }, + "sort_column": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeDependenciesGraphUnreferenced": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferencedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/dependencies/graph/unreferenced", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/dependencies/graph/unreferenced\n\nReturns a list of all unreferenced items in the instance.\n An unreferenced item is one that is not a dependency of any other item.\n\n Accepts optional parameters for filtering:\n - `types`: List of entity types to include (e.g., [:card :transform :snippet :dashboard])\n - `card-types`: List of card types to include when filtering cards (e.g., [:question :model :metric])\n - `query`: Search string to filter by name or location\n - `include-personal-collections`: Controls whether items in personal collections are included (default: false)\n - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`)\n - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`)\n - `offset`: Default 0\n - `limit`: Default 50\n\n Returns a map with:\n - `data`: List of unreferenced items, each with `:id`, `:type`, and `:data` fields\n - `total`: Total count of matched items\n - `offset`: Applied offset\n - `limit`: Applied limit" + } + }, + "com.metabase.api#PutEeEmailOverrideRequest": { + "type": "structure", + "members": { + "email_smtp_host_override": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-host-override", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_password_override": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-password-override", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_port_override": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "email-smtp-port-override", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_security_override": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-security-override", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_username_override": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-username-override", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeEmailOverride": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeEmailOverrideRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/email/override", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/email/override\n\nUpdate multiple cloud email Settings. You must be a superuser or have `setting` permission to do this.\n Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid." + } + }, + "com.metabase.api#DeleteEeEmailOverride": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/email/override", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/email/override\n\nClear all cloud email related settings. You must be a superuser or have `setting` permission to do this." + } + }, + "com.metabase.api#GetEeEmbeddingHubChecklist": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/embedding-hub/checklist", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/embedding-hub/checklist\n\nGet the embedding hub checklist status, indicating which setup steps have been completed." + } + }, + "com.metabase.api#GetEeErd": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/erd", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/erd\n\nReturn an Entity Relationship Diagram (ERD) for tables and their FK relationships.\n When `table-ids` is provided, those tables are the focal points (and must belong to `database-id`)." + } + }, + "com.metabase.api#GetEeGsheetsConnection": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/gsheets/connection", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/gsheets/connection\n\nCheck the status of a connection. This endpoint gets polled by FE to determine when to\n stop showing the setup widget.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`." + } + }, + "com.metabase.api#CreateEeGsheetsConnectionRequest": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeGsheetsConnection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeGsheetsConnectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/gsheets/connection", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/gsheets/connection\n\nHook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase." + } + }, + "com.metabase.api#DeleteEeGsheetsConnection": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/gsheets/connection", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/gsheets/connection\n\nDisconnect the google service account. There is only one (or zero) at the time of writing." + } + }, + "com.metabase.api#CreateEeGsheetsConnectionSync": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/gsheets/connection/sync", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/gsheets/connection/sync\n\nForce a sync of the connection now.\n\n Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`." + } + }, + "com.metabase.api#GetEeGsheetsServiceAccount": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/gsheets/service-account", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/gsheets/service-account\n\nChecks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster\n before." + } + }, + "com.metabase.api#GetEeLibrary": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/library", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/library\n\nGet the Library. If no library exists, it doesn't fail but returns an empty response" + } + }, + "com.metabase.api#CreateEeLibrary": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/library", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/library\n\nCreates the Library if it doesn't exist. Returns the created collection.\n\n Requires data analyst or superuser permissions." + } + }, + "com.metabase.api#GetEeLibraryTree": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/library/tree", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/library/tree\n\nThis matches /api/collection/tree but only returns the library collection." + } + }, + "com.metabase.api#GetEeLogsQueryExecutionRequest": { + "type": "structure", + "members": { + "yyyy_mm": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "Must be a string like 2020-04 or 2222-11." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeLogsQueryExecution": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeLogsQueryExecutionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/logs/query_execution/{yyyy_mm}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/logs/query_execution/{yyyy-mm}\n\nFetch rows for the month specified by `:yyyy-mm` from the query_execution logs table.\n Must be a superuser." + } + }, + "com.metabase.api#GetEeMetabotAnalyticsConversationsRequestSortBy": { + "type": "enum", + "members": { + "CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "created_at" + } + }, + "MESSAGE_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "message_count" + } + }, + "TOTAL_TOKENS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "total_tokens" + } + }, + "CACHE_READ_TOKENS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cache_read_tokens" + } + }, + "USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "user" + } + }, + "PROFILE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "profile_id" + } + }, + "IP_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ip_address" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeMetabotAnalyticsConversationsRequestSortDir": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeMetabotAnalyticsConversationsRequest": { + "type": "structure", + "members": { + "sort_by": { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversationsRequestSortBy", + "traits": { + "smithy.api#httpQuery": "sort_by" + } + }, + "sort_dir": { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversationsRequestSortDir", + "traits": { + "smithy.api#httpQuery": "sort_dir" + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "user_id" + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "group_id" + } + }, + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "tenant_id" + } + }, + "date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "date" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeMetabotAnalyticsConversations": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversationsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/metabot-analytics/conversations", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/metabot-analytics/conversations\n\nReturn paginated list of AI conversations with summary statistics." + } + }, + "com.metabase.api#GetEeMetabotAnalyticsConversationRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeMetabotAnalyticsConversation": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/metabot-analytics/conversations/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/metabot-analytics/conversations/{id}\n\nReturn full details for a specific conversation including all messages." + } + }, + "com.metabase.api#GetEeMetabotUsage": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/metabot/usage", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/metabot/usage\n\nFetch current Metabot token usage for the current billing period." + } + }, + "com.metabase.api#GetEeMfaAdminOverview": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/mfa/admin/overview", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/mfa/admin/overview\n\nAdmin: enrollment overview — how many users have (and haven't) set up a second factor, and\n whether the instance encrypts secrets at rest." + } + }, + "com.metabase.api#CreateEeMfaAdminRemoveRequest": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeMfaAdminRemove": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeMfaAdminRemoveRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/mfa/admin/remove", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/mfa/admin/remove\n\nAdmin: remove a user's two-factor enrollment entirely — the lockout escape hatch for a lost\n authenticator with no recovery codes. Never feature-gated (a lapsed license must not make\n lockouts permanent). The affected user is notified by email. They re-enroll from scratch —\n there is nothing to \"reset\", the secret lives on their device." + } + }, + "com.metabase.api#CreateEeMfaDisableRequest": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeMfaDisable": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeMfaDisableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/mfa/disable", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/mfa/disable\n\nDisable two-factor authentication for the current user. Re-auth is a fresh second factor — a\n TOTP code or an unused recovery code — never just the password." + } + }, + "com.metabase.api#CreateEeMfaEnrollRequest": { + "type": "structure", + "members": { + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeMfaEnroll": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeMfaEnrollRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/mfa/enroll", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/mfa/enroll\n\nStart TOTP enrollment for the current user. Requires the account password (LDAP users re-bind\n against the directory) and the `:multi-factor-auth` feature. Returns the Base32 `secret` and an\n `otpauth_uri` for QR display; enrollment is not active until confirmed with a live code." + } + }, + "com.metabase.api#CreateEeMfaEnrollConfirmRequest": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeMfaEnrollConfirm": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeMfaEnrollConfirmRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/mfa/enroll/confirm", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/mfa/enroll/confirm\n\nConfirm TOTP enrollment by verifying a code from the authenticator app. Activates the second\n factor and returns the single-use recovery codes — the only time they exist in plaintext." + } + }, + "com.metabase.api#CreateEeMfaRecoveryCodeRequest": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeMfaRecoveryCode": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeMfaRecoveryCodeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/mfa/recovery-codes", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/mfa/recovery-codes\n\nRegenerate the current user's recovery codes, invalidating the entire previous set. Re-auth is a\n fresh second factor — a TOTP code or an unused recovery code — so a stolen password alone can\n never rotate the codes. The plaintext codes are returned exactly once; only hashes are stored." + } + }, + "com.metabase.api#GetEeMfaStatus": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/mfa/status", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/mfa/status\n\nThe current user's MFA status, for the account-settings UI." + } + }, + "com.metabase.api#GetEePermissionDebugRequestActionType": { + "type": "enum", + "members": { + "CARD_READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card/read" + } + }, + "CARD_QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card/query" + } + }, + "CARD_DOWNLOAD_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card/download-data" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEePermissionDebugRequest": { + "type": "structure", + "members": { + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "user_id", + "smithy.api#required": {} + } + }, + "model_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "model_id", + "smithy.api#required": {} + } + }, + "action_type": { + "target": "com.metabase.api#GetEePermissionDebugRequestActionType", + "traits": { + "smithy.api#httpQuery": "action_type", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEePermissionDebug": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEePermissionDebugRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/permission_debug", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/permission_debug\n\nThis endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`.\n The type of model we are debugging against is inferred by the `action_type`.\n\n It will return:\n - `decision`: The overall permission decision (\"allow\", \"denied\", or \"limited\")\n - `model-type`: The type of model being checked (e.g., \"question\")\n - `model-id`: The ID of the model being checked\n - `segment`: A set of segmentation types applied (e.g., \"sandboxed\", \"impersonated\", \"routed\")\n - `message`: A sequence of strings explaining the decision\n - `data`: A map containing details about permissions (table or collection names to group names)\n - `suggestions`: A map of group IDs to group names that could provide access\n\n Example requests:\n - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read`\n - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query`\n - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data`\n\n Example responses:\n - Allowed access:\n ```json\n {\n \"decision\": \"allow\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to read this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```\n - Denied access with blocked table:\n ```json\n {\n \"decision\": \"denied\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User does not have permission to query this card\"],\n \"data\": {\"sample-db.PUBLIC.ORDERS\": [\"All Users\"]},\n \"suggestions\": {}\n }\n ```\n - Limited access:\n ```json\n {\n \"decision\": \"limited\",\n \"model-type\": \"question\",\n \"model-id\": \"456\",\n \"segment\": [],\n \"message\": [\"User has permission to download some data from this card\"],\n \"data\": {},\n \"suggestions\": {}\n }\n ```" + } + }, + "com.metabase.api#GetEeRemoteSyncBranches": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/branches", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/branches\n\nGet list of branches from the configured source.\n\n Returns a JSON object with branch names under the :items key.\n\n Requires superuser permissions." + } + }, + "com.metabase.api#CreateEeRemoteSyncCreateBranchRequest": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeRemoteSyncCreateBranch": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeRemoteSyncCreateBranchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/create-branch", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/create-branch\n\nCreate a new branch from the current remote-sync branch and switches the current remote-sync branch to it.\n Requires superuser permissions." + } + }, + "com.metabase.api#GetEeRemoteSyncCurrentTask": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/current-task", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/current-task\n\nGet the current sync task" + } + }, + "com.metabase.api#CreateEeRemoteSyncCurrentTaskCancel": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/current-task/cancel", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/current-task/cancel\n\nCancels the current task if one is running" + } + }, + "com.metabase.api#GetEeRemoteSyncDirty": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/dirty", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/dirty\n\nReturn all models with changes that have not been pushed to the remote sync source in any\n remote-synced collection." + } + }, + "com.metabase.api#CreateEeRemoteSyncExportRequest": { + "type": "structure", + "members": { + "branch": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "force": { + "target": "smithy.api#Boolean" + }, + "merge": { + "target": "smithy.api#Boolean" + }, + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeRemoteSyncExport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeRemoteSyncExportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/export", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/export\n\nExport the current state of the Remote Sync collection to a Source.\n\n This endpoint will:\n - Fetch the latest changes from the source\n - Create a branch or subdirectory (depending on source support)\n If no branch is supplied, use the configured export branch\n - Export the Remote Sync collection via serialization to the branch or subdirectory\n - Commit the changes if possible\n - Sync to the source if possible\n\n Requires superuser permissions." + } + }, + "com.metabase.api#GetEeRemoteSyncExportPreflightRequest": { + "type": "structure", + "members": { + "branch": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "branch", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeRemoteSyncExportPreflight": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeRemoteSyncExportPreflightRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/export-preflight", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/export-preflight\n\nDry-run preview of what pushing the current state would do given the live remote branch, without\n writing anything. Drives the UI's push decision (force / new branch / merge).\n\n Returns:\n - has_changes: whether the remote branch has advanced beyond the last synced version\n - clean: whether a 3-way merge would apply with no conflicts\n - conflicts: human-readable labels of the entities that conflict (empty when clean)\n - summary: counts of remote changes a merge would fold in\n - force_push_casualties: remote content a force push (rather than a merge) would discard, as\n `{:deleted [labels] :overwritten [labels]}`\n - reason: \"history-rewritten\" when the remote was force-pushed/rebased so no merge base exists\n\n Requires superuser permissions." + } + }, + "com.metabase.api#GetEeRemoteSyncHasRemoteChangesRequest": { + "type": "structure", + "members": { + "force_refresh": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "force-refresh" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeRemoteSyncHasRemoteChanges": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeRemoteSyncHasRemoteChangesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/has-remote-changes", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/has-remote-changes\n\nCheck if there are new changes on the remote branch that can be pulled.\n Uses in-memory caching (configurable TTL via remote-sync-check-changes-cache-ttl-seconds setting).\n\n Returns:\n - has_changes: true if remote version differs from last imported version, or if never imported\n - remote_version: current Git SHA on remote branch\n - local_version: Git SHA of last successful import (nil if never imported)\n - cached: true if result was served from cache" + } + }, + "com.metabase.api#CreateEeRemoteSyncImportRequest": { + "type": "structure", + "members": { + "branch": { + "target": "smithy.api#String" + }, + "expected_branch": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "force": { + "target": "smithy.api#Boolean" + }, + "merge": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeRemoteSyncImport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeRemoteSyncImportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/import", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/import\n\nImport Metabase content from configured Remote Sync source.\n\n This endpoint will:\n - Fetch the latest changes from the configured source\n - Load the updated content using the serialization/deserialization system\n\n If `force=false` (default) and there are unsaved changes in the Remote Sync collection,\n the import returns a 400 response.\n\n Requires superuser permissions." + } + }, + "com.metabase.api#GetEeRemoteSyncIsDirty": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/remote-sync/is-dirty", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/remote-sync/is-dirty\n\nCheck if any remote-synced collection or collection item has local changes that have not been pushed\n to the remote sync source." + } + }, + "com.metabase.api#PutEeRemoteSyncSettingsRequestCollectionsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Boolean" + }, + "traits": {} + }, + "com.metabase.api#PutEeRemoteSyncSettingsRequestRemoteSyncType": { + "type": "enum", + "members": { + "READ_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "read-only" + } + }, + "READ_WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "read-write" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeRemoteSyncSettingsRequest": { + "type": "structure", + "members": { + "collections": { + "target": "com.metabase.api#PutEeRemoteSyncSettingsRequestCollectionsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_auto_import": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "remote-sync-auto-import", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_branch": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "remote-sync-branch", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "remote-sync-token", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_transforms": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "remote-sync-transforms", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_type": { + "target": "com.metabase.api#PutEeRemoteSyncSettingsRequestRemoteSyncType", + "traits": { + "smithy.api#jsonName": "remote-sync-type", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "remote-sync-url", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeRemoteSyncSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeRemoteSyncSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/remote-sync/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/remote-sync/settings\n\nUpdate Remote Sync related settings. You must be a superuser to do this." + } + }, + "com.metabase.api#CreateEeRemoteSyncStashRequest": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "new_branch": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeRemoteSyncStash": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeRemoteSyncStashRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/stash", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/stash\n\nStashes changes to a new branch, and changes the current branch to it.\n Requires superuser permissions." + } + }, + "com.metabase.api#CreateEeRemoteSyncTestConnectionRequest": { + "type": "structure", + "members": { + "remote_sync_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "remote-sync-token", + "com.distilled.openapi#nullable": {} + } + }, + "remote_sync_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "remote-sync-url", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeRemoteSyncTestConnection": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeRemoteSyncTestConnectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/remote-sync/test-connection", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/remote-sync/test-connection\n\nTest whether the Remote Sync credentials can reach the git repository.\n\n When called with an empty body, validates the currently saved URL and token. When the body provides\n `remote-sync-url` or `remote-sync-token`, those override the saved values — useful for verifying a\n new Personal Access Token before saving. An obfuscated token (matching the existing token's masked\n representation) is treated as \"unchanged\" and the stored token value is used for the test.\n\n Only validates connection and authentication; branch existence is not checked here.\n\n Returns `{:status :success}` on success. On failure, returns a 400 with a user-friendly error\n message describing the connection problem.\n\n Requires superuser permissions." + } + }, + "com.metabase.api#MetabaseEnterpriseReplacementSchemaSourceEntityType": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeReplacementCheckReplaceSourceRequest": { + "type": "structure", + "members": { + "source_entity_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "source_entity_type": { + "target": "com.metabase.api#MetabaseEnterpriseReplacementSchemaSourceEntityType", + "traits": { + "smithy.api#required": {} + } + }, + "target_entity_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "target_entity_type": { + "target": "com.metabase.api#MetabaseEnterpriseReplacementSchemaSourceEntityType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeReplacementCheckReplaceSource": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeReplacementCheckReplaceSourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/replacement/check-replace-source", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/replacement/check-replace-source\n\nCheck whether a source entity can be replaced by a target entity. Returns compatibility\n errors describing column mismatches, type mismatches, primary key mismatches, and foreign\n key mismatches." + } + }, + "com.metabase.api#PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTransformTarget": { + "type": "union", + "members": { + "MetabaseTransformsSchemaTableTarget": { + "target": "com.metabase.api#MetabaseTransformsSchemaTableTarget" + }, + "MetabaseTransformsSchemaTableIncrementalTarget": { + "target": "com.metabase.api#MetabaseTransformsSchemaTableIncrementalTarget" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTableTarget": { + "type": "structure", + "members": { + "database": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTableIncrementalTarget": { + "type": "structure", + "members": { + "database": { + "target": "smithy.api#Integer" + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "target_incremental_strategy": { + "target": "com.metabase.api#MetabaseTransformsSchemaTargetIncrementalStrategy", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "target-incremental-strategy" + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTargetIncrementalStrategy": { + "type": "union", + "members": { + "MetabaseTransformsSchemaAppendConfig": { + "target": "com.metabase.api#MetabaseTransformsSchemaAppendConfig" + }, + "MetabaseTransformsSchemaMergeConfig": { + "target": "com.metabase.api#MetabaseTransformsSchemaMergeConfig" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaAppendConfig": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaMergeConfig": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "unique_key": { + "target": "com.metabase.api#MetabaseTransformsSchemaMergeConfigUniqueKeyList", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "unique-key" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaMergeKeyColumn": { + "type": "structure", + "members": { + "field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "field-id", + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "One column of a merge unique key. Carries a resolved `:field-id` when the target column is known,\n degrading to a `:name` ref when the target table doesn't exist yet (mirrors `::source-table-entry`)." + } + }, + "com.metabase.api#MetabaseTransformsSchemaMergeConfigUniqueKeyList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseTransformsSchemaMergeKeyColumn" + }, + "traits": {} + }, + "com.metabase.api#PostApiEeReplacementReplaceModelWithTransformRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "target_collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "transform_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "transform_tag_ids": { + "target": "com.metabase.api#PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "transform_target": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformTarget", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PostApiEeReplacementReplaceModelWithTransform": { + "type": "operation", + "input": { + "target": "com.metabase.api#PostApiEeReplacementReplaceModelWithTransformRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/replacement/replace-model-with-transform", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/replacement/replace-model-with-transform\n\nCreate a transform from a model, execute it, and replace all usages of the model\n with the output table. Un-persists the model and converts it to a saved question.\n Returns 202 with a run_id for polling.\n\n If there is an error during the transform execution, no replacement will be\n performed and the model will remain unchanged.\n\n If there is an error during the source swap, the transform and the output\n table will be retained, and the model will remain unchanged. We cannot delete\n the transform or the output table because they can be used by other queries at\n this point." + } + }, + "com.metabase.api#CreateEeReplacementReplaceSourceRequest": { + "type": "structure", + "members": { + "source_entity_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "source_entity_type": { + "target": "com.metabase.api#MetabaseEnterpriseReplacementSchemaSourceEntityType", + "traits": { + "smithy.api#required": {} + } + }, + "target_entity_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "target_entity_type": { + "target": "com.metabase.api#MetabaseEnterpriseReplacementSchemaSourceEntityType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeReplacementReplaceSource": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeReplacementReplaceSourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/replacement/replace-source", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/replacement/replace-source\n\nReplace all usages of a source entity with a target entity asynchronously.\n Returns 202 with a run_id for polling. Returns 409 if a replacement is already running." + } + }, + "com.metabase.api#GetEeReplacementRunsRequest": { + "type": "structure", + "members": { + "is_active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "is-active" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeReplacementRuns": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeReplacementRunsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/replacement/runs", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/replacement/runs\n\nList replacement runs, optionally filtered by is-active." + } + }, + "com.metabase.api#GetEeReplacementRunRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeReplacementRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeReplacementRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/replacement/runs/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/replacement/runs/{id}\n\nGet the status of a source replacement run." + } + }, + "com.metabase.api#CreateEeReplacementRunCancelRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeReplacementRunCancel": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeReplacementRunCancelRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/replacement/runs/{id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/replacement/runs/{id}/cancel\n\nCancel a running source replacement." + } + }, + "com.metabase.api#GetEeScimKey": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/scim/api_key", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/scim/api_key\n\nFetch the SCIM API key if one exists. Does *not* return an unmasked key, since we don't have access\n to that after it is created." + } + }, + "com.metabase.api#CreateEeScimKey": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/scim/api_key", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/scim/api_key\n\nCreate a new SCIM API key, or refresh one that already exists. When called for the first time,\n this is equivalent to enabling SCIM." + } + }, + "com.metabase.api#GetEeScimGroupsRequest": { + "type": "structure", + "members": { + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "startIndex" + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "count" + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeScimGroups": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeScimGroupsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/scim/v2/Groups", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/scim/v2/Groups\n\nFetch a list of groups." + } + }, + "com.metabase.api#CreateEeScimGroupRequestMembersItem": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "$ref" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimGroupRequestMembersList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEeScimGroupRequestMembersItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimGroupRequestSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimGroupRequest": { + "type": "structure", + "members": { + "displayName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String" + }, + "members": { + "target": "com.metabase.api#CreateEeScimGroupRequestMembersList" + }, + "schemas": { + "target": "com.metabase.api#CreateEeScimGroupRequestSchemasList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeScimGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeScimGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/scim/v2/Groups", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/scim/v2/Groups\n\nCreate a single group, and populates it if necessary." + } + }, + "com.metabase.api#GetEeScimGroupRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeScimGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeScimGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/scim/v2/Groups/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/scim/v2/Groups/{id}\n\nFetch a single group." + } + }, + "com.metabase.api#PutEeScimGroupRequestMembersItem": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "$ref" + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeScimGroupRequestMembersList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutEeScimGroupRequestMembersItem" + }, + "traits": {} + }, + "com.metabase.api#PutEeScimGroupRequestSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutEeScimGroupRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "displayName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "members": { + "target": "com.metabase.api#PutEeScimGroupRequestMembersList" + }, + "schemas": { + "target": "com.metabase.api#PutEeScimGroupRequestSchemasList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeScimGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeScimGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/scim/v2/Groups/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/scim/v2/Groups/{id}\n\nUpdate a group." + } + }, + "com.metabase.api#DeleteEeScimGroupRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeScimGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeScimGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/scim/v2/Groups/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/scim/v2/Groups/{id}\n\nDelete a group." + } + }, + "com.metabase.api#GetEeScimUsersRequest": { + "type": "structure", + "members": { + "startIndex": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "startIndex" + } + }, + "count": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "count" + } + }, + "filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "filter" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeScimUsers": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeScimUsersRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/scim/v2/Users", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/scim/v2/Users\n\nFetch a list of users." + } + }, + "com.metabase.api#CreateEeScimUserRequestEmailsItem": { + "type": "structure", + "members": { + "primary": { + "target": "smithy.api#Boolean" + }, + "type": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequestEmailsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEeScimUserRequestEmailsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequestGroupsItem": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "$ref" + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequestGroupsList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEeScimUserRequestGroupsItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequestName": { + "type": "structure", + "members": { + "familyName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "givenName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequestSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEeScimUserRequest": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean" + }, + "emails": { + "target": "com.metabase.api#CreateEeScimUserRequestEmailsList", + "traits": { + "smithy.api#required": {} + } + }, + "groups": { + "target": "com.metabase.api#CreateEeScimUserRequestGroupsList" + }, + "id": { + "target": "smithy.api#String" + }, + "locale": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "com.metabase.api#CreateEeScimUserRequestName", + "traits": { + "smithy.api#required": {} + } + }, + "schemas": { + "target": "com.metabase.api#CreateEeScimUserRequestSchemasList", + "traits": { + "smithy.api#required": {} + } + }, + "userName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeScimUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeScimUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/scim/v2/Users", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/scim/v2/Users\n\nCreate a single user." + } + }, + "com.metabase.api#GetEeScimUserRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeScimUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeScimUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/scim/v2/Users/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/scim/v2/Users/{id}\n\nFetch a single user." + } + }, + "com.metabase.api#PutEeScimUserRequestEmailsItem": { + "type": "structure", + "members": { + "primary": { + "target": "smithy.api#Boolean" + }, + "type": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequestEmailsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutEeScimUserRequestEmailsItem" + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequestGroupsItem": { + "type": "structure", + "members": { + "_ref": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "$ref" + } + }, + "display": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequestGroupsList": { + "type": "list", + "member": { + "target": "com.metabase.api#PutEeScimUserRequestGroupsItem" + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequestName": { + "type": "structure", + "members": { + "familyName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "givenName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequestSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutEeScimUserRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "active": { + "target": "smithy.api#Boolean" + }, + "emails": { + "target": "com.metabase.api#PutEeScimUserRequestEmailsList", + "traits": { + "smithy.api#required": {} + } + }, + "groups": { + "target": "com.metabase.api#PutEeScimUserRequestGroupsList" + }, + "locale": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "com.metabase.api#PutEeScimUserRequestName", + "traits": { + "smithy.api#required": {} + } + }, + "schemas": { + "target": "com.metabase.api#PutEeScimUserRequestSchemasList", + "traits": { + "smithy.api#required": {} + } + }, + "userName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeScimUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeScimUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/scim/v2/Users/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/scim/v2/Users/{id}\n\nUpdate a user." + } + }, + "com.metabase.api#UpdateEeScimUserRequestOperationsItemValueCase0Map": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseEnterpriseScimV2ApiPatchValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#documentation": "A single attribute value in a PATCH operation. Deliberately *not* `ms/BooleanValue`: its decoder maps everything\n that isn't `true`/\"true\" onto `false`, so a blank or junk value would coerce into a deactivation rather than be\n rejected. The strings clients send for booleans are parsed by the handler instead." + } + }, + "com.metabase.api#UpdateEeScimUserRequestOperationsItemValue": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#UpdateEeScimUserRequestOperationsItemValueCase0Map" + }, + "MetabaseEnterpriseScimV2ApiPatchValue": { + "target": "com.metabase.api#MetabaseEnterpriseScimV2ApiPatchValue" + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeScimUserRequestOperationsItem": { + "type": "structure", + "members": { + "op": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "path": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "value": { + "target": "com.metabase.api#UpdateEeScimUserRequestOperationsItemValue", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateEeScimUserRequestOperationsList": { + "type": "list", + "member": { + "target": "com.metabase.api#UpdateEeScimUserRequestOperationsItem" + }, + "traits": {} + }, + "com.metabase.api#UpdateEeScimUserRequestSchemasList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#UpdateEeScimUserRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Operations": { + "target": "com.metabase.api#UpdateEeScimUserRequestOperationsList", + "traits": { + "smithy.api#required": {} + } + }, + "schemas": { + "target": "com.metabase.api#UpdateEeScimUserRequestSchemasList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateEeScimUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateEeScimUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PATCH", + "uri": "/api/ee/scim/v2/Users/{id}", + "code": 200 + }, + "smithy.api#documentation": "PATCH /api/ee/scim/v2/Users/{id}\n\nActivate or deactivate a user. Supports specific replace operations, but not arbitrary patches." + } + }, + "com.metabase.api#GetEeSecurityCenter": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/security-center", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/security-center\n\nList all security advisories with match status." + } + }, + "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequest": { + "type": "structure", + "members": { + "advisory_ids": { + "target": "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSecurityCenterAcknowledge": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/security-center/acknowledge", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/security-center/acknowledge\n\nAcknowledge multiple security advisories. Skips already-acknowledged advisories." + } + }, + "com.metabase.api#CreateEeSecurityCenterSync": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/security-center/sync", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/security-center/sync\n\nTrigger an async advisory sync + re-evaluation.\n Returns immediately. If a sync is already running, the request is a no-op." + } + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipient": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2" + }, + "Case3": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3" + } + }, + "traits": { + "smithy.api#documentation": "Schema for :model/NotificationRecipient." + } + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase0Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase0": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document" + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase0Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase1Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase1": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document" + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase1Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2Details": { + "type": "structure", + "members": { + "channel_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "value": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2Details", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase2Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3Details": { + "type": "structure", + "members": { + "is_optional": { + "target": "smithy.api#Boolean" + }, + "pattern": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3Details", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipientCase3Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipient" + }, + "traits": {} + }, + "com.metabase.api#CreateEeSecurityCenterTestNotificationRequest": { + "type": "structure", + "members": { + "email_recipients": { + "target": "com.metabase.api#CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "slack_channel": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSecurityCenterTestNotification": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSecurityCenterTestNotificationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/security-center/test-notification", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/security-center/test-notification\n\nSend a test notification through the given Security Center channels.\n\n The request body lets callers pass the unsaved notification config from the\n dialog so the test reflects current form state, not the persisted settings.\n Both fields are optional; when omitted, the saved setting is used." + } + }, + "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequest2": { + "type": "structure", + "members": { + "advisory_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSecurityCenterAcknowledge2": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSecurityCenterAcknowledgeRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/security-center/{advisory_id}/acknowledge", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/security-center/{advisory-id}/acknowledge\n\nAcknowledge a security advisory. Stops repeat notifications." + } + }, + "com.metabase.api#GetEeSemanticSearchStatus": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/semantic-search/status", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/semantic-search/status\n\nFetch the indexing status of the currently active semantic search index table.\n\n Returns a map with keys:\n :indexed_count \n :total_est \n\n If no index is active, returns an empty map." + } + }, + "com.metabase.api#CreateEeSerializationExportRequestCollectionItem": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#Integer" + }, + "Case1": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeSerializationExportRequestCollectionList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEeSerializationExportRequestCollectionItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEeSerializationExportRequest": { + "type": "structure", + "members": { + "dirname": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "dirname", + "smithy.api#documentation": "name of directory and archive file (default: `-`)" + } + }, + "collection": { + "target": "com.metabase.api#CreateEeSerializationExportRequestCollectionList", + "traits": { + "smithy.api#httpQuery": "collection", + "smithy.api#documentation": "collections' db ids/entity-ids to serialize" + } + }, + "all_collections": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "all_collections" + } + }, + "settings": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "settings" + } + }, + "data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "data_model" + } + }, + "field_values": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "field_values" + } + }, + "continue_on_error": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "continue_on_error" + } + }, + "full_stacktrace": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "full_stacktrace" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSerializationExport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSerializationExportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/serialization/export", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/serialization/export\n\nSerialize and retrieve Metabase instance.\n\n Outputs `.tar.gz` file with serialization results and an `export.log` file.\n On error outputs serialization logs directly." + } + }, + "com.metabase.api#CreateEeSerializationImportRequestFile": { + "type": "structure", + "members": { + "content_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "content-type" + } + }, + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": ".tgz with serialization data" + } + }, + "com.metabase.api#CreateEeSerializationImportRequest": { + "type": "structure", + "members": { + "continue_on_error": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "continue_on_error" + } + }, + "full_stacktrace": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "full_stacktrace" + } + }, + "reindex": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "reindex" + } + }, + "file": { + "target": "com.metabase.api#CreateEeSerializationImportRequestFile", + "traits": { + "smithy.api#documentation": ".tgz with serialization data", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSerializationImport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSerializationImportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/serialization/import", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/ee/serialization/import\n\nDeserialize Metabase instance from an archive generated by /export.\n\n Parameters:\n - `file`: archive encoded as `multipart/form-data` (required).\n\n Returns logs of deserialization.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#CreateEeSerializationMetadataExportRequest": { + "type": "structure", + "members": { + "with_databases": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "with-databases" + } + }, + "with_tables": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "with-tables" + } + }, + "with_fields": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "with-fields" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSerializationMetadataExport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSerializationMetadataExportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/serialization/metadata/export", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/serialization/metadata/export\n\nGet warehouse metadata (databases, tables, and fields) for all databases visible to the\n current user. References between rows are emitted as raw numeric ids (`db_id`,\n `table_id`, `parent_id`, `fk_target_field_id`).\n\n Sections must be opted into with the `with-databases`, `with-tables`, and `with-fields`\n query parameters — they all default to `false`. The response is streamed for efficiency\n with large schemas.\n\n Requires `View data` → `Can view` and `Create queries` → `Query builder only` (or\n `Query builder and native`) permissions on each database and table." + } + }, + "com.metabase.api#CreateEeSerializationMetadataImport": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/serialization/metadata/import", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/serialization/metadata/import\n\nImport warehouse metadata previously emitted by `POST /metadata/export`. The\n request body is the JSON document `{databases, tables, fields}`; sections are\n parsed incrementally so memory stays bounded regardless of payload size.\n\n To bypass the JSON-parsing request middleware, send with `Content-Type:\n application/octet-stream`. Restricted to superusers.\n\n Returns `202` immediately with an `:import-id`; the import runs\n asynchronously. Poll `GET /metadata/import/:id` for its outcome." + } + }, + "com.metabase.api#GetEeSerializationMetadataImportRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeSerializationMetadataImport": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeSerializationMetadataImportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/serialization/metadata/import/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/serialization/metadata/import/{id}\n\nStatus of a metadata import previously started by `POST /metadata/import`.\n Status is retained in-memory and is not durable across server restarts.\n Restricted to superusers." + } + }, + "com.metabase.api#GetEeStaleRequestSortColumn": { + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "name" + } + }, + "LAST_USED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_used_at" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeStaleRequestSortDirection": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeStaleRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "before_date": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "before_date" + } + }, + "is_recursive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "is_recursive" + } + }, + "sort_column": { + "target": "com.metabase.api#GetEeStaleRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort_column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetEeStaleRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort_direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeStale": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeStaleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/stale/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/stale/{id}\n\nA flexible endpoint that returns stale entities, in the same shape as collections/items, with the following options:\n - `before_date` - only return entities that were last edited before this date (default: 6 months ago)\n - `is_recursive` - if true, return entities from all children of the collection, not just the direct children (default: false)\n - `sort_column` - the column to sort by (default: name)\n - `sort_direction` - the direction to sort by (default: asc)" + } + }, + "com.metabase.api#GetEeSupportAccessGrantRequest": { + "type": "structure", + "members": { + "ticket_number": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "ticket-number" + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "user-id" + } + }, + "include_revoked": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-revoked" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeSupportAccessGrant": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeSupportAccessGrantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/support-access-grant", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/support-access-grant\n\nList support access grants with optional filtering and pagination.\n\n Requires superuser permissions.\n\n Query parameters:\n - ticket-number: Filter by ticket number\n - user-id: Filter by user who created the grant\n - include-revoked: Include revoked grants (default false)" + } + }, + "com.metabase.api#CreateEeSupportAccessGrantRequest": { + "type": "structure", + "members": { + "grant_duration_minutes": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "notes": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "ticket_number": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeSupportAccessGrant": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeSupportAccessGrantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/support-access-grant", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/support-access-grant\n\nCreate a new support access grant.\n\n Requires superuser permissions. Only one active grant can exist at a time." + } + }, + "com.metabase.api#GetEeSupportAccessGrantCurrent": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/support-access-grant/current", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/support-access-grant/current\n\nGet the currently active support access grant, if one exists.\n\n Requires superuser permissions." + } + }, + "com.metabase.api#PutEeSupportAccessGrantRevokeRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeSupportAccessGrantRevoke": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeSupportAccessGrantRevokeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/support-access-grant/{id}/revoke", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/support-access-grant/{id}/revoke\n\nRevoke an existing support access grant.\n\n Requires superuser permissions. Any admin can revoke any grant." + } + }, + "com.metabase.api#GetEeTenantRequestStatus": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deactivated" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "active" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetEeTenantRequest": { + "type": "structure", + "members": { + "status": { + "target": "com.metabase.api#GetEeTenantRequestStatus", + "traits": { + "smithy.api#httpQuery": "status" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeTenant": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeTenantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/tenant", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/tenant\n\nGet all tenants" + } + }, + "com.metabase.api#CreateEeTenantRequestAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateEeTenantRequest": { + "type": "structure", + "members": { + "attributes": { + "target": "com.metabase.api#CreateEeTenantRequestAttributesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "slug": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "invalid slug", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeTenant": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeTenantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/tenant", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/tenant\n\nCreate a new Tenant" + } + }, + "com.metabase.api#GetEeTenantByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeTenantById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeTenantByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/tenant/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/tenant/{id}\n\nGet info about a tenant" + } + }, + "com.metabase.api#PutEeTenantRequestAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#PutEeTenantRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "attributes": { + "target": "com.metabase.api#PutEeTenantRequestAttributesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeTenant": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeTenantRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/tenant/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/tenant/{id}\n\nUpdate a tenant, can set name, attributes, or whether this tenant is active." + } + }, + "com.metabase.api#GetEeTransformsPythonLibraryRequest": { + "type": "structure", + "members": { + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeTransformsPythonLibrary": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeTransformsPythonLibraryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/transforms-python/library/{path}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/transforms-python/library/{path}\n\nGet the Python library for user modules." + } + }, + "com.metabase.api#PutEeTransformsPythonLibraryRequest": { + "type": "structure", + "members": { + "path": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "source": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEeTransformsPythonLibrary": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEeTransformsPythonLibraryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ee/transforms-python/library/{path}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ee/transforms-python/library/{path}\n\nUpdate the Python library source code for user modules." + } + }, + "com.metabase.api#MetabaseTransformsBaseUtilSourceTableEntry": { + "type": "structure", + "members": { + "alias": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "schema": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "table": { + "target": "smithy.api#String" + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A source table entry in the array format. Combines alias with table reference." + } + }, + "com.metabase.api#CreateEeTransformsPythonTestRunRequestSourceTablesList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseTransformsBaseUtilSourceTableEntry" + }, + "traits": {} + }, + "com.metabase.api#CreateEeTransformsPythonTestRunRequest": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "output_row_limit": { + "target": "smithy.api#Document" + }, + "per_input_row_limit": { + "target": "smithy.api#Document" + }, + "source_tables": { + "target": "com.metabase.api#CreateEeTransformsPythonTestRunRequestSourceTablesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeTransformsPythonTestRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeTransformsPythonTestRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/transforms-python/test-run", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/transforms-python/test-run\n\nEvaluate an ad-hoc python transform on a sample of input data.\n Intended for short runs for early feedback. Input/output/timeout limits apply." + } + }, + "com.metabase.api#GetEeTransformInspectRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeTransformInspect": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeTransformInspectRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/transforms/{id}/inspect", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/transforms/{id}/inspect\n\nPhase 1: Discover available lenses for a transform.\n Returns structural metadata and available lens types." + } + }, + "com.metabase.api#GetEeTransformInspectByLensIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "lens_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEeTransformInspectByLensId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEeTransformInspectByLensIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/transforms/{id}/inspect/{lens_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/transforms/{id}/inspect/{lens-id}\n\nPhase 2: Get full lens contents for a transform.\n Returns sections, cards with dataset_query, and trigger definitions.\n Accepts optional params for drill lenses as query params." + } + }, + "com.metabase.api#MetabaseEnterpriseTransformsInspectorSchemaLensParams": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue" + }, + "traits": { + "smithy.api#documentation": "Params passed to a drill lens (e.g. `{:join_step 2}`), emitted on drill-lens triggers and echoed back by the FE\n to the lens endpoints. Scalar values only: they end up in `query_execution.lens_params`, and scalars keep\n map/collection shapes out of the value position." + } + }, + "com.metabase.api#MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "smithy.api#Integer" + }, + "Case2": { + "target": "smithy.api#Boolean" + }, + "Case3": { + "target": "smithy.api#Double" + } + }, + "traits": {} + }, + "com.metabase.api#CreateEeTransformInspectQueryRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "lens_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "lens_params": { + "target": "com.metabase.api#MetabaseEnterpriseTransformsInspectorSchemaLensParams", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEeTransformInspectQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEeTransformInspectQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/ee/transforms/{id}/inspect/{lens_id}/query", + "code": 200 + }, + "smithy.api#documentation": "POST /api/ee/transforms/{id}/inspect/{lens-id}/query\n\nExecute a query in the context of a transform inspector lens." + } + }, + "com.metabase.api#GetEeUploadManagementTables": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/ee/upload-management/tables", + "code": 200 + }, + "smithy.api#documentation": "GET /api/ee/upload-management/tables\n\nGet all `Tables` visible to the current user which were created by uploading a file." + } + }, + "com.metabase.api#DeleteEeUploadManagementTableRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archive_cards": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archive-cards" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEeUploadManagementTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEeUploadManagementTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/ee/upload-management/tables/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/ee/upload-management/tables/{id}\n\nDelete the uploaded table from the database, optionally archiving cards for which it is the primary source." + } + }, + "com.metabase.api#CreateEidTranslationTranslateRequestEntityIdsValueList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#CreateEidTranslationTranslateRequestEntityIdsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#CreateEidTranslationTranslateRequestEntityIdsValueList" + }, + "traits": {} + }, + "com.metabase.api#CreateEidTranslationTranslateRequest": { + "type": "structure", + "members": { + "entity_ids": { + "target": "com.metabase.api#CreateEidTranslationTranslateRequestEntityIdsMap", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEidTranslationTranslate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEidTranslationTranslateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/eid-translation/translate", + "code": 200 + }, + "smithy.api#documentation": "POST /api/eid-translation/translate\n\nTranslate entity IDs to model IDs." + } + }, + "com.metabase.api#PutEmailRequest": { + "type": "structure", + "members": { + "email_smtp_host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-host", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-password", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_port": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "email-smtp-port", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_security": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-security", + "com.distilled.openapi#nullable": {} + } + }, + "email_smtp_username": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "email-smtp-username", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEmail": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEmailRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/email", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/email\n\nUpdate multiple email Settings. You must be a superuser or have `setting` permission to do this." + } + }, + "com.metabase.api#DeleteEmail": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/email", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/email\n\nClear all email related settings. You must be a superuser or have `setting` permission to do this." + } + }, + "com.metabase.api#CreateEmailTest": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/email/test", + "code": 200 + }, + "smithy.api#documentation": "POST /api/email/test\n\nSend a test email using the SMTP Settings. You must be a superuser or have `setting` permission to do this.\n Returns `{:ok true}` if we were able to send the message successfully, otherwise a standard 400 error response." + } + }, + "com.metabase.api#CreateEmbedMcpDrillRequest": { + "type": "structure", + "members": { + "encodedQuery": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEmbedMcpDrill": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEmbedMcpDrillRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/embed-mcp/drills", + "code": 200 + }, + "smithy.api#documentation": "POST /api/embed-mcp/drills\n\nStash a base64-encoded MBQL query for the iframe's pending drill-through and\n return a handle UUID the iframe will thread into the agent message so the\n `render_drill_through` tool can fetch it." + } + }, + "com.metabase.api#CreateEmbedMcpFeedbackRequestConversationData": { + "type": "structure", + "members": { + "prompt": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEmbedMcpFeedbackRequestFeedback": { + "type": "structure", + "members": { + "freeform_feedback": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "issue_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "message_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "positive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEmbedMcpFeedbackRequest": { + "type": "structure", + "members": { + "conversation_data": { + "target": "com.metabase.api#CreateEmbedMcpFeedbackRequestConversationData", + "traits": { + "smithy.api#required": {} + } + }, + "feedback": { + "target": "com.metabase.api#CreateEmbedMcpFeedbackRequestFeedback", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEmbedMcpFeedback": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEmbedMcpFeedbackRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/embed-mcp/feedback", + "code": 200 + }, + "smithy.api#documentation": "POST /api/embed-mcp/feedback\n\nProxy MCP Apps visualization feedback to Harbormaster." + } + }, + "com.metabase.api#GetEmbedTheme": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed-theme", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed-theme\n\nFetch a list of all embedding themes." + } + }, + "com.metabase.api#CreateEmbedThemeRequest": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEmbedTheme": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEmbedThemeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/embed-theme", + "code": 200 + }, + "smithy.api#documentation": "POST /api/embed-theme\n\nCreate a new embedding theme." + } + }, + "com.metabase.api#CreateEmbedThemeSeedDefaultRequestThemesItem": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateEmbedThemeSeedDefaultRequestThemesList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateEmbedThemeSeedDefaultRequestThemesItem" + }, + "traits": {} + }, + "com.metabase.api#CreateEmbedThemeSeedDefaultRequest": { + "type": "structure", + "members": { + "themes": { + "target": "com.metabase.api#CreateEmbedThemeSeedDefaultRequestThemesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEmbedThemeSeedDefault": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEmbedThemeSeedDefaultRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/embed-theme/seed-defaults", + "code": 200 + }, + "smithy.api#documentation": "POST /api/embed-theme/seed-defaults\n\nSeed default embedding themes on first call, using the payloads built by the frontend from the\n `METABASE_LIGHT_THEME` / `METABASE_DARK_THEME` constants.\n\n Idempotent: guarded by the `default-embedding-themes-seeded` setting. Once flipped, subsequent calls\n are no-ops even if the admin has since deleted the seeded themes, so deletions are preserved." + } + }, + "com.metabase.api#GetEmbedThemeByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedThemeById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedThemeByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed-theme/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed-theme/{id}\n\nFetch a single embedding theme by ID." + } + }, + "com.metabase.api#PutEmbedThemeRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutEmbedTheme": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutEmbedThemeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/embed-theme/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/embed-theme/{id}\n\nUpdate an embedding theme." + } + }, + "com.metabase.api#DeleteEmbedThemeRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteEmbedTheme": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteEmbedThemeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/embed-theme/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/embed-theme/{id}\n\nDelete an embedding theme." + } + }, + "com.metabase.api#CreateEmbedThemeCopyRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateEmbedThemeCopy": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateEmbedThemeCopyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/embed-theme/{id}/copy", + "code": 200 + }, + "smithy.api#documentation": "POST /api/embed-theme/{id}/copy\n\nCopy an embedding theme." + } + }, + "com.metabase.api#GetEmbedCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}\n\nFetch a Card via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question }}" + } + }, + "com.metabase.api#GetEmbedCardParamRemappingRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}/params/{param-key}/remapping\n\nEmbedded version of api.card filter values endpoint." + } + }, + "com.metabase.api#GetEmbedCardParamSearchRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCardParamSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardParamSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}/params/{param_key}/search/{prefix}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}/params/{param-key}/search/{prefix}\n\nEmbedded version of chain filter search endpoint." + } + }, + "com.metabase.api#GetEmbedCardParamValuesRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}/params/{param-key}/values\n\nEmbedded version of api.card filter values endpoint." + } + }, + "com.metabase.api#GetEmbedCardQueryRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}/query\n\nFetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question }\n :params }" + } + }, + "com.metabase.api#GetEmbedCardQueryByExportFormatRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#GetEmbedCardQueryByExportFormatRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "export_format": { + "target": "com.metabase.api#GetEmbedCardQueryByExportFormatRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "format_rows" + } + }, + "pivot_results": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "pivot_results" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedCardQueryByExportFormat": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedCardQueryByExportFormatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/card/{token}/query/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/card/{token}/query/{export-format}\n\nLike `GET /api/embed/card/query`, but returns the results as a file in the specified format." + } + }, + "com.metabase.api#GetEmbedDashboardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}\n\nFetch a Dashboard via a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:dashboard }}" + } + }, + "com.metabase.api#GetEmbedDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`" + } + }, + "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormatRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "format_rows" + } + }, + "pivot_results": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "pivot_results" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormat": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format}\n\nFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key` return the data in one of the export formats" + } + }, + "com.metabase.api#GetEmbedDashboardParamRemappingRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}/params/{param-key}/remapping\n\nEmbedded version of the remapped dashboard param value endpoint." + } + }, + "com.metabase.api#GetEmbedDashboardParamSearchRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboardParamSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardParamSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}/params/{param_key}/search/{prefix}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}/params/{param-key}/search/{prefix}\n\nEmbedded version of chain filter search endpoint." + } + }, + "com.metabase.api#GetEmbedDashboardParamValuesRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedDashboardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedDashboardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/dashboard/{token}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/dashboard/{token}/params/{param-key}/values\n\nEmbedded version of chain filter values endpoint." + } + }, + "com.metabase.api#GetEmbedPivotCardQueryRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedPivotCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedPivotCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/pivot/card/{token}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/pivot/card/{token}/query\n\nFetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`.\n\n Token should have the following format:\n\n {:resource {:question }\n :params }" + } + }, + "com.metabase.api#GetEmbedPivotDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedPivotDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedPivotDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/pivot/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the\n `embedding-secret-key`" + } + }, + "com.metabase.api#GetEmbedTilesCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedTilesCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedTilesCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/tiles/card/{token}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/tiles/card/{token}/{zoom}/{x}/{y}\n\nGenerates a single tile image for an embedded Card using the map visualization." + } + }, + "com.metabase.api#GetEmbedTilesDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetEmbedTilesDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetEmbedTilesDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/embed/tiles/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a Card on an embedded Dashboard using the map visualization." + } + }, + "com.metabase.api#CreateFieldTableIdsRequestFieldIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateFieldTableIdsRequest": { + "type": "structure", + "members": { + "field_ids": { + "target": "com.metabase.api#CreateFieldTableIdsRequestFieldIdsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFieldTableIds": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFieldTableIdsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/field/table-ids", + "code": 200 + }, + "smithy.api#documentation": "POST /api/field/table-ids\n\nGet unique Table IDs for a list of Field IDs." + } + }, + "com.metabase.api#GetFieldRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetField": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}\n\nGet `Field` with ID." + } + }, + "com.metabase.api#PutFieldRequestVisibilityType": { + "type": "enum", + "members": { + "RETIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "retired" + } + }, + "SENSITIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sensitive" + } + }, + "NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "normal" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + }, + "DETAILS_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "details-only" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutFieldRequestNfcPathList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutFieldRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "settings": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visibility_type": { + "target": "com.metabase.api#PutFieldRequestVisibilityType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "coercion_strategy": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "json_unfolding": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "semantic_type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "has_field_values": { + "target": "com.metabase.api#MetabaseLibSchemaMetadataColumnHasFieldValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "nfc_path": { + "target": "com.metabase.api#PutFieldRequestNfcPathList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "fk_target_field_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutField": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutFieldRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/field/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/field/{id}\n\nUpdate `Field` with ID." + } + }, + "com.metabase.api#CreateFieldDimensionRequestType": { + "type": "enum", + "members": { + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "EXTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "external" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateFieldDimensionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "human_readable_field_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#CreateFieldDimensionRequestType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFieldDimension": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFieldDimensionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/field/{id}/dimension", + "code": 200 + }, + "smithy.api#documentation": "POST /api/field/{id}/dimension\n\nSets the dimension for the given field at ID" + } + }, + "com.metabase.api#DeleteFieldDimensionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteFieldDimension": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteFieldDimensionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/field/{id}/dimension", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/field/{id}/dimension\n\nRemove the dimension associated to field at ID" + } + }, + "com.metabase.api#CreateFieldDiscardValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFieldDiscardValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFieldDiscardValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/field/{id}/discard_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/field/{id}/discard_values\n\nDiscard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's\n Database is set up to automatically sync FieldValues, they will be recreated during the next cycle." + } + }, + "com.metabase.api#GetFieldRelatedRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetFieldRelated": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldRelatedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}/related", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}/related\n\nReturn related entities." + } + }, + "com.metabase.api#GetFieldRemappingRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "remapped_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetFieldRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}/remapping/{remapped_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}/remapping/{remapped-id}\n\nFetch remapped Field values." + } + }, + "com.metabase.api#CreateFieldRescanValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFieldRescanValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFieldRescanValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/field/{id}/rescan_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/field/{id}/rescan_values\n\nManually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for\n FieldValues." + } + }, + "com.metabase.api#GetFieldSearchRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "search_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetFieldSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}/search/{search_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}/search/{search-id}\n\nSearch for values of a Field with `search-id` that start with `value`. See docstring for\n [[metabase.parameters.field/search-values]] for a more detailed explanation." + } + }, + "com.metabase.api#GetFieldSummaryRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetFieldSummary": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldSummaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}/summary", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}/summary\n\nGet the count and distinct count of `Field` with ID." + } + }, + "com.metabase.api#GetFieldValuesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetFieldValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetFieldValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/field/{id}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/field/{id}/values\n\nIf a Field's value of `has_field_values` is `:list`, return a list of all the distinct values of the Field (or\n remapped Field), and (if defined by a User) a map of human-readable remapped values. If `has_field_values` is not\n `:list`, checks whether we should create FieldValues for this Field; if so, creates and returns them." + } + }, + "com.metabase.api#CreateFieldValueRequestValuesItemCase0List": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateFieldValueRequestValuesItemCase1List": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateFieldValueRequestValuesItem": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateFieldValueRequestValuesItemCase0List" + }, + "Case1": { + "target": "com.metabase.api#CreateFieldValueRequestValuesItemCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#CreateFieldValueRequestValuesList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateFieldValueRequestValuesItem" + }, + "traits": {} + }, + "com.metabase.api#CreateFieldValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "values": { + "target": "com.metabase.api#CreateFieldValueRequestValuesList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFieldValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFieldValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/field/{id}/values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/field/{id}/values\n\nUpdate the fields values and human-readable values for a `Field` whose semantic type is\n `category`/`city`/`state`/`country` or whose base type is `type/Boolean`. The human-readable values are optional." + } + }, + "com.metabase.api#MetabaseFrontendErrorsApiFrontendErrorType": { + "type": "enum", + "members": { + "COMPONENT_CRASH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "component-crash" + } + }, + "CHART_RENDER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "chart-render-error" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateFrontendErrorRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.metabase.api#MetabaseFrontendErrorsApiFrontendErrorType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateFrontendError": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateFrontendErrorRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/frontend-errors", + "code": 200 + }, + "smithy.api#documentation": "POST /api/frontend-errors\n\nEndpoint for the frontend to report errors. Increments a Prometheus counter\n with the given `type` label." + } + }, + "com.metabase.api#GetGeojsonRequest": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "url", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetGeojson": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetGeojsonRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/geojson", + "code": 200 + }, + "smithy.api#documentation": "GET /api/geojson\n\nLoad a custom GeoJSON file based on a URL or file path provided as a query parameter.\n This behaves similarly to /api/geojson/:key but doesn't require the custom map to be saved to the DB first." + } + }, + "com.metabase.api#GetGeojsonByKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetGeojsonByKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetGeojsonByKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/geojson/{key}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/geojson/{key}\n\nFetch a custom GeoJSON file as defined in the [[metabase.geojson.settings/custom-geojson]] setting. (This just acts\n as a simple proxy for the file specified for `key`)." + } + }, + "com.metabase.api#GetGlossary": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/glossary", + "code": 200 + }, + "smithy.api#documentation": "GET /api/glossary\n\nFetch all glossary entries, optionally filtered by search term." + } + }, + "com.metabase.api#CreateGlossaryRequest": { + "type": "structure", + "members": { + "definition": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "term": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateGlossary": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateGlossaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/glossary", + "code": 200 + }, + "smithy.api#documentation": "POST /api/glossary\n\nCreate a new glossary entry." + } + }, + "com.metabase.api#PutGlossaryRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "definition": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "term": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutGlossary": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutGlossaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/glossary/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/glossary/{id}\n\nUpdate an existing glossary entry." + } + }, + "com.metabase.api#DeleteGlossaryRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteGlossary": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteGlossaryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/glossary/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/glossary/{id}\n\nDelete a glossary entry." + } + }, + "com.metabase.api#PutGoogleSettingsRequest": { + "type": "structure", + "members": { + "google_auth_auto_create_accounts_domain": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "google-auth-auto-create-accounts-domain", + "com.distilled.openapi#nullable": {} + } + }, + "google_auth_client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "google-auth-client-id", + "com.distilled.openapi#nullable": {} + } + }, + "google_auth_enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "google-auth-enabled", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutGoogleSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutGoogleSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/google/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/google/settings\n\nUpdate Google Sign-In related settings. You must be a superuser to do this." + } + }, + "com.metabase.api#GetHealthInspector": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/health-inspector", + "code": 200 + }, + "smithy.api#documentation": "GET /api/health-inspector\n\nGet a list of recent health check runs." + } + }, + "com.metabase.api#PutLdapSettingsRequestLdapGroupMappingsValueList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutLdapSettingsRequestLdapGroupMappingsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutLdapSettingsRequestLdapGroupMappingsValueList" + }, + "traits": {} + }, + "com.metabase.api#PutLdapSettingsRequestLdapSecurity": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "SSL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ssl" + } + }, + "STARTTLS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "starttls" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutLdapSettingsRequest": { + "type": "structure", + "members": { + "ldap_host": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-host", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_attribute_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-attribute-email", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-password", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_port": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "ldap-port", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_bind_dn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-bind-dn", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_group_membership_filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-group-membership-filter", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_group_sync": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "ldap-group-sync", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_attribute_firstname": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-attribute-firstname", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_group_mappings": { + "target": "com.metabase.api#PutLdapSettingsRequestLdapGroupMappingsMap", + "traits": { + "smithy.api#jsonName": "ldap-group-mappings", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_user_base": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-user-base", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_security": { + "target": "com.metabase.api#PutLdapSettingsRequestLdapSecurity", + "traits": { + "smithy.api#jsonName": "ldap-security", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_user_filter": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-user-filter", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_attribute_lastname": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-attribute-lastname", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_group_base": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "ldap-group-base", + "com.distilled.openapi#nullable": {} + } + }, + "ldap_enabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "ldap-enabled", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutLdapSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutLdapSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/ldap/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/ldap/settings\n\nUpdate LDAP related settings. You must be a superuser to do this." + } + }, + "com.metabase.api#CreateLlmExtractSourceRequestTemplateTagsValue": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "card-id" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateLlmExtractSourceRequestTemplateTagsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#CreateLlmExtractSourceRequestTemplateTagsValue" + }, + "traits": {} + }, + "com.metabase.api#CreateLlmExtractSourceRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "sql": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "template_tags": { + "target": "com.metabase.api#CreateLlmExtractSourceRequestTemplateTagsMap" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateLlmExtractSource": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateLlmExtractSourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/llm/extract-sources", + "code": 200 + }, + "smithy.api#documentation": "POST /api/llm/extract-sources\n\nParse native query sources and return referenced tables and cards/models.\n\n Uses Macaw to parse the SQL, resolves table names to IDs,\n and returns permission-filtered tables with column metadata. Card and model\n references are extracted from native query template tags.\n\n This is a lightweight endpoint that does not trigger fingerprinting\n or field value fetching." + } + }, + "com.metabase.api#CreateLlmGenerateSqlRequestReferencedEntitiesItem": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateLlmGenerateSqlRequestReferencedEntitiesList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateLlmGenerateSqlRequestReferencedEntitiesItem" + }, + "traits": {} + }, + "com.metabase.api#CreateLlmGenerateSqlRequest": { + "type": "structure", + "members": { + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "prompt": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "referenced_entities": { + "target": "com.metabase.api#CreateLlmGenerateSqlRequestReferencedEntitiesList" + }, + "source_sql": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateLlmGenerateSql": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateLlmGenerateSqlRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/llm/generate-sql", + "code": 200 + }, + "smithy.api#documentation": "POST /api/llm/generate-sql\n\nGenerate SQL from a natural language prompt.\n\n Requires:\n - LLM to be configured (Anthropic API key set in admin settings)\n - At least one table reference (explicit @mention or implicit from source_sql)\n - A database_id parameter\n\n Returns generated SQL and the list of tables used for context." + } + }, + "com.metabase.api#GetLlmListModels": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/llm/list-models", + "code": 200 + }, + "smithy.api#documentation": "GET /api/llm/list-models\n\nList available LLM models from the configured provider.\n\n Requires LLM to be configured for the selected provider in admin settings." + } + }, + "com.metabase.api#MetabaseLoggerApiTimeUnit": { + "type": "enum", + "members": { + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "days" + } + }, + "HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hours" + } + }, + "MINUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minutes" + } + }, + "SECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "seconds" + } + }, + "MILLISECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "milliseconds" + } + }, + "MICROSECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "microseconds" + } + }, + "NANOSECONDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nanoseconds" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateLoggerAdjustmentRequest": { + "type": "structure", + "members": { + "duration": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "duration_unit": { + "target": "com.metabase.api#MetabaseLoggerApiTimeUnit", + "traits": { + "smithy.api#required": {} + } + }, + "log_levels": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateLoggerAdjustment": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateLoggerAdjustmentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/logger/adjustment", + "code": 200 + }, + "smithy.api#documentation": "POST /api/logger/adjustment\n\nTemporarily adjust the log levels." + } + }, + "com.metabase.api#DeleteLoggerAdjustment": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/logger/adjustment", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/logger/adjustment\n\nUndo any log level adjustments." + } + }, + "com.metabase.api#GetLoggerLogs": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/logger/logs", + "code": 200 + }, + "smithy.api#documentation": "GET /api/logger/logs\n\nLogs." + } + }, + "com.metabase.api#GetLoggerPresets": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/logger/presets", + "code": 200 + }, + "smithy.api#documentation": "GET /api/logger/presets\n\nGet all known presets." + } + }, + "com.metabase.api#GetLoginHistoryCurrent": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/login-history/current", + "code": 200 + }, + "smithy.api#documentation": "GET /api/login-history/current\n\nFetch recent logins for the current user." + } + }, + "com.metabase.api#GetMeasure": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/measure", + "code": 200 + }, + "smithy.api#documentation": "GET /api/measure\n\nFetch *all* `Measures`." + } + }, + "com.metabase.api#CreateMeasureRequest": { + "type": "structure", + "members": { + "definition": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMeasure": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMeasureRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/measure", + "code": 200 + }, + "smithy.api#documentation": "POST /api/measure\n\nCreate a new `Measure`." + } + }, + "com.metabase.api#GetMeasureByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMeasureById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMeasureByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/measure/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/measure/{id}\n\nFetch `Measure` with ID." + } + }, + "com.metabase.api#PutMeasureRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "definition": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "revision_message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMeasure": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMeasureRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/measure/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/measure/{id}\n\nUpdate a `Measure` with ID." + } + }, + "com.metabase.api#GetMeasureDimensionRemappingRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMeasureDimensionRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMeasureDimensionRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/measure/{id}/dimension/{dimension_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/measure/{id}/dimension/{dimension-key}/remapping\n\nFetch remapped value for a specific dimension value.\n\n Returns a pair [value, display-name] if remapping exists, or [value] otherwise." + } + }, + "com.metabase.api#GetMeasureDimensionSearchRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMeasureDimensionSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMeasureDimensionSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/measure/{id}/dimension/{dimension_key}/search", + "code": 200 + }, + "smithy.api#documentation": "GET /api/measure/{id}/dimension/{dimension-key}/search\n\nSearch for values of a dimension that contain the query string.\n\n Returns field values matching the search query in the same format as the field values API." + } + }, + "com.metabase.api#GetMeasureDimensionValuesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMeasureDimensionValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMeasureDimensionValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/measure/{id}/dimension/{dimension_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/measure/{id}/dimension/{dimension-key}/values\n\nFetch values for a dimension of a measure.\n\n Returns field values in the same format as the field values API:\n - values: list of [value] or [value, display-name] tuples\n - field_id: the underlying field ID\n - has_more_values: boolean indicating if there are more values" + } + }, + "com.metabase.api#MetabaseMetabotContextContext": { + "type": "structure", + "members": { + "user_is_viewing": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingList" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map." + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0Type": { + "type": "enum", + "members": { + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0": { + "type": "structure", + "members": { + "chart_configs": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList" + }, + "query": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map." + } + }, + "type": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase1Type": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "CODE_EDITOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "code_editor" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "ADHOC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "adhoc" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase1": { + "type": "structure", + "members": { + "query": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map." + } + }, + "type": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase1Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItem": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItemCase1" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotContextContextUserIsViewingList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseMetabotContextContextUserIsViewingItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotSchemaMessages": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseMetabotSchemaMessage" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotSchemaMessage": { + "type": "structure", + "members": { + "content": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "role": { + "target": "com.metabase.api#MetabaseMetabotSchemaRole", + "traits": { + "smithy.api#required": {} + } + }, + "tool_call_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tool_calls": { + "target": "com.metabase.api#MetabaseMetabotSchemaMessageToolCallsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotSchemaRole": { + "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" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotSchemaMessageToolCallsItem": { + "type": "structure", + "members": { + "arguments": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotSchemaMessageToolCallsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseMetabotSchemaMessageToolCallsItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreState": { + "type": "structure", + "members": { + "chart_configs": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateChartConfigsMap", + "traits": { + "smithy.api#jsonName": "chart-configs" + } + }, + "charts": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateChartsMap" + }, + "link_registry": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateLinkRegistryMap", + "traits": { + "smithy.api#jsonName": "link-registry" + } + }, + "queries": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateQueriesMap" + }, + "todos": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateTodosList" + }, + "transforms": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreStateTransformsMap" + } + }, + "traits": { + "smithy.api#documentation": "Agent state containing queries, charts, chart-configs, todos, transforms, and link-registry." + } + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateChartConfigsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateChartsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateLinkRegistryMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateQueriesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateTodosList": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseMetabotAgentCoreStateTransformsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotAgentStreamingRequest": { + "type": "structure", + "members": { + "context": { + "target": "com.metabase.api#MetabaseMetabotContextContext", + "traits": { + "smithy.api#required": {} + } + }, + "conversation_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid UUID.", + "smithy.api#required": {} + } + }, + "debug": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "history": { + "target": "com.metabase.api#MetabaseMetabotSchemaMessages", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "metabot_id": { + "target": "smithy.api#String" + }, + "profile_id": { + "target": "smithy.api#String" + }, + "state": { + "target": "com.metabase.api#MetabaseMetabotAgentCoreState", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotAgentStreaming": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotAgentStreamingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/agent-streaming", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/agent-streaming\n\nSend a chat message to the LLM via the AI Proxy." + } + }, + "com.metabase.api#GetMetabotConversations": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/conversations", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/conversations\n\nList conversations visible in the current user's history, most-recent first.\n\n New conversations are participation-based (the user authored at least one\n message); legacy conversations created before message authors were stamped\n fall back to the conversation originator." + } + }, + "com.metabase.api#GetMetabotConversationRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetabotConversation": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetabotConversationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/conversations/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/conversations/{id}\n\nReturn a single conversation with its flattened chat messages.\n\n Accessible to any participant in the conversation or to any superuser." + } + }, + "com.metabase.api#CreateMetabotDocumentGenerateContentRequest": { + "type": "structure", + "members": { + "instructions": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "references": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotDocumentGenerateContent": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotDocumentGenerateContentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/document/generate-content", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/document/generate-content\n\nCreate a new piece of content to insert into the document. Kept for backwards compatibility; now uses the native Clojure agent." + } + }, + "com.metabase.api#CreateMetabotFeedbackRequest": { + "type": "structure", + "members": { + "freeform_feedback": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "issue_type": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "message_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "metabot_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "positive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotFeedback": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotFeedbackRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/feedback", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/feedback\n\nPersist Metabot feedback." + } + }, + "com.metabase.api#GetMetabotMetabot": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/metabot", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/metabot\n\nList configured metabot instances" + } + }, + "com.metabase.api#GetMetabotMetabotByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetabotMetabotById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetabotMetabotByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/metabot/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/metabot/{id}\n\nRetrieve one metabot instance" + } + }, + "com.metabase.api#PutMetabotMetabotRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "use_verified_content": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMetabotMetabot": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMetabotMetabotRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/metabot/metabot/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/metabot/metabot/{id}\n\nUpdate a metabot instance" + } + }, + "com.metabase.api#GetMetabotMetabotPromptSuggestionsRequestModel": { + "type": "enum", + "members": { + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetMetabotMetabotPromptSuggestionsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sample": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "sample" + } + }, + "model": { + "target": "com.metabase.api#GetMetabotMetabotPromptSuggestionsRequestModel", + "traits": { + "smithy.api#httpQuery": "model" + } + }, + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "model_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetabotMetabotPromptSuggestions": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetabotMetabotPromptSuggestionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/metabot/{id}/prompt-suggestions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/metabot/{id}/prompt-suggestions\n\nReturn the prompt suggestions for the metabot instance with `id`." + } + }, + "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteMetabotMetabotPromptSuggestions": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/metabot/metabot/{id}/prompt-suggestions", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/metabot/metabot/{id}/prompt-suggestions\n\nDelete all prompt suggestions for the metabot instance with `id`." + } + }, + "com.metabase.api#CreateMetabotMetabotPromptSuggestionsRegenerateRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotMetabotPromptSuggestionsRegenerate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotMetabotPromptSuggestionsRegenerateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/metabot/{id}/prompt-suggestions/regenerate", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/metabot/{id}/prompt-suggestions/regenerate\n\nRemove any existing prompt suggestions for the Metabot with `id` and generate new ones.\n The response `:status` is `:generated` (with a `:prompt_count`) when prompts were created,\n `:no-library-content` when the Metabot has no models or metrics to summarize, or\n `:ai-produced-no-prompts` when generation produced nothing.\n Returns a 402 if the instance has reached its managed-AI usage limit." + } + }, + "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsPromptRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prompt_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsPrompt": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsPromptRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/metabot/metabot/{id}/prompt-suggestions/{prompt_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/metabot/metabot/{id}/prompt-suggestions/{prompt-id}\n\nDelete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`." + } + }, + "com.metabase.api#GetMetabotPermissionsUserPermissions": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/permissions/user-permissions", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/permissions/user-permissions\n\nReturn the current user's resolved metabot permissions, taking the most\n permissive value across all their groups." + } + }, + "com.metabase.api#GetMetabotSettingsRequestProvider": { + "type": "enum", + "members": { + "ANTHROPIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "anthropic" + } + }, + "OPENAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openai" + } + }, + "MISTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mistral" + } + }, + "AZURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "azure" + } + }, + "BEDROCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bedrock" + } + }, + "ZAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zai" + } + }, + "METABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase" + } + }, + "OPENROUTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openrouter" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetMetabotSettingsRequest": { + "type": "structure", + "members": { + "provider": { + "target": "com.metabase.api#GetMetabotSettingsRequestProvider", + "traits": { + "smithy.api#httpQuery": "provider" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetabotSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetabotSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metabot/settings", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metabot/settings\n\nReturn available models for a provider using its configured credentials." + } + }, + "com.metabase.api#PutMetabotSettingsRequestCredentials": { + "type": "structure", + "members": { + "access_key_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "access-key-id", + "com.distilled.openapi#nullable": {} + } + }, + "api_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "api-key", + "com.distilled.openapi#nullable": {} + } + }, + "base_url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "base-url", + "com.distilled.openapi#nullable": {} + } + }, + "region": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "secret_access_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "secret-access-key", + "com.distilled.openapi#nullable": {} + } + }, + "session_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "session-token", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutMetabotSettingsRequestProvider": { + "type": "enum", + "members": { + "ANTHROPIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "anthropic" + } + }, + "OPENAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openai" + } + }, + "MISTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mistral" + } + }, + "AZURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "azure" + } + }, + "BEDROCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bedrock" + } + }, + "ZAI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zai" + } + }, + "METABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase" + } + }, + "OPENROUTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "openrouter" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutMetabotSettingsRequest": { + "type": "structure", + "members": { + "api_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "api-key", + "com.distilled.openapi#nullable": {} + } + }, + "credentials": { + "target": "com.metabase.api#PutMetabotSettingsRequestCredentials", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "provider": { + "target": "com.metabase.api#PutMetabotSettingsRequestProvider", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMetabotSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMetabotSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/metabot/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/metabot/settings\n\nUpdate the Metabot provider credentials and/or model setting and return the refreshed settings payload." + } + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase0": { + "type": "structure", + "members": { + "challenge": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventFilesItem": { + "type": "structure", + "members": { + "filetype": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "mimetype": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "size": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "url_private": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventFilesList": { + "type": "list", + "member": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventFilesItem" + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventItem": { + "type": "structure", + "members": { + "channel": { + "target": "smithy.api#String" + }, + "ts": { + "target": "smithy.api#String" + }, + "type": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventEdited": { + "type": "structure", + "members": { + "ts": { + "target": "smithy.api#String" + }, + "user": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1Event": { + "type": "structure", + "members": { + "subtype": { + "target": "smithy.api#String" + }, + "event_ts": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "ts": { + "target": "smithy.api#String" + }, + "user": { + "target": "smithy.api#String" + }, + "reaction": { + "target": "smithy.api#String" + }, + "files": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventFilesList" + }, + "text": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "bot_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "item": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventItem" + }, + "thread_ts": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "channel_type": { + "target": "smithy.api#String" + }, + "channel": { + "target": "smithy.api#String" + }, + "edited": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1EventEdited" + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1": { + "type": "structure", + "members": { + "event": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1Event", + "traits": { + "smithy.api#required": {} + } + }, + "event_id": { + "target": "smithy.api#String" + }, + "team_id": { + "target": "smithy.api#String" + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBodyCase2": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequestBody": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase0" + }, + "Case1": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase1" + }, + "Case2": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBodyCase2" + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSlackEventRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#CreateMetabotSlackEventRequestBody", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotSlackEvent": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotSlackEventRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/slack/events", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/slack/events\n\nRespond to activities in Slack" + } + }, + "com.metabase.api#CreateMetabotSlackInteractiveRequest": { + "type": "structure", + "members": { + "payload": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotSlackInteractive": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotSlackInteractiveRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/slack/interactive", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/slack/interactive\n\nHandle interactive payloads from Slack (button clicks, modal submissions)." + } + }, + "com.metabase.api#PutMetabotSlackSettingsRequest": { + "type": "structure", + "members": { + "metabot_slack_signing_secret": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "metabot-slack-signing-secret", + "com.distilled.openapi#nullable": {} + } + }, + "slack_connect_client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "slack-connect-client-id", + "com.distilled.openapi#nullable": {} + } + }, + "slack_connect_client_secret": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "slack-connect-client-secret", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMetabotSlackSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMetabotSlackSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/metabot/slack/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/metabot/slack/settings\n\nUpdate Metabot Slack settings atomically.\n All credential fields must be provided together.\n Setting values requires the metabot-v3 feature, but clearing values is always allowed.\n slack-connect-enabled is automatically set to true when credentials are provided, nil when cleared." + } + }, + "com.metabase.api#CreateMetabotSourceFeedbackRequestSourceType": { + "type": "enum", + "members": { + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetabotSourceFeedbackRequest": { + "type": "structure", + "members": { + "message_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "metabot_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "positive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + }, + "source_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "source_type": { + "target": "com.metabase.api#CreateMetabotSourceFeedbackRequestSourceType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetabotSourceFeedback": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetabotSourceFeedbackRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metabot/source-feedback", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metabot/source-feedback\n\nPersist Metabot source feedback." + } + }, + "com.metabase.api#GetMetric": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metric", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metric\n\nGet a list of metrics.\n\n Returns metrics (Cards with type='metric') that the current user has read access to,\n filtered by collection visibility permissions." + } + }, + "com.metabase.api#MetabaseMetricsApiDefinition": { + "type": "structure", + "members": { + "expression": { + "target": "com.metabase.api#MetabaseLibMetricSchemaMetricMathExpression", + "traits": { + "smithy.api#required": {} + } + }, + "filters": { + "target": "com.metabase.api#MetabaseLibMetricSchemaInstanceFilters", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "projections": { + "target": "com.metabase.api#MetabaseLibMetricSchemaTypedProjections", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for the definition object within a dataset request.\n Uses expression-based contract for metric math support." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaMetricMathExpression": { + "type": "union", + "members": { + "MetabaseLibMetricSchemaExpressionLeaf": { + "target": "com.metabase.api#MetabaseLibMetricSchemaExpressionLeaf" + }, + "Case1": { + "target": "smithy.api#Double" + }, + "Case2": { + "target": "com.metabase.api#MetabaseLibMetricSchemaMetricMathExpressionCase2List" + } + }, + "traits": { + "smithy.api#documentation": "A recursive metric math expression tree.\n Can be a leaf (metric/measure ref) or an arithmetic expression [op opts expr expr ...]\n with at least 2 operands.\n Note: uses :fn validator for arithmetic to avoid Malli's recursive seqex limitation." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaExpressionLeaf": { + "type": "union", + "members": { + "MetabaseLibMetricSchemaMetricExpressionRef": { + "target": "com.metabase.api#MetabaseLibMetricSchemaMetricExpressionRef" + }, + "MetabaseLibMetricSchemaMeasureExpressionRef": { + "target": "com.metabase.api#MetabaseLibMetricSchemaMeasureExpressionRef" + } + }, + "traits": { + "smithy.api#documentation": "A leaf node in a metric math expression: either a metric or measure reference." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaMetricExpressionRef": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "A metric reference in an expression: [:metric {:lib/uuid uuid} card-id]." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaMeasureExpressionRef": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "A measure reference in an expression: [:measure {:lib/uuid uuid} measure-id]." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaMetricMathExpressionCase2List": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibMetricSchemaInstanceFilters": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibMetricSchemaInstanceFilter" + }, + "traits": { + "smithy.api#documentation": "A sequence of per-instance filters." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaInstanceFilter": { + "type": "structure", + "members": { + "filter": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "lib_uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "lib/uuid" + } + } + }, + "traits": { + "smithy.api#documentation": "A filter associated with a specific expression instance via lib/uuid." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaTypedProjections": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibMetricSchemaTypedProjection" + }, + "traits": { + "smithy.api#documentation": "A sequence of typed projections." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaTypedProjection": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {} + } + }, + "lib_uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "lib/uuid" + } + }, + "projection": { + "target": "com.metabase.api#MetabaseLibMetricSchemaTypedProjectionProjectionList", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseLibMetricSchemaTypedProjectionType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "A projection associated with a specific expression leaf instance via :lib/uuid.\n The :type and :id identify the source metric/measure for metadata resolution.\n The :lib/uuid disambiguates multiple references to the same metric/measure in an expression." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaDimensionReference": { + "type": "list", + "member": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "Dimension reference clause [:dimension opts uuid].\n Handles normalization from JSON where the tag arrives as a string." + } + }, + "com.metabase.api#MetabaseLibMetricSchemaTypedProjectionProjectionList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseLibMetricSchemaDimensionReference" + }, + "traits": {} + }, + "com.metabase.api#MetabaseLibMetricSchemaTypedProjectionType": { + "type": "enum", + "members": { + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateMetricBreakoutValueRequest": { + "type": "structure", + "members": { + "definition": { + "target": "com.metabase.api#MetabaseMetricsApiDefinition", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetricBreakoutValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetricBreakoutValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metric/breakout-values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metric/breakout-values\n\nFetch distinct breakout dimension values for a metric or measure definition.\n Accepts the same definition format as POST /dataset.\n Returns extracted values and column metadata for the breakout dimension." + } + }, + "com.metabase.api#CreateMetricDatasetRequest": { + "type": "structure", + "members": { + "definition": { + "target": "com.metabase.api#MetabaseMetricsApiDefinition", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMetricDataset": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMetricDatasetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/metric/dataset", + "code": 200 + }, + "smithy.api#documentation": "POST /api/metric/dataset\n\nExecute a metric or measure-based query and stream the results.\n\n Request body requires a `definition` object containing:\n - expression: A metric math expression tree (leaf reference or arithmetic)\n Examples: [:metric {:lib/uuid \"a\"} 42], [:- {} [:metric {:lib/uuid \"a\"} 1] [:metric {:lib/uuid \"b\"} 2]]\n - filters (optional): Per-instance filters keyed by :lib/uuid from the expression\n - projections (optional): Typed projections keyed by source type and ID" + } + }, + "com.metabase.api#GetMetricByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetricById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetricByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metric/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metric/{id}\n\nFetch a `Metric` with ID.\n\n Returns the metric with hydrated dimensions and dimension mappings." + } + }, + "com.metabase.api#GetMetricDimensionRemappingRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetricDimensionRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetricDimensionRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metric/{id}/dimension/{dimension_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metric/{id}/dimension/{dimension-key}/remapping\n\nFetch remapped value for a specific dimension value.\n\n Returns a pair [value, display-name] if remapping exists, or [value] otherwise." + } + }, + "com.metabase.api#GetMetricDimensionSearchRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetricDimensionSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetricDimensionSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metric/{id}/dimension/{dimension_key}/search", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metric/{id}/dimension/{dimension-key}/search\n\nSearch for values of a dimension that contain the query string.\n\n Returns field values matching the search query in the same format as the field values API." + } + }, + "com.metabase.api#GetMetricDimensionValuesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "dimension_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMetricDimensionValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMetricDimensionValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/metric/{id}/dimension/{dimension_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/metric/{id}/dimension/{dimension-key}/values\n\nFetch values for a dimension of a metric.\n\n Returns field values in the same format as the field values API:\n - values: list of [value] or [value, display-name] tuples\n - field_id: the underlying field ID\n - has_more_values: boolean indicating if there are more values" + } + }, + "com.metabase.api#GetModelIndexRequest": { + "type": "structure", + "members": { + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "model_id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetModelIndex": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetModelIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/model-index", + "code": 200 + }, + "smithy.api#documentation": "GET /api/model-index\n\nRetrieve list of ModelIndex." + } + }, + "com.metabase.api#CreateModelIndexRequest": { + "type": "structure", + "members": { + "model_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "pk_ref": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "value_ref": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateModelIndex": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateModelIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/model-index", + "code": 200 + }, + "smithy.api#documentation": "POST /api/model-index\n\nCreate ModelIndex." + } + }, + "com.metabase.api#GetModelIndexByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetModelIndexById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetModelIndexByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/model-index/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/model-index/{id}\n\nRetrieve ModelIndex." + } + }, + "com.metabase.api#DeleteModelIndexRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteModelIndex": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteModelIndexRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/model-index/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/model-index/{id}\n\nDelete ModelIndex." + } + }, + "com.metabase.api#CreateModerationReviewRequestModeratedItemType": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "CARD_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "DASHBOARD_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateModerationReviewRequestStatus": { + "type": "enum", + "members": { + "VERIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "verified" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateModerationReviewRequest": { + "type": "structure", + "members": { + "moderated_item_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "moderated_item_type": { + "target": "com.metabase.api#CreateModerationReviewRequestModeratedItemType", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.metabase.api#CreateModerationReviewRequestStatus", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "text": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateModerationReview": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateModerationReviewRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/moderation-review", + "code": 200 + }, + "smithy.api#documentation": "POST /api/moderation-review\n\nCreate a new `ModerationReview`." + } + }, + "com.metabase.api#GetMtGtapRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "group_id" + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "table_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMtGtap": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMtGtapRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/mt/gtap", + "code": 200 + }, + "smithy.api#documentation": "GET /api/mt/gtap\n\nFetch a list of all GTAPs currently in use, or a single GTAP if both `group_id` and `table_id` are provided." + } + }, + "com.metabase.api#MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "MetabaseLibSchemaIdField": { + "target": "smithy.api#Integer" + }, + "MetabaseLibSchemaParameterTarget": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue" + }, + "traits": {} + }, + "com.metabase.api#CreateMtGtapRequest": { + "type": "structure", + "members": { + "attribute_remappings": { + "target": "com.metabase.api#MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMtGtap": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMtGtapRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/mt/gtap", + "code": 200 + }, + "smithy.api#documentation": "POST /api/mt/gtap\n\nCreate a new GTAP." + } + }, + "com.metabase.api#CreateMtGtapValidateRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateMtGtapValidate": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateMtGtapValidateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/mt/gtap/validate", + "code": 200 + }, + "smithy.api#documentation": "POST /api/mt/gtap/validate\n\nValidate a sandbox which may not have yet been saved. This runs the same validation that is performed when the\n sandbox is saved, but doesn't actually save the sandbox." + } + }, + "com.metabase.api#GetMtGtapByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetMtGtapById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetMtGtapByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/mt/gtap/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/mt/gtap/{id}\n\nFetch GTAP by `id`" + } + }, + "com.metabase.api#PutMtGtapRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "attribute_remappings": { + "target": "com.metabase.api#MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMtGtap": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMtGtapRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/mt/gtap/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/mt/gtap/{id}\n\nUpdate a GTAP entry. The only things you're allowed to update for a GTAP are the Card being used (`card_id`) or the\n parameter mappings; changing `table_id` or `group_id` would effectively be deleting this entry and creating a new\n one. If that's what you want to do, do so explicitly with appropriate calls to the `DELETE` and `POST` endpoints." + } + }, + "com.metabase.api#DeleteMtGtapRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteMtGtap": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteMtGtapRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/mt/gtap/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/mt/gtap/{id}\n\nDelete a GTAP entry." + } + }, + "com.metabase.api#GetMtUserAttributes": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/mt/user/attributes", + "code": 200 + }, + "smithy.api#documentation": "GET /api/mt/user/attributes\n\nFetch a list of possible keys for User `login_attributes`. This includes keys from tenant model\n attributes and keys that have already been set for existing Users." + } + }, + "com.metabase.api#PutMtUserAttributesRequestLoginAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": { + "smithy.api#documentation": "value must be a valid user attributes map (name -> value)" + } + }, + "com.metabase.api#PutMtUserAttributesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "login_attributes": { + "target": "com.metabase.api#PutMtUserAttributesRequestLoginAttributesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutMtUserAttributes": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutMtUserAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/mt/user/{id}/attributes", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/mt/user/{id}/attributes\n\nUpdate the `login_attributes` for a User." + } + }, + "com.metabase.api#GetNativeQuerySnippetRequest": { + "type": "structure", + "members": { + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNativeQuerySnippet": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNativeQuerySnippetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/native-query-snippet", + "code": 200 + }, + "smithy.api#documentation": "GET /api/native-query-snippet\n\nFetch all snippets" + } + }, + "com.metabase.api#CreateNativeQuerySnippetRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "content": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "snippet names cannot include '}' or start with spaces", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNativeQuerySnippet": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNativeQuerySnippetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/native-query-snippet", + "code": 200 + }, + "smithy.api#documentation": "POST /api/native-query-snippet\n\nCreate a new `NativeQuerySnippet`." + } + }, + "com.metabase.api#GetNativeQuerySnippetByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNativeQuerySnippetById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNativeQuerySnippetByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/native-query-snippet/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/native-query-snippet/{id}\n\nFetch native query snippet with ID." + } + }, + "com.metabase.api#PutNativeQuerySnippetRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "content": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutNativeQuerySnippet": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutNativeQuerySnippetRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/native-query-snippet/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/native-query-snippet/{id}\n\nUpdate an existing `NativeQuerySnippet`." + } + }, + "com.metabase.api#GetNotificationRequestPayloadType": { + "type": "enum", + "members": { + "NOTIFICATION_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/dashboard" + } + }, + "NOTIFICATION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/system-event" + } + }, + "NOTIFICATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/testing" + } + }, + "NOTIFICATION_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetNotificationRequest": { + "type": "structure", + "members": { + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "creator_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipient_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "recipient_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "creator_or_recipient_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "creator_or_recipient_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "card_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_inactive": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_inactive" + } + }, + "payload_type": { + "target": "com.metabase.api#GetNotificationRequestPayloadType", + "traits": { + "smithy.api#httpQuery": "payload_type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNotification": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNotificationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/notification", + "code": 200 + }, + "smithy.api#documentation": "GET /api/notification\n\nList notifications.\n - `creator_id`: if provided returns only notifications created by this user\n - `recipient_id`: if provided returns only notification that has recipient_id as a recipient\n - `creator_or_recipient_id`: if provided returns only notification that has user_id as creator or recipient\n - `card_id`: if provided returns only notification that has card_id as payload" + } + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParams": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1" + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationApiInput]] for a create request: no `:id` at any level, so a caller cannot pick a primary key." + } + }, + "com.metabase.api#MetabaseChannelModelsChannelChannel": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean" + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "details": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "Value must be a map.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Channel schema." + } + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParams": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase1" + }, + "Case2": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2" + }, + "Case3": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3" + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationRecipient]] on a create request, where the caller does not get to pick the id." + } + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase0": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document" + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase1": { + "type": "structure", + "members": { + "details": { + "target": "smithy.api#Document" + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Details": { + "type": "structure", + "members": { + "channel_id": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "value": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Details", + "traits": { + "smithy.api#required": {} + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Details": { + "type": "structure", + "members": { + "is_optional": { + "target": "smithy.api#Boolean" + }, + "pattern": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type": { + "type": "enum", + "members": { + "NOTIFICATION_RECIPIENT_RAW_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/raw-value" + } + }, + "NOTIFICATION_RECIPIENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/user" + } + }, + "NOTIFICATION_RECIPIENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/template" + } + }, + "NOTIFICATION_RECIPIENT_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-recipient/group" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3": { + "type": "structure", + "members": { + "details": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Details", + "traits": { + "smithy.api#required": {} + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permissions_group_id": { + "target": "smithy.api#Document" + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type", + "traits": { + "smithy.api#required": {} + } + }, + "user_id": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParams" + }, + "traits": {} + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvided": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1" + } + }, + "traits": { + "smithy.api#documentation": "Channel Template schema for API-provided templates. Does not allow handlebars-resource." + } + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "recipient_type": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType", + "traits": { + "smithy.api#jsonName": "recipient-type" + } + }, + "subject": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Email template details schema for API-provided templates. Only handlebars-text is allowed;\n handlebars-resource is restricted to internal use only." + } + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType": { + "type": "enum", + "members": { + "CC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cc" + } + }, + "BCC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bcc" + } + }, + "CC_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cc" + } + }, + "BCC_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bcc" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType": { + "type": "enum", + "members": { + "EMAIL_HANDLEBARS_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "email/handlebars-text" + } + }, + "EMAIL_HANDLEBARS_TEXT_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "email/handlebars-text" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0": { + "type": "structure", + "members": { + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "details": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1": { + "type": "structure", + "members": { + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "name": { + "target": "smithy.api#String" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipients": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList" + }, + "template": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvided", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "template_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationHandler]] on a create request, where the caller does not get to pick the id." + } + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationCardParams": { + "type": "structure", + "members": { + "card": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "send_condition": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationCardParamsSendCondition" + }, + "send_once": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationCard]] on a create request, where the caller does not get to pick the id." + } + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationCardParamsSendCondition": { + "type": "enum", + "members": { + "GOAL_BELOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "goal_below" + } + }, + "HAS_RESULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "has_result" + } + }, + "GOAL_ABOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "goal_above" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType": { + "type": "enum", + "members": { + "NOTIFICATION_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/dashboard" + } + }, + "NOTIFICATION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/system-event" + } + }, + "NOTIFICATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/testing" + } + }, + "NOTIFICATION_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/card" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParams": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1" + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationSubscription]] on a create request, where the caller does not get to pick the id." + } + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type": { + "type": "enum", + "members": { + "NOTIFICATION_SUBSCRIPTION_CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/cron" + } + }, + "NOTIFICATION_SUBSCRIPTION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/system-event" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0": { + "type": "structure", + "members": { + "cron_schedule": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "event_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type": { + "type": "enum", + "members": { + "NOTIFICATION_SUBSCRIPTION_CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/cron" + } + }, + "NOTIFICATION_SUBSCRIPTION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/system-event" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType": { + "type": "enum", + "members": { + "CRON_RAW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/raw" + } + }, + "CRON_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/builder" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1": { + "type": "structure", + "members": { + "cron_schedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "event_name": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type", + "traits": { + "smithy.api#required": {} + } + }, + "ui_display_type": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParams" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "handlers": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList" + }, + "payload": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationCardParams", + "traits": { + "smithy.api#required": {} + } + }, + "payload_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "payload_type": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType", + "traits": { + "smithy.api#required": {} + } + }, + "subscriptions": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationRecipientParams" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipients": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList" + }, + "template": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvided", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "template_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#documentation": "[[::NotificationHandler]] on a create request, where the caller does not get to pick the id." + } + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType": { + "type": "enum", + "members": { + "NOTIFICATION_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/dashboard" + } + }, + "NOTIFICATION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/system-event" + } + }, + "NOTIFICATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/testing" + } + }, + "NOTIFICATION_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/card" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsCreateNotificationSubscriptionParams" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "handlers": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList" + }, + "payload_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "payload_type": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType", + "traits": { + "smithy.api#required": {} + } + }, + "subscriptions": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList" + } + }, + "traits": {} + }, + "com.metabase.api#CreateNotificationRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationCreateNotificationParams", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotification": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification\n\nCreate a new notification, return the created notification." + } + }, + "com.metabase.api#GetNotificationAdminRequestChannelCase1List": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#GetNotificationAdminRequestChannel": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "Case1": { + "target": "com.metabase.api#GetNotificationAdminRequestChannelCase1List" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiAdminRunStatus": { + "type": "enum", + "members": { + "FAILING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failing" + } + }, + "SUCCESSFUL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "successful" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiAdminSortColumn": { + "type": "enum", + "members": { + "ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "id" + } + }, + "LAST_SEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_send" + } + }, + "LAST_CHECK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "last_check" + } + }, + "CARD_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card_name" + } + }, + "CREATOR_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "creator_name" + } + }, + "UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "updated_at" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiAdminSortDirection": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetNotificationAdminRequest": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "active" + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "creator_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "creator_active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "creator_active" + } + }, + "creatorless": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "creatorless" + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "card_id", + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipient_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "recipient_email" + } + }, + "channel": { + "target": "com.metabase.api#GetNotificationAdminRequestChannel", + "traits": { + "smithy.api#httpQuery": "channel" + } + }, + "last_send_status": { + "target": "com.metabase.api#MetabaseNotificationApiAdminRunStatus", + "traits": { + "smithy.api#httpQuery": "last_send_status" + } + }, + "last_check_status": { + "target": "com.metabase.api#MetabaseNotificationApiAdminRunStatus", + "traits": { + "smithy.api#httpQuery": "last_check_status" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "sort_column": { + "target": "com.metabase.api#MetabaseNotificationApiAdminSortColumn", + "traits": { + "smithy.api#httpQuery": "sort_column" + } + }, + "sort_direction": { + "target": "com.metabase.api#MetabaseNotificationApiAdminSortDirection", + "traits": { + "smithy.api#httpQuery": "sort_direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNotificationAdmin": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNotificationAdminRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/notification/admin", + "code": 200 + }, + "smithy.api#documentation": "GET /api/notification/admin\n\nList card-type notifications (alerts) for admin management. Supports pagination (`limit` +\n `offset` query params — handled by the offset-paging middleware), filtering, and sorting.\n\n `last_send_status` filter operates on the latest channel-send task_history row for the\n notification (`successful` = latest channel-send succeeded; `failing` = latest channel-send\n failed).\n\n `last_check_status` filter operates on the latest terminal TaskRun for the notification — the\n whole-run rollup (`successful` = the run succeeded; `failing` = it failed or was abandoned). This\n is a superset of `last_send_status`: it also catches query failures and heartbeat-abandoned runs\n that never reached the send step. The Failing tab uses `?last_check_status=failing`.\n\n `creatorless=true` selects notifications with no creator or a deactivated creator (the Ownerless\n tab). `creatorless=false` selects the inverse.\n\n `channel` accepts a single string or a repeated query param for multi-select (OR logic)." + } + }, + "com.metabase.api#CreateNotificationAdminBulkRequestAction": { + "type": "enum", + "members": { + "ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archive" + } + }, + "CHANGE_CREATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "change-creator" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateNotificationAdminBulkRequestNotificationIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateNotificationAdminBulkRequest": { + "type": "structure", + "members": { + "action": { + "target": "com.metabase.api#CreateNotificationAdminBulkRequestAction", + "traits": { + "smithy.api#required": {} + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "notification_ids": { + "target": "com.metabase.api#CreateNotificationAdminBulkRequestNotificationIdsList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationAdminBulk": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationAdminBulkRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/admin/bulk", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/admin/bulk\n\nBulk-archive or -change-creator a set of notifications. The per-notification `:active` flip goes\n through `:model/Notification`'s `before-update` hook, which creates / tears down the Quartz\n triggers. Recipient emails and `:event/notification-update` audit events are\n published via the shared [[notification-api/publish-notification-update!]] helper so this\n endpoint's side-effect contract can't drift from `PUT /api/notification/:id`." + } + }, + "com.metabase.api#GetNotificationAdminByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNotificationAdminById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNotificationAdminByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/notification/admin/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/notification/admin/{id}\n\nGet a single card-type notification with last_check, last_send, check_history (up to 10\n most-recent terminal alert-type TaskRuns) and send_history (up to 10 most-recent channel-send\n delivery attempts). 404 if the notification doesn't exist or isn't a card-type notification." + } + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInput": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1" + } + }, + "traits": { + "smithy.api#documentation": "Notification schema for API input. Like FullyHydratedNotification but restricts templates\n to user-provided types only (no handlebars-resource)." + } + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType": { + "type": "enum", + "members": { + "NOTIFICATION_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/dashboard" + } + }, + "NOTIFICATION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/system-event" + } + }, + "NOTIFICATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/testing" + } + }, + "NOTIFICATION_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/card" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipient" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem": { + "type": "structure", + "members": { + "template_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipients": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList" + }, + "template": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvided", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "channel": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationCard": { + "type": "structure", + "members": { + "card": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "send_condition": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationCardSendCondition" + }, + "send_once": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#documentation": "Schema for :model/NotificationCard." + } + }, + "com.metabase.api#MetabaseNotificationModelsNotificationCardSendCondition": { + "type": "enum", + "members": { + "GOAL_BELOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "goal_below" + } + }, + "HAS_RESULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "has_result" + } + }, + "GOAL_ABOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "goal_above" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscription": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1" + } + }, + "traits": { + "smithy.api#documentation": "Schema for :model/NotificationSubscription." + } + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase0Type": { + "type": "enum", + "members": { + "NOTIFICATION_SUBSCRIPTION_CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/cron" + } + }, + "NOTIFICATION_SUBSCRIPTION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/system-event" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase0": { + "type": "structure", + "members": { + "cron_schedule": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "event_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase0Type", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1Type": { + "type": "enum", + "members": { + "NOTIFICATION_SUBSCRIPTION_CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/cron" + } + }, + "NOTIFICATION_SUBSCRIPTION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification-subscription/system-event" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType": { + "type": "enum", + "members": { + "CRON_RAW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/raw" + } + }, + "CRON_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/builder" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1": { + "type": "structure", + "members": { + "cron_schedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "event_name": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer" + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1Type", + "traits": { + "smithy.api#required": {} + } + }, + "ui_display_type": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscription" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0": { + "type": "structure", + "members": { + "payload_type": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType", + "traits": { + "smithy.api#required": {} + } + }, + "payload_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "handlers": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList" + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "creator": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "payload": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationCard", + "traits": { + "smithy.api#required": {} + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "subscriptions": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationRecipient" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem": { + "type": "structure", + "members": { + "template_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "recipients": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList" + }, + "template": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannelTemplateUserProvided", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channel_type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "channel": { + "target": "com.metabase.api#MetabaseChannelModelsChannelChannel", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "notification_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType": { + "type": "enum", + "members": { + "NOTIFICATION_DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/dashboard" + } + }, + "NOTIFICATION_SYSTEM_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/system-event" + } + }, + "NOTIFICATION_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/testing" + } + }, + "NOTIFICATION_CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "notification/card" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseNotificationModelsNotificationSubscription" + }, + "traits": {} + }, + "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "creator_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "handlers": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList" + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "payload_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "payload_type": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType", + "traits": { + "smithy.api#required": {} + } + }, + "subscriptions": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList" + } + }, + "traits": {} + }, + "com.metabase.api#CreateNotificationSendRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInput", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationSend": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationSendRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/send", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/send\n\nSend an unsaved notification." + } + }, + "com.metabase.api#CreateNotificationUnsubscribeRequest": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "hash": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "notification-handler-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationUnsubscribe": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationUnsubscribeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/unsubscribe", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/unsubscribe\n\nAllow non-users to unsubscribe from notifications, with the hash given through email." + } + }, + "com.metabase.api#CreateNotificationUnsubscribeUndoRequest": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "hash": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "notification_handler_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "notification-handler-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationUnsubscribeUndo": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationUnsubscribeUndoRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/unsubscribe/undo", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/unsubscribe/undo\n\nAllow non-users to undo an unsubscribe from notifications, with the hash given through email." + } + }, + "com.metabase.api#GetNotificationByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetNotificationById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetNotificationByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/notification/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/notification/{id}\n\nGet a notification by id." + } + }, + "com.metabase.api#PutNotificationRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "body": { + "target": "com.metabase.api#MetabaseNotificationApiNotificationNotificationApiInput", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutNotification": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutNotificationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/notification/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/notification/{id}\n\nUpdate a notification, can also update its subscriptions, handlers.\n Return the updated notification.\n\n `creator_id` (owner) can be reassigned here only by superusers (e.g. the admin 'Edit alert'\n modal's owner picker). `mi/can-update?` rejects a non-superuser reassignment attempt with 403;\n the model's `before-update` hook is the backstop. Echoing back the unchanged value is fine." + } + }, + "com.metabase.api#CreateNotificationSendRequestHandlerIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateNotificationSendRequest2": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "handler_ids": { + "target": "com.metabase.api#CreateNotificationSendRequestHandlerIdsList" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationSend2": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationSendRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/{id}/send", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/{id}/send\n\nSend a notification by id." + } + }, + "com.metabase.api#CreateNotificationUnsubscribeRequest2": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotificationUnsubscribe2": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotificationUnsubscribeRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notification/{id}/unsubscribe", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notification/{id}/unsubscribe\n\nUnsubscribe current user from a notification." + } + }, + "com.metabase.api#CreateNotifyDbAttachedDatawarehouseRequest": { + "type": "structure", + "members": { + "schema_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "synchronous_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "synchronous?", + "com.distilled.openapi#nullable": {} + } + }, + "table_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotifyDbAttachedDatawarehouse": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotifyDbAttachedDatawarehouseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notify/db/attached_datawarehouse", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notify/db/attached_datawarehouse\n\nSync the attached datawarehouse. Can provide in the body:\n - table_name and schema_name: both strings. Will look for an existing table and sync it, otherwise will try to find a\n new table with that name and sync it. If it cannot find a table it will throw an error. If table_name is empty or\n blank, will sync the entire database.\n - synchronous?: is a boolean value to indicate if this should block on the result." + } + }, + "com.metabase.api#UpdateNotifyDbRequestScan": { + "type": "enum", + "members": { + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + }, + "SCHEMA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "schema" + } + } + }, + "traits": {} + }, + "com.metabase.api#UpdateNotifyDbRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "scan": { + "target": "com.metabase.api#UpdateNotifyDbRequestScan", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "synchronous_": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#jsonName": "synchronous?", + "com.distilled.openapi#nullable": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "table_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateNotifyDb": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateNotifyDbRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notify/db/{id}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notify/db/{id}\n\nNotification about a potential schema change to one of our `Databases`.\n Caller can optionally specify a `:table_id` or `:table_name` in the body to limit updates to a single\n `Table`. Optional Parameter `:scan` can be `\"full\"` or `\"schema\"` for a full sync or a schema sync, available\n regardless if a `:table_id` or `:table_name` is passed.\n This endpoint is secured by an API key that needs to be passed as a `X-METABASE-APIKEY` header which needs to be defined in\n the `MB_API_KEY` [environment variable](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.html#mb_api_key)" + } + }, + "com.metabase.api#CreateNotifyDbNewTableRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "schema_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "table_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateNotifyDbNewTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateNotifyDbNewTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/notify/db/{id}/new-table", + "code": 200 + }, + "smithy.api#documentation": "POST /api/notify/db/{id}/new-table\n\nSync a new table without running a full database sync. Requires `schema_name` and `table_name`. Will throw an error\n if the table already exists in Metabase or cannot be found." + } + }, + "com.metabase.api#GetOauthAuthorizationsRequestEventType": { + "type": "enum", + "members": { + "REGISTERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "registered" + } + }, + "APPROVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "approved" + } + }, + "DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "denied" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetOauthAuthorizationsRequest": { + "type": "structure", + "members": { + "client_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "client-id" + } + }, + "event_type": { + "target": "com.metabase.api#GetOauthAuthorizationsRequestEventType", + "traits": { + "smithy.api#httpQuery": "event-type" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetOauthAuthorizations": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetOauthAuthorizationsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/oauth/authorizations", + "code": 200 + }, + "smithy.api#documentation": "GET /api/oauth/authorizations\n\nList OAuth dynamic client registration events (registered, approved, or denied), newest first.\n Joins client info and, for decision events, the deciding user. Superuser only." + } + }, + "com.metabase.api#GetOsiAiContext": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/osi/ai-context", + "code": 200 + }, + "smithy.api#documentation": "GET /api/osi/ai-context\n\nGet all ai_context entries, paginated." + } + }, + "com.metabase.api#CreateOsiAiContextReconcile": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/osi/ai-context/reconcile", + "code": 200 + }, + "smithy.api#documentation": "POST /api/osi/ai-context/reconcile\n\nForce a reconcile of the library entity index against the application database, blocking until a\n reconcile covering this call finishes.\n Returns the index mutations (`index`) separately from execution timing (`execution`: how long the run\n waited to start, then how long it ran).\n This call never reuses a reconcile already in progress (it may have started before your latest change);\n it starts one if the index is idle, otherwise it queues a single follow-up that any other waiting calls\n share.\n Requires the library entity-retrieval feature; returns a 400 when the index is unavailable (the feature\n isn't licensed, or the pgvector store or embedding backend isn't configured)." + } + }, + "com.metabase.api#GetOsiAiContextByEntityLocalIdRequest": { + "type": "structure", + "members": { + "entity_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_local_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetOsiAiContextByEntityLocalId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetOsiAiContextByEntityLocalIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/osi/ai-context/{entity_type}/{entity_local_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/osi/ai-context/{entity-type}/{entity-local-id}\n\nGet the ai_context entry for an entity by its logical `(entity_type, entity_local_id)` key." + } + }, + "com.metabase.api#PutOsiAiContextRequestAiContextExamplesList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutOsiAiContextRequestAiContextSynonymsList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#PutOsiAiContextRequestAiContext": { + "type": "structure", + "members": { + "examples": { + "target": "com.metabase.api#PutOsiAiContextRequestAiContextExamplesList" + }, + "instructions": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "synonyms": { + "target": "com.metabase.api#PutOsiAiContextRequestAiContextSynonymsList" + } + }, + "traits": {} + }, + "com.metabase.api#PutOsiAiContextRequest": { + "type": "structure", + "members": { + "entity_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_local_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "ai_context": { + "target": "com.metabase.api#PutOsiAiContextRequestAiContext", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutOsiAiContext": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutOsiAiContextRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/osi/ai-context/{entity_type}/{entity_local_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/osi/ai-context/{entity-type}/{entity-local-id}\n\nCreate or replace (upsert) the ai_context for an entity, addressed by its logical key. One row per\n entity: an existing row is updated in place rather than duplicated, and the compound primary key plus the\n upsert keep two concurrent writers from racing in a duplicate row." + } + }, + "com.metabase.api#DeleteOsiAiContextRequest": { + "type": "structure", + "members": { + "entity_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "entity_local_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteOsiAiContext": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteOsiAiContextRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/osi/ai-context/{entity_type}/{entity_local_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/osi/ai-context/{entity-type}/{entity-local-id}\n\nDelete the ai_context entry for an entity by its logical key." + } + }, + "com.metabase.api#GetPermissionsGraph": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/graph", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/graph\n\nFetch a graph of all Permissions." + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaDbPerms": { + "type": "structure", + "members": { + "create_queries": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemas", + "traits": { + "smithy.api#jsonName": "create-queries" + } + }, + "data": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDataPerms" + }, + "data_model": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDataPerms", + "traits": { + "smithy.api#jsonName": "data-model" + } + }, + "details": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDbPermsDetails" + }, + "download": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDataPerms" + }, + "transforms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDbPermsTransforms" + }, + "view_data": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemas", + "traits": { + "smithy.api#jsonName": "view-data" + } + } + }, + "traits": { + "smithy.api#documentation": "the permissions one group has on one database" + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemas": { + "type": "union", + "members": { + "MetabasePermissionsRestSchemaSchemaGraph": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemaGraph" + }, + "Case1": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemasCase1" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemaGraph": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemaGraphValue" + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemaPerms": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemaPermsCase0Map" + }, + "MetabasePermissionsRestSchemaPerms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaPerms" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaTablePerms": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0" + }, + "MetabasePermissionsRestSchemaPerms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaPerms" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0Query": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "SEGMENTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segmented" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0Read": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0": { + "type": "structure", + "members": { + "query": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0Query" + }, + "read": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaTablePermsCase0Read" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaPerms": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "blocked" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + }, + "LEGACY_NO_SELF_SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "legacy-no-self-service" + } + }, + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "QUERY_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-builder" + } + }, + "SANDBOXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sandboxed" + } + }, + "SEGMENTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segmented" + } + }, + "UNRESTRICTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unrestricted" + } + } + }, + "traits": { + "smithy.api#documentation": "Perms that get reused for TablePerms and SchemaPerms" + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemaPermsCase0Value": { + "type": "union", + "members": { + "MetabasePermissionsRestSchemaTablePerms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaTablePerms" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemaPermsCase0Map": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemaPermsCase0Value" + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemaGraphValue": { + "type": "union", + "members": { + "MetabasePermissionsRestSchemaSchemaPerms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemaPerms" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSchemasCase1": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "SEGMENTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segmented" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "BLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "block" + } + }, + "BLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "blocked" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + }, + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + }, + "IMPERSONATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "impersonated" + } + }, + "UNRESTRICTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unrestricted" + } + }, + "SANDBOXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sandboxed" + } + }, + "LEGACY_NO_SELF_SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "legacy-no-self-service" + } + }, + "QUERY_BUILDER_AND_NATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-builder-and-native" + } + }, + "QUERY_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "query-builder" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaDataPerms": { + "type": "structure", + "members": { + "native": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaNative", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "schemas": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSchemas" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaNative": { + "type": "enum", + "members": { + "WRITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "write" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + }, + "LIMITED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "limited" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaDbPermsDetails": { + "type": "enum", + "members": { + "YES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "yes" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaDbPermsTransforms": { + "type": "enum", + "members": { + "YES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "yes" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "no" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestGroupsCase0ValueCase0Value": { + "type": "union", + "members": { + "MetabasePermissionsRestSchemaDbPerms": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaDbPerms" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestGroupsCase0ValueCase0Map": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutPermissionsGraphRequestGroupsCase0ValueCase0Value" + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestGroupsCase0Value": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#PutPermissionsGraphRequestGroupsCase0ValueCase0Map" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestGroupsCase0Map": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#PutPermissionsGraphRequestGroupsCase0Value" + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestGroups": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#PutPermissionsGraphRequestGroupsCase0Map" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaImpersonationUpdate": { + "type": "structure", + "members": { + "attribute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "db_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "a connection impersonation policy to write alongside a permissions graph update" + } + }, + "com.metabase.api#PutPermissionsGraphRequestImpersonationsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaImpersonationUpdate" + }, + "traits": {} + }, + "com.metabase.api#MetabasePermissionsRestSchemaSandboxUpdate": { + "type": "structure", + "members": { + "attribute_remappings": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemappings", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "permission_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#documentation": "a sandbox to write alongside a permissions graph update" + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemappings": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemappingsValue" + }, + "traits": { + "smithy.api#documentation": "a map of user attribute name -> the field or parameter target it is remapped onto" + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemapping": { + "type": "union", + "members": { + "Case0": { + "target": "smithy.api#String" + }, + "MetabaseLibSchemaIdField": { + "target": "smithy.api#Integer" + }, + "MetabaseLibSchemaParameterTarget": { + "target": "com.metabase.api#MetabaseLibSchemaParameterTarget" + } + }, + "traits": { + "smithy.api#documentation": "a field name, a field id, or a parameter target" + } + }, + "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemappingsValue": { + "type": "union", + "members": { + "MetabasePermissionsRestSchemaAttributeRemapping": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaAttributeRemapping" + }, + "Case1": { + "target": "smithy.api#Document" + } + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequestSandboxesList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabasePermissionsRestSchemaSandboxUpdate" + }, + "traits": {} + }, + "com.metabase.api#PutPermissionsGraphRequest": { + "type": "structure", + "members": { + "skip_graph": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "skip-graph" + } + }, + "force": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "force" + } + }, + "groups": { + "target": "com.metabase.api#PutPermissionsGraphRequestGroups", + "traits": { + "smithy.api#required": {} + } + }, + "impersonations": { + "target": "com.metabase.api#PutPermissionsGraphRequestImpersonationsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "revision": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "sandboxes": { + "target": "com.metabase.api#PutPermissionsGraphRequestSandboxesList", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutPermissionsGraph": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutPermissionsGraphRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/permissions/graph", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/permissions/graph\n\nDo a batch update of Permissions by passing in a modified graph. This should return the same graph, in the same\n format, that you got from `GET /api/permissions/graph`, with any changes made in the wherever necessary. This\n modified graph must correspond to the `PermissionsGraph` schema. If successful, this endpoint returns the updated\n permissions graph; use this as a base for any further modifications.\n\n Revisions to the permissions graph are tracked. If you fetch the permissions graph and some other third-party\n modifies it before you can submit you revisions, the endpoint will instead make no changes and return a\n 409 (Conflict) response. In this case, you should fetch the updated graph and make desired changes to that.\n\n The optional `sandboxes` key contains a list of sandboxes that should be created or modified in conjunction with\n this permissions graph update. Since data sandboxing is an Enterprise Edition-only feature, a 402 (Payment Required)\n response will be returned if this key is present and the server is not running the Enterprise Edition, and/or the\n `:sandboxes` feature flag is not present.\n\n If the skip-graph query param is truthy, then the graph will not be returned." + } + }, + "com.metabase.api#GetPermissionsGraphDbRequest": { + "type": "structure", + "members": { + "db_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPermissionsGraphDb": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPermissionsGraphDbRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/graph/db/{db_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/graph/db/{db-id}\n\nFetch a graph of all Permissions for db-id `db-id`." + } + }, + "com.metabase.api#GetPermissionsGraphGroupRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPermissionsGraphGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPermissionsGraphGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/graph/group/{group_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/graph/group/{group-id}\n\nFetch a graph of all Permissions for group-id `group-id`." + } + }, + "com.metabase.api#GetPermissionsGroupRequestTenancy": { + "type": "enum", + "members": { + "EXTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "external" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetPermissionsGroupRequest": { + "type": "structure", + "members": { + "tenancy": { + "target": "com.metabase.api#GetPermissionsGroupRequestTenancy", + "traits": { + "smithy.api#httpQuery": "tenancy" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPermissionsGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPermissionsGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/group", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/group\n\nFetch all `PermissionsGroups`, including a count of the number of `:members` in that group.\n This API requires superuser or group manager of more than one group.\n Group manager is only available if `advanced-permissions` is enabled and returns only groups that user\n is manager of.\n\n Optional query parameter `tenancy` can be used to filter groups:\n - `tenancy=external`: Returns only tenant groups (where `is_tenant_group = true`)\n - `tenancy=internal`: Returns only non-tenant groups (where `is_tenant_group = false`)\n - No `tenancy` parameter: Returns all groups (default behavior)" + } + }, + "com.metabase.api#CreatePermissionsGroupRequest": { + "type": "structure", + "members": { + "is_tenant_group": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePermissionsGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePermissionsGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/permissions/group", + "code": 200 + }, + "smithy.api#documentation": "POST /api/permissions/group\n\nCreate a new `PermissionsGroup`." + } + }, + "com.metabase.api#PutPermissionsGroupRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutPermissionsGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutPermissionsGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/permissions/group/{group_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/permissions/group/{group-id}\n\nUpdate the name of a `PermissionsGroup`." + } + }, + "com.metabase.api#DeletePermissionsGroupRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeletePermissionsGroup": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeletePermissionsGroupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/permissions/group/{group_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/permissions/group/{group-id}\n\nDelete a specific `PermissionsGroup`." + } + }, + "com.metabase.api#GetPermissionsGroupByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPermissionsGroupById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPermissionsGroupByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/group/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/group/{id}\n\nFetch the details for a certain permissions group." + } + }, + "com.metabase.api#GetPermissionsMembership": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/permissions/membership", + "code": 200 + }, + "smithy.api#documentation": "GET /api/permissions/membership\n\nFetch a map describing the group memberships of various users.\n This map's format is:\n\n { [{:membership_id \n :group_id \n :is_group_manager boolean}]}" + } + }, + "com.metabase.api#CreatePermissionsMembershipRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "is_group_manager": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePermissionsMembership": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePermissionsMembershipRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/permissions/membership", + "code": 200 + }, + "smithy.api#documentation": "POST /api/permissions/membership\n\nAdd a `User` to a `PermissionsGroup`. Returns updated list of members belonging to the group." + } + }, + "com.metabase.api#PutPermissionsMembershipClearRequest": { + "type": "structure", + "members": { + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutPermissionsMembershipClear": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutPermissionsMembershipClearRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/permissions/membership/{group_id}/clear", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/permissions/membership/{group-id}/clear\n\nRemove all members from a `PermissionsGroup`. Returns a 400 (Bad Request) if the group ID is for the admin group." + } + }, + "com.metabase.api#PutPermissionsMembershipRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "is_group_manager": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutPermissionsMembership": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutPermissionsMembershipRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/permissions/membership/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/permissions/membership/{id}\n\nUpdate a Permission Group membership. Returns the updated record." + } + }, + "com.metabase.api#DeletePermissionsMembershipRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeletePermissionsMembership": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeletePermissionsMembershipRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/permissions/membership/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/permissions/membership/{id}\n\nRemove a User from a PermissionsGroup (delete their membership)." + } + }, + "com.metabase.api#GetPersist": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/persist", + "code": 200 + }, + "smithy.api#documentation": "GET /api/persist\n\nList the entries of [[PersistedInfo]] in order to show a status page." + } + }, + "com.metabase.api#GetPersistCardRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPersistCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPersistCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/persist/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/persist/card/{card-id}\n\nFetch a particular [[PersistedInfo]] by card-id." + } + }, + "com.metabase.api#CreatePersistCardPersistRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistCardPersist": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistCardPersistRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/card/{card_id}/persist", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/card/{card-id}/persist\n\nMark the model (card) as persisted. Runs the query and saves it to the database backing the card and hot swaps this\n query in place of the model's query." + } + }, + "com.metabase.api#CreatePersistCardRefreshRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistCardRefresh": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistCardRefreshRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/card/{card_id}/refresh", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/card/{card-id}/refresh\n\nRefresh the persisted model caching `card-id`." + } + }, + "com.metabase.api#CreatePersistCardUnpersistRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistCardUnpersist": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistCardUnpersistRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/card/{card_id}/unpersist", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/card/{card-id}/unpersist\n\nUnpersist this model. Deletes the persisted table backing the model and all queries after this will use the card's\n query rather than the saved version of the query." + } + }, + "com.metabase.api#CreatePersistDatabasePersistRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistDatabasePersist": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistDatabasePersistRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/database/{id}/persist", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/database/{id}/persist\n\nAttempt to enable model persistence for a database. If already enabled returns a generic 204." + } + }, + "com.metabase.api#CreatePersistDatabaseUnpersistRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistDatabaseUnpersist": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistDatabaseUnpersistRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/database/{id}/unpersist", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/database/{id}/unpersist\n\nAttempt to disable model persistence for a database. If already not enabled, just returns a generic 204." + } + }, + "com.metabase.api#CreatePersistDisable": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/disable", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/disable\n\nDisable global setting to allow databases to persist models. This will remove all tasks to refresh tables, remove\n that option from databases which might have it enabled, and delete all cached tables." + } + }, + "com.metabase.api#CreatePersistEnable": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/enable", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/enable\n\nEnable global setting to allow databases to persist models." + } + }, + "com.metabase.api#CreatePersistSetRefreshScheduleRequest": { + "type": "structure", + "members": { + "cron": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Value must be a string representing a cron schedule of format ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePersistSetRefreshSchedule": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePersistSetRefreshScheduleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/persist/set-refresh-schedule", + "code": 200 + }, + "smithy.api#documentation": "POST /api/persist/set-refresh-schedule\n\nSet the cron schedule to refresh persisted models.\n Shape should be JSON like {cron: \"0 30 1/8 * * ? *\"}." + } + }, + "com.metabase.api#GetPersistByPersistedInfoIdRequest": { + "type": "structure", + "members": { + "persisted_info_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPersistByPersistedInfoId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPersistByPersistedInfoIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/persist/{persisted_info_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/persist/{persisted-info-id}\n\nFetch a particular [[PersistedInfo]] by id." + } + }, + "com.metabase.api#CreatePremiumFeaturesTokenRefresh": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/premium-features/token/refresh", + "code": 200 + }, + "smithy.api#documentation": "POST /api/premium-features/token/refresh\n\nClear all token caches and re-check the premium features token against the MetaStore.\n Returns the fresh token status. Useful for the frontend after a purchase so that new features\n are recognized without waiting for the cache TTL." + } + }, + "com.metabase.api#GetPremiumFeaturesTokenStatus": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/premium-features/token/status", + "code": 200 + }, + "smithy.api#documentation": "GET /api/premium-features/token/status\n\nFetch info about the current Premium-Features premium features token including whether it is `valid`, a `trial` token, its\n `features`, when it is `valid-thru`, and the `status` of the account." + } + }, + "com.metabase.api#GetPreviewEmbedCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/card/{token}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/card/{token}\n\nFetch a Card you're considering embedding by passing a JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedCardParamRemappingRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedCardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedCardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/card/{token}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/card/{token}/params/{param-key}/remapping\n\nEmbedded version of api.card filter values endpoint." + } + }, + "com.metabase.api#GetPreviewEmbedCardParamValuesRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedCardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedCardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/card/{token}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/card/{token}/params/{param-key}/values\n\nEmbedded version of api.card filter values endpoint." + } + }, + "com.metabase.api#GetPreviewEmbedCardQueryRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/card/{token}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/card/{token}/query\n\nFetch the query results for a Card you're considering embedding by passing a JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedDashboardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedDashboard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedDashboardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/dashboard/{token}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/dashboard/{token}\n\nFetch a Dashboard you're considering embedding by passing a JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamRemappingRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamRemapping": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamRemappingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/dashboard/{token}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/dashboard/{token}/params/{param-key}/remapping\n\nEmbedded version of the remapped dashboard param value endpoint." + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamSearchRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "prefix": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/dashboard/{token}/params/{param_key}/search/{prefix}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/dashboard/{token}/params/{param-key}/search/{prefix}\n\nEmbedded version of chain filter search endpoint." + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamValuesRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedDashboardParamValues": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamValuesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/dashboard/{token}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/dashboard/{token}/params/{param-key}/values\n\nEmbedded version of chain filter values endpoint." + } + }, + "com.metabase.api#GetPreviewEmbedPivotCardQueryRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedPivotCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedPivotCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/pivot/card/{token}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/pivot/card/{token}/query\n\nFetch the query results for a Card you're considering embedding by passing a JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedPivotDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedPivotDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedPivotDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`." + } + }, + "com.metabase.api#GetPreviewEmbedTilesCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedTilesCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedTilesCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/tiles/card/{token}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/tiles/card/{token}/{zoom}/{x}/{y}\n\nGenerates a single tile image for an embedded Card using the map visualization." + } + }, + "com.metabase.api#GetPreviewEmbedTilesDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPreviewEmbedTilesDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPreviewEmbedTilesDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/preview_embed/tiles/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/preview_embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a Card on an embedded Dashboard using the map visualization." + } + }, + "com.metabase.api#CreateProductFeedbackRequest": { + "type": "structure", + "members": { + "comments": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateProductFeedback": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateProductFeedbackRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/product-feedback", + "code": 200 + }, + "smithy.api#documentation": "POST /api/product-feedback\n\nEndpoint to provide feedback from the product" + } + }, + "com.metabase.api#GetActionByUuidRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetActionByUuid": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetActionByUuidRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/action/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/action/{uuid}\n\nFetch a publicly-accessible Action. Does not require auth credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#CreateActionExecuteRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaExecuteParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateActionExecute2": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateActionExecuteRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/public/action/{uuid}/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/public/action/{uuid}/execute\n\nExecute the Action.\n\n `parameters` should be the mapped dashboard parameters with values." + } + }, + "com.metabase.api#GetCardByUuidRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardByUuid": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardByUuidRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}\n\nFetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetCardParamRemappingRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamRemapping2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamRemappingRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}/params/{param-key}/remapping\n\nFetch the remapped value for the given `value` of parameter with ID `:param-key` of card with UUID `uuid`." + } + }, + "com.metabase.api#GetCardParamSearchByQueryRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamSearchByQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamSearchByQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}/params/{param_key}/search/{query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}/params/{param-key}/search/{query}\n\nFetch values for a parameter on a public card containing `query`." + } + }, + "com.metabase.api#GetCardParamValuesRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardParamValues2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardParamValuesRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}/params/{param-key}/values\n\nFetch values for a parameter on a public card." + } + }, + "com.metabase.api#GetCardQueryRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "ignore_cache" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}/query\n\nFetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetCardQueryByExportFormatRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#GetCardQueryByExportFormatRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "export_format": { + "target": "com.metabase.api#GetCardQueryByExportFormatRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "format_rows" + } + }, + "pivot_results": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "pivot_results" + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "csv_include_bom": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "csv_include_bom" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetCardQueryByExportFormat": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetCardQueryByExportFormatRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/card/{uuid}/query/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/card/{uuid}/query/{export-format}\n\nFetch a publicly-accessible Card and return query results in the specified format. Does not require auth\n credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetDashboardByUuidRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashboard_load_id": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "dashboard_load_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardByUuid": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardByUuidRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}\n\nFetch a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "ignore_cache" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public\n sharing must be enabled." + } + }, + "com.metabase.api#UpdateDashboardDashcardCardRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#UpdateDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "com.metabase.api#UpdateDashboardDashcardCardRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "csv_include_bom": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pivot_results": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{export-format}\n\nFetch the results of running a publicly-accessible Card belonging to a Dashboard and return the data in one of the\n export formats. Does not require auth credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetDashboardDashcardExecuteRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaPrefetchParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardDashcardExecute2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardDashcardExecuteRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/execute", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute\n\nFetches the values for filling in execution parameters. Pass PK parameters and values to select." + } + }, + "com.metabase.api#CreateDashboardDashcardExecuteRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "modelId": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseActionsSchemaExecuteParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateDashboardDashcardExecute2": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateDashboardDashcardExecuteRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/execute", + "code": 200 + }, + "smithy.api#documentation": "POST /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute\n\nExecute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it.\n\n `parameters` should be the mapped dashboard parameters with values." + } + }, + "com.metabase.api#GetDashboardParamRemappingRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "value", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamRemapping2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamRemappingRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}/params/{param_key}/remapping", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}/params/{param-key}/remapping\n\nFetch the remapped value for the given `value` of parameter with ID `:param-key` of dashboard with UUID `uuid`." + } + }, + "com.metabase.api#GetDashboardParamSearchByQueryRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamSearchByQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamSearchByQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}/params/{param_key}/search/{query}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}/params/{param-key}/search/{query}\n\nFetch filter values for dashboard parameter `param-key`, containing specified `query`." + } + }, + "com.metabase.api#GetDashboardParamValuesRequest2": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "param_key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDashboardParamValues2": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDashboardParamValuesRequest2" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/dashboard/{uuid}/params/{param_key}/values", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/dashboard/{uuid}/params/{param-key}/values\n\nFetch filter values for dashboard parameter `param-key`." + } + }, + "com.metabase.api#GetDocumentByUuidRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDocumentByUuid": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDocumentByUuidRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/document/{uuid}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/document/{uuid}\n\nFetch a publicly-accessible Document. Does not require auth credentials. Public sharing must be enabled.\n\n Returns a Document with sensitive fields removed (excludes collection_id, permissions, creator details, etc.).\n Includes all embedded Cards with their metadata hydrated so the frontend doesn't need to make separate\n requests for each card — just like public Dashboards do." + } + }, + "com.metabase.api#GetDocumentCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetDocumentCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetDocumentCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/document/{uuid}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/document/{uuid}/card/{card-id}\n\nRun a query for a Card that's embedded in a public Document. Doesn't require auth credentials. Public sharing must\n be enabled." + } + }, + "com.metabase.api#UpdateDocumentCardRequestExportFormat": { + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "csv" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "XLSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "xlsx" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for valid export formats for downloading query results." + } + }, + "com.metabase.api#UpdateDocumentCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "export_format": { + "target": "com.metabase.api#UpdateDocumentCardRequestExportFormat", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "csv_include_bom": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "format_rows": { + "target": "smithy.api#Boolean" + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "pivot_results": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#UpdateDocumentCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#UpdateDocumentCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/public/document/{uuid}/card/{card_id}/{export_format}", + "code": 200 + }, + "smithy.api#documentation": "POST /api/public/document/{uuid}/card/{card-id}/{export-format}\n\nFetch a Card embedded in a public Document and return query results in the specified format.\n Does not require auth credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetOembedRequestFormat": { + "type": "enum", + "members": { + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "json" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetOembedRequest": { + "type": "structure", + "members": { + "url": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "url", + "smithy.api#required": {} + } + }, + "format": { + "target": "com.metabase.api#GetOembedRequestFormat", + "traits": { + "smithy.api#httpQuery": "format", + "smithy.api#documentation": "The format param is not used by the API, but is required as part of the oEmbed spec: http://oembed.com/#section2 just return an error if `format` is specified and it's anything other than `json`." + } + }, + "maxheight": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maxheight" + } + }, + "maxwidth": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "maxwidth" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetOembed": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetOembedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/oembed", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/oembed\n\noEmbed endpoint used to retrieve embed code and metadata for a (public) Metabase URL." + } + }, + "com.metabase.api#GetPivotCardQueryRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "ignore_cache" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPivotCardQuery": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPivotCardQueryRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/pivot/card/{uuid}/query", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/pivot/card/{uuid}/query\n\nFetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth\n credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetPivotDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "ignore_cache": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "ignore_cache" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPivotDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPivotDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/pivot/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/pivot/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}\n\nFetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public\n sharing must be enabled." + } + }, + "com.metabase.api#GetTilesCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTilesCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTilesCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/tiles/card/{uuid}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/tiles/card/{uuid}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a publicly-accessible Card using the map visualization. Does not require auth\n credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetTilesDashboardDashcardCardRequest": { + "type": "structure", + "members": { + "uuid": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be a valid UUID." + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTilesDashboardDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTilesDashboardDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/public/tiles/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/public/tiles/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a Card using the map visualization in a publicly-accessible Dashboard. Does not\n require auth credentials. Public sharing must be enabled." + } + }, + "com.metabase.api#GetPulseRequest": { + "type": "structure", + "members": { + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "dashboard_id" + } + }, + "creator_or_recipient": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "creator_or_recipient" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPulse": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPulseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/pulse", + "code": 200 + }, + "smithy.api#documentation": "GET /api/pulse\n\nFetch all dashboard subscriptions. By default, returns only subscriptions for which the current user has write\n permissions. For admins, this is all subscriptions; for non-admins, it is only subscriptions that they created.\n\n If `dashboard_id` is specified, restricts results to subscriptions for that dashboard.\n\n If `created_or_receive` is `true`, it specifically returns all subscriptions for which the current user\n created *or* is a known recipient of. Note that this is a superset of the default items returned for non-admins,\n and a subset of the default items returned for admins. This is used to power the /account/notifications page.\n This may include subscriptions which the current user does not have collection permissions for, in which case\n some sensitive metadata (the list of cards and recipients) is stripped out." + } + }, + "com.metabase.api#CreatePulseRequestParametersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter" + }, + "traits": {} + }, + "com.metabase.api#CreatePulseRequest": { + "type": "structure", + "members": { + "cards": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "channels": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "parameters": { + "target": "com.metabase.api#CreatePulseRequestParametersList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "skip_if_empty": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePulse": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePulseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/pulse", + "code": 200 + }, + "smithy.api#documentation": "POST /api/pulse\n\nCreate a new `Pulse`." + } + }, + "com.metabase.api#GetPulseFormInput": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/pulse/form_input", + "code": 200 + }, + "smithy.api#documentation": "GET /api/pulse/form_input\n\nProvides relevant configuration information and user choices for creating/updating Pulses." + } + }, + "com.metabase.api#CreatePulseTestRequestAlertCondition": { + "type": "enum", + "members": { + "ROWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rows" + } + }, + "GOAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "goal" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreatePulseTestRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "skip_if_empty": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "alert_above_goal": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "alert_condition": { + "target": "com.metabase.api#CreatePulseTestRequestAlertCondition", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "alert_first_only": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "disable_links": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cards": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + }, + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channels": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePulseTest": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePulseTestRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/pulse/test", + "code": 200 + }, + "smithy.api#documentation": "POST /api/pulse/test\n\nTest send an unsaved pulse." + } + }, + "com.metabase.api#CreatePulseUnsubscribeRequest": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "hash": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "pulse_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "pulse-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePulseUnsubscribe": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePulseUnsubscribeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/pulse/unsubscribe", + "code": 200 + }, + "smithy.api#documentation": "POST /api/pulse/unsubscribe\n\nAllow non-users to unsubscribe from pulses/subscriptions, with the hash given through email." + } + }, + "com.metabase.api#CreatePulseUnsubscribeUndoRequest": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "hash": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "pulse_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {}, + "smithy.api#jsonName": "pulse-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreatePulseUnsubscribeUndo": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreatePulseUnsubscribeUndoRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/pulse/unsubscribe/undo", + "code": 200 + }, + "smithy.api#documentation": "POST /api/pulse/unsubscribe/undo\n\nAllow non-users to undo an unsubscribe from pulses/subscriptions, with the hash given through email." + } + }, + "com.metabase.api#GetPulseByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetPulseById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetPulseByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/pulse/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/pulse/{id}\n\nFetch `Pulse` with ID. If the user is a recipient of the Pulse but does not have read permissions for its collection,\n we still return it but with some sensitive metadata removed." + } + }, + "com.metabase.api#PutPulseRequestParametersList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseParametersSchemaParameter" + }, + "traits": {} + }, + "com.metabase.api#PutPulseRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "cards": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "channels": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_position": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "parameters": { + "target": "com.metabase.api#PutPulseRequestParametersList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "skip_if_empty": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutPulse": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutPulseRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/pulse/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/pulse/{id}\n\nUpdate a Pulse with `id`." + } + }, + "com.metabase.api#DeletePulseSubscriptionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeletePulseSubscription": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeletePulseSubscriptionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/pulse/{id}/subscription", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/pulse/{id}/subscription\n\nFor users to unsubscribe themselves from a pulse subscription." + } + }, + "com.metabase.api#GetRevisionRequestEntity": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetRevisionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "entity": { + "target": "com.metabase.api#GetRevisionRequestEntity", + "traits": { + "smithy.api#httpQuery": "entity", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetRevision": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetRevisionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/revision", + "code": 200 + }, + "smithy.api#documentation": "GET /api/revision\n\nGet revisions of an object." + } + }, + "com.metabase.api#CreateRevisionRevertRequestEntity": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateRevisionRevertRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#CreateRevisionRevertRequestEntity", + "traits": { + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "revision_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateRevisionRevert": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateRevisionRevertRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/revision/revert", + "code": 200 + }, + "smithy.api#documentation": "POST /api/revision/revert\n\nRevert an object to a prior revision." + } + }, + "com.metabase.api#GetRevisionByIdRequestEntity": { + "type": "enum", + "members": { + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + }, + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetRevisionByIdRequest": { + "type": "structure", + "members": { + "entity": { + "target": "com.metabase.api#GetRevisionByIdRequestEntity", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetRevisionById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetRevisionByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/revision/{entity}/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/revision/{entity}/{id}\n\nFetch `Revisions` for an object with ID." + } + }, + "com.metabase.api#GetSearchRequestContext": { + "type": "enum", + "members": { + "BASIC_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic-actions" + } + }, + "BROWSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "browse" + } + }, + "COMMAND_PALETTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "command-palette" + } + }, + "DATA_PICKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "data-picker" + } + }, + "DEPENDENCIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependencies" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "EMBEDDING_SETUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedding-setup" + } + }, + "ENTITY_PICKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entity-picker" + } + }, + "LIBRARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "library" + } + }, + "MODEL_MIGRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model-migration" + } + }, + "SEARCH_APP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search-app" + } + }, + "SEARCH_BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search-bar" + } + }, + "TYPE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "type-filter" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "METABOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabot" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestModelsItem": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "action" + } + }, + "INDEXED_ENTITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexed-entity" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestModelsList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetSearchRequestModelsItem" + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestFilterItemsInPersonalCollection": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "only" + } + }, + "ONLY_MINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "only-mine" + } + }, + "EXCLUDE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclude" + } + }, + "EXCLUDE_OTHERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclude-others" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestCreatedByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestDisplayTypeList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestLastEditedByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestVectorSearchStrategy": { + "type": "enum", + "members": { + "HNSW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw" + } + }, + "BRUTE_FORCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "brute-force" + } + }, + "HNSW_ITERATIVE_RELAXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw-iterative-relaxed" + } + }, + "HNSW_ITERATIVE_STRICT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw-iterative-strict" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequestIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchRequest": { + "type": "structure", + "members": { + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "q" + } + }, + "context": { + "target": "com.metabase.api#GetSearchRequestContext", + "traits": { + "smithy.api#httpQuery": "context" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "collection": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "collection" + } + }, + "table_db_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "table_db_id" + } + }, + "models": { + "target": "com.metabase.api#GetSearchRequestModelsList", + "traits": { + "smithy.api#httpQuery": "models" + } + }, + "filter_items_in_personal_collection": { + "target": "com.metabase.api#GetSearchRequestFilterItemsInPersonalCollection", + "traits": { + "smithy.api#httpQuery": "filter_items_in_personal_collection" + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "created_at" + } + }, + "created_by": { + "target": "com.metabase.api#GetSearchRequestCreatedByList", + "traits": { + "smithy.api#httpQuery": "created_by" + } + }, + "display_type": { + "target": "com.metabase.api#GetSearchRequestDisplayTypeList", + "traits": { + "smithy.api#httpQuery": "display_type" + } + }, + "last_edited_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "last_edited_at" + } + }, + "last_edited_by": { + "target": "com.metabase.api#GetSearchRequestLastEditedByList", + "traits": { + "smithy.api#httpQuery": "last_edited_by" + } + }, + "model_ancestors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "model_ancestors" + } + }, + "search_engine": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "search_engine" + } + }, + "vector_search_strategy": { + "target": "com.metabase.api#GetSearchRequestVectorSearchStrategy", + "traits": { + "smithy.api#httpQuery": "vector_search_strategy" + } + }, + "vector_search_ef_search": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "vector_search_ef_search" + } + }, + "vector_search_max_scan_tuples": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "vector_search_max_scan_tuples" + } + }, + "vector_search_explain": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "vector_search_explain" + } + }, + "search_native_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "search_native_query" + } + }, + "verified": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "verified" + } + }, + "ids": { + "target": "com.metabase.api#GetSearchRequestIdsList", + "traits": { + "smithy.api#httpQuery": "ids" + } + }, + "calculate_available_models": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "calculate_available_models" + } + }, + "include_dashboard_questions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_dashboard_questions" + } + }, + "include_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_metadata" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSearch": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSearchRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/search", + "code": 200 + }, + "smithy.api#documentation": "GET /api/search\n\nSearch for items in Metabase.\n For the list of supported models, check [[metabase.search.config/all-models]].\n\n `context` identifies the surface issuing the search; it selects the ranking weights and filter defaults.\n It defaults to `api`, the value for programmatic callers.\n\n Filters:\n - `archived`: set to true to search archived items only, default is false\n - `table_db_id`: search for tables, cards, and models of a certain DB\n - `models`: only search for items of specific models. If not provided, search for all models\n - `filter_items_in_personal_collection`: only search for items in personal collections\n - `created_at`: search for items created at a specific timestamp\n - `created_by`: search for items created by a specific user\n - `last_edited_at`: search for items last edited at a specific timestamp\n - `last_edited_by`: search for items last edited by a specific user\n - `search_native_query`: set to true to search the content of native queries\n - `vector_search_strategy`: for the semantic engine: `hnsw` (approximate index search, default),\n `brute-force` (exact filter-first search), or `hnsw-iterative-relaxed` / `hnsw-iterative-strict`\n (index-backed iterative scans with inline filters); ignored by other engines\n - `vector_search_ef_search`: override pgvector's `hnsw.ef_search` (1-1000) for the iterative strategies; (admin only)\n - `vector_search_max_scan_tuples`: override pgvector's `hnsw.max_scan_tuples` for the iterative strategies; (admin only)\n - `vector_search_explain`: set to true to record vector-scan instrumentation for this search (expensive); (admin only)\n - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature)\n - `ids`: search for items with those ids, works iff single value passed to `models`\n - `display_type`: search for cards/models with specific display types\n\n Note that not all item types support all filters, and the results will include only models that support the provided\n filters. For example:\n\n - The `created-by` filter supports dashboards, models, actions, and cards.\n - The `verified` filter supports models and cards.\n\n A search query that has both filters applied will only return models and cards." + } + }, + "com.metabase.api#GetSearchDebugRequestContext": { + "type": "enum", + "members": { + "BASIC_ACTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "basic-actions" + } + }, + "BROWSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "browse" + } + }, + "COMMAND_PALETTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "command-palette" + } + }, + "DATA_PICKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "data-picker" + } + }, + "DEPENDENCIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dependencies" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "EMBEDDING_SETUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "embedding-setup" + } + }, + "ENTITY_PICKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "entity-picker" + } + }, + "LIBRARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "library" + } + }, + "MODEL_MIGRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "model-migration" + } + }, + "SEARCH_APP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search-app" + } + }, + "SEARCH_BAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search-bar" + } + }, + "TYPE_FILTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "type-filter" + } + }, + "API": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "api" + } + }, + "METABOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabot" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestModelsItem": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "action" + } + }, + "INDEXED_ENTITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexed-entity" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestModelsList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetSearchDebugRequestModelsItem" + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestFilterItemsInPersonalCollection": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "only" + } + }, + "ONLY_MINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "only-mine" + } + }, + "EXCLUDE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclude" + } + }, + "EXCLUDE_OTHERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "exclude-others" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestCreatedByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestDisplayTypeList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestLastEditedByList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestVectorSearchStrategy": { + "type": "enum", + "members": { + "HNSW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw" + } + }, + "BRUTE_FORCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "brute-force" + } + }, + "HNSW_ITERATIVE_RELAXED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw-iterative-relaxed" + } + }, + "HNSW_ITERATIVE_STRICT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hnsw-iterative-strict" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequestExpectedResultType": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "TABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "table" + } + }, + "DATASET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dataset" + } + }, + "SEGMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "segment" + } + }, + "COLLECTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collection" + } + }, + "MEASURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "measure" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "DOCUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "document" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "action" + } + }, + "INDEXED_ENTITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "indexed-entity" + } + }, + "METRIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metric" + } + }, + "CARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "card" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetSearchDebugRequest": { + "type": "structure", + "members": { + "q": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "q" + } + }, + "context": { + "target": "com.metabase.api#GetSearchDebugRequestContext", + "traits": { + "smithy.api#httpQuery": "context" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "collection": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "collection" + } + }, + "table_db_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "table_db_id" + } + }, + "models": { + "target": "com.metabase.api#GetSearchDebugRequestModelsList", + "traits": { + "smithy.api#httpQuery": "models" + } + }, + "filter_items_in_personal_collection": { + "target": "com.metabase.api#GetSearchDebugRequestFilterItemsInPersonalCollection", + "traits": { + "smithy.api#httpQuery": "filter_items_in_personal_collection" + } + }, + "created_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "created_at" + } + }, + "created_by": { + "target": "com.metabase.api#GetSearchDebugRequestCreatedByList", + "traits": { + "smithy.api#httpQuery": "created_by" + } + }, + "display_type": { + "target": "com.metabase.api#GetSearchDebugRequestDisplayTypeList", + "traits": { + "smithy.api#httpQuery": "display_type" + } + }, + "last_edited_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "last_edited_at" + } + }, + "last_edited_by": { + "target": "com.metabase.api#GetSearchDebugRequestLastEditedByList", + "traits": { + "smithy.api#httpQuery": "last_edited_by" + } + }, + "model_ancestors": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "model_ancestors" + } + }, + "search_engine": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "search_engine" + } + }, + "vector_search_strategy": { + "target": "com.metabase.api#GetSearchDebugRequestVectorSearchStrategy", + "traits": { + "smithy.api#httpQuery": "vector_search_strategy" + } + }, + "vector_search_ef_search": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "vector_search_ef_search" + } + }, + "vector_search_max_scan_tuples": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "vector_search_max_scan_tuples" + } + }, + "vector_search_explain": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "vector_search_explain" + } + }, + "search_native_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "search_native_query" + } + }, + "verified": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "verified" + } + }, + "ids": { + "target": "com.metabase.api#GetSearchDebugRequestIdsList", + "traits": { + "smithy.api#httpQuery": "ids" + } + }, + "calculate_available_models": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "calculate_available_models" + } + }, + "include_dashboard_questions": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_dashboard_questions" + } + }, + "include_metadata": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_metadata" + } + }, + "expected_result_type": { + "target": "com.metabase.api#GetSearchDebugRequestExpectedResultType", + "traits": { + "smithy.api#httpQuery": "expected_result_type", + "smithy.api#required": {} + } + }, + "expected_result_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "expected_result_id", + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "for_user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "for_user_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSearchDebug": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSearchDebugRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/search/debug", + "code": 200 + }, + "smithy.api#documentation": "GET /api/search/debug\n\nSuperuser-only. Explain why `expected_result_id` / `expected_result_type` does not appear in the results of\n the given search query. Accepts every `GET /api/search` parameter plus the two expected-result parameters, and\n returns `{:type ..., :details ...}` for the first stage that drops the item: `not-searchable`,\n `missing-from-index`, `not-permitted`, `filtered`, `not-matching`, or the terminal `matched` / `ranked-out`.\n\n - `for_user_id`: diagnose from another user's perspective (defaults to you). Permission and visibility checks run\n as that user, so a `not-permitted` result means *they* can't see the item.\n\n Not supported for `indexed-entity` (its id is compound)." + } + }, + "com.metabase.api#CreateSearchForceReindex": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/search/force-reindex", + "code": 200 + }, + "smithy.api#documentation": "POST /api/search/force-reindex\n\nThis will trigger an immediate reindexing, if we are using search index." + } + }, + "com.metabase.api#CreateSearchReInit": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/search/re-init", + "code": 200 + }, + "smithy.api#documentation": "POST /api/search/re-init\n\nThis will blow away any search indexes, re-create, and re-populate them." + } + }, + "com.metabase.api#GetSearchWeightsRequest": { + "type": "structure", + "members": { + "context": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "context" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSearchWeights": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSearchWeightsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/search/weights", + "code": 200 + }, + "smithy.api#documentation": "GET /api/search/weights\n\nReturn the current weights being used to rank the search results" + } + }, + "com.metabase.api#PutSearchWeightsRequest": { + "type": "structure", + "members": { + "context": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "context" + } + }, + "search_engine": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "search_engine" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutSearchWeights": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutSearchWeightsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/search/weights", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/search/weights\n\nUpdate the current weights being used to rank the search results" + } + }, + "com.metabase.api#GetSegment": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/segment", + "code": 200 + }, + "smithy.api#documentation": "GET /api/segment\n\nFetch *all* `Segments`." + } + }, + "com.metabase.api#CreateSegmentRequest": { + "type": "structure", + "members": { + "definition": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSegment": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSegmentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/segment", + "code": 200 + }, + "smithy.api#documentation": "POST /api/segment\n\nCreate a new `Segment`." + } + }, + "com.metabase.api#GetSegmentByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSegmentById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSegmentByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/segment/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/segment/{id}\n\nFetch `Segment` with ID." + } + }, + "com.metabase.api#PutSegmentRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "definition": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "revision_message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "show_in_getting_started": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutSegment": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutSegmentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/segment/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/segment/{id}\n\nUpdate a `Segment` with ID." + } + }, + "com.metabase.api#DeleteSegmentRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "revision_message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "revision_message", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteSegment": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteSegmentRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/segment/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/segment/{id}\n\nArchive a Segment. (DEPRECATED -- Just pass updated value of `:archived` to the `PUT` endpoint instead.)" + } + }, + "com.metabase.api#GetSegmentRelatedRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSegmentRelated": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSegmentRelatedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/segment/{id}/related", + "code": 200 + }, + "smithy.api#documentation": "GET /api/segment/{id}/related\n\nReturn related entities." + } + }, + "com.metabase.api#CreateSessionRequest": { + "type": "structure", + "members": { + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "username": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSession": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session\n\nLogin." + } + }, + "com.metabase.api#DeleteSession": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/session", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/session\n\nLogout." + } + }, + "com.metabase.api#CreateSessionForgotPasswordRequest": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid email address.", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionForgotPassword": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionForgotPasswordRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/forgot_password", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/forgot_password\n\nSend a reset email when user has forgotten their password." + } + }, + "com.metabase.api#CreateSessionGoogleAuthRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionGoogleAuth": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionGoogleAuthRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/google_auth", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/google_auth\n\nLogin with Google Auth." + } + }, + "com.metabase.api#CreateSessionMfaSendEmailOtpRequest": { + "type": "structure", + "members": { + "challenge_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionMfaSendEmailOtp": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionMfaSendEmailOtpRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/mfa/send-email-otp", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/mfa/send-email-otp\n\nEmail a one-time code as a fallback second factor (for a user who lost their authenticator but\n still has recovery codes disabled or unavailable). Requires a valid challenge token from\n `POST /api/session`; the code is single-use with a 10-minute expiry and is accepted by\n `POST /mfa/verify` like any other code." + } + }, + "com.metabase.api#CreateSessionMfaVerifyRequest": { + "type": "structure", + "members": { + "challenge_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "remember": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionMfaVerify": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionMfaVerifyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/mfa/verify", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/mfa/verify\n\nComplete a two-step login by verifying a one-time code. Takes the `challenge_token` returned by\n `POST /api/session` and either the 6-digit `code` from the user's authenticator app, one of\n their single-use recovery codes, or an emailed one-time code; on success sets the session cookie." + } + }, + "com.metabase.api#CreateSessionPasswordCheckRequest": { + "type": "structure", + "members": { + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "password is too common.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionPasswordCheck": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionPasswordCheckRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/password-check", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/password-check\n\nEndpoint that checks if the supplied password meets the currently configured password complexity rules." + } + }, + "com.metabase.api#GetSessionPasswordResetTokenValidRequest": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "token", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSessionPasswordResetTokenValid": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSessionPasswordResetTokenValidRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/session/password_reset_token_valid", + "code": 200 + }, + "smithy.api#documentation": "GET /api/session/password_reset_token_valid\n\nCheck if a password reset token is valid and isn't expired." + } + }, + "com.metabase.api#GetSessionProperties": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/session/properties", + "code": 200 + }, + "smithy.api#documentation": "GET /api/session/properties\n\nGet all properties and their values. These are the specific `Settings` that are readable by the current user, or are\n public if no user is logged in." + } + }, + "com.metabase.api#CreateSessionResetPasswordRequest": { + "type": "structure", + "members": { + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "password is too common.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSessionResetPassword": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSessionResetPasswordRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/session/reset_password", + "code": 200 + }, + "smithy.api#documentation": "POST /api/session/reset_password\n\nReset password with a reset token." + } + }, + "com.metabase.api#GetSetting": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/setting", + "code": 200 + }, + "smithy.api#documentation": "GET /api/setting\n\nGet all `Settings` and their values. You must be a superuser or have `setting` permission to do this.\n For non-superusers, a list of visible settings and values can be retrieved using the /api/session/properties endpoint." + } + }, + "com.metabase.api#PutSettingRequestBodyMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#PutSettingRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.metabase.api#PutSettingRequestBodyMap", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutSetting": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutSettingRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/setting", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/setting\n\nUpdate multiple `Settings` values. If called by a non-superuser, only user-local settings can be updated." + } + }, + "com.metabase.api#GetSettingByKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetSettingByKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetSettingByKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/setting/{key}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/setting/{key}\n\nFetch a single `Setting`." + } + }, + "com.metabase.api#PutSettingByKeyRequest": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "value": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutSettingByKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutSettingByKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/setting/{key}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/setting/{key}\n\nCreate/update a `Setting`. If called by a non-admin, only user-local settings can be updated.\n This endpoint can also be used to delete Settings by passing `nil` for `:value`." + } + }, + "com.metabase.api#CreateSetupRequestPrefs": { + "type": "structure", + "members": { + "site_locale": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "site_name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateSetupRequestUser": { + "type": "structure", + "members": { + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid email address.", + "smithy.api#required": {} + } + }, + "first_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "last_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "password is too common.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateSetupRequest": { + "type": "structure", + "members": { + "prefs": { + "target": "com.metabase.api#CreateSetupRequestPrefs", + "traits": { + "smithy.api#required": {} + } + }, + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "Token does not match the setup token.", + "smithy.api#required": {} + } + }, + "user": { + "target": "com.metabase.api#CreateSetupRequestUser", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSetup": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSetupRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/setup", + "code": 200 + }, + "smithy.api#documentation": "POST /api/setup\n\nSpecial endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and\n returns a session ID. This endpoint can also be used to set specific settings from the setup flow." + } + }, + "com.metabase.api#GetSlackAppInfo": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/slack/app-info", + "code": 200 + }, + "smithy.api#documentation": "GET /api/slack/app-info\n\nReturns the Slack app_id and team_id. Used by the frontend to construct\n direct links to the Slack app settings page." + } + }, + "com.metabase.api#CreateSlackBugReportRequest": { + "type": "structure", + "members": { + "diagnosticInfo": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateSlackBugReport": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateSlackBugReportRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/slack/bug-report", + "code": 200 + }, + "smithy.api#documentation": "POST /api/slack/bug-report\n\nSend diagnostic information to the configured Slack channels." + } + }, + "com.metabase.api#GetSlackManifest": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/slack/manifest", + "code": 200 + }, + "smithy.api#documentation": "GET /api/slack/manifest\n\nReturns the JSON manifest file that should be used to bootstrap new Slack apps" + } + }, + "com.metabase.api#PutSlackSettingsRequest": { + "type": "structure", + "members": { + "slack_app_token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "slack-app-token", + "com.distilled.openapi#nullable": {} + } + }, + "slack_bug_report_channel": { + "target": "smithy.api#String", + "traits": { + "smithy.api#jsonName": "slack-bug-report-channel", + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutSlackSettings": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutSlackSettingsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/slack/settings", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/slack/settings\n\nUpdate Slack related settings. You must be a superuser to do this. Also updates the slack-cache.\n There are 3 cases where we alter the slack channel/user cache:\n 1. falsy token -> clear\n 2. invalid token -> clear\n 3. truthy, valid token -> refresh" + } + }, + "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataLayers": { + "type": "enum", + "members": { + "FINAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "final" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataSources": { + "type": "enum", + "members": { + "SOURCE_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "source-data" + } + }, + "TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknown" + } + }, + "INGESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ingested" + } + }, + "METABASE_TRANSFORM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "metabase-transform" + } + }, + "UPLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "upload" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTableRequest": { + "type": "structure", + "members": { + "term": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "term" + } + }, + "visibility_type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "visibility-type" + } + }, + "data_layer": { + "target": "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataLayers", + "traits": { + "smithy.api#httpQuery": "data-layer" + } + }, + "data_source": { + "target": "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataSources", + "traits": { + "smithy.api#httpQuery": "data-source" + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "owner-user-id" + } + }, + "owner_email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "owner-email" + } + }, + "orphan_only": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "orphan-only" + } + }, + "unused_only": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "unused-only" + } + }, + "published_only": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "published-only" + } + }, + "can_query": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-query" + } + }, + "can_write": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can-write" + } + }, + "include_transform_targets": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include-transform-targets" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table\n\nGet all `Tables`.\n\n Optional filters:\n - `can-query=true` - filter to only tables the user can execute queries against\n - `can-write=true` - filter to only tables the user can edit metadata for" + } + }, + "com.metabase.api#PutTableRequestVisibilityType": { + "type": "enum", + "members": { + "TECHNICAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "technical" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + }, + "CRUFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cruft" + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite": { + "type": "enum", + "members": { + "COMPUTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "computed" + } + }, + "AUTHORITATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authoritative" + } + }, + "UNCONFIGURED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unconfigured" + } + }, + "INGESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ingested" + } + } + }, + "traits": { + "smithy.api#documentation": "Schema for writing a valid table data authority." + } + }, + "com.metabase.api#PutTableRequestIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutTableRequest": { + "type": "structure", + "members": { + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visibility_type": { + "target": "com.metabase.api#PutTableRequestVisibilityType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_authority": { + "target": "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_layer": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "show_in_getting_started": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "ids": { + "target": "com.metabase.api#PutTableRequestIdsList", + "traits": { + "smithy.api#required": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_source": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "entity_type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/table", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/table\n\nUpdate all `Table` in `ids`.\n\n Deprecated, should use PUT /table/edit from now on." + } + }, + "com.metabase.api#GetTableCardIdFks": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/card__:id/fks", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/card__:id/fks\n\nReturn FK info for the 'virtual' table for a Card. This is always empty, so this endpoint\n serves mainly as a placeholder to avoid having to change anything on the frontend." + } + }, + "com.metabase.api#GetTableCardIdQueryMetadata": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/card__:id/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/card__:id/query_metadata\n\nReturn metadata for the 'virtual' table for a Card." + } + }, + "com.metabase.api#GetTableByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTableById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/{id}\n\nGet `Table` with ID." + } + }, + "com.metabase.api#PutTableByIdRequestVisibilityType": { + "type": "enum", + "members": { + "TECHNICAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "technical" + } + }, + "HIDDEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hidden" + } + }, + "CRUFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cruft" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTableByIdRequestFieldOrder": { + "type": "enum", + "members": { + "ALPHABETICAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "alphabetical" + } + }, + "CUSTOM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "custom" + } + }, + "DATABASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "database" + } + }, + "SMART": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "smart" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTableByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "points_of_interest": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "visibility_type": { + "target": "com.metabase.api#PutTableByIdRequestVisibilityType", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_authority": { + "target": "com.metabase.api#MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_layer": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "show_in_getting_started": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "display_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "data_source": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "caveats": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "entity_type": { + "target": "smithy.api#Document", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "field_order": { + "target": "com.metabase.api#PutTableByIdRequestFieldOrder", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTableById": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTableByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/table/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/table/{id}\n\nUpdate `Table` with ID." + } + }, + "com.metabase.api#CreateTableAppendCsvRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTableAppendCsvRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "collection_id": { + "target": "smithy.api#String" + }, + "file": { + "target": "com.metabase.api#CreateTableAppendCsvRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTableAppendCsv": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTableAppendCsvRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/table/{id}/append-csv", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/table/{id}/append-csv\n\nInserts the rows of an uploaded CSV file into the table identified by `:id`. The table must have been created by\n uploading a CSV file.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#CreateTableDiscardValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTableDiscardValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTableDiscardValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/table/{id}/discard_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/table/{id}/discard_values\n\nDiscard the FieldValues belonging to the Fields in this Table. Only applies to fields that have FieldValues. If\n this Table's Database is set up to automatically sync FieldValues, they will be recreated during the next cycle." + } + }, + "com.metabase.api#PutTableFieldsOrderRequestBodyCase0List": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutTableFieldsOrderRequestBodyCase1FieldOrderList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutTableFieldsOrderRequestBodyCase1": { + "type": "structure", + "members": { + "field_order": { + "target": "com.metabase.api#PutTableFieldsOrderRequestBodyCase1FieldOrderList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTableFieldsOrderRequestBody": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#PutTableFieldsOrderRequestBodyCase0List" + }, + "Case1": { + "target": "com.metabase.api#PutTableFieldsOrderRequestBodyCase1" + } + }, + "traits": {} + }, + "com.metabase.api#PutTableFieldsOrderRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "body": { + "target": "com.metabase.api#PutTableFieldsOrderRequestBody", + "traits": { + "smithy.api#httpPayload": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTableFieldsOrder": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTableFieldsOrderRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/table/{id}/fields/order", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/table/{id}/fields/order\n\nReorder fields" + } + }, + "com.metabase.api#GetTableFksRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTableFks": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableFksRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/{id}/fks", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/{id}/fks\n\nGet all foreign keys whose destination is a `Field` that belongs to this `Table`." + } + }, + "com.metabase.api#GetTableQueryMetadataRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include_sensitive_fields": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_sensitive_fields" + } + }, + "include_hidden_fields": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_hidden_fields" + } + }, + "include_editable_data_model": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_editable_data_model" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTableQueryMetadata": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableQueryMetadataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/{id}/query_metadata", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/{id}/query_metadata\n\nGet metadata about a `Table` useful for running queries.\n Returns DB, fields, field FKs, and field values.\n\n Passing `include_hidden_fields=true` will include any hidden `Fields` in the response. Defaults to `false`\n Passing `include_sensitive_fields=true` will include any sensitive `Fields` in the response. Defaults to `false`.\n\n Passing `include_editable_data_model=true` will check that the current user has write permissions for the table's\n data model, while `false` checks that they have data access perms for the table. Defaults to `false`.\n\n These options are provided for use in the Admin Edit Metadata page." + } + }, + "com.metabase.api#GetTableRelatedRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTableRelated": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableRelatedRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/{id}/related", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/{id}/related\n\nReturn related entities." + } + }, + "com.metabase.api#CreateTableReplaceCsvRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTableReplaceCsvRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "collection_id": { + "target": "smithy.api#String" + }, + "file": { + "target": "com.metabase.api#CreateTableReplaceCsvRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTableReplaceCsv": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTableReplaceCsvRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/table/{id}/replace-csv", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/table/{id}/replace-csv\n\nReplaces the contents of the table identified by `:id` with the rows of an uploaded CSV file. The table must have\n been created by uploading a CSV file.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#CreateTableRescanValueRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTableRescanValue": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTableRescanValueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/table/{id}/rescan_values", + "code": 200 + }, + "smithy.api#documentation": "POST /api/table/{id}/rescan_values\n\nManually trigger an update for the FieldValues for the Fields belonging to this Table. Only applies to Fields that\n are eligible for FieldValues." + } + }, + "com.metabase.api#CreateTableSyncSchemaRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTableSyncSchema": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTableSyncSchemaRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/table/{id}/sync_schema", + "code": 200 + }, + "smithy.api#documentation": "POST /api/table/{id}/sync_schema\n\nTrigger a manual update of the schema metadata for this `Table`." + } + }, + "com.metabase.api#GetTableDataRequest": { + "type": "structure", + "members": { + "table_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTableData": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTableDataRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/table/{table_id}/data", + "code": 200 + }, + "smithy.api#documentation": "GET /api/table/{table-id}/data\n\nGet the data for the given table" + } + }, + "com.metabase.api#GetTask": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task\n\nFetch a list of recent tasks stored as Task History" + } + }, + "com.metabase.api#GetTaskInfo": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/info", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/info\n\nReturn raw data about all scheduled tasks (i.e., Quartz Jobs and Triggers)." + } + }, + "com.metabase.api#GetTaskRuns": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/runs", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/runs\n\nList task runs with optional filters. Returns runs with hydrated entity names and task counts." + } + }, + "com.metabase.api#GetTaskRunsEntitiesRequestRunType": { + "type": "enum", + "members": { + "ALERT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "alert" + } + }, + "SYNC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sync" + } + }, + "FINGERPRINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fingerprint" + } + }, + "SUBSCRIPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "subscription" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTaskRunsEntitiesRequest": { + "type": "structure", + "members": { + "run_type": { + "target": "com.metabase.api#GetTaskRunsEntitiesRequestRunType", + "traits": { + "smithy.api#httpQuery": "run-type", + "smithy.api#required": {} + } + }, + "started_at": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "started-at", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTaskRunsEntities": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTaskRunsEntitiesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/runs/entities", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/runs/entities\n\nGet distinct entities that have task runs for a given run type. Used for populating entity filter picker." + } + }, + "com.metabase.api#GetTaskRunRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTaskRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTaskRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/runs/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/runs/{id}\n\nGet a single task run with all its child tasks." + } + }, + "com.metabase.api#GetTaskUniqueTasks": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/unique-tasks", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/unique-tasks\n\nReturns possibly empty vector of unique task names in alphabetical order. It is expected that number of unique\n tasks is small, hence no need for pagination. If that changes this endpoint and function that powers it should\n reflect that." + } + }, + "com.metabase.api#GetTaskByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTaskById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTaskByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/task/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/task/{id}\n\nGet `TaskHistory` entry with ID." + } + }, + "com.metabase.api#GetTileRequest": { + "type": "structure", + "members": { + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTile": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTileRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/tiles/{card_id}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/tiles/{card-id}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a saved Card." + } + }, + "com.metabase.api#GetTileDashcardCardRequest": { + "type": "structure", + "members": { + "dashboard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "dashcard_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "card_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "parameters": { + "target": "com.metabase.api#MetabaseParametersSchemaParameterValues", + "traits": { + "smithy.api#httpQuery": "parameters" + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTileDashcardCard": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTileDashcardCardRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/tiles/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/tiles/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y}\n\nGenerates a single tile image for a dashcard." + } + }, + "com.metabase.api#GetTileByYRequest": { + "type": "structure", + "members": { + "zoom": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "x": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "y": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer." + } + }, + "query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#httpQuery": "query", + "smithy.api#required": {} + } + }, + "latField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "latField", + "smithy.api#required": {} + } + }, + "lonField": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "lonField", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTileByY": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTileByYRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/tiles/{zoom}/{x}/{y}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/tiles/{zoom}/{x}/{y}\n\nGenerates a single tile image for an ad-hoc query." + } + }, + "com.metabase.api#MetabaseTimelineApiTimelineInclude": { + "type": "enum", + "members": { + "EVENTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "events" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTimelineRequest": { + "type": "structure", + "members": { + "include": { + "target": "com.metabase.api#MetabaseTimelineApiTimelineInclude", + "traits": { + "smithy.api#httpQuery": "include" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTimeline": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTimelineRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/timeline", + "code": 200 + }, + "smithy.api#documentation": "GET /api/timeline\n\nFetch a list of `Timeline`s. Can include `archived=true` to return archived timelines." + } + }, + "com.metabase.api#CreateTimelineRequestIcon": { + "type": "enum", + "members": { + "STAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "star" + } + }, + "CAKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cake" + } + }, + "MAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mail" + } + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "warning" + } + }, + "BELL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bell" + } + }, + "CLOUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cloud" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTimelineRequest": { + "type": "structure", + "members": { + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "default": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "icon": { + "target": "com.metabase.api#CreateTimelineRequestIcon", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTimeline": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTimelineRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/timeline", + "code": 200 + }, + "smithy.api#documentation": "POST /api/timeline\n\nCreate a new [[Timeline]]." + } + }, + "com.metabase.api#CreateTimelineEventRequestSource": { + "type": "enum", + "members": { + "COLLECTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "collections" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTimelineEventRequestIcon": { + "type": "enum", + "members": { + "STAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "star" + } + }, + "CAKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cake" + } + }, + "MAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mail" + } + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "warning" + } + }, + "BELL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bell" + } + }, + "CLOUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cloud" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTimelineEventRequest": { + "type": "structure", + "members": { + "question_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "timestamp": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid date string", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timeline_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "source": { + "target": "com.metabase.api#CreateTimelineEventRequestSource", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "time_matters": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "icon": { + "target": "com.metabase.api#CreateTimelineEventRequestIcon", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTimelineEvent": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTimelineEventRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/timeline-event", + "code": 200 + }, + "smithy.api#documentation": "POST /api/timeline-event\n\nCreate a new [[TimelineEvent]]." + } + }, + "com.metabase.api#GetTimelineEventRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTimelineEvent": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTimelineEventRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/timeline-event/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/timeline-event/{id}\n\nFetch the [[TimelineEvent]] with `id`." + } + }, + "com.metabase.api#PutTimelineEventRequestIcon": { + "type": "enum", + "members": { + "STAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "star" + } + }, + "CAKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cake" + } + }, + "MAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mail" + } + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "warning" + } + }, + "BELL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bell" + } + }, + "CLOUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cloud" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTimelineEventRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "icon": { + "target": "com.metabase.api#PutTimelineEventRequestIcon", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "time_matters": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timeline_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timestamp": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "timezone": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTimelineEvent": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTimelineEventRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/timeline-event/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/timeline-event/{id}\n\nUpdate a [[TimelineEvent]]." + } + }, + "com.metabase.api#DeleteTimelineEventRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTimelineEvent": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTimelineEventRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/timeline-event/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/timeline-event/{id}\n\nDelete a [[TimelineEvent]]." + } + }, + "com.metabase.api#GetTimelineCollectionRootRequest": { + "type": "structure", + "members": { + "include": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "include" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTimelineCollectionRoot": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTimelineCollectionRootRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/timeline/collection/root", + "code": 200 + }, + "smithy.api#documentation": "GET /api/timeline/collection/root\n\nFetch the root Collection's timelines." + } + }, + "com.metabase.api#GetTimelineCollectionRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#httpQuery": "include" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTimelineCollection": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTimelineCollectionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/timeline/collection/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/timeline/collection/{id}\n\nFetch a specific Collection's timelines." + } + }, + "com.metabase.api#GetTimelineByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "include": { + "target": "com.metabase.api#MetabaseTimelineApiTimelineInclude", + "traits": { + "smithy.api#httpQuery": "include" + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "archived" + } + }, + "start": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start", + "smithy.api#documentation": "value must be a valid date string" + } + }, + "end": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "end", + "smithy.api#documentation": "value must be a valid date string" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTimelineById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTimelineByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/timeline/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/timeline/{id}\n\nFetch the `Timeline` with `id`. Include `include=events` to unarchived events included on the timeline. Add\n `archived=true` to return all events on the timeline, both archived and unarchived." + } + }, + "com.metabase.api#PutTimelineRequestIcon": { + "type": "enum", + "members": { + "STAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "star" + } + }, + "CAKE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cake" + } + }, + "MAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mail" + } + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "warning" + } + }, + "BELL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bell" + } + }, + "CLOUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cloud" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTimelineRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "archived": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "default": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "icon": { + "target": "com.metabase.api#PutTimelineRequestIcon", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTimeline": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTimelineRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/timeline/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/timeline/{id}\n\nUpdate the [[Timeline]] with `id`. Returns the timeline without events. Archiving a timeline will archive all of the\n events in that timeline." + } + }, + "com.metabase.api#DeleteTimelineRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTimeline": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTimelineRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/timeline/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/timeline/{id}\n\nDelete a [[Timeline]]. Will cascade delete its events as well." + } + }, + "com.metabase.api#GetTransformRequestLastRunStatusesItem": { + "type": "enum", + "members": { + "STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "started" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "succeeded" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeout" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformRequestLastRunStatusesList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetTransformRequestLastRunStatusesItem" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRequest": { + "type": "structure", + "members": { + "last_run_start_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "last-run-start-time" + } + }, + "last_run_statuses": { + "target": "com.metabase.api#GetTransformRequestLastRunStatusesList", + "traits": { + "smithy.api#httpQuery": "last-run-statuses" + } + }, + "tag_ids": { + "target": "com.metabase.api#GetTransformRequestTagIdsList", + "traits": { + "smithy.api#httpQuery": "tag-ids" + } + }, + "database_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "database-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransform": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform\n\nGet a list of transforms." + } + }, + "com.metabase.api#CreateTransformRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTransformSource": { + "type": "union", + "members": { + "Case0": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase0" + }, + "Case1": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase1" + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaCheckpointStrategy": { + "type": "structure", + "members": { + "checkpoint_filter_field_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "checkpoint-filter-field-id" + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase0": { + "type": "structure", + "members": { + "query": { + "target": "com.metabase.api#MetabaseLibSchemaQuery", + "traits": { + "smithy.api#required": {} + } + }, + "source_incremental_strategy": { + "target": "com.metabase.api#MetabaseTransformsSchemaCheckpointStrategy", + "traits": { + "smithy.api#jsonName": "source-incremental-strategy" + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase1SourceTablesList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseTransformsBaseUtilSourceTableEntry" + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase1": { + "type": "structure", + "members": { + "body": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "source_database": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#jsonName": "source-database" + } + }, + "source_incremental_strategy": { + "target": "com.metabase.api#MetabaseTransformsSchemaCheckpointStrategy", + "traits": { + "smithy.api#jsonName": "source-incremental-strategy" + } + }, + "source_tables": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformSourceCase1SourceTablesList", + "traits": { + "smithy.api#required": {}, + "smithy.api#jsonName": "source-tables" + } + }, + "type": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#MetabaseTransformsRestApiTransformRunTrigger": { + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "GLOBAL_SCHEDULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "global-schedule" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTransformRequest": { + "type": "structure", + "members": { + "owner_email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "tag_ids": { + "target": "com.metabase.api#CreateTransformRequestTagIdsList" + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformSource", + "traits": { + "smithy.api#required": {} + } + }, + "target": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformTarget", + "traits": { + "smithy.api#required": {} + } + }, + "run_trigger": { + "target": "com.metabase.api#MetabaseTransformsRestApiTransformRunTrigger" + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransform": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform\n\nCreate a new transform." + } + }, + "com.metabase.api#GetTransformJobRequestLastRunStatusesItem": { + "type": "enum", + "members": { + "STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "started" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "succeeded" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeout" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRequestLastRunStatusesList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetTransformJobRequestLastRunStatusesItem" + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRequest": { + "type": "structure", + "members": { + "last_run_start_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "last-run-start-time" + } + }, + "next_run_start_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "next-run-start-time" + } + }, + "last_run_statuses": { + "target": "com.metabase.api#GetTransformJobRequestLastRunStatusesList", + "traits": { + "smithy.api#httpQuery": "last-run-statuses" + } + }, + "tag_ids": { + "target": "com.metabase.api#GetTransformJobRequestTagIdsList", + "traits": { + "smithy.api#httpQuery": "tag-ids" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformJob": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformJobRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-job", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-job\n\nGet all transform jobs." + } + }, + "com.metabase.api#CreateTransformJobRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#CreateTransformJobRequestUiDisplayType": { + "type": "enum", + "members": { + "CRON_RAW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/raw" + } + }, + "CRON_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/builder" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateTransformJobRequest": { + "type": "structure", + "members": { + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "schedule": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "tag_ids": { + "target": "com.metabase.api#CreateTransformJobRequestTagIdsList" + }, + "ui_display_type": { + "target": "com.metabase.api#CreateTransformJobRequestUiDisplayType" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformJob": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformJobRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform-job", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform-job\n\nCreate a new transform job." + } + }, + "com.metabase.api#PutTransformJobActiveRequest": { + "type": "structure", + "members": { + "active": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTransformJobActive": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTransformJobActiveRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/transform-job/active", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/transform-job/active\n\nActivate or deactivate every transform job. Inactive jobs do not run on schedule. Manual runs\n via `POST /api/transform-job/:job-id/run` ignore this flag.\n\n Reports per-job outcome counts: `:updated` (successfully flipped) and `:failed` (raised an\n error during the flip — the row update or Quartz write failed and was logged)." + } + }, + "com.metabase.api#GetTransformJobByJobIdRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformJobByJobId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformJobByJobIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-job/{job_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-job/{job-id}\n\nGet a transform job by ID." + } + }, + "com.metabase.api#PutTransformJobRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutTransformJobRequestUiDisplayType": { + "type": "enum", + "members": { + "CRON_RAW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/raw" + } + }, + "CRON_BUILDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron/builder" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutTransformJobRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "active": { + "target": "smithy.api#Boolean" + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "schedule": { + "target": "smithy.api#String" + }, + "tag_ids": { + "target": "com.metabase.api#PutTransformJobRequestTagIdsList" + }, + "ui_display_type": { + "target": "com.metabase.api#PutTransformJobRequestUiDisplayType" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTransformJob": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTransformJobRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/transform-job/{job_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/transform-job/{job-id}\n\nUpdate a transform job." + } + }, + "com.metabase.api#DeleteTransformJobRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTransformJob": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTransformJobRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/transform-job/{job_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/transform-job/{job-id}\n\nDelete a transform job." + } + }, + "com.metabase.api#CreateTransformJobRunRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "run_all": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformJobRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformJobRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform-job/{job_id}/run", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform-job/{job-id}/run\n\nRun a transform job manually. By default, fresh pulled-in dependencies are skipped; pass `run_all`\n to force-refresh the whole plan." + } + }, + "com.metabase.api#GetTransformJobRunsRequestStatus": { + "type": "enum", + "members": { + "STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "started" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "succeeded" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeout" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRunsRequestRunMethod": { + "type": "enum", + "members": { + "MANUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "manual" + } + }, + "CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRunsRequestSortColumn": { + "type": "enum", + "members": { + "START_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "start_time" + } + }, + "END_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end_time" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRunsRequestSortDirection": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformJobRunsRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "status": { + "target": "com.metabase.api#GetTransformJobRunsRequestStatus", + "traits": { + "smithy.api#httpQuery": "status" + } + }, + "run_method": { + "target": "com.metabase.api#GetTransformJobRunsRequestRunMethod", + "traits": { + "smithy.api#httpQuery": "run-method" + } + }, + "start_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start-time" + } + }, + "sort_column": { + "target": "com.metabase.api#GetTransformJobRunsRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetTransformJobRunsRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformJobRuns": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformJobRunsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-job/{job_id}/runs", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-job/{job-id}/runs\n\nGet paginated run history for a transform job." + } + }, + "com.metabase.api#GetTransformJobRunTransformRunsRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "run_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformJobRunTransformRuns": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformJobRunTransformRunsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-job/{job_id}/runs/{run_id}/transform-runs", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-job/{job-id}/runs/{run-id}/transform-runs\n\nGet the transform runs that made up a specific job run." + } + }, + "com.metabase.api#GetTransformJobTransformsRequest": { + "type": "structure", + "members": { + "job_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformJobTransforms": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformJobTransformsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-job/{job_id}/transforms", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-job/{job-id}/transforms\n\nGet the transforms of job specified by the job's ID." + } + }, + "com.metabase.api#GetTransformTag": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform-tag", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform-tag\n\nGet a list of all transform tags." + } + }, + "com.metabase.api#CreateTransformTagRequest": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformTag": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformTagRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform-tag", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform-tag\n\nCreate a new transform tag." + } + }, + "com.metabase.api#PutTransformTagRequest": { + "type": "structure", + "members": { + "tag_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTransformTag": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTransformTagRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/transform-tag/{tag_id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/transform-tag/{tag-id}\n\nUpdate a transform tag." + } + }, + "com.metabase.api#DeleteTransformTagRequest": { + "type": "structure", + "members": { + "tag_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTransformTag": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTransformTagRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/transform-tag/{tag_id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/transform-tag/{tag-id}\n\nDelete a transform tag. Removes it from all transforms and jobs." + } + }, + "com.metabase.api#GetTransformRunRequestSortColumn": { + "type": "enum", + "members": { + "TRANSFORM_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform-name" + } + }, + "START_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "start-time" + } + }, + "END_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "end-time" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "status" + } + }, + "RUN_METHOD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "run-method" + } + }, + "TRANSFORM_TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "transform-tags" + } + }, + "DURATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "duration" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestSortDirection": { + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DESC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "desc" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestTransformIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestStatusesItem": { + "type": "enum", + "members": { + "STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "started" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "succeeded" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "failed" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timeout" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestStatusesList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetTransformRunRequestStatusesItem" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestTransformTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestRunMethodsItem": { + "type": "enum", + "members": { + "MANUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "manual" + } + }, + "CRON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cron" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequestRunMethodsList": { + "type": "list", + "member": { + "target": "com.metabase.api#GetTransformRunRequestRunMethodsItem" + }, + "traits": {} + }, + "com.metabase.api#GetTransformRunRequest": { + "type": "structure", + "members": { + "sort_column": { + "target": "com.metabase.api#GetTransformRunRequestSortColumn", + "traits": { + "smithy.api#httpQuery": "sort-column" + } + }, + "sort_direction": { + "target": "com.metabase.api#GetTransformRunRequestSortDirection", + "traits": { + "smithy.api#httpQuery": "sort-direction" + } + }, + "transform_ids": { + "target": "com.metabase.api#GetTransformRunRequestTransformIdsList", + "traits": { + "smithy.api#httpQuery": "transform-ids" + } + }, + "statuses": { + "target": "com.metabase.api#GetTransformRunRequestStatusesList", + "traits": { + "smithy.api#httpQuery": "statuses" + } + }, + "transform_tag_ids": { + "target": "com.metabase.api#GetTransformRunRequestTransformTagIdsList", + "traits": { + "smithy.api#httpQuery": "transform-tag-ids" + } + }, + "start_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "start-time" + } + }, + "end_time": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "end-time" + } + }, + "run_methods": { + "target": "com.metabase.api#GetTransformRunRequestRunMethodsList", + "traits": { + "smithy.api#httpQuery": "run-methods" + } + }, + "user_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "user-id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform/run", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform/run\n\nGet transform runs based on a set of filter params." + } + }, + "com.metabase.api#GetTransformRunByRunIdRequest": { + "type": "structure", + "members": { + "run_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformRunByRunId": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformRunByRunIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform/run/{run_id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform/run/{run-id}\n\nGet a transform run by ID." + } + }, + "com.metabase.api#GetTransformByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform/{id}\n\nGet a specific transform." + } + }, + "com.metabase.api#PutTransformRequestTagIdsList": { + "type": "list", + "member": { + "target": "smithy.api#Integer" + }, + "traits": {} + }, + "com.metabase.api#PutTransformRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "owner_email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "owner_user_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "name": { + "target": "smithy.api#String" + }, + "tag_ids": { + "target": "com.metabase.api#PutTransformRequestTagIdsList" + }, + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformSource" + }, + "target": { + "target": "com.metabase.api#MetabaseTransformsSchemaTransformTarget" + }, + "run_trigger": { + "target": "com.metabase.api#MetabaseTransformsRestApiTransformRunTrigger" + }, + "description": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutTransform": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutTransformRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/transform/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/transform/{id}\n\nUpdate a transform." + } + }, + "com.metabase.api#DeleteTransformRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTransform": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTransformRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/transform/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/transform/{id}\n\nDelete a transform." + } + }, + "com.metabase.api#CreateTransformCancelRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformCancel": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformCancelRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform/{id}/cancel", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform/{id}/cancel\n\nCancel the current run for a given transform." + } + }, + "com.metabase.api#GetTransformDependenciesRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetTransformDependencies": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetTransformDependenciesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/transform/{id}/dependencies", + "code": 200 + }, + "smithy.api#documentation": "GET /api/transform/{id}/dependencies\n\nGet the dependencies of a specific transform." + } + }, + "com.metabase.api#CreateTransformResetCheckpointRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformResetCheckpoint": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformResetCheckpointRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform/{id}/reset-checkpoint", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform/{id}/reset-checkpoint\n\nReset the stored checkpoint for an incremental transform." + } + }, + "com.metabase.api#CreateTransformRunRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateTransformRun": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateTransformRunRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/transform/{id}/run", + "code": 200 + }, + "smithy.api#documentation": "POST /api/transform/{id}/run\n\nRun a transform." + } + }, + "com.metabase.api#DeleteTransformTableRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteTransformTable": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteTransformTableRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/transform/{id}/table", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/transform/{id}/table\n\nDelete a transform's output table." + } + }, + "com.metabase.api#CreateUploadCsvRequestFile": { + "type": "structure", + "members": { + "filename": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "tempfile": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateUploadCsvRequest": { + "type": "structure", + "members": { + "collection_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "com.distilled.openapi#nullable": {} + } + }, + "file": { + "target": "com.metabase.api#CreateUploadCsvRequestFile", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateUploadCsv": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateUploadCsvRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/upload/csv", + "code": 200, + "contentType": "multipart" + }, + "smithy.api#documentation": "POST /api/upload/csv\n\nCreate a table and model populated with the values from the attached CSV. Returns the model ID if successful.", + "com.distilled.openapi#contentType": "multipart" + } + }, + "com.metabase.api#GetUserRequestTenancy": { + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "all" + } + }, + "INTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "internal" + } + }, + "EXTERNAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "external" + } + } + }, + "traits": {} + }, + "com.metabase.api#GetUserRequest": { + "type": "structure", + "members": { + "status": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "status" + } + }, + "query": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpQuery": "query" + } + }, + "group_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "group_id" + } + }, + "include_deactivated": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "include_deactivated" + } + }, + "is_data_analyst": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "is_data_analyst" + } + }, + "can_access_data_studio": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#httpQuery": "can_access_data_studio" + } + }, + "tenancy": { + "target": "com.metabase.api#GetUserRequestTenancy", + "traits": { + "smithy.api#httpQuery": "tenancy" + } + }, + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpQuery": "tenant_id" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user\n\nFetch a list of `Users` for admins or group managers.\n By default returns only active users for admins/data-analysts and only active users within groups that the group manager is\n managing for group managers.\n\n - If `status` is `deactivated`, include deactivated users only.\n\n - If `status` is `all`, include all users (active and inactive).\n\n - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to\n `status=active`. `status` and `include_deactivated` requires superuser permissions.\n\n - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised\n to use `status` for better support and flexibility.\n\n If both params are passed, `status` takes precedence.\n - if a `tenant_id` is passed, only users with that tenant_id will be returned.\n\n For users with segmented permissions, return only themselves.\n\n Takes `limit`, `offset` for pagination.\n\n Takes `query` for filtering on first name, last name, email.\n\n Also takes `group_id`, which filters on group id.\n\n If the user is a sandboxed user, only return themselves regardless of the query parameters." + } + }, + "com.metabase.api#CreateUserRequestLoginAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#MetabaseUsersSchemaUserGroupMembership": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "is_group_manager": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key." + } + } + }, + "traits": { + "smithy.api#documentation": "Group Membership info of a User.\n In which :is_group_manager is only included if `advanced-permissions` is enabled." + } + }, + "com.metabase.api#CreateUserRequestUserGroupMembershipsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseUsersSchemaUserGroupMembership" + }, + "traits": {} + }, + "com.metabase.api#CreateUserRequestInviteTargetType": { + "type": "enum", + "members": { + "DASHBOARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dashboard" + } + }, + "QUESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "question" + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateUserRequestInviteTarget": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "value must be an integer greater than zero.", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "type": { + "target": "com.metabase.api#CreateUserRequestInviteTargetType", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": {} + }, + "com.metabase.api#CreateUserRequest": { + "type": "structure", + "members": { + "login_attributes": { + "target": "com.metabase.api#CreateUserRequestLoginAttributesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "user_group_memberships": { + "target": "com.metabase.api#CreateUserRequestUserGroupMembershipsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "value must be a valid email address.", + "smithy.api#required": {} + } + }, + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "last_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "first_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "source": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "password": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "invite_target": { + "target": "com.metabase.api#CreateUserRequestInviteTarget", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/user", + "code": 200 + }, + "smithy.api#documentation": "POST /api/user\n\nCreate a new `User`, return a 400 if the email address is already taken" + } + }, + "com.metabase.api#GetUserKeyValueNamespaceRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetUserKeyValueNamespace": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetUserKeyValueNamespaceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user-key-value/namespace/{namespace}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user-key-value/namespace/{namespace}\n\nReturns all KV pairs in a given namespace for the current user" + } + }, + "com.metabase.api#GetUserKeyValueNamespaceKeyRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetUserKeyValueNamespaceKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetUserKeyValueNamespaceKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user-key-value/namespace/{namespace}/key/{key}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user-key-value/namespace/{namespace}/key/{key}\n\nGet a value for the user" + } + }, + "com.metabase.api#PutUserKeyValueNamespaceKeyRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "expires_at": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "value": { + "target": "smithy.api#Document" + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutUserKeyValueNamespaceKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutUserKeyValueNamespaceKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/user-key-value/namespace/{namespace}/key/{key}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/user-key-value/namespace/{namespace}/key/{key}\n\nUpsert a KV-pair for the user" + } + }, + "com.metabase.api#DeleteUserKeyValueNamespaceKeyRequest": { + "type": "structure", + "members": { + "namespace": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteUserKeyValueNamespaceKey": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteUserKeyValueNamespaceKeyRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/user-key-value/namespace/{namespace}/key/{key}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/user-key-value/namespace/{namespace}/key/{key}\n\nDeletes a KV-pair for the user" + } + }, + "com.metabase.api#GetUserCurrent": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user/current", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user/current\n\nFetch the current `User`." + } + }, + "com.metabase.api#GetUserRecipients": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user/recipients", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user/recipients\n\nFetch a list of `Users`. Returns only active users. Meant for non-admins unlike GET /api/user.\n\n - If user-visibility is :all or the user is an admin, include all users.\n - If user-visibility is :group, include only users in the same group (excluding the all users group).\n - If user-visibility is :none or the user is sandboxed, include only themselves." + } + }, + "com.metabase.api#GetUserByIdRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#GetUserById": { + "type": "operation", + "input": { + "target": "com.metabase.api#GetUserByIdRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/user/{id}", + "code": 200 + }, + "smithy.api#documentation": "GET /api/user/{id}\n\nFetch a `User`. You must be fetching yourself *or* be a superuser *or* a Group Manager." + } + }, + "com.metabase.api#PutUserRequestLoginAttributesMap": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#Document" + }, + "traits": {} + }, + "com.metabase.api#PutUserRequestUserGroupMembershipsList": { + "type": "list", + "member": { + "target": "com.metabase.api#MetabaseUsersSchemaUserGroupMembership" + }, + "traits": {} + }, + "com.metabase.api#PutUserRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "login_attributes": { + "target": "com.metabase.api#PutUserRequestLoginAttributesMap", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "user_group_memberships": { + "target": "com.metabase.api#PutUserRequestUserGroupMembershipsList", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "email": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_data_analyst": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "locale": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_group_manager": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "is_superuser": { + "target": "smithy.api#Boolean", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "tenant_id": { + "target": "smithy.api#Integer", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "last_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "first_name": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/user/{id}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/user/{id}\n\nUpdate an existing, active `User`.\n Self or superusers can update user info and groups.\n Group Managers can only add/remove users from groups they are manager of." + } + }, + "com.metabase.api#DeleteUserRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#DeleteUser": { + "type": "operation", + "input": { + "target": "com.metabase.api#DeleteUserRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "DELETE", + "uri": "/api/user/{id}", + "code": 200 + }, + "smithy.api#documentation": "DELETE /api/user/{id}\n\nDisable a `User`. This does not remove the `User` from the DB, but instead disables their account." + } + }, + "com.metabase.api#PutUserModalRequestModal": { + "type": "enum", + "members": { + "QBNEWB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "qbnewb" + } + }, + "DATASETNEWB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "datasetnewb" + } + } + }, + "traits": {} + }, + "com.metabase.api#PutUserModalRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "modal": { + "target": "com.metabase.api#PutUserModalRequestModal", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutUserModal": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutUserModalRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/user/{id}/modal/{modal}", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/user/{id}/modal/{modal}\n\nIndicate that a user has been informed about the vast intricacies of 'the' Query Builder." + } + }, + "com.metabase.api#PutUserPasswordRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + }, + "old_password": { + "target": "smithy.api#String", + "traits": { + "com.distilled.openapi#nullable": {} + } + }, + "password": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "password is too common.", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutUserPassword": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutUserPasswordRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/user/{id}/password", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/user/{id}/password\n\nUpdate a user's password." + } + }, + "com.metabase.api#CreateUserPasswordResetUrlRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#CreateUserPasswordResetUrl": { + "type": "operation", + "input": { + "target": "com.metabase.api#CreateUserPasswordResetUrlRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "POST", + "uri": "/api/user/{id}/password-reset-url", + "code": 200 + }, + "smithy.api#documentation": "POST /api/user/{id}/password-reset-url\n\nGenerate a password reset URL for a user. Admins can share this URL directly with the user.\n The link expires in 48 hours." + } + }, + "com.metabase.api#PutUserReactivateRequest": { + "type": "structure", + "members": { + "id": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {}, + "smithy.api#documentation": "value must be an integer greater than zero." + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.metabase.api#PutUserReactivate": { + "type": "operation", + "input": { + "target": "com.metabase.api#PutUserReactivateRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "PUT", + "uri": "/api/user/{id}/reactivate", + "code": 200 + }, + "smithy.api#documentation": "PUT /api/user/{id}/reactivate\n\nReactivate user at `:id`" + } + }, + "com.metabase.api#GetUtilRandomToken": { + "type": "operation", + "input": { + "target": "smithy.api#Unit" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/api/util/random_token", + "code": 200 + }, + "smithy.api#documentation": "GET /api/util/random_token\n\nReturn a cryptographically secure random 32-byte token, encoded as a hexadecimal string.\n Intended for use when creating a value for `embedding-secret-key`." + } + }, + "com.metabase.api#Metabase": { + "type": "service", + "version": "1.0", + "operations": [ + { + "target": "com.metabase.api#GetAction" + }, + { + "target": "com.metabase.api#CreateAction" + }, + { + "target": "com.metabase.api#GetAction2" + }, + { + "target": "com.metabase.api#GetActionByActionId" + }, + { + "target": "com.metabase.api#DeleteAction" + }, + { + "target": "com.metabase.api#GetActionExecute" + }, + { + "target": "com.metabase.api#PutAction" + }, + { + "target": "com.metabase.api#CreateActionExecute" + }, + { + "target": "com.metabase.api#CreateActionPublicLink" + }, + { + "target": "com.metabase.api#DeleteActionPublicLink" + }, + { + "target": "com.metabase.api#GetActivityMostRecentlyViewedDashboard" + }, + { + "target": "com.metabase.api#GetActivityPopularItems" + }, + { + "target": "com.metabase.api#GetActivityRecents" + }, + { + "target": "com.metabase.api#CreateActivityRecent" + }, + { + "target": "com.metabase.api#CreateAgentCollection" + }, + { + "target": "com.metabase.api#CreateAgentConstructNativeQuery" + }, + { + "target": "com.metabase.api#CreateAgentDashboard" + }, + { + "target": "com.metabase.api#PutAgentDashboard" + }, + { + "target": "com.metabase.api#CreateAgentExecute" + }, + { + "target": "com.metabase.api#CreateAgentExecuteSql" + }, + { + "target": "com.metabase.api#CreateAgentMetric" + }, + { + "target": "com.metabase.api#PutAgentMetric" + }, + { + "target": "com.metabase.api#GetAgentPing" + }, + { + "target": "com.metabase.api#CreateAgentQuestion" + }, + { + "target": "com.metabase.api#PutAgentQuestion" + }, + { + "target": "com.metabase.api#CreateAgentQuestionQuery" + }, + { + "target": "com.metabase.api#CreateAgentReadResource" + }, + { + "target": "com.metabase.api#CreateAgentSearch" + }, + { + "target": "com.metabase.api#CreateAgentConstructQuery" + }, + { + "target": "com.metabase.api#CreateAgentQuery" + }, + { + "target": "com.metabase.api#CreateAiEntityAnalysisAnalyzeChart" + }, + { + "target": "com.metabase.api#GetAlert" + }, + { + "target": "com.metabase.api#GetAlertById" + }, + { + "target": "com.metabase.api#DeleteAlertSubscription" + }, + { + "target": "com.metabase.api#CreateAnalyticsProxy" + }, + { + "target": "com.metabase.api#GetAnalyticsAnonymousStats" + }, + { + "target": "com.metabase.api#CreateAnalyticsInternal" + }, + { + "target": "com.metabase.api#GetKey" + }, + { + "target": "com.metabase.api#CreateKey" + }, + { + "target": "com.metabase.api#GetKeyCount" + }, + { + "target": "com.metabase.api#PutKey" + }, + { + "target": "com.metabase.api#DeleteKey" + }, + { + "target": "com.metabase.api#PutKeyRegenerate" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardsDatabaseCandidates" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardsModelIndexPrimaryKey" + }, + { + "target": "com.metabase.api#GetAutomagicDashboard" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardCell" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardCellCompare" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplate" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardCellRuleDashboardTemplateCompare" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardCompare" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardEntityOrQueryQueryMetadata" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplate" + }, + { + "target": "com.metabase.api#GetAutomagicDashboardRuleDashboardTemplateCompare" + }, + { + "target": "com.metabase.api#GetBookmark" + }, + { + "target": "com.metabase.api#PutBookmarkOrdering" + }, + { + "target": "com.metabase.api#UpdateBookmark" + }, + { + "target": "com.metabase.api#DeleteBookmark" + }, + { + "target": "com.metabase.api#GetBugReportingConnectionPoolDetails" + }, + { + "target": "com.metabase.api#GetBugReportingDetails" + }, + { + "target": "com.metabase.api#GetCache" + }, + { + "target": "com.metabase.api#PutCache" + }, + { + "target": "com.metabase.api#DeleteCache" + }, + { + "target": "com.metabase.api#CreateCacheInvalidate" + }, + { + "target": "com.metabase.api#GetCard" + }, + { + "target": "com.metabase.api#CreateCard" + }, + { + "target": "com.metabase.api#CreateCardCollection" + }, + { + "target": "com.metabase.api#GetCardEmbeddable" + }, + { + "target": "com.metabase.api#CreateCardPivotCardQuery" + }, + { + "target": "com.metabase.api#GetCard2" + }, + { + "target": "com.metabase.api#GetCardParamSearch" + }, + { + "target": "com.metabase.api#GetCardParamValues" + }, + { + "target": "com.metabase.api#CreateCardPublicLink" + }, + { + "target": "com.metabase.api#DeleteCardPublicLink" + }, + { + "target": "com.metabase.api#CreateCardQuery" + }, + { + "target": "com.metabase.api#UpdateCardQuery" + }, + { + "target": "com.metabase.api#GetCardById" + }, + { + "target": "com.metabase.api#PutCard" + }, + { + "target": "com.metabase.api#DeleteCard" + }, + { + "target": "com.metabase.api#CreateCardCopy" + }, + { + "target": "com.metabase.api#GetCardDashboards" + }, + { + "target": "com.metabase.api#GetCardParamRemapping" + }, + { + "target": "com.metabase.api#GetCardQueryMetadata" + }, + { + "target": "com.metabase.api#GetCardSeries" + }, + { + "target": "com.metabase.api#CreateCardsDashboard" + }, + { + "target": "com.metabase.api#CreateCardsMove" + }, + { + "target": "com.metabase.api#GetChannel" + }, + { + "target": "com.metabase.api#CreateChannel" + }, + { + "target": "com.metabase.api#CreateChannelTest" + }, + { + "target": "com.metabase.api#GetChannelById" + }, + { + "target": "com.metabase.api#PutChannel" + }, + { + "target": "com.metabase.api#GetCloudMigration" + }, + { + "target": "com.metabase.api#CreateCloudMigration" + }, + { + "target": "com.metabase.api#PutCloudMigrationCancel" + }, + { + "target": "com.metabase.api#GetCollection" + }, + { + "target": "com.metabase.api#CreateCollection" + }, + { + "target": "com.metabase.api#GetCollectionGraph" + }, + { + "target": "com.metabase.api#PutCollectionGraph" + }, + { + "target": "com.metabase.api#GetCollectionRoot" + }, + { + "target": "com.metabase.api#GetCollectionRootDashboardQuestionCandidates" + }, + { + "target": "com.metabase.api#GetCollectionRootItems" + }, + { + "target": "com.metabase.api#CreateCollectionRootMoveDashboardQuestionCandidate" + }, + { + "target": "com.metabase.api#GetCollectionTrash" + }, + { + "target": "com.metabase.api#GetCollectionTree" + }, + { + "target": "com.metabase.api#GetCollectionById" + }, + { + "target": "com.metabase.api#PutCollection" + }, + { + "target": "com.metabase.api#DeleteCollection" + }, + { + "target": "com.metabase.api#GetCollectionDashboardQuestionCandidates" + }, + { + "target": "com.metabase.api#GetCollectionItems" + }, + { + "target": "com.metabase.api#CreateCollectionMoveDashboardQuestionCandidate" + }, + { + "target": "com.metabase.api#GetComment" + }, + { + "target": "com.metabase.api#CreateComment" + }, + { + "target": "com.metabase.api#GetCommentMentions" + }, + { + "target": "com.metabase.api#PutComment" + }, + { + "target": "com.metabase.api#DeleteComment" + }, + { + "target": "com.metabase.api#CreateCommentReaction" + }, + { + "target": "com.metabase.api#CreateDashboard" + }, + { + "target": "com.metabase.api#GetDashboardEmbeddable" + }, + { + "target": "com.metabase.api#GetDashboardParamsValidFilterFields" + }, + { + "target": "com.metabase.api#CreateDashboardPivotDashboardDashcardCardQuery" + }, + { + "target": "com.metabase.api#GetDashboard" + }, + { + "target": "com.metabase.api#CreateDashboardSave" + }, + { + "target": "com.metabase.api#UpdateDashboardSaveCollection" + }, + { + "target": "com.metabase.api#CreateDashboardDashcardCardQuery" + }, + { + "target": "com.metabase.api#UpdateDashboardDashcardCardQuery" + }, + { + "target": "com.metabase.api#GetDashboardDashcardExecute" + }, + { + "target": "com.metabase.api#CreateDashboardDashcardExecute" + }, + { + "target": "com.metabase.api#CreateDashboardPublicLink" + }, + { + "target": "com.metabase.api#DeleteDashboardPublicLink" + }, + { + "target": "com.metabase.api#CreateDashboardCopy" + }, + { + "target": "com.metabase.api#GetDashboardById" + }, + { + "target": "com.metabase.api#PutDashboard" + }, + { + "target": "com.metabase.api#DeleteDashboard" + }, + { + "target": "com.metabase.api#PutDashboardCards" + }, + { + "target": "com.metabase.api#GetDashboardItems" + }, + { + "target": "com.metabase.api#GetDashboardParamRemapping" + }, + { + "target": "com.metabase.api#GetDashboardParamSearch" + }, + { + "target": "com.metabase.api#GetDashboardParamValues" + }, + { + "target": "com.metabase.api#CreateDashboardPdf" + }, + { + "target": "com.metabase.api#GetDashboardQueryMetadata" + }, + { + "target": "com.metabase.api#GetDashboardRelated" + }, + { + "target": "com.metabase.api#CreateDataStudioTableDiscardValue" + }, + { + "target": "com.metabase.api#CreateDataStudioTableEdit" + }, + { + "target": "com.metabase.api#CreateDataStudioTableRescanValue" + }, + { + "target": "com.metabase.api#CreateDataStudioTableSelection" + }, + { + "target": "com.metabase.api#CreateDataStudioTableSyncSchema" + }, + { + "target": "com.metabase.api#GetDatabase" + }, + { + "target": "com.metabase.api#CreateDatabase" + }, + { + "target": "com.metabase.api#CreateDatabaseSampleDatabase" + }, + { + "target": "com.metabase.api#CreateDatabaseValidate" + }, + { + "target": "com.metabase.api#GetDatabaseById" + }, + { + "target": "com.metabase.api#PutDatabase" + }, + { + "target": "com.metabase.api#DeleteDatabase" + }, + { + "target": "com.metabase.api#GetDatabaseAutocompleteSuggestions" + }, + { + "target": "com.metabase.api#GetDatabaseCardAutocompleteSuggestions" + }, + { + "target": "com.metabase.api#CreateDatabaseDiscardValue" + }, + { + "target": "com.metabase.api#CreateDatabaseDismissSpinner" + }, + { + "target": "com.metabase.api#GetDatabaseFields" + }, + { + "target": "com.metabase.api#GetDatabaseHealthcheck" + }, + { + "target": "com.metabase.api#GetDatabaseIdfields" + }, + { + "target": "com.metabase.api#GetDatabaseMetadata" + }, + { + "target": "com.metabase.api#CreateDatabaseRescanValue" + }, + { + "target": "com.metabase.api#GetDatabaseSchema" + }, + { + "target": "com.metabase.api#GetDatabaseSchemaBySchema" + }, + { + "target": "com.metabase.api#GetDatabaseSchemas" + }, + { + "target": "com.metabase.api#GetDatabaseSettingsAvailable" + }, + { + "target": "com.metabase.api#CreateDatabaseSyncSchema" + }, + { + "target": "com.metabase.api#GetDatabaseSyncableSchemas" + }, + { + "target": "com.metabase.api#GetDatabaseUsageInfo" + }, + { + "target": "com.metabase.api#GetDatabaseDatasets" + }, + { + "target": "com.metabase.api#GetDatabaseDataset" + }, + { + "target": "com.metabase.api#GetDatabaseMetadata2" + }, + { + "target": "com.metabase.api#GetDatabaseSchemaBySchema2" + }, + { + "target": "com.metabase.api#GetDatabaseSchemas2" + }, + { + "target": "com.metabase.api#CreateDataset" + }, + { + "target": "com.metabase.api#CreateDatasetNative" + }, + { + "target": "com.metabase.api#CreateDatasetParameterRemapping" + }, + { + "target": "com.metabase.api#UpdateDatasetParameterSearch" + }, + { + "target": "com.metabase.api#CreateDatasetParameterValue" + }, + { + "target": "com.metabase.api#CreateDatasetPivot" + }, + { + "target": "com.metabase.api#CreateDatasetQueryMetadata" + }, + { + "target": "com.metabase.api#UpdateDataset" + }, + { + "target": "com.metabase.api#GetDocument" + }, + { + "target": "com.metabase.api#CreateDocument" + }, + { + "target": "com.metabase.api#GetDocument2" + }, + { + "target": "com.metabase.api#GetDocumentByDocumentId" + }, + { + "target": "com.metabase.api#PutDocument" + }, + { + "target": "com.metabase.api#DeleteDocument" + }, + { + "target": "com.metabase.api#UpdateDocumentCardQuery" + }, + { + "target": "com.metabase.api#CreateDocumentPublicLink" + }, + { + "target": "com.metabase.api#DeleteDocumentPublicLink" + }, + { + "target": "com.metabase.api#CreateDocumentCopy" + }, + { + "target": "com.metabase.api#CreateEeActionV2Execute" + }, + { + "target": "com.metabase.api#CreateEeActionV2ExecuteBulk" + }, + { + "target": "com.metabase.api#CreateEeActionV2ExecuteForm" + }, + { + "target": "com.metabase.api#GetEeAdvancedPermissionsApplicationGraph" + }, + { + "target": "com.metabase.api#PutEeAdvancedPermissionsApplicationGraph" + }, + { + "target": "com.metabase.api#GetEeAdvancedPermissionsImpersonation" + }, + { + "target": "com.metabase.api#DeleteEeAdvancedPermissionsImpersonation" + }, + { + "target": "com.metabase.api#GetEeAiControlsPermissions" + }, + { + "target": "com.metabase.api#PutEeAiControlsPermissions" + }, + { + "target": "com.metabase.api#CreateEeAiControlsPermissionsAdvanced" + }, + { + "target": "com.metabase.api#DeleteEeAiControlsPermissionsAdvanced" + }, + { + "target": "com.metabase.api#GetEeAiControlsUsageGroup" + }, + { + "target": "com.metabase.api#GetEeAiControlsUsageGroupByGroupId" + }, + { + "target": "com.metabase.api#PutEeAiControlsUsageGroup" + }, + { + "target": "com.metabase.api#GetEeAiControlsUsageInstance" + }, + { + "target": "com.metabase.api#PutEeAiControlsUsageInstance" + }, + { + "target": "com.metabase.api#GetEeAiControlsUsageTenant" + }, + { + "target": "com.metabase.api#GetEeAiControlsUsageTenantByTenantId" + }, + { + "target": "com.metabase.api#PutEeAiControlsUsageTenant" + }, + { + "target": "com.metabase.api#CreateEeAuditAppAnalyticsDevExport" + }, + { + "target": "com.metabase.api#GetEeAuditAppUserAuditInfo" + }, + { + "target": "com.metabase.api#DeleteEeAuditAppUserSubscriptions" + }, + { + "target": "com.metabase.api#GetEeBilling" + }, + { + "target": "com.metabase.api#GetEeCloudAddOnsAddons" + }, + { + "target": "com.metabase.api#GetEeCloudAddOnsPlans" + }, + { + "target": "com.metabase.api#UpdateEeCloudAddOns" + }, + { + "target": "com.metabase.api#DeleteEeCloudAddOns" + }, + { + "target": "com.metabase.api#UpdateEeCloudProxy" + }, + { + "target": "com.metabase.api#GetEeContentTranslationCsv" + }, + { + "target": "com.metabase.api#GetEeContentTranslationDictionary" + }, + { + "target": "com.metabase.api#GetEeContentTranslationDictionaryByToken" + }, + { + "target": "com.metabase.api#CreateEeContentTranslationUploadDictionary" + }, + { + "target": "com.metabase.api#GetEeCustomVizPlugin" + }, + { + "target": "com.metabase.api#CreateEeCustomVizPlugin" + }, + { + "target": "com.metabase.api#CreateEeCustomVizPluginDev" + }, + { + "target": "com.metabase.api#GetEeCustomVizPluginList" + }, + { + "target": "com.metabase.api#GetEeCustomVizPluginSandboxHost" + }, + { + "target": "com.metabase.api#PutEeCustomVizPlugin" + }, + { + "target": "com.metabase.api#DeleteEeCustomVizPlugin" + }, + { + "target": "com.metabase.api#GetEeCustomVizPluginAsset" + }, + { + "target": "com.metabase.api#GetEeCustomVizPluginBundle" + }, + { + "target": "com.metabase.api#PutEeCustomVizPluginBundle" + }, + { + "target": "com.metabase.api#GetEeCustomVizPluginDevSse" + }, + { + "target": "com.metabase.api#PutEeCustomVizPluginDevUrl" + }, + { + "target": "com.metabase.api#CreateEeCustomVizPluginRefresh" + }, + { + "target": "com.metabase.api#GetEeDataComplexityScoreComplexity" + }, + { + "target": "com.metabase.api#CreateEeDataStudioTablePublishTable" + }, + { + "target": "com.metabase.api#CreateEeDataStudioTableUnpublishTable" + }, + { + "target": "com.metabase.api#UpdateEeDatabaseReplicationConnectionDatabase" + }, + { + "target": "com.metabase.api#DeleteEeDatabaseReplicationConnectionDatabase" + }, + { + "target": "com.metabase.api#CreateEeDatabaseReplicationConnectionDatabasePreview" + }, + { + "target": "com.metabase.api#CreateEeDatabaseRoutingDestinationDatabase" + }, + { + "target": "com.metabase.api#PutEeDatabaseRoutingRouterDatabase" + }, + { + "target": "com.metabase.api#GetEeDependenciesBackfillStatus" + }, + { + "target": "com.metabase.api#GetEeDependenciesGraph" + }, + { + "target": "com.metabase.api#GetEeDependenciesGraphBreaking" + }, + { + "target": "com.metabase.api#GetEeDependenciesGraphBroken" + }, + { + "target": "com.metabase.api#GetEeDependenciesGraphDependents" + }, + { + "target": "com.metabase.api#GetEeDependenciesGraphUnreferenced" + }, + { + "target": "com.metabase.api#PutEeEmailOverride" + }, + { + "target": "com.metabase.api#DeleteEeEmailOverride" + }, + { + "target": "com.metabase.api#GetEeEmbeddingHubChecklist" + }, + { + "target": "com.metabase.api#GetEeErd" + }, + { + "target": "com.metabase.api#GetEeGsheetsConnection" + }, + { + "target": "com.metabase.api#CreateEeGsheetsConnection" + }, + { + "target": "com.metabase.api#DeleteEeGsheetsConnection" + }, + { + "target": "com.metabase.api#CreateEeGsheetsConnectionSync" + }, + { + "target": "com.metabase.api#GetEeGsheetsServiceAccount" + }, + { + "target": "com.metabase.api#GetEeLibrary" + }, + { + "target": "com.metabase.api#CreateEeLibrary" + }, + { + "target": "com.metabase.api#GetEeLibraryTree" + }, + { + "target": "com.metabase.api#GetEeLogsQueryExecution" + }, + { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversations" + }, + { + "target": "com.metabase.api#GetEeMetabotAnalyticsConversation" + }, + { + "target": "com.metabase.api#GetEeMetabotUsage" + }, + { + "target": "com.metabase.api#GetEeMfaAdminOverview" + }, + { + "target": "com.metabase.api#CreateEeMfaAdminRemove" + }, + { + "target": "com.metabase.api#CreateEeMfaDisable" + }, + { + "target": "com.metabase.api#CreateEeMfaEnroll" + }, + { + "target": "com.metabase.api#CreateEeMfaEnrollConfirm" + }, + { + "target": "com.metabase.api#CreateEeMfaRecoveryCode" + }, + { + "target": "com.metabase.api#GetEeMfaStatus" + }, + { + "target": "com.metabase.api#GetEePermissionDebug" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncBranches" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncCreateBranch" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncCurrentTask" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncCurrentTaskCancel" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncDirty" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncExport" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncExportPreflight" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncHasRemoteChanges" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncImport" + }, + { + "target": "com.metabase.api#GetEeRemoteSyncIsDirty" + }, + { + "target": "com.metabase.api#PutEeRemoteSyncSettings" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncStash" + }, + { + "target": "com.metabase.api#CreateEeRemoteSyncTestConnection" + }, + { + "target": "com.metabase.api#CreateEeReplacementCheckReplaceSource" + }, + { + "target": "com.metabase.api#PostApiEeReplacementReplaceModelWithTransform" + }, + { + "target": "com.metabase.api#CreateEeReplacementReplaceSource" + }, + { + "target": "com.metabase.api#GetEeReplacementRuns" + }, + { + "target": "com.metabase.api#GetEeReplacementRun" + }, + { + "target": "com.metabase.api#CreateEeReplacementRunCancel" + }, + { + "target": "com.metabase.api#GetEeScimKey" + }, + { + "target": "com.metabase.api#CreateEeScimKey" + }, + { + "target": "com.metabase.api#GetEeScimGroups" + }, + { + "target": "com.metabase.api#CreateEeScimGroup" + }, + { + "target": "com.metabase.api#GetEeScimGroup" + }, + { + "target": "com.metabase.api#PutEeScimGroup" + }, + { + "target": "com.metabase.api#DeleteEeScimGroup" + }, + { + "target": "com.metabase.api#GetEeScimUsers" + }, + { + "target": "com.metabase.api#CreateEeScimUser" + }, + { + "target": "com.metabase.api#GetEeScimUser" + }, + { + "target": "com.metabase.api#PutEeScimUser" + }, + { + "target": "com.metabase.api#UpdateEeScimUser" + }, + { + "target": "com.metabase.api#GetEeSecurityCenter" + }, + { + "target": "com.metabase.api#CreateEeSecurityCenterAcknowledge" + }, + { + "target": "com.metabase.api#CreateEeSecurityCenterSync" + }, + { + "target": "com.metabase.api#CreateEeSecurityCenterTestNotification" + }, + { + "target": "com.metabase.api#CreateEeSecurityCenterAcknowledge2" + }, + { + "target": "com.metabase.api#GetEeSemanticSearchStatus" + }, + { + "target": "com.metabase.api#CreateEeSerializationExport" + }, + { + "target": "com.metabase.api#CreateEeSerializationImport" + }, + { + "target": "com.metabase.api#CreateEeSerializationMetadataExport" + }, + { + "target": "com.metabase.api#CreateEeSerializationMetadataImport" + }, + { + "target": "com.metabase.api#GetEeSerializationMetadataImport" + }, + { + "target": "com.metabase.api#GetEeStale" + }, + { + "target": "com.metabase.api#GetEeSupportAccessGrant" + }, + { + "target": "com.metabase.api#CreateEeSupportAccessGrant" + }, + { + "target": "com.metabase.api#GetEeSupportAccessGrantCurrent" + }, + { + "target": "com.metabase.api#PutEeSupportAccessGrantRevoke" + }, + { + "target": "com.metabase.api#GetEeTenant" + }, + { + "target": "com.metabase.api#CreateEeTenant" + }, + { + "target": "com.metabase.api#GetEeTenantById" + }, + { + "target": "com.metabase.api#PutEeTenant" + }, + { + "target": "com.metabase.api#GetEeTransformsPythonLibrary" + }, + { + "target": "com.metabase.api#PutEeTransformsPythonLibrary" + }, + { + "target": "com.metabase.api#CreateEeTransformsPythonTestRun" + }, + { + "target": "com.metabase.api#GetEeTransformInspect" + }, + { + "target": "com.metabase.api#GetEeTransformInspectByLensId" + }, + { + "target": "com.metabase.api#CreateEeTransformInspectQuery" + }, + { + "target": "com.metabase.api#GetEeUploadManagementTables" + }, + { + "target": "com.metabase.api#DeleteEeUploadManagementTable" + }, + { + "target": "com.metabase.api#CreateEidTranslationTranslate" + }, + { + "target": "com.metabase.api#PutEmail" + }, + { + "target": "com.metabase.api#DeleteEmail" + }, + { + "target": "com.metabase.api#CreateEmailTest" + }, + { + "target": "com.metabase.api#CreateEmbedMcpDrill" + }, + { + "target": "com.metabase.api#CreateEmbedMcpFeedback" + }, + { + "target": "com.metabase.api#GetEmbedTheme" + }, + { + "target": "com.metabase.api#CreateEmbedTheme" + }, + { + "target": "com.metabase.api#CreateEmbedThemeSeedDefault" + }, + { + "target": "com.metabase.api#GetEmbedThemeById" + }, + { + "target": "com.metabase.api#PutEmbedTheme" + }, + { + "target": "com.metabase.api#DeleteEmbedTheme" + }, + { + "target": "com.metabase.api#CreateEmbedThemeCopy" + }, + { + "target": "com.metabase.api#GetEmbedCard" + }, + { + "target": "com.metabase.api#GetEmbedCardParamRemapping" + }, + { + "target": "com.metabase.api#GetEmbedCardParamSearch" + }, + { + "target": "com.metabase.api#GetEmbedCardParamValues" + }, + { + "target": "com.metabase.api#GetEmbedCardQuery" + }, + { + "target": "com.metabase.api#GetEmbedCardQueryByExportFormat" + }, + { + "target": "com.metabase.api#GetEmbedDashboard" + }, + { + "target": "com.metabase.api#GetEmbedDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetEmbedDashboardDashcardCardByExportFormat" + }, + { + "target": "com.metabase.api#GetEmbedDashboardParamRemapping" + }, + { + "target": "com.metabase.api#GetEmbedDashboardParamSearch" + }, + { + "target": "com.metabase.api#GetEmbedDashboardParamValues" + }, + { + "target": "com.metabase.api#GetEmbedPivotCardQuery" + }, + { + "target": "com.metabase.api#GetEmbedPivotDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetEmbedTilesCard" + }, + { + "target": "com.metabase.api#GetEmbedTilesDashboardDashcardCard" + }, + { + "target": "com.metabase.api#CreateFieldTableIds" + }, + { + "target": "com.metabase.api#GetField" + }, + { + "target": "com.metabase.api#PutField" + }, + { + "target": "com.metabase.api#CreateFieldDimension" + }, + { + "target": "com.metabase.api#DeleteFieldDimension" + }, + { + "target": "com.metabase.api#CreateFieldDiscardValue" + }, + { + "target": "com.metabase.api#GetFieldRelated" + }, + { + "target": "com.metabase.api#GetFieldRemapping" + }, + { + "target": "com.metabase.api#CreateFieldRescanValue" + }, + { + "target": "com.metabase.api#GetFieldSearch" + }, + { + "target": "com.metabase.api#GetFieldSummary" + }, + { + "target": "com.metabase.api#GetFieldValues" + }, + { + "target": "com.metabase.api#CreateFieldValue" + }, + { + "target": "com.metabase.api#CreateFrontendError" + }, + { + "target": "com.metabase.api#GetGeojson" + }, + { + "target": "com.metabase.api#GetGeojsonByKey" + }, + { + "target": "com.metabase.api#GetGlossary" + }, + { + "target": "com.metabase.api#CreateGlossary" + }, + { + "target": "com.metabase.api#PutGlossary" + }, + { + "target": "com.metabase.api#DeleteGlossary" + }, + { + "target": "com.metabase.api#PutGoogleSettings" + }, + { + "target": "com.metabase.api#GetHealthInspector" + }, + { + "target": "com.metabase.api#PutLdapSettings" + }, + { + "target": "com.metabase.api#CreateLlmExtractSource" + }, + { + "target": "com.metabase.api#CreateLlmGenerateSql" + }, + { + "target": "com.metabase.api#GetLlmListModels" + }, + { + "target": "com.metabase.api#CreateLoggerAdjustment" + }, + { + "target": "com.metabase.api#DeleteLoggerAdjustment" + }, + { + "target": "com.metabase.api#GetLoggerLogs" + }, + { + "target": "com.metabase.api#GetLoggerPresets" + }, + { + "target": "com.metabase.api#GetLoginHistoryCurrent" + }, + { + "target": "com.metabase.api#GetMeasure" + }, + { + "target": "com.metabase.api#CreateMeasure" + }, + { + "target": "com.metabase.api#GetMeasureById" + }, + { + "target": "com.metabase.api#PutMeasure" + }, + { + "target": "com.metabase.api#GetMeasureDimensionRemapping" + }, + { + "target": "com.metabase.api#GetMeasureDimensionSearch" + }, + { + "target": "com.metabase.api#GetMeasureDimensionValues" + }, + { + "target": "com.metabase.api#CreateMetabotAgentStreaming" + }, + { + "target": "com.metabase.api#GetMetabotConversations" + }, + { + "target": "com.metabase.api#GetMetabotConversation" + }, + { + "target": "com.metabase.api#CreateMetabotDocumentGenerateContent" + }, + { + "target": "com.metabase.api#CreateMetabotFeedback" + }, + { + "target": "com.metabase.api#GetMetabotMetabot" + }, + { + "target": "com.metabase.api#GetMetabotMetabotById" + }, + { + "target": "com.metabase.api#PutMetabotMetabot" + }, + { + "target": "com.metabase.api#GetMetabotMetabotPromptSuggestions" + }, + { + "target": "com.metabase.api#DeleteMetabotMetabotPromptSuggestions" + }, + { + "target": "com.metabase.api#CreateMetabotMetabotPromptSuggestionsRegenerate" + }, + { + "target": "com.metabase.api#DeleteMetabotMetabotPromptSuggestionsPrompt" + }, + { + "target": "com.metabase.api#GetMetabotPermissionsUserPermissions" + }, + { + "target": "com.metabase.api#GetMetabotSettings" + }, + { + "target": "com.metabase.api#PutMetabotSettings" + }, + { + "target": "com.metabase.api#CreateMetabotSlackEvent" + }, + { + "target": "com.metabase.api#CreateMetabotSlackInteractive" + }, + { + "target": "com.metabase.api#PutMetabotSlackSettings" + }, + { + "target": "com.metabase.api#CreateMetabotSourceFeedback" + }, + { + "target": "com.metabase.api#GetMetric" + }, + { + "target": "com.metabase.api#CreateMetricBreakoutValue" + }, + { + "target": "com.metabase.api#CreateMetricDataset" + }, + { + "target": "com.metabase.api#GetMetricById" + }, + { + "target": "com.metabase.api#GetMetricDimensionRemapping" + }, + { + "target": "com.metabase.api#GetMetricDimensionSearch" + }, + { + "target": "com.metabase.api#GetMetricDimensionValues" + }, + { + "target": "com.metabase.api#GetModelIndex" + }, + { + "target": "com.metabase.api#CreateModelIndex" + }, + { + "target": "com.metabase.api#GetModelIndexById" + }, + { + "target": "com.metabase.api#DeleteModelIndex" + }, + { + "target": "com.metabase.api#CreateModerationReview" + }, + { + "target": "com.metabase.api#GetMtGtap" + }, + { + "target": "com.metabase.api#CreateMtGtap" + }, + { + "target": "com.metabase.api#CreateMtGtapValidate" + }, + { + "target": "com.metabase.api#GetMtGtapById" + }, + { + "target": "com.metabase.api#PutMtGtap" + }, + { + "target": "com.metabase.api#DeleteMtGtap" + }, + { + "target": "com.metabase.api#GetMtUserAttributes" + }, + { + "target": "com.metabase.api#PutMtUserAttributes" + }, + { + "target": "com.metabase.api#GetNativeQuerySnippet" + }, + { + "target": "com.metabase.api#CreateNativeQuerySnippet" + }, + { + "target": "com.metabase.api#GetNativeQuerySnippetById" + }, + { + "target": "com.metabase.api#PutNativeQuerySnippet" + }, + { + "target": "com.metabase.api#GetNotification" + }, + { + "target": "com.metabase.api#CreateNotification" + }, + { + "target": "com.metabase.api#GetNotificationAdmin" + }, + { + "target": "com.metabase.api#CreateNotificationAdminBulk" + }, + { + "target": "com.metabase.api#GetNotificationAdminById" + }, + { + "target": "com.metabase.api#CreateNotificationSend" + }, + { + "target": "com.metabase.api#CreateNotificationUnsubscribe" + }, + { + "target": "com.metabase.api#CreateNotificationUnsubscribeUndo" + }, + { + "target": "com.metabase.api#GetNotificationById" + }, + { + "target": "com.metabase.api#PutNotification" + }, + { + "target": "com.metabase.api#CreateNotificationSend2" + }, + { + "target": "com.metabase.api#CreateNotificationUnsubscribe2" + }, + { + "target": "com.metabase.api#CreateNotifyDbAttachedDatawarehouse" + }, + { + "target": "com.metabase.api#UpdateNotifyDb" + }, + { + "target": "com.metabase.api#CreateNotifyDbNewTable" + }, + { + "target": "com.metabase.api#GetOauthAuthorizations" + }, + { + "target": "com.metabase.api#GetOsiAiContext" + }, + { + "target": "com.metabase.api#CreateOsiAiContextReconcile" + }, + { + "target": "com.metabase.api#GetOsiAiContextByEntityLocalId" + }, + { + "target": "com.metabase.api#PutOsiAiContext" + }, + { + "target": "com.metabase.api#DeleteOsiAiContext" + }, + { + "target": "com.metabase.api#GetPermissionsGraph" + }, + { + "target": "com.metabase.api#PutPermissionsGraph" + }, + { + "target": "com.metabase.api#GetPermissionsGraphDb" + }, + { + "target": "com.metabase.api#GetPermissionsGraphGroup" + }, + { + "target": "com.metabase.api#GetPermissionsGroup" + }, + { + "target": "com.metabase.api#CreatePermissionsGroup" + }, + { + "target": "com.metabase.api#PutPermissionsGroup" + }, + { + "target": "com.metabase.api#DeletePermissionsGroup" + }, + { + "target": "com.metabase.api#GetPermissionsGroupById" + }, + { + "target": "com.metabase.api#GetPermissionsMembership" + }, + { + "target": "com.metabase.api#CreatePermissionsMembership" + }, + { + "target": "com.metabase.api#PutPermissionsMembershipClear" + }, + { + "target": "com.metabase.api#PutPermissionsMembership" + }, + { + "target": "com.metabase.api#DeletePermissionsMembership" + }, + { + "target": "com.metabase.api#GetPersist" + }, + { + "target": "com.metabase.api#GetPersistCard" + }, + { + "target": "com.metabase.api#CreatePersistCardPersist" + }, + { + "target": "com.metabase.api#CreatePersistCardRefresh" + }, + { + "target": "com.metabase.api#CreatePersistCardUnpersist" + }, + { + "target": "com.metabase.api#CreatePersistDatabasePersist" + }, + { + "target": "com.metabase.api#CreatePersistDatabaseUnpersist" + }, + { + "target": "com.metabase.api#CreatePersistDisable" + }, + { + "target": "com.metabase.api#CreatePersistEnable" + }, + { + "target": "com.metabase.api#CreatePersistSetRefreshSchedule" + }, + { + "target": "com.metabase.api#GetPersistByPersistedInfoId" + }, + { + "target": "com.metabase.api#CreatePremiumFeaturesTokenRefresh" + }, + { + "target": "com.metabase.api#GetPremiumFeaturesTokenStatus" + }, + { + "target": "com.metabase.api#GetPreviewEmbedCard" + }, + { + "target": "com.metabase.api#GetPreviewEmbedCardParamRemapping" + }, + { + "target": "com.metabase.api#GetPreviewEmbedCardParamValues" + }, + { + "target": "com.metabase.api#GetPreviewEmbedCardQuery" + }, + { + "target": "com.metabase.api#GetPreviewEmbedDashboard" + }, + { + "target": "com.metabase.api#GetPreviewEmbedDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamRemapping" + }, + { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamSearch" + }, + { + "target": "com.metabase.api#GetPreviewEmbedDashboardParamValues" + }, + { + "target": "com.metabase.api#GetPreviewEmbedPivotCardQuery" + }, + { + "target": "com.metabase.api#GetPreviewEmbedPivotDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetPreviewEmbedTilesCard" + }, + { + "target": "com.metabase.api#GetPreviewEmbedTilesDashboardDashcardCard" + }, + { + "target": "com.metabase.api#CreateProductFeedback" + }, + { + "target": "com.metabase.api#GetActionByUuid" + }, + { + "target": "com.metabase.api#CreateActionExecute2" + }, + { + "target": "com.metabase.api#GetCardByUuid" + }, + { + "target": "com.metabase.api#GetCardParamRemapping2" + }, + { + "target": "com.metabase.api#GetCardParamSearchByQuery" + }, + { + "target": "com.metabase.api#GetCardParamValues2" + }, + { + "target": "com.metabase.api#GetCardQuery" + }, + { + "target": "com.metabase.api#GetCardQueryByExportFormat" + }, + { + "target": "com.metabase.api#GetDashboardByUuid" + }, + { + "target": "com.metabase.api#GetDashboardDashcardCard" + }, + { + "target": "com.metabase.api#UpdateDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetDashboardDashcardExecute2" + }, + { + "target": "com.metabase.api#CreateDashboardDashcardExecute2" + }, + { + "target": "com.metabase.api#GetDashboardParamRemapping2" + }, + { + "target": "com.metabase.api#GetDashboardParamSearchByQuery" + }, + { + "target": "com.metabase.api#GetDashboardParamValues2" + }, + { + "target": "com.metabase.api#GetDocumentByUuid" + }, + { + "target": "com.metabase.api#GetDocumentCard" + }, + { + "target": "com.metabase.api#UpdateDocumentCard" + }, + { + "target": "com.metabase.api#GetOembed" + }, + { + "target": "com.metabase.api#GetPivotCardQuery" + }, + { + "target": "com.metabase.api#GetPivotDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetTilesCard" + }, + { + "target": "com.metabase.api#GetTilesDashboardDashcardCard" + }, + { + "target": "com.metabase.api#GetPulse" + }, + { + "target": "com.metabase.api#CreatePulse" + }, + { + "target": "com.metabase.api#GetPulseFormInput" + }, + { + "target": "com.metabase.api#CreatePulseTest" + }, + { + "target": "com.metabase.api#CreatePulseUnsubscribe" + }, + { + "target": "com.metabase.api#CreatePulseUnsubscribeUndo" + }, + { + "target": "com.metabase.api#GetPulseById" + }, + { + "target": "com.metabase.api#PutPulse" + }, + { + "target": "com.metabase.api#DeletePulseSubscription" + }, + { + "target": "com.metabase.api#GetRevision" + }, + { + "target": "com.metabase.api#CreateRevisionRevert" + }, + { + "target": "com.metabase.api#GetRevisionById" + }, + { + "target": "com.metabase.api#GetSearch" + }, + { + "target": "com.metabase.api#GetSearchDebug" + }, + { + "target": "com.metabase.api#CreateSearchForceReindex" + }, + { + "target": "com.metabase.api#CreateSearchReInit" + }, + { + "target": "com.metabase.api#GetSearchWeights" + }, + { + "target": "com.metabase.api#PutSearchWeights" + }, + { + "target": "com.metabase.api#GetSegment" + }, + { + "target": "com.metabase.api#CreateSegment" + }, + { + "target": "com.metabase.api#GetSegmentById" + }, + { + "target": "com.metabase.api#PutSegment" + }, + { + "target": "com.metabase.api#DeleteSegment" + }, + { + "target": "com.metabase.api#GetSegmentRelated" + }, + { + "target": "com.metabase.api#CreateSession" + }, + { + "target": "com.metabase.api#DeleteSession" + }, + { + "target": "com.metabase.api#CreateSessionForgotPassword" + }, + { + "target": "com.metabase.api#CreateSessionGoogleAuth" + }, + { + "target": "com.metabase.api#CreateSessionMfaSendEmailOtp" + }, + { + "target": "com.metabase.api#CreateSessionMfaVerify" + }, + { + "target": "com.metabase.api#CreateSessionPasswordCheck" + }, + { + "target": "com.metabase.api#GetSessionPasswordResetTokenValid" + }, + { + "target": "com.metabase.api#GetSessionProperties" + }, + { + "target": "com.metabase.api#CreateSessionResetPassword" + }, + { + "target": "com.metabase.api#GetSetting" + }, + { + "target": "com.metabase.api#PutSetting" + }, + { + "target": "com.metabase.api#GetSettingByKey" + }, + { + "target": "com.metabase.api#PutSettingByKey" + }, + { + "target": "com.metabase.api#CreateSetup" + }, + { + "target": "com.metabase.api#GetSlackAppInfo" + }, + { + "target": "com.metabase.api#CreateSlackBugReport" + }, + { + "target": "com.metabase.api#GetSlackManifest" + }, + { + "target": "com.metabase.api#PutSlackSettings" + }, + { + "target": "com.metabase.api#GetTable" + }, + { + "target": "com.metabase.api#PutTable" + }, + { + "target": "com.metabase.api#GetTableCardIdFks" + }, + { + "target": "com.metabase.api#GetTableCardIdQueryMetadata" + }, + { + "target": "com.metabase.api#GetTableById" + }, + { + "target": "com.metabase.api#PutTableById" + }, + { + "target": "com.metabase.api#CreateTableAppendCsv" + }, + { + "target": "com.metabase.api#CreateTableDiscardValue" + }, + { + "target": "com.metabase.api#PutTableFieldsOrder" + }, + { + "target": "com.metabase.api#GetTableFks" + }, + { + "target": "com.metabase.api#GetTableQueryMetadata" + }, + { + "target": "com.metabase.api#GetTableRelated" + }, + { + "target": "com.metabase.api#CreateTableReplaceCsv" + }, + { + "target": "com.metabase.api#CreateTableRescanValue" + }, + { + "target": "com.metabase.api#CreateTableSyncSchema" + }, + { + "target": "com.metabase.api#GetTableData" + }, + { + "target": "com.metabase.api#GetTask" + }, + { + "target": "com.metabase.api#GetTaskInfo" + }, + { + "target": "com.metabase.api#GetTaskRuns" + }, + { + "target": "com.metabase.api#GetTaskRunsEntities" + }, + { + "target": "com.metabase.api#GetTaskRun" + }, + { + "target": "com.metabase.api#GetTaskUniqueTasks" + }, + { + "target": "com.metabase.api#GetTaskById" + }, + { + "target": "com.metabase.api#GetTile" + }, + { + "target": "com.metabase.api#GetTileDashcardCard" + }, + { + "target": "com.metabase.api#GetTileByY" + }, + { + "target": "com.metabase.api#GetTimeline" + }, + { + "target": "com.metabase.api#CreateTimeline" + }, + { + "target": "com.metabase.api#CreateTimelineEvent" + }, + { + "target": "com.metabase.api#GetTimelineEvent" + }, + { + "target": "com.metabase.api#PutTimelineEvent" + }, + { + "target": "com.metabase.api#DeleteTimelineEvent" + }, + { + "target": "com.metabase.api#GetTimelineCollectionRoot" + }, + { + "target": "com.metabase.api#GetTimelineCollection" + }, + { + "target": "com.metabase.api#GetTimelineById" + }, + { + "target": "com.metabase.api#PutTimeline" + }, + { + "target": "com.metabase.api#DeleteTimeline" + }, + { + "target": "com.metabase.api#GetTransform" + }, + { + "target": "com.metabase.api#CreateTransform" + }, + { + "target": "com.metabase.api#GetTransformJob" + }, + { + "target": "com.metabase.api#CreateTransformJob" + }, + { + "target": "com.metabase.api#PutTransformJobActive" + }, + { + "target": "com.metabase.api#GetTransformJobByJobId" + }, + { + "target": "com.metabase.api#PutTransformJob" + }, + { + "target": "com.metabase.api#DeleteTransformJob" + }, + { + "target": "com.metabase.api#CreateTransformJobRun" + }, + { + "target": "com.metabase.api#GetTransformJobRuns" + }, + { + "target": "com.metabase.api#GetTransformJobRunTransformRuns" + }, + { + "target": "com.metabase.api#GetTransformJobTransforms" + }, + { + "target": "com.metabase.api#GetTransformTag" + }, + { + "target": "com.metabase.api#CreateTransformTag" + }, + { + "target": "com.metabase.api#PutTransformTag" + }, + { + "target": "com.metabase.api#DeleteTransformTag" + }, + { + "target": "com.metabase.api#GetTransformRun" + }, + { + "target": "com.metabase.api#GetTransformRunByRunId" + }, + { + "target": "com.metabase.api#GetTransformById" + }, + { + "target": "com.metabase.api#PutTransform" + }, + { + "target": "com.metabase.api#DeleteTransform" + }, + { + "target": "com.metabase.api#CreateTransformCancel" + }, + { + "target": "com.metabase.api#GetTransformDependencies" + }, + { + "target": "com.metabase.api#CreateTransformResetCheckpoint" + }, + { + "target": "com.metabase.api#CreateTransformRun" + }, + { + "target": "com.metabase.api#DeleteTransformTable" + }, + { + "target": "com.metabase.api#CreateUploadCsv" + }, + { + "target": "com.metabase.api#GetUser" + }, + { + "target": "com.metabase.api#CreateUser" + }, + { + "target": "com.metabase.api#GetUserKeyValueNamespace" + }, + { + "target": "com.metabase.api#GetUserKeyValueNamespaceKey" + }, + { + "target": "com.metabase.api#PutUserKeyValueNamespaceKey" + }, + { + "target": "com.metabase.api#DeleteUserKeyValueNamespaceKey" + }, + { + "target": "com.metabase.api#GetUserCurrent" + }, + { + "target": "com.metabase.api#GetUserRecipients" + }, + { + "target": "com.metabase.api#GetUserById" + }, + { + "target": "com.metabase.api#PutUser" + }, + { + "target": "com.metabase.api#DeleteUser" + }, + { + "target": "com.metabase.api#PutUserModal" + }, + { + "target": "com.metabase.api#PutUserPassword" + }, + { + "target": "com.metabase.api#CreateUserPasswordResetUrl" + }, + { + "target": "com.metabase.api#PutUserReactivate" + }, + { + "target": "com.metabase.api#GetUtilRandomToken" + } + ], + "traits": { + "smithy.api#title": "Metabase API documentation", + "smithy.api#documentation": "- **The API is subject to change.** We rarely change API endpoints, and almost never remove them, but if you write code that relies on the API, there's a chance you might have to update your code in the future.\n- **The API isn't versioned.** So don’t expect to stay on a particular version of Metabase in order to use a “stable” API.\n\n## API tutorial\n\nCheck out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).\n\n## API keys\n\nCreate keys to authenticate programmatic requests to your Metabase. See [API keys](./people-and-groups/api-keys).\n\n## API changelog\n\nFor breaking changes, see the API [changelog](./developers-guide/api-changelog).\n\n## View the API docs for your Metabase\n\nYou can view the API docs for your Metabase by visiting `https://[your-metabase-url]/api/docs`.\n\n## Generating API docs\n\nYou can generate these docs by running:\n\n```\nclojure -M:ee:doc api-documentation\n```" + } + } + } +} diff --git a/packages/metabase/package.json b/packages/metabase/package.json new file mode 100644 index 000000000..2a020b607 --- /dev/null +++ b/packages/metabase/package.json @@ -0,0 +1,85 @@ +{ + "name": "@distilled.cloud/metabase", + "version": "1.0.0-rc.8", + "repository": { + "type": "git", + "url": "https://github.com/alchemy-run/distilled", + "directory": "packages/metabase" + }, + "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-metabase", + "specs:update": "git submodule update --remote --force --depth=1 specs/spec-mirror-metabase" + }, + "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/metabase/scripts/convert.ts b/packages/metabase/scripts/convert.ts new file mode 100644 index 000000000..7fe329c3f --- /dev/null +++ b/packages/metabase/scripts/convert.ts @@ -0,0 +1,32 @@ +#!/usr/bin/env bun +/** + * convert — turn the Metabase OpenAPI spec into a Smithy 2.0 JSON model. + * + * Input: specs/spec-mirror-metabase/specs/openapi.json (spec submodule) + * patches/*.patch.json (RFC-6902 patches to the OpenAPI document) + * Output: .generated-specs/metabase.json + * + * The OpenAPI→Smithy converter lives in + * `@distilled.cloud/core/codegen/openapi`; this script is Metabase'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: "metabase", + specPath: "specs/spec-mirror-metabase/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.metabase.api", + serviceName: "Metabase", + skipDeprecated: true, + }, +}); diff --git a/packages/metabase/scripts/generate.ts b/packages/metabase/scripts/generate.ts new file mode 100644 index 000000000..5ccf21dc8 --- /dev/null +++ b/packages/metabase/scripts/generate.ts @@ -0,0 +1,84 @@ +#!/usr/bin/env bun +/** + * generate — turn the Smithy JSON model in .generated-specs into the + * Metabase Effect SDK. + * + * Input: .generated-specs/metabase.json (written by scripts/convert.ts) + * Output: src/services/metabase.ts + src/services/index.ts + * + * The smithy→SDK compiler and CLI pipeline live in + * `@distilled.cloud/core/codegen`; this script is Metabase's provider spec. + * Metabase keeps the wire's snake_case / kebab-case 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"; + +/** Metabase's provider spec for the shared smithy→SDK compiler. */ +const metabaseSpec: 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, passwords): 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`, + ], + + operationDecl: { + contextType: "MetabaseOpContext", + commonErrorType: "MetabaseOpError", + commonErrorClasses: ["UnknownMetabaseError"], + protocol: "MetabaseProtocol", + retry: "Retry.Retry", + }, + + sourceNote: ".generated-specs (specs/spec-mirror-metabase)", + + // 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 Metabase 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: () => metabaseSpec, +}); diff --git a/packages/metabase/src/credentials.ts b/packages/metabase/src/credentials.ts new file mode 100644 index 000000000..b339ab3ad --- /dev/null +++ b/packages/metabase/src/credentials.ts @@ -0,0 +1,58 @@ +/** + * Metabase 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 an API key sent as `X-API-Key` (the + * scheme the published OpenAPI document declares as `ApiKeyAuth`). + */ +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"; + +/** Metabase OSS default listen address (paths already include `/api`). */ +export const DEFAULT_API_BASE_URL = "http://localhost:3000"; + +export interface Config { + readonly apiKey: Redacted.Redacted; + readonly apiBaseUrl: string; +} + +export class Credentials extends Context.Service< + Credentials, + Effect.Effect +>()("MetabaseCredentials") {} + +/** Layer from a plain API key + optional instance origin. */ +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 METABASE_API_KEY (required) and METABASE_API_BASE_URL (optional). */ +export const CredentialsFromEnv: Layer.Layer = Layer.succeed( + Credentials, + Effect.gen(function* () { + const apiKey = process.env.METABASE_API_KEY; + + if (!apiKey) { + return yield* new ConfigError({ + message: "METABASE_API_KEY environment variable is required", + }); + } + + return { + apiKey: Redacted.make(apiKey), + apiBaseUrl: process.env.METABASE_API_BASE_URL ?? DEFAULT_API_BASE_URL, + }; + }).pipe(Effect.orDie), +); diff --git a/packages/metabase/src/errors.ts b/packages/metabase/src/errors.ts new file mode 100644 index 000000000..2b70f8a8f --- /dev/null +++ b/packages/metabase/src/errors.ts @@ -0,0 +1,50 @@ +/** + * Metabase-specific error types. + * + * Re-exports the common HTTP errors from core and adds the Metabase 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 Metabase error — returned when nothing else matches the failure. */ +export class UnknownMetabaseError extends Schema.TaggedError()( + "UnknownMetabaseError", + { + code: Schema.optional(Schema.String), + message: Schema.optional(Schema.String), + body: Schema.Unknown, + }, +).pipe(Category.withServerError) {} + +/** Schema parse error wrapper. */ +export class MetabaseParseError extends Schema.TaggedError()( + "MetabaseParseError", + { + body: Schema.Unknown, + cause: Schema.Unknown, + }, +).pipe(Category.withParseError) {} diff --git a/packages/metabase/src/index.ts b/packages/metabase/src/index.ts new file mode 100644 index 000000000..25ace268a --- /dev/null +++ b/packages/metabase/src/index.ts @@ -0,0 +1,26 @@ +/** + * @distilled.cloud/metabase — Metabase 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 Metabase from "@distilled.cloud/metabase"; + * + * const cards = yield* Metabase.Services.metabase.getApiCard({}); + * ``` + */ +export * from "./credentials.ts"; +export * from "./errors.ts"; +export * as T from "./traits.ts"; +export { + MetabaseProtocol, + type MetabaseOpError, + type MetabaseOpContext, +} from "./protocol.ts"; +export { paginateCursor } from "./pagination.ts"; +export * as Retry from "./retry.ts"; +export * as Services from "./services/index.ts"; +export * from "./services/metabase.ts"; diff --git a/packages/metabase/src/pagination.ts b/packages/metabase/src/pagination.ts new file mode 100644 index 000000000..80f0fd99d --- /dev/null +++ b/packages/metabase/src/pagination.ts @@ -0,0 +1,10 @@ +/** + * Metabase pagination — hand-written. + * + * Metabase list endpoints do not declare a shared next-page token in the + * published OpenAPI document; generated operations that do not stamp + * `smithy.api#paginated` leave paging fields as plain inputs. + * {@link paginateCursor} is re-exported for callers that want to drive a + * cursor loop themselves. + */ +export { paginateCursor } from "@distilled.cloud/core/pagination"; diff --git a/packages/metabase/src/protocol.ts b/packages/metabase/src/protocol.ts new file mode 100644 index 000000000..19b87df10 --- /dev/null +++ b/packages/metabase/src/protocol.ts @@ -0,0 +1,69 @@ +/** + * MetabaseProtocol — hand-written. + * + * Metabase speaks API-key-authenticated JSON REST (no response envelope), + * so the whole protocol is one `makeRestProtocol` call from + * `core/protocol-rest`: + * + * request: credentials → `X-API-Key: ` + base URL + * (default http://localhost:3000), resolved from the calling + * fiber on every request. Paths in the spec already include + * `/api`, so the instance origin is used as-is. + * + * response: 2xx JSON is the payload (sensitive members delivered as + * `Redacted`); non-2xx `{ message? }` bodies map to the + * operation's typed error classes by status, then the shared + * HTTP-status classes, then {@link UnknownMetabaseError}. + */ +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 { UnknownMetabaseError } from "./errors.ts"; + +/** + * Error channel shared by every generated Metabase operation. Generated + * service files annotate operations with `API.OperationMethod` explicitly so the compiler never + * infers these back out of the schema generics. + */ +export type MetabaseOpError = + | InstanceType<(typeof API_ERRORS)[number]> + | UnknownMetabaseError + | ConfigError + | HttpClientError.HttpClientError; + +/** Context (requirements) shared by every generated Metabase operation. */ +export type MetabaseOpContext = Credentials | HttpClient.HttpClient; + +export const MetabaseProtocol: 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) => ({ + "X-API-Key": Redacted.value(creds.apiKey), + }), + // Metabase's error body is typically `{ message?: string }` — the + // factory's default lenient envelope covers it. + unknownError: ({ code, message, body }) => + new UnknownMetabaseError({ + code: + typeof code === "string" + ? code + : code !== undefined + ? String(code) + : undefined, + message, + body, + }), + }); diff --git a/packages/metabase/src/retry.ts b/packages/metabase/src/retry.ts new file mode 100644 index 000000000..2883e22a8 --- /dev/null +++ b/packages/metabase/src/retry.ts @@ -0,0 +1,54 @@ +/** + * Metabase 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 Metabase API call below it pick it up: + * + * @example + * ```ts + * import * as Metabase from "@distilled.cloud/metabase"; + * + * myEffect.pipe(Metabase.Retry.transient); + * Effect.provide(myEffect, Layer.succeed(Metabase.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 Metabase API calls. */ +export class Retry extends Context.Service()("MetabaseRetry") {} + +/** Provides a custom retry policy to every Metabase 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/metabase/src/services/index.ts b/packages/metabase/src/services/index.ts new file mode 100644 index 000000000..8d98a5baf --- /dev/null +++ b/packages/metabase/src/services/index.ts @@ -0,0 +1,2 @@ +// AUTO-GENERATED by scripts/generate.ts. Do not edit. +export * as metabase from "./metabase.ts"; diff --git a/packages/metabase/src/services/metabase.ts b/packages/metabase/src/services/metabase.ts new file mode 100644 index 000000000..92e9adc04 --- /dev/null +++ b/packages/metabase/src/services/metabase.ts @@ -0,0 +1,35026 @@ +// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-metabase). 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 T from "../traits.ts"; +import { + MetabaseProtocol, + type MetabaseOpError, + type MetabaseOpContext, +} from "../protocol.ts"; +import { UnknownMetabaseError } from "../errors.ts"; +import * as Retry from "../retry.ts"; + +export type { MetabaseOpError, MetabaseOpContext }; + +export type MetabaseLibSchemaParameterVariable = Array; +export const MetabaseLibSchemaParameterVariable = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +/** A :text-tag parameter :target applies to parameterized text cards in viz settings */ +export type MetabaseLibSchemaParameterTextTag = Array; +export const MetabaseLibSchemaParameterTextTag = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export type MetabaseLibSchemaParameterTarget = + | unknown + | MetabaseLibSchemaParameterVariable + | MetabaseLibSchemaParameterTextTag; +export const MetabaseLibSchemaParameterTarget = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** parameter_mapping must be a map with :parameter_id and :target keys */ +export interface MetabaseParametersSchemaParameterMapping { + card_id?: number | null; + dashcard?: unknown; + parameter_id: string; + target: MetabaseLibSchemaParameterTarget; +} +export const MetabaseParametersSchemaParameterMapping = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + card_id: S.optional(S.NullOr(S.Number)), + dashcard: S.optional(S.Unknown), + parameter_id: S.String, + target: MetabaseLibSchemaParameterTarget, + }), +).annotate({ + identifier: "MetabaseParametersSchemaParameterMapping", +}) as any as S.Schema; + +export type MetabaseParametersSchemaParameterMappings = + Array; +export const MetabaseParametersSchemaParameterMappings = /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameterMapping, +) as any as S.Schema; + +/** Unsupported action type */ +export type MetabaseActionsSchemaType = "http" | "implicit" | "query"; +export const MetabaseActionsSchemaType = /*@__PURE__*/ S.String; + +export type MetabaseActionsSchemaHttpActionTemplateMethod = + | "GET" + | "POST" + | "PUT" + | "DELETE" + | "PATCH"; +export const MetabaseActionsSchemaHttpActionTemplateMethod = + /*@__PURE__*/ S.String; + +export type MetabaseParametersSchemaParameterFilteringParametersList = + Array; +export const MetabaseParametersSchemaParameterFilteringParametersList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type MetabaseParametersSchemaParameterMappingsCase0List = + Array; +export const MetabaseParametersSchemaParameterMappingsCase0List = + /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameterMapping, + ) as any as S.Schema; + +export type MetabaseParametersSchemaParameterMappingsCase1List = + Array; +export const MetabaseParametersSchemaParameterMappingsCase1List = + /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameterMapping, + ) as any as S.Schema; + +export type MetabaseParametersSchemaParameterMappings2 = + | MetabaseParametersSchemaParameterMappingsCase0List + | MetabaseParametersSchemaParameterMappingsCase1List; +export const MetabaseParametersSchemaParameterMappings2 = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Schema for valid source_options within a Parameter */ +export interface MetabaseParametersSchemaValuesSourceConfig { + card_id?: number; + label_field?: unknown; + value_field?: unknown; + values?: unknown; +} +export const MetabaseParametersSchemaValuesSourceConfig = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.optional(S.Number), + label_field: S.optional(S.Unknown), + value_field: S.optional(S.Unknown), + values: S.optional(S.Unknown), + }), + ).annotate({ + identifier: "MetabaseParametersSchemaValuesSourceConfig", + }) as any as S.Schema; + +export type MetabaseLibSchemaParameterParameterValueCase1List = Array; +export const MetabaseLibSchemaParameterParameterValueCase1List = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export type MetabaseLibSchemaParameterParameterValue = + | unknown + | MetabaseLibSchemaParameterParameterValueCase1List; +export const MetabaseLibSchemaParameterParameterValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseParametersSchemaValuesQueryType = + | "none" + | "list" + | "search"; +export const MetabaseParametersSchemaValuesQueryType = /*@__PURE__*/ S.String; + +/** Valid parameter :type */ +export type MetabaseLibSchemaParameterType = + | "number" + | "text" + | "date" + | "boolean" + | "date/single" + | "id" + | "category" + | "location/city" + | "location/state" + | "location/zip_code" + | "location/country" + | "date/range" + | "date/month-year" + | "date/quarter-year" + | "date/relative" + | "date/all-options" + | "temporal-unit" + | "number/!=" + | "number/<=" + | "number/=" + | "number/>=" + | "number/between" + | "string/!=" + | "string/=" + | "string/contains" + | "string/does-not-contain" + | "string/ends-with" + | "string/starts-with" + | "boolean/="; +export const MetabaseLibSchemaParameterType = /*@__PURE__*/ S.String; + +export type MetabaseLibSchemaTemporalBucketingUnit = + | "day" + | "day-of-month" + | "day-of-week" + | "day-of-year" + | "default" + | "hour" + | "hour-of-day" + | "millisecond" + | "minute" + | "minute-of-hour" + | "month" + | "month-of-year" + | "quarter" + | "quarter-of-year" + | "second" + | "second-of-minute" + | "week" + | "week-of-year" + | "year" + | "year-of-era"; +export const MetabaseLibSchemaTemporalBucketingUnit = /*@__PURE__*/ S.String; + +export type MetabaseParametersSchemaParameterTemporalUnitsList = Array< + MetabaseLibSchemaTemporalBucketingUnit | (string & {}) +>; +export const MetabaseParametersSchemaParameterTemporalUnitsList = + /*@__PURE__*/ S.Array( + MetabaseLibSchemaTemporalBucketingUnit, + ) as any as S.Schema; + +export type MetabaseParametersSchemaValuesSourceType = "static-list" | "card"; +export const MetabaseParametersSchemaValuesSourceType = /*@__PURE__*/ S.String; + +/** Options the frontend attaches to a parameter value. */ +export interface MetabaseLibSchemaParameterParameterOptions { + case_sensitive?: boolean; + include_current?: boolean; +} +export const MetabaseLibSchemaParameterParameterOptions = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + case_sensitive: S.optional(S.Boolean.pipe(T.Body("case-sensitive"))), + include_current: S.optional(S.Boolean.pipe(T.Body("include-current"))), + }), + ).annotate({ + identifier: "MetabaseLibSchemaParameterParameterOptions", + }) as any as S.Schema; + +/** parameter must be a map with :id and :type keys */ +export interface MetabaseParametersSchemaParameter { + filteringParameters?: MetabaseParametersSchemaParameterFilteringParametersList | null; + mappings?: MetabaseParametersSchemaParameterMappings2 | null; + sectionId?: string; + values_source_config?: MetabaseParametersSchemaValuesSourceConfig | null; + display_name?: string | null; + id: string; + name?: string; + slug?: string; + value?: MetabaseLibSchemaParameterParameterValue; + required?: boolean | null; + values_query_type?: + | MetabaseParametersSchemaValuesQueryType + | (string & {}) + | null; + type: MetabaseLibSchemaParameterType | (string & {}); + temporal_units?: MetabaseParametersSchemaParameterTemporalUnitsList | null; + target?: MetabaseLibSchemaParameterTarget; + values_source_type?: + | MetabaseParametersSchemaValuesSourceType + | (string & {}) + | null; + options?: MetabaseLibSchemaParameterParameterOptions | null; + default?: MetabaseLibSchemaParameterParameterValue; + isMultiSelect?: boolean | null; +} +export const MetabaseParametersSchemaParameter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + filteringParameters: S.optional( + S.NullOr(MetabaseParametersSchemaParameterFilteringParametersList), + ), + mappings: S.optional(S.NullOr(MetabaseParametersSchemaParameterMappings2)), + sectionId: S.optional(S.String), + values_source_config: S.optional( + S.NullOr(MetabaseParametersSchemaValuesSourceConfig), + ), + display_name: S.optional(S.NullOr(S.String).pipe(T.Body("display-name"))), + id: S.String, + name: S.optional(S.String), + slug: S.optional(S.String), + value: S.optional(MetabaseLibSchemaParameterParameterValue), + required: S.optional(S.NullOr(S.Boolean)), + values_query_type: S.optional( + S.NullOr(MetabaseParametersSchemaValuesQueryType), + ), + type: MetabaseLibSchemaParameterType, + temporal_units: S.optional( + S.NullOr(MetabaseParametersSchemaParameterTemporalUnitsList), + ), + target: S.optional(MetabaseLibSchemaParameterTarget), + values_source_type: S.optional( + S.NullOr(MetabaseParametersSchemaValuesSourceType), + ), + options: S.optional(S.NullOr(MetabaseLibSchemaParameterParameterOptions)), + default: S.optional(MetabaseLibSchemaParameterParameterValue), + isMultiSelect: S.optional(S.NullOr(S.Boolean)), + }), +).annotate({ + identifier: "MetabaseParametersSchemaParameter", +}) as any as S.Schema; + +export type MetabaseParametersSchemaParameters = + Array; +export const MetabaseParametersSchemaParameters = /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameter, +) as any as S.Schema; + +export interface MetabaseActionsSchemaHttpActionTemplate { + body?: string | null; + headers?: string | null; + method: MetabaseActionsSchemaHttpActionTemplateMethod | (string & {}); + parameters?: MetabaseParametersSchemaParameters | null; + url: string; +} +export const MetabaseActionsSchemaHttpActionTemplate = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + body: S.optional(S.NullOr(S.String)), + headers: S.optional(S.NullOr(S.String)), + method: MetabaseActionsSchemaHttpActionTemplateMethod, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + url: S.String, + }), +).annotate({ + identifier: "MetabaseActionsSchemaHttpActionTemplate", +}) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForInsertCase0 { + visualization_settings?: unknown | null; + response_handle?: string | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + name: string; + archived?: boolean; + type: MetabaseActionsSchemaType | (string & {}); + template?: MetabaseActionsSchemaHttpActionTemplate | null; + error_handle?: string | null; + model_id: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForInsertCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + response_handle: S.optional(S.NullOr(S.String)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + name: S.String, + archived: S.optional(S.Boolean), + type: MetabaseActionsSchemaType, + template: S.optional(S.NullOr(MetabaseActionsSchemaHttpActionTemplate)), + error_handle: S.optional(S.NullOr(S.String)), + model_id: S.Number, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForInsertCase0", + }) as any as S.Schema; + +/** Unsupported implicit action kind */ +export type MetabaseActionsSchemaImplicitActionKind = + | "row/create" + | "row/update" + | "row/delete" + | "bulk/create" + | "bulk/update" + | "bulk/delete"; +export const MetabaseActionsSchemaImplicitActionKind = /*@__PURE__*/ S.String; + +export interface MetabaseActionsSchemaActionForInsertCase1 { + visualization_settings?: unknown | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + name: string; + archived?: boolean; + kind?: MetabaseActionsSchemaImplicitActionKind | (string & {}) | null; + type: MetabaseActionsSchemaType | (string & {}); + model_id: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForInsertCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + name: S.String, + archived: S.optional(S.Boolean), + kind: S.optional(S.NullOr(MetabaseActionsSchemaImplicitActionKind)), + type: MetabaseActionsSchemaType, + model_id: S.Number, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForInsertCase1", + }) as any as S.Schema; + +export type MetabaseLibSchemaQueryPivotRowsList = Array; +export const MetabaseLibSchemaQueryPivotRowsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type MetabaseLibSchemaActionsRow = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaActionsRow = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Options that tweak the behavior of the query processor. */ +export interface MetabaseLibSchemaSettingsSettings { + /** Whether to include fields with visibility_type :sensitive when fetching query metadata. */ + include_sensitive_fields?: boolean; + /** The timezone the query should be ran in, overriding the default report timezone for the instance. */ + report_timezone?: unknown; +} +export const MetabaseLibSchemaSettingsSettings = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include_sensitive_fields: S.optional( + S.Boolean.pipe(T.Body("include-sensitive-fields")), + ), + report_timezone: S.optional(S.Unknown.pipe(T.Body("report-timezone"))), + }), +).annotate({ + identifier: "MetabaseLibSchemaSettingsSettings", +}) as any as S.Schema; + +/** Additional constraints added to a query limiting the maximum number of rows that can be returned. Mostly useful because native queries don't support the MBQL `:limit` clause. For MBQL queries, if `:limit` is set, it will override these values. */ +export interface MetabaseLibSchemaConstraintsConstraints { + /** Maximum number of results to allow for a query with aggregations. If `max-results-bare-rows` is unset, this applies to all queries */ + max_results?: number; + /** Maximum number of results to allow for a query with no aggregations. If set, this should be LOWER than `:max-results`. */ + max_results_bare_rows?: number; +} +export const MetabaseLibSchemaConstraintsConstraints = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + max_results: S.optional(S.Number.pipe(T.Body("max-results"))), + max_results_bare_rows: S.optional( + S.Number.pipe(T.Body("max-results-bare-rows")), + ), + }), +).annotate({ + identifier: "MetabaseLibSchemaConstraintsConstraints", +}) as any as S.Schema; + +export type MetabaseLibSchemaInfoInfoPivotOriginalQueryMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaInfoInfoPivotOriginalQueryMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export type MetabaseLibSchemaMetadataColumnVisibilityType = + | "retired" + | "sensitive" + | "normal" + | "hidden" + | "details-only"; +export const MetabaseLibSchemaMetadataColumnVisibilityType = + /*@__PURE__*/ S.String; + +/** External remapping (Dimension) for a column. From the [[metabase.warehouse-schema.models.dimension]] with `type = external` associated with a `Field` in the application database. See [[metabase.query-processor.middleware.add-remaps]] for what this means. */ +export interface MetabaseLibSchemaMetadataColumnRemappingExternal { + field_id: number; + id: number; + lib_type: unknown; + name: string; +} +export const MetabaseLibSchemaMetadataColumnRemappingExternal = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + field_id: S.Number.pipe(T.Body("field-id")), + id: S.Number, + lib_type: S.Unknown.pipe(T.Body("lib/type")), + name: S.String, + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataColumnRemappingExternal", + }) as any as S.Schema; + +export type MetabaseLibSchemaMetadataColumnSettingsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaMetadataColumnSettingsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export type MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Fingerprint values that Fields of all types should have. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprintGlobal { + distinct_count?: number; + nil_?: number | null; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprintGlobal = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + distinct_count: S.optional(S.Number.pipe(T.Body("distinct-count"))), + nil_: S.optional(S.NullOr(S.Number).pipe(T.Body("nil%"))), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprintGlobal", + }) as any as S.Schema; + +/** Schema for fingerprint information for Fields deriving from `:type/Temporal`. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprintTemporal { + earliest?: string | null; + latest?: string | null; + mode_fraction?: number | null; + top_3_fraction?: number | null; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprintTemporal = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + earliest: S.optional(S.NullOr(S.String)), + latest: S.optional(S.NullOr(S.String)), + mode_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("mode-fraction")), + ), + top_3_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("top-3-fraction")), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprintTemporal", + }) as any as S.Schema; + +/** Schema for fingerprint information for Fields deriving from `:type/Number`. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprintNumber { + mode_fraction?: number | null; + min?: number | null; + q1?: number | null; + max?: number | null; + avg?: number | null; + sd?: number | null; + skewness?: number | null; + q3?: number | null; + top_3_fraction?: number | null; + excess_kurtosis?: number | null; + zero_fraction?: number | null; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprintNumber = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + mode_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("mode-fraction")), + ), + min: S.optional(S.NullOr(S.Number)), + q1: S.optional(S.NullOr(S.Number)), + max: S.optional(S.NullOr(S.Number)), + avg: S.optional(S.NullOr(S.Number)), + sd: S.optional(S.NullOr(S.Number)), + skewness: S.optional(S.NullOr(S.Number)), + q3: S.optional(S.NullOr(S.Number)), + top_3_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("top-3-fraction")), + ), + excess_kurtosis: S.optional( + S.NullOr(S.Number).pipe(T.Body("excess-kurtosis")), + ), + zero_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("zero-fraction")), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprintNumber", + }) as any as S.Schema; + +/** Schema for fingerprint information for Fields deriving from `:type/Text`. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprintText { + average_length?: number | null; + mode_fraction?: number | null; + percent_blank?: number | null; + percent_email?: number | null; + percent_json?: number | null; + percent_state?: number | null; + percent_url?: number | null; + top_3_fraction?: number | null; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprintText = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + average_length: S.optional( + S.NullOr(S.Number).pipe(T.Body("average-length")), + ), + mode_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("mode-fraction")), + ), + percent_blank: S.optional( + S.NullOr(S.Number).pipe(T.Body("percent-blank")), + ), + percent_email: S.optional( + S.NullOr(S.Number).pipe(T.Body("percent-email")), + ), + percent_json: S.optional(S.NullOr(S.Number).pipe(T.Body("percent-json"))), + percent_state: S.optional( + S.NullOr(S.Number).pipe(T.Body("percent-state")), + ), + percent_url: S.optional(S.NullOr(S.Number).pipe(T.Body("percent-url"))), + top_3_fraction: S.optional( + S.NullOr(S.Number).pipe(T.Body("top-3-fraction")), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprintText", + }) as any as S.Schema; + +/** Schema for type-specific fingerprint information. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific { + type_DateTime?: MetabaseLibSchemaMetadataFingerprintFingerprintTemporal; + type_Number?: MetabaseLibSchemaMetadataFingerprintFingerprintNumber; + type_Text?: MetabaseLibSchemaMetadataFingerprintFingerprintText; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + type_DateTime: S.optional( + MetabaseLibSchemaMetadataFingerprintFingerprintTemporal.pipe( + T.Body("type/DateTime"), + ), + ), + type_Number: S.optional( + MetabaseLibSchemaMetadataFingerprintFingerprintNumber.pipe( + T.Body("type/Number"), + ), + ), + type_Text: S.optional( + MetabaseLibSchemaMetadataFingerprintFingerprintText.pipe( + T.Body("type/Text"), + ), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific", + }) as any as S.Schema; + +/** Schema for a Field 'fingerprint' generated as part of the analysis stage. Used to power the 'classification' sub-stage of analysis. Stored as the `fingerprint` column of Field. */ +export interface MetabaseLibSchemaMetadataFingerprintFingerprint { + experimental?: MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap; + global?: MetabaseLibSchemaMetadataFingerprintFingerprintGlobal; + type?: MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific; +} +export const MetabaseLibSchemaMetadataFingerprintFingerprint = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + experimental: S.optional( + MetabaseLibSchemaMetadataFingerprintFingerprintExperimentalMap, + ), + global: S.optional(MetabaseLibSchemaMetadataFingerprintFingerprintGlobal), + type: S.optional( + MetabaseLibSchemaMetadataFingerprintFingerprintTypeSpecific, + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataFingerprintFingerprint", + }) as any as S.Schema; + +export type MetabaseLibSchemaMetadataColumnNfcPathList = Array; +export const MetabaseLibSchemaMetadataColumnNfcPathList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type MetabaseLibSchemaMetadataColumnHasFieldValues = + | "auto-list" + | "list" + | "none" + | "search"; +export const MetabaseLibSchemaMetadataColumnHasFieldValues = + /*@__PURE__*/ S.String; + +export type MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList = + Array; +export const MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export type MetabaseLibSchemaMetadataColumnRemappingInternalValuesList = + Array; +export const MetabaseLibSchemaMetadataColumnRemappingInternalValuesList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +/** Internal remapping (FieldValues) for a column. From [[metabase.warehouse-schema.models.dimension]] with `type = internal` and the [[metabase.warehouse-schema.models.field-values]] associated with a `Field` in the application database. See [[metabase.query-processor.middleware.add-remaps]] for what this means. */ +export interface MetabaseLibSchemaMetadataColumnRemappingInternal { + human_readable_values: MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList; + id: number; + lib_type: unknown; + name: string; + values: MetabaseLibSchemaMetadataColumnRemappingInternalValuesList; +} +export const MetabaseLibSchemaMetadataColumnRemappingInternal = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + human_readable_values: + MetabaseLibSchemaMetadataColumnRemappingInternalHumanReadableValuesList.pipe( + T.Body("human-readable-values"), + ), + id: S.Number, + lib_type: S.Unknown.pipe(T.Body("lib/type")), + name: S.String, + values: MetabaseLibSchemaMetadataColumnRemappingInternalValuesList, + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataColumnRemappingInternal", + }) as any as S.Schema; + +export interface MetabaseLibSchemaBinningBinningCase0 { + strategy: unknown; +} +export const MetabaseLibSchemaBinningBinningCase0 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + strategy: S.Unknown, + }), +).annotate({ + identifier: "MetabaseLibSchemaBinningBinningCase0", +}) as any as S.Schema; + +export interface MetabaseLibSchemaBinningBinningCase1 { + bin_width: unknown; + strategy: unknown; +} +export const MetabaseLibSchemaBinningBinningCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + bin_width: S.Unknown.pipe(T.Body("bin-width")), + strategy: S.Unknown, + }), +).annotate({ + identifier: "MetabaseLibSchemaBinningBinningCase1", +}) as any as S.Schema; + +export interface MetabaseLibSchemaBinningBinningCase2 { + num_bins: number; + strategy: unknown; +} +export const MetabaseLibSchemaBinningBinningCase2 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + num_bins: S.Number.pipe(T.Body("num-bins")), + strategy: S.Unknown, + }), +).annotate({ + identifier: "MetabaseLibSchemaBinningBinningCase2", +}) as any as S.Schema; + +/** Schema for `:binning` options passed to a `:field` clause. */ +export type MetabaseLibSchemaBinningBinning = + | MetabaseLibSchemaBinningBinningCase0 + | MetabaseLibSchemaBinningBinningCase1 + | MetabaseLibSchemaBinningBinningCase2; +export const MetabaseLibSchemaBinningBinning = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Possible values for `column.source` -- this is added by [[metabase.lib.metadata.result-metadata]] for historical reasons (it is used in a few places in the FE). DO NOT use this in the backend for any purpose, use `:lib/source` instead. */ +export type MetabaseLibSchemaMetadataColumnLegacySource = + | "aggregation" + | "fields" + | "breakout" + | "native"; +export const MetabaseLibSchemaMetadataColumnLegacySource = + /*@__PURE__*/ S.String; + +/** `:lib/source` -- where a column came from with respect to the current stage. Traditionally, `:lib/source` meant something slightly different -- it denoted what part of the current stage a column came from, and thus included two additional options -- `:source/fields`, for columns used by `:fields`, and `:source/breakouts`, for columns used in `:breakout`. This was not really useful information and made `:lib/source` itself useless for determining if a column was 'inherited' or not (i.e., whether it came from a previous stage, source card, or a join, and should get field name refs instead of field ID refs -- see [[metabase.lib.field.util/inherited-column?]]). */ +export type MetabaseLibSchemaMetadataColumnSource = + | "source/card" + | "source/native" + | "source/previous-stage" + | "source/table-defaults" + | "source/aggregations" + | "source/joins" + | "source/expressions" + | "source/implicitly-joinable"; +export const MetabaseLibSchemaMetadataColumnSource = /*@__PURE__*/ S.String; + +/** Malli schema for a valid map of column metadata, which can mean one of two things: 1. Metadata about a particular Field in the application database. This will always have an `:id` 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field` and thus will not have an `:id`. Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want to differentiate between the two versions. */ +export interface MetabaseLibSchemaMetadataColumn { + visibility_type?: + | MetabaseLibSchemaMetadataColumnVisibilityType + | (string & {}) + | null; + fk_join_alias?: string | null; + metabase_lib_metadata_result_metadata_field_ref?: unknown | null; + lib_external_remap?: MetabaseLibSchemaMetadataColumnRemappingExternal | null; + inherited_temporal_unit?: + | MetabaseLibSchemaTemporalBucketingUnit + | (string & {}) + | null; + lib_source_column_alias?: string | null; + database_type?: string | null; + lib_temporal_unit?: + | MetabaseLibSchemaTemporalBucketingUnit + | (string & {}) + | null; + lib_type?: unknown; + settings?: MetabaseLibSchemaMetadataColumnSettingsMap | null; + fingerprint?: MetabaseLibSchemaMetadataFingerprintFingerprint | null; + display_name?: string | null; + lib_source_uuid?: string | null; + qp_implicit_field_?: boolean | null; + lib_ref_name?: string | null; + id?: number | null; + effective_type?: string | null; + lib_deduplicated_name?: string | null; + base_type?: string; + lib_transformation_added_base_type?: boolean | null; + lib_original_expression_name?: string | null; + fk_field_name?: string | null; + lib_from_model_?: boolean | null; + name: string; + lib_card_id?: number | null; + lib_expression_name?: string | null; + lib_breakout_?: boolean | null; + lib_original_effective_type?: string | null; + lib_join_alias?: string | null; + nfc_path?: MetabaseLibSchemaMetadataColumnNfcPathList | null; + qp_native_sandbox_column_propagate_coercion_?: boolean; + has_field_values?: + | MetabaseLibSchemaMetadataColumnHasFieldValues + | (string & {}) + | null; + lib_internal_remap?: MetabaseLibSchemaMetadataColumnRemappingInternal | null; + selected_?: boolean; + fk_field_id?: number | null; + lib_original_binning?: MetabaseLibSchemaBinningBinning | null; + lib_original_join_alias?: string | null; + lib_original_display_name?: string | null; + qp_native_sandbox_column_force_coercion_strategy?: string; + lib_binning?: MetabaseLibSchemaBinningBinning | null; + metabase_lib_metadata_result_metadata_source?: + | MetabaseLibSchemaMetadataColumnLegacySource + | (string & {}) + | null; + lib_source?: MetabaseLibSchemaMetadataColumnSource | (string & {}) | null; + active?: boolean; + lib_ref_display_name?: string | null; + lib_original_name?: string | null; + semantic_type?: string | null; + fk_target_field_id?: number | null; + lib_simple_display_name?: string | null; + lib_desired_column_alias?: string | null; +} +export const MetabaseLibSchemaMetadataColumn = /*@__PURE__*/ S.suspend(() => + S.Struct({ + visibility_type: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnVisibilityType).pipe( + T.Body("visibility-type"), + ), + ), + fk_join_alias: S.optional(S.NullOr(S.String).pipe(T.Body("fk-join-alias"))), + metabase_lib_metadata_result_metadata_field_ref: S.optional( + S.NullOr(S.Unknown).pipe( + T.Body("metabase.lib.metadata.result-metadata/field-ref"), + ), + ), + lib_external_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingExternal).pipe( + T.Body("lib/external-remap"), + ), + ), + inherited_temporal_unit: S.optional( + S.NullOr(MetabaseLibSchemaTemporalBucketingUnit).pipe( + T.Body("inherited-temporal-unit"), + ), + ), + lib_source_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-column-alias")), + ), + database_type: S.optional(S.NullOr(S.String).pipe(T.Body("database-type"))), + lib_temporal_unit: S.optional( + S.NullOr(MetabaseLibSchemaTemporalBucketingUnit).pipe( + T.Body("lib/temporal-unit"), + ), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional(S.NullOr(MetabaseLibSchemaMetadataColumnSettingsMap)), + fingerprint: S.optional( + S.NullOr(MetabaseLibSchemaMetadataFingerprintFingerprint), + ), + display_name: S.optional(S.NullOr(S.String).pipe(T.Body("display-name"))), + lib_source_uuid: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-uuid")), + ), + qp_implicit_field_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("qp/implicit-field?")), + ), + lib_ref_name: S.optional(S.NullOr(S.String).pipe(T.Body("lib/ref-name"))), + id: S.optional(S.NullOr(S.Number)), + effective_type: S.optional( + S.NullOr(S.String).pipe(T.Body("effective-type")), + ), + lib_deduplicated_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/deduplicated-name")), + ), + base_type: S.optional(S.String.pipe(T.Body("base-type"))), + lib_transformation_added_base_type: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/transformation-added-base-type")), + ), + lib_original_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-expression-name")), + ), + fk_field_name: S.optional(S.NullOr(S.String).pipe(T.Body("fk-field-name"))), + lib_from_model_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/from-model?")), + ), + name: S.String, + lib_card_id: S.optional(S.NullOr(S.Number).pipe(T.Body("lib/card-id"))), + lib_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/expression-name")), + ), + lib_breakout_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/breakout?")), + ), + lib_original_effective_type: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-effective-type")), + ), + lib_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/join-alias")), + ), + nfc_path: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnNfcPathList).pipe( + T.Body("nfc-path"), + ), + ), + qp_native_sandbox_column_propagate_coercion_: S.optional( + S.Boolean.pipe(T.Body("qp/native-sandbox-column.propagate-coercion?")), + ), + has_field_values: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnHasFieldValues).pipe( + T.Body("has-field-values"), + ), + ), + lib_internal_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingInternal).pipe( + T.Body("lib/internal-remap"), + ), + ), + selected_: S.optional(S.Boolean.pipe(T.Body("selected?"))), + fk_field_id: S.optional(S.NullOr(S.Number).pipe(T.Body("fk-field-id"))), + lib_original_binning: S.optional( + S.NullOr(MetabaseLibSchemaBinningBinning).pipe( + T.Body("lib/original-binning"), + ), + ), + lib_original_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-join-alias")), + ), + lib_original_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-display-name")), + ), + qp_native_sandbox_column_force_coercion_strategy: S.optional( + S.String.pipe(T.Body("qp/native-sandbox-column.force-coercion-strategy")), + ), + lib_binning: S.optional( + S.NullOr(MetabaseLibSchemaBinningBinning).pipe(T.Body("lib/binning")), + ), + metabase_lib_metadata_result_metadata_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnLegacySource).pipe( + T.Body("metabase.lib.metadata.result-metadata/source"), + ), + ), + lib_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnSource).pipe( + T.Body("lib/source"), + ), + ), + active: S.optional(S.Boolean), + lib_ref_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/ref-display-name")), + ), + lib_original_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-name")), + ), + semantic_type: S.optional(S.NullOr(S.String).pipe(T.Body("semantic-type"))), + fk_target_field_id: S.optional( + S.NullOr(S.Number).pipe(T.Body("fk-target-field-id")), + ), + lib_simple_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/simple-display-name")), + ), + lib_desired_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/desired-column-alias")), + ), + }), +).annotate({ + identifier: "MetabaseLibSchemaMetadataColumn", +}) as any as S.Schema; + +export type MetabaseLibSchemaInfoInfoPivotResultMetadataCase1List = + Array; +export const MetabaseLibSchemaInfoInfoPivotResultMetadataCase1List = + /*@__PURE__*/ S.Array( + MetabaseLibSchemaMetadataColumn, + ) as any as S.Schema; + +export type MetabaseLibSchemaInfoInfoPivotResultMetadata = + | unknown + | MetabaseLibSchemaInfoInfoPivotResultMetadataCase1List; +export const MetabaseLibSchemaInfoInfoPivotResultMetadata = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Schema for `info.context`; used for informational purposes to record how a query was executed. */ +export type MetabaseLibSchemaInfoContext = + | "action" + | "ad-hoc" + | "agent" + | "cache-refresh" + | "collection" + | "map-tiles" + | "metric" + | "pulse" + | "dashboard-subscription" + | "dashboard" + | "question" + | "csv-download" + | "xlsx-download" + | "json-download" + | "public-dashboard" + | "public-question" + | "public-csv-download" + | "public-xlsx-download" + | "public-json-download" + | "embedded-dashboard" + | "embedded-question" + | "embedded-csv-download" + | "embedded-xlsx-download" + | "embedded-json-download" + | "table-grid" + | "table-rows-sample" + | "transform-inspector" + | "slackbot"; +export const MetabaseLibSchemaInfoContext = /*@__PURE__*/ S.String; + +export type MetabaseLibSchemaInfoInfoLensParamsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaInfoInfoLensParamsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export type MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export type MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList = + Array; +export const MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +/** Malli schema for a valid map of column metadata, which can mean one of two things: 1. Metadata about a particular Field in the application database. This will always have an `:id` 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field` and thus will not have an `:id`. Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want to differentiate between the two versions. */ +export interface MetabaseLibSchemaMetadataLibOrLegacyColumnCase0 { + visibility_type?: + | MetabaseLibSchemaMetadataColumnVisibilityType + | (string & {}) + | null; + fk_join_alias?: string | null; + metabase_lib_metadata_result_metadata_field_ref?: unknown | null; + lib_external_remap?: MetabaseLibSchemaMetadataColumnRemappingExternal | null; + inherited_temporal_unit?: + | MetabaseLibSchemaTemporalBucketingUnit + | (string & {}) + | null; + lib_source_column_alias?: string | null; + database_type?: string | null; + lib_temporal_unit?: + | MetabaseLibSchemaTemporalBucketingUnit + | (string & {}) + | null; + lib_type?: unknown; + settings?: MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap | null; + fingerprint?: MetabaseLibSchemaMetadataFingerprintFingerprint | null; + display_name?: string | null; + lib_source_uuid?: string | null; + qp_implicit_field_?: boolean | null; + lib_ref_name?: string | null; + id?: number | null; + effective_type?: string | null; + lib_deduplicated_name?: string | null; + base_type?: string; + lib_transformation_added_base_type?: boolean | null; + lib_original_expression_name?: string | null; + fk_field_name?: string | null; + lib_from_model_?: boolean | null; + name: string; + lib_card_id?: number | null; + lib_expression_name?: string | null; + lib_breakout_?: boolean | null; + lib_original_effective_type?: string | null; + lib_join_alias?: string | null; + nfc_path?: MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList | null; + qp_native_sandbox_column_propagate_coercion_?: boolean; + has_field_values?: + | MetabaseLibSchemaMetadataColumnHasFieldValues + | (string & {}) + | null; + lib_internal_remap?: MetabaseLibSchemaMetadataColumnRemappingInternal | null; + selected_?: boolean; + fk_field_id?: number | null; + lib_original_binning?: MetabaseLibSchemaBinningBinning | null; + lib_original_join_alias?: string | null; + lib_original_display_name?: string | null; + qp_native_sandbox_column_force_coercion_strategy?: string; + lib_binning?: MetabaseLibSchemaBinningBinning | null; + metabase_lib_metadata_result_metadata_source?: + | MetabaseLibSchemaMetadataColumnLegacySource + | (string & {}) + | null; + lib_source?: MetabaseLibSchemaMetadataColumnSource | (string & {}) | null; + active?: boolean; + lib_ref_display_name?: string | null; + lib_original_name?: string | null; + semantic_type?: string | null; + fk_target_field_id?: number | null; + lib_simple_display_name?: string | null; + lib_desired_column_alias?: string | null; +} +export const MetabaseLibSchemaMetadataLibOrLegacyColumnCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visibility_type: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnVisibilityType).pipe( + T.Body("visibility-type"), + ), + ), + fk_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("fk-join-alias")), + ), + metabase_lib_metadata_result_metadata_field_ref: S.optional( + S.NullOr(S.Unknown).pipe( + T.Body("metabase.lib.metadata.result-metadata/field-ref"), + ), + ), + lib_external_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingExternal).pipe( + T.Body("lib/external-remap"), + ), + ), + inherited_temporal_unit: S.optional( + S.NullOr(MetabaseLibSchemaTemporalBucketingUnit).pipe( + T.Body("inherited-temporal-unit"), + ), + ), + lib_source_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-column-alias")), + ), + database_type: S.optional( + S.NullOr(S.String).pipe(T.Body("database-type")), + ), + lib_temporal_unit: S.optional( + S.NullOr(MetabaseLibSchemaTemporalBucketingUnit).pipe( + T.Body("lib/temporal-unit"), + ), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional( + S.NullOr(MetabaseLibSchemaMetadataLibOrLegacyColumnCase0SettingsMap), + ), + fingerprint: S.optional( + S.NullOr(MetabaseLibSchemaMetadataFingerprintFingerprint), + ), + display_name: S.optional(S.NullOr(S.String).pipe(T.Body("display-name"))), + lib_source_uuid: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-uuid")), + ), + qp_implicit_field_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("qp/implicit-field?")), + ), + lib_ref_name: S.optional(S.NullOr(S.String).pipe(T.Body("lib/ref-name"))), + id: S.optional(S.NullOr(S.Number)), + effective_type: S.optional( + S.NullOr(S.String).pipe(T.Body("effective-type")), + ), + lib_deduplicated_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/deduplicated-name")), + ), + base_type: S.optional(S.String.pipe(T.Body("base-type"))), + lib_transformation_added_base_type: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/transformation-added-base-type")), + ), + lib_original_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-expression-name")), + ), + fk_field_name: S.optional( + S.NullOr(S.String).pipe(T.Body("fk-field-name")), + ), + lib_from_model_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/from-model?")), + ), + name: S.String, + lib_card_id: S.optional(S.NullOr(S.Number).pipe(T.Body("lib/card-id"))), + lib_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/expression-name")), + ), + lib_breakout_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/breakout?")), + ), + lib_original_effective_type: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-effective-type")), + ), + lib_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/join-alias")), + ), + nfc_path: S.optional( + S.NullOr( + MetabaseLibSchemaMetadataLibOrLegacyColumnCase0NfcPathList, + ).pipe(T.Body("nfc-path")), + ), + qp_native_sandbox_column_propagate_coercion_: S.optional( + S.Boolean.pipe(T.Body("qp/native-sandbox-column.propagate-coercion?")), + ), + has_field_values: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnHasFieldValues).pipe( + T.Body("has-field-values"), + ), + ), + lib_internal_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingInternal).pipe( + T.Body("lib/internal-remap"), + ), + ), + selected_: S.optional(S.Boolean.pipe(T.Body("selected?"))), + fk_field_id: S.optional(S.NullOr(S.Number).pipe(T.Body("fk-field-id"))), + lib_original_binning: S.optional( + S.NullOr(MetabaseLibSchemaBinningBinning).pipe( + T.Body("lib/original-binning"), + ), + ), + lib_original_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-join-alias")), + ), + lib_original_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-display-name")), + ), + qp_native_sandbox_column_force_coercion_strategy: S.optional( + S.String.pipe( + T.Body("qp/native-sandbox-column.force-coercion-strategy"), + ), + ), + lib_binning: S.optional( + S.NullOr(MetabaseLibSchemaBinningBinning).pipe(T.Body("lib/binning")), + ), + metabase_lib_metadata_result_metadata_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnLegacySource).pipe( + T.Body("metabase.lib.metadata.result-metadata/source"), + ), + ), + lib_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnSource).pipe( + T.Body("lib/source"), + ), + ), + active: S.optional(S.Boolean), + lib_ref_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/ref-display-name")), + ), + lib_original_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-name")), + ), + semantic_type: S.optional( + S.NullOr(S.String).pipe(T.Body("semantic-type")), + ), + fk_target_field_id: S.optional( + S.NullOr(S.Number).pipe(T.Body("fk-target-field-id")), + ), + lib_simple_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/simple-display-name")), + ), + lib_desired_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/desired-column-alias")), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMetadataLibOrLegacyColumnCase0", + }) as any as S.Schema; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit = + | "day" + | "day-of-month" + | "day-of-week" + | "day-of-year" + | "default" + | "hour" + | "hour-of-day" + | "millisecond" + | "minute" + | "minute-of-hour" + | "month" + | "month-of-year" + | "quarter" + | "quarter-of-year" + | "second" + | "second-of-minute" + | "week" + | "week-of-year" + | "year" + | "year-of-era"; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit = + /*@__PURE__*/ S.String; + +/** Schema for a valid value for the `:source-table` clause of an MBQL query. */ +export type MetabaseLegacyMbqlSchemaSourceTable = number | string; +export const MetabaseLegacyMbqlSchemaSourceTable = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseLibSchemaBinningStrategy = + | "bin-width" + | "default" + | "num-bins"; +export const MetabaseLibSchemaBinningStrategy = /*@__PURE__*/ S.String; + +export interface MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo { + bin_width?: unknown; + binning_strategy?: MetabaseLibSchemaBinningStrategy | (string & {}); + num_bins?: number; + strategy: MetabaseLibSchemaBinningStrategy | (string & {}); +} +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + bin_width: S.optional(S.Unknown), + binning_strategy: S.optional(MetabaseLibSchemaBinningStrategy), + num_bins: S.optional(S.Number), + strategy: MetabaseLibSchemaBinningStrategy, + }), + ).annotate({ + identifier: "MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo", + }) as any as S.Schema; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList = + Array; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase0 = + MetabaseLibSchemaBinningBinningCase0; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase0 = + MetabaseLibSchemaBinningBinningCase0; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase1 = + MetabaseLibSchemaBinningBinningCase1; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase1 = + MetabaseLibSchemaBinningBinningCase1; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase2 = + MetabaseLibSchemaBinningBinningCase2; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinningCase2 = + MetabaseLibSchemaBinningBinningCase2; + +/** Schema for `:binning` options passed to a `:field` clause. */ +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning = + | MetabaseLibSchemaBinningBinningCase0 + | MetabaseLibSchemaBinningBinningCase1 + | MetabaseLibSchemaBinningBinningCase2; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase0 = + MetabaseLibSchemaBinningBinningCase0; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase0 = + MetabaseLibSchemaBinningBinningCase0; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase1 = + MetabaseLibSchemaBinningBinningCase1; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase1 = + MetabaseLibSchemaBinningBinningCase1; + +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase2 = + MetabaseLibSchemaBinningBinningCase2; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinningCase2 = + MetabaseLibSchemaBinningBinningCase2; + +/** Schema for `:binning` options passed to a `:field` clause. */ +export type MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning = + | MetabaseLibSchemaBinningBinningCase0 + | MetabaseLibSchemaBinningBinningCase1 + | MetabaseLibSchemaBinningBinningCase2; +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Schema for a single legacy metadata column. This is the pre-Lib equivalent of `:metabase.lib.schema.metadata/column`. */ +export interface MetabaseLegacyMbqlSchemaLegacyColumnMetadata { + metabase_lib_metadata_result_metadata_field_ref?: unknown | null; + field_ref?: unknown | null; + lib_external_remap?: MetabaseLibSchemaMetadataColumnRemappingExternal | null; + lib_source_column_alias?: string | null; + remapped_from?: string | null; + lib_temporal_unit?: + | MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit + | (string & {}) + | null; + lib_type?: unknown; + settings?: unknown | null; + fingerprint?: MetabaseLibSchemaMetadataFingerprintFingerprint | null; + visibility_type?: + | MetabaseLibSchemaMetadataColumnVisibilityType + | (string & {}) + | null; + base_type?: string; + lib_source_uuid?: string | null; + qp_implicit_field_?: boolean | null; + lib_ref_name?: string | null; + id?: number | null; + /** The simply-deduplicated name that was historically used in QP results metadata (originally calculated by the [[metabase.query-processor.middleware.annotate]] middleware, now calculated by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name. */ + lib_deduplicated_name?: string | null; + coercion_strategy?: string | null; + lib_transformation_added_base_type?: boolean | null; + lib_original_expression_name?: string | null; + lib_from_model_?: boolean | null; + position?: number | null; + name: string; + lib_card_id?: number | null; + lib_expression_name?: string | null; + lib_breakout_?: boolean | null; + semantic_type?: string | null; + fk_field_name?: string | null; + lib_original_effective_type?: string | null; + lib_join_alias?: string | null; + table_id?: MetabaseLegacyMbqlSchemaSourceTable | null; + has_field_values?: + | MetabaseLibSchemaMetadataColumnHasFieldValues + | (string & {}) + | null; + display_name: string; + qp_native_sandbox_column_propagate_coercion_?: boolean; + lib_internal_remap?: MetabaseLibSchemaMetadataColumnRemappingInternal | null; + converted_timezone?: unknown | null; + selected_?: boolean; + fk_join_alias?: string | null; + source?: MetabaseLibSchemaMetadataColumnLegacySource | (string & {}) | null; + fk_field_id?: number | null; + remapped_to?: string | null; + binning_info?: MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo | null; + nfc_path?: MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList | null; + lib_original_binning?: MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning | null; + effective_type?: string; + lib_original_join_alias?: string | null; + lib_original_display_name?: string | null; + unit?: MetabaseLibSchemaTemporalBucketingUnit | (string & {}) | null; + qp_native_sandbox_column_force_coercion_strategy?: string; + lib_binning?: MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning | null; + metabase_lib_metadata_result_metadata_source?: + | MetabaseLibSchemaMetadataColumnLegacySource + | (string & {}) + | null; + inherited_temporal_unit?: + | MetabaseLibSchemaTemporalBucketingUnit + | (string & {}) + | null; + lib_source?: MetabaseLibSchemaMetadataColumnSource | (string & {}) | null; + active?: boolean; + lib_ref_display_name?: string | null; + /** The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first usage of the column. Allowed to be blank because some databases like SQL Server allow blank column names. */ + lib_original_name?: string | null; + database_type?: string | null; + description?: string | null; + lib_simple_display_name?: string | null; + fk_target_field_id?: number | null; + lib_desired_column_alias?: string | null; +} +export const MetabaseLegacyMbqlSchemaLegacyColumnMetadata = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + metabase_lib_metadata_result_metadata_field_ref: S.optional( + S.NullOr(S.Unknown).pipe( + T.Body("metabase.lib.metadata.result-metadata/field-ref"), + ), + ), + field_ref: S.optional(S.NullOr(S.Unknown)), + lib_external_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingExternal).pipe( + T.Body("lib/external-remap"), + ), + ), + lib_source_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-column-alias")), + ), + remapped_from: S.optional(S.NullOr(S.String)), + lib_temporal_unit: S.optional( + S.NullOr( + MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibTemporalUnit, + ).pipe(T.Body("lib/temporal-unit")), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional(S.NullOr(S.Unknown)), + fingerprint: S.optional( + S.NullOr(MetabaseLibSchemaMetadataFingerprintFingerprint), + ), + visibility_type: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnVisibilityType), + ), + base_type: S.optional(S.String), + lib_source_uuid: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/source-uuid")), + ), + qp_implicit_field_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("qp/implicit-field?")), + ), + lib_ref_name: S.optional(S.NullOr(S.String).pipe(T.Body("lib/ref-name"))), + id: S.optional(S.NullOr(S.Number)), + lib_deduplicated_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/deduplicated-name")), + ), + coercion_strategy: S.optional(S.NullOr(S.String)), + lib_transformation_added_base_type: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/transformation-added-base-type")), + ), + lib_original_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-expression-name")), + ), + lib_from_model_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/from-model?")), + ), + position: S.optional(S.NullOr(S.Number)), + name: S.String, + lib_card_id: S.optional(S.NullOr(S.Number).pipe(T.Body("lib/card-id"))), + lib_expression_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/expression-name")), + ), + lib_breakout_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("lib/breakout?")), + ), + semantic_type: S.optional(S.NullOr(S.String)), + fk_field_name: S.optional(S.NullOr(S.String)), + lib_original_effective_type: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-effective-type")), + ), + lib_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/join-alias")), + ), + table_id: S.optional(S.NullOr(MetabaseLegacyMbqlSchemaSourceTable)), + has_field_values: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnHasFieldValues), + ), + display_name: S.String, + qp_native_sandbox_column_propagate_coercion_: S.optional( + S.Boolean.pipe(T.Body("qp/native-sandbox-column.propagate-coercion?")), + ), + lib_internal_remap: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnRemappingInternal).pipe( + T.Body("lib/internal-remap"), + ), + ), + converted_timezone: S.optional(S.NullOr(S.Unknown)), + selected_: S.optional(S.Boolean.pipe(T.Body("selected?"))), + fk_join_alias: S.optional(S.NullOr(S.String)), + source: S.optional(S.NullOr(MetabaseLibSchemaMetadataColumnLegacySource)), + fk_field_id: S.optional(S.NullOr(S.Number)), + remapped_to: S.optional(S.NullOr(S.String)), + binning_info: S.optional( + S.NullOr(MetabaseLegacyMbqlSchemaLegacyColumnMetadataBinningInfo), + ), + nfc_path: S.optional( + S.NullOr(MetabaseLegacyMbqlSchemaLegacyColumnMetadataNfcPathList), + ), + lib_original_binning: S.optional( + S.NullOr( + MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibOriginalBinning, + ).pipe(T.Body("lib/original-binning")), + ), + effective_type: S.optional(S.String), + lib_original_join_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-join-alias")), + ), + lib_original_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-display-name")), + ), + unit: S.optional(S.NullOr(MetabaseLibSchemaTemporalBucketingUnit)), + qp_native_sandbox_column_force_coercion_strategy: S.optional( + S.String.pipe( + T.Body("qp/native-sandbox-column.force-coercion-strategy"), + ), + ), + lib_binning: S.optional( + S.NullOr(MetabaseLegacyMbqlSchemaLegacyColumnMetadataLibBinning).pipe( + T.Body("lib/binning"), + ), + ), + metabase_lib_metadata_result_metadata_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnLegacySource).pipe( + T.Body("metabase.lib.metadata.result-metadata/source"), + ), + ), + inherited_temporal_unit: S.optional( + S.NullOr(MetabaseLibSchemaTemporalBucketingUnit), + ), + lib_source: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnSource).pipe( + T.Body("lib/source"), + ), + ), + active: S.optional(S.Boolean), + lib_ref_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/ref-display-name")), + ), + lib_original_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/original-name")), + ), + database_type: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + lib_simple_display_name: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/simple-display-name")), + ), + fk_target_field_id: S.optional(S.NullOr(S.Number)), + lib_desired_column_alias: S.optional( + S.NullOr(S.String).pipe(T.Body("lib/desired-column-alias")), + ), + }), + ).annotate({ + identifier: "MetabaseLegacyMbqlSchemaLegacyColumnMetadata", + }) as any as S.Schema; + +/** Schema for the maps in card `:result-metadata` and similar. These can be either `:metabase.lib.schema.metadata/result-metadata` (i.e., kebab-cased) maps, or map snake_cased as returned by QP metadata, but they should NOT be a mixture of both -- if we mixed them somehow there is a bug in our code. */ +export type MetabaseLibSchemaMetadataLibOrLegacyColumn = + | MetabaseLibSchemaMetadataLibOrLegacyColumnCase0 + | MetabaseLegacyMbqlSchemaLegacyColumnMetadata; +export const MetabaseLibSchemaMetadataLibOrLegacyColumn = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseLibSchemaInfoInfoMetadataModelMetadataList = + Array; +export const MetabaseLibSchemaInfoInfoMetadataModelMetadataList = + /*@__PURE__*/ S.Array( + MetabaseLibSchemaMetadataLibOrLegacyColumn, + ) as any as S.Schema; + +/** Schema for query `:info` dictionary, which is used for informational purposes to record information about how a query was executed in QueryExecution and other places. It is considered bad form for middleware to change its behavior based on this information, don't do it! TODO - this schema is somewhat misleading because if you use a function like [[metabase.query-processor/userland-query]] some of these keys (e.g. `:context`) are in fact required */ +export interface MetabaseLibSchemaInfoInfo { + query_hash?: string | null; + action_id?: number | null; + lens_id?: string | null; + pivot_original_query?: MetabaseLibSchemaInfoInfoPivotOriginalQueryMap | null; + executed_by?: number | null; + card_id?: number | null; + pivot_result_metadata?: MetabaseLibSchemaInfoInfoPivotResultMetadata | null; + transform_id?: number | null; + context?: MetabaseLibSchemaInfoContext | (string & {}) | null; + dashboard_id?: number | null; + lens_params?: MetabaseLibSchemaInfoInfoLensParamsMap | null; + metadata_model_metadata?: MetabaseLibSchemaInfoInfoMetadataModelMetadataList | null; + pulse_id?: number | null; + card_name?: string | null; +} +export const MetabaseLibSchemaInfoInfo = /*@__PURE__*/ S.suspend(() => + S.Struct({ + query_hash: S.optional(S.NullOr(S.String).pipe(T.Body("query-hash"))), + action_id: S.optional(S.NullOr(S.Number).pipe(T.Body("action-id"))), + lens_id: S.optional(S.NullOr(S.String).pipe(T.Body("lens-id"))), + pivot_original_query: S.optional( + S.NullOr(MetabaseLibSchemaInfoInfoPivotOriginalQueryMap).pipe( + T.Body("pivot/original-query"), + ), + ), + executed_by: S.optional(S.NullOr(S.Number).pipe(T.Body("executed-by"))), + card_id: S.optional(S.NullOr(S.Number).pipe(T.Body("card-id"))), + pivot_result_metadata: S.optional( + S.NullOr(MetabaseLibSchemaInfoInfoPivotResultMetadata).pipe( + T.Body("pivot/result-metadata"), + ), + ), + transform_id: S.optional(S.NullOr(S.Number).pipe(T.Body("transform-id"))), + context: S.optional(S.NullOr(MetabaseLibSchemaInfoContext)), + dashboard_id: S.optional(S.NullOr(S.Number).pipe(T.Body("dashboard-id"))), + lens_params: S.optional( + S.NullOr(MetabaseLibSchemaInfoInfoLensParamsMap).pipe( + T.Body("lens-params"), + ), + ), + metadata_model_metadata: S.optional( + S.NullOr(MetabaseLibSchemaInfoInfoMetadataModelMetadataList).pipe( + T.Body("metadata/model-metadata"), + ), + ), + pulse_id: S.optional(S.NullOr(S.Number).pipe(T.Body("pulse-id"))), + card_name: S.optional(S.NullOr(S.String).pipe(T.Body("card-name"))), + }), +).annotate({ + identifier: "MetabaseLibSchemaInfoInfo", +}) as any as S.Schema; + +/** Additional options that can be used to toggle middleware on or off. */ +export interface MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions { + /** Whether to process a question's visualization settings and include them in the result metadata so that they can incorporated into an export. Used by `metabase.query-processor.middleware.visualization-settings`; default `false`. */ + process_viz_settings_?: boolean | null; + /** Should we skip adding `results_metadata` to query results after running the query? Used by `metabase.query-processor.middleware.results-metadata`; default `false`. (Note: we may change the name of this column in the near future, to `result_metadata`, to fix inconsistencies in how we name things.) */ + skip_results_metadata_?: boolean; + /** Whether to add some default `max-results` and `max-results-bare-rows` constraints. By default, none are added, although the functions that ultimately power most API endpoints tend to set this to `true`. See `add-constraints` middleware for more details. */ + add_default_userland_constraints_?: boolean | null; + /** Disable applying a default limit on the query results. Handled in the `add-default-limit` middleware. If true, this will override the `:max-results` and `:max-results-bare-rows` values in `Constraints`. */ + disable_max_results_?: boolean; + /** Whether to ignore any cached results and re-run the query. Used by the query results cache middleware; default `false`. */ + ignore_cached_results_?: boolean | null; + /** Should we skip converting datetime types to ISO-8601 strings with appropriate timezone when post-processing results? Used by `metabase.query-processor.middleware.format-rows`default `false`. */ + format_rows_?: boolean; + /** Whether to convert bigint values in results to strings so that they can be parsed losslessly by JavaScript clients. Used by `metabase.query-processor.middleware.large-int`; default `false`. */ + js_int_to_string_?: boolean | null; + /** Disable the MBQL->native middleware. If you do this, the query will not work at all, so there are no cases where you should set this yourself. This is only used by the `metabase.query-processor.preprocess/preprocess` function to get the fully pre-processed query without attempting to convert it to native. */ + disable_mbql__native_?: boolean; + /** Userland queries are ones ran as a result of an API call, Pulse, or the like. Special handling is done in certain userland-only middleware for such queries -- results are returned in a slightly different format, and QueryExecution entries are normally saved, unless you pass `:no-save` as the option. */ + userland_query_?: boolean | null; +} +export const MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + process_viz_settings_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("process-viz-settings?")), + ), + skip_results_metadata_: S.optional( + S.Boolean.pipe(T.Body("skip-results-metadata?")), + ), + add_default_userland_constraints_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("add-default-userland-constraints?")), + ), + disable_max_results_: S.optional( + S.Boolean.pipe(T.Body("disable-max-results?")), + ), + ignore_cached_results_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("ignore-cached-results?")), + ), + format_rows_: S.optional(S.Boolean.pipe(T.Body("format-rows?"))), + js_int_to_string_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("js-int-to-string?")), + ), + disable_mbql__native_: S.optional( + S.Boolean.pipe(T.Body("disable-mbql->native?")), + ), + userland_query_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("userland-query?")), + ), + }), + ).annotate({ + identifier: "MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions", + }) as any as S.Schema; + +export type MetabaseLibSchemaQueryDatabase = unknown | number; +export const MetabaseLibSchemaQueryDatabase = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseLibSchemaQueryPivotMeasuresList = Array; +export const MetabaseLibSchemaQueryPivotMeasuresList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type MetabaseLibSchemaQueryPivotColsList = Array; +export const MetabaseLibSchemaQueryPivotColsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +/** parameter must be a map with a :type key */ +export interface MetabaseLibSchemaParameterParameter { + id?: string; + name?: string; + slug?: string; + value?: MetabaseLibSchemaParameterParameterValue; + required?: boolean | null; + type: MetabaseLibSchemaParameterType | (string & {}); + target?: MetabaseLibSchemaParameterTarget; + options?: MetabaseLibSchemaParameterParameterOptions | null; + default?: MetabaseLibSchemaParameterParameterValue; +} +export const MetabaseLibSchemaParameterParameter = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.String), + name: S.optional(S.String), + slug: S.optional(S.String), + value: S.optional(MetabaseLibSchemaParameterParameterValue), + required: S.optional(S.NullOr(S.Boolean)), + type: MetabaseLibSchemaParameterType, + target: S.optional(MetabaseLibSchemaParameterTarget), + options: S.optional(S.NullOr(MetabaseLibSchemaParameterParameterOptions)), + default: S.optional(MetabaseLibSchemaParameterParameterValue), + }), +).annotate({ + identifier: "MetabaseLibSchemaParameterParameter", +}) as any as S.Schema; + +/** Schema for a list of `:parameters` as passed in to a query. */ +export type MetabaseLibSchemaParameterParameters = + Array; +export const MetabaseLibSchemaParameterParameters = /*@__PURE__*/ S.Array( + MetabaseLibSchemaParameterParameter, +) as any as S.Schema; + +export interface MetabaseLibSchemaQuery { + lib_metadata?: unknown; + show_column_totals?: boolean | null; + pivot_rows?: MetabaseLibSchemaQueryPivotRowsList | null; + update_row?: MetabaseLibSchemaActionsRow; + lib_type?: unknown; + settings?: MetabaseLibSchemaSettingsSettings; + constraints?: MetabaseLibSchemaConstraintsConstraints; + info?: MetabaseLibSchemaInfoInfo; + show_row_totals?: boolean | null; + middleware?: MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions; + database?: MetabaseLibSchemaQueryDatabase; + pivot_measures?: MetabaseLibSchemaQueryPivotMeasuresList | null; + stages: unknown; + pivot_cols?: MetabaseLibSchemaQueryPivotColsList | null; + parameters?: MetabaseLibSchemaParameterParameters; + create_row?: MetabaseLibSchemaActionsRow; + /** Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query results. */ + was_pivot?: boolean | null; +} +export const MetabaseLibSchemaQuery = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lib_metadata: S.optional(S.Unknown.pipe(T.Body("lib/metadata"))), + show_column_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-column-totals")), + ), + pivot_rows: S.optional( + S.NullOr(MetabaseLibSchemaQueryPivotRowsList).pipe(T.Body("pivot-rows")), + ), + update_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("update-row")), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional(MetabaseLibSchemaSettingsSettings), + constraints: S.optional(MetabaseLibSchemaConstraintsConstraints), + info: S.optional(MetabaseLibSchemaInfoInfo), + show_row_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-row-totals")), + ), + middleware: S.optional(MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions), + database: S.optional(MetabaseLibSchemaQueryDatabase), + pivot_measures: S.optional( + S.NullOr(MetabaseLibSchemaQueryPivotMeasuresList).pipe( + T.Body("pivot-measures"), + ), + ), + stages: S.Unknown, + pivot_cols: S.optional( + S.NullOr(MetabaseLibSchemaQueryPivotColsList).pipe(T.Body("pivot-cols")), + ), + parameters: S.optional(MetabaseLibSchemaParameterParameters), + create_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("create-row")), + ), + was_pivot: S.optional(S.NullOr(S.Boolean).pipe(T.Body("was-pivot"))), + }), +).annotate({ + identifier: "MetabaseLibSchemaQuery", +}) as any as S.Schema; + +/** value must be a valid MBQL query, or an empty query. */ +export type MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery = + | unknown + | MetabaseLibSchemaQuery; +export const MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface MetabaseActionsSchemaActionForInsertCase2 { + visualization_settings?: unknown | null; + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + name: string; + archived?: boolean; + database_id?: number | null; + type: MetabaseActionsSchemaType | (string & {}); + model_id: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForInsertCase2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + name: S.String, + archived: S.optional(S.Boolean), + database_id: S.optional(S.NullOr(S.Number)), + type: MetabaseActionsSchemaType, + model_id: S.Number, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForInsertCase2", + }) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForInsertCase3 { + visualization_settings?: unknown | null; + response_handle?: string | null; + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + name: string; + archived?: boolean; + database_id?: number | null; + kind?: MetabaseActionsSchemaImplicitActionKind | (string & {}) | null; + type: MetabaseActionsSchemaType | (string & {}); + template?: MetabaseActionsSchemaHttpActionTemplate | null; + error_handle?: string | null; + model_id: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForInsertCase3 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + response_handle: S.optional(S.NullOr(S.String)), + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + name: S.String, + archived: S.optional(S.Boolean), + database_id: S.optional(S.NullOr(S.Number)), + kind: S.optional(S.NullOr(MetabaseActionsSchemaImplicitActionKind)), + type: MetabaseActionsSchemaType, + template: S.optional(S.NullOr(MetabaseActionsSchemaHttpActionTemplate)), + error_handle: S.optional(S.NullOr(S.String)), + model_id: S.Number, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForInsertCase3", + }) as any as S.Schema; + +/** Schema for inserting a new Action (REST API or internally). */ +export type MetabaseActionsSchemaActionForInsert = + | MetabaseActionsSchemaActionForInsertCase0 + | MetabaseActionsSchemaActionForInsertCase1 + | MetabaseActionsSchemaActionForInsertCase2 + | MetabaseActionsSchemaActionForInsertCase3; +export const MetabaseActionsSchemaActionForInsert = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateActionRequest { + body?: MetabaseActionsSchemaActionForInsert; +} +export const CreateActionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(MetabaseActionsSchemaActionForInsert.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "POST", uri: "/api/action", code: 200 })), +).annotate({ + identifier: "CreateActionRequest", +}) as any as S.Schema; + +export interface CreateActionResponse {} +export const CreateActionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateActionResponse", +}) as any as S.Schema; + +/** value must map parameter ids to scalar values. */ +export type MetabaseActionsSchemaExecuteParameterValues = { + [key: string]: unknown | undefined; +}; +export const MetabaseActionsSchemaExecuteParameterValues = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export interface CreateActionExecuteRequestBody { + parameters?: MetabaseActionsSchemaExecuteParameterValues | null; +} +export const CreateActionExecuteRequestBody = /*@__PURE__*/ S.suspend(() => + S.Struct({ + parameters: S.optional( + S.NullOr(MetabaseActionsSchemaExecuteParameterValues), + ), + }), +).annotate({ + identifier: "CreateActionExecuteRequestBody", +}) as any as S.Schema; + +export interface CreateActionExecuteRequest { + id: string; + body?: CreateActionExecuteRequestBody | null; +} +export const CreateActionExecuteRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + body: S.optional( + S.NullOr(CreateActionExecuteRequestBody).pipe(T.HttpBody()), + ), + }).pipe( + T.Http({ method: "POST", uri: "/api/action/{id}/execute", code: 200 }), + ), +).annotate({ + identifier: "CreateActionExecuteRequest", +}) as any as S.Schema; + +export interface CreateActionExecuteResponse {} +export const CreateActionExecuteResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateActionExecuteResponse", +}) as any as S.Schema; + +export interface CreateActionExecuteRequest2 { + /** value must be a valid UUID. */ + uuid: string; + parameters?: MetabaseActionsSchemaExecuteParameterValues | null; +} +export const CreateActionExecuteRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + parameters: S.optional( + S.NullOr(MetabaseActionsSchemaExecuteParameterValues), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/public/action/{uuid}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "CreateActionExecuteRequest2", +}) as any as S.Schema; + +export interface CreateActionExecute2Response {} +export const CreateActionExecute2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateActionExecute2Response", +}) as any as S.Schema; + +export interface CreateActionPublicLinkRequest { + id: number; +} +export const CreateActionPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/action/{id}/public_link", code: 200 }), + ), +).annotate({ + identifier: "CreateActionPublicLinkRequest", +}) as any as S.Schema; + +export interface CreateActionPublicLinkResponse {} +export const CreateActionPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateActionPublicLinkResponse", +}) as any as S.Schema; + +export type CreateActivityRecentRequestContext = "selection"; +export const CreateActivityRecentRequestContext = /*@__PURE__*/ S.String; + +export type CreateActivityRecentRequestModel = + | "card" + | "dataset" + | "metric" + | "dashboard" + | "table" + | "collection" + | "document"; +export const CreateActivityRecentRequestModel = /*@__PURE__*/ S.String; + +export interface CreateActivityRecentRequest { + context: CreateActivityRecentRequestContext | (string & {}); + model: CreateActivityRecentRequestModel | (string & {}); + /** value must be an integer greater than zero. */ + model_id: number; +} +export const CreateActivityRecentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: CreateActivityRecentRequestContext, + model: CreateActivityRecentRequestModel, + model_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/activity/recents", code: 200 })), +).annotate({ + identifier: "CreateActivityRecentRequest", +}) as any as S.Schema; + +export interface CreateActivityRecentResponse {} +export const CreateActivityRecentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateActivityRecentResponse", +}) as any as S.Schema; + +export interface CreateAgentCollectionRequest { + description?: string | null; + name: string; + parent_collection_id?: number | null; +} +export const CreateAgentCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: S.String, + parent_collection_id: S.optional(S.NullOr(S.Number)), + }).pipe( + T.Http({ method: "POST", uri: "/api/agent/v1/collection", code: 200 }), + ), +).annotate({ + identifier: "CreateAgentCollectionRequest", +}) as any as S.Schema; + +export interface CreateAgentCollectionResponse {} +export const CreateAgentCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentCollectionResponse", +}) as any as S.Schema; + +export interface CreateAgentConstructNativeQueryRequest { + /** value must be an integer greater than zero. */ + database_id: number; + sql: string; +} +export const CreateAgentConstructNativeQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + database_id: S.Number, + sql: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/agent/v1/construct-native-query", + code: 200, + }), + ), +).annotate({ + identifier: "CreateAgentConstructNativeQueryRequest", +}) as any as S.Schema; + +export interface CreateAgentConstructNativeQueryResponse {} +export const CreateAgentConstructNativeQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateAgentConstructNativeQueryResponse", +}) as any as S.Schema; + +export interface CreateAgentConstructQueryRequest { + prompt?: string | null; + /** Value must be a map. */ + query: unknown; +} +export const CreateAgentConstructQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + prompt: S.optional(S.NullOr(S.String)), + query: S.Unknown, + }).pipe( + T.Http({ method: "POST", uri: "/api/agent/v2/construct-query", code: 200 }), + ), +).annotate({ + identifier: "CreateAgentConstructQueryRequest", +}) as any as S.Schema; + +export interface CreateAgentConstructQueryResponse {} +export const CreateAgentConstructQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentConstructQueryResponse", +}) as any as S.Schema; + +export type CreateAgentDashboardRequestQuestionIdsList = Array; +export const CreateAgentDashboardRequestQuestionIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateAgentDashboardRequest { + collection_id?: number | null; + description?: string | null; + name: string; + question_ids?: CreateAgentDashboardRequestQuestionIdsList | null; +} +export const CreateAgentDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + name: S.String, + question_ids: S.optional( + S.NullOr(CreateAgentDashboardRequestQuestionIdsList), + ), + }).pipe( + T.Http({ method: "POST", uri: "/api/agent/v1/dashboard", code: 200 }), + ), +).annotate({ + identifier: "CreateAgentDashboardRequest", +}) as any as S.Schema; + +export interface CreateAgentDashboardResponse {} +export const CreateAgentDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentDashboardResponse", +}) as any as S.Schema; + +export interface CreateAgentExecuteRequest { + query: string; +} +export const CreateAgentExecuteRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/agent/v1/execute", code: 200 })), +).annotate({ + identifier: "CreateAgentExecuteRequest", +}) as any as S.Schema; + +export interface CreateAgentExecuteResponse {} +export const CreateAgentExecuteResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentExecuteResponse", +}) as any as S.Schema; + +export interface CreateAgentExecuteSqlRequest { + /** value must be an integer greater than zero. */ + database_id: number; + sql: string; +} +export const CreateAgentExecuteSqlRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number, + sql: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/agent/v1/execute-sql", code: 200 }), + ), +).annotate({ + identifier: "CreateAgentExecuteSqlRequest", +}) as any as S.Schema; + +export interface CreateAgentExecuteSqlResponse {} +export const CreateAgentExecuteSqlResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentExecuteSqlResponse", +}) as any as S.Schema; + +/** Display types accepted by Card. Validates LLM-passed values so a bogus value (e.g. `"potato"`) gets a 400 rather than persisting junk. */ +export type MetabaseAgentApiApiCardDisplay = + | "table" + | "bar" + | "line" + | "pie" + | "scatter" + | "area" + | "row" + | "combo" + | "pivot" + | "scalar" + | "smartscalar" + | "gauge" + | "progress" + | "funnel" + | "map" + | "waterfall" + | "sankey"; +export const MetabaseAgentApiApiCardDisplay = /*@__PURE__*/ S.String; + +export interface CreateAgentMetricRequest { + collection_id?: number | null; + description?: string | null; + display?: MetabaseAgentApiApiCardDisplay | (string & {}) | null; + name: string; + query: string; + visualization_settings?: unknown | null; +} +export const CreateAgentMetricRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(MetabaseAgentApiApiCardDisplay)), + name: S.String, + query: S.String, + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }).pipe(T.Http({ method: "POST", uri: "/api/agent/v1/metric", code: 200 })), +).annotate({ + identifier: "CreateAgentMetricRequest", +}) as any as S.Schema; + +export interface CreateAgentMetricResponse {} +export const CreateAgentMetricResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentMetricResponse", +}) as any as S.Schema; + +export interface MetabaseAgentApiApiQueryRequestCase0 { + continuation_token: string; +} +export const MetabaseAgentApiApiQueryRequestCase0 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + continuation_token: S.String, + }), +).annotate({ + identifier: "MetabaseAgentApiApiQueryRequestCase0", +}) as any as S.Schema; + +export interface MetabaseAgentApiApiQueryRequestCase1 { + query: string; +} +export const MetabaseAgentApiApiQueryRequestCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + query: S.String, + }), +).annotate({ + identifier: "MetabaseAgentApiApiQueryRequestCase1", +}) as any as S.Schema; + +/** Request body for /v2/construct-query and the fresh-query branch of /v2/query. A single `:query` key whose value is a JSON object matching [[metabase.lib.schema/external-query]] — the canonical portable MBQL 5 wire format. The query is fully self-describing: the database is derived from the first stage's `source-table:` or `source-card:`, all field references are portable FKs (`[, , , ]`), and there is no auxiliary `source_entity` / `referenced_entities` envelope. See `resources/metabot/prompts/tools/construct_notebook_query.md` for the full format reference (including operators, joins, expressions, multi-stage queries, and FK conventions). Closed map: any extra top-level keys (notably the legacy `source_entity` / `referenced_entities` envelope from before the repr migration) are dropped during request decoding, so a caller still sending the old shape is served. The inner `:query` value is intentionally typed as an open map ([[ms/Map]]) at this boundary rather than `::lib.schema/external-query`. Being open matters: a closed map with no declared entries would have every key stripped before the handler saw it. Reasons for not naming the real schema: 1. Deep MBQL-shape validation runs inside the representations pipeline (`metabot.tools.construct/execute-representations-query` calls `repr/validate-query` after the repair pass), so the boundary check would be redundant. 2. The strict-tool manifest lint (`assert-optional-fields-nullable!`) walks every map reachable from the tool input schema. `::external-query` references `::query`, which carries several `:optional` keys (`:lib/metadata`, `:database`, `:settings`, …) that are not `[:maybe ...]` — for sound reasons unrelated to this endpoint. Recursing into them would force a wide schema change just to satisfy the lint at the agent boundary. */ +export interface MetabaseAgentApiApiConstructQueryRequest { + prompt?: string | null; + /** Value must be a map. */ + query: unknown; +} +export const MetabaseAgentApiApiConstructQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + prompt: S.optional(S.NullOr(S.String)), + query: S.Unknown, + }), +).annotate({ + identifier: "MetabaseAgentApiApiConstructQueryRequest", +}) as any as S.Schema; + +/** Request body for /v2/query, one of three shapes: - `{:continuation_token }` from a prior response (pagination); - `{:query }` — a query_handle resolved by the MCP layer to its stored base64 MBQL; already resolved, so it's executed directly (like /v1/execute) rather than re-run through the representations pipeline; - `{:query }` — a fresh portable MBQL 5 payload, same shape as /v2/construct-query. The string-vs-object `:query` distinction is what the `:dispatch` keys on. Each branch is a closed map, so top-level keys it doesn't declare (e.g. the legacy `source_entity` / `referenced_entities` envelope, or a `:query` sent alongside a `:continuation_token`) are dropped before the handler runs. */ +export type MetabaseAgentApiApiQueryRequest = + | MetabaseAgentApiApiQueryRequestCase0 + | MetabaseAgentApiApiQueryRequestCase1 + | MetabaseAgentApiApiConstructQueryRequest; +export const MetabaseAgentApiApiQueryRequest = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateAgentQueryRequest { + body?: MetabaseAgentApiApiQueryRequest; +} +export const CreateAgentQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(MetabaseAgentApiApiQueryRequest.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "POST", uri: "/api/agent/v2/query", code: 200 })), +).annotate({ + identifier: "CreateAgentQueryRequest", +}) as any as S.Schema; + +export interface CreateAgentQueryResponse {} +export const CreateAgentQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentQueryResponse", +}) as any as S.Schema; + +export interface CreateAgentQuestionRequest { + collection_id?: number | null; + description?: string | null; + display?: MetabaseAgentApiApiCardDisplay | (string & {}) | null; + name: string; + query: string; + visualization_settings?: unknown | null; +} +export const CreateAgentQuestionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(MetabaseAgentApiApiCardDisplay)), + name: S.String, + query: S.String, + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }).pipe(T.Http({ method: "POST", uri: "/api/agent/v1/question", code: 200 })), +).annotate({ + identifier: "CreateAgentQuestionRequest", +}) as any as S.Schema; + +export interface CreateAgentQuestionResponse {} +export const CreateAgentQuestionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentQuestionResponse", +}) as any as S.Schema; + +export interface CreateAgentQuestionQueryRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateAgentQuestionQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/agent/v1/question/{id}/query", + code: 200, + }), + ), +).annotate({ + identifier: "CreateAgentQuestionQueryRequest", +}) as any as S.Schema; + +export interface CreateAgentQuestionQueryResponse {} +export const CreateAgentQuestionQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentQuestionQueryResponse", +}) as any as S.Schema; + +export type CreateAgentReadResourceRequestUrisList = Array; +export const CreateAgentReadResourceRequestUrisList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface CreateAgentReadResourceRequest { + uris: CreateAgentReadResourceRequestUrisList; +} +export const CreateAgentReadResourceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uris: CreateAgentReadResourceRequestUrisList, + }).pipe( + T.Http({ method: "POST", uri: "/api/agent/v1/read-resource", code: 200 }), + ), +).annotate({ + identifier: "CreateAgentReadResourceRequest", +}) as any as S.Schema; + +export interface CreateAgentReadResourceResponse {} +export const CreateAgentReadResourceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentReadResourceResponse", +}) as any as S.Schema; + +export type CreateAgentSearchRequestSemanticQueriesCase0List = Array; +export const CreateAgentSearchRequestSemanticQueriesCase0List = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateAgentSearchRequestSemanticQueries = + | CreateAgentSearchRequestSemanticQueriesCase0List + | string; +export const CreateAgentSearchRequestSemanticQueries = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateAgentSearchRequestTermQueriesCase0List = Array; +export const CreateAgentSearchRequestTermQueriesCase0List = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateAgentSearchRequestTermQueries = + | CreateAgentSearchRequestTermQueriesCase0List + | string; +export const CreateAgentSearchRequestTermQueries = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateAgentSearchRequest { + semantic_queries?: CreateAgentSearchRequestSemanticQueries | null; + term_queries?: CreateAgentSearchRequestTermQueries | null; +} +export const CreateAgentSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + semantic_queries: S.optional( + S.NullOr(CreateAgentSearchRequestSemanticQueries), + ), + term_queries: S.optional(S.NullOr(CreateAgentSearchRequestTermQueries)), + }).pipe(T.Http({ method: "POST", uri: "/api/agent/v1/search", code: 200 })), +).annotate({ + identifier: "CreateAgentSearchRequest", +}) as any as S.Schema; + +export interface CreateAgentSearchResponse {} +export const CreateAgentSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAgentSearchResponse", +}) as any as S.Schema; + +export interface CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem { + description?: string | null; + name: string; + timestamp: string; +} +export const CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: S.String, + timestamp: S.String, + }), + ).annotate({ + identifier: "CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem", + }) as any as S.Schema; + +export type CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList = + Array; +export const CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList = + /*@__PURE__*/ S.Array( + CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsItem, + ) as any as S.Schema; + +export interface CreateAiEntityAnalysisAnalyzeChartRequest { + description?: string | null; + image_base64: string; + name?: string | null; + timeline_events?: CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList | null; +} +export const CreateAiEntityAnalysisAnalyzeChartRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + image_base64: S.String, + name: S.optional(S.NullOr(S.String)), + timeline_events: S.optional( + S.NullOr(CreateAiEntityAnalysisAnalyzeChartRequestTimelineEventsList), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ai-entity-analysis/analyze-chart", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateAiEntityAnalysisAnalyzeChartRequest", + }) as any as S.Schema; + +export interface CreateAiEntityAnalysisAnalyzeChartResponse {} +export const CreateAiEntityAnalysisAnalyzeChartResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateAiEntityAnalysisAnalyzeChartResponse", + }) as any as S.Schema; + +export type CreateAnalyticsInternalRequestEventsItemLabelsMap = { + [key: string]: string | undefined; +}; +export const CreateAnalyticsInternalRequestEventsItemLabelsMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export type CreateAnalyticsInternalRequestEventsItemOp = + | "inc" + | "dec" + | "set" + | "observe" + | "clear"; +export const CreateAnalyticsInternalRequestEventsItemOp = + /*@__PURE__*/ S.String; + +export interface CreateAnalyticsInternalRequestEventsItem { + amount?: number | null; + labels?: CreateAnalyticsInternalRequestEventsItemLabelsMap | null; + metric: string; + op: CreateAnalyticsInternalRequestEventsItemOp | (string & {}); +} +export const CreateAnalyticsInternalRequestEventsItem = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + amount: S.optional(S.NullOr(S.Number)), + labels: S.optional( + S.NullOr(CreateAnalyticsInternalRequestEventsItemLabelsMap), + ), + metric: S.String, + op: CreateAnalyticsInternalRequestEventsItemOp, + }), +).annotate({ + identifier: "CreateAnalyticsInternalRequestEventsItem", +}) as any as S.Schema; + +export type CreateAnalyticsInternalRequestEventsList = + Array; +export const CreateAnalyticsInternalRequestEventsList = /*@__PURE__*/ S.Array( + CreateAnalyticsInternalRequestEventsItem, +) as any as S.Schema; + +export interface CreateAnalyticsInternalRequest { + events: CreateAnalyticsInternalRequestEventsList; +} +export const CreateAnalyticsInternalRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + events: CreateAnalyticsInternalRequestEventsList, + }).pipe( + T.Http({ method: "POST", uri: "/api/analytics/internal", code: 200 }), + ), +).annotate({ + identifier: "CreateAnalyticsInternalRequest", +}) as any as S.Schema; + +export interface CreateAnalyticsInternalResponse {} +export const CreateAnalyticsInternalResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAnalyticsInternalResponse", +}) as any as S.Schema; + +export type CreateAnalyticsProxyRequestDataItemMap = { + [key: string]: string | undefined; +}; +export const CreateAnalyticsProxyRequestDataItemMap = /*@__PURE__*/ S.Record( + S.String, + S.String, +) as any as S.Schema; + +export type CreateAnalyticsProxyRequestDataList = + Array; +export const CreateAnalyticsProxyRequestDataList = /*@__PURE__*/ S.Array( + CreateAnalyticsProxyRequestDataItemMap, +) as any as S.Schema; + +export interface CreateAnalyticsProxyRequest { + data: CreateAnalyticsProxyRequestDataList; + schema: string; +} +export const CreateAnalyticsProxyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data: CreateAnalyticsProxyRequestDataList, + schema: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/analytics-proxy", code: 200 })), +).annotate({ + identifier: "CreateAnalyticsProxyRequest", +}) as any as S.Schema; + +export interface CreateAnalyticsProxyResponse {} +export const CreateAnalyticsProxyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateAnalyticsProxyResponse", +}) as any as S.Schema; + +export type CreateCacheInvalidateRequestDatabaseList = Array; +export const CreateCacheInvalidateRequestDatabaseList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CreateCacheInvalidateRequestDashboardList = Array; +export const CreateCacheInvalidateRequestDashboardList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CreateCacheInvalidateRequestQuestionList = Array; +export const CreateCacheInvalidateRequestQuestionList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateCacheInvalidateRequest { + /** All cache configuration overrides should invalidate cache too */ + include?: unknown; + /** A list of database ids */ + database?: CreateCacheInvalidateRequestDatabaseList; + /** A list of dashboard ids */ + dashboard?: CreateCacheInvalidateRequestDashboardList; + /** A list of question ids */ + question?: CreateCacheInvalidateRequestQuestionList; +} +export const CreateCacheInvalidateRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include: S.optional(S.Unknown.pipe(T.Query())), + database: S.optional( + CreateCacheInvalidateRequestDatabaseList.pipe(T.Query()), + ), + dashboard: S.optional( + CreateCacheInvalidateRequestDashboardList.pipe(T.Query()), + ), + question: S.optional( + CreateCacheInvalidateRequestQuestionList.pipe(T.Query()), + ), + }).pipe(T.Http({ method: "POST", uri: "/api/cache/invalidate", code: 200 })), +).annotate({ + identifier: "CreateCacheInvalidateRequest", +}) as any as S.Schema; + +export interface CreateCacheInvalidateResponse {} +export const CreateCacheInvalidateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCacheInvalidateResponse", +}) as any as S.Schema; + +/** Schema for the `:result-metadata` for a Card (Saved Question, Model, or v2 Metric). */ +export type MetabaseLibSchemaMetadataCardResultMetadata = + Array; +export const MetabaseLibSchemaMetadataCardResultMetadata = + /*@__PURE__*/ S.Array( + MetabaseLibSchemaMetadataLibOrLegacyColumn, + ) as any as S.Schema; + +export type CreateCardRequestCollectionId = number | string; +export const CreateCardRequestCollectionId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** All acceptable card types. Previously (< 49), we only had 2 card types: question and model, which were differentiated using the boolean `dataset` column. Soon we'll have more card types (e.g: metric) and we will longer be able to use a boolean column to differentiate between all types. So we've added a new `type` column for this purpose. Migrating all the code to use `report_card.type` will be quite an effort, we decided that we'll migrate it gradually. */ +export type MetabaseLibSchemaMetadataCardType = "question" | "metric" | "model"; +export const MetabaseLibSchemaMetadataCardType = /*@__PURE__*/ S.String; + +export interface CreateCardRequestSize { + /** value must be an integer greater than zero. */ + size_x: number; + /** value must be an integer greater than zero. */ + size_y: number; +} +export const CreateCardRequestSize = /*@__PURE__*/ S.suspend(() => + S.Struct({ + size_x: S.Number, + size_y: S.Number, + }), +).annotate({ + identifier: "CreateCardRequestSize", +}) as any as S.Schema; + +export interface CreateCardRequest { + /** Value must be a map. */ + visualization_settings: unknown; + dashboard_tab_id?: number | null; + entity_id?: string | null; + dataset_query: MetabaseLibSchemaQuery; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + name: string; + collection_position?: number | null; + result_metadata?: MetabaseLibSchemaMetadataCardResultMetadata | null; + collection_id?: CreateCardRequestCollectionId | null; + cache_ttl?: number | null; + type?: MetabaseLibSchemaMetadataCardType | (string & {}) | null; + display: string; + size?: CreateCardRequestSize | null; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; + dashboard_id?: number | null; +} +export const CreateCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.Unknown, + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + entity_id: S.optional(S.NullOr(S.String)), + dataset_query: MetabaseLibSchemaQuery, + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + name: S.String, + collection_position: S.optional(S.NullOr(S.Number)), + result_metadata: S.optional( + S.NullOr(MetabaseLibSchemaMetadataCardResultMetadata), + ), + collection_id: S.optional(S.NullOr(CreateCardRequestCollectionId)), + cache_ttl: S.optional(S.NullOr(S.Number)), + type: S.optional(S.NullOr(MetabaseLibSchemaMetadataCardType)), + display: S.String, + size: S.optional(S.NullOr(CreateCardRequestSize)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + dashboard_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "POST", uri: "/api/card", code: 200 })), +).annotate({ + identifier: "CreateCardRequest", +}) as any as S.Schema; + +export interface CreateCardResponse {} +export const CreateCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardResponse", +}) as any as S.Schema; + +export type CreateCardCollectionRequestCardIdsList = Array; +export const CreateCardCollectionRequestCardIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateCardCollectionRequest { + card_ids: CreateCardCollectionRequestCardIdsList; + collection_id?: number | null; +} +export const CreateCardCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_ids: CreateCardCollectionRequestCardIdsList, + collection_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "POST", uri: "/api/card/collections", code: 200 })), +).annotate({ + identifier: "CreateCardCollectionRequest", +}) as any as S.Schema; + +export interface CreateCardCollectionResponse {} +export const CreateCardCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardCollectionResponse", +}) as any as S.Schema; + +export interface CreateCardCopyRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateCardCopyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "POST", uri: "/api/card/{id}/copy", code: 200 })), +).annotate({ + identifier: "CreateCardCopyRequest", +}) as any as S.Schema; + +export interface CreateCardCopyResponse {} +export const CreateCardCopyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardCopyResponse", +}) as any as S.Schema; + +/** parameter must be a map with an :id key */ +export interface MetabaseParametersSchemaParameterWithValue { + default?: MetabaseLibSchemaParameterParameterValue; + id: string; + name?: string | null; + options?: MetabaseLibSchemaParameterParameterOptions | null; + slug?: string | null; + target?: MetabaseLibSchemaParameterTarget | null; + type?: MetabaseLibSchemaParameterType | (string & {}) | null; + value?: MetabaseLibSchemaParameterParameterValue; +} +export const MetabaseParametersSchemaParameterWithValue = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + default: S.optional(MetabaseLibSchemaParameterParameterValue), + id: S.String, + name: S.optional(S.NullOr(S.String)), + options: S.optional(S.NullOr(MetabaseLibSchemaParameterParameterOptions)), + slug: S.optional(S.NullOr(S.String)), + target: S.optional(S.NullOr(MetabaseLibSchemaParameterTarget)), + type: S.optional(S.NullOr(MetabaseLibSchemaParameterType)), + value: S.optional(MetabaseLibSchemaParameterParameterValue), + }), + ).annotate({ + identifier: "MetabaseParametersSchemaParameterWithValue", + }) as any as S.Schema; + +export type MetabaseParametersSchemaParameterValues = + Array; +export const MetabaseParametersSchemaParameterValues = /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameterWithValue, +) as any as S.Schema; + +export interface CreateCardPivotCardQueryRequest { + /** value must be an integer greater than zero. */ + card_id: number; + ignore_cache?: boolean | null; + parameters?: MetabaseParametersSchemaParameterValues | null; +} +export const CreateCardPivotCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + ignore_cache: S.optional(S.NullOr(S.Boolean)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/card/pivot/{card_id}/query", + code: 200, + }), + ), +).annotate({ + identifier: "CreateCardPivotCardQueryRequest", +}) as any as S.Schema; + +export interface CreateCardPivotCardQueryResponse {} +export const CreateCardPivotCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardPivotCardQueryResponse", +}) as any as S.Schema; + +export interface CreateCardPublicLinkRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const CreateCardPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/card/{card_id}/public_link", + code: 200, + }), + ), +).annotate({ + identifier: "CreateCardPublicLinkRequest", +}) as any as S.Schema; + +export interface CreateCardPublicLinkResponse {} +export const CreateCardPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardPublicLinkResponse", +}) as any as S.Schema; + +export interface CreateCardQueryRequest { + card_id: string; + collection_preview?: boolean | null; + dashboard_id?: number | null; + ignore_cache?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; +} +export const CreateCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.String.pipe(T.Label()), + collection_preview: S.optional(S.NullOr(S.Boolean)), + dashboard_id: S.optional(S.NullOr(S.Number)), + ignore_cache: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + }).pipe( + T.Http({ method: "POST", uri: "/api/card/{card_id}/query", code: 200 }), + ), +).annotate({ + identifier: "CreateCardQueryRequest", +}) as any as S.Schema; + +export interface CreateCardQueryResponse {} +export const CreateCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardQueryResponse", +}) as any as S.Schema; + +export type CreateCardsDashboardRequestCardIdsList = Array; +export const CreateCardsDashboardRequestCardIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateCardsDashboardRequest { + card_ids: CreateCardsDashboardRequestCardIdsList; +} +export const CreateCardsDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_ids: CreateCardsDashboardRequestCardIdsList, + }).pipe(T.Http({ method: "POST", uri: "/api/cards/dashboards", code: 200 })), +).annotate({ + identifier: "CreateCardsDashboardRequest", +}) as any as S.Schema; + +export interface CreateCardsDashboardResponse {} +export const CreateCardsDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardsDashboardResponse", +}) as any as S.Schema; + +export type CreateCardsMoveRequestCardIdsList = Array; +export const CreateCardsMoveRequestCardIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateCardsMoveRequest { + card_ids: CreateCardsMoveRequestCardIdsList; + collection_id?: number | null; + dashboard_id?: number | null; +} +export const CreateCardsMoveRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_ids: CreateCardsMoveRequestCardIdsList, + collection_id: S.optional(S.NullOr(S.Number)), + dashboard_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "POST", uri: "/api/cards/move", code: 200 })), +).annotate({ + identifier: "CreateCardsMoveRequest", +}) as any as S.Schema; + +export interface CreateCardsMoveResponse {} +export const CreateCardsMoveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCardsMoveResponse", +}) as any as S.Schema; + +export type CreateChannelRequestBodyCase0DetailsAuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const CreateChannelRequestBodyCase0DetailsAuthMethod = + /*@__PURE__*/ S.String; + +export type CreateChannelRequestBodyCase0DetailsFeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const CreateChannelRequestBodyCase0DetailsFeFormType = + /*@__PURE__*/ S.String; + +export type CreateChannelRequestBodyCase0DetailsMethod = "get" | "post" | "put"; +export const CreateChannelRequestBodyCase0DetailsMethod = + /*@__PURE__*/ S.String; + +export interface CreateChannelRequestBodyCase0Details { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: CreateChannelRequestBodyCase0DetailsAuthMethod | (string & {}); + fe_form_type?: CreateChannelRequestBodyCase0DetailsFeFormType | (string & {}); + method?: CreateChannelRequestBodyCase0DetailsMethod | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const CreateChannelRequestBodyCase0Details = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: CreateChannelRequestBodyCase0DetailsAuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + CreateChannelRequestBodyCase0DetailsFeFormType.pipe( + T.Body("fe-form-type"), + ), + ), + method: S.optional(CreateChannelRequestBodyCase0DetailsMethod), + url: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase0Details", +}) as any as S.Schema; + +export interface CreateChannelRequestBodyCase0 { + active?: boolean | null; + description?: string | null; + details: CreateChannelRequestBodyCase0Details; + name: string; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelRequestBodyCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: CreateChannelRequestBodyCase0Details, + name: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase0", +}) as any as S.Schema; + +export interface CreateChannelRequestBodyCase1 { + active?: boolean | null; + description?: string | null; + details?: unknown | null; + name: string; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelRequestBodyCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(S.Unknown)), + name: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase1", +}) as any as S.Schema; + +export interface CreateChannelRequestBodyCase2Details { + channel: string; +} +export const CreateChannelRequestBodyCase2Details = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + channel: S.String, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase2Details", +}) as any as S.Schema; + +export interface CreateChannelRequestBodyCase2 { + active?: boolean | null; + description?: string | null; + details: CreateChannelRequestBodyCase2Details; + name: string; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelRequestBodyCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: CreateChannelRequestBodyCase2Details, + name: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase2", +}) as any as S.Schema; + +export type CreateChannelRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; +export const CreateChannelRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; + +export type CreateChannelRequestBodyCase3DetailsCase1AuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const CreateChannelRequestBodyCase3DetailsCase1AuthMethod = + /*@__PURE__*/ S.String; + +export type CreateChannelRequestBodyCase3DetailsCase1FeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const CreateChannelRequestBodyCase3DetailsCase1FeFormType = + /*@__PURE__*/ S.String; + +export type CreateChannelRequestBodyCase3DetailsCase1Method = + | "get" + | "post" + | "put"; +export const CreateChannelRequestBodyCase3DetailsCase1Method = + /*@__PURE__*/ S.String; + +export interface CreateChannelRequestBodyCase3DetailsCase1 { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: + | CreateChannelRequestBodyCase3DetailsCase1AuthMethod + | (string & {}); + fe_form_type?: + | CreateChannelRequestBodyCase3DetailsCase1FeFormType + | (string & {}); + method?: CreateChannelRequestBodyCase3DetailsCase1Method | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const CreateChannelRequestBodyCase3DetailsCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: CreateChannelRequestBodyCase3DetailsCase1AuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + CreateChannelRequestBodyCase3DetailsCase1FeFormType.pipe( + T.Body("fe-form-type"), + ), + ), + method: S.optional(CreateChannelRequestBodyCase3DetailsCase1Method), + url: S.Unknown, + }), + ).annotate({ + identifier: "CreateChannelRequestBodyCase3DetailsCase1", + }) as any as S.Schema; + +export type CreateChannelRequestBodyCase3Details = + | CreateChannelRequestBodyCase2Details + | CreateChannelRequestBodyCase3DetailsCase1 + | unknown; +export const CreateChannelRequestBodyCase3Details = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateChannelRequestBodyCase3 { + active?: boolean | null; + description?: string | null; + details?: CreateChannelRequestBodyCase3Details | null; + name: string; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelRequestBodyCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(CreateChannelRequestBodyCase3Details)), + name: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelRequestBodyCase3", +}) as any as S.Schema; + +export type CreateChannelRequestBody = + | CreateChannelRequestBodyCase0 + | CreateChannelRequestBodyCase1 + | CreateChannelRequestBodyCase2 + | CreateChannelRequestBodyCase3; +export const CreateChannelRequestBody = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateChannelRequest { + body?: CreateChannelRequestBody; +} +export const CreateChannelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(CreateChannelRequestBody.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "POST", uri: "/api/channel", code: 200 })), +).annotate({ + identifier: "CreateChannelRequest", +}) as any as S.Schema; + +export interface CreateChannelResponse {} +export const CreateChannelResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateChannelResponse", +}) as any as S.Schema; + +export type CreateChannelTestRequestBodyCase0DetailsAuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const CreateChannelTestRequestBodyCase0DetailsAuthMethod = + /*@__PURE__*/ S.String; + +export type CreateChannelTestRequestBodyCase0DetailsFeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const CreateChannelTestRequestBodyCase0DetailsFeFormType = + /*@__PURE__*/ S.String; + +export type CreateChannelTestRequestBodyCase0DetailsMethod = + | "get" + | "post" + | "put"; +export const CreateChannelTestRequestBodyCase0DetailsMethod = + /*@__PURE__*/ S.String; + +export interface CreateChannelTestRequestBodyCase0Details { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: + | CreateChannelTestRequestBodyCase0DetailsAuthMethod + | (string & {}); + fe_form_type?: + | CreateChannelTestRequestBodyCase0DetailsFeFormType + | (string & {}); + method?: CreateChannelTestRequestBodyCase0DetailsMethod | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const CreateChannelTestRequestBodyCase0Details = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: CreateChannelTestRequestBodyCase0DetailsAuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + CreateChannelTestRequestBodyCase0DetailsFeFormType.pipe( + T.Body("fe-form-type"), + ), + ), + method: S.optional(CreateChannelTestRequestBodyCase0DetailsMethod), + url: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelTestRequestBodyCase0Details", +}) as any as S.Schema; + +export interface CreateChannelTestRequestBodyCase0 { + details: CreateChannelTestRequestBodyCase0Details; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelTestRequestBodyCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: CreateChannelTestRequestBodyCase0Details, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelTestRequestBodyCase0", +}) as any as S.Schema; + +export interface CreateChannelTestRequestBodyCase1 { + details?: unknown | null; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelTestRequestBodyCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.NullOr(S.Unknown)), + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelTestRequestBodyCase1", +}) as any as S.Schema; + +export type CreateChannelTestRequestBodyCase2Details = + CreateChannelRequestBodyCase2Details; +export const CreateChannelTestRequestBodyCase2Details = + CreateChannelRequestBodyCase2Details; + +export interface CreateChannelTestRequestBodyCase2 { + details: CreateChannelRequestBodyCase2Details; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelTestRequestBodyCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: CreateChannelRequestBodyCase2Details, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelTestRequestBodyCase2", +}) as any as S.Schema; + +export type CreateChannelTestRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; +export const CreateChannelTestRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; + +export type CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod = + /*@__PURE__*/ S.String; + +export type CreateChannelTestRequestBodyCase3DetailsCase1FeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const CreateChannelTestRequestBodyCase3DetailsCase1FeFormType = + /*@__PURE__*/ S.String; + +export type CreateChannelTestRequestBodyCase3DetailsCase1Method = + | "get" + | "post" + | "put"; +export const CreateChannelTestRequestBodyCase3DetailsCase1Method = + /*@__PURE__*/ S.String; + +export interface CreateChannelTestRequestBodyCase3DetailsCase1 { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: + | CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod + | (string & {}); + fe_form_type?: + | CreateChannelTestRequestBodyCase3DetailsCase1FeFormType + | (string & {}); + method?: CreateChannelTestRequestBodyCase3DetailsCase1Method | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const CreateChannelTestRequestBodyCase3DetailsCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: CreateChannelTestRequestBodyCase3DetailsCase1AuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + CreateChannelTestRequestBodyCase3DetailsCase1FeFormType.pipe( + T.Body("fe-form-type"), + ), + ), + method: S.optional(CreateChannelTestRequestBodyCase3DetailsCase1Method), + url: S.Unknown, + }), + ).annotate({ + identifier: "CreateChannelTestRequestBodyCase3DetailsCase1", + }) as any as S.Schema; + +export type CreateChannelTestRequestBodyCase3Details = + | CreateChannelRequestBodyCase2Details + | CreateChannelTestRequestBodyCase3DetailsCase1 + | unknown; +export const CreateChannelTestRequestBodyCase3Details = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateChannelTestRequestBodyCase3 { + details?: CreateChannelTestRequestBodyCase3Details | null; + /** Must be a namespaced channel. E.g: channel/http */ + type: unknown; +} +export const CreateChannelTestRequestBodyCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.NullOr(CreateChannelTestRequestBodyCase3Details)), + type: S.Unknown, + }), +).annotate({ + identifier: "CreateChannelTestRequestBodyCase3", +}) as any as S.Schema; + +export type CreateChannelTestRequestBody = + | CreateChannelTestRequestBodyCase0 + | CreateChannelTestRequestBodyCase1 + | CreateChannelTestRequestBodyCase2 + | CreateChannelTestRequestBodyCase3; +export const CreateChannelTestRequestBody = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateChannelTestRequest { + body?: CreateChannelTestRequestBody; +} +export const CreateChannelTestRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(CreateChannelTestRequestBody.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "POST", uri: "/api/channel/test", code: 200 })), +).annotate({ + identifier: "CreateChannelTestRequest", +}) as any as S.Schema; + +export interface CreateChannelTestResponse {} +export const CreateChannelTestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateChannelTestResponse", +}) as any as S.Schema; + +export interface CreateCloudMigrationRequest {} +export const CreateCloudMigrationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/cloud-migration", code: 200 }), + ), +).annotate({ + identifier: "CreateCloudMigrationRequest", +}) as any as S.Schema; + +export interface CreateCloudMigrationResponse {} +export const CreateCloudMigrationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCloudMigrationResponse", +}) as any as S.Schema; + +export type CreateCollectionRequestAuthorityLevel = "official"; +export const CreateCollectionRequestAuthorityLevel = /*@__PURE__*/ S.String; + +export interface CreateCollectionRequest { + authority_level?: + | CreateCollectionRequestAuthorityLevel + | (string & {}) + | null; + description?: string | null; + name: string; + namespace?: string | null; + parent_id?: number | null; +} +export const CreateCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + authority_level: S.optional( + S.NullOr(CreateCollectionRequestAuthorityLevel), + ), + description: S.optional(S.NullOr(S.String)), + name: S.String, + namespace: S.optional(S.NullOr(S.String)), + parent_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "POST", uri: "/api/collection", code: 200 })), +).annotate({ + identifier: "CreateCollectionRequest", +}) as any as S.Schema; + +export interface CreateCollectionResponse {} +export const CreateCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCollectionResponse", +}) as any as S.Schema; + +export type CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList = + Array; +export const CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateCollectionMoveDashboardQuestionCandidateRequestBody { + card_ids?: CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList; +} +export const CreateCollectionMoveDashboardQuestionCandidateRequestBody = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_ids: S.optional( + CreateCollectionMoveDashboardQuestionCandidateRequestBodyCardIdsList, + ), + }), + ).annotate({ + identifier: "CreateCollectionMoveDashboardQuestionCandidateRequestBody", + }) as any as S.Schema; + +export interface CreateCollectionMoveDashboardQuestionCandidateRequest { + /** value must be an integer greater than zero. */ + id: number; + body?: CreateCollectionMoveDashboardQuestionCandidateRequestBody | null; +} +export const CreateCollectionMoveDashboardQuestionCandidateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + body: S.optional( + S.NullOr( + CreateCollectionMoveDashboardQuestionCandidateRequestBody, + ).pipe(T.HttpBody()), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/collection/{id}/move-dashboard-question-candidates", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateCollectionMoveDashboardQuestionCandidateRequest", + }) as any as S.Schema; + +export interface CreateCollectionMoveDashboardQuestionCandidateResponse {} +export const CreateCollectionMoveDashboardQuestionCandidateResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateCollectionMoveDashboardQuestionCandidateResponse", + }) as any as S.Schema; + +export type CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList = + Array; +export const CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateCollectionRootMoveDashboardQuestionCandidateRequestBody { + card_ids?: CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList; +} +export const CreateCollectionRootMoveDashboardQuestionCandidateRequestBody = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_ids: S.optional( + CreateCollectionRootMoveDashboardQuestionCandidateRequestBodyCardIdsList, + ), + }), + ).annotate({ + identifier: "CreateCollectionRootMoveDashboardQuestionCandidateRequestBody", + }) as any as S.Schema; + +export interface CreateCollectionRootMoveDashboardQuestionCandidateRequest { + body?: CreateCollectionRootMoveDashboardQuestionCandidateRequestBody | null; +} +export const CreateCollectionRootMoveDashboardQuestionCandidateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional( + S.NullOr( + CreateCollectionRootMoveDashboardQuestionCandidateRequestBody, + ).pipe(T.HttpBody()), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/collection/root/move-dashboard-question-candidates", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateCollectionRootMoveDashboardQuestionCandidateRequest", + }) as any as S.Schema; + +export interface CreateCollectionRootMoveDashboardQuestionCandidateResponse {} +export const CreateCollectionRootMoveDashboardQuestionCandidateResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateCollectionRootMoveDashboardQuestionCandidateResponse", + }) as any as S.Schema; + +export type CreateCommentRequestTargetType = "document"; +export const CreateCommentRequestTargetType = /*@__PURE__*/ S.String; + +export interface CreateCommentRequest { + child_target_id?: string | null; + content: unknown; + parent_comment_id?: number | null; + /** value must be an integer greater than zero. */ + target_id: number; + target_type: CreateCommentRequestTargetType | (string & {}); +} +export const CreateCommentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + child_target_id: S.optional(S.NullOr(S.String)), + content: S.Unknown, + parent_comment_id: S.optional(S.NullOr(S.Number)), + target_id: S.Number, + target_type: CreateCommentRequestTargetType, + }).pipe(T.Http({ method: "POST", uri: "/api/comment", code: 200 })), +).annotate({ + identifier: "CreateCommentRequest", +}) as any as S.Schema; + +export interface CreateCommentResponse {} +export const CreateCommentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCommentResponse", +}) as any as S.Schema; + +export interface CreateCommentReactionRequest { + /** value must be an integer greater than zero. */ + comment_id: number; + emoji: string; +} +export const CreateCommentReactionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + comment_id: S.Number.pipe(T.Label()), + emoji: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/comment/{comment_id}/reaction", + code: 200, + }), + ), +).annotate({ + identifier: "CreateCommentReactionRequest", +}) as any as S.Schema; + +export interface CreateCommentReactionResponse {} +export const CreateCommentReactionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateCommentReactionResponse", +}) as any as S.Schema; + +export interface CreateDashboardRequest { + cache_ttl?: number | null; + collection_id?: number | null; + collection_position?: number | null; + description?: string | null; + name: string; + parameters?: MetabaseParametersSchemaParameters | null; +} +export const CreateDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cache_ttl: S.optional(S.NullOr(S.Number)), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + name: S.String, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + }).pipe(T.Http({ method: "POST", uri: "/api/dashboard", code: 200 })), +).annotate({ + identifier: "CreateDashboardRequest", +}) as any as S.Schema; + +export interface CreateDashboardResponse {} +export const CreateDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDashboardResponse", +}) as any as S.Schema; + +export interface CreateDashboardCopyRequest { + /** value must be an integer greater than zero. */ + from_dashboard_id: number; + collection_id?: number | null; + collection_position?: number | null; + description?: string | null; + is_deep_copy?: boolean | null; + name?: string | null; +} +export const CreateDashboardCopyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + from_dashboard_id: S.Number.pipe(T.Label()), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + is_deep_copy: S.optional(S.NullOr(S.Boolean)), + name: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/{from_dashboard_id}/copy", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDashboardCopyRequest", +}) as any as S.Schema; + +export interface CreateDashboardCopyResponse {} +export const CreateDashboardCopyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDashboardCopyResponse", +}) as any as S.Schema; + +export interface CreateDashboardDashcardCardQueryRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + dashboard_load_id?: string | null; + parameters?: MetabaseParametersSchemaParameterValues | null; +} +export const CreateDashboardDashcardCardQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + dashboard_load_id: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDashboardDashcardCardQueryRequest", +}) as any as S.Schema; + +export interface CreateDashboardDashcardCardQueryResponse {} +export const CreateDashboardDashcardCardQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDashboardDashcardCardQueryResponse", +}) as any as S.Schema; + +/** value must map parameter ids to scalar values. */ +export type MetabaseActionsSchemaExecuteParameterValuesStringKeys = { + [key: string]: unknown | undefined; +}; +export const MetabaseActionsSchemaExecuteParameterValuesStringKeys = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export interface CreateDashboardDashcardExecuteRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; + /** value must be an integer greater than zero. */ + dashcard_id: number; + parameters?: MetabaseActionsSchemaExecuteParameterValuesStringKeys | null; +} +export const CreateDashboardDashcardExecuteRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + parameters: S.optional( + S.NullOr(MetabaseActionsSchemaExecuteParameterValuesStringKeys), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDashboardDashcardExecuteRequest", +}) as any as S.Schema; + +export interface CreateDashboardDashcardExecuteResponse {} +export const CreateDashboardDashcardExecuteResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDashboardDashcardExecuteResponse", +}) as any as S.Schema; + +export interface CreateDashboardDashcardExecuteRequest2 { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + modelId?: number | null; + parameters?: MetabaseActionsSchemaExecuteParameterValues | null; +} +export const CreateDashboardDashcardExecuteRequest2 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + modelId: S.optional(S.NullOr(S.Number)), + parameters: S.optional( + S.NullOr(MetabaseActionsSchemaExecuteParameterValues), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDashboardDashcardExecuteRequest2", +}) as any as S.Schema; + +export interface CreateDashboardDashcardExecute2Response {} +export const CreateDashboardDashcardExecute2Response = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDashboardDashcardExecute2Response", +}) as any as S.Schema; + +export type CreateDashboardPdfRequestPaperSize = "a4" | "letter"; +export const CreateDashboardPdfRequestPaperSize = /*@__PURE__*/ S.String; + +export interface CreateDashboardPdfRequest { + /** value must be an integer greater than zero. */ + id: number; + paper_size?: CreateDashboardPdfRequestPaperSize | (string & {}) | null; + parameters?: MetabaseParametersSchemaParameterValues | null; +} +export const CreateDashboardPdfRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + paper_size: S.optional(S.NullOr(CreateDashboardPdfRequestPaperSize)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + }).pipe( + T.Http({ method: "POST", uri: "/api/dashboard/{id}/pdf", code: 200 }), + ), +).annotate({ + identifier: "CreateDashboardPdfRequest", +}) as any as S.Schema; + +export interface CreateDashboardPdfResponse {} +export const CreateDashboardPdfResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDashboardPdfResponse", +}) as any as S.Schema; + +export interface CreateDashboardPivotDashboardDashcardCardQueryRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + parameters?: MetabaseParametersSchemaParameterValues | null; +} +export const CreateDashboardPivotDashboardDashcardCardQueryRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/pivot/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateDashboardPivotDashboardDashcardCardQueryRequest", + }) as any as S.Schema; + +export interface CreateDashboardPivotDashboardDashcardCardQueryResponse {} +export const CreateDashboardPivotDashboardDashcardCardQueryResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateDashboardPivotDashboardDashcardCardQueryResponse", + }) as any as S.Schema; + +export interface CreateDashboardPublicLinkRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; +} +export const CreateDashboardPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/{dashboard_id}/public_link", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDashboardPublicLinkRequest", +}) as any as S.Schema; + +export interface CreateDashboardPublicLinkResponse {} +export const CreateDashboardPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDashboardPublicLinkResponse", +}) as any as S.Schema; + +export type CreateDashboardSaveRequestDashcardsItemSeriesItemId = + | number + | string; +export const CreateDashboardSaveRequestDashcardsItemSeriesItemId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateDashboardSaveRequestDashcardsItemSeriesItem { + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + description?: string | null; + display?: string | null; + id?: CreateDashboardSaveRequestDashcardsItemSeriesItemId | null; + name?: string | null; + visualization_settings?: unknown | null; +} +export const CreateDashboardSaveRequestDashcardsItemSeriesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(S.String)), + id: S.optional( + S.NullOr(CreateDashboardSaveRequestDashcardsItemSeriesItemId), + ), + name: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }), + ).annotate({ + identifier: "CreateDashboardSaveRequestDashcardsItemSeriesItem", + }) as any as S.Schema; + +export type CreateDashboardSaveRequestDashcardsItemSeriesList = + Array; +export const CreateDashboardSaveRequestDashcardsItemSeriesList = + /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestDashcardsItemSeriesItem, + ) as any as S.Schema; + +export type CreateDashboardSaveRequestDashcardsItemCardId = number | string; +export const CreateDashboardSaveRequestDashcardsItemCardId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateDashboardSaveRequestDashcardsItemCard { + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + description?: string | null; + display?: string | null; + id?: CreateDashboardSaveRequestDashcardsItemCardId | null; + name?: string | null; + visualization_settings?: unknown | null; +} +export const CreateDashboardSaveRequestDashcardsItemCard = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(S.String)), + id: S.optional(S.NullOr(CreateDashboardSaveRequestDashcardsItemCardId)), + name: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }), + ).annotate({ + identifier: "CreateDashboardSaveRequestDashcardsItemCard", + }) as any as S.Schema; + +export interface CreateDashboardSaveRequestDashcardsItem { + visualization_settings?: unknown | null; + dashboard_tab_id?: number | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + size_x?: number | null; + size_y?: number | null; + col?: number | null; + row?: number | null; + series?: CreateDashboardSaveRequestDashcardsItemSeriesList | null; + card?: CreateDashboardSaveRequestDashcardsItemCard | null; +} +export const CreateDashboardSaveRequestDashcardsItem = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + size_x: S.optional(S.NullOr(S.Number)), + size_y: S.optional(S.NullOr(S.Number)), + col: S.optional(S.NullOr(S.Number)), + row: S.optional(S.NullOr(S.Number)), + series: S.optional( + S.NullOr(CreateDashboardSaveRequestDashcardsItemSeriesList), + ), + card: S.optional(S.NullOr(CreateDashboardSaveRequestDashcardsItemCard)), + }), +).annotate({ + identifier: "CreateDashboardSaveRequestDashcardsItem", +}) as any as S.Schema; + +export type CreateDashboardSaveRequestDashcardsList = + Array; +export const CreateDashboardSaveRequestDashcardsList = /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestDashcardsItem, +) as any as S.Schema; + +export interface CreateDashboardSaveRequestTabsItem { + /** value must be an integer. */ + id: number; + name: string; + /** value must be an integer greater or equal to than zero. */ + position?: number; +} +export const CreateDashboardSaveRequestTabsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number, + name: S.String, + position: S.optional(S.Number), + }), +).annotate({ + identifier: "CreateDashboardSaveRequestTabsItem", +}) as any as S.Schema; + +export type CreateDashboardSaveRequestTabsList = + Array; +export const CreateDashboardSaveRequestTabsList = /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestTabsItem, +) as any as S.Schema; + +export type CreateDashboardSaveRequestWidth = "fixed" | "full"; +export const CreateDashboardSaveRequestWidth = /*@__PURE__*/ S.String; + +export interface CreateDashboardSaveRequest { + auto_apply_filters?: boolean | null; + dashcards?: CreateDashboardSaveRequestDashcardsList | null; + description?: string | null; + name?: string | null; + parameters?: MetabaseParametersSchemaParameters | null; + tabs?: CreateDashboardSaveRequestTabsList | null; + width?: CreateDashboardSaveRequestWidth | (string & {}) | null; +} +export const CreateDashboardSaveRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + auto_apply_filters: S.optional(S.NullOr(S.Boolean)), + dashcards: S.optional(S.NullOr(CreateDashboardSaveRequestDashcardsList)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + tabs: S.optional(S.NullOr(CreateDashboardSaveRequestTabsList)), + width: S.optional(S.NullOr(CreateDashboardSaveRequestWidth)), + }).pipe(T.Http({ method: "POST", uri: "/api/dashboard/save", code: 200 })), +).annotate({ + identifier: "CreateDashboardSaveRequest", +}) as any as S.Schema; + +export interface CreateDashboardSaveResponse {} +export const CreateDashboardSaveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDashboardSaveResponse", +}) as any as S.Schema; + +export type CreateDatabaseRequestConnectionSource = "admin" | "setup"; +export const CreateDatabaseRequestConnectionSource = /*@__PURE__*/ S.String; + +export type MetabaseUtilCronScheduleMapScheduleDay = + | "sun" + | "mon" + | "tue" + | "wed" + | "thu" + | "fri" + | "sat"; +export const MetabaseUtilCronScheduleMapScheduleDay = /*@__PURE__*/ S.String; + +export type MetabaseUtilCronScheduleMapScheduleFrame = "first" | "mid" | "last"; +export const MetabaseUtilCronScheduleMapScheduleFrame = /*@__PURE__*/ S.String; + +export type MetabaseUtilCronScheduleMapScheduleType = + | "hourly" + | "daily" + | "weekly" + | "monthly"; +export const MetabaseUtilCronScheduleMapScheduleType = /*@__PURE__*/ S.String; + +/** value must be a valid schedule map. See schema in metabase.util.cron for details. */ +export interface MetabaseUtilCronScheduleMap { + schedule_day?: MetabaseUtilCronScheduleMapScheduleDay | (string & {}) | null; + schedule_frame?: + | MetabaseUtilCronScheduleMapScheduleFrame + | (string & {}) + | null; + schedule_hour?: number | null; + schedule_minute?: number | null; + schedule_type: MetabaseUtilCronScheduleMapScheduleType | (string & {}); +} +export const MetabaseUtilCronScheduleMap = /*@__PURE__*/ S.suspend(() => + S.Struct({ + schedule_day: S.optional(S.NullOr(MetabaseUtilCronScheduleMapScheduleDay)), + schedule_frame: S.optional( + S.NullOr(MetabaseUtilCronScheduleMapScheduleFrame), + ), + schedule_hour: S.optional(S.NullOr(S.Number)), + schedule_minute: S.optional(S.NullOr(S.Number)), + schedule_type: MetabaseUtilCronScheduleMapScheduleType, + }), +).annotate({ + identifier: "MetabaseUtilCronScheduleMap", +}) as any as S.Schema; + +/** value must be a valid map of schedule maps for a DB. */ +export interface MetabaseSyncSchedulesExpandedSchedulesMap { + cache_field_values?: MetabaseUtilCronScheduleMap | null; + metadata_sync?: MetabaseUtilCronScheduleMap; +} +export const MetabaseSyncSchedulesExpandedSchedulesMap = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cache_field_values: S.optional(S.NullOr(MetabaseUtilCronScheduleMap)), + metadata_sync: S.optional(MetabaseUtilCronScheduleMap), + }), + ).annotate({ + identifier: "MetabaseSyncSchedulesExpandedSchedulesMap", + }) as any as S.Schema; + +export interface CreateDatabaseRequest { + provider_name?: string | null; + name: string; + is_on_demand?: boolean | null; + cache_ttl?: number | null; + /** value must be a valid database engine. */ + engine: string; + /** Value must be a map. */ + details: unknown; + is_full_sync?: boolean | null; + connection_source?: + | CreateDatabaseRequestConnectionSource + | (string & {}) + | null; + auto_run_queries?: boolean | null; + is_stub?: boolean | null; + schedules?: MetabaseSyncSchedulesExpandedSchedulesMap | null; +} +export const CreateDatabaseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + provider_name: S.optional(S.NullOr(S.String)), + name: S.String, + is_on_demand: S.optional(S.NullOr(S.Boolean)), + cache_ttl: S.optional(S.NullOr(S.Number)), + engine: S.String, + details: S.Unknown, + is_full_sync: S.optional(S.NullOr(S.Boolean)), + connection_source: S.optional( + S.NullOr(CreateDatabaseRequestConnectionSource), + ), + auto_run_queries: S.optional(S.NullOr(S.Boolean)), + is_stub: S.optional(S.NullOr(S.Boolean)), + schedules: S.optional(S.NullOr(MetabaseSyncSchedulesExpandedSchedulesMap)), + }).pipe(T.Http({ method: "POST", uri: "/api/database", code: 200 })), +).annotate({ + identifier: "CreateDatabaseRequest", +}) as any as S.Schema; + +export interface CreateDatabaseResponse {} +export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatabaseResponse", +}) as any as S.Schema; + +export interface CreateDatabaseDiscardValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateDatabaseDiscardValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/database/{id}/discard_values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDatabaseDiscardValueRequest", +}) as any as S.Schema; + +export interface CreateDatabaseDiscardValueResponse {} +export const CreateDatabaseDiscardValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatabaseDiscardValueResponse", +}) as any as S.Schema; + +export interface CreateDatabaseDismissSpinnerRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateDatabaseDismissSpinnerRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/database/{id}/dismiss_spinner", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDatabaseDismissSpinnerRequest", +}) as any as S.Schema; + +export interface CreateDatabaseDismissSpinnerResponse {} +export const CreateDatabaseDismissSpinnerResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDatabaseDismissSpinnerResponse", +}) as any as S.Schema; + +export interface CreateDatabaseRescanValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateDatabaseRescanValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/database/{id}/rescan_values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDatabaseRescanValueRequest", +}) as any as S.Schema; + +export interface CreateDatabaseRescanValueResponse {} +export const CreateDatabaseRescanValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatabaseRescanValueResponse", +}) as any as S.Schema; + +export interface CreateDatabaseSampleDatabaseRequest {} +export const CreateDatabaseSampleDatabaseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/database/sample_database", code: 200 }), + ), +).annotate({ + identifier: "CreateDatabaseSampleDatabaseRequest", +}) as any as S.Schema; + +export interface CreateDatabaseSampleDatabaseResponse {} +export const CreateDatabaseSampleDatabaseResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDatabaseSampleDatabaseResponse", +}) as any as S.Schema; + +export interface CreateDatabaseSyncSchemaRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateDatabaseSyncSchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/database/{id}/sync_schema", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDatabaseSyncSchemaRequest", +}) as any as S.Schema; + +export interface CreateDatabaseSyncSchemaResponse {} +export const CreateDatabaseSyncSchemaResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatabaseSyncSchemaResponse", +}) as any as S.Schema; + +export interface CreateDatabaseValidateRequestDetails { + /** Value must be a map. */ + details: unknown; + /** value must be a valid database engine. */ + engine: string; +} +export const CreateDatabaseValidateRequestDetails = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + details: S.Unknown, + engine: S.String, + }), +).annotate({ + identifier: "CreateDatabaseValidateRequestDetails", +}) as any as S.Schema; + +export interface CreateDatabaseValidateRequest { + details: CreateDatabaseValidateRequestDetails; +} +export const CreateDatabaseValidateRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: CreateDatabaseValidateRequestDetails, + }).pipe(T.Http({ method: "POST", uri: "/api/database/validate", code: 200 })), +).annotate({ + identifier: "CreateDatabaseValidateRequest", +}) as any as S.Schema; + +export interface CreateDatabaseValidateResponse {} +export const CreateDatabaseValidateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatabaseValidateResponse", +}) as any as S.Schema; + +export type MetabaseLibBeSchemaInternalQueryArgsList = Array; +export const MetabaseLibBeSchemaInternalQueryArgsList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +/** A legacy internal audit query, e.g. `{:type :internal, :fn ...}`. These are not MBQL; the audit-app middleware validates the `:fn` and `:args` against the queries it defines. */ +export interface MetabaseLibBeSchemaInternalQuery { + args?: MetabaseLibBeSchemaInternalQueryArgsList | null; + fn: string; + limit?: number | null; + offset?: number | null; + type: unknown; +} +export const MetabaseLibBeSchemaInternalQuery = /*@__PURE__*/ S.suspend(() => + S.Struct({ + args: S.optional(S.NullOr(MetabaseLibBeSchemaInternalQueryArgsList)), + fn: S.String, + limit: S.optional(S.NullOr(S.Number)), + offset: S.optional(S.NullOr(S.Number)), + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseLibBeSchemaInternalQuery", +}) as any as S.Schema; + +/** value must be a valid MBQL query, or an internal audit query. */ +export type MetabaseLibBeSchemaMaybeLegacyOrInternalQuery = + | MetabaseLibBeSchemaInternalQuery + | MetabaseLibSchemaQuery; +export const MetabaseLibBeSchemaMaybeLegacyOrInternalQuery = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateDatasetRequest { + body?: MetabaseLibBeSchemaMaybeLegacyOrInternalQuery; +} +export const CreateDatasetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional( + MetabaseLibBeSchemaMaybeLegacyOrInternalQuery.pipe(T.HttpBody()), + ), + }).pipe(T.Http({ method: "POST", uri: "/api/dataset", code: 200 })), +).annotate({ + identifier: "CreateDatasetRequest", +}) as any as S.Schema; + +export interface CreateDatasetResponse {} +export const CreateDatasetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatasetResponse", +}) as any as S.Schema; + +export interface CreateDatasetNativeRequest { + /** value must be an integer greater than zero. */ + database: number; + parameters?: MetabaseLibSchemaParameterParameters | null; + pretty?: boolean | null; +} +export const CreateDatasetNativeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + database: S.Number, + parameters: S.optional(S.NullOr(MetabaseLibSchemaParameterParameters)), + pretty: S.optional(S.NullOr(S.Boolean)), + }).pipe(T.Http({ method: "POST", uri: "/api/dataset/native", code: 200 })), +).annotate({ + identifier: "CreateDatasetNativeRequest", +}) as any as S.Schema; + +export interface CreateDatasetNativeResponse {} +export const CreateDatasetNativeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatasetNativeResponse", +}) as any as S.Schema; + +export type CreateDatasetParameterRemappingRequestFieldIdsList = Array; +export const CreateDatasetParameterRemappingRequestFieldIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDatasetParameterRemappingRequest { + field_ids?: CreateDatasetParameterRemappingRequestFieldIdsList | null; + parameter: MetabaseParametersSchemaParameter; + value: unknown; +} +export const CreateDatasetParameterRemappingRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + field_ids: S.optional( + S.NullOr(CreateDatasetParameterRemappingRequestFieldIdsList), + ), + parameter: MetabaseParametersSchemaParameter, + value: S.Unknown, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dataset/parameter/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDatasetParameterRemappingRequest", +}) as any as S.Schema; + +export interface CreateDatasetParameterRemappingResponse {} +export const CreateDatasetParameterRemappingResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDatasetParameterRemappingResponse", +}) as any as S.Schema; + +export type CreateDatasetParameterValueRequestFieldIdsList = Array; +export const CreateDatasetParameterValueRequestFieldIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDatasetParameterValueRequest { + field_ids?: CreateDatasetParameterValueRequestFieldIdsList | null; + parameter: MetabaseParametersSchemaParameter; +} +export const CreateDatasetParameterValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + field_ids: S.optional( + S.NullOr(CreateDatasetParameterValueRequestFieldIdsList), + ), + parameter: MetabaseParametersSchemaParameter, + }).pipe( + T.Http({ method: "POST", uri: "/api/dataset/parameter/values", code: 200 }), + ), +).annotate({ + identifier: "CreateDatasetParameterValueRequest", +}) as any as S.Schema; + +export interface CreateDatasetParameterValueResponse {} +export const CreateDatasetParameterValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatasetParameterValueResponse", +}) as any as S.Schema; + +export type CreateDatasetPivotRequestPivotRowsList = Array; +export const CreateDatasetPivotRequestPivotRowsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CreateDatasetPivotRequestDatabase = unknown | number; +export const CreateDatasetPivotRequestDatabase = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateDatasetPivotRequestPivotMeasuresList = Array; +export const CreateDatasetPivotRequestPivotMeasuresList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CreateDatasetPivotRequestPivotColsList = Array; +export const CreateDatasetPivotRequestPivotColsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateDatasetPivotRequest { + lib_metadata?: unknown; + show_column_totals?: boolean | null; + pivot_rows?: CreateDatasetPivotRequestPivotRowsList | null; + update_row?: MetabaseLibSchemaActionsRow; + lib_type?: unknown; + settings?: MetabaseLibSchemaSettingsSettings; + constraints?: MetabaseLibSchemaConstraintsConstraints; + info?: MetabaseLibSchemaInfoInfo; + show_row_totals?: boolean | null; + middleware?: MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions; + database?: CreateDatasetPivotRequestDatabase; + pivot_measures?: CreateDatasetPivotRequestPivotMeasuresList | null; + stages: unknown; + pivot_cols?: CreateDatasetPivotRequestPivotColsList | null; + parameters?: MetabaseLibSchemaParameterParameters; + create_row?: MetabaseLibSchemaActionsRow; + /** Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query results. */ + was_pivot?: boolean | null; +} +export const CreateDatasetPivotRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lib_metadata: S.optional(S.Unknown.pipe(T.Body("lib/metadata"))), + show_column_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-column-totals")), + ), + pivot_rows: S.optional( + S.NullOr(CreateDatasetPivotRequestPivotRowsList).pipe( + T.Body("pivot-rows"), + ), + ), + update_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("update-row")), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional(MetabaseLibSchemaSettingsSettings), + constraints: S.optional(MetabaseLibSchemaConstraintsConstraints), + info: S.optional(MetabaseLibSchemaInfoInfo), + show_row_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-row-totals")), + ), + middleware: S.optional(MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions), + database: S.optional(CreateDatasetPivotRequestDatabase), + pivot_measures: S.optional( + S.NullOr(CreateDatasetPivotRequestPivotMeasuresList).pipe( + T.Body("pivot-measures"), + ), + ), + stages: S.Unknown, + pivot_cols: S.optional( + S.NullOr(CreateDatasetPivotRequestPivotColsList).pipe( + T.Body("pivot-cols"), + ), + ), + parameters: S.optional(MetabaseLibSchemaParameterParameters), + create_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("create-row")), + ), + was_pivot: S.optional(S.NullOr(S.Boolean).pipe(T.Body("was-pivot"))), + }).pipe(T.Http({ method: "POST", uri: "/api/dataset/pivot", code: 200 })), +).annotate({ + identifier: "CreateDatasetPivotRequest", +}) as any as S.Schema; + +export interface CreateDatasetPivotResponse {} +export const CreateDatasetPivotResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatasetPivotResponse", +}) as any as S.Schema; + +export type CreateDatasetQueryMetadataRequestPivotRowsList = Array; +export const CreateDatasetQueryMetadataRequestPivotRowsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDatasetQueryMetadataRequestDatabase = unknown | number; +export const CreateDatasetQueryMetadataRequestDatabase = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateDatasetQueryMetadataRequestPivotMeasuresList = Array; +export const CreateDatasetQueryMetadataRequestPivotMeasuresList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDatasetQueryMetadataRequestPivotColsList = Array; +export const CreateDatasetQueryMetadataRequestPivotColsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDatasetQueryMetadataRequest { + lib_metadata?: unknown; + show_column_totals?: boolean | null; + pivot_rows?: CreateDatasetQueryMetadataRequestPivotRowsList | null; + update_row?: MetabaseLibSchemaActionsRow; + lib_type?: unknown; + settings?: MetabaseLibSchemaSettingsSettings; + constraints?: MetabaseLibSchemaConstraintsConstraints; + info?: MetabaseLibSchemaInfoInfo; + show_row_totals?: boolean | null; + middleware?: MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions; + database?: CreateDatasetQueryMetadataRequestDatabase; + pivot_measures?: CreateDatasetQueryMetadataRequestPivotMeasuresList | null; + stages: unknown; + pivot_cols?: CreateDatasetQueryMetadataRequestPivotColsList | null; + parameters?: MetabaseLibSchemaParameterParameters; + create_row?: MetabaseLibSchemaActionsRow; + /** Whether this query was originally run as a pivot query. Stamped into the saved `json_query` by `metabase.query-processor.middleware.process-userland-query` and sent back by clients re-downloading pivot query results. */ + was_pivot?: boolean | null; +} +export const CreateDatasetQueryMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + lib_metadata: S.optional(S.Unknown.pipe(T.Body("lib/metadata"))), + show_column_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-column-totals")), + ), + pivot_rows: S.optional( + S.NullOr(CreateDatasetQueryMetadataRequestPivotRowsList).pipe( + T.Body("pivot-rows"), + ), + ), + update_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("update-row")), + ), + lib_type: S.optional(S.Unknown.pipe(T.Body("lib/type"))), + settings: S.optional(MetabaseLibSchemaSettingsSettings), + constraints: S.optional(MetabaseLibSchemaConstraintsConstraints), + info: S.optional(MetabaseLibSchemaInfoInfo), + show_row_totals: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("show-row-totals")), + ), + middleware: S.optional(MetabaseLibSchemaMiddlewareOptionsMiddlewareOptions), + database: S.optional(CreateDatasetQueryMetadataRequestDatabase), + pivot_measures: S.optional( + S.NullOr(CreateDatasetQueryMetadataRequestPivotMeasuresList).pipe( + T.Body("pivot-measures"), + ), + ), + stages: S.Unknown, + pivot_cols: S.optional( + S.NullOr(CreateDatasetQueryMetadataRequestPivotColsList).pipe( + T.Body("pivot-cols"), + ), + ), + parameters: S.optional(MetabaseLibSchemaParameterParameters), + create_row: S.optional( + MetabaseLibSchemaActionsRow.pipe(T.Body("create-row")), + ), + was_pivot: S.optional(S.NullOr(S.Boolean).pipe(T.Body("was-pivot"))), + }).pipe( + T.Http({ method: "POST", uri: "/api/dataset/query_metadata", code: 200 }), + ), +).annotate({ + identifier: "CreateDatasetQueryMetadataRequest", +}) as any as S.Schema; + +export interface CreateDatasetQueryMetadataResponse {} +export const CreateDatasetQueryMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDatasetQueryMetadataResponse", +}) as any as S.Schema; + +export type CreateDataStudioTableDiscardValueRequestDatabaseIdsList = + Array; +export const CreateDataStudioTableDiscardValueRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDataStudioTableDiscardValueRequestSchemaIdsList = + Array; +export const CreateDataStudioTableDiscardValueRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateDataStudioTableDiscardValueRequestTableIdsList = + Array; +export const CreateDataStudioTableDiscardValueRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDataStudioTableDiscardValueRequest { + database_ids?: CreateDataStudioTableDiscardValueRequestDatabaseIdsList; + schema_ids?: CreateDataStudioTableDiscardValueRequestSchemaIdsList; + table_ids?: CreateDataStudioTableDiscardValueRequestTableIdsList; +} +export const CreateDataStudioTableDiscardValueRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + database_ids: S.optional( + CreateDataStudioTableDiscardValueRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateDataStudioTableDiscardValueRequestSchemaIdsList, + ), + table_ids: S.optional( + CreateDataStudioTableDiscardValueRequestTableIdsList, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/data-studio/table/discard-values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDataStudioTableDiscardValueRequest", +}) as any as S.Schema; + +export interface CreateDataStudioTableDiscardValueResponse {} +export const CreateDataStudioTableDiscardValueResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateDataStudioTableDiscardValueResponse", + }) as any as S.Schema; + +export type MetabaseDataStudioApiTableDataAuthorities = + | "computed" + | "authoritative" + | "unconfigured" + | "ingested"; +export const MetabaseDataStudioApiTableDataAuthorities = /*@__PURE__*/ S.String; + +export type MetabaseDataStudioApiTableDataLayers = + | "final" + | "internal" + | "hidden"; +export const MetabaseDataStudioApiTableDataLayers = /*@__PURE__*/ S.String; + +export type CreateDataStudioTableEditRequestTableIdsList = Array; +export const CreateDataStudioTableEditRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type MetabaseDataStudioApiTableDataSources = + | "source-data" + | "transform" + | "unknown" + | "ingested" + | "metabase-transform" + | "upload"; +export const MetabaseDataStudioApiTableDataSources = /*@__PURE__*/ S.String; + +export type CreateDataStudioTableEditRequestSchemaIdsList = Array; +export const CreateDataStudioTableEditRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateDataStudioTableEditRequestDatabaseIdsList = Array; +export const CreateDataStudioTableEditRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDataStudioTableEditRequest { + data_authority?: + | MetabaseDataStudioApiTableDataAuthorities + | (string & {}) + | null; + data_layer?: MetabaseDataStudioApiTableDataLayers | (string & {}) | null; + table_ids?: CreateDataStudioTableEditRequestTableIdsList; + owner_email?: string | null; + owner_user_id?: number | null; + data_source?: MetabaseDataStudioApiTableDataSources | (string & {}) | null; + schema_ids?: CreateDataStudioTableEditRequestSchemaIdsList; + entity_type?: string | null; + database_ids?: CreateDataStudioTableEditRequestDatabaseIdsList; +} +export const CreateDataStudioTableEditRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + data_authority: S.optional( + S.NullOr(MetabaseDataStudioApiTableDataAuthorities), + ), + data_layer: S.optional(S.NullOr(MetabaseDataStudioApiTableDataLayers)), + table_ids: S.optional(CreateDataStudioTableEditRequestTableIdsList), + owner_email: S.optional(S.NullOr(S.String)), + owner_user_id: S.optional(S.NullOr(S.Number)), + data_source: S.optional(S.NullOr(MetabaseDataStudioApiTableDataSources)), + schema_ids: S.optional(CreateDataStudioTableEditRequestSchemaIdsList), + entity_type: S.optional(S.NullOr(S.String)), + database_ids: S.optional(CreateDataStudioTableEditRequestDatabaseIdsList), + }).pipe( + T.Http({ method: "POST", uri: "/api/data-studio/table/edit", code: 200 }), + ), +).annotate({ + identifier: "CreateDataStudioTableEditRequest", +}) as any as S.Schema; + +export interface CreateDataStudioTableEditResponse {} +export const CreateDataStudioTableEditResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDataStudioTableEditResponse", +}) as any as S.Schema; + +export type CreateDataStudioTableRescanValueRequestDatabaseIdsList = + Array; +export const CreateDataStudioTableRescanValueRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDataStudioTableRescanValueRequestSchemaIdsList = + Array; +export const CreateDataStudioTableRescanValueRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateDataStudioTableRescanValueRequestTableIdsList = Array; +export const CreateDataStudioTableRescanValueRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDataStudioTableRescanValueRequest { + database_ids?: CreateDataStudioTableRescanValueRequestDatabaseIdsList; + schema_ids?: CreateDataStudioTableRescanValueRequestSchemaIdsList; + table_ids?: CreateDataStudioTableRescanValueRequestTableIdsList; +} +export const CreateDataStudioTableRescanValueRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + database_ids: S.optional( + CreateDataStudioTableRescanValueRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateDataStudioTableRescanValueRequestSchemaIdsList, + ), + table_ids: S.optional( + CreateDataStudioTableRescanValueRequestTableIdsList, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/data-studio/table/rescan-values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDataStudioTableRescanValueRequest", +}) as any as S.Schema; + +export interface CreateDataStudioTableRescanValueResponse {} +export const CreateDataStudioTableRescanValueResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDataStudioTableRescanValueResponse", +}) as any as S.Schema; + +export type CreateDataStudioTableSelectionRequestDatabaseIdsList = + Array; +export const CreateDataStudioTableSelectionRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDataStudioTableSelectionRequestSchemaIdsList = Array; +export const CreateDataStudioTableSelectionRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateDataStudioTableSelectionRequestTableIdsList = Array; +export const CreateDataStudioTableSelectionRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDataStudioTableSelectionRequest { + database_ids?: CreateDataStudioTableSelectionRequestDatabaseIdsList; + schema_ids?: CreateDataStudioTableSelectionRequestSchemaIdsList; + table_ids?: CreateDataStudioTableSelectionRequestTableIdsList; +} +export const CreateDataStudioTableSelectionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + database_ids: S.optional( + CreateDataStudioTableSelectionRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateDataStudioTableSelectionRequestSchemaIdsList, + ), + table_ids: S.optional(CreateDataStudioTableSelectionRequestTableIdsList), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/data-studio/table/selection", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDataStudioTableSelectionRequest", +}) as any as S.Schema; + +export interface CreateDataStudioTableSelectionResponse {} +export const CreateDataStudioTableSelectionResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDataStudioTableSelectionResponse", +}) as any as S.Schema; + +export type CreateDataStudioTableSyncSchemaRequestDatabaseIdsList = + Array; +export const CreateDataStudioTableSyncSchemaRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateDataStudioTableSyncSchemaRequestSchemaIdsList = Array; +export const CreateDataStudioTableSyncSchemaRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateDataStudioTableSyncSchemaRequestTableIdsList = Array; +export const CreateDataStudioTableSyncSchemaRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateDataStudioTableSyncSchemaRequest { + database_ids?: CreateDataStudioTableSyncSchemaRequestDatabaseIdsList; + schema_ids?: CreateDataStudioTableSyncSchemaRequestSchemaIdsList; + table_ids?: CreateDataStudioTableSyncSchemaRequestTableIdsList; +} +export const CreateDataStudioTableSyncSchemaRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + database_ids: S.optional( + CreateDataStudioTableSyncSchemaRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateDataStudioTableSyncSchemaRequestSchemaIdsList, + ), + table_ids: S.optional(CreateDataStudioTableSyncSchemaRequestTableIdsList), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/data-studio/table/sync-schema", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDataStudioTableSyncSchemaRequest", +}) as any as S.Schema; + +export interface CreateDataStudioTableSyncSchemaResponse {} +export const CreateDataStudioTableSyncSchemaResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateDataStudioTableSyncSchemaResponse", +}) as any as S.Schema; + +export type CreateDocumentRequestCardsValueParameterMappingsList = + Array; +export const CreateDocumentRequestCardsValueParameterMappingsList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export type CreateDocumentRequestCardsValueResultMetadataList = Array; +export const CreateDocumentRequestCardsValueResultMetadataList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface CreateDocumentRequestCardsValue { + /** Value must be a map. */ + visualization_settings: unknown; + entity_id?: string | null; + dataset_query: MetabaseLibSchemaQuery; + parameter_mappings?: CreateDocumentRequestCardsValueParameterMappingsList | null; + name: string; + result_metadata?: CreateDocumentRequestCardsValueResultMetadataList | null; + cache_ttl?: number | null; + display: string; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const CreateDocumentRequestCardsValue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.Unknown, + entity_id: S.optional(S.NullOr(S.String)), + dataset_query: MetabaseLibSchemaQuery, + parameter_mappings: S.optional( + S.NullOr(CreateDocumentRequestCardsValueParameterMappingsList), + ), + name: S.String, + result_metadata: S.optional( + S.NullOr(CreateDocumentRequestCardsValueResultMetadataList), + ), + cache_ttl: S.optional(S.NullOr(S.Number)), + display: S.String, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "CreateDocumentRequestCardsValue", +}) as any as S.Schema; + +export type CreateDocumentRequestCardsMap = { + [key: string]: CreateDocumentRequestCardsValue | undefined; +}; +export const CreateDocumentRequestCardsMap = /*@__PURE__*/ S.Record( + S.String, + CreateDocumentRequestCardsValue, +) as any as S.Schema; + +/** A prose-mirror document AST as it arrives at the API. Normalized to keyword keys, the same form the app-DB `:document` column transform yields. */ +export interface MetabaseDocumentsProseMirrorAst { + type: string; +} +export const MetabaseDocumentsProseMirrorAst = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.String, + }), +).annotate({ + identifier: "MetabaseDocumentsProseMirrorAst", +}) as any as S.Schema; + +export interface CreateDocumentRequest { + cards?: CreateDocumentRequestCardsMap | null; + collection_id?: number | null; + collection_position?: number | null; + document: MetabaseDocumentsProseMirrorAst; + name: string; +} +export const CreateDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cards: S.optional(S.NullOr(CreateDocumentRequestCardsMap)), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + document: MetabaseDocumentsProseMirrorAst, + name: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/document", code: 200 })), +).annotate({ + identifier: "CreateDocumentRequest", +}) as any as S.Schema; + +export interface CreateDocumentResponse {} +export const CreateDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDocumentResponse", +}) as any as S.Schema; + +export interface CreateDocumentCopyRequest { + /** value must be an integer greater than zero. */ + from_document_id: number; + collection_id?: number | null; + collection_position?: number | null; + name?: string | null; +} +export const CreateDocumentCopyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + from_document_id: S.Number.pipe(T.Label()), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + name: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/document/{from_document_id}/copy", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDocumentCopyRequest", +}) as any as S.Schema; + +export interface CreateDocumentCopyResponse {} +export const CreateDocumentCopyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDocumentCopyResponse", +}) as any as S.Schema; + +export interface CreateDocumentPublicLinkRequest { + /** value must be an integer greater than zero. */ + document_id: number; +} +export const CreateDocumentPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/document/{document_id}/public-link", + code: 200, + }), + ), +).annotate({ + identifier: "CreateDocumentPublicLinkRequest", +}) as any as S.Schema; + +export interface CreateDocumentPublicLinkResponse {} +export const CreateDocumentPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateDocumentPublicLinkResponse", +}) as any as S.Schema; + +/** Primitive actions, saved actions, and packed encodings from the picker. */ +export type MetabaseEnterpriseActionV2ApiApiActionId = number | string; +export const MetabaseEnterpriseActionV2ApiApiActionId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** All the various ways of referring to an action with the v2 APIs. */ +export type MetabaseEnterpriseActionV2ApiApiActionIdOrExpression = + | MetabaseEnterpriseActionV2ApiApiActionId + | unknown; +export const MetabaseEnterpriseActionV2ApiApiActionIdOrExpression = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** A map from parameter name / column name to a value. Keys are keywords: the request decoder keywordizes map keys and the handler reads them via `(keyword ...)`, so the FE never sends anything else. Same shape as [[metabase.actions.schema/execute-parameter-values]] and for the same two reasons. Decoding sees a permissive `[:map-of :keyword :any]`, because `:map-of` *drops* an entry whose value fails rather than rejecting it -- a bad cell would silently go missing from the write instead of 400ing. And `parameter.value` must be validated against rather than decoded through: its `:decode/normalize` rewrites a bad value to `nil`, which for an action that writes would store NULL instead of rejecting the request. */ +export type MetabaseEnterpriseActionV2ApiActionValueMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseEnterpriseActionV2ApiActionValueMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase0 { + /** value must be an integer greater than zero. */ + dashboard_id: number; + type?: string; +} +export const MetabaseActionsTypesScopeRawCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Body("dashboard-id")), + type: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase0", +}) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase1 { + /** value must be an integer greater than zero. */ + dashcard_id: number; + type?: string; +} +export const MetabaseActionsTypesScopeRawCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashcard_id: S.Number.pipe(T.Body("dashcard-id")), + type: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase1", +}) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase2 { + /** value must be an integer greater than zero. */ + card_id: number; + type?: string; +} +export const MetabaseActionsTypesScopeRawCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Body("card-id")), + type: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase2", +}) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase3 { + /** value must be an integer greater than zero. */ + model_id: number; + type?: string; +} +export const MetabaseActionsTypesScopeRawCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model_id: S.Number.pipe(T.Body("model-id")), + type: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase3", +}) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase4 { + /** value must be an integer greater than zero. */ + table_id: number; + type?: string; +} +export const MetabaseActionsTypesScopeRawCase4 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + table_id: S.Number.pipe(T.Body("table-id")), + type: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase4", +}) as any as S.Schema; + +export interface MetabaseActionsTypesScopeRawCase5 { + type?: string; + /** value must be an integer greater than zero. */ + webhook_id: number; +} +export const MetabaseActionsTypesScopeRawCase5 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + webhook_id: S.Number.pipe(T.Body("webhook-id")), + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase5", +}) as any as S.Schema; + +export type MetabaseActionsTypesScopeRawCase6Unknown = "model-action"; +export const MetabaseActionsTypesScopeRawCase6Unknown = /*@__PURE__*/ S.String; + +export interface MetabaseActionsTypesScopeRawCase6 { + type?: string; + unknown: MetabaseActionsTypesScopeRawCase6Unknown; +} +export const MetabaseActionsTypesScopeRawCase6 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.optional(S.String), + unknown: MetabaseActionsTypesScopeRawCase6Unknown, + }), +).annotate({ + identifier: "MetabaseActionsTypesScopeRawCase6", +}) as any as S.Schema; + +export type MetabaseActionsTypesScopeRaw = + | MetabaseActionsTypesScopeRawCase0 + | MetabaseActionsTypesScopeRawCase1 + | MetabaseActionsTypesScopeRawCase2 + | MetabaseActionsTypesScopeRawCase3 + | MetabaseActionsTypesScopeRawCase4 + | MetabaseActionsTypesScopeRawCase5 + | MetabaseActionsTypesScopeRawCase6; +export const MetabaseActionsTypesScopeRaw = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateEeActionV2ExecuteRequest { + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression; + input?: MetabaseEnterpriseActionV2ApiActionValueMap; + params?: MetabaseEnterpriseActionV2ApiActionValueMap; + scope: MetabaseActionsTypesScopeRaw; +} +export const CreateEeActionV2ExecuteRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression, + input: S.optional(MetabaseEnterpriseActionV2ApiActionValueMap), + params: S.optional(MetabaseEnterpriseActionV2ApiActionValueMap), + scope: MetabaseActionsTypesScopeRaw, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/action-v2/execute", code: 200 }), + ), +).annotate({ + identifier: "CreateEeActionV2ExecuteRequest", +}) as any as S.Schema; + +export interface CreateEeActionV2ExecuteResponse {} +export const CreateEeActionV2ExecuteResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeActionV2ExecuteResponse", +}) as any as S.Schema; + +export type CreateEeActionV2ExecuteBulkRequestInputsList = + Array; +export const CreateEeActionV2ExecuteBulkRequestInputsList = + /*@__PURE__*/ S.Array( + MetabaseEnterpriseActionV2ApiActionValueMap, + ) as any as S.Schema; + +export interface CreateEeActionV2ExecuteBulkRequest { + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression; + inputs: CreateEeActionV2ExecuteBulkRequestInputsList; + params?: MetabaseEnterpriseActionV2ApiActionValueMap; + scope: MetabaseActionsTypesScopeRaw; +} +export const CreateEeActionV2ExecuteBulkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression, + inputs: CreateEeActionV2ExecuteBulkRequestInputsList, + params: S.optional(MetabaseEnterpriseActionV2ApiActionValueMap), + scope: MetabaseActionsTypesScopeRaw, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/action-v2/execute-bulk", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeActionV2ExecuteBulkRequest", +}) as any as S.Schema; + +export interface CreateEeActionV2ExecuteBulkResponse {} +export const CreateEeActionV2ExecuteBulkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeActionV2ExecuteBulkResponse", +}) as any as S.Schema; + +export interface CreateEeActionV2ExecuteFormRequest { + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression; + input?: MetabaseEnterpriseActionV2ApiActionValueMap; + scope: MetabaseActionsTypesScopeRaw; +} +export const CreateEeActionV2ExecuteFormRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action: MetabaseEnterpriseActionV2ApiApiActionIdOrExpression, + input: S.optional(MetabaseEnterpriseActionV2ApiActionValueMap), + scope: MetabaseActionsTypesScopeRaw, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/action-v2/execute-form", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeActionV2ExecuteFormRequest", +}) as any as S.Schema; + +export interface CreateEeActionV2ExecuteFormResponse {} +export const CreateEeActionV2ExecuteFormResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeActionV2ExecuteFormResponse", +}) as any as S.Schema; + +export interface CreateEeAiControlsPermissionsAdvancedRequest {} +export const CreateEeAiControlsPermissionsAdvancedRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/ai-controls/permissions/advanced", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeAiControlsPermissionsAdvancedRequest", + }) as any as S.Schema; + +export interface CreateEeAiControlsPermissionsAdvancedResponse {} +export const CreateEeAiControlsPermissionsAdvancedResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeAiControlsPermissionsAdvancedResponse", + }) as any as S.Schema; + +export interface CreateEeAuditAppAnalyticsDevExportRequest {} +export const CreateEeAuditAppAnalyticsDevExportRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/audit-app/analytics-dev/export", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeAuditAppAnalyticsDevExportRequest", + }) as any as S.Schema; + +export interface CreateEeAuditAppAnalyticsDevExportResponse {} +export const CreateEeAuditAppAnalyticsDevExportResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeAuditAppAnalyticsDevExportResponse", + }) as any as S.Schema; + +export interface CreateEeContentTranslationUploadDictionaryRequestFile { + filename: string; + size: number; + tempfile: unknown; +} +export const CreateEeContentTranslationUploadDictionaryRequestFile = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + filename: S.String, + size: S.Number, + tempfile: S.Unknown, + }), + ).annotate({ + identifier: "CreateEeContentTranslationUploadDictionaryRequestFile", + }) as any as S.Schema; + +export interface CreateEeContentTranslationUploadDictionaryRequest { + file: CreateEeContentTranslationUploadDictionaryRequestFile; +} +export const CreateEeContentTranslationUploadDictionaryRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: CreateEeContentTranslationUploadDictionaryRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/content-translation/upload-dictionary", + code: 200, + contentType: "multipart", + }), + ), + ).annotate({ + identifier: "CreateEeContentTranslationUploadDictionaryRequest", + }) as any as S.Schema; + +export interface CreateEeContentTranslationUploadDictionaryResponse {} +export const CreateEeContentTranslationUploadDictionaryResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeContentTranslationUploadDictionaryResponse", + }) as any as S.Schema; + +export interface CreateEeCustomVizPluginRequestFile { + filename: string; + /** value must be an integer greater or equal to than zero. */ + size: number; + tempfile: unknown; +} +export const CreateEeCustomVizPluginRequestFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + filename: S.String, + size: S.Number, + tempfile: S.Unknown, + }), +).annotate({ + identifier: "CreateEeCustomVizPluginRequestFile", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginRequest { + file: CreateEeCustomVizPluginRequestFile; +} +export const CreateEeCustomVizPluginRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + file: CreateEeCustomVizPluginRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/custom-viz-plugin", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "CreateEeCustomVizPluginRequest", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginResponse {} +export const CreateEeCustomVizPluginResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeCustomVizPluginResponse", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginDevRequest { + dev_bundle_url: string; + identifier?: string | null; +} +export const CreateEeCustomVizPluginDevRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dev_bundle_url: S.String, + identifier: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/custom-viz-plugin/dev", code: 200 }), + ), +).annotate({ + identifier: "CreateEeCustomVizPluginDevRequest", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginDevResponse {} +export const CreateEeCustomVizPluginDevResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeCustomVizPluginDevResponse", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginRefreshRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateEeCustomVizPluginRefreshRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/custom-viz-plugin/{id}/refresh", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeCustomVizPluginRefreshRequest", +}) as any as S.Schema; + +export interface CreateEeCustomVizPluginRefreshResponse {} +export const CreateEeCustomVizPluginRefreshResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeCustomVizPluginRefreshResponse", +}) as any as S.Schema; + +export type CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType = + | "inclusion" + | "exclusion" + | "all"; +export const CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType = + /*@__PURE__*/ S.String; + +export interface CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters { + schema_filters_patterns: string; + schema_filters_type: + | CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType + | (string & {}); +} +export const CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + schema_filters_patterns: S.String.pipe(T.Body("schema-filters-patterns")), + schema_filters_type: + CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFiltersSchemaFiltersType.pipe( + T.Body("schema-filters-type"), + ), + }), + ).annotate({ + identifier: + "CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters", + }) as any as S.Schema; + +export interface CreateEeDatabaseReplicationConnectionDatabasePreviewRequest { + /** value must be an integer greater than zero. */ + database_id: number; + replicationSchemaFilters?: CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters; +} +export const CreateEeDatabaseReplicationConnectionDatabasePreviewRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number.pipe(T.Label()), + replicationSchemaFilters: S.optional( + CreateEeDatabaseReplicationConnectionDatabasePreviewRequestReplicationSchemaFilters, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/database-replication/connection/{database_id}/preview", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeDatabaseReplicationConnectionDatabasePreviewRequest", + }) as any as S.Schema; + +export interface CreateEeDatabaseReplicationConnectionDatabasePreviewResponse {} +export const CreateEeDatabaseReplicationConnectionDatabasePreviewResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeDatabaseReplicationConnectionDatabasePreviewResponse", + }) as any as S.Schema; + +export interface CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem { + /** Value must be a map. */ + details: unknown; + name: string; +} +export const CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.Unknown, + name: S.String, + }), + ).annotate({ + identifier: + "CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem", + }) as any as S.Schema; + +export type CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList = + Array; +export const CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList = + /*@__PURE__*/ S.Array( + CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsItem, + ) as any as S.Schema; + +export interface CreateEeDatabaseRoutingDestinationDatabaseRequest { + check_connection_details?: boolean; + destinations: CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList; + /** value must be an integer greater than zero. */ + router_database_id: number; +} +export const CreateEeDatabaseRoutingDestinationDatabaseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + check_connection_details: S.optional(S.Boolean.pipe(T.Query())), + destinations: + CreateEeDatabaseRoutingDestinationDatabaseRequestDestinationsList, + router_database_id: S.Number, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/database-routing/destination-database", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeDatabaseRoutingDestinationDatabaseRequest", + }) as any as S.Schema; + +export interface CreateEeDatabaseRoutingDestinationDatabaseResponse {} +export const CreateEeDatabaseRoutingDestinationDatabaseResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeDatabaseRoutingDestinationDatabaseResponse", + }) as any as S.Schema; + +export type CreateEeDataStudioTablePublishTableRequestDatabaseIdsList = + Array; +export const CreateEeDataStudioTablePublishTableRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateEeDataStudioTablePublishTableRequestSchemaIdsList = + Array; +export const CreateEeDataStudioTablePublishTableRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateEeDataStudioTablePublishTableRequestTableIdsList = + Array; +export const CreateEeDataStudioTablePublishTableRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateEeDataStudioTablePublishTableRequest { + /** value must be an integer greater than zero. */ + collection_id: number; + database_ids?: CreateEeDataStudioTablePublishTableRequestDatabaseIdsList; + schema_ids?: CreateEeDataStudioTablePublishTableRequestSchemaIdsList; + table_ids?: CreateEeDataStudioTablePublishTableRequestTableIdsList; +} +export const CreateEeDataStudioTablePublishTableRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.Number, + database_ids: S.optional( + CreateEeDataStudioTablePublishTableRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateEeDataStudioTablePublishTableRequestSchemaIdsList, + ), + table_ids: S.optional( + CreateEeDataStudioTablePublishTableRequestTableIdsList, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/data-studio/table/publish-tables", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeDataStudioTablePublishTableRequest", + }) as any as S.Schema; + +export interface CreateEeDataStudioTablePublishTableResponse {} +export const CreateEeDataStudioTablePublishTableResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeDataStudioTablePublishTableResponse", + }) as any as S.Schema; + +export type CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList = + Array; +export const CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList = + Array; +export const CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateEeDataStudioTableUnpublishTableRequestTableIdsList = + Array; +export const CreateEeDataStudioTableUnpublishTableRequestTableIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateEeDataStudioTableUnpublishTableRequest { + database_ids?: CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList; + schema_ids?: CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList; + table_ids?: CreateEeDataStudioTableUnpublishTableRequestTableIdsList; +} +export const CreateEeDataStudioTableUnpublishTableRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_ids: S.optional( + CreateEeDataStudioTableUnpublishTableRequestDatabaseIdsList, + ), + schema_ids: S.optional( + CreateEeDataStudioTableUnpublishTableRequestSchemaIdsList, + ), + table_ids: S.optional( + CreateEeDataStudioTableUnpublishTableRequestTableIdsList, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/data-studio/table/unpublish-tables", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeDataStudioTableUnpublishTableRequest", + }) as any as S.Schema; + +export interface CreateEeDataStudioTableUnpublishTableResponse {} +export const CreateEeDataStudioTableUnpublishTableResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeDataStudioTableUnpublishTableResponse", + }) as any as S.Schema; + +export interface CreateEeGsheetsConnectionRequest { + url: string; +} +export const CreateEeGsheetsConnectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/gsheets/connection", code: 200 }), + ), +).annotate({ + identifier: "CreateEeGsheetsConnectionRequest", +}) as any as S.Schema; + +export interface CreateEeGsheetsConnectionResponse {} +export const CreateEeGsheetsConnectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeGsheetsConnectionResponse", +}) as any as S.Schema; + +export interface CreateEeGsheetsConnectionSyncRequest {} +export const CreateEeGsheetsConnectionSyncRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/gsheets/connection/sync", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeGsheetsConnectionSyncRequest", +}) as any as S.Schema; + +export interface CreateEeGsheetsConnectionSyncResponse {} +export const CreateEeGsheetsConnectionSyncResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeGsheetsConnectionSyncResponse", +}) as any as S.Schema; + +export interface CreateEeLibraryRequest {} +export const CreateEeLibraryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/ee/library", code: 200 }), + ), +).annotate({ + identifier: "CreateEeLibraryRequest", +}) as any as S.Schema; + +export interface CreateEeLibraryResponse {} +export const CreateEeLibraryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeLibraryResponse", +}) as any as S.Schema; + +export interface CreateEeMfaAdminRemoveRequest { + /** value must be an integer greater than zero. */ + user_id: number; +} +export const CreateEeMfaAdminRemoveRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_id: S.Number, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/mfa/admin/remove", code: 200 }), + ), +).annotate({ + identifier: "CreateEeMfaAdminRemoveRequest", +}) as any as S.Schema; + +export interface CreateEeMfaAdminRemoveResponse {} +export const CreateEeMfaAdminRemoveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeMfaAdminRemoveResponse", +}) as any as S.Schema; + +export interface CreateEeMfaDisableRequest { + code: string; +} +export const CreateEeMfaDisableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/ee/mfa/disable", code: 200 })), +).annotate({ + identifier: "CreateEeMfaDisableRequest", +}) as any as S.Schema; + +export interface CreateEeMfaDisableResponse {} +export const CreateEeMfaDisableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeMfaDisableResponse", +}) as any as S.Schema; + +export interface CreateEeMfaEnrollRequest { + password: string | Redacted.Redacted; +} +export const CreateEeMfaEnrollRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + password: S.String.pipe(T.SensitiveValue({})), + }).pipe(T.Http({ method: "POST", uri: "/api/ee/mfa/enroll", code: 200 })), +).annotate({ + identifier: "CreateEeMfaEnrollRequest", +}) as any as S.Schema; + +export interface CreateEeMfaEnrollResponse {} +export const CreateEeMfaEnrollResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeMfaEnrollResponse", +}) as any as S.Schema; + +export interface CreateEeMfaEnrollConfirmRequest { + code: string; +} +export const CreateEeMfaEnrollConfirmRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/mfa/enroll/confirm", code: 200 }), + ), +).annotate({ + identifier: "CreateEeMfaEnrollConfirmRequest", +}) as any as S.Schema; + +export interface CreateEeMfaEnrollConfirmResponse {} +export const CreateEeMfaEnrollConfirmResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeMfaEnrollConfirmResponse", +}) as any as S.Schema; + +export interface CreateEeMfaRecoveryCodeRequest { + code: string; +} +export const CreateEeMfaRecoveryCodeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + code: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/mfa/recovery-codes", code: 200 }), + ), +).annotate({ + identifier: "CreateEeMfaRecoveryCodeRequest", +}) as any as S.Schema; + +export interface CreateEeMfaRecoveryCodeResponse {} +export const CreateEeMfaRecoveryCodeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeMfaRecoveryCodeResponse", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncCreateBranchRequest { + name: string; +} +export const CreateEeRemoteSyncCreateBranchRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + name: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/remote-sync/create-branch", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeRemoteSyncCreateBranchRequest", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncCreateBranchResponse {} +export const CreateEeRemoteSyncCreateBranchResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeRemoteSyncCreateBranchResponse", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncCurrentTaskCancelRequest {} +export const CreateEeRemoteSyncCurrentTaskCancelRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/remote-sync/current-task/cancel", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeRemoteSyncCurrentTaskCancelRequest", + }) as any as S.Schema; + +export interface CreateEeRemoteSyncCurrentTaskCancelResponse {} +export const CreateEeRemoteSyncCurrentTaskCancelResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeRemoteSyncCurrentTaskCancelResponse", + }) as any as S.Schema; + +export interface CreateEeRemoteSyncExportRequest { + branch: string; + force?: boolean; + merge?: boolean; + message?: string; +} +export const CreateEeRemoteSyncExportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + branch: S.String, + force: S.optional(S.Boolean), + merge: S.optional(S.Boolean), + message: S.optional(S.String), + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/remote-sync/export", code: 200 }), + ), +).annotate({ + identifier: "CreateEeRemoteSyncExportRequest", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncExportResponse {} +export const CreateEeRemoteSyncExportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeRemoteSyncExportResponse", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncImportRequest { + branch?: string; + expected_branch: string; + force?: boolean; + merge?: boolean; +} +export const CreateEeRemoteSyncImportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + branch: S.optional(S.String), + expected_branch: S.String, + force: S.optional(S.Boolean), + merge: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/remote-sync/import", code: 200 }), + ), +).annotate({ + identifier: "CreateEeRemoteSyncImportRequest", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncImportResponse {} +export const CreateEeRemoteSyncImportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeRemoteSyncImportResponse", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncStashRequest { + message: string; + new_branch: string; +} +export const CreateEeRemoteSyncStashRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message: S.String, + new_branch: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/remote-sync/stash", code: 200 }), + ), +).annotate({ + identifier: "CreateEeRemoteSyncStashRequest", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncStashResponse {} +export const CreateEeRemoteSyncStashResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeRemoteSyncStashResponse", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncTestConnectionRequest { + remote_sync_token?: string | null; + remote_sync_url?: string | null; +} +export const CreateEeRemoteSyncTestConnectionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + remote_sync_token: S.optional( + S.NullOr(S.String).pipe(T.Body("remote-sync-token")), + ), + remote_sync_url: S.optional( + S.NullOr(S.String).pipe(T.Body("remote-sync-url")), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/remote-sync/test-connection", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeRemoteSyncTestConnectionRequest", +}) as any as S.Schema; + +export interface CreateEeRemoteSyncTestConnectionResponse {} +export const CreateEeRemoteSyncTestConnectionResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeRemoteSyncTestConnectionResponse", +}) as any as S.Schema; + +export type MetabaseEnterpriseReplacementSchemaSourceEntityType = + | "card" + | "table" + | "transform"; +export const MetabaseEnterpriseReplacementSchemaSourceEntityType = + /*@__PURE__*/ S.String; + +export interface CreateEeReplacementCheckReplaceSourceRequest { + source_entity_id: number; + source_entity_type: + | MetabaseEnterpriseReplacementSchemaSourceEntityType + | (string & {}); + target_entity_id: number; + target_entity_type: + | MetabaseEnterpriseReplacementSchemaSourceEntityType + | (string & {}); +} +export const CreateEeReplacementCheckReplaceSourceRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + source_entity_id: S.Number, + source_entity_type: MetabaseEnterpriseReplacementSchemaSourceEntityType, + target_entity_id: S.Number, + target_entity_type: MetabaseEnterpriseReplacementSchemaSourceEntityType, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/replacement/check-replace-source", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeReplacementCheckReplaceSourceRequest", + }) as any as S.Schema; + +export interface CreateEeReplacementCheckReplaceSourceResponse {} +export const CreateEeReplacementCheckReplaceSourceResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeReplacementCheckReplaceSourceResponse", + }) as any as S.Schema; + +export interface CreateEeReplacementReplaceSourceRequest { + source_entity_id: number; + source_entity_type: + | MetabaseEnterpriseReplacementSchemaSourceEntityType + | (string & {}); + target_entity_id: number; + target_entity_type: + | MetabaseEnterpriseReplacementSchemaSourceEntityType + | (string & {}); +} +export const CreateEeReplacementReplaceSourceRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + source_entity_id: S.Number, + source_entity_type: MetabaseEnterpriseReplacementSchemaSourceEntityType, + target_entity_id: S.Number, + target_entity_type: MetabaseEnterpriseReplacementSchemaSourceEntityType, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/replacement/replace-source", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeReplacementReplaceSourceRequest", +}) as any as S.Schema; + +export interface CreateEeReplacementReplaceSourceResponse {} +export const CreateEeReplacementReplaceSourceResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeReplacementReplaceSourceResponse", +}) as any as S.Schema; + +export interface CreateEeReplacementRunCancelRequest { + id: number; +} +export const CreateEeReplacementRunCancelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/replacement/runs/{id}/cancel", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeReplacementRunCancelRequest", +}) as any as S.Schema; + +export interface CreateEeReplacementRunCancelResponse {} +export const CreateEeReplacementRunCancelResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeReplacementRunCancelResponse", +}) as any as S.Schema; + +export interface CreateEeScimGroupRequestMembersItem { + _ref?: string; + value: string; +} +export const CreateEeScimGroupRequestMembersItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + _ref: S.optional(S.String.pipe(T.Body("$ref"))), + value: S.String, + }), +).annotate({ + identifier: "CreateEeScimGroupRequestMembersItem", +}) as any as S.Schema; + +export type CreateEeScimGroupRequestMembersList = + Array; +export const CreateEeScimGroupRequestMembersList = /*@__PURE__*/ S.Array( + CreateEeScimGroupRequestMembersItem, +) as any as S.Schema; + +export type CreateEeScimGroupRequestSchemasList = Array; +export const CreateEeScimGroupRequestSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface CreateEeScimGroupRequest { + displayName: string; + id?: string; + members?: CreateEeScimGroupRequestMembersList; + schemas: CreateEeScimGroupRequestSchemasList; +} +export const CreateEeScimGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + displayName: S.String, + id: S.optional(S.String), + members: S.optional(CreateEeScimGroupRequestMembersList), + schemas: CreateEeScimGroupRequestSchemasList, + }).pipe(T.Http({ method: "POST", uri: "/api/ee/scim/v2/Groups", code: 200 })), +).annotate({ + identifier: "CreateEeScimGroupRequest", +}) as any as S.Schema; + +export interface CreateEeScimGroupResponse {} +export const CreateEeScimGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeScimGroupResponse", +}) as any as S.Schema; + +export interface CreateEeScimKeyRequest {} +export const CreateEeScimKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/ee/scim/api_key", code: 200 }), + ), +).annotate({ + identifier: "CreateEeScimKeyRequest", +}) as any as S.Schema; + +export interface CreateEeScimKeyResponse {} +export const CreateEeScimKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeScimKeyResponse", +}) as any as S.Schema; + +export interface CreateEeScimUserRequestEmailsItem { + primary?: boolean; + type?: string; + value: string; +} +export const CreateEeScimUserRequestEmailsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + primary: S.optional(S.Boolean), + type: S.optional(S.String), + value: S.String, + }), +).annotate({ + identifier: "CreateEeScimUserRequestEmailsItem", +}) as any as S.Schema; + +export type CreateEeScimUserRequestEmailsList = + Array; +export const CreateEeScimUserRequestEmailsList = /*@__PURE__*/ S.Array( + CreateEeScimUserRequestEmailsItem, +) as any as S.Schema; + +export interface CreateEeScimUserRequestGroupsItem { + _ref?: string; + display: string; + value: string; +} +export const CreateEeScimUserRequestGroupsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + _ref: S.optional(S.String.pipe(T.Body("$ref"))), + display: S.String, + value: S.String, + }), +).annotate({ + identifier: "CreateEeScimUserRequestGroupsItem", +}) as any as S.Schema; + +export type CreateEeScimUserRequestGroupsList = + Array; +export const CreateEeScimUserRequestGroupsList = /*@__PURE__*/ S.Array( + CreateEeScimUserRequestGroupsItem, +) as any as S.Schema; + +export interface CreateEeScimUserRequestName { + familyName: string; + givenName: string; +} +export const CreateEeScimUserRequestName = /*@__PURE__*/ S.suspend(() => + S.Struct({ + familyName: S.String, + givenName: S.String, + }), +).annotate({ + identifier: "CreateEeScimUserRequestName", +}) as any as S.Schema; + +export type CreateEeScimUserRequestSchemasList = Array; +export const CreateEeScimUserRequestSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface CreateEeScimUserRequest { + active?: boolean; + emails: CreateEeScimUserRequestEmailsList; + groups?: CreateEeScimUserRequestGroupsList; + id?: string; + locale?: string | null; + name: CreateEeScimUserRequestName; + schemas: CreateEeScimUserRequestSchemasList; + userName: string; +} +export const CreateEeScimUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.Boolean), + emails: CreateEeScimUserRequestEmailsList, + groups: S.optional(CreateEeScimUserRequestGroupsList), + id: S.optional(S.String), + locale: S.optional(S.NullOr(S.String)), + name: CreateEeScimUserRequestName, + schemas: CreateEeScimUserRequestSchemasList, + userName: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/ee/scim/v2/Users", code: 200 })), +).annotate({ + identifier: "CreateEeScimUserRequest", +}) as any as S.Schema; + +export interface CreateEeScimUserResponse {} +export const CreateEeScimUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeScimUserResponse", +}) as any as S.Schema; + +export type CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList = + Array; +export const CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface CreateEeSecurityCenterAcknowledgeRequest { + advisory_ids: CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList; +} +export const CreateEeSecurityCenterAcknowledgeRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + advisory_ids: CreateEeSecurityCenterAcknowledgeRequestAdvisoryIdsList, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/security-center/acknowledge", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeSecurityCenterAcknowledgeRequest", +}) as any as S.Schema; + +export interface CreateEeSecurityCenterAcknowledgeResponse {} +export const CreateEeSecurityCenterAcknowledgeResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeSecurityCenterAcknowledgeResponse", + }) as any as S.Schema; + +export interface CreateEeSecurityCenterAcknowledgeRequest2 { + advisory_id: string; +} +export const CreateEeSecurityCenterAcknowledgeRequest2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + advisory_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/security-center/{advisory_id}/acknowledge", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeSecurityCenterAcknowledgeRequest2", + }) as any as S.Schema; + +export interface CreateEeSecurityCenterAcknowledge2Response {} +export const CreateEeSecurityCenterAcknowledge2Response = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeSecurityCenterAcknowledge2Response", + }) as any as S.Schema; + +export interface CreateEeSecurityCenterSyncRequest {} +export const CreateEeSecurityCenterSyncRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/ee/security-center/sync", code: 200 }), + ), +).annotate({ + identifier: "CreateEeSecurityCenterSyncRequest", +}) as any as S.Schema; + +export interface CreateEeSecurityCenterSyncResponse {} +export const CreateEeSecurityCenterSyncResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeSecurityCenterSyncResponse", +}) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationRecipientCase0Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsNotificationRecipientCase0Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationRecipientCase0 { + details?: unknown; + /** value must be an integer greater than zero. */ + id?: number; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsNotificationRecipientCase0Type + | (string & {}); + /** value must be an integer greater than zero. */ + user_id: number; +} +export const MetabaseNotificationModelsNotificationRecipientCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.Unknown), + id: S.optional(S.Number), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsNotificationRecipientCase0Type, + user_id: S.Number, + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase0", + }) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationRecipientCase1Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsNotificationRecipientCase1Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationRecipientCase1 { + details?: unknown; + /** value must be an integer greater than zero. */ + id?: number; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + /** value must be an integer greater than zero. */ + permissions_group_id: number; + type: + | MetabaseNotificationModelsNotificationRecipientCase1Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsNotificationRecipientCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.Unknown), + id: S.optional(S.Number), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.Number, + type: MetabaseNotificationModelsNotificationRecipientCase1Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase1", + }) as any as S.Schema; + +export interface MetabaseNotificationModelsNotificationRecipientCase2Details { + channel_id?: string | null; + value: unknown; +} +export const MetabaseNotificationModelsNotificationRecipientCase2Details = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + channel_id: S.optional(S.NullOr(S.String)), + value: S.Unknown, + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase2Details", + }) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationRecipientCase2Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsNotificationRecipientCase2Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationRecipientCase2 { + details: MetabaseNotificationModelsNotificationRecipientCase2Details; + /** value must be an integer greater than zero. */ + id?: number; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsNotificationRecipientCase2Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsNotificationRecipientCase2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: MetabaseNotificationModelsNotificationRecipientCase2Details, + id: S.optional(S.Number), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsNotificationRecipientCase2Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase2", + }) as any as S.Schema; + +export interface MetabaseNotificationModelsNotificationRecipientCase3Details { + is_optional?: boolean; + pattern: string; +} +export const MetabaseNotificationModelsNotificationRecipientCase3Details = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_optional: S.optional(S.Boolean), + pattern: S.String, + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase3Details", + }) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationRecipientCase3Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsNotificationRecipientCase3Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationRecipientCase3 { + details: MetabaseNotificationModelsNotificationRecipientCase3Details; + /** value must be an integer greater than zero. */ + id?: number; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsNotificationRecipientCase3Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsNotificationRecipientCase3 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: MetabaseNotificationModelsNotificationRecipientCase3Details, + id: S.optional(S.Number), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsNotificationRecipientCase3Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationRecipientCase3", + }) as any as S.Schema; + +/** Schema for :model/NotificationRecipient. */ +export type MetabaseNotificationModelsNotificationRecipient = + | MetabaseNotificationModelsNotificationRecipientCase0 + | MetabaseNotificationModelsNotificationRecipientCase1 + | MetabaseNotificationModelsNotificationRecipientCase2 + | MetabaseNotificationModelsNotificationRecipientCase3; +export const MetabaseNotificationModelsNotificationRecipient = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList = + Array; +export const CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsNotificationRecipient, + ) as any as S.Schema; + +export interface CreateEeSecurityCenterTestNotificationRequest { + email_recipients?: CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList | null; + slack_channel?: string | null; +} +export const CreateEeSecurityCenterTestNotificationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + email_recipients: S.optional( + S.NullOr( + CreateEeSecurityCenterTestNotificationRequestEmailRecipientsList, + ), + ), + slack_channel: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/security-center/test-notification", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeSecurityCenterTestNotificationRequest", + }) as any as S.Schema; + +export interface CreateEeSecurityCenterTestNotificationResponse {} +export const CreateEeSecurityCenterTestNotificationResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeSecurityCenterTestNotificationResponse", + }) as any as S.Schema; + +export type CreateEeSerializationExportRequestCollectionItem = number | string; +export const CreateEeSerializationExportRequestCollectionItem = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateEeSerializationExportRequestCollectionList = + Array; +export const CreateEeSerializationExportRequestCollectionList = + /*@__PURE__*/ S.Array( + CreateEeSerializationExportRequestCollectionItem, + ) as any as S.Schema; + +export interface CreateEeSerializationExportRequest { + /** name of directory and archive file (default: `-`) */ + dirname?: string; + /** collections' db ids/entity-ids to serialize */ + collection?: CreateEeSerializationExportRequestCollectionList; + all_collections?: boolean; + settings?: boolean; + data_model?: boolean; + field_values?: boolean; + continue_on_error?: boolean; + full_stacktrace?: boolean; +} +export const CreateEeSerializationExportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dirname: S.optional(S.String.pipe(T.Query())), + collection: S.optional( + CreateEeSerializationExportRequestCollectionList.pipe(T.Query()), + ), + all_collections: S.optional(S.Boolean.pipe(T.Query())), + settings: S.optional(S.Boolean.pipe(T.Query())), + data_model: S.optional(S.Boolean.pipe(T.Query())), + field_values: S.optional(S.Boolean.pipe(T.Query())), + continue_on_error: S.optional(S.Boolean.pipe(T.Query())), + full_stacktrace: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/serialization/export", code: 200 }), + ), +).annotate({ + identifier: "CreateEeSerializationExportRequest", +}) as any as S.Schema; + +export interface CreateEeSerializationExportResponse {} +export const CreateEeSerializationExportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeSerializationExportResponse", +}) as any as S.Schema; + +/** .tgz with serialization data */ +export interface CreateEeSerializationImportRequestFile { + content_type: string; + filename: string; + size: number; + tempfile: unknown; +} +export const CreateEeSerializationImportRequestFile = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + content_type: S.String.pipe(T.Body("content-type")), + filename: S.String, + size: S.Number, + tempfile: S.Unknown, + }), +).annotate({ + identifier: "CreateEeSerializationImportRequestFile", +}) as any as S.Schema; + +export interface CreateEeSerializationImportRequest { + continue_on_error?: boolean; + full_stacktrace?: boolean; + reindex?: boolean; + /** .tgz with serialization data */ + file: CreateEeSerializationImportRequestFile; +} +export const CreateEeSerializationImportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + continue_on_error: S.optional(S.Boolean.pipe(T.Query())), + full_stacktrace: S.optional(S.Boolean.pipe(T.Query())), + reindex: S.optional(S.Boolean.pipe(T.Query())), + file: CreateEeSerializationImportRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/serialization/import", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "CreateEeSerializationImportRequest", +}) as any as S.Schema; + +export interface CreateEeSerializationImportResponse {} +export const CreateEeSerializationImportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeSerializationImportResponse", +}) as any as S.Schema; + +export interface CreateEeSerializationMetadataExportRequest { + with_databases?: boolean; + with_tables?: boolean; + with_fields?: boolean; +} +export const CreateEeSerializationMetadataExportRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + with_databases: S.optional(S.Boolean.pipe(T.Query("with-databases"))), + with_tables: S.optional(S.Boolean.pipe(T.Query("with-tables"))), + with_fields: S.optional(S.Boolean.pipe(T.Query("with-fields"))), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/serialization/metadata/export", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeSerializationMetadataExportRequest", + }) as any as S.Schema; + +export interface CreateEeSerializationMetadataExportResponse {} +export const CreateEeSerializationMetadataExportResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeSerializationMetadataExportResponse", + }) as any as S.Schema; + +export interface CreateEeSerializationMetadataImportRequest {} +export const CreateEeSerializationMetadataImportRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/serialization/metadata/import", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateEeSerializationMetadataImportRequest", + }) as any as S.Schema; + +export interface CreateEeSerializationMetadataImportResponse {} +export const CreateEeSerializationMetadataImportResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateEeSerializationMetadataImportResponse", + }) as any as S.Schema; + +export interface CreateEeSupportAccessGrantRequest { + grant_duration_minutes: number; + notes?: string | null; + ticket_number?: string | null; +} +export const CreateEeSupportAccessGrantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + grant_duration_minutes: S.Number, + notes: S.optional(S.NullOr(S.String)), + ticket_number: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ method: "POST", uri: "/api/ee/support-access-grant", code: 200 }), + ), +).annotate({ + identifier: "CreateEeSupportAccessGrantRequest", +}) as any as S.Schema; + +export interface CreateEeSupportAccessGrantResponse {} +export const CreateEeSupportAccessGrantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeSupportAccessGrantResponse", +}) as any as S.Schema; + +export type CreateEeTenantRequestAttributesMap = { + [key: string]: unknown | undefined; +}; +export const CreateEeTenantRequestAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface CreateEeTenantRequest { + attributes?: CreateEeTenantRequestAttributesMap | null; + name: string; + /** invalid slug */ + slug: string; +} +export const CreateEeTenantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attributes: S.optional(S.NullOr(CreateEeTenantRequestAttributesMap)), + name: S.String, + slug: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/ee/tenant", code: 200 })), +).annotate({ + identifier: "CreateEeTenantRequest", +}) as any as S.Schema; + +export interface CreateEeTenantResponse {} +export const CreateEeTenantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEeTenantResponse", +}) as any as S.Schema; + +export type MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue = + | string + | number + | boolean + | number; +export const MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** Params passed to a drill lens (e.g. `{:join_step 2}`), emitted on drill-lens triggers and echoed back by the FE to the lens endpoints. Scalar values only: they end up in `query_execution.lens_params`, and scalars keep map/collection shapes out of the value position. */ +export type MetabaseEnterpriseTransformsInspectorSchemaLensParams = { + [key: string]: + | MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue + | undefined; +}; +export const MetabaseEnterpriseTransformsInspectorSchemaLensParams = + /*@__PURE__*/ S.Record( + S.String, + MetabaseEnterpriseTransformsInspectorSchemaLensParamsValue, + ) as any as S.Schema; + +export interface CreateEeTransformInspectQueryRequest { + /** value must be an integer greater than zero. */ + id: number; + lens_id: string; + lens_params?: MetabaseEnterpriseTransformsInspectorSchemaLensParams | null; + query: MetabaseLibSchemaQuery; +} +export const CreateEeTransformInspectQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + lens_id: S.String.pipe(T.Label()), + lens_params: S.optional( + S.NullOr(MetabaseEnterpriseTransformsInspectorSchemaLensParams), + ), + query: MetabaseLibSchemaQuery, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/transforms/{id}/inspect/{lens_id}/query", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeTransformInspectQueryRequest", +}) as any as S.Schema; + +export interface CreateEeTransformInspectQueryResponse {} +export const CreateEeTransformInspectQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeTransformInspectQueryResponse", +}) as any as S.Schema; + +/** A source table entry in the array format. Combines alias with table reference. */ +export interface MetabaseTransformsBaseUtilSourceTableEntry { + alias: string; + database_id: number; + schema: string | null; + table?: string; + table_id?: number | null; +} +export const MetabaseTransformsBaseUtilSourceTableEntry = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + alias: S.String, + database_id: S.Number, + schema: S.NullOr(S.String), + table: S.optional(S.String), + table_id: S.optional(S.NullOr(S.Number)), + }), + ).annotate({ + identifier: "MetabaseTransformsBaseUtilSourceTableEntry", + }) as any as S.Schema; + +export type CreateEeTransformsPythonTestRunRequestSourceTablesList = + Array; +export const CreateEeTransformsPythonTestRunRequestSourceTablesList = + /*@__PURE__*/ S.Array( + MetabaseTransformsBaseUtilSourceTableEntry, + ) as any as S.Schema; + +export interface CreateEeTransformsPythonTestRunRequest { + code: string; + output_row_limit?: unknown; + per_input_row_limit?: unknown; + source_tables: CreateEeTransformsPythonTestRunRequestSourceTablesList; +} +export const CreateEeTransformsPythonTestRunRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + code: S.String, + output_row_limit: S.optional(S.Unknown), + per_input_row_limit: S.optional(S.Unknown), + source_tables: CreateEeTransformsPythonTestRunRequestSourceTablesList, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/transforms-python/test-run", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEeTransformsPythonTestRunRequest", +}) as any as S.Schema; + +export interface CreateEeTransformsPythonTestRunResponse {} +export const CreateEeTransformsPythonTestRunResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEeTransformsPythonTestRunResponse", +}) as any as S.Schema; + +export type CreateEidTranslationTranslateRequestEntityIdsValueList = + Array; +export const CreateEidTranslationTranslateRequestEntityIdsValueList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type CreateEidTranslationTranslateRequestEntityIdsMap = { + [key: string]: + | CreateEidTranslationTranslateRequestEntityIdsValueList + | undefined; +}; +export const CreateEidTranslationTranslateRequestEntityIdsMap = + /*@__PURE__*/ S.Record( + S.String, + CreateEidTranslationTranslateRequestEntityIdsValueList, + ) as any as S.Schema; + +export interface CreateEidTranslationTranslateRequest { + entity_ids: CreateEidTranslationTranslateRequestEntityIdsMap; +} +export const CreateEidTranslationTranslateRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + entity_ids: CreateEidTranslationTranslateRequestEntityIdsMap, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/eid-translation/translate", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEidTranslationTranslateRequest", +}) as any as S.Schema; + +export interface CreateEidTranslationTranslateResponse {} +export const CreateEidTranslationTranslateResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateEidTranslationTranslateResponse", +}) as any as S.Schema; + +export interface CreateEmailTestRequest {} +export const CreateEmailTestRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/email/test", code: 200 }), + ), +).annotate({ + identifier: "CreateEmailTestRequest", +}) as any as S.Schema; + +export interface CreateEmailTestResponse {} +export const CreateEmailTestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmailTestResponse", +}) as any as S.Schema; + +export interface CreateEmbedMcpDrillRequest { + encodedQuery: string; +} +export const CreateEmbedMcpDrillRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + encodedQuery: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/embed-mcp/drills", code: 200 })), +).annotate({ + identifier: "CreateEmbedMcpDrillRequest", +}) as any as S.Schema; + +export interface CreateEmbedMcpDrillResponse {} +export const CreateEmbedMcpDrillResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmbedMcpDrillResponse", +}) as any as S.Schema; + +export interface CreateEmbedMcpFeedbackRequestConversationData { + prompt?: string | null; + query?: string | null; + source: unknown; +} +export const CreateEmbedMcpFeedbackRequestConversationData = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + prompt: S.optional(S.NullOr(S.String)), + query: S.optional(S.NullOr(S.String)), + source: S.Unknown, + }), + ).annotate({ + identifier: "CreateEmbedMcpFeedbackRequestConversationData", + }) as any as S.Schema; + +export interface CreateEmbedMcpFeedbackRequestFeedback { + freeform_feedback?: string | null; + issue_type?: string | null; + message_id: string; + positive: boolean; +} +export const CreateEmbedMcpFeedbackRequestFeedback = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + freeform_feedback: S.optional(S.NullOr(S.String)), + issue_type: S.optional(S.NullOr(S.String)), + message_id: S.String, + positive: S.Boolean, + }), +).annotate({ + identifier: "CreateEmbedMcpFeedbackRequestFeedback", +}) as any as S.Schema; + +export interface CreateEmbedMcpFeedbackRequest { + conversation_data: CreateEmbedMcpFeedbackRequestConversationData; + feedback: CreateEmbedMcpFeedbackRequestFeedback; +} +export const CreateEmbedMcpFeedbackRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + conversation_data: CreateEmbedMcpFeedbackRequestConversationData, + feedback: CreateEmbedMcpFeedbackRequestFeedback, + }).pipe( + T.Http({ method: "POST", uri: "/api/embed-mcp/feedback", code: 200 }), + ), +).annotate({ + identifier: "CreateEmbedMcpFeedbackRequest", +}) as any as S.Schema; + +export interface CreateEmbedMcpFeedbackResponse {} +export const CreateEmbedMcpFeedbackResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmbedMcpFeedbackResponse", +}) as any as S.Schema; + +export interface CreateEmbedThemeRequest { + name: string; + /** Value must be a map. */ + settings: unknown; +} +export const CreateEmbedThemeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + settings: S.Unknown, + }).pipe(T.Http({ method: "POST", uri: "/api/embed-theme", code: 200 })), +).annotate({ + identifier: "CreateEmbedThemeRequest", +}) as any as S.Schema; + +export interface CreateEmbedThemeResponse {} +export const CreateEmbedThemeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmbedThemeResponse", +}) as any as S.Schema; + +export interface CreateEmbedThemeCopyRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateEmbedThemeCopyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/embed-theme/{id}/copy", code: 200 }), + ), +).annotate({ + identifier: "CreateEmbedThemeCopyRequest", +}) as any as S.Schema; + +export interface CreateEmbedThemeCopyResponse {} +export const CreateEmbedThemeCopyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmbedThemeCopyResponse", +}) as any as S.Schema; + +export interface CreateEmbedThemeSeedDefaultRequestThemesItem { + name: string; + /** Value must be a map. */ + settings: unknown; +} +export const CreateEmbedThemeSeedDefaultRequestThemesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + settings: S.Unknown, + }), + ).annotate({ + identifier: "CreateEmbedThemeSeedDefaultRequestThemesItem", + }) as any as S.Schema; + +export type CreateEmbedThemeSeedDefaultRequestThemesList = + Array; +export const CreateEmbedThemeSeedDefaultRequestThemesList = + /*@__PURE__*/ S.Array( + CreateEmbedThemeSeedDefaultRequestThemesItem, + ) as any as S.Schema; + +export interface CreateEmbedThemeSeedDefaultRequest { + themes: CreateEmbedThemeSeedDefaultRequestThemesList; +} +export const CreateEmbedThemeSeedDefaultRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + themes: CreateEmbedThemeSeedDefaultRequestThemesList, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/embed-theme/seed-defaults", + code: 200, + }), + ), +).annotate({ + identifier: "CreateEmbedThemeSeedDefaultRequest", +}) as any as S.Schema; + +export interface CreateEmbedThemeSeedDefaultResponse {} +export const CreateEmbedThemeSeedDefaultResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateEmbedThemeSeedDefaultResponse", +}) as any as S.Schema; + +export type CreateFieldDimensionRequestType = "internal" | "external"; +export const CreateFieldDimensionRequestType = /*@__PURE__*/ S.String; + +export interface CreateFieldDimensionRequest { + /** value must be an integer greater than zero. */ + id: number; + human_readable_field_id?: number | null; + name: string; + type: CreateFieldDimensionRequestType | (string & {}); +} +export const CreateFieldDimensionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + human_readable_field_id: S.optional(S.NullOr(S.Number)), + name: S.String, + type: CreateFieldDimensionRequestType, + }).pipe( + T.Http({ method: "POST", uri: "/api/field/{id}/dimension", code: 200 }), + ), +).annotate({ + identifier: "CreateFieldDimensionRequest", +}) as any as S.Schema; + +export interface CreateFieldDimensionResponse {} +export const CreateFieldDimensionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFieldDimensionResponse", +}) as any as S.Schema; + +export interface CreateFieldDiscardValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateFieldDiscardValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/field/{id}/discard_values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateFieldDiscardValueRequest", +}) as any as S.Schema; + +export interface CreateFieldDiscardValueResponse {} +export const CreateFieldDiscardValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFieldDiscardValueResponse", +}) as any as S.Schema; + +export interface CreateFieldRescanValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateFieldRescanValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/field/{id}/rescan_values", code: 200 }), + ), +).annotate({ + identifier: "CreateFieldRescanValueRequest", +}) as any as S.Schema; + +export interface CreateFieldRescanValueResponse {} +export const CreateFieldRescanValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFieldRescanValueResponse", +}) as any as S.Schema; + +export type CreateFieldTableIdsRequestFieldIdsList = Array; +export const CreateFieldTableIdsRequestFieldIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface CreateFieldTableIdsRequest { + field_ids: CreateFieldTableIdsRequestFieldIdsList; +} +export const CreateFieldTableIdsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + field_ids: CreateFieldTableIdsRequestFieldIdsList, + }).pipe(T.Http({ method: "POST", uri: "/api/field/table-ids", code: 200 })), +).annotate({ + identifier: "CreateFieldTableIdsRequest", +}) as any as S.Schema; + +export interface CreateFieldTableIdsResponse {} +export const CreateFieldTableIdsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFieldTableIdsResponse", +}) as any as S.Schema; + +export type CreateFieldValueRequestValuesItemCase0List = Array; +export const CreateFieldValueRequestValuesItemCase0List = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export type CreateFieldValueRequestValuesItemCase1List = Array; +export const CreateFieldValueRequestValuesItemCase1List = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export type CreateFieldValueRequestValuesItem = + | CreateFieldValueRequestValuesItemCase0List + | CreateFieldValueRequestValuesItemCase1List; +export const CreateFieldValueRequestValuesItem = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type CreateFieldValueRequestValuesList = + Array; +export const CreateFieldValueRequestValuesList = /*@__PURE__*/ S.Array( + CreateFieldValueRequestValuesItem, +) as any as S.Schema; + +export interface CreateFieldValueRequest { + /** value must be an integer greater than zero. */ + id: number; + values: CreateFieldValueRequestValuesList; +} +export const CreateFieldValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + values: CreateFieldValueRequestValuesList, + }).pipe(T.Http({ method: "POST", uri: "/api/field/{id}/values", code: 200 })), +).annotate({ + identifier: "CreateFieldValueRequest", +}) as any as S.Schema; + +export interface CreateFieldValueResponse {} +export const CreateFieldValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFieldValueResponse", +}) as any as S.Schema; + +export type MetabaseFrontendErrorsApiFrontendErrorType = + | "component-crash" + | "chart-render-error"; +export const MetabaseFrontendErrorsApiFrontendErrorType = + /*@__PURE__*/ S.String; + +export interface CreateFrontendErrorRequest { + type: MetabaseFrontendErrorsApiFrontendErrorType | (string & {}); +} +export const CreateFrontendErrorRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: MetabaseFrontendErrorsApiFrontendErrorType, + }).pipe(T.Http({ method: "POST", uri: "/api/frontend-errors", code: 200 })), +).annotate({ + identifier: "CreateFrontendErrorRequest", +}) as any as S.Schema; + +export interface CreateFrontendErrorResponse {} +export const CreateFrontendErrorResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateFrontendErrorResponse", +}) as any as S.Schema; + +export interface CreateGlossaryRequest { + definition: string; + term: string; +} +export const CreateGlossaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: S.String, + term: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/glossary", code: 200 })), +).annotate({ + identifier: "CreateGlossaryRequest", +}) as any as S.Schema; + +export interface CreateGlossaryResponse {} +export const CreateGlossaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateGlossaryResponse", +}) as any as S.Schema; + +export interface CreateKeyRequest { + group_id: number; + name: string; +} +export const CreateKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number, + name: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/api-key", code: 200 })), +).annotate({ + identifier: "CreateKeyRequest", +}) as any as S.Schema; + +export interface CreateKeyResponse {} +export const CreateKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateKeyResponse", +}) as any as S.Schema; + +export interface CreateLlmExtractSourceRequestTemplateTagsValue { + card_id?: number; + type: string; +} +export const CreateLlmExtractSourceRequestTemplateTagsValue = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.optional(S.Number.pipe(T.Body("card-id"))), + type: S.String, + }), + ).annotate({ + identifier: "CreateLlmExtractSourceRequestTemplateTagsValue", + }) as any as S.Schema; + +export type CreateLlmExtractSourceRequestTemplateTagsMap = { + [key: string]: CreateLlmExtractSourceRequestTemplateTagsValue | undefined; +}; +export const CreateLlmExtractSourceRequestTemplateTagsMap = + /*@__PURE__*/ S.Record( + S.String, + CreateLlmExtractSourceRequestTemplateTagsValue, + ) as any as S.Schema; + +export interface CreateLlmExtractSourceRequest { + database_id: number; + sql: string; + template_tags?: CreateLlmExtractSourceRequestTemplateTagsMap; +} +export const CreateLlmExtractSourceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number, + sql: S.String, + template_tags: S.optional(CreateLlmExtractSourceRequestTemplateTagsMap), + }).pipe( + T.Http({ method: "POST", uri: "/api/llm/extract-sources", code: 200 }), + ), +).annotate({ + identifier: "CreateLlmExtractSourceRequest", +}) as any as S.Schema; + +export interface CreateLlmExtractSourceResponse {} +export const CreateLlmExtractSourceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateLlmExtractSourceResponse", +}) as any as S.Schema; + +export interface CreateLlmGenerateSqlRequestReferencedEntitiesItem { + id: number; + model: string; +} +export const CreateLlmGenerateSqlRequestReferencedEntitiesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number, + model: S.String, + }), + ).annotate({ + identifier: "CreateLlmGenerateSqlRequestReferencedEntitiesItem", + }) as any as S.Schema; + +export type CreateLlmGenerateSqlRequestReferencedEntitiesList = + Array; +export const CreateLlmGenerateSqlRequestReferencedEntitiesList = + /*@__PURE__*/ S.Array( + CreateLlmGenerateSqlRequestReferencedEntitiesItem, + ) as any as S.Schema; + +export interface CreateLlmGenerateSqlRequest { + database_id: number; + prompt: string; + referenced_entities?: CreateLlmGenerateSqlRequestReferencedEntitiesList; + source_sql?: string; +} +export const CreateLlmGenerateSqlRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number, + prompt: S.String, + referenced_entities: S.optional( + CreateLlmGenerateSqlRequestReferencedEntitiesList, + ), + source_sql: S.optional(S.String), + }).pipe(T.Http({ method: "POST", uri: "/api/llm/generate-sql", code: 200 })), +).annotate({ + identifier: "CreateLlmGenerateSqlRequest", +}) as any as S.Schema; + +export interface CreateLlmGenerateSqlResponse {} +export const CreateLlmGenerateSqlResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateLlmGenerateSqlResponse", +}) as any as S.Schema; + +export type MetabaseLoggerApiTimeUnit = + | "days" + | "hours" + | "minutes" + | "seconds" + | "milliseconds" + | "microseconds" + | "nanoseconds"; +export const MetabaseLoggerApiTimeUnit = /*@__PURE__*/ S.String; + +export interface CreateLoggerAdjustmentRequest { + duration: number; + duration_unit: MetabaseLoggerApiTimeUnit | (string & {}); + log_levels: unknown; +} +export const CreateLoggerAdjustmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + duration: S.Number, + duration_unit: MetabaseLoggerApiTimeUnit, + log_levels: S.Unknown, + }).pipe(T.Http({ method: "POST", uri: "/api/logger/adjustment", code: 200 })), +).annotate({ + identifier: "CreateLoggerAdjustmentRequest", +}) as any as S.Schema; + +export interface CreateLoggerAdjustmentResponse {} +export const CreateLoggerAdjustmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateLoggerAdjustmentResponse", +}) as any as S.Schema; + +export interface CreateMeasureRequest { + definition: MetabaseLibSchemaQuery; + description?: string | null; + name: string; + /** value must be an integer greater than zero. */ + table_id: number; +} +export const CreateMeasureRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: MetabaseLibSchemaQuery, + description: S.optional(S.NullOr(S.String)), + name: S.String, + table_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/measure", code: 200 })), +).annotate({ + identifier: "CreateMeasureRequest", +}) as any as S.Schema; + +export interface CreateMeasureResponse {} +export const CreateMeasureResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMeasureResponse", +}) as any as S.Schema; + +export interface MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem { + /** Value must be a map. */ + query?: unknown; +} +export const MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.optional(S.Unknown), + }), + ).annotate({ + identifier: + "MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem", + }) as any as S.Schema; + +export type MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList = + Array; +export const MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList = + /*@__PURE__*/ S.Array( + MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsItem, + ) as any as S.Schema; + +export type MetabaseMetabotContextContextUserIsViewingItemCase0Type = + | "model" + | "question" + | "metric" + | "adhoc"; +export const MetabaseMetabotContextContextUserIsViewingItemCase0Type = + /*@__PURE__*/ S.String; + +export interface MetabaseMetabotContextContextUserIsViewingItemCase0 { + chart_configs?: MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList; + /** Value must be a map. */ + query?: unknown; + type: MetabaseMetabotContextContextUserIsViewingItemCase0Type | (string & {}); +} +export const MetabaseMetabotContextContextUserIsViewingItemCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + chart_configs: S.optional( + MetabaseMetabotContextContextUserIsViewingItemCase0ChartConfigsList, + ), + query: S.optional(S.Unknown), + type: MetabaseMetabotContextContextUserIsViewingItemCase0Type, + }), + ).annotate({ + identifier: "MetabaseMetabotContextContextUserIsViewingItemCase0", + }) as any as S.Schema; + +export type MetabaseMetabotContextContextUserIsViewingItemCase1Type = + | "dashboard" + | "model" + | "transform" + | "code_editor" + | "document" + | "question" + | "metric" + | "adhoc"; +export const MetabaseMetabotContextContextUserIsViewingItemCase1Type = + /*@__PURE__*/ S.String; + +export interface MetabaseMetabotContextContextUserIsViewingItemCase1 { + /** Value must be a map. */ + query?: unknown; + type: MetabaseMetabotContextContextUserIsViewingItemCase1Type | (string & {}); +} +export const MetabaseMetabotContextContextUserIsViewingItemCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.optional(S.Unknown), + type: MetabaseMetabotContextContextUserIsViewingItemCase1Type, + }), + ).annotate({ + identifier: "MetabaseMetabotContextContextUserIsViewingItemCase1", + }) as any as S.Schema; + +export type MetabaseMetabotContextContextUserIsViewingItem = + | MetabaseMetabotContextContextUserIsViewingItemCase0 + | MetabaseMetabotContextContextUserIsViewingItemCase1; +export const MetabaseMetabotContextContextUserIsViewingItem = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseMetabotContextContextUserIsViewingList = + Array; +export const MetabaseMetabotContextContextUserIsViewingList = + /*@__PURE__*/ S.Array( + MetabaseMetabotContextContextUserIsViewingItem, + ) as any as S.Schema; + +export interface MetabaseMetabotContextContext { + user_is_viewing?: MetabaseMetabotContextContextUserIsViewingList; +} +export const MetabaseMetabotContextContext = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_is_viewing: S.optional(MetabaseMetabotContextContextUserIsViewingList), + }), +).annotate({ + identifier: "MetabaseMetabotContextContext", +}) as any as S.Schema; + +export type MetabaseMetabotSchemaRole = + | "system" + | "user" + | "assistant" + | "tool"; +export const MetabaseMetabotSchemaRole = /*@__PURE__*/ S.String; + +export interface MetabaseMetabotSchemaMessageToolCallsItem { + arguments: string; + id: string; + name: string; +} +export const MetabaseMetabotSchemaMessageToolCallsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + arguments: S.String, + id: S.String, + name: S.String, + }), + ).annotate({ + identifier: "MetabaseMetabotSchemaMessageToolCallsItem", + }) as any as S.Schema; + +export type MetabaseMetabotSchemaMessageToolCallsList = + Array; +export const MetabaseMetabotSchemaMessageToolCallsList = /*@__PURE__*/ S.Array( + MetabaseMetabotSchemaMessageToolCallsItem, +) as any as S.Schema; + +export interface MetabaseMetabotSchemaMessage { + content?: string | null; + role: MetabaseMetabotSchemaRole | (string & {}); + tool_call_id?: string | null; + tool_calls?: MetabaseMetabotSchemaMessageToolCallsList | null; +} +export const MetabaseMetabotSchemaMessage = /*@__PURE__*/ S.suspend(() => + S.Struct({ + content: S.optional(S.NullOr(S.String)), + role: MetabaseMetabotSchemaRole, + tool_call_id: S.optional(S.NullOr(S.String)), + tool_calls: S.optional(S.NullOr(MetabaseMetabotSchemaMessageToolCallsList)), + }), +).annotate({ + identifier: "MetabaseMetabotSchemaMessage", +}) as any as S.Schema; + +export type MetabaseMetabotSchemaMessages = Array; +export const MetabaseMetabotSchemaMessages = /*@__PURE__*/ S.Array( + MetabaseMetabotSchemaMessage, +) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateChartConfigsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseMetabotAgentCoreStateChartConfigsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateChartsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseMetabotAgentCoreStateChartsMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateLinkRegistryMap = { + [key: string]: string | undefined; +}; +export const MetabaseMetabotAgentCoreStateLinkRegistryMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateQueriesMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseMetabotAgentCoreStateQueriesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateTodosList = Array; +export const MetabaseMetabotAgentCoreStateTodosList = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export type MetabaseMetabotAgentCoreStateTransformsMap = { + [key: string]: unknown | undefined; +}; +export const MetabaseMetabotAgentCoreStateTransformsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** Agent state containing queries, charts, chart-configs, todos, transforms, and link-registry. */ +export interface MetabaseMetabotAgentCoreState { + chart_configs?: MetabaseMetabotAgentCoreStateChartConfigsMap; + charts?: MetabaseMetabotAgentCoreStateChartsMap; + link_registry?: MetabaseMetabotAgentCoreStateLinkRegistryMap; + queries?: MetabaseMetabotAgentCoreStateQueriesMap; + todos?: MetabaseMetabotAgentCoreStateTodosList; + transforms?: MetabaseMetabotAgentCoreStateTransformsMap; +} +export const MetabaseMetabotAgentCoreState = /*@__PURE__*/ S.suspend(() => + S.Struct({ + chart_configs: S.optional( + MetabaseMetabotAgentCoreStateChartConfigsMap.pipe( + T.Body("chart-configs"), + ), + ), + charts: S.optional(MetabaseMetabotAgentCoreStateChartsMap), + link_registry: S.optional( + MetabaseMetabotAgentCoreStateLinkRegistryMap.pipe( + T.Body("link-registry"), + ), + ), + queries: S.optional(MetabaseMetabotAgentCoreStateQueriesMap), + todos: S.optional(MetabaseMetabotAgentCoreStateTodosList), + transforms: S.optional(MetabaseMetabotAgentCoreStateTransformsMap), + }), +).annotate({ + identifier: "MetabaseMetabotAgentCoreState", +}) as any as S.Schema; + +export interface CreateMetabotAgentStreamingRequest { + context: MetabaseMetabotContextContext; + /** value must be a valid UUID. */ + conversation_id: string; + debug?: boolean | null; + history: MetabaseMetabotSchemaMessages | null; + message: string; + metabot_id?: string; + profile_id?: string; + state: MetabaseMetabotAgentCoreState; +} +export const CreateMetabotAgentStreamingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: MetabaseMetabotContextContext, + conversation_id: S.String, + debug: S.optional(S.NullOr(S.Boolean)), + history: S.NullOr(MetabaseMetabotSchemaMessages), + message: S.String, + metabot_id: S.optional(S.String), + profile_id: S.optional(S.String), + state: MetabaseMetabotAgentCoreState, + }).pipe( + T.Http({ method: "POST", uri: "/api/metabot/agent-streaming", code: 200 }), + ), +).annotate({ + identifier: "CreateMetabotAgentStreamingRequest", +}) as any as S.Schema; + +export interface CreateMetabotAgentStreamingResponse {} +export const CreateMetabotAgentStreamingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetabotAgentStreamingResponse", +}) as any as S.Schema; + +export interface CreateMetabotDocumentGenerateContentRequest { + instructions: string; + /** Value must be a map. */ + references?: unknown; +} +export const CreateMetabotDocumentGenerateContentRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + instructions: S.String, + references: S.optional(S.Unknown), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/metabot/document/generate-content", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateMetabotDocumentGenerateContentRequest", + }) as any as S.Schema; + +export interface CreateMetabotDocumentGenerateContentResponse {} +export const CreateMetabotDocumentGenerateContentResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateMetabotDocumentGenerateContentResponse", + }) as any as S.Schema; + +export interface CreateMetabotFeedbackRequest { + freeform_feedback?: string | null; + issue_type?: string | null; + message_id: string; + /** value must be an integer greater than zero. */ + metabot_id: number; + positive: boolean; +} +export const CreateMetabotFeedbackRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + freeform_feedback: S.optional(S.NullOr(S.String)), + issue_type: S.optional(S.NullOr(S.String)), + message_id: S.String, + metabot_id: S.Number, + positive: S.Boolean, + }).pipe(T.Http({ method: "POST", uri: "/api/metabot/feedback", code: 200 })), +).annotate({ + identifier: "CreateMetabotFeedbackRequest", +}) as any as S.Schema; + +export interface CreateMetabotFeedbackResponse {} +export const CreateMetabotFeedbackResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetabotFeedbackResponse", +}) as any as S.Schema; + +export interface CreateMetabotMetabotPromptSuggestionsRegenerateRequest { + id: number; +} +export const CreateMetabotMetabotPromptSuggestionsRegenerateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/metabot/metabot/{id}/prompt-suggestions/regenerate", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateMetabotMetabotPromptSuggestionsRegenerateRequest", + }) as any as S.Schema; + +export interface CreateMetabotMetabotPromptSuggestionsRegenerateResponse {} +export const CreateMetabotMetabotPromptSuggestionsRegenerateResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateMetabotMetabotPromptSuggestionsRegenerateResponse", + }) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase0 { + challenge: string; + type: unknown; +} +export const CreateMetabotSlackEventRequestBodyCase0 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + challenge: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase0", +}) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase1EventFilesItem { + filetype?: string | null; + id: string; + mimetype?: string | null; + name: string; + size: number; + url_private: string; +} +export const CreateMetabotSlackEventRequestBodyCase1EventFilesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + filetype: S.optional(S.NullOr(S.String)), + id: S.String, + mimetype: S.optional(S.NullOr(S.String)), + name: S.String, + size: S.Number, + url_private: S.String, + }), + ).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase1EventFilesItem", + }) as any as S.Schema; + +export type CreateMetabotSlackEventRequestBodyCase1EventFilesList = + Array; +export const CreateMetabotSlackEventRequestBodyCase1EventFilesList = + /*@__PURE__*/ S.Array( + CreateMetabotSlackEventRequestBodyCase1EventFilesItem, + ) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase1EventItem { + channel?: string; + ts?: string; + type?: string; +} +export const CreateMetabotSlackEventRequestBodyCase1EventItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + channel: S.optional(S.String), + ts: S.optional(S.String), + type: S.optional(S.String), + }), + ).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase1EventItem", + }) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase1EventEdited { + ts?: string; + user?: string; +} +export const CreateMetabotSlackEventRequestBodyCase1EventEdited = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + ts: S.optional(S.String), + user: S.optional(S.String), + }), + ).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase1EventEdited", + }) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase1Event { + subtype?: string; + event_ts: string; + ts?: string; + user?: string; + reaction?: string; + files?: CreateMetabotSlackEventRequestBodyCase1EventFilesList; + text?: string | null; + bot_id?: string | null; + item?: CreateMetabotSlackEventRequestBodyCase1EventItem; + thread_ts?: string | null; + type: string; + channel_type?: string; + channel?: string; + edited?: CreateMetabotSlackEventRequestBodyCase1EventEdited; +} +export const CreateMetabotSlackEventRequestBodyCase1Event = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + subtype: S.optional(S.String), + event_ts: S.String, + ts: S.optional(S.String), + user: S.optional(S.String), + reaction: S.optional(S.String), + files: S.optional(CreateMetabotSlackEventRequestBodyCase1EventFilesList), + text: S.optional(S.NullOr(S.String)), + bot_id: S.optional(S.NullOr(S.String)), + item: S.optional(CreateMetabotSlackEventRequestBodyCase1EventItem), + thread_ts: S.optional(S.NullOr(S.String)), + type: S.String, + channel_type: S.optional(S.String), + channel: S.optional(S.String), + edited: S.optional(CreateMetabotSlackEventRequestBodyCase1EventEdited), + }), + ).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase1Event", + }) as any as S.Schema; + +export interface CreateMetabotSlackEventRequestBodyCase1 { + event: CreateMetabotSlackEventRequestBodyCase1Event; + event_id?: string; + team_id?: string; + type: unknown; +} +export const CreateMetabotSlackEventRequestBodyCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + event: CreateMetabotSlackEventRequestBodyCase1Event, + event_id: S.optional(S.String), + team_id: S.optional(S.String), + type: S.Unknown, + }), +).annotate({ + identifier: "CreateMetabotSlackEventRequestBodyCase1", +}) as any as S.Schema; + +export type CreateMetabotSlackEventRequestBodyCase2 = + MetabaseDocumentsProseMirrorAst; +export const CreateMetabotSlackEventRequestBodyCase2 = + MetabaseDocumentsProseMirrorAst; + +export type CreateMetabotSlackEventRequestBody = + | CreateMetabotSlackEventRequestBodyCase0 + | CreateMetabotSlackEventRequestBodyCase1 + | MetabaseDocumentsProseMirrorAst; +export const CreateMetabotSlackEventRequestBody = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateMetabotSlackEventRequest { + body?: CreateMetabotSlackEventRequestBody; +} +export const CreateMetabotSlackEventRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(CreateMetabotSlackEventRequestBody.pipe(T.HttpBody())), + }).pipe( + T.Http({ method: "POST", uri: "/api/metabot/slack/events", code: 200 }), + ), +).annotate({ + identifier: "CreateMetabotSlackEventRequest", +}) as any as S.Schema; + +export interface CreateMetabotSlackEventResponse {} +export const CreateMetabotSlackEventResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetabotSlackEventResponse", +}) as any as S.Schema; + +export interface CreateMetabotSlackInteractiveRequest { + payload: string; +} +export const CreateMetabotSlackInteractiveRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + payload: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/metabot/slack/interactive", + code: 200, + }), + ), +).annotate({ + identifier: "CreateMetabotSlackInteractiveRequest", +}) as any as S.Schema; + +export interface CreateMetabotSlackInteractiveResponse {} +export const CreateMetabotSlackInteractiveResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateMetabotSlackInteractiveResponse", +}) as any as S.Schema; + +export type CreateMetabotSourceFeedbackRequestSourceType = + | "table" + | "card" + | "model"; +export const CreateMetabotSourceFeedbackRequestSourceType = + /*@__PURE__*/ S.String; + +export interface CreateMetabotSourceFeedbackRequest { + message_id: string; + /** value must be an integer greater than zero. */ + metabot_id: number; + positive: boolean; + /** value must be an integer greater than zero. */ + source_id: number; + source_type: CreateMetabotSourceFeedbackRequestSourceType | (string & {}); +} +export const CreateMetabotSourceFeedbackRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + message_id: S.String, + metabot_id: S.Number, + positive: S.Boolean, + source_id: S.Number, + source_type: CreateMetabotSourceFeedbackRequestSourceType, + }).pipe( + T.Http({ method: "POST", uri: "/api/metabot/source-feedback", code: 200 }), + ), +).annotate({ + identifier: "CreateMetabotSourceFeedbackRequest", +}) as any as S.Schema; + +export interface CreateMetabotSourceFeedbackResponse {} +export const CreateMetabotSourceFeedbackResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetabotSourceFeedbackResponse", +}) as any as S.Schema; + +/** A metric reference in an expression: [:metric {:lib/uuid uuid} card-id]. */ +export type MetabaseLibMetricSchemaMetricExpressionRef = Array; +export const MetabaseLibMetricSchemaMetricExpressionRef = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +/** A measure reference in an expression: [:measure {:lib/uuid uuid} measure-id]. */ +export type MetabaseLibMetricSchemaMeasureExpressionRef = Array; +export const MetabaseLibMetricSchemaMeasureExpressionRef = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +/** A leaf node in a metric math expression: either a metric or measure reference. */ +export type MetabaseLibMetricSchemaExpressionLeaf = + | MetabaseLibMetricSchemaMetricExpressionRef + | MetabaseLibMetricSchemaMeasureExpressionRef; +export const MetabaseLibMetricSchemaExpressionLeaf = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseLibMetricSchemaMetricMathExpressionCase2List = + Array; +export const MetabaseLibMetricSchemaMetricMathExpressionCase2List = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +/** A recursive metric math expression tree. Can be a leaf (metric/measure ref) or an arithmetic expression [op opts expr expr ...] with at least 2 operands. Note: uses :fn validator for arithmetic to avoid Malli's recursive seqex limitation. */ +export type MetabaseLibMetricSchemaMetricMathExpression = + | MetabaseLibMetricSchemaExpressionLeaf + | number + | MetabaseLibMetricSchemaMetricMathExpressionCase2List; +export const MetabaseLibMetricSchemaMetricMathExpression = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** A filter associated with a specific expression instance via lib/uuid. */ +export interface MetabaseLibMetricSchemaInstanceFilter { + filter: unknown; + lib_uuid: string; +} +export const MetabaseLibMetricSchemaInstanceFilter = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + filter: S.Unknown, + lib_uuid: S.String.pipe(T.Body("lib/uuid")), + }), +).annotate({ + identifier: "MetabaseLibMetricSchemaInstanceFilter", +}) as any as S.Schema; + +/** A sequence of per-instance filters. */ +export type MetabaseLibMetricSchemaInstanceFilters = + Array; +export const MetabaseLibMetricSchemaInstanceFilters = /*@__PURE__*/ S.Array( + MetabaseLibMetricSchemaInstanceFilter, +) as any as S.Schema; + +/** Dimension reference clause [:dimension opts uuid]. Handles normalization from JSON where the tag arrives as a string. */ +export type MetabaseLibMetricSchemaDimensionReference = Array; +export const MetabaseLibMetricSchemaDimensionReference = /*@__PURE__*/ S.Array( + S.Unknown, +) as any as S.Schema; + +export type MetabaseLibMetricSchemaTypedProjectionProjectionList = + Array; +export const MetabaseLibMetricSchemaTypedProjectionProjectionList = + /*@__PURE__*/ S.Array( + MetabaseLibMetricSchemaDimensionReference, + ) as any as S.Schema; + +export type MetabaseLibMetricSchemaTypedProjectionType = "metric" | "measure"; +export const MetabaseLibMetricSchemaTypedProjectionType = + /*@__PURE__*/ S.String; + +/** A projection associated with a specific expression leaf instance via :lib/uuid. The :type and :id identify the source metric/measure for metadata resolution. The :lib/uuid disambiguates multiple references to the same metric/measure in an expression. */ +export interface MetabaseLibMetricSchemaTypedProjection { + id: number; + lib_uuid: string; + projection: MetabaseLibMetricSchemaTypedProjectionProjectionList; + type: MetabaseLibMetricSchemaTypedProjectionType | (string & {}); +} +export const MetabaseLibMetricSchemaTypedProjection = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number, + lib_uuid: S.String.pipe(T.Body("lib/uuid")), + projection: MetabaseLibMetricSchemaTypedProjectionProjectionList, + type: MetabaseLibMetricSchemaTypedProjectionType, + }), +).annotate({ + identifier: "MetabaseLibMetricSchemaTypedProjection", +}) as any as S.Schema; + +/** A sequence of typed projections. */ +export type MetabaseLibMetricSchemaTypedProjections = + Array; +export const MetabaseLibMetricSchemaTypedProjections = /*@__PURE__*/ S.Array( + MetabaseLibMetricSchemaTypedProjection, +) as any as S.Schema; + +/** Schema for the definition object within a dataset request. Uses expression-based contract for metric math support. */ +export interface MetabaseMetricsApiDefinition { + expression: MetabaseLibMetricSchemaMetricMathExpression; + filters?: MetabaseLibMetricSchemaInstanceFilters | null; + projections?: MetabaseLibMetricSchemaTypedProjections | null; +} +export const MetabaseMetricsApiDefinition = /*@__PURE__*/ S.suspend(() => + S.Struct({ + expression: MetabaseLibMetricSchemaMetricMathExpression, + filters: S.optional(S.NullOr(MetabaseLibMetricSchemaInstanceFilters)), + projections: S.optional(S.NullOr(MetabaseLibMetricSchemaTypedProjections)), + }), +).annotate({ + identifier: "MetabaseMetricsApiDefinition", +}) as any as S.Schema; + +export interface CreateMetricBreakoutValueRequest { + definition: MetabaseMetricsApiDefinition; +} +export const CreateMetricBreakoutValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: MetabaseMetricsApiDefinition, + }).pipe( + T.Http({ method: "POST", uri: "/api/metric/breakout-values", code: 200 }), + ), +).annotate({ + identifier: "CreateMetricBreakoutValueRequest", +}) as any as S.Schema; + +export interface CreateMetricBreakoutValueResponse {} +export const CreateMetricBreakoutValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetricBreakoutValueResponse", +}) as any as S.Schema; + +export interface CreateMetricDatasetRequest { + definition: MetabaseMetricsApiDefinition; +} +export const CreateMetricDatasetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: MetabaseMetricsApiDefinition, + }).pipe(T.Http({ method: "POST", uri: "/api/metric/dataset", code: 200 })), +).annotate({ + identifier: "CreateMetricDatasetRequest", +}) as any as S.Schema; + +export interface CreateMetricDatasetResponse {} +export const CreateMetricDatasetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMetricDatasetResponse", +}) as any as S.Schema; + +export interface CreateModelIndexRequest { + /** value must be an integer greater than zero. */ + model_id: number; + pk_ref: unknown; + value_ref: unknown; +} +export const CreateModelIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model_id: S.Number, + pk_ref: S.Unknown, + value_ref: S.Unknown, + }).pipe(T.Http({ method: "POST", uri: "/api/model-index", code: 200 })), +).annotate({ + identifier: "CreateModelIndexRequest", +}) as any as S.Schema; + +export interface CreateModelIndexResponse {} +export const CreateModelIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateModelIndexResponse", +}) as any as S.Schema; + +export type CreateModerationReviewRequestModeratedItemType = + | "card" + | "card" + | "dashboard" + | "dashboard"; +export const CreateModerationReviewRequestModeratedItemType = + /*@__PURE__*/ S.String; + +export type CreateModerationReviewRequestStatus = "verified"; +export const CreateModerationReviewRequestStatus = /*@__PURE__*/ S.String; + +export interface CreateModerationReviewRequest { + /** value must be an integer greater than zero. */ + moderated_item_id: number; + moderated_item_type: + | CreateModerationReviewRequestModeratedItemType + | (string & {}); + status?: CreateModerationReviewRequestStatus | (string & {}) | null; + text?: string | null; +} +export const CreateModerationReviewRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + moderated_item_id: S.Number, + moderated_item_type: CreateModerationReviewRequestModeratedItemType, + status: S.optional(S.NullOr(CreateModerationReviewRequestStatus)), + text: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "POST", uri: "/api/moderation-review", code: 200 })), +).annotate({ + identifier: "CreateModerationReviewRequest", +}) as any as S.Schema; + +export interface CreateModerationReviewResponse {} +export const CreateModerationReviewResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateModerationReviewResponse", +}) as any as S.Schema; + +export type MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue = + | string + | number + | MetabaseLibSchemaParameterTarget; +export const MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap = { + [key: string]: + | MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue + | undefined; +}; +export const MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap = + /*@__PURE__*/ S.Record( + S.String, + MetabaseEnterpriseSandboxSchemaAttributeRemappingsValue, + ) as any as S.Schema; + +export interface CreateMtGtapRequest { + attribute_remappings?: MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap | null; + card_id?: number | null; + /** value must be an integer greater than zero. */ + group_id: number; + /** value must be an integer greater than zero. */ + table_id: number; +} +export const CreateMtGtapRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + attribute_remappings: S.optional( + S.NullOr(MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap), + ), + card_id: S.optional(S.NullOr(S.Number)), + group_id: S.Number, + table_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/mt/gtap", code: 200 })), +).annotate({ + identifier: "CreateMtGtapRequest", +}) as any as S.Schema; + +export interface CreateMtGtapResponse {} +export const CreateMtGtapResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMtGtapResponse", +}) as any as S.Schema; + +export interface CreateMtGtapValidateRequest { + card_id?: number | null; + /** value must be an integer greater than zero. */ + table_id: number; +} +export const CreateMtGtapValidateRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.optional(S.NullOr(S.Number)), + table_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/mt/gtap/validate", code: 200 })), +).annotate({ + identifier: "CreateMtGtapValidateRequest", +}) as any as S.Schema; + +export interface CreateMtGtapValidateResponse {} +export const CreateMtGtapValidateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateMtGtapValidateResponse", +}) as any as S.Schema; + +export interface CreateNativeQuerySnippetRequest { + collection_id?: number | null; + content: string; + description?: string | null; + /** snippet names cannot include '}' or start with spaces */ + name: unknown; +} +export const CreateNativeQuerySnippetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.optional(S.NullOr(S.Number)), + content: S.String, + description: S.optional(S.NullOr(S.String)), + name: S.Unknown, + }).pipe( + T.Http({ method: "POST", uri: "/api/native-query-snippet", code: 200 }), + ), +).annotate({ + identifier: "CreateNativeQuerySnippetRequest", +}) as any as S.Schema; + +export interface CreateNativeQuerySnippetResponse {} +export const CreateNativeQuerySnippetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNativeQuerySnippetResponse", +}) as any as S.Schema; + +/** Channel schema. */ +export interface MetabaseChannelModelsChannelChannel { + active?: boolean; + description?: string | null; + /** Value must be a map. */ + details: unknown; + name: string; + type: string; +} +export const MetabaseChannelModelsChannelChannel = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.Boolean), + description: S.optional(S.NullOr(S.String)), + details: S.Unknown, + name: S.String, + type: S.String, + }), +).annotate({ + identifier: "MetabaseChannelModelsChannelChannel", +}) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationRecipientParamsCase0 { + details?: unknown; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type + | (string & {}); + /** value must be an integer greater than zero. */ + user_id: number; +} +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.Unknown), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsCreateNotificationRecipientParamsCase0Type, + user_id: S.Number, + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationRecipientParamsCase0", + }) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationRecipientParamsCase1 { + details?: unknown; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + /** value must be an integer greater than zero. */ + permissions_group_id: number; + type: + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: S.optional(S.Unknown), + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.Number, + type: MetabaseNotificationModelsCreateNotificationRecipientParamsCase1Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationRecipientParamsCase1", + }) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Details = + MetabaseNotificationModelsNotificationRecipientCase2Details; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Details = + MetabaseNotificationModelsNotificationRecipientCase2Details; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationRecipientParamsCase2 { + details: MetabaseNotificationModelsNotificationRecipientCase2Details; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: MetabaseNotificationModelsNotificationRecipientCase2Details, + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsCreateNotificationRecipientParamsCase2Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationRecipientParamsCase2", + }) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Details = + MetabaseNotificationModelsNotificationRecipientCase3Details; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Details = + MetabaseNotificationModelsNotificationRecipientCase3Details; + +export type MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type = + | "notification-recipient/raw-value" + | "notification-recipient/user" + | "notification-recipient/template" + | "notification-recipient/group"; +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationRecipientParamsCase3 { + details: MetabaseNotificationModelsNotificationRecipientCase3Details; + /** value must be an integer greater than zero. */ + notification_handler_id?: number; + permissions_group_id?: unknown; + type: + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type + | (string & {}); + user_id?: unknown; +} +export const MetabaseNotificationModelsCreateNotificationRecipientParamsCase3 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + details: MetabaseNotificationModelsNotificationRecipientCase3Details, + notification_handler_id: S.optional(S.Number), + permissions_group_id: S.optional(S.Unknown), + type: MetabaseNotificationModelsCreateNotificationRecipientParamsCase3Type, + user_id: S.optional(S.Unknown), + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationRecipientParamsCase3", + }) as any as S.Schema; + +/** [[::NotificationRecipient]] on a create request, where the caller does not get to pick the id. */ +export type MetabaseNotificationModelsCreateNotificationRecipientParams = + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase0 + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase1 + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase2 + | MetabaseNotificationModelsCreateNotificationRecipientParamsCase3; +export const MetabaseNotificationModelsCreateNotificationRecipientParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsCreateNotificationRecipientParams, + ) as any as S.Schema; + +export type MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType = + | "cc" + | "bcc" + | "cc" + | "bcc"; +export const MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType = + /*@__PURE__*/ S.String; + +export type MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType = + | "email/handlebars-text" + | "email/handlebars-text"; +export const MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType = + /*@__PURE__*/ S.String; + +/** Email template details schema for API-provided templates. Only handlebars-text is allowed; handlebars-resource is restricted to internal use only. */ +export interface MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided { + body: string; + recipient_type?: + | MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType + | (string & {}); + subject: string; + type: + | MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType + | (string & {}); +} +export const MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.String, + recipient_type: S.optional( + MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedRecipientType.pipe( + T.Body("recipient-type"), + ), + ), + subject: S.String, + type: MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvidedType, + }), + ).annotate({ + identifier: + "MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided", + }) as any as S.Schema; + +export interface MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0 { + channel_type: unknown; + details: MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided; + /** value must be an integer greater than zero. */ + id?: number; + name?: string; +} +export const MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + channel_type: S.Unknown, + details: + MetabaseChannelModelsChannelChannelTemplateEmailDetailsUserProvided, + id: S.optional(S.Number), + name: S.optional(S.String), + }), + ).annotate({ + identifier: "MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0", + }) as any as S.Schema; + +export interface MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1 { + channel_type: unknown; + /** value must be an integer greater than zero. */ + id?: number; + name?: string; +} +export const MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + channel_type: S.Unknown, + id: S.optional(S.Number), + name: S.optional(S.String), + }), + ).annotate({ + identifier: "MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1", + }) as any as S.Schema; + +/** Channel Template schema for API-provided templates. Does not allow handlebars-resource. */ +export type MetabaseChannelModelsChannelChannelTemplateUserProvided = + | MetabaseChannelModelsChannelChannelTemplateUserProvidedCase0 + | MetabaseChannelModelsChannelChannelTemplateUserProvidedCase1; +export const MetabaseChannelModelsChannelChannelTemplateUserProvided = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** [[::NotificationHandler]] on a create request, where the caller does not get to pick the id. */ +export interface MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem { + active?: boolean | null; + channel?: MetabaseChannelModelsChannelChannel | null; + channel_id?: number | null; + channel_type: unknown; + /** value must be an integer greater than zero. */ + notification_id?: number; + recipients?: MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList; + template?: MetabaseChannelModelsChannelChannelTemplateUserProvided | null; + template_id?: number | null; +} +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + channel: S.optional(S.NullOr(MetabaseChannelModelsChannelChannel)), + channel_id: S.optional(S.NullOr(S.Number)), + channel_type: S.Unknown, + notification_id: S.optional(S.Number), + recipients: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItemRecipientsList, + ), + template: S.optional( + S.NullOr(MetabaseChannelModelsChannelChannelTemplateUserProvided), + ), + template_id: S.optional(S.NullOr(S.Number)), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList = + /*@__PURE__*/ S.Array( + MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersItem, + ) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationCardParamsSendCondition = + | "goal_below" + | "has_result" + | "goal_above"; +export const MetabaseNotificationModelsCreateNotificationCardParamsSendCondition = + /*@__PURE__*/ S.String; + +/** [[::NotificationCard]] on a create request, where the caller does not get to pick the id. */ +export interface MetabaseNotificationModelsCreateNotificationCardParams { + card?: unknown | null; + /** value must be an integer greater than zero. */ + card_id: number; + notification_id?: number | null; + send_condition?: + | MetabaseNotificationModelsCreateNotificationCardParamsSendCondition + | (string & {}); + send_once?: boolean; +} +export const MetabaseNotificationModelsCreateNotificationCardParams = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card: S.optional(S.NullOr(S.Unknown)), + card_id: S.Number, + notification_id: S.optional(S.NullOr(S.Number)), + send_condition: S.optional( + MetabaseNotificationModelsCreateNotificationCardParamsSendCondition, + ), + send_once: S.optional(S.Boolean), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsCreateNotificationCardParams", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType = + | "notification/dashboard" + | "notification/system-event" + | "notification/testing" + | "notification/card"; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type = + | "notification-subscription/cron" + | "notification-subscription/system-event"; +export const MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0 { + cron_schedule?: unknown | null; + event_name: string; + /** value must be an integer greater than zero. */ + notification_id?: number; + type: + | MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type + | (string & {}); +} +export const MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cron_schedule: S.optional(S.NullOr(S.Unknown)), + event_name: S.String, + notification_id: S.optional(S.Number), + type: MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0Type, + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0", + }) as any as S.Schema; + +export type MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type = + | "notification-subscription/cron" + | "notification-subscription/system-event"; +export const MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType = + | "cron/raw" + | "cron/builder"; +export const MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1 { + cron_schedule: string; + event_name?: unknown | null; + /** value must be an integer greater than zero. */ + notification_id?: number; + type: + | MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type + | (string & {}); + ui_display_type?: + | MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType + | (string & {}) + | null; +} +export const MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cron_schedule: S.String, + event_name: S.optional(S.NullOr(S.Unknown)), + notification_id: S.optional(S.Number), + type: MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1Type, + ui_display_type: S.optional( + S.NullOr( + MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1UiDisplayType, + ), + ), + }), + ).annotate({ + identifier: + "MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1", + }) as any as S.Schema; + +/** [[::NotificationSubscription]] on a create request, where the caller does not get to pick the id. */ +export type MetabaseNotificationModelsCreateNotificationSubscriptionParams = + | MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase0 + | MetabaseNotificationModelsCreateNotificationSubscriptionParamsCase1; +export const MetabaseNotificationModelsCreateNotificationSubscriptionParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsCreateNotificationSubscriptionParams, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationCreateNotificationParamsCase0 { + active?: boolean | null; + creator?: unknown | null; + creator_id?: number | null; + handlers?: MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList; + payload: MetabaseNotificationModelsCreateNotificationCardParams; + payload_id?: number | null; + payload_type: + | MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType + | (string & {}); + subscriptions?: MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList; +} +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + creator: S.optional(S.NullOr(S.Unknown)), + creator_id: S.optional(S.NullOr(S.Number)), + handlers: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase0HandlersList, + ), + payload: MetabaseNotificationModelsCreateNotificationCardParams, + payload_id: S.optional(S.NullOr(S.Number)), + payload_type: + MetabaseNotificationApiNotificationCreateNotificationParamsCase0PayloadType, + subscriptions: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase0SubscriptionsList, + ), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationCreateNotificationParamsCase0", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsCreateNotificationRecipientParams, + ) as any as S.Schema; + +/** [[::NotificationHandler]] on a create request, where the caller does not get to pick the id. */ +export interface MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem { + active?: boolean | null; + channel?: MetabaseChannelModelsChannelChannel | null; + channel_id?: number | null; + channel_type: unknown; + /** value must be an integer greater than zero. */ + notification_id?: number; + recipients?: MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList; + template?: MetabaseChannelModelsChannelChannelTemplateUserProvided | null; + template_id?: number | null; +} +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + channel: S.optional(S.NullOr(MetabaseChannelModelsChannelChannel)), + channel_id: S.optional(S.NullOr(S.Number)), + channel_type: S.Unknown, + notification_id: S.optional(S.Number), + recipients: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItemRecipientsList, + ), + template: S.optional( + S.NullOr(MetabaseChannelModelsChannelChannelTemplateUserProvided), + ), + template_id: S.optional(S.NullOr(S.Number)), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList = + /*@__PURE__*/ S.Array( + MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersItem, + ) as any as S.Schema; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType = + | "notification/dashboard" + | "notification/system-event" + | "notification/testing" + | "notification/card"; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList = + Array; +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsCreateNotificationSubscriptionParams, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationCreateNotificationParamsCase1 { + active?: boolean | null; + creator?: unknown | null; + creator_id?: number | null; + handlers?: MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList; + payload_id?: number | null; + payload_type: + | MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType + | (string & {}); + subscriptions?: MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList; +} +export const MetabaseNotificationApiNotificationCreateNotificationParamsCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + creator: S.optional(S.NullOr(S.Unknown)), + creator_id: S.optional(S.NullOr(S.Number)), + handlers: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase1HandlersList, + ), + payload_id: S.optional(S.NullOr(S.Number)), + payload_type: + MetabaseNotificationApiNotificationCreateNotificationParamsCase1PayloadType, + subscriptions: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParamsCase1SubscriptionsList, + ), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationCreateNotificationParamsCase1", + }) as any as S.Schema; + +/** [[::NotificationApiInput]] for a create request: no `:id` at any level, so a caller cannot pick a primary key. */ +export type MetabaseNotificationApiNotificationCreateNotificationParams = + | MetabaseNotificationApiNotificationCreateNotificationParamsCase0 + | MetabaseNotificationApiNotificationCreateNotificationParamsCase1; +export const MetabaseNotificationApiNotificationCreateNotificationParams = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateNotificationRequest { + body?: MetabaseNotificationApiNotificationCreateNotificationParams; +} +export const CreateNotificationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional( + MetabaseNotificationApiNotificationCreateNotificationParams.pipe( + T.HttpBody(), + ), + ), + }).pipe(T.Http({ method: "POST", uri: "/api/notification", code: 200 })), +).annotate({ + identifier: "CreateNotificationRequest", +}) as any as S.Schema; + +export interface CreateNotificationResponse {} +export const CreateNotificationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNotificationResponse", +}) as any as S.Schema; + +export type CreateNotificationAdminBulkRequestAction = + | "archive" + | "change-creator"; +export const CreateNotificationAdminBulkRequestAction = /*@__PURE__*/ S.String; + +export type CreateNotificationAdminBulkRequestNotificationIdsList = + Array; +export const CreateNotificationAdminBulkRequestNotificationIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateNotificationAdminBulkRequest { + action: CreateNotificationAdminBulkRequestAction | (string & {}); + /** value must be an integer greater than zero. */ + creator_id?: number; + notification_ids: CreateNotificationAdminBulkRequestNotificationIdsList; +} +export const CreateNotificationAdminBulkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action: CreateNotificationAdminBulkRequestAction, + creator_id: S.optional(S.Number), + notification_ids: CreateNotificationAdminBulkRequestNotificationIdsList, + }).pipe( + T.Http({ method: "POST", uri: "/api/notification/admin/bulk", code: 200 }), + ), +).annotate({ + identifier: "CreateNotificationAdminBulkRequest", +}) as any as S.Schema; + +export interface CreateNotificationAdminBulkResponse {} +export const CreateNotificationAdminBulkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNotificationAdminBulkResponse", +}) as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType = + | "notification/dashboard" + | "notification/system-event" + | "notification/testing" + | "notification/card"; +export const MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsNotificationRecipient, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem { + template_id?: number | null; + channel_id?: number | null; + /** value must be an integer greater than zero. */ + id?: number; + recipients?: MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList; + template?: MetabaseChannelModelsChannelChannelTemplateUserProvided | null; + channel_type: unknown; + channel?: MetabaseChannelModelsChannelChannel | null; + /** value must be an integer greater than zero. */ + notification_id?: number; + active?: boolean | null; +} +export const MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + template_id: S.optional(S.NullOr(S.Number)), + channel_id: S.optional(S.NullOr(S.Number)), + id: S.optional(S.Number), + recipients: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItemRecipientsList, + ), + template: S.optional( + S.NullOr(MetabaseChannelModelsChannelChannelTemplateUserProvided), + ), + channel_type: S.Unknown, + channel: S.optional(S.NullOr(MetabaseChannelModelsChannelChannel)), + notification_id: S.optional(S.Number), + active: S.optional(S.NullOr(S.Boolean)), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList = + /*@__PURE__*/ S.Array( + MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersItem, + ) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationCardSendCondition = + | "goal_below" + | "has_result" + | "goal_above"; +export const MetabaseNotificationModelsNotificationCardSendCondition = + /*@__PURE__*/ S.String; + +/** Schema for :model/NotificationCard. */ +export interface MetabaseNotificationModelsNotificationCard { + card?: unknown | null; + /** value must be an integer greater than zero. */ + card_id: number; + id?: number | null; + notification_id?: number | null; + send_condition?: + | MetabaseNotificationModelsNotificationCardSendCondition + | (string & {}); + send_once?: boolean; +} +export const MetabaseNotificationModelsNotificationCard = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card: S.optional(S.NullOr(S.Unknown)), + card_id: S.Number, + id: S.optional(S.NullOr(S.Number)), + notification_id: S.optional(S.NullOr(S.Number)), + send_condition: S.optional( + MetabaseNotificationModelsNotificationCardSendCondition, + ), + send_once: S.optional(S.Boolean), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationCard", + }) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationSubscriptionCase0Type = + | "notification-subscription/cron" + | "notification-subscription/system-event"; +export const MetabaseNotificationModelsNotificationSubscriptionCase0Type = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationSubscriptionCase0 { + cron_schedule?: unknown | null; + event_name: string; + id?: number; + /** value must be an integer greater than zero. */ + notification_id?: number; + type: + | MetabaseNotificationModelsNotificationSubscriptionCase0Type + | (string & {}); +} +export const MetabaseNotificationModelsNotificationSubscriptionCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cron_schedule: S.optional(S.NullOr(S.Unknown)), + event_name: S.String, + id: S.optional(S.Number), + notification_id: S.optional(S.Number), + type: MetabaseNotificationModelsNotificationSubscriptionCase0Type, + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationSubscriptionCase0", + }) as any as S.Schema; + +export type MetabaseNotificationModelsNotificationSubscriptionCase1Type = + | "notification-subscription/cron" + | "notification-subscription/system-event"; +export const MetabaseNotificationModelsNotificationSubscriptionCase1Type = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType = + | "cron/raw" + | "cron/builder"; +export const MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType = + /*@__PURE__*/ S.String; + +export interface MetabaseNotificationModelsNotificationSubscriptionCase1 { + cron_schedule: string; + event_name?: unknown | null; + id?: number; + /** value must be an integer greater than zero. */ + notification_id?: number; + type: + | MetabaseNotificationModelsNotificationSubscriptionCase1Type + | (string & {}); + ui_display_type?: + | MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType + | (string & {}) + | null; +} +export const MetabaseNotificationModelsNotificationSubscriptionCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + cron_schedule: S.String, + event_name: S.optional(S.NullOr(S.Unknown)), + id: S.optional(S.Number), + notification_id: S.optional(S.Number), + type: MetabaseNotificationModelsNotificationSubscriptionCase1Type, + ui_display_type: S.optional( + S.NullOr( + MetabaseNotificationModelsNotificationSubscriptionCase1UiDisplayType, + ), + ), + }), + ).annotate({ + identifier: "MetabaseNotificationModelsNotificationSubscriptionCase1", + }) as any as S.Schema; + +/** Schema for :model/NotificationSubscription. */ +export type MetabaseNotificationModelsNotificationSubscription = + | MetabaseNotificationModelsNotificationSubscriptionCase0 + | MetabaseNotificationModelsNotificationSubscriptionCase1; +export const MetabaseNotificationModelsNotificationSubscription = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsNotificationSubscription, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationNotificationApiInputCase0 { + payload_type: + | MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType + | (string & {}); + payload_id?: number | null; + handlers?: MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList; + /** value must be an integer greater than zero. */ + id?: number; + creator?: unknown | null; + active?: boolean | null; + payload: MetabaseNotificationModelsNotificationCard; + creator_id?: number | null; + subscriptions?: MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList; +} +export const MetabaseNotificationApiNotificationNotificationApiInputCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + payload_type: + MetabaseNotificationApiNotificationNotificationApiInputCase0PayloadType, + payload_id: S.optional(S.NullOr(S.Number)), + handlers: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase0HandlersList, + ), + id: S.optional(S.Number), + creator: S.optional(S.NullOr(S.Unknown)), + active: S.optional(S.NullOr(S.Boolean)), + payload: MetabaseNotificationModelsNotificationCard, + creator_id: S.optional(S.NullOr(S.Number)), + subscriptions: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase0SubscriptionsList, + ), + }), + ).annotate({ + identifier: "MetabaseNotificationApiNotificationNotificationApiInputCase0", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsNotificationRecipient, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem { + template_id?: number | null; + channel_id?: number | null; + /** value must be an integer greater than zero. */ + id?: number; + recipients?: MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList; + template?: MetabaseChannelModelsChannelChannelTemplateUserProvided | null; + channel_type: unknown; + channel?: MetabaseChannelModelsChannelChannel | null; + /** value must be an integer greater than zero. */ + notification_id?: number; + active?: boolean | null; +} +export const MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + template_id: S.optional(S.NullOr(S.Number)), + channel_id: S.optional(S.NullOr(S.Number)), + id: S.optional(S.Number), + recipients: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItemRecipientsList, + ), + template: S.optional( + S.NullOr(MetabaseChannelModelsChannelChannelTemplateUserProvided), + ), + channel_type: S.Unknown, + channel: S.optional(S.NullOr(MetabaseChannelModelsChannelChannel)), + notification_id: S.optional(S.Number), + active: S.optional(S.NullOr(S.Boolean)), + }), + ).annotate({ + identifier: + "MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem", + }) as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList = + /*@__PURE__*/ S.Array( + MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersItem, + ) as any as S.Schema; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType = + | "notification/dashboard" + | "notification/system-event" + | "notification/testing" + | "notification/card"; +export const MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType = + /*@__PURE__*/ S.String; + +export type MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList = + Array; +export const MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList = + /*@__PURE__*/ S.Array( + MetabaseNotificationModelsNotificationSubscription, + ) as any as S.Schema; + +export interface MetabaseNotificationApiNotificationNotificationApiInputCase1 { + active?: boolean | null; + creator?: unknown | null; + creator_id?: number | null; + handlers?: MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList; + /** value must be an integer greater than zero. */ + id?: number; + payload_id?: number | null; + payload_type: + | MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType + | (string & {}); + subscriptions?: MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList; +} +export const MetabaseNotificationApiNotificationNotificationApiInputCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + creator: S.optional(S.NullOr(S.Unknown)), + creator_id: S.optional(S.NullOr(S.Number)), + handlers: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase1HandlersList, + ), + id: S.optional(S.Number), + payload_id: S.optional(S.NullOr(S.Number)), + payload_type: + MetabaseNotificationApiNotificationNotificationApiInputCase1PayloadType, + subscriptions: S.optional( + MetabaseNotificationApiNotificationNotificationApiInputCase1SubscriptionsList, + ), + }), + ).annotate({ + identifier: "MetabaseNotificationApiNotificationNotificationApiInputCase1", + }) as any as S.Schema; + +/** Notification schema for API input. Like FullyHydratedNotification but restricts templates to user-provided types only (no handlebars-resource). */ +export type MetabaseNotificationApiNotificationNotificationApiInput = + | MetabaseNotificationApiNotificationNotificationApiInputCase0 + | MetabaseNotificationApiNotificationNotificationApiInputCase1; +export const MetabaseNotificationApiNotificationNotificationApiInput = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface CreateNotificationSendRequest { + body?: MetabaseNotificationApiNotificationNotificationApiInput; +} +export const CreateNotificationSendRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional( + MetabaseNotificationApiNotificationNotificationApiInput.pipe( + T.HttpBody(), + ), + ), + }).pipe(T.Http({ method: "POST", uri: "/api/notification/send", code: 200 })), +).annotate({ + identifier: "CreateNotificationSendRequest", +}) as any as S.Schema; + +export interface CreateNotificationSendResponse {} +export const CreateNotificationSendResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNotificationSendResponse", +}) as any as S.Schema; + +export type CreateNotificationSendRequestHandlerIdsList = Array; +export const CreateNotificationSendRequestHandlerIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface CreateNotificationSendRequest2 { + /** value must be an integer greater than zero. */ + id: number; + handler_ids?: CreateNotificationSendRequestHandlerIdsList; +} +export const CreateNotificationSendRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + handler_ids: S.optional(CreateNotificationSendRequestHandlerIdsList), + }).pipe( + T.Http({ method: "POST", uri: "/api/notification/{id}/send", code: 200 }), + ), +).annotate({ + identifier: "CreateNotificationSendRequest2", +}) as any as S.Schema; + +export interface CreateNotificationSend2Response {} +export const CreateNotificationSend2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNotificationSend2Response", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribeRequest { + email: string; + hash: string; + /** value must be an integer greater than zero. */ + notification_handler_id: number; +} +export const CreateNotificationUnsubscribeRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + email: S.String, + hash: S.String, + notification_handler_id: S.Number.pipe(T.Body("notification-handler-id")), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/notification/unsubscribe", + code: 200, + }), + ), +).annotate({ + identifier: "CreateNotificationUnsubscribeRequest", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribeResponse {} +export const CreateNotificationUnsubscribeResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateNotificationUnsubscribeResponse", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribeRequest2 { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateNotificationUnsubscribeRequest2 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/notification/{id}/unsubscribe", + code: 200, + }), + ), +).annotate({ + identifier: "CreateNotificationUnsubscribeRequest2", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribe2Response {} +export const CreateNotificationUnsubscribe2Response = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateNotificationUnsubscribe2Response", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribeUndoRequest { + email: string; + hash: string; + /** value must be an integer greater than zero. */ + notification_handler_id: number; +} +export const CreateNotificationUnsubscribeUndoRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + email: S.String, + hash: S.String, + notification_handler_id: S.Number.pipe(T.Body("notification-handler-id")), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/notification/unsubscribe/undo", + code: 200, + }), + ), +).annotate({ + identifier: "CreateNotificationUnsubscribeUndoRequest", +}) as any as S.Schema; + +export interface CreateNotificationUnsubscribeUndoResponse {} +export const CreateNotificationUnsubscribeUndoResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateNotificationUnsubscribeUndoResponse", + }) as any as S.Schema; + +export interface CreateNotifyDbAttachedDatawarehouseRequest { + schema_name?: string | null; + synchronous_?: boolean | null; + table_name?: string | null; +} +export const CreateNotifyDbAttachedDatawarehouseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + schema_name: S.optional(S.NullOr(S.String)), + synchronous_: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("synchronous?")), + ), + table_name: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/notify/db/attached_datawarehouse", + code: 200, + }), + ), + ).annotate({ + identifier: "CreateNotifyDbAttachedDatawarehouseRequest", + }) as any as S.Schema; + +export interface CreateNotifyDbAttachedDatawarehouseResponse {} +export const CreateNotifyDbAttachedDatawarehouseResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreateNotifyDbAttachedDatawarehouseResponse", + }) as any as S.Schema; + +export interface CreateNotifyDbNewTableRequest { + /** value must be an integer greater than zero. */ + id: number; + schema_name: string; + table_name: string; +} +export const CreateNotifyDbNewTableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + schema_name: S.String, + table_name: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/notify/db/{id}/new-table", code: 200 }), + ), +).annotate({ + identifier: "CreateNotifyDbNewTableRequest", +}) as any as S.Schema; + +export interface CreateNotifyDbNewTableResponse {} +export const CreateNotifyDbNewTableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateNotifyDbNewTableResponse", +}) as any as S.Schema; + +export interface CreateOsiAiContextReconcileRequest {} +export const CreateOsiAiContextReconcileRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/osi/ai-context/reconcile", code: 200 }), + ), +).annotate({ + identifier: "CreateOsiAiContextReconcileRequest", +}) as any as S.Schema; + +export interface CreateOsiAiContextReconcileResponse {} +export const CreateOsiAiContextReconcileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateOsiAiContextReconcileResponse", +}) as any as S.Schema; + +export interface CreatePermissionsGroupRequest { + is_tenant_group?: boolean | null; + name: string; +} +export const CreatePermissionsGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_tenant_group: S.optional(S.NullOr(S.Boolean)), + name: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/permissions/group", code: 200 })), +).annotate({ + identifier: "CreatePermissionsGroupRequest", +}) as any as S.Schema; + +export interface CreatePermissionsGroupResponse {} +export const CreatePermissionsGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePermissionsGroupResponse", +}) as any as S.Schema; + +export interface CreatePermissionsMembershipRequest { + /** value must be an integer greater than zero. */ + group_id: number; + is_group_manager?: boolean | null; + /** value must be an integer greater than zero. */ + user_id: number; +} +export const CreatePermissionsMembershipRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number, + is_group_manager: S.optional(S.NullOr(S.Boolean)), + user_id: S.Number, + }).pipe( + T.Http({ method: "POST", uri: "/api/permissions/membership", code: 200 }), + ), +).annotate({ + identifier: "CreatePermissionsMembershipRequest", +}) as any as S.Schema; + +export interface CreatePermissionsMembershipResponse {} +export const CreatePermissionsMembershipResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePermissionsMembershipResponse", +}) as any as S.Schema; + +export interface CreatePersistCardPersistRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const CreatePersistCardPersistRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/card/{card_id}/persist", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistCardPersistRequest", +}) as any as S.Schema; + +export interface CreatePersistCardPersistResponse {} +export const CreatePersistCardPersistResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePersistCardPersistResponse", +}) as any as S.Schema; + +export interface CreatePersistCardRefreshRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const CreatePersistCardRefreshRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/card/{card_id}/refresh", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistCardRefreshRequest", +}) as any as S.Schema; + +export interface CreatePersistCardRefreshResponse {} +export const CreatePersistCardRefreshResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePersistCardRefreshResponse", +}) as any as S.Schema; + +export interface CreatePersistCardUnpersistRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const CreatePersistCardUnpersistRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/card/{card_id}/unpersist", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistCardUnpersistRequest", +}) as any as S.Schema; + +export interface CreatePersistCardUnpersistResponse {} +export const CreatePersistCardUnpersistResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePersistCardUnpersistResponse", +}) as any as S.Schema; + +export interface CreatePersistDatabasePersistRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreatePersistDatabasePersistRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/database/{id}/persist", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistDatabasePersistRequest", +}) as any as S.Schema; + +export interface CreatePersistDatabasePersistResponse {} +export const CreatePersistDatabasePersistResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreatePersistDatabasePersistResponse", +}) as any as S.Schema; + +export interface CreatePersistDatabaseUnpersistRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreatePersistDatabaseUnpersistRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/database/{id}/unpersist", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistDatabaseUnpersistRequest", +}) as any as S.Schema; + +export interface CreatePersistDatabaseUnpersistResponse {} +export const CreatePersistDatabaseUnpersistResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreatePersistDatabaseUnpersistResponse", +}) as any as S.Schema; + +export interface CreatePersistDisableRequest {} +export const CreatePersistDisableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/persist/disable", code: 200 }), + ), +).annotate({ + identifier: "CreatePersistDisableRequest", +}) as any as S.Schema; + +export interface CreatePersistDisableResponse {} +export const CreatePersistDisableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePersistDisableResponse", +}) as any as S.Schema; + +export interface CreatePersistEnableRequest {} +export const CreatePersistEnableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/persist/enable", code: 200 }), + ), +).annotate({ + identifier: "CreatePersistEnableRequest", +}) as any as S.Schema; + +export interface CreatePersistEnableResponse {} +export const CreatePersistEnableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePersistEnableResponse", +}) as any as S.Schema; + +export interface CreatePersistSetRefreshScheduleRequest { + /** Value must be a string representing a cron schedule of format */ + cron: string; +} +export const CreatePersistSetRefreshScheduleRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + cron: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/persist/set-refresh-schedule", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePersistSetRefreshScheduleRequest", +}) as any as S.Schema; + +export interface CreatePersistSetRefreshScheduleResponse {} +export const CreatePersistSetRefreshScheduleResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreatePersistSetRefreshScheduleResponse", +}) as any as S.Schema; + +export interface CreatePremiumFeaturesTokenRefreshRequest {} +export const CreatePremiumFeaturesTokenRefreshRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "POST", + uri: "/api/premium-features/token/refresh", + code: 200, + }), + ), +).annotate({ + identifier: "CreatePremiumFeaturesTokenRefreshRequest", +}) as any as S.Schema; + +export interface CreatePremiumFeaturesTokenRefreshResponse {} +export const CreatePremiumFeaturesTokenRefreshResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "CreatePremiumFeaturesTokenRefreshResponse", + }) as any as S.Schema; + +export interface CreateProductFeedbackRequest { + comments?: string | null; + email?: string | null; + source: string; +} +export const CreateProductFeedbackRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + comments: S.optional(S.NullOr(S.String)), + email: S.optional(S.NullOr(S.String)), + source: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/product-feedback", code: 200 })), +).annotate({ + identifier: "CreateProductFeedbackRequest", +}) as any as S.Schema; + +export interface CreateProductFeedbackResponse {} +export const CreateProductFeedbackResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateProductFeedbackResponse", +}) as any as S.Schema; + +export type CreatePulseRequestParametersList = + Array; +export const CreatePulseRequestParametersList = /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameter, +) as any as S.Schema; + +export interface CreatePulseRequest { + cards: unknown; + channels: unknown; + collection_id?: number | null; + collection_position?: number | null; + dashboard_id?: number | null; + name: string; + parameters?: CreatePulseRequestParametersList | null; + skip_if_empty?: boolean | null; +} +export const CreatePulseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + cards: S.Unknown, + channels: S.Unknown, + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + dashboard_id: S.optional(S.NullOr(S.Number)), + name: S.String, + parameters: S.optional(S.NullOr(CreatePulseRequestParametersList)), + skip_if_empty: S.optional(S.NullOr(S.Boolean)), + }).pipe(T.Http({ method: "POST", uri: "/api/pulse", code: 200 })), +).annotate({ + identifier: "CreatePulseRequest", +}) as any as S.Schema; + +export interface CreatePulseResponse {} +export const CreatePulseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePulseResponse", +}) as any as S.Schema; + +export type CreatePulseTestRequestAlertCondition = "rows" | "goal"; +export const CreatePulseTestRequestAlertCondition = /*@__PURE__*/ S.String; + +export interface CreatePulseTestRequest { + id?: number | null; + name: string; + collection_position?: number | null; + skip_if_empty?: boolean | null; + alert_above_goal?: boolean | null; + alert_condition?: CreatePulseTestRequestAlertCondition | (string & {}) | null; + collection_id?: number | null; + alert_first_only?: boolean | null; + disable_links?: boolean | null; + parameters?: MetabaseParametersSchemaParameterValues | null; + cards: unknown; + dashboard_id?: number | null; + channels: unknown; +} +export const CreatePulseTestRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.NullOr(S.Number)), + name: S.String, + collection_position: S.optional(S.NullOr(S.Number)), + skip_if_empty: S.optional(S.NullOr(S.Boolean)), + alert_above_goal: S.optional(S.NullOr(S.Boolean)), + alert_condition: S.optional(S.NullOr(CreatePulseTestRequestAlertCondition)), + collection_id: S.optional(S.NullOr(S.Number)), + alert_first_only: S.optional(S.NullOr(S.Boolean)), + disable_links: S.optional(S.NullOr(S.Boolean)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + cards: S.Unknown, + dashboard_id: S.optional(S.NullOr(S.Number)), + channels: S.Unknown, + }).pipe(T.Http({ method: "POST", uri: "/api/pulse/test", code: 200 })), +).annotate({ + identifier: "CreatePulseTestRequest", +}) as any as S.Schema; + +export interface CreatePulseTestResponse {} +export const CreatePulseTestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePulseTestResponse", +}) as any as S.Schema; + +export interface CreatePulseUnsubscribeRequest { + email: string; + hash: string; + /** value must be an integer greater than zero. */ + pulse_id: number; +} +export const CreatePulseUnsubscribeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + hash: S.String, + pulse_id: S.Number.pipe(T.Body("pulse-id")), + }).pipe(T.Http({ method: "POST", uri: "/api/pulse/unsubscribe", code: 200 })), +).annotate({ + identifier: "CreatePulseUnsubscribeRequest", +}) as any as S.Schema; + +export interface CreatePulseUnsubscribeResponse {} +export const CreatePulseUnsubscribeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePulseUnsubscribeResponse", +}) as any as S.Schema; + +export interface CreatePulseUnsubscribeUndoRequest { + email: string; + hash: string; + /** value must be an integer greater than zero. */ + pulse_id: number; +} +export const CreatePulseUnsubscribeUndoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + hash: S.String, + pulse_id: S.Number.pipe(T.Body("pulse-id")), + }).pipe( + T.Http({ method: "POST", uri: "/api/pulse/unsubscribe/undo", code: 200 }), + ), +).annotate({ + identifier: "CreatePulseUnsubscribeUndoRequest", +}) as any as S.Schema; + +export interface CreatePulseUnsubscribeUndoResponse {} +export const CreatePulseUnsubscribeUndoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreatePulseUnsubscribeUndoResponse", +}) as any as S.Schema; + +export type CreateRevisionRevertRequestEntity = + | "card" + | "dashboard" + | "document" + | "measure" + | "segment" + | "transform"; +export const CreateRevisionRevertRequestEntity = /*@__PURE__*/ S.String; + +export interface CreateRevisionRevertRequest { + entity: CreateRevisionRevertRequestEntity | (string & {}); + /** value must be an integer greater than zero. */ + id: number; + /** value must be an integer greater than zero. */ + revision_id: number; +} +export const CreateRevisionRevertRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: CreateRevisionRevertRequestEntity, + id: S.Number, + revision_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/revision/revert", code: 200 })), +).annotate({ + identifier: "CreateRevisionRevertRequest", +}) as any as S.Schema; + +export interface CreateRevisionRevertResponse {} +export const CreateRevisionRevertResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateRevisionRevertResponse", +}) as any as S.Schema; + +export interface CreateSearchForceReindexRequest {} +export const CreateSearchForceReindexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/search/force-reindex", code: 200 }), + ), +).annotate({ + identifier: "CreateSearchForceReindexRequest", +}) as any as S.Schema; + +export interface CreateSearchForceReindexResponse {} +export const CreateSearchForceReindexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSearchForceReindexResponse", +}) as any as S.Schema; + +export interface CreateSearchReInitRequest {} +export const CreateSearchReInitRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "POST", uri: "/api/search/re-init", code: 200 }), + ), +).annotate({ + identifier: "CreateSearchReInitRequest", +}) as any as S.Schema; + +export interface CreateSearchReInitResponse {} +export const CreateSearchReInitResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSearchReInitResponse", +}) as any as S.Schema; + +export interface CreateSegmentRequest { + definition: MetabaseLibSchemaQuery; + description?: string | null; + name: string; + /** value must be an integer greater than zero. */ + table_id: number; +} +export const CreateSegmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + definition: MetabaseLibSchemaQuery, + description: S.optional(S.NullOr(S.String)), + name: S.String, + table_id: S.Number, + }).pipe(T.Http({ method: "POST", uri: "/api/segment", code: 200 })), +).annotate({ + identifier: "CreateSegmentRequest", +}) as any as S.Schema; + +export interface CreateSegmentResponse {} +export const CreateSegmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSegmentResponse", +}) as any as S.Schema; + +export interface CreateSessionRequest { + password: string | Redacted.Redacted; + username: string; +} +export const CreateSessionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + password: S.String.pipe(T.SensitiveValue({})), + username: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/session", code: 200 })), +).annotate({ + identifier: "CreateSessionRequest", +}) as any as S.Schema; + +export interface CreateSessionResponse {} +export const CreateSessionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionResponse", +}) as any as S.Schema; + +export interface CreateSessionForgotPasswordRequest { + /** value must be a valid email address. */ + email: string; +} +export const CreateSessionForgotPasswordRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/session/forgot_password", code: 200 }), + ), +).annotate({ + identifier: "CreateSessionForgotPasswordRequest", +}) as any as S.Schema; + +export interface CreateSessionForgotPasswordResponse {} +export const CreateSessionForgotPasswordResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionForgotPasswordResponse", +}) as any as S.Schema; + +export interface CreateSessionGoogleAuthRequest { + token: string; +} +export const CreateSessionGoogleAuthRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/session/google_auth", code: 200 }), + ), +).annotate({ + identifier: "CreateSessionGoogleAuthRequest", +}) as any as S.Schema; + +export interface CreateSessionGoogleAuthResponse {} +export const CreateSessionGoogleAuthResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionGoogleAuthResponse", +}) as any as S.Schema; + +export interface CreateSessionMfaSendEmailOtpRequest { + challenge_token: string; +} +export const CreateSessionMfaSendEmailOtpRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + challenge_token: S.String, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/session/mfa/send-email-otp", + code: 200, + }), + ), +).annotate({ + identifier: "CreateSessionMfaSendEmailOtpRequest", +}) as any as S.Schema; + +export interface CreateSessionMfaSendEmailOtpResponse {} +export const CreateSessionMfaSendEmailOtpResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateSessionMfaSendEmailOtpResponse", +}) as any as S.Schema; + +export interface CreateSessionMfaVerifyRequest { + challenge_token: string; + code: string; + remember?: boolean; +} +export const CreateSessionMfaVerifyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + challenge_token: S.String, + code: S.String, + remember: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "POST", uri: "/api/session/mfa/verify", code: 200 }), + ), +).annotate({ + identifier: "CreateSessionMfaVerifyRequest", +}) as any as S.Schema; + +export interface CreateSessionMfaVerifyResponse {} +export const CreateSessionMfaVerifyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionMfaVerifyResponse", +}) as any as S.Schema; + +export interface CreateSessionPasswordCheckRequest { + /** password is too common. */ + password: string | Redacted.Redacted; +} +export const CreateSessionPasswordCheckRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + password: S.String.pipe(T.SensitiveValue({})), + }).pipe( + T.Http({ method: "POST", uri: "/api/session/password-check", code: 200 }), + ), +).annotate({ + identifier: "CreateSessionPasswordCheckRequest", +}) as any as S.Schema; + +export interface CreateSessionPasswordCheckResponse {} +export const CreateSessionPasswordCheckResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionPasswordCheckResponse", +}) as any as S.Schema; + +export interface CreateSessionResetPasswordRequest { + /** password is too common. */ + password: string | Redacted.Redacted; + token: string; +} +export const CreateSessionResetPasswordRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + password: S.String.pipe(T.SensitiveValue({})), + token: S.String, + }).pipe( + T.Http({ method: "POST", uri: "/api/session/reset_password", code: 200 }), + ), +).annotate({ + identifier: "CreateSessionResetPasswordRequest", +}) as any as S.Schema; + +export interface CreateSessionResetPasswordResponse {} +export const CreateSessionResetPasswordResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSessionResetPasswordResponse", +}) as any as S.Schema; + +export interface CreateSetupRequestPrefs { + site_locale?: string | null; + site_name: string; +} +export const CreateSetupRequestPrefs = /*@__PURE__*/ S.suspend(() => + S.Struct({ + site_locale: S.optional(S.NullOr(S.String)), + site_name: S.String, + }), +).annotate({ + identifier: "CreateSetupRequestPrefs", +}) as any as S.Schema; + +export interface CreateSetupRequestUser { + /** value must be a valid email address. */ + email: string; + first_name?: string | null; + last_name?: string | null; + /** password is too common. */ + password: string | Redacted.Redacted; +} +export const CreateSetupRequestUser = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email: S.String, + first_name: S.optional(S.NullOr(S.String)), + last_name: S.optional(S.NullOr(S.String)), + password: S.String.pipe(T.SensitiveValue({})), + }), +).annotate({ + identifier: "CreateSetupRequestUser", +}) as any as S.Schema; + +export interface CreateSetupRequest { + prefs: CreateSetupRequestPrefs; + /** Token does not match the setup token. */ + token: string; + user: CreateSetupRequestUser; +} +export const CreateSetupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + prefs: CreateSetupRequestPrefs, + token: S.String, + user: CreateSetupRequestUser, + }).pipe(T.Http({ method: "POST", uri: "/api/setup", code: 200 })), +).annotate({ + identifier: "CreateSetupRequest", +}) as any as S.Schema; + +export interface CreateSetupResponse {} +export const CreateSetupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSetupResponse", +}) as any as S.Schema; + +export interface CreateSlackBugReportRequest { + diagnosticInfo: unknown; +} +export const CreateSlackBugReportRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + diagnosticInfo: S.Unknown, + }).pipe(T.Http({ method: "POST", uri: "/api/slack/bug-report", code: 200 })), +).annotate({ + identifier: "CreateSlackBugReportRequest", +}) as any as S.Schema; + +export interface CreateSlackBugReportResponse {} +export const CreateSlackBugReportResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateSlackBugReportResponse", +}) as any as S.Schema; + +export interface CreateTableAppendCsvRequestFile { + filename: string; + tempfile: unknown; +} +export const CreateTableAppendCsvRequestFile = /*@__PURE__*/ S.suspend(() => + S.Struct({ + filename: S.String, + tempfile: S.Unknown, + }), +).annotate({ + identifier: "CreateTableAppendCsvRequestFile", +}) as any as S.Schema; + +export interface CreateTableAppendCsvRequest { + /** value must be an integer greater than zero. */ + id: number; + collection_id?: string; + file: CreateTableAppendCsvRequestFile; +} +export const CreateTableAppendCsvRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + collection_id: S.optional(S.String), + file: CreateTableAppendCsvRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/table/{id}/append-csv", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "CreateTableAppendCsvRequest", +}) as any as S.Schema; + +export interface CreateTableAppendCsvResponse {} +export const CreateTableAppendCsvResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTableAppendCsvResponse", +}) as any as S.Schema; + +export interface CreateTableDiscardValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTableDiscardValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/table/{id}/discard_values", + code: 200, + }), + ), +).annotate({ + identifier: "CreateTableDiscardValueRequest", +}) as any as S.Schema; + +export interface CreateTableDiscardValueResponse {} +export const CreateTableDiscardValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTableDiscardValueResponse", +}) as any as S.Schema; + +export type CreateTableReplaceCsvRequestFile = CreateTableAppendCsvRequestFile; +export const CreateTableReplaceCsvRequestFile = CreateTableAppendCsvRequestFile; + +export interface CreateTableReplaceCsvRequest { + /** value must be an integer greater than zero. */ + id: number; + collection_id?: string; + file: CreateTableAppendCsvRequestFile; +} +export const CreateTableReplaceCsvRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + collection_id: S.optional(S.String), + file: CreateTableAppendCsvRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/table/{id}/replace-csv", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "CreateTableReplaceCsvRequest", +}) as any as S.Schema; + +export interface CreateTableReplaceCsvResponse {} +export const CreateTableReplaceCsvResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTableReplaceCsvResponse", +}) as any as S.Schema; + +export interface CreateTableRescanValueRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTableRescanValueRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/table/{id}/rescan_values", code: 200 }), + ), +).annotate({ + identifier: "CreateTableRescanValueRequest", +}) as any as S.Schema; + +export interface CreateTableRescanValueResponse {} +export const CreateTableRescanValueResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTableRescanValueResponse", +}) as any as S.Schema; + +export interface CreateTableSyncSchemaRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTableSyncSchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/table/{id}/sync_schema", code: 200 }), + ), +).annotate({ + identifier: "CreateTableSyncSchemaRequest", +}) as any as S.Schema; + +export interface CreateTableSyncSchemaResponse {} +export const CreateTableSyncSchemaResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTableSyncSchemaResponse", +}) as any as S.Schema; + +export type CreateTimelineRequestIcon = + | "star" + | "cake" + | "mail" + | "warning" + | "bell" + | "cloud"; +export const CreateTimelineRequestIcon = /*@__PURE__*/ S.String; + +export interface CreateTimelineRequest { + archived?: boolean | null; + collection_id?: number | null; + default?: boolean | null; + description?: string | null; + icon?: CreateTimelineRequestIcon | (string & {}) | null; + name: string; +} +export const CreateTimelineRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + default: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + icon: S.optional(S.NullOr(CreateTimelineRequestIcon)), + name: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/timeline", code: 200 })), +).annotate({ + identifier: "CreateTimelineRequest", +}) as any as S.Schema; + +export interface CreateTimelineResponse {} +export const CreateTimelineResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTimelineResponse", +}) as any as S.Schema; + +export type CreateTimelineEventRequestSource = "collections" | "question"; +export const CreateTimelineEventRequestSource = /*@__PURE__*/ S.String; + +export type CreateTimelineEventRequestIcon = + | "star" + | "cake" + | "mail" + | "warning" + | "bell" + | "cloud"; +export const CreateTimelineEventRequestIcon = /*@__PURE__*/ S.String; + +export interface CreateTimelineEventRequest { + question_id?: number | null; + timezone: string; + /** value must be a valid date string */ + timestamp: string; + name: string; + archived?: boolean | null; + /** value must be an integer greater than zero. */ + timeline_id: number; + source?: CreateTimelineEventRequestSource | (string & {}) | null; + time_matters?: boolean | null; + description?: string | null; + icon?: CreateTimelineEventRequestIcon | (string & {}) | null; +} +export const CreateTimelineEventRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + question_id: S.optional(S.NullOr(S.Number)), + timezone: S.String, + timestamp: S.String, + name: S.String, + archived: S.optional(S.NullOr(S.Boolean)), + timeline_id: S.Number, + source: S.optional(S.NullOr(CreateTimelineEventRequestSource)), + time_matters: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + icon: S.optional(S.NullOr(CreateTimelineEventRequestIcon)), + }).pipe(T.Http({ method: "POST", uri: "/api/timeline-event", code: 200 })), +).annotate({ + identifier: "CreateTimelineEventRequest", +}) as any as S.Schema; + +export interface CreateTimelineEventResponse {} +export const CreateTimelineEventResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTimelineEventResponse", +}) as any as S.Schema; + +export type CreateTransformRequestTagIdsList = Array; +export const CreateTransformRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface MetabaseTransformsSchemaCheckpointStrategy { + checkpoint_filter_field_id?: number; + type: unknown; +} +export const MetabaseTransformsSchemaCheckpointStrategy = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + checkpoint_filter_field_id: S.optional( + S.Number.pipe(T.Body("checkpoint-filter-field-id")), + ), + type: S.Unknown, + }), + ).annotate({ + identifier: "MetabaseTransformsSchemaCheckpointStrategy", + }) as any as S.Schema; + +export interface MetabaseTransformsSchemaTransformSourceCase0 { + query: MetabaseLibSchemaQuery; + source_incremental_strategy?: MetabaseTransformsSchemaCheckpointStrategy; + type: unknown; +} +export const MetabaseTransformsSchemaTransformSourceCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: MetabaseLibSchemaQuery, + source_incremental_strategy: S.optional( + MetabaseTransformsSchemaCheckpointStrategy.pipe( + T.Body("source-incremental-strategy"), + ), + ), + type: S.Unknown, + }), + ).annotate({ + identifier: "MetabaseTransformsSchemaTransformSourceCase0", + }) as any as S.Schema; + +export type MetabaseTransformsSchemaTransformSourceCase1SourceTablesList = + Array; +export const MetabaseTransformsSchemaTransformSourceCase1SourceTablesList = + /*@__PURE__*/ S.Array( + MetabaseTransformsBaseUtilSourceTableEntry, + ) as any as S.Schema; + +export interface MetabaseTransformsSchemaTransformSourceCase1 { + body: string; + source_database?: number; + source_incremental_strategy?: MetabaseTransformsSchemaCheckpointStrategy; + source_tables: MetabaseTransformsSchemaTransformSourceCase1SourceTablesList; + type: unknown; +} +export const MetabaseTransformsSchemaTransformSourceCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.String, + source_database: S.optional(S.Number.pipe(T.Body("source-database"))), + source_incremental_strategy: S.optional( + MetabaseTransformsSchemaCheckpointStrategy.pipe( + T.Body("source-incremental-strategy"), + ), + ), + source_tables: + MetabaseTransformsSchemaTransformSourceCase1SourceTablesList.pipe( + T.Body("source-tables"), + ), + type: S.Unknown, + }), + ).annotate({ + identifier: "MetabaseTransformsSchemaTransformSourceCase1", + }) as any as S.Schema; + +export type MetabaseTransformsSchemaTransformSource = + | MetabaseTransformsSchemaTransformSourceCase0 + | MetabaseTransformsSchemaTransformSourceCase1; +export const MetabaseTransformsSchemaTransformSource = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface MetabaseTransformsSchemaTableTarget { + database?: number; + name: string; + schema?: string | null; + type: unknown; +} +export const MetabaseTransformsSchemaTableTarget = /*@__PURE__*/ S.suspend(() => + S.Struct({ + database: S.optional(S.Number), + name: S.String, + schema: S.optional(S.NullOr(S.String)), + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseTransformsSchemaTableTarget", +}) as any as S.Schema; + +export interface MetabaseTransformsSchemaAppendConfig { + type: unknown; +} +export const MetabaseTransformsSchemaAppendConfig = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseTransformsSchemaAppendConfig", +}) as any as S.Schema; + +/** One column of a merge unique key. Carries a resolved `:field-id` when the target column is known, degrading to a `:name` ref when the target table doesn't exist yet (mirrors `::source-table-entry`). */ +export interface MetabaseTransformsSchemaMergeKeyColumn { + field_id?: number | null; + name?: string; +} +export const MetabaseTransformsSchemaMergeKeyColumn = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + field_id: S.optional(S.NullOr(S.Number).pipe(T.Body("field-id"))), + name: S.optional(S.String), + }), +).annotate({ + identifier: "MetabaseTransformsSchemaMergeKeyColumn", +}) as any as S.Schema; + +export type MetabaseTransformsSchemaMergeConfigUniqueKeyList = + Array; +export const MetabaseTransformsSchemaMergeConfigUniqueKeyList = + /*@__PURE__*/ S.Array( + MetabaseTransformsSchemaMergeKeyColumn, + ) as any as S.Schema; + +export interface MetabaseTransformsSchemaMergeConfig { + type: unknown; + unique_key: MetabaseTransformsSchemaMergeConfigUniqueKeyList; +} +export const MetabaseTransformsSchemaMergeConfig = /*@__PURE__*/ S.suspend(() => + S.Struct({ + type: S.Unknown, + unique_key: MetabaseTransformsSchemaMergeConfigUniqueKeyList.pipe( + T.Body("unique-key"), + ), + }), +).annotate({ + identifier: "MetabaseTransformsSchemaMergeConfig", +}) as any as S.Schema; + +export type MetabaseTransformsSchemaTargetIncrementalStrategy = + | MetabaseTransformsSchemaAppendConfig + | MetabaseTransformsSchemaMergeConfig; +export const MetabaseTransformsSchemaTargetIncrementalStrategy = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface MetabaseTransformsSchemaTableIncrementalTarget { + database?: number; + name: string; + schema?: string | null; + target_incremental_strategy: MetabaseTransformsSchemaTargetIncrementalStrategy; + type: unknown; +} +export const MetabaseTransformsSchemaTableIncrementalTarget = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + database: S.optional(S.Number), + name: S.String, + schema: S.optional(S.NullOr(S.String)), + target_incremental_strategy: + MetabaseTransformsSchemaTargetIncrementalStrategy.pipe( + T.Body("target-incremental-strategy"), + ), + type: S.Unknown, + }), + ).annotate({ + identifier: "MetabaseTransformsSchemaTableIncrementalTarget", + }) as any as S.Schema; + +export type MetabaseTransformsSchemaTransformTarget = + | MetabaseTransformsSchemaTableTarget + | MetabaseTransformsSchemaTableIncrementalTarget; +export const MetabaseTransformsSchemaTransformTarget = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseTransformsRestApiTransformRunTrigger = + | "none" + | "global-schedule"; +export const MetabaseTransformsRestApiTransformRunTrigger = + /*@__PURE__*/ S.String; + +export interface CreateTransformRequest { + owner_email?: string | null; + owner_user_id?: number | null; + name: string; + tag_ids?: CreateTransformRequestTagIdsList; + collection_id?: number | null; + source: MetabaseTransformsSchemaTransformSource; + target: MetabaseTransformsSchemaTransformTarget; + run_trigger?: MetabaseTransformsRestApiTransformRunTrigger | (string & {}); + description?: string | null; +} +export const CreateTransformRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + owner_email: S.optional(S.NullOr(S.String)), + owner_user_id: S.optional(S.NullOr(S.Number)), + name: S.String, + tag_ids: S.optional(CreateTransformRequestTagIdsList), + collection_id: S.optional(S.NullOr(S.Number)), + source: MetabaseTransformsSchemaTransformSource, + target: MetabaseTransformsSchemaTransformTarget, + run_trigger: S.optional(MetabaseTransformsRestApiTransformRunTrigger), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "POST", uri: "/api/transform", code: 200 })), +).annotate({ + identifier: "CreateTransformRequest", +}) as any as S.Schema; + +export interface CreateTransformResponse {} +export const CreateTransformResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformResponse", +}) as any as S.Schema; + +export interface CreateTransformCancelRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTransformCancelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/transform/{id}/cancel", code: 200 }), + ), +).annotate({ + identifier: "CreateTransformCancelRequest", +}) as any as S.Schema; + +export interface CreateTransformCancelResponse {} +export const CreateTransformCancelResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformCancelResponse", +}) as any as S.Schema; + +export type CreateTransformJobRequestTagIdsList = Array; +export const CreateTransformJobRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type CreateTransformJobRequestUiDisplayType = + | "cron/raw" + | "cron/builder"; +export const CreateTransformJobRequestUiDisplayType = /*@__PURE__*/ S.String; + +export interface CreateTransformJobRequest { + description?: string | null; + name: string; + schedule: string; + tag_ids?: CreateTransformJobRequestTagIdsList; + ui_display_type?: CreateTransformJobRequestUiDisplayType | (string & {}); +} +export const CreateTransformJobRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + description: S.optional(S.NullOr(S.String)), + name: S.String, + schedule: S.String, + tag_ids: S.optional(CreateTransformJobRequestTagIdsList), + ui_display_type: S.optional(CreateTransformJobRequestUiDisplayType), + }).pipe(T.Http({ method: "POST", uri: "/api/transform-job", code: 200 })), +).annotate({ + identifier: "CreateTransformJobRequest", +}) as any as S.Schema; + +export interface CreateTransformJobResponse {} +export const CreateTransformJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformJobResponse", +}) as any as S.Schema; + +export interface CreateTransformJobRunRequest { + /** value must be an integer greater than zero. */ + job_id: number; + run_all?: boolean; +} +export const CreateTransformJobRunRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + run_all: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/transform-job/{job_id}/run", + code: 200, + }), + ), +).annotate({ + identifier: "CreateTransformJobRunRequest", +}) as any as S.Schema; + +export interface CreateTransformJobRunResponse {} +export const CreateTransformJobRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformJobRunResponse", +}) as any as S.Schema; + +export interface CreateTransformResetCheckpointRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTransformResetCheckpointRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/transform/{id}/reset-checkpoint", + code: 200, + }), + ), +).annotate({ + identifier: "CreateTransformResetCheckpointRequest", +}) as any as S.Schema; + +export interface CreateTransformResetCheckpointResponse {} +export const CreateTransformResetCheckpointResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "CreateTransformResetCheckpointResponse", +}) as any as S.Schema; + +export interface CreateTransformRunRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateTransformRunRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/transform/{id}/run", code: 200 }), + ), +).annotate({ + identifier: "CreateTransformRunRequest", +}) as any as S.Schema; + +export interface CreateTransformRunResponse {} +export const CreateTransformRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformRunResponse", +}) as any as S.Schema; + +export interface CreateTransformTagRequest { + name: string; +} +export const CreateTransformTagRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + name: S.String, + }).pipe(T.Http({ method: "POST", uri: "/api/transform-tag", code: 200 })), +).annotate({ + identifier: "CreateTransformTagRequest", +}) as any as S.Schema; + +export interface CreateTransformTagResponse {} +export const CreateTransformTagResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateTransformTagResponse", +}) as any as S.Schema; + +export type CreateUploadCsvRequestFile = CreateTableAppendCsvRequestFile; +export const CreateUploadCsvRequestFile = CreateTableAppendCsvRequestFile; + +export interface CreateUploadCsvRequest { + collection_id: number | null; + file: CreateTableAppendCsvRequestFile; +} +export const CreateUploadCsvRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collection_id: S.NullOr(S.Number), + file: CreateTableAppendCsvRequestFile, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/upload/csv", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "CreateUploadCsvRequest", +}) as any as S.Schema; + +export interface CreateUploadCsvResponse {} +export const CreateUploadCsvResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateUploadCsvResponse", +}) as any as S.Schema; + +export type CreateUserRequestLoginAttributesMap = { + [key: string]: unknown | undefined; +}; +export const CreateUserRequestLoginAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +/** Group Membership info of a User. In which :is_group_manager is only included if `advanced-permissions` is enabled. */ +export interface MetabaseUsersSchemaUserGroupMembership { + /** value must be an integer greater than zero. */ + id: number; + /** Only relevant if `advanced-permissions` is enabled. If it is, you should always include this key. */ + is_group_manager?: boolean; +} +export const MetabaseUsersSchemaUserGroupMembership = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number, + is_group_manager: S.optional(S.Boolean), + }), +).annotate({ + identifier: "MetabaseUsersSchemaUserGroupMembership", +}) as any as S.Schema; + +export type CreateUserRequestUserGroupMembershipsList = + Array; +export const CreateUserRequestUserGroupMembershipsList = /*@__PURE__*/ S.Array( + MetabaseUsersSchemaUserGroupMembership, +) as any as S.Schema; + +export type CreateUserRequestInviteTargetType = "dashboard" | "question"; +export const CreateUserRequestInviteTargetType = /*@__PURE__*/ S.String; + +export interface CreateUserRequestInviteTarget { + /** value must be an integer greater than zero. */ + id: number; + name: string; + type: CreateUserRequestInviteTargetType | (string & {}); +} +export const CreateUserRequestInviteTarget = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number, + name: S.String, + type: CreateUserRequestInviteTargetType, + }), +).annotate({ + identifier: "CreateUserRequestInviteTarget", +}) as any as S.Schema; + +export interface CreateUserRequest { + login_attributes?: CreateUserRequestLoginAttributesMap | null; + user_group_memberships?: CreateUserRequestUserGroupMembershipsList | null; + /** value must be a valid email address. */ + email: string; + tenant_id?: number | null; + last_name?: string | null; + first_name?: string | null; + source?: string | null; + password?: string | null; + invite_target?: CreateUserRequestInviteTarget | null; +} +export const CreateUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + login_attributes: S.optional(S.NullOr(CreateUserRequestLoginAttributesMap)), + user_group_memberships: S.optional( + S.NullOr(CreateUserRequestUserGroupMembershipsList), + ), + email: S.String, + tenant_id: S.optional(S.NullOr(S.Number)), + last_name: S.optional(S.NullOr(S.String)), + first_name: S.optional(S.NullOr(S.String)), + source: S.optional(S.NullOr(S.String)), + password: S.optional(S.NullOr(S.String)), + invite_target: S.optional(S.NullOr(CreateUserRequestInviteTarget)), + }).pipe(T.Http({ method: "POST", uri: "/api/user", code: 200 })), +).annotate({ + identifier: "CreateUserRequest", +}) as any as S.Schema; + +export interface CreateUserResponse {} +export const CreateUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateUserResponse", +}) as any as S.Schema; + +export interface CreateUserPasswordResetUrlRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const CreateUserPasswordResetUrlRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/user/{id}/password-reset-url", + code: 200, + }), + ), +).annotate({ + identifier: "CreateUserPasswordResetUrlRequest", +}) as any as S.Schema; + +export interface CreateUserPasswordResetUrlResponse {} +export const CreateUserPasswordResetUrlResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "CreateUserPasswordResetUrlResponse", +}) as any as S.Schema; + +export interface DeleteActionRequest { + /** value must be an integer greater than zero. */ + action_id: number; +} +export const DeleteActionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/action/{action_id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteActionRequest", +}) as any as S.Schema; + +export interface DeleteActionResponse {} +export const DeleteActionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteActionResponse", +}) as any as S.Schema; + +export interface DeleteActionPublicLinkRequest { + id: number; +} +export const DeleteActionPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/action/{id}/public_link", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteActionPublicLinkRequest", +}) as any as S.Schema; + +export interface DeleteActionPublicLinkResponse {} +export const DeleteActionPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteActionPublicLinkResponse", +}) as any as S.Schema; + +export interface DeleteAlertSubscriptionRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteAlertSubscriptionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/alert/{id}/subscription", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteAlertSubscriptionRequest", +}) as any as S.Schema; + +export interface DeleteAlertSubscriptionResponse {} +export const DeleteAlertSubscriptionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteAlertSubscriptionResponse", +}) as any as S.Schema; + +export type DeleteBookmarkRequestModel = + | "card" + | "dashboard" + | "collection" + | "document"; +export const DeleteBookmarkRequestModel = /*@__PURE__*/ S.String; + +export interface DeleteBookmarkRequest { + model: DeleteBookmarkRequestModel | (string & {}); + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteBookmarkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model: DeleteBookmarkRequestModel.pipe(T.Label()), + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/bookmark/{model}/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteBookmarkRequest", +}) as any as S.Schema; + +export interface DeleteBookmarkResponse {} +export const DeleteBookmarkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteBookmarkResponse", +}) as any as S.Schema; + +export type DeleteCacheRequestModel = + | "root" + | "database" + | "dashboard" + | "question"; +export const DeleteCacheRequestModel = /*@__PURE__*/ S.String; + +export type DeleteCacheRequestModelIdList = Array; +export const DeleteCacheRequestModelIdList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface DeleteCacheRequest { + model: DeleteCacheRequestModel | (string & {}); + model_id: DeleteCacheRequestModelIdList; +} +export const DeleteCacheRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model: DeleteCacheRequestModel, + model_id: DeleteCacheRequestModelIdList, + }).pipe(T.Http({ method: "DELETE", uri: "/api/cache", code: 200 })), +).annotate({ + identifier: "DeleteCacheRequest", +}) as any as S.Schema; + +export interface DeleteCacheResponse {} +export const DeleteCacheResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteCacheResponse", +}) as any as S.Schema; + +export interface DeleteCardRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/card/{id}", code: 200 })), +).annotate({ + identifier: "DeleteCardRequest", +}) as any as S.Schema; + +export interface DeleteCardResponse {} +export const DeleteCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteCardResponse", +}) as any as S.Schema; + +export interface DeleteCardPublicLinkRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const DeleteCardPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/card/{card_id}/public_link", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteCardPublicLinkRequest", +}) as any as S.Schema; + +export interface DeleteCardPublicLinkResponse {} +export const DeleteCardPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteCardPublicLinkResponse", +}) as any as S.Schema; + +export interface DeleteCollectionRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/collection/{id}", code: 200 })), +).annotate({ + identifier: "DeleteCollectionRequest", +}) as any as S.Schema; + +export interface DeleteCollectionResponse {} +export const DeleteCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteCollectionResponse", +}) as any as S.Schema; + +export interface DeleteCommentRequest { + /** value must be an integer greater than zero. */ + comment_id: number; +} +export const DeleteCommentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + comment_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/comment/{comment_id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteCommentRequest", +}) as any as S.Schema; + +export interface DeleteCommentResponse {} +export const DeleteCommentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteCommentResponse", +}) as any as S.Schema; + +export interface DeleteDashboardRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/dashboard/{id}", code: 200 })), +).annotate({ + identifier: "DeleteDashboardRequest", +}) as any as S.Schema; + +export interface DeleteDashboardResponse {} +export const DeleteDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDashboardResponse", +}) as any as S.Schema; + +export interface DeleteDashboardPublicLinkRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; +} +export const DeleteDashboardPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/dashboard/{dashboard_id}/public_link", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteDashboardPublicLinkRequest", +}) as any as S.Schema; + +export interface DeleteDashboardPublicLinkResponse {} +export const DeleteDashboardPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDashboardPublicLinkResponse", +}) as any as S.Schema; + +export interface DeleteDatabaseRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteDatabaseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/database/{id}", code: 200 })), +).annotate({ + identifier: "DeleteDatabaseRequest", +}) as any as S.Schema; + +export interface DeleteDatabaseResponse {} +export const DeleteDatabaseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDatabaseResponse", +}) as any as S.Schema; + +export interface DeleteDocumentRequest { + /** value must be an integer greater than zero. */ + document_id: number; +} +export const DeleteDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/document/{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 interface DeleteDocumentPublicLinkRequest { + /** value must be an integer greater than zero. */ + document_id: number; +} +export const DeleteDocumentPublicLinkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/document/{document_id}/public-link", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteDocumentPublicLinkRequest", +}) as any as S.Schema; + +export interface DeleteDocumentPublicLinkResponse {} +export const DeleteDocumentPublicLinkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteDocumentPublicLinkResponse", +}) as any as S.Schema; + +export interface DeleteEeAdvancedPermissionsImpersonationRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteEeAdvancedPermissionsImpersonationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/advanced-permissions/impersonation/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteEeAdvancedPermissionsImpersonationRequest", + }) as any as S.Schema; + +export interface DeleteEeAdvancedPermissionsImpersonationResponse {} +export const DeleteEeAdvancedPermissionsImpersonationResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteEeAdvancedPermissionsImpersonationResponse", + }) as any as S.Schema; + +export interface DeleteEeAiControlsPermissionsAdvancedRequest {} +export const DeleteEeAiControlsPermissionsAdvancedRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/ai-controls/permissions/advanced", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteEeAiControlsPermissionsAdvancedRequest", + }) as any as S.Schema; + +export interface DeleteEeAiControlsPermissionsAdvancedResponse {} +export const DeleteEeAiControlsPermissionsAdvancedResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteEeAiControlsPermissionsAdvancedResponse", + }) as any as S.Schema; + +export interface DeleteEeAuditAppUserSubscriptionsRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteEeAuditAppUserSubscriptionsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/audit-app/user/{id}/subscriptions", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteEeAuditAppUserSubscriptionsRequest", +}) as any as S.Schema; + +export interface DeleteEeAuditAppUserSubscriptionsResponse {} +export const DeleteEeAuditAppUserSubscriptionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteEeAuditAppUserSubscriptionsResponse", + }) as any as S.Schema; + +export type DeleteEeCloudAddOnsRequestProductType = + | "metabase-ai" + | "metabase-ai-tiered" + | "metabase-ai-managed" + | "python-execution" + | "transforms" + | "transforms-basic" + | "transforms-advanced" + | "transforms-basic-metered" + | "transforms-advanced-metered" + | "dwh-rent" + | "etl-connections"; +export const DeleteEeCloudAddOnsRequestProductType = /*@__PURE__*/ S.String; + +export interface DeleteEeCloudAddOnsRequest { + product_type: DeleteEeCloudAddOnsRequestProductType | (string & {}); +} +export const DeleteEeCloudAddOnsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + product_type: DeleteEeCloudAddOnsRequestProductType.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/cloud-add-ons/{product_type}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteEeCloudAddOnsRequest", +}) as any as S.Schema; + +export interface DeleteEeCloudAddOnsResponse {} +export const DeleteEeCloudAddOnsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEeCloudAddOnsResponse", +}) as any as S.Schema; + +export interface DeleteEeCustomVizPluginRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteEeCustomVizPluginRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/custom-viz-plugin/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteEeCustomVizPluginRequest", +}) as any as S.Schema; + +export interface DeleteEeCustomVizPluginResponse {} +export const DeleteEeCustomVizPluginResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEeCustomVizPluginResponse", +}) as any as S.Schema; + +export interface DeleteEeDatabaseReplicationConnectionDatabaseRequest { + /** value must be an integer greater than zero. */ + database_id: number; +} +export const DeleteEeDatabaseReplicationConnectionDatabaseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/database-replication/connection/{database_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteEeDatabaseReplicationConnectionDatabaseRequest", + }) as any as S.Schema; + +export interface DeleteEeDatabaseReplicationConnectionDatabaseResponse {} +export const DeleteEeDatabaseReplicationConnectionDatabaseResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteEeDatabaseReplicationConnectionDatabaseResponse", + }) as any as S.Schema; + +export interface DeleteEeEmailOverrideRequest {} +export const DeleteEeEmailOverrideRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/api/ee/email/override", code: 200 }), + ), +).annotate({ + identifier: "DeleteEeEmailOverrideRequest", +}) as any as S.Schema; + +export interface DeleteEeEmailOverrideResponse {} +export const DeleteEeEmailOverrideResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEeEmailOverrideResponse", +}) as any as S.Schema; + +export interface DeleteEeGsheetsConnectionRequest {} +export const DeleteEeGsheetsConnectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/api/ee/gsheets/connection", code: 200 }), + ), +).annotate({ + identifier: "DeleteEeGsheetsConnectionRequest", +}) as any as S.Schema; + +export interface DeleteEeGsheetsConnectionResponse {} +export const DeleteEeGsheetsConnectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEeGsheetsConnectionResponse", +}) as any as S.Schema; + +export interface DeleteEeScimGroupRequest { + id: string; +} +export const DeleteEeScimGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/ee/scim/v2/Groups/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteEeScimGroupRequest", +}) as any as S.Schema; + +export interface DeleteEeScimGroupResponse {} +export const DeleteEeScimGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEeScimGroupResponse", +}) as any as S.Schema; + +export interface DeleteEeUploadManagementTableRequest { + /** value must be an integer greater than zero. */ + id: number; + archive_cards?: boolean; +} +export const DeleteEeUploadManagementTableRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + archive_cards: S.optional(S.Boolean.pipe(T.Query("archive-cards"))), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/ee/upload-management/tables/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteEeUploadManagementTableRequest", +}) as any as S.Schema; + +export interface DeleteEeUploadManagementTableResponse {} +export const DeleteEeUploadManagementTableResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "DeleteEeUploadManagementTableResponse", +}) as any as S.Schema; + +export interface DeleteEmailRequest {} +export const DeleteEmailRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "DELETE", uri: "/api/email", code: 200 })), +).annotate({ + identifier: "DeleteEmailRequest", +}) as any as S.Schema; + +export interface DeleteEmailResponse {} +export const DeleteEmailResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEmailResponse", +}) as any as S.Schema; + +export interface DeleteEmbedThemeRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteEmbedThemeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/embed-theme/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteEmbedThemeRequest", +}) as any as S.Schema; + +export interface DeleteEmbedThemeResponse {} +export const DeleteEmbedThemeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteEmbedThemeResponse", +}) as any as S.Schema; + +export interface DeleteFieldDimensionRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteFieldDimensionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/field/{id}/dimension", code: 200 }), + ), +).annotate({ + identifier: "DeleteFieldDimensionRequest", +}) as any as S.Schema; + +export interface DeleteFieldDimensionResponse {} +export const DeleteFieldDimensionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteFieldDimensionResponse", +}) as any as S.Schema; + +export interface DeleteGlossaryRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteGlossaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/glossary/{id}", code: 200 })), +).annotate({ + identifier: "DeleteGlossaryRequest", +}) as any as S.Schema; + +export interface DeleteGlossaryResponse {} +export const DeleteGlossaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteGlossaryResponse", +}) as any as S.Schema; + +export interface DeleteKeyRequest { + id: number; +} +export const DeleteKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/api-key/{id}", code: 200 })), +).annotate({ + identifier: "DeleteKeyRequest", +}) as any as S.Schema; + +export interface DeleteKeyResponse {} +export const DeleteKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteKeyResponse", +}) as any as S.Schema; + +export interface DeleteLoggerAdjustmentRequest {} +export const DeleteLoggerAdjustmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/api/logger/adjustment", code: 200 }), + ), +).annotate({ + identifier: "DeleteLoggerAdjustmentRequest", +}) as any as S.Schema; + +export interface DeleteLoggerAdjustmentResponse {} +export const DeleteLoggerAdjustmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteLoggerAdjustmentResponse", +}) as any as S.Schema; + +export interface DeleteMetabotMetabotPromptSuggestionsRequest { + id: number; +} +export const DeleteMetabotMetabotPromptSuggestionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/metabot/metabot/{id}/prompt-suggestions", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteMetabotMetabotPromptSuggestionsRequest", + }) as any as S.Schema; + +export interface DeleteMetabotMetabotPromptSuggestionsResponse {} +export const DeleteMetabotMetabotPromptSuggestionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteMetabotMetabotPromptSuggestionsResponse", + }) as any as S.Schema; + +export interface DeleteMetabotMetabotPromptSuggestionsPromptRequest { + id: number; + prompt_id: number; +} +export const DeleteMetabotMetabotPromptSuggestionsPromptRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + prompt_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/metabot/metabot/{id}/prompt-suggestions/{prompt_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "DeleteMetabotMetabotPromptSuggestionsPromptRequest", + }) as any as S.Schema; + +export interface DeleteMetabotMetabotPromptSuggestionsPromptResponse {} +export const DeleteMetabotMetabotPromptSuggestionsPromptResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "DeleteMetabotMetabotPromptSuggestionsPromptResponse", + }) as any as S.Schema; + +export interface DeleteModelIndexRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteModelIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/model-index/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteModelIndexRequest", +}) as any as S.Schema; + +export interface DeleteModelIndexResponse {} +export const DeleteModelIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteModelIndexResponse", +}) as any as S.Schema; + +export interface DeleteMtGtapRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteMtGtapRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/mt/gtap/{id}", code: 200 })), +).annotate({ + identifier: "DeleteMtGtapRequest", +}) as any as S.Schema; + +export interface DeleteMtGtapResponse {} +export const DeleteMtGtapResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteMtGtapResponse", +}) as any as S.Schema; + +export interface DeleteOsiAiContextRequest { + entity_type: string; + /** value must be an integer greater than zero. */ + entity_local_id: number; +} +export const DeleteOsiAiContextRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity_type: S.String.pipe(T.Label()), + entity_local_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/osi/ai-context/{entity_type}/{entity_local_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteOsiAiContextRequest", +}) as any as S.Schema; + +export interface DeleteOsiAiContextResponse {} +export const DeleteOsiAiContextResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteOsiAiContextResponse", +}) as any as S.Schema; + +export interface DeletePermissionsGroupRequest { + /** value must be an integer greater than zero. */ + group_id: number; +} +export const DeletePermissionsGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/permissions/group/{group_id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeletePermissionsGroupRequest", +}) as any as S.Schema; + +export interface DeletePermissionsGroupResponse {} +export const DeletePermissionsGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletePermissionsGroupResponse", +}) as any as S.Schema; + +export interface DeletePermissionsMembershipRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeletePermissionsMembershipRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/permissions/membership/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "DeletePermissionsMembershipRequest", +}) as any as S.Schema; + +export interface DeletePermissionsMembershipResponse {} +export const DeletePermissionsMembershipResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletePermissionsMembershipResponse", +}) as any as S.Schema; + +export interface DeletePulseSubscriptionRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeletePulseSubscriptionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/pulse/{id}/subscription", + code: 200, + }), + ), +).annotate({ + identifier: "DeletePulseSubscriptionRequest", +}) as any as S.Schema; + +export interface DeletePulseSubscriptionResponse {} +export const DeletePulseSubscriptionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeletePulseSubscriptionResponse", +}) as any as S.Schema; + +export interface DeleteSegmentRequest { + /** value must be an integer greater than zero. */ + id: number; + revision_message: string; +} +export const DeleteSegmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + revision_message: S.String.pipe(T.Query()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/segment/{id}", code: 200 })), +).annotate({ + identifier: "DeleteSegmentRequest", +}) as any as S.Schema; + +export interface DeleteSegmentResponse {} +export const DeleteSegmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteSegmentResponse", +}) as any as S.Schema; + +export interface DeleteSessionRequest {} +export const DeleteSessionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "DELETE", uri: "/api/session", code: 200 }), + ), +).annotate({ + identifier: "DeleteSessionRequest", +}) as any as S.Schema; + +export interface DeleteSessionResponse {} +export const DeleteSessionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteSessionResponse", +}) as any as S.Schema; + +export interface DeleteTimelineRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteTimelineRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/timeline/{id}", code: 200 })), +).annotate({ + identifier: "DeleteTimelineRequest", +}) as any as S.Schema; + +export interface DeleteTimelineResponse {} +export const DeleteTimelineResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTimelineResponse", +}) as any as S.Schema; + +export interface DeleteTimelineEventRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteTimelineEventRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/timeline-event/{id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteTimelineEventRequest", +}) as any as S.Schema; + +export interface DeleteTimelineEventResponse {} +export const DeleteTimelineEventResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTimelineEventResponse", +}) as any as S.Schema; + +export interface DeleteTransformRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteTransformRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/transform/{id}", code: 200 })), +).annotate({ + identifier: "DeleteTransformRequest", +}) as any as S.Schema; + +export interface DeleteTransformResponse {} +export const DeleteTransformResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTransformResponse", +}) as any as S.Schema; + +export interface DeleteTransformJobRequest { + /** value must be an integer greater than zero. */ + job_id: number; +} +export const DeleteTransformJobRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/transform-job/{job_id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteTransformJobRequest", +}) as any as S.Schema; + +export interface DeleteTransformJobResponse {} +export const DeleteTransformJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTransformJobResponse", +}) as any as S.Schema; + +export interface DeleteTransformTableRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteTransformTableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/transform/{id}/table", code: 200 }), + ), +).annotate({ + identifier: "DeleteTransformTableRequest", +}) as any as S.Schema; + +export interface DeleteTransformTableResponse {} +export const DeleteTransformTableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTransformTableResponse", +}) as any as S.Schema; + +export interface DeleteTransformTagRequest { + /** value must be an integer greater than zero. */ + tag_id: number; +} +export const DeleteTransformTagRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + tag_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "DELETE", uri: "/api/transform-tag/{tag_id}", code: 200 }), + ), +).annotate({ + identifier: "DeleteTransformTagRequest", +}) as any as S.Schema; + +export interface DeleteTransformTagResponse {} +export const DeleteTransformTagResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteTransformTagResponse", +}) as any as S.Schema; + +export interface DeleteUserRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const DeleteUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "DELETE", uri: "/api/user/{id}", code: 200 })), +).annotate({ + identifier: "DeleteUserRequest", +}) as any as S.Schema; + +export interface DeleteUserResponse {} +export const DeleteUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "DeleteUserResponse", +}) as any as S.Schema; + +export interface DeleteUserKeyValueNamespaceKeyRequest { + namespace: string; + key: string; +} +export const DeleteUserKeyValueNamespaceKeyRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + namespace: S.String.pipe(T.Label()), + key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "DELETE", + uri: "/api/user-key-value/namespace/{namespace}/key/{key}", + code: 200, + }), + ), +).annotate({ + identifier: "DeleteUserKeyValueNamespaceKeyRequest", +}) as any as S.Schema; + +export interface DeleteUserKeyValueNamespaceKeyResponse {} +export const DeleteUserKeyValueNamespaceKeyResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "DeleteUserKeyValueNamespaceKeyResponse", +}) as any as S.Schema; + +export interface GetActionRequest { + model_id?: number; +} +export const GetActionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model_id: S.optional(S.Number.pipe(T.Query("model-id"))), + }).pipe(T.Http({ method: "GET", uri: "/api/action", code: 200 })), +).annotate({ + identifier: "GetActionRequest", +}) as any as S.Schema; + +export interface GetActionResponse {} +export const GetActionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActionResponse", +}) as any as S.Schema; + +export interface GetAction2Request {} +export const GetAction2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/action/public", code: 200 }), + ), +).annotate({ + identifier: "GetAction2Request", +}) as any as S.Schema; + +export interface GetAction2Response {} +export const GetAction2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAction2Response", +}) as any as S.Schema; + +export interface GetActionByActionIdRequest { + /** value must be an integer greater than zero. */ + action_id: number; +} +export const GetActionByActionIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action_id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/action/{action_id}", code: 200 })), +).annotate({ + identifier: "GetActionByActionIdRequest", +}) as any as S.Schema; + +export interface GetActionByActionIdResponse {} +export const GetActionByActionIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActionByActionIdResponse", +}) as any as S.Schema; + +export interface GetActionByUuidRequest { + /** value must be a valid UUID. */ + uuid: string; +} +export const GetActionByUuidRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/public/action/{uuid}", code: 200 }), + ), +).annotate({ + identifier: "GetActionByUuidRequest", +}) as any as S.Schema; + +export interface GetActionByUuidResponse {} +export const GetActionByUuidResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActionByUuidResponse", +}) as any as S.Schema; + +/** value must be a JSON object mapping parameter ids to scalar values. */ +export type MetabaseActionsSchemaPrefetchParameterValues = { + [key: string]: unknown | undefined; +}; +export const MetabaseActionsSchemaPrefetchParameterValues = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export interface GetActionExecuteRequest { + /** value must be an integer greater than zero. */ + action_id: number; + parameters: MetabaseActionsSchemaPrefetchParameterValues; +} +export const GetActionExecuteRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + action_id: S.Number.pipe(T.Label()), + parameters: MetabaseActionsSchemaPrefetchParameterValues.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/action/{action_id}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "GetActionExecuteRequest", +}) as any as S.Schema; + +export interface GetActionExecuteResponse {} +export const GetActionExecuteResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActionExecuteResponse", +}) as any as S.Schema; + +export interface GetActivityMostRecentlyViewedDashboardRequest {} +export const GetActivityMostRecentlyViewedDashboardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/activity/most_recently_viewed_dashboard", + code: 200, + }), + ), + ).annotate({ + identifier: "GetActivityMostRecentlyViewedDashboardRequest", + }) as any as S.Schema; + +export interface GetActivityMostRecentlyViewedDashboardResponse {} +export const GetActivityMostRecentlyViewedDashboardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetActivityMostRecentlyViewedDashboardResponse", + }) as any as S.Schema; + +export interface GetActivityPopularItemsRequest {} +export const GetActivityPopularItemsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/activity/popular_items", code: 200 }), + ), +).annotate({ + identifier: "GetActivityPopularItemsRequest", +}) as any as S.Schema; + +export interface GetActivityPopularItemsResponse {} +export const GetActivityPopularItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActivityPopularItemsResponse", +}) as any as S.Schema; + +export type GetActivityRecentsRequestContextItem = "selections" | "views"; +export const GetActivityRecentsRequestContextItem = /*@__PURE__*/ S.String; + +export type GetActivityRecentsRequestContextList = Array< + GetActivityRecentsRequestContextItem | (string & {}) +>; +export const GetActivityRecentsRequestContextList = /*@__PURE__*/ S.Array( + GetActivityRecentsRequestContextItem, +) as any as S.Schema; + +export interface GetActivityRecentsRequest { + context: GetActivityRecentsRequestContextList; + include_metadata?: boolean; +} +export const GetActivityRecentsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: GetActivityRecentsRequestContextList.pipe(T.Query()), + include_metadata: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/activity/recents", code: 200 })), +).annotate({ + identifier: "GetActivityRecentsRequest", +}) as any as S.Schema; + +export interface GetActivityRecentsResponse {} +export const GetActivityRecentsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetActivityRecentsResponse", +}) as any as S.Schema; + +export interface GetAgentPingRequest {} +export const GetAgentPingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/agent/v1/ping", code: 200 }), + ), +).annotate({ + identifier: "GetAgentPingRequest", +}) as any as S.Schema; + +export interface GetAgentPingResponse {} +export const GetAgentPingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAgentPingResponse", +}) as any as S.Schema; + +export interface GetAlertRequest { + archived?: boolean; + user_id?: number; +} +export const GetAlertRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + archived: S.optional(S.Boolean.pipe(T.Query())), + user_id: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/alert", code: 200 })), +).annotate({ + identifier: "GetAlertRequest", +}) as any as S.Schema; + +export interface GetAlertResponse {} +export const GetAlertResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAlertResponse", +}) as any as S.Schema; + +export interface GetAlertByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetAlertByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/alert/{id}", code: 200 })), +).annotate({ + identifier: "GetAlertByIdRequest", +}) as any as S.Schema; + +export interface GetAlertByIdResponse {} +export const GetAlertByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAlertByIdResponse", +}) as any as S.Schema; + +export interface GetAnalyticsAnonymousStatsRequest {} +export const GetAnalyticsAnonymousStatsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/analytics/anonymous-stats", code: 200 }), + ), +).annotate({ + identifier: "GetAnalyticsAnonymousStatsRequest", +}) as any as S.Schema; + +export interface GetAnalyticsAnonymousStatsResponse {} +export const GetAnalyticsAnonymousStatsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAnalyticsAnonymousStatsResponse", +}) as any as S.Schema; + +export type GetAutomagicDashboardRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardRequestEntity = /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRequestShow = unknown | number; +export const GetAutomagicDashboardRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardRequest { + entity: GetAutomagicDashboardRequestEntity | (string & {}); + entity_id_or_query: string; + show?: GetAutomagicDashboardRequestShow; +} +export const GetAutomagicDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardRequestEntity.pipe(T.Label()), + entity_id_or_query: S.String.pipe(T.Label()), + show: S.optional(GetAutomagicDashboardRequestShow.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetAutomagicDashboardRequest", +}) as any as S.Schema; + +export interface GetAutomagicDashboardResponse {} +export const GetAutomagicDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAutomagicDashboardResponse", +}) as any as S.Schema; + +export type GetAutomagicDashboardCellRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardCellRequestEntity = /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRequestShowCase0 = "all"; +export const GetAutomagicDashboardCellRequestShowCase0 = /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRequestShow = + | GetAutomagicDashboardCellRequestShowCase0 + | number; +export const GetAutomagicDashboardCellRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardCellRequest { + entity: GetAutomagicDashboardCellRequestEntity | (string & {}); + entity_id_or_query: string; + cell_query: string; + /** invalid show value */ + show?: GetAutomagicDashboardCellRequestShow; +} +export const GetAutomagicDashboardCellRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardCellRequestEntity.pipe(T.Label()), + entity_id_or_query: S.String.pipe(T.Label()), + cell_query: S.String.pipe(T.Label()), + show: S.optional(GetAutomagicDashboardCellRequestShow.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetAutomagicDashboardCellRequest", +}) as any as S.Schema; + +export interface GetAutomagicDashboardCellResponse {} +export const GetAutomagicDashboardCellResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetAutomagicDashboardCellResponse", +}) as any as S.Schema; + +export type GetAutomagicDashboardCellCompareRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardCellCompareRequestEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellCompareRequestComparisonEntity = + | "adhoc" + | "segment" + | "table"; +export const GetAutomagicDashboardCellCompareRequestComparisonEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellCompareRequestShowCase0 = "all"; +export const GetAutomagicDashboardCellCompareRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellCompareRequestShow = + | GetAutomagicDashboardCellCompareRequestShowCase0 + | number; +export const GetAutomagicDashboardCellCompareRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardCellCompareRequest { + entity: GetAutomagicDashboardCellCompareRequestEntity | (string & {}); + entity_id_or_query: string; + cell_query: string; + /** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc" */ + comparison_entity: + | GetAutomagicDashboardCellCompareRequestComparisonEntity + | (string & {}); + comparison_entity_id_or_query: string; + /** invalid show value */ + show?: GetAutomagicDashboardCellCompareRequestShow; +} +export const GetAutomagicDashboardCellCompareRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + entity: GetAutomagicDashboardCellCompareRequestEntity.pipe(T.Label()), + entity_id_or_query: S.String.pipe(T.Label()), + cell_query: S.String.pipe(T.Label()), + comparison_entity: + GetAutomagicDashboardCellCompareRequestComparisonEntity.pipe(T.Label()), + comparison_entity_id_or_query: S.String.pipe(T.Label()), + show: S.optional( + GetAutomagicDashboardCellCompareRequestShow.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetAutomagicDashboardCellCompareRequest", +}) as any as S.Schema; + +export interface GetAutomagicDashboardCellCompareResponse {} +export const GetAutomagicDashboardCellCompareResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetAutomagicDashboardCellCompareResponse", +}) as any as S.Schema; + +export type GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRuleDashboardTemplateRequestShowCase0 = + "all"; +export const GetAutomagicDashboardCellRuleDashboardTemplateRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRuleDashboardTemplateRequestShow = + | GetAutomagicDashboardCellRuleDashboardTemplateRequestShowCase0 + | number; +export const GetAutomagicDashboardCellRuleDashboardTemplateRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardCellRuleDashboardTemplateRequest { + entity: + | GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity + | (string & {}); + entity_id_or_query: string; + cell_query: string; + prefix: string; + /** invalid value for dashboard template name */ + dashboard_template: string; + /** invalid show value */ + show?: GetAutomagicDashboardCellRuleDashboardTemplateRequestShow; +} +export const GetAutomagicDashboardCellRuleDashboardTemplateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardCellRuleDashboardTemplateRequestEntity.pipe( + T.Label(), + ), + entity_id_or_query: S.String.pipe(T.Label()), + cell_query: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + dashboard_template: S.String.pipe(T.Label()), + show: S.optional( + GetAutomagicDashboardCellRuleDashboardTemplateRequestShow.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/rule/{prefix}/{dashboard_template}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardCellRuleDashboardTemplateRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardCellRuleDashboardTemplateResponse {} +export const GetAutomagicDashboardCellRuleDashboardTemplateResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardCellRuleDashboardTemplateResponse", + }) as any as S.Schema; + +export type GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity = + | "adhoc" + | "segment" + | "table"; +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShowCase0 = + "all"; +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow = + | GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShowCase0 + | number; +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest { + entity: + | GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity + | (string & {}); + entity_id_or_query: string; + cell_query: string; + prefix: string; + /** invalid value for dashboard template name */ + dashboard_template: string; + /** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc" */ + comparison_entity: + | GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity + | (string & {}); + comparison_entity_id_or_query: string; + /** invalid show value */ + show?: GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow; +} +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: + GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestEntity.pipe( + T.Label(), + ), + entity_id_or_query: S.String.pipe(T.Label()), + cell_query: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + dashboard_template: S.String.pipe(T.Label()), + comparison_entity: + GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestComparisonEntity.pipe( + T.Label(), + ), + comparison_entity_id_or_query: S.String.pipe(T.Label()), + show: S.optional( + GetAutomagicDashboardCellRuleDashboardTemplateCompareRequestShow.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/cell/{cell_query}/rule/{prefix}/{dashboard_template}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardCellRuleDashboardTemplateCompareResponse {} +export const GetAutomagicDashboardCellRuleDashboardTemplateCompareResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardCellRuleDashboardTemplateCompareResponse", + }) as any as S.Schema; + +export type GetAutomagicDashboardCompareRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardCompareRequestEntity = /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCompareRequestComparisonEntity = + | "adhoc" + | "segment" + | "table"; +export const GetAutomagicDashboardCompareRequestComparisonEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCompareRequestShowCase0 = "all"; +export const GetAutomagicDashboardCompareRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardCompareRequestShow = + | GetAutomagicDashboardCompareRequestShowCase0 + | number; +export const GetAutomagicDashboardCompareRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardCompareRequest { + entity: GetAutomagicDashboardCompareRequestEntity | (string & {}); + entity_id_or_query: string; + /** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc" */ + comparison_entity: + | GetAutomagicDashboardCompareRequestComparisonEntity + | (string & {}); + comparison_entity_id_or_query: string; + /** invalid show value */ + show?: GetAutomagicDashboardCompareRequestShow; +} +export const GetAutomagicDashboardCompareRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardCompareRequestEntity.pipe(T.Label()), + entity_id_or_query: S.String.pipe(T.Label()), + comparison_entity: GetAutomagicDashboardCompareRequestComparisonEntity.pipe( + T.Label(), + ), + comparison_entity_id_or_query: S.String.pipe(T.Label()), + show: S.optional(GetAutomagicDashboardCompareRequestShow.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetAutomagicDashboardCompareRequest", +}) as any as S.Schema; + +export interface GetAutomagicDashboardCompareResponse {} +export const GetAutomagicDashboardCompareResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetAutomagicDashboardCompareResponse", +}) as any as S.Schema; + +export type GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity = + /*@__PURE__*/ S.String; + +export interface GetAutomagicDashboardEntityOrQueryQueryMetadataRequest { + entity: + | GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity + | (string & {}); + entity_id_or_query: string; +} +export const GetAutomagicDashboardEntityOrQueryQueryMetadataRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardEntityOrQueryQueryMetadataRequestEntity.pipe( + T.Label(), + ), + entity_id_or_query: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/query_metadata", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardEntityOrQueryQueryMetadataRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardEntityOrQueryQueryMetadataResponse {} +export const GetAutomagicDashboardEntityOrQueryQueryMetadataResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardEntityOrQueryQueryMetadataResponse", + }) as any as S.Schema; + +export type GetAutomagicDashboardRuleDashboardTemplateRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardRuleDashboardTemplateRequestEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRuleDashboardTemplateRequestShowCase0 = "all"; +export const GetAutomagicDashboardRuleDashboardTemplateRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRuleDashboardTemplateRequestShow = + | GetAutomagicDashboardRuleDashboardTemplateRequestShowCase0 + | number; +export const GetAutomagicDashboardRuleDashboardTemplateRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardRuleDashboardTemplateRequest { + entity: + | GetAutomagicDashboardRuleDashboardTemplateRequestEntity + | (string & {}); + entity_id_or_query: string; + prefix: string; + /** invalid value for dashboard template name */ + dashboard_template: string; + /** invalid show value */ + show?: GetAutomagicDashboardRuleDashboardTemplateRequestShow; +} +export const GetAutomagicDashboardRuleDashboardTemplateRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetAutomagicDashboardRuleDashboardTemplateRequestEntity.pipe( + T.Label(), + ), + entity_id_or_query: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + dashboard_template: S.String.pipe(T.Label()), + show: S.optional( + GetAutomagicDashboardRuleDashboardTemplateRequestShow.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/rule/{prefix}/{dashboard_template}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardRuleDashboardTemplateRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardRuleDashboardTemplateResponse {} +export const GetAutomagicDashboardRuleDashboardTemplateResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardRuleDashboardTemplateResponse", + }) as any as S.Schema; + +export type GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity = + | "adhoc" + | "field" + | "model" + | "question" + | "segment" + | "table" + | "transform"; +export const GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity = + | "adhoc" + | "segment" + | "table"; +export const GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRuleDashboardTemplateCompareRequestShowCase0 = + "all"; +export const GetAutomagicDashboardRuleDashboardTemplateCompareRequestShowCase0 = + /*@__PURE__*/ S.String; + +export type GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow = + | GetAutomagicDashboardRuleDashboardTemplateCompareRequestShowCase0 + | number; +export const GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface GetAutomagicDashboardRuleDashboardTemplateCompareRequest { + entity: + | GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity + | (string & {}); + entity_id_or_query: string; + prefix: string; + /** invalid value for dashboard template name */ + dashboard_template: string; + /** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc" */ + comparison_entity: + | GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity + | (string & {}); + comparison_entity_id_or_query: string; + /** invalid show value */ + show?: GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow; +} +export const GetAutomagicDashboardRuleDashboardTemplateCompareRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: + GetAutomagicDashboardRuleDashboardTemplateCompareRequestEntity.pipe( + T.Label(), + ), + entity_id_or_query: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + dashboard_template: S.String.pipe(T.Label()), + comparison_entity: + GetAutomagicDashboardRuleDashboardTemplateCompareRequestComparisonEntity.pipe( + T.Label(), + ), + comparison_entity_id_or_query: S.String.pipe(T.Label()), + show: S.optional( + GetAutomagicDashboardRuleDashboardTemplateCompareRequestShow.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/{entity}/{entity_id_or_query}/rule/{prefix}/{dashboard_template}/compare/{comparison_entity}/{comparison_entity_id_or_query}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardRuleDashboardTemplateCompareRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardRuleDashboardTemplateCompareResponse {} +export const GetAutomagicDashboardRuleDashboardTemplateCompareResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardRuleDashboardTemplateCompareResponse", + }) as any as S.Schema; + +export interface GetAutomagicDashboardsDatabaseCandidatesRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetAutomagicDashboardsDatabaseCandidatesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/database/{id}/candidates", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardsDatabaseCandidatesRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardsDatabaseCandidatesResponse {} +export const GetAutomagicDashboardsDatabaseCandidatesResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardsDatabaseCandidatesResponse", + }) as any as S.Schema; + +export interface GetAutomagicDashboardsModelIndexPrimaryKeyRequest { + model_index_id: number; + pk_id: number; +} +export const GetAutomagicDashboardsModelIndexPrimaryKeyRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + model_index_id: S.Number.pipe(T.Label()), + pk_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/automagic-dashboards/model_index/{model_index_id}/primary_key/{pk_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetAutomagicDashboardsModelIndexPrimaryKeyRequest", + }) as any as S.Schema; + +export interface GetAutomagicDashboardsModelIndexPrimaryKeyResponse {} +export const GetAutomagicDashboardsModelIndexPrimaryKeyResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetAutomagicDashboardsModelIndexPrimaryKeyResponse", + }) as any as S.Schema; + +export interface GetBookmarkRequest {} +export const GetBookmarkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/bookmark", code: 200 })), +).annotate({ + identifier: "GetBookmarkRequest", +}) as any as S.Schema; + +export interface GetBookmarkResponse {} +export const GetBookmarkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetBookmarkResponse", +}) as any as S.Schema; + +export interface GetBugReportingConnectionPoolDetailsRequest {} +export const GetBugReportingConnectionPoolDetailsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/bug-reporting/connection-pool-details", + code: 200, + }), + ), + ).annotate({ + identifier: "GetBugReportingConnectionPoolDetailsRequest", + }) as any as S.Schema; + +export interface GetBugReportingConnectionPoolDetailsResponse {} +export const GetBugReportingConnectionPoolDetailsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetBugReportingConnectionPoolDetailsResponse", + }) as any as S.Schema; + +export interface GetBugReportingDetailsRequest {} +export const GetBugReportingDetailsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/bug-reporting/details", code: 200 }), + ), +).annotate({ + identifier: "GetBugReportingDetailsRequest", +}) as any as S.Schema; + +export interface GetBugReportingDetailsResponse {} +export const GetBugReportingDetailsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetBugReportingDetailsResponse", +}) as any as S.Schema; + +export type GetCacheRequestModelItem = + | "root" + | "database" + | "dashboard" + | "question"; +export const GetCacheRequestModelItem = /*@__PURE__*/ S.String; + +export type GetCacheRequestModelList = Array< + GetCacheRequestModelItem | (string & {}) +>; +export const GetCacheRequestModelList = /*@__PURE__*/ S.Array( + GetCacheRequestModelItem, +) as any as S.Schema; + +export type GetCacheRequestSortColumn = "name" | "policy" | "collection"; +export const GetCacheRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetCacheRequestSortDirection = "asc" | "desc"; +export const GetCacheRequestSortDirection = /*@__PURE__*/ S.String; + +export interface GetCacheRequest { + /** Type of model */ + model?: GetCacheRequestModelList; + /** Collection id to filter results. Returns everything if not supplied. */ + collection?: number; + /** Model id to get configuration for. */ + id?: number; + sort_column?: GetCacheRequestSortColumn | (string & {}); + sort_direction?: GetCacheRequestSortDirection | (string & {}); +} +export const GetCacheRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model: S.optional(GetCacheRequestModelList.pipe(T.Query())), + collection: S.optional(S.Number.pipe(T.Query())), + id: S.optional(S.Number.pipe(T.Query())), + sort_column: S.optional(GetCacheRequestSortColumn.pipe(T.Query())), + sort_direction: S.optional(GetCacheRequestSortDirection.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/cache", code: 200 })), +).annotate({ + identifier: "GetCacheRequest", +}) as any as S.Schema; + +export interface GetCacheResponse {} +export const GetCacheResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCacheResponse", +}) as any as S.Schema; + +export type GetCardRequestF = + | "archived" + | "table" + | "using_model" + | "bookmarked" + | "using_segment" + | "all" + | "mine" + | "database"; +export const GetCardRequestF = /*@__PURE__*/ S.String; + +export interface GetCardRequest { + f?: GetCardRequestF | (string & {}); + model_id?: number; +} +export const GetCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + f: S.optional(GetCardRequestF.pipe(T.Query())), + model_id: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/card", code: 200 })), +).annotate({ identifier: "GetCardRequest" }) as any as S.Schema; + +export interface GetCardResponse {} +export const GetCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardResponse", +}) as any as S.Schema; + +export interface GetCard2Request {} +export const GetCard2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/card/public", code: 200 }), + ), +).annotate({ + identifier: "GetCard2Request", +}) as any as S.Schema; + +export interface GetCard2Response {} +export const GetCard2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCard2Response", +}) as any as S.Schema; + +export interface GetCardByIdRequest { + id: string; + legacy_mbql?: boolean; +} +export const GetCardByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + legacy_mbql: S.optional(S.Boolean.pipe(T.Query("legacy-mbql"))), + }).pipe(T.Http({ method: "GET", uri: "/api/card/{id}", code: 200 })), +).annotate({ + identifier: "GetCardByIdRequest", +}) as any as S.Schema; + +export interface GetCardByIdResponse {} +export const GetCardByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardByIdResponse", +}) as any as S.Schema; + +export interface GetCardByUuidRequest { + /** value must be a valid UUID. */ + uuid: string; +} +export const GetCardByUuidRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/public/card/{uuid}", code: 200 })), +).annotate({ + identifier: "GetCardByUuidRequest", +}) as any as S.Schema; + +export interface GetCardByUuidResponse {} +export const GetCardByUuidResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardByUuidResponse", +}) as any as S.Schema; + +export interface GetCardDashboardsRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetCardDashboardsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/card/{id}/dashboards", code: 200 }), + ), +).annotate({ + identifier: "GetCardDashboardsRequest", +}) as any as S.Schema; + +export interface GetCardDashboardsResponse {} +export const GetCardDashboardsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardDashboardsResponse", +}) as any as S.Schema; + +export interface GetCardEmbeddableRequest {} +export const GetCardEmbeddableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/card/embeddable", code: 200 }), + ), +).annotate({ + identifier: "GetCardEmbeddableRequest", +}) as any as S.Schema; + +export interface GetCardEmbeddableResponse {} +export const GetCardEmbeddableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardEmbeddableResponse", +}) as any as S.Schema; + +export interface GetCardParamRemappingRequest { + id: number; + param_key: string; + value: string; +} +export const GetCardParamRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/card/{id}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamRemappingRequest", +}) as any as S.Schema; + +export interface GetCardParamRemappingResponse {} +export const GetCardParamRemappingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamRemappingResponse", +}) as any as S.Schema; + +export interface GetCardParamRemappingRequest2 { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; + value: string; +} +export const GetCardParamRemappingRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/card/{uuid}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamRemappingRequest2", +}) as any as S.Schema; + +export interface GetCardParamRemapping2Response {} +export const GetCardParamRemapping2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamRemapping2Response", +}) as any as S.Schema; + +export interface GetCardParamSearchRequest { + /** value must be an integer greater than zero. */ + card_id: number; + param_key: string; + query: string; +} +export const GetCardParamSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/card/{card_id}/params/{param_key}/search/{query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamSearchRequest", +}) as any as S.Schema; + +export interface GetCardParamSearchResponse {} +export const GetCardParamSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamSearchResponse", +}) as any as S.Schema; + +export interface GetCardParamSearchByQueryRequest { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; + query: string; +} +export const GetCardParamSearchByQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/card/{uuid}/params/{param_key}/search/{query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamSearchByQueryRequest", +}) as any as S.Schema; + +export interface GetCardParamSearchByQueryResponse {} +export const GetCardParamSearchByQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamSearchByQueryResponse", +}) as any as S.Schema; + +export interface GetCardParamValuesRequest { + /** value must be an integer greater than zero. */ + card_id: number; + param_key: string; +} +export const GetCardParamValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/card/{card_id}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamValuesRequest", +}) as any as S.Schema; + +export interface GetCardParamValuesResponse {} +export const GetCardParamValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamValuesResponse", +}) as any as S.Schema; + +export interface GetCardParamValuesRequest2 { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; +} +export const GetCardParamValuesRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/card/{uuid}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardParamValuesRequest2", +}) as any as S.Schema; + +export interface GetCardParamValues2Response {} +export const GetCardParamValues2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardParamValues2Response", +}) as any as S.Schema; + +export interface GetCardQueryRequest { + /** value must be a valid UUID. */ + uuid: string; + parameters?: MetabaseParametersSchemaParameterValues; + ignore_cache?: boolean; +} +export const GetCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + ignore_cache: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/public/card/{uuid}/query", code: 200 }), + ), +).annotate({ + identifier: "GetCardQueryRequest", +}) as any as S.Schema; + +export interface GetCardQueryResponse {} +export const GetCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardQueryResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type GetCardQueryByExportFormatRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const GetCardQueryByExportFormatRequestExportFormat = + /*@__PURE__*/ S.String; + +export interface GetCardQueryByExportFormatRequest { + /** value must be a valid UUID. */ + uuid: string; + export_format: GetCardQueryByExportFormatRequestExportFormat | (string & {}); + format_rows?: boolean; + pivot_results?: boolean; + parameters?: MetabaseParametersSchemaParameterValues; + csv_include_bom?: boolean; +} +export const GetCardQueryByExportFormatRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + export_format: GetCardQueryByExportFormatRequestExportFormat.pipe( + T.Label(), + ), + format_rows: S.optional(S.Boolean.pipe(T.Query())), + pivot_results: S.optional(S.Boolean.pipe(T.Query())), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + csv_include_bom: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/card/{uuid}/query/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "GetCardQueryByExportFormatRequest", +}) as any as S.Schema; + +export interface GetCardQueryByExportFormatResponse {} +export const GetCardQueryByExportFormatResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardQueryByExportFormatResponse", +}) as any as S.Schema; + +export interface GetCardQueryMetadataRequest { + id: string; +} +export const GetCardQueryMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/card/{id}/query_metadata", code: 200 }), + ), +).annotate({ + identifier: "GetCardQueryMetadataRequest", +}) as any as S.Schema; + +export interface GetCardQueryMetadataResponse {} +export const GetCardQueryMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardQueryMetadataResponse", +}) as any as S.Schema; + +export interface GetCardSeriesRequest { + id: number; + last_cursor?: number; + query?: string; + exclude_ids?: unknown; +} +export const GetCardSeriesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + last_cursor: S.optional(S.Number.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + exclude_ids: S.optional(S.Unknown.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/card/{id}/series", code: 200 })), +).annotate({ + identifier: "GetCardSeriesRequest", +}) as any as S.Schema; + +export interface GetCardSeriesResponse {} +export const GetCardSeriesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCardSeriesResponse", +}) as any as S.Schema; + +export interface GetChannelRequest { + include_inactive?: boolean | null; +} +export const GetChannelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include_inactive: S.optional(S.NullOr(S.Boolean)), + }).pipe(T.Http({ method: "GET", uri: "/api/channel", code: 200 })), +).annotate({ + identifier: "GetChannelRequest", +}) as any as S.Schema; + +export interface GetChannelResponse {} +export const GetChannelResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetChannelResponse", +}) as any as S.Schema; + +export interface GetChannelByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetChannelByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/channel/{id}", code: 200 })), +).annotate({ + identifier: "GetChannelByIdRequest", +}) as any as S.Schema; + +export interface GetChannelByIdResponse {} +export const GetChannelByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetChannelByIdResponse", +}) as any as S.Schema; + +export interface GetCloudMigrationRequest {} +export const GetCloudMigrationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/cloud-migration", code: 200 }), + ), +).annotate({ + identifier: "GetCloudMigrationRequest", +}) as any as S.Schema; + +export interface GetCloudMigrationResponse {} +export const GetCloudMigrationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCloudMigrationResponse", +}) as any as S.Schema; + +export interface GetCollectionRequest { + archived?: boolean; + exclude_other_user_collections?: boolean; + namespace?: string; + personal_only?: boolean; +} +export const GetCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + archived: S.optional(S.Boolean.pipe(T.Query())), + exclude_other_user_collections: S.optional( + S.Boolean.pipe(T.Query("exclude-other-user-collections")), + ), + namespace: S.optional(S.String.pipe(T.Query())), + personal_only: S.optional(S.Boolean.pipe(T.Query("personal-only"))), + }).pipe(T.Http({ method: "GET", uri: "/api/collection", code: 200 })), +).annotate({ + identifier: "GetCollectionRequest", +}) as any as S.Schema; + +export interface GetCollectionResponse {} +export const GetCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionResponse", +}) as any as S.Schema; + +export interface GetCollectionByIdRequest { + id: string; +} +export const GetCollectionByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/collection/{id}", code: 200 })), +).annotate({ + identifier: "GetCollectionByIdRequest", +}) as any as S.Schema; + +export interface GetCollectionByIdResponse {} +export const GetCollectionByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionByIdResponse", +}) as any as S.Schema; + +export interface GetCollectionDashboardQuestionCandidatesRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetCollectionDashboardQuestionCandidatesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/collection/{id}/dashboard-question-candidates", + code: 200, + }), + ), + ).annotate({ + identifier: "GetCollectionDashboardQuestionCandidatesRequest", + }) as any as S.Schema; + +export interface GetCollectionDashboardQuestionCandidatesResponse {} +export const GetCollectionDashboardQuestionCandidatesResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetCollectionDashboardQuestionCandidatesResponse", + }) as any as S.Schema; + +export interface GetCollectionGraphRequest { + namespace?: string; +} +export const GetCollectionGraphRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/collection/graph", code: 200 })), +).annotate({ + identifier: "GetCollectionGraphRequest", +}) as any as S.Schema; + +export interface GetCollectionGraphResponse {} +export const GetCollectionGraphResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionGraphResponse", +}) as any as S.Schema; + +export type GetCollectionItemsRequestModelsItem = + | "dashboard" + | "table" + | "dataset" + | "no_models" + | "timeline" + | "snippet" + | "collection" + | "measure" + | "transform" + | "document" + | "pulse" + | "metric" + | "card"; +export const GetCollectionItemsRequestModelsItem = /*@__PURE__*/ S.String; + +export type GetCollectionItemsRequestModelsList = Array< + GetCollectionItemsRequestModelsItem | (string & {}) +>; +export const GetCollectionItemsRequestModelsList = /*@__PURE__*/ S.Array( + GetCollectionItemsRequestModelsItem, +) as any as S.Schema; + +export type GetCollectionItemsRequestPinnedState = + | "is_not_pinned" + | "is_pinned" + | "all"; +export const GetCollectionItemsRequestPinnedState = /*@__PURE__*/ S.String; + +export type GetCollectionItemsRequestSortColumn = + | "model" + | "name" + | "last_edited_by" + | "last_edited_at" + | "description"; +export const GetCollectionItemsRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetCollectionItemsRequestSortDirection = "desc" | "asc"; +export const GetCollectionItemsRequestSortDirection = /*@__PURE__*/ S.String; + +export interface GetCollectionItemsRequest { + id: string; + models?: GetCollectionItemsRequestModelsList; + archived?: boolean; + pinned_state?: GetCollectionItemsRequestPinnedState | (string & {}); + sort_column?: GetCollectionItemsRequestSortColumn | (string & {}); + sort_direction?: GetCollectionItemsRequestSortDirection | (string & {}); + official_collections_first?: boolean; + show_dashboard_questions?: boolean; +} +export const GetCollectionItemsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + models: S.optional(GetCollectionItemsRequestModelsList.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + pinned_state: S.optional( + GetCollectionItemsRequestPinnedState.pipe(T.Query()), + ), + sort_column: S.optional( + GetCollectionItemsRequestSortColumn.pipe(T.Query()), + ), + sort_direction: S.optional( + GetCollectionItemsRequestSortDirection.pipe(T.Query()), + ), + official_collections_first: S.optional(S.Boolean.pipe(T.Query())), + show_dashboard_questions: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/collection/{id}/items", code: 200 }), + ), +).annotate({ + identifier: "GetCollectionItemsRequest", +}) as any as S.Schema; + +export interface GetCollectionItemsResponse {} +export const GetCollectionItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionItemsResponse", +}) as any as S.Schema; + +export interface GetCollectionRootRequest { + namespace?: string; +} +export const GetCollectionRootRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/collection/root", code: 200 })), +).annotate({ + identifier: "GetCollectionRootRequest", +}) as any as S.Schema; + +export interface GetCollectionRootResponse {} +export const GetCollectionRootResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionRootResponse", +}) as any as S.Schema; + +export interface GetCollectionRootDashboardQuestionCandidatesRequest {} +export const GetCollectionRootDashboardQuestionCandidatesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/collection/root/dashboard-question-candidates", + code: 200, + }), + ), + ).annotate({ + identifier: "GetCollectionRootDashboardQuestionCandidatesRequest", + }) as any as S.Schema; + +export interface GetCollectionRootDashboardQuestionCandidatesResponse {} +export const GetCollectionRootDashboardQuestionCandidatesResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetCollectionRootDashboardQuestionCandidatesResponse", + }) as any as S.Schema; + +export type GetCollectionRootItemsRequestModelsItem = + | "dashboard" + | "table" + | "dataset" + | "no_models" + | "timeline" + | "snippet" + | "collection" + | "measure" + | "transform" + | "document" + | "pulse" + | "metric" + | "card"; +export const GetCollectionRootItemsRequestModelsItem = /*@__PURE__*/ S.String; + +export type GetCollectionRootItemsRequestModelsList = Array< + GetCollectionRootItemsRequestModelsItem | (string & {}) +>; +export const GetCollectionRootItemsRequestModelsList = /*@__PURE__*/ S.Array( + GetCollectionRootItemsRequestModelsItem, +) as any as S.Schema; + +export type GetCollectionRootItemsRequestCollectionType = "remote-synced"; +export const GetCollectionRootItemsRequestCollectionType = + /*@__PURE__*/ S.String; + +export type GetCollectionRootItemsRequestPinnedState = + | "is_not_pinned" + | "is_pinned" + | "all"; +export const GetCollectionRootItemsRequestPinnedState = /*@__PURE__*/ S.String; + +export type GetCollectionRootItemsRequestSortColumn = + | "model" + | "name" + | "last_edited_by" + | "last_edited_at" + | "description"; +export const GetCollectionRootItemsRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetCollectionRootItemsRequestSortDirection = "desc" | "asc"; +export const GetCollectionRootItemsRequestSortDirection = + /*@__PURE__*/ S.String; + +export interface GetCollectionRootItemsRequest { + models?: GetCollectionRootItemsRequestModelsList; + collection_type?: GetCollectionRootItemsRequestCollectionType | (string & {}); + archived?: boolean; + namespace?: string; + include_library?: boolean; + pinned_state?: GetCollectionRootItemsRequestPinnedState | (string & {}); + sort_column?: GetCollectionRootItemsRequestSortColumn | (string & {}); + sort_direction?: GetCollectionRootItemsRequestSortDirection | (string & {}); + official_collections_first?: boolean; + show_dashboard_questions?: boolean; +} +export const GetCollectionRootItemsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + models: S.optional(GetCollectionRootItemsRequestModelsList.pipe(T.Query())), + collection_type: S.optional( + GetCollectionRootItemsRequestCollectionType.pipe(T.Query()), + ), + archived: S.optional(S.Boolean.pipe(T.Query())), + namespace: S.optional(S.String.pipe(T.Query())), + include_library: S.optional(S.Boolean.pipe(T.Query())), + pinned_state: S.optional( + GetCollectionRootItemsRequestPinnedState.pipe(T.Query()), + ), + sort_column: S.optional( + GetCollectionRootItemsRequestSortColumn.pipe(T.Query()), + ), + sort_direction: S.optional( + GetCollectionRootItemsRequestSortDirection.pipe(T.Query()), + ), + official_collections_first: S.optional(S.Boolean.pipe(T.Query())), + show_dashboard_questions: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/collection/root/items", code: 200 }), + ), +).annotate({ + identifier: "GetCollectionRootItemsRequest", +}) as any as S.Schema; + +export interface GetCollectionRootItemsResponse {} +export const GetCollectionRootItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionRootItemsResponse", +}) as any as S.Schema; + +export interface GetCollectionTrashRequest {} +export const GetCollectionTrashRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/collection/trash", code: 200 }), + ), +).annotate({ + identifier: "GetCollectionTrashRequest", +}) as any as S.Schema; + +export interface GetCollectionTrashResponse {} +export const GetCollectionTrashResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionTrashResponse", +}) as any as S.Schema; + +export type GetCollectionTreeRequestNamespacesList = Array; +export const GetCollectionTreeRequestNamespacesList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface GetCollectionTreeRequest { + exclude_archived?: boolean; + exclude_other_user_collections?: boolean; + include_library?: boolean; + namespace?: string; + namespaces?: GetCollectionTreeRequestNamespacesList; + shallow?: boolean; + collection_id?: number; +} +export const GetCollectionTreeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + exclude_archived: S.optional(S.Boolean.pipe(T.Query("exclude-archived"))), + exclude_other_user_collections: S.optional( + S.Boolean.pipe(T.Query("exclude-other-user-collections")), + ), + include_library: S.optional(S.Boolean.pipe(T.Query("include-library"))), + namespace: S.optional(S.String.pipe(T.Query())), + namespaces: S.optional( + GetCollectionTreeRequestNamespacesList.pipe(T.Query()), + ), + shallow: S.optional(S.Boolean.pipe(T.Query())), + collection_id: S.optional(S.Number.pipe(T.Query("collection-id"))), + }).pipe(T.Http({ method: "GET", uri: "/api/collection/tree", code: 200 })), +).annotate({ + identifier: "GetCollectionTreeRequest", +}) as any as S.Schema; + +export interface GetCollectionTreeResponse {} +export const GetCollectionTreeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCollectionTreeResponse", +}) as any as S.Schema; + +export type GetCommentRequestTargetType = "document"; +export const GetCommentRequestTargetType = /*@__PURE__*/ S.String; + +export interface GetCommentRequest { + target_type: GetCommentRequestTargetType | (string & {}); + /** value must be an integer greater than zero. */ + target_id: number; +} +export const GetCommentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + target_type: GetCommentRequestTargetType.pipe(T.Query()), + target_id: S.Number.pipe(T.Query()), + }).pipe(T.Http({ method: "GET", uri: "/api/comment", code: 200 })), +).annotate({ + identifier: "GetCommentRequest", +}) as any as S.Schema; + +export interface GetCommentResponse {} +export const GetCommentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCommentResponse", +}) as any as S.Schema; + +export interface GetCommentMentionsRequest {} +export const GetCommentMentionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/comment/mentions", code: 200 }), + ), +).annotate({ + identifier: "GetCommentMentionsRequest", +}) as any as S.Schema; + +export interface GetCommentMentionsResponse {} +export const GetCommentMentionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetCommentMentionsResponse", +}) as any as S.Schema; + +export interface GetDashboardRequest {} +export const GetDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/dashboard/public", code: 200 }), + ), +).annotate({ + identifier: "GetDashboardRequest", +}) as any as S.Schema; + +export interface GetDashboardResponse {} +export const GetDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardResponse", +}) as any as S.Schema; + +export interface GetDashboardByIdRequest { + id: string; +} +export const GetDashboardByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/dashboard/{id}", code: 200 })), +).annotate({ + identifier: "GetDashboardByIdRequest", +}) as any as S.Schema; + +export interface GetDashboardByIdResponse {} +export const GetDashboardByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardByIdResponse", +}) as any as S.Schema; + +export interface GetDashboardByUuidRequest { + /** value must be a valid UUID. */ + uuid: string; + dashboard_load_id?: string; +} +export const GetDashboardByUuidRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashboard_load_id: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/public/dashboard/{uuid}", code: 200 }), + ), +).annotate({ + identifier: "GetDashboardByUuidRequest", +}) as any as S.Schema; + +export interface GetDashboardByUuidResponse {} +export const GetDashboardByUuidResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardByUuidResponse", +}) as any as S.Schema; + +export interface GetDashboardDashcardCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + parameters?: MetabaseParametersSchemaParameterValues; + ignore_cache?: boolean; +} +export const GetDashboardDashcardCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + ignore_cache: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardDashcardCardRequest", +}) as any as S.Schema; + +export interface GetDashboardDashcardCardResponse {} +export const GetDashboardDashcardCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardDashcardCardResponse", +}) as any as S.Schema; + +export interface GetDashboardDashcardExecuteRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; + /** value must be an integer greater than zero. */ + dashcard_id: number; + parameters?: MetabaseActionsSchemaPrefetchParameterValues; +} +export const GetDashboardDashcardExecuteRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseActionsSchemaPrefetchParameterValues.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardDashcardExecuteRequest", +}) as any as S.Schema; + +export interface GetDashboardDashcardExecuteResponse {} +export const GetDashboardDashcardExecuteResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardDashcardExecuteResponse", +}) as any as S.Schema; + +export interface GetDashboardDashcardExecuteRequest2 { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + parameters: MetabaseActionsSchemaPrefetchParameterValues; +} +export const GetDashboardDashcardExecuteRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + parameters: MetabaseActionsSchemaPrefetchParameterValues.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/execute", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardDashcardExecuteRequest2", +}) as any as S.Schema; + +export interface GetDashboardDashcardExecute2Response {} +export const GetDashboardDashcardExecute2Response = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetDashboardDashcardExecute2Response", +}) as any as S.Schema; + +export interface GetDashboardEmbeddableRequest {} +export const GetDashboardEmbeddableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/dashboard/embeddable", code: 200 }), + ), +).annotate({ + identifier: "GetDashboardEmbeddableRequest", +}) as any as S.Schema; + +export interface GetDashboardEmbeddableResponse {} +export const GetDashboardEmbeddableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardEmbeddableResponse", +}) as any as S.Schema; + +export interface GetDashboardItemsRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDashboardItemsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/dashboard/{id}/items", code: 200 }), + ), +).annotate({ + identifier: "GetDashboardItemsRequest", +}) as any as S.Schema; + +export interface GetDashboardItemsResponse {} +export const GetDashboardItemsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardItemsResponse", +}) as any as S.Schema; + +export interface GetDashboardParamRemappingRequest { + /** value must be an integer greater than zero. */ + id: number; + param_key: string; + value: string; +} +export const GetDashboardParamRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/{id}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamRemappingRequest", +}) as any as S.Schema; + +export interface GetDashboardParamRemappingResponse {} +export const GetDashboardParamRemappingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardParamRemappingResponse", +}) as any as S.Schema; + +export interface GetDashboardParamRemappingRequest2 { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; + value: string; +} +export const GetDashboardParamRemappingRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/dashboard/{uuid}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamRemappingRequest2", +}) as any as S.Schema; + +export interface GetDashboardParamRemapping2Response {} +export const GetDashboardParamRemapping2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardParamRemapping2Response", +}) as any as S.Schema; + +export interface GetDashboardParamSearchRequest { + /** value must be an integer greater than zero. */ + id: number; + param_key: string; + query: string; +} +export const GetDashboardParamSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/{id}/params/{param_key}/search/{query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamSearchRequest", +}) as any as S.Schema; + +export interface GetDashboardParamSearchResponse {} +export const GetDashboardParamSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardParamSearchResponse", +}) as any as S.Schema; + +export interface GetDashboardParamSearchByQueryRequest { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; + query: string; +} +export const GetDashboardParamSearchByQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/dashboard/{uuid}/params/{param_key}/search/{query}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamSearchByQueryRequest", +}) as any as S.Schema; + +export interface GetDashboardParamSearchByQueryResponse {} +export const GetDashboardParamSearchByQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetDashboardParamSearchByQueryResponse", +}) as any as S.Schema; + +export type GetDashboardParamsValidFilterFieldsRequestFilteredList = + Array; +export const GetDashboardParamsValidFilterFieldsRequestFilteredList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type GetDashboardParamsValidFilterFieldsRequestFilteringList = + Array; +export const GetDashboardParamsValidFilterFieldsRequestFilteringList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface GetDashboardParamsValidFilterFieldsRequest { + filtered: GetDashboardParamsValidFilterFieldsRequestFilteredList; + filtering?: GetDashboardParamsValidFilterFieldsRequestFilteringList; +} +export const GetDashboardParamsValidFilterFieldsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + filtered: GetDashboardParamsValidFilterFieldsRequestFilteredList.pipe( + T.Query(), + ), + filtering: S.optional( + GetDashboardParamsValidFilterFieldsRequestFilteringList.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/params/valid-filter-fields", + code: 200, + }), + ), + ).annotate({ + identifier: "GetDashboardParamsValidFilterFieldsRequest", + }) as any as S.Schema; + +export interface GetDashboardParamsValidFilterFieldsResponse {} +export const GetDashboardParamsValidFilterFieldsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetDashboardParamsValidFilterFieldsResponse", + }) as any as S.Schema; + +export interface GetDashboardParamValuesRequest { + /** value must be an integer greater than zero. */ + id: number; + param_key: string; +} +export const GetDashboardParamValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/{id}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamValuesRequest", +}) as any as S.Schema; + +export interface GetDashboardParamValuesResponse {} +export const GetDashboardParamValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardParamValuesResponse", +}) as any as S.Schema; + +export interface GetDashboardParamValuesRequest2 { + /** value must be a valid UUID. */ + uuid: string; + param_key: string; +} +export const GetDashboardParamValuesRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/dashboard/{uuid}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardParamValuesRequest2", +}) as any as S.Schema; + +export interface GetDashboardParamValues2Response {} +export const GetDashboardParamValues2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardParamValues2Response", +}) as any as S.Schema; + +export interface GetDashboardQueryMetadataRequest { + id: string; +} +export const GetDashboardQueryMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/dashboard/{id}/query_metadata", + code: 200, + }), + ), +).annotate({ + identifier: "GetDashboardQueryMetadataRequest", +}) as any as S.Schema; + +export interface GetDashboardQueryMetadataResponse {} +export const GetDashboardQueryMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardQueryMetadataResponse", +}) as any as S.Schema; + +export interface GetDashboardRelatedRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDashboardRelatedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/dashboard/{id}/related", code: 200 }), + ), +).annotate({ + identifier: "GetDashboardRelatedRequest", +}) as any as S.Schema; + +export interface GetDashboardRelatedResponse {} +export const GetDashboardRelatedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDashboardRelatedResponse", +}) as any as S.Schema; + +export type GetDatabaseRequestInclude = "tables" | "schemas"; +export const GetDatabaseRequestInclude = /*@__PURE__*/ S.String; + +export interface GetDatabaseRequest { + /** include must be either empty, 'tables', or 'schemas' */ + include?: GetDatabaseRequestInclude | (string & {}); + include_analytics?: boolean; + saved?: boolean; + include_editable_data_model?: boolean; + exclude_uneditable_details?: boolean; + include_only_uploadable?: boolean; + router_database_id?: number; + can_query?: boolean; + can_write_metadata?: boolean; +} +export const GetDatabaseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include: S.optional(GetDatabaseRequestInclude.pipe(T.Query())), + include_analytics: S.optional(S.Boolean.pipe(T.Query())), + saved: S.optional(S.Boolean.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + exclude_uneditable_details: S.optional(S.Boolean.pipe(T.Query())), + include_only_uploadable: S.optional(S.Boolean.pipe(T.Query())), + router_database_id: S.optional(S.Number.pipe(T.Query())), + can_query: S.optional(S.Boolean.pipe(T.Query("can-query"))), + can_write_metadata: S.optional( + S.Boolean.pipe(T.Query("can-write-metadata")), + ), + }).pipe(T.Http({ method: "GET", uri: "/api/database", code: 200 })), +).annotate({ + identifier: "GetDatabaseRequest", +}) as any as S.Schema; + +export interface GetDatabaseResponse {} +export const GetDatabaseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseResponse", +}) as any as S.Schema; + +export interface GetDatabaseAutocompleteSuggestionsRequest { + /** value must be an integer greater than zero. */ + id: number; + prefix?: string; + substring?: string; +} +export const GetDatabaseAutocompleteSuggestionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + prefix: S.optional(S.String.pipe(T.Query())), + substring: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{id}/autocomplete_suggestions", + code: 200, + }), + ), + ).annotate({ + identifier: "GetDatabaseAutocompleteSuggestionsRequest", + }) as any as S.Schema; + +export interface GetDatabaseAutocompleteSuggestionsResponse {} +export const GetDatabaseAutocompleteSuggestionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetDatabaseAutocompleteSuggestionsResponse", + }) as any as S.Schema; + +export type GetDatabaseByIdRequestInclude = "tables" | "tables.fields"; +export const GetDatabaseByIdRequestInclude = /*@__PURE__*/ S.String; + +export interface GetDatabaseByIdRequest { + /** value must be an integer greater than zero. */ + id: number; + include?: GetDatabaseByIdRequestInclude | (string & {}); + include_editable_data_model?: boolean; + exclude_uneditable_details?: boolean; +} +export const GetDatabaseByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include: S.optional(GetDatabaseByIdRequestInclude.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + exclude_uneditable_details: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/database/{id}", code: 200 })), +).annotate({ + identifier: "GetDatabaseByIdRequest", +}) as any as S.Schema; + +export interface GetDatabaseByIdResponse {} +export const GetDatabaseByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseByIdResponse", +}) as any as S.Schema; + +export interface GetDatabaseCardAutocompleteSuggestionsRequest { + /** value must be an integer greater than zero. */ + id: number; + query: string; + include_dashboard_questions?: boolean; +} +export const GetDatabaseCardAutocompleteSuggestionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + query: S.String.pipe(T.Query()), + include_dashboard_questions: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{id}/card_autocomplete_suggestions", + code: 200, + }), + ), + ).annotate({ + identifier: "GetDatabaseCardAutocompleteSuggestionsRequest", + }) as any as S.Schema; + +export interface GetDatabaseCardAutocompleteSuggestionsResponse {} +export const GetDatabaseCardAutocompleteSuggestionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetDatabaseCardAutocompleteSuggestionsResponse", + }) as any as S.Schema; + +export interface GetDatabaseDatasetRequest { + virtual_db: string; + schema: string; +} +export const GetDatabaseDatasetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + virtual_db: S.String.pipe(T.Label()), + schema: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{virtual_db}/datasets/{schema}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseDatasetRequest", +}) as any as S.Schema; + +export interface GetDatabaseDatasetResponse {} +export const GetDatabaseDatasetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseDatasetResponse", +}) as any as S.Schema; + +export interface GetDatabaseDatasetsRequest { + virtual_db: string; +} +export const GetDatabaseDatasetsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + virtual_db: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{virtual_db}/datasets", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseDatasetsRequest", +}) as any as S.Schema; + +export interface GetDatabaseDatasetsResponse {} +export const GetDatabaseDatasetsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseDatasetsResponse", +}) as any as S.Schema; + +export interface GetDatabaseFieldsRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDatabaseFieldsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/fields", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseFieldsRequest", +}) as any as S.Schema; + +export interface GetDatabaseFieldsResponse {} +export const GetDatabaseFieldsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseFieldsResponse", +}) as any as S.Schema; + +export type MetabaseDriverConnectionConnectionType = + | "default" + | "write-data" + | "admin" + | "transform"; +export const MetabaseDriverConnectionConnectionType = /*@__PURE__*/ S.String; + +export interface GetDatabaseHealthcheckRequest { + /** value must be an integer greater than zero. */ + id: number; + connection_type?: MetabaseDriverConnectionConnectionType | (string & {}); +} +export const GetDatabaseHealthcheckRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + connection_type: S.optional( + MetabaseDriverConnectionConnectionType.pipe(T.Query("connection-type")), + ), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/healthcheck", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseHealthcheckRequest", +}) as any as S.Schema; + +export interface GetDatabaseHealthcheckResponse {} +export const GetDatabaseHealthcheckResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseHealthcheckResponse", +}) as any as S.Schema; + +export interface GetDatabaseIdfieldsRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDatabaseIdfieldsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/idfields", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseIdfieldsRequest", +}) as any as S.Schema; + +export interface GetDatabaseIdfieldsResponse {} +export const GetDatabaseIdfieldsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseIdfieldsResponse", +}) as any as S.Schema; + +export interface GetDatabaseMetadataRequest { + /** value must be an integer greater than zero. */ + id: number; + include_hidden?: boolean; + include_editable_data_model?: boolean; + remove_inactive?: boolean; + skip_fields?: boolean; +} +export const GetDatabaseMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include_hidden: S.optional(S.Boolean.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + remove_inactive: S.optional(S.Boolean.pipe(T.Query())), + skip_fields: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/metadata", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseMetadataRequest", +}) as any as S.Schema; + +export interface GetDatabaseMetadataResponse {} +export const GetDatabaseMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseMetadataResponse", +}) as any as S.Schema; + +export interface GetDatabaseMetadataRequest2 { + virtual_db: string; +} +export const GetDatabaseMetadataRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + virtual_db: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{virtual_db}/metadata", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseMetadataRequest2", +}) as any as S.Schema; + +export interface GetDatabaseMetadata2Response {} +export const GetDatabaseMetadata2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseMetadata2Response", +}) as any as S.Schema; + +export interface GetDatabaseSchemaRequest { + /** value must be an integer greater than zero. */ + id: number; + schema?: string; + include_hidden?: boolean; + include_editable_data_model?: boolean; + can_query?: boolean; + can_write_metadata?: boolean; + include_measures?: boolean; +} +export const GetDatabaseSchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + schema: S.optional(S.String.pipe(T.Query())), + include_hidden: S.optional(S.Boolean.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + can_query: S.optional(S.Boolean.pipe(T.Query("can-query"))), + can_write_metadata: S.optional( + S.Boolean.pipe(T.Query("can-write-metadata")), + ), + include_measures: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/schema", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseSchemaRequest", +}) as any as S.Schema; + +export interface GetDatabaseSchemaResponse {} +export const GetDatabaseSchemaResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSchemaResponse", +}) as any as S.Schema; + +export interface GetDatabaseSchemaBySchemaRequest { + /** value must be an integer greater than zero. */ + id: number; + schema: string; + include_hidden?: boolean; + include_editable_data_model?: boolean; + can_query?: boolean; + can_write_metadata?: boolean; + include_measures?: boolean; +} +export const GetDatabaseSchemaBySchemaRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + schema: S.String.pipe(T.Label()), + include_hidden: S.optional(S.Boolean.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + can_query: S.optional(S.Boolean.pipe(T.Query("can-query"))), + can_write_metadata: S.optional( + S.Boolean.pipe(T.Query("can-write-metadata")), + ), + include_measures: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{id}/schema/{schema}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseSchemaBySchemaRequest", +}) as any as S.Schema; + +export interface GetDatabaseSchemaBySchemaResponse {} +export const GetDatabaseSchemaBySchemaResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSchemaBySchemaResponse", +}) as any as S.Schema; + +export interface GetDatabaseSchemaBySchemaRequest2 { + virtual_db: string; + schema: string; +} +export const GetDatabaseSchemaBySchemaRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + virtual_db: S.String.pipe(T.Label()), + schema: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{virtual_db}/schema/{schema}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseSchemaBySchemaRequest2", +}) as any as S.Schema; + +export interface GetDatabaseSchemaBySchema2Response {} +export const GetDatabaseSchemaBySchema2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSchemaBySchema2Response", +}) as any as S.Schema; + +export interface GetDatabaseSchemasRequest { + /** value must be an integer greater than zero. */ + id: number; + include_editable_data_model?: boolean; + include_hidden?: boolean; + can_query?: boolean; + can_write_metadata?: boolean; +} +export const GetDatabaseSchemasRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + include_hidden: S.optional(S.Boolean.pipe(T.Query())), + can_query: S.optional(S.Boolean.pipe(T.Query("can-query"))), + can_write_metadata: S.optional( + S.Boolean.pipe(T.Query("can-write-metadata")), + ), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/schemas", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseSchemasRequest", +}) as any as S.Schema; + +export interface GetDatabaseSchemasResponse {} +export const GetDatabaseSchemasResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSchemasResponse", +}) as any as S.Schema; + +export interface GetDatabaseSchemasRequest2 { + virtual_db: string; +} +export const GetDatabaseSchemasRequest2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + virtual_db: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{virtual_db}/schemas", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseSchemasRequest2", +}) as any as S.Schema; + +export interface GetDatabaseSchemas2Response {} +export const GetDatabaseSchemas2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSchemas2Response", +}) as any as S.Schema; + +export interface GetDatabaseSettingsAvailableRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDatabaseSettingsAvailableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{id}/settings-available", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseSettingsAvailableRequest", +}) as any as S.Schema; + +export interface GetDatabaseSettingsAvailableResponse {} +export const GetDatabaseSettingsAvailableResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetDatabaseSettingsAvailableResponse", +}) as any as S.Schema; + +export interface GetDatabaseSyncableSchemasRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDatabaseSyncableSchemasRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/database/{id}/syncable_schemas", + code: 200, + }), + ), +).annotate({ + identifier: "GetDatabaseSyncableSchemasRequest", +}) as any as S.Schema; + +export interface GetDatabaseSyncableSchemasResponse {} +export const GetDatabaseSyncableSchemasResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseSyncableSchemasResponse", +}) as any as S.Schema; + +export interface GetDatabaseUsageInfoRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetDatabaseUsageInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/database/{id}/usage_info", code: 200 }), + ), +).annotate({ + identifier: "GetDatabaseUsageInfoRequest", +}) as any as S.Schema; + +export interface GetDatabaseUsageInfoResponse {} +export const GetDatabaseUsageInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDatabaseUsageInfoResponse", +}) as any as S.Schema; + +export interface GetDocumentRequest {} +export const GetDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/document", code: 200 })), +).annotate({ + identifier: "GetDocumentRequest", +}) as any as S.Schema; + +export interface GetDocumentResponse {} +export const GetDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDocumentResponse", +}) as any as S.Schema; + +export interface GetDocument2Request {} +export const GetDocument2Request = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/document/public", code: 200 }), + ), +).annotate({ + identifier: "GetDocument2Request", +}) as any as S.Schema; + +export interface GetDocument2Response {} +export const GetDocument2Response = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDocument2Response", +}) as any as S.Schema; + +export interface GetDocumentByDocumentIdRequest { + /** value must be an integer greater than zero. */ + document_id: number; +} +export const GetDocumentByDocumentIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/document/{document_id}", code: 200 }), + ), +).annotate({ + identifier: "GetDocumentByDocumentIdRequest", +}) as any as S.Schema; + +export interface GetDocumentByDocumentIdResponse {} +export const GetDocumentByDocumentIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDocumentByDocumentIdResponse", +}) as any as S.Schema; + +export interface GetDocumentByUuidRequest { + /** value must be a valid UUID. */ + uuid: string; +} +export const GetDocumentByUuidRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/public/document/{uuid}", code: 200 }), + ), +).annotate({ + identifier: "GetDocumentByUuidRequest", +}) as any as S.Schema; + +export interface GetDocumentByUuidResponse {} +export const GetDocumentByUuidResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDocumentByUuidResponse", +}) as any as S.Schema; + +export interface GetDocumentCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + card_id: number; + parameters?: MetabaseParametersSchemaParameterValues; +} +export const GetDocumentCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/document/{uuid}/card/{card_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetDocumentCardRequest", +}) as any as S.Schema; + +export interface GetDocumentCardResponse {} +export const GetDocumentCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetDocumentCardResponse", +}) as any as S.Schema; + +export interface GetEeAdvancedPermissionsApplicationGraphRequest {} +export const GetEeAdvancedPermissionsApplicationGraphRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/advanced-permissions/application/graph", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeAdvancedPermissionsApplicationGraphRequest", + }) as any as S.Schema; + +export interface GetEeAdvancedPermissionsApplicationGraphResponse {} +export const GetEeAdvancedPermissionsApplicationGraphResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeAdvancedPermissionsApplicationGraphResponse", + }) as any as S.Schema; + +export interface GetEeAdvancedPermissionsImpersonationRequest { + group_id?: number; + db_id?: number; +} +export const GetEeAdvancedPermissionsImpersonationRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.optional(S.Number.pipe(T.Query())), + db_id: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/advanced-permissions/impersonation", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeAdvancedPermissionsImpersonationRequest", + }) as any as S.Schema; + +export interface GetEeAdvancedPermissionsImpersonationResponse {} +export const GetEeAdvancedPermissionsImpersonationResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeAdvancedPermissionsImpersonationResponse", + }) as any as S.Schema; + +export interface GetEeAiControlsPermissionsRequest {} +export const GetEeAiControlsPermissionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/permissions", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeAiControlsPermissionsRequest", +}) as any as S.Schema; + +export interface GetEeAiControlsPermissionsResponse {} +export const GetEeAiControlsPermissionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeAiControlsPermissionsResponse", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageGroupRequest {} +export const GetEeAiControlsUsageGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/usage/group", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeAiControlsUsageGroupRequest", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageGroupResponse {} +export const GetEeAiControlsUsageGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeAiControlsUsageGroupResponse", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageGroupByGroupIdRequest { + group_id: number; +} +export const GetEeAiControlsUsageGroupByGroupIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/usage/group/{group_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeAiControlsUsageGroupByGroupIdRequest", + }) as any as S.Schema; + +export interface GetEeAiControlsUsageGroupByGroupIdResponse {} +export const GetEeAiControlsUsageGroupByGroupIdResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeAiControlsUsageGroupByGroupIdResponse", + }) as any as S.Schema; + +export interface GetEeAiControlsUsageInstanceRequest {} +export const GetEeAiControlsUsageInstanceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/usage/instance", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeAiControlsUsageInstanceRequest", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageInstanceResponse {} +export const GetEeAiControlsUsageInstanceResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeAiControlsUsageInstanceResponse", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageTenantRequest {} +export const GetEeAiControlsUsageTenantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/usage/tenant", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeAiControlsUsageTenantRequest", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageTenantResponse {} +export const GetEeAiControlsUsageTenantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeAiControlsUsageTenantResponse", +}) as any as S.Schema; + +export interface GetEeAiControlsUsageTenantByTenantIdRequest { + tenant_id: number; +} +export const GetEeAiControlsUsageTenantByTenantIdRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + tenant_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/ai-controls/usage/tenant/{tenant_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeAiControlsUsageTenantByTenantIdRequest", + }) as any as S.Schema; + +export interface GetEeAiControlsUsageTenantByTenantIdResponse {} +export const GetEeAiControlsUsageTenantByTenantIdResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeAiControlsUsageTenantByTenantIdResponse", + }) as any as S.Schema; + +export interface GetEeAuditAppUserAuditInfoRequest {} +export const GetEeAuditAppUserAuditInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/audit-app/user/audit-info", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeAuditAppUserAuditInfoRequest", +}) as any as S.Schema; + +export interface GetEeAuditAppUserAuditInfoResponse {} +export const GetEeAuditAppUserAuditInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeAuditAppUserAuditInfoResponse", +}) as any as S.Schema; + +export interface GetEeBillingRequest {} +export const GetEeBillingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/billing", code: 200 }), + ), +).annotate({ + identifier: "GetEeBillingRequest", +}) as any as S.Schema; + +export interface GetEeBillingResponse {} +export const GetEeBillingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeBillingResponse", +}) as any as S.Schema; + +export interface GetEeCloudAddOnsAddonsRequest {} +export const GetEeCloudAddOnsAddonsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/cloud-add-ons/addons", code: 200 }), + ), +).annotate({ + identifier: "GetEeCloudAddOnsAddonsRequest", +}) as any as S.Schema; + +export interface GetEeCloudAddOnsAddonsResponse {} +export const GetEeCloudAddOnsAddonsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCloudAddOnsAddonsResponse", +}) as any as S.Schema; + +export interface GetEeCloudAddOnsPlansRequest {} +export const GetEeCloudAddOnsPlansRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/cloud-add-ons/plans", code: 200 }), + ), +).annotate({ + identifier: "GetEeCloudAddOnsPlansRequest", +}) as any as S.Schema; + +export interface GetEeCloudAddOnsPlansResponse {} +export const GetEeCloudAddOnsPlansResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCloudAddOnsPlansResponse", +}) as any as S.Schema; + +export interface GetEeContentTranslationCsvRequest {} +export const GetEeContentTranslationCsvRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/content-translation/csv", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeContentTranslationCsvRequest", +}) as any as S.Schema; + +export interface GetEeContentTranslationCsvResponse {} +export const GetEeContentTranslationCsvResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeContentTranslationCsvResponse", +}) as any as S.Schema; + +export interface GetEeContentTranslationDictionaryRequest { + locale: string; +} +export const GetEeContentTranslationDictionaryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + locale: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/content-translation/dictionary", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeContentTranslationDictionaryRequest", +}) as any as S.Schema; + +export interface GetEeContentTranslationDictionaryResponse {} +export const GetEeContentTranslationDictionaryResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeContentTranslationDictionaryResponse", + }) as any as S.Schema; + +export interface GetEeContentTranslationDictionaryByTokenRequest { + token: string; +} +export const GetEeContentTranslationDictionaryByTokenRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/content-translation/dictionary/{token}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeContentTranslationDictionaryByTokenRequest", + }) as any as S.Schema; + +export interface GetEeContentTranslationDictionaryByTokenResponse {} +export const GetEeContentTranslationDictionaryByTokenResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeContentTranslationDictionaryByTokenResponse", + }) as any as S.Schema; + +export interface GetEeCustomVizPluginRequest {} +export const GetEeCustomVizPluginRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/custom-viz-plugin", code: 200 }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginResponse {} +export const GetEeCustomVizPluginResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginResponse", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginAssetRequest { + /** value must be an integer greater than zero. */ + id: number; + path: string; +} +export const GetEeCustomVizPluginAssetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + path: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/custom-viz-plugin/{id}/asset", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginAssetRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginAssetResponse {} +export const GetEeCustomVizPluginAssetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginAssetResponse", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginBundleRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetEeCustomVizPluginBundleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/custom-viz-plugin/{id}/bundle", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginBundleRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginBundleResponse {} +export const GetEeCustomVizPluginBundleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginBundleResponse", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginDevSseRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetEeCustomVizPluginDevSseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/custom-viz-plugin/{id}/dev-sse", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginDevSseRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginDevSseResponse {} +export const GetEeCustomVizPluginDevSseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginDevSseResponse", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginListRequest {} +export const GetEeCustomVizPluginListRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/custom-viz-plugin/list", code: 200 }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginListRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginListResponse {} +export const GetEeCustomVizPluginListResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginListResponse", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginSandboxHostRequest {} +export const GetEeCustomVizPluginSandboxHostRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/custom-viz-plugin/sandbox-host", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeCustomVizPluginSandboxHostRequest", +}) as any as S.Schema; + +export interface GetEeCustomVizPluginSandboxHostResponse {} +export const GetEeCustomVizPluginSandboxHostResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeCustomVizPluginSandboxHostResponse", +}) as any as S.Schema; + +export interface GetEeDataComplexityScoreComplexityRequest { + force_recalculation?: boolean; +} +export const GetEeDataComplexityScoreComplexityRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + force_recalculation: S.optional( + S.Boolean.pipe(T.Query("force-recalculation")), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/data-complexity-score/complexity", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeDataComplexityScoreComplexityRequest", + }) as any as S.Schema; + +export interface GetEeDataComplexityScoreComplexityResponse {} +export const GetEeDataComplexityScoreComplexityResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeDataComplexityScoreComplexityResponse", + }) as any as S.Schema; + +export interface GetEeDependenciesBackfillStatusRequest {} +export const GetEeDependenciesBackfillStatusRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/dependencies/backfill-status", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeDependenciesBackfillStatusRequest", +}) as any as S.Schema; + +export interface GetEeDependenciesBackfillStatusResponse {} +export const GetEeDependenciesBackfillStatusResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeDependenciesBackfillStatusResponse", +}) as any as S.Schema; + +export type MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes = + | "transform" + | "table" + | "snippet" + | "dashboard" + | "sandbox" + | "measure" + | "card" + | "document" + | "segment"; +export const MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes = + /*@__PURE__*/ S.String; + +export interface GetEeDependenciesGraphRequest { + /** value must be an integer greater than zero. */ + id?: number; + type?: + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | (string & {}); +} +export const GetEeDependenciesGraphRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.optional(S.Number.pipe(T.Query())), + type: S.optional( + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes.pipe( + T.Query(), + ), + ), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/dependencies/graph", code: 200 }), + ), +).annotate({ + identifier: "GetEeDependenciesGraphRequest", +}) as any as S.Schema; + +export interface GetEeDependenciesGraphResponse {} +export const GetEeDependenciesGraphResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeDependenciesGraphResponse", +}) as any as S.Schema; + +export type GetEeDependenciesGraphBreakingRequestTypesCase1List = Array< + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes | (string & {}) +>; +export const GetEeDependenciesGraphBreakingRequestTypesCase1List = + /*@__PURE__*/ S.Array( + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes, + ) as any as S.Schema; + +export type GetEeDependenciesGraphBreakingRequestTypes = + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | GetEeDependenciesGraphBreakingRequestTypesCase1List; +export const GetEeDependenciesGraphBreakingRequestTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphBreakingRequestCardTypesCase0 = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphBreakingRequestCardTypesCase0 = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBreakingRequestCardTypesCase1Item = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphBreakingRequestCardTypesCase1Item = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBreakingRequestCardTypesCase1List = Array< + GetEeDependenciesGraphBreakingRequestCardTypesCase1Item | (string & {}) +>; +export const GetEeDependenciesGraphBreakingRequestCardTypesCase1List = + /*@__PURE__*/ S.Array( + GetEeDependenciesGraphBreakingRequestCardTypesCase1Item, + ) as any as S.Schema; + +export type GetEeDependenciesGraphBreakingRequestCardTypes = + | GetEeDependenciesGraphBreakingRequestCardTypesCase0 + | GetEeDependenciesGraphBreakingRequestCardTypesCase1List; +export const GetEeDependenciesGraphBreakingRequestCardTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphBreakingRequestSortColumn = + | "dependents-with-errors" + | "dependents-errors" + | "name" + | "location"; +export const GetEeDependenciesGraphBreakingRequestSortColumn = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBreakingRequestSortDirection = "desc" | "asc"; +export const GetEeDependenciesGraphBreakingRequestSortDirection = + /*@__PURE__*/ S.String; + +export interface GetEeDependenciesGraphBreakingRequest { + types?: GetEeDependenciesGraphBreakingRequestTypes; + card_types?: GetEeDependenciesGraphBreakingRequestCardTypes; + query?: string; + include_personal_collections?: boolean; + sort_column?: GetEeDependenciesGraphBreakingRequestSortColumn | (string & {}); + sort_direction?: + | GetEeDependenciesGraphBreakingRequestSortDirection + | (string & {}); +} +export const GetEeDependenciesGraphBreakingRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + types: S.optional( + GetEeDependenciesGraphBreakingRequestTypes.pipe(T.Query()), + ), + card_types: S.optional( + GetEeDependenciesGraphBreakingRequestCardTypes.pipe( + T.Query("card-types"), + ), + ), + query: S.optional(S.String.pipe(T.Query())), + include_personal_collections: S.optional( + S.Boolean.pipe(T.Query("include-personal-collections")), + ), + sort_column: S.optional( + GetEeDependenciesGraphBreakingRequestSortColumn.pipe( + T.Query("sort-column"), + ), + ), + sort_direction: S.optional( + GetEeDependenciesGraphBreakingRequestSortDirection.pipe( + T.Query("sort-direction"), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/dependencies/graph/breaking", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeDependenciesGraphBreakingRequest", +}) as any as S.Schema; + +export interface GetEeDependenciesGraphBreakingResponse {} +export const GetEeDependenciesGraphBreakingResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeDependenciesGraphBreakingResponse", +}) as any as S.Schema; + +export type GetEeDependenciesGraphBrokenRequestDependentTypesCase1List = Array< + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes | (string & {}) +>; +export const GetEeDependenciesGraphBrokenRequestDependentTypesCase1List = + /*@__PURE__*/ S.Array( + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes, + ) as any as S.Schema; + +export type GetEeDependenciesGraphBrokenRequestDependentTypes = + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | GetEeDependenciesGraphBrokenRequestDependentTypesCase1List; +export const GetEeDependenciesGraphBrokenRequestDependentTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphBrokenRequestDependentCardTypesCase0 = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphBrokenRequestDependentCardTypesCase0 = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1List = + Array< + | GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item + | (string & {}) + >; +export const GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1List = + /*@__PURE__*/ S.Array( + GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1Item, + ) as any as S.Schema; + +export type GetEeDependenciesGraphBrokenRequestDependentCardTypes = + | GetEeDependenciesGraphBrokenRequestDependentCardTypesCase0 + | GetEeDependenciesGraphBrokenRequestDependentCardTypesCase1List; +export const GetEeDependenciesGraphBrokenRequestDependentCardTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphBrokenRequestSortColumn = + | "name" + | "view-count" + | "location"; +export const GetEeDependenciesGraphBrokenRequestSortColumn = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphBrokenRequestSortDirection = "desc" | "asc"; +export const GetEeDependenciesGraphBrokenRequestSortDirection = + /*@__PURE__*/ S.String; + +export interface GetEeDependenciesGraphBrokenRequest { + /** value must be an integer greater than zero. */ + id: number; + type: + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | (string & {}); + dependent_types?: GetEeDependenciesGraphBrokenRequestDependentTypes; + dependent_card_types?: GetEeDependenciesGraphBrokenRequestDependentCardTypes; + include_personal_collections?: boolean; + sort_column?: GetEeDependenciesGraphBrokenRequestSortColumn | (string & {}); + sort_direction?: + | GetEeDependenciesGraphBrokenRequestSortDirection + | (string & {}); +} +export const GetEeDependenciesGraphBrokenRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Query()), + type: MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes.pipe( + T.Query(), + ), + dependent_types: S.optional( + GetEeDependenciesGraphBrokenRequestDependentTypes.pipe( + T.Query("dependent-types"), + ), + ), + dependent_card_types: S.optional( + GetEeDependenciesGraphBrokenRequestDependentCardTypes.pipe( + T.Query("dependent-card-types"), + ), + ), + include_personal_collections: S.optional( + S.Boolean.pipe(T.Query("include-personal-collections")), + ), + sort_column: S.optional( + GetEeDependenciesGraphBrokenRequestSortColumn.pipe( + T.Query("sort-column"), + ), + ), + sort_direction: S.optional( + GetEeDependenciesGraphBrokenRequestSortDirection.pipe( + T.Query("sort-direction"), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/dependencies/graph/broken", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeDependenciesGraphBrokenRequest", +}) as any as S.Schema; + +export interface GetEeDependenciesGraphBrokenResponse {} +export const GetEeDependenciesGraphBrokenResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeDependenciesGraphBrokenResponse", +}) as any as S.Schema; + +export type GetEeDependenciesGraphDependentsRequestDependentTypesCase1List = + Array< + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes | (string & {}) + >; +export const GetEeDependenciesGraphDependentsRequestDependentTypesCase1List = + /*@__PURE__*/ S.Array( + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes, + ) as any as S.Schema; + +export type GetEeDependenciesGraphDependentsRequestDependentTypes = + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | GetEeDependenciesGraphDependentsRequestDependentTypesCase1List; +export const GetEeDependenciesGraphDependentsRequestDependentTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphDependentsRequestDependentCardTypesCase0 = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphDependentsRequestDependentCardTypesCase0 = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1List = + Array< + | GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item + | (string & {}) + >; +export const GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1List = + /*@__PURE__*/ S.Array( + GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1Item, + ) as any as S.Schema; + +export type GetEeDependenciesGraphDependentsRequestDependentCardTypes = + | GetEeDependenciesGraphDependentsRequestDependentCardTypesCase0 + | GetEeDependenciesGraphDependentsRequestDependentCardTypesCase1List; +export const GetEeDependenciesGraphDependentsRequestDependentCardTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphDependentsRequestSortColumn = + | "name" + | "view-count" + | "location"; +export const GetEeDependenciesGraphDependentsRequestSortColumn = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphDependentsRequestSortDirection = + | "desc" + | "asc"; +export const GetEeDependenciesGraphDependentsRequestSortDirection = + /*@__PURE__*/ S.String; + +export interface GetEeDependenciesGraphDependentsRequest { + /** value must be an integer greater than zero. */ + id: number; + type: + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | (string & {}); + dependent_types?: GetEeDependenciesGraphDependentsRequestDependentTypes; + dependent_card_types?: GetEeDependenciesGraphDependentsRequestDependentCardTypes; + broken?: boolean; + query?: string; + include_personal_collections?: boolean; + sort_column?: + | GetEeDependenciesGraphDependentsRequestSortColumn + | (string & {}); + sort_direction?: + | GetEeDependenciesGraphDependentsRequestSortDirection + | (string & {}); +} +export const GetEeDependenciesGraphDependentsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Query()), + type: MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes.pipe( + T.Query(), + ), + dependent_types: S.optional( + GetEeDependenciesGraphDependentsRequestDependentTypes.pipe( + T.Query("dependent-types"), + ), + ), + dependent_card_types: S.optional( + GetEeDependenciesGraphDependentsRequestDependentCardTypes.pipe( + T.Query("dependent-card-types"), + ), + ), + broken: S.optional(S.Boolean.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + include_personal_collections: S.optional( + S.Boolean.pipe(T.Query("include-personal-collections")), + ), + sort_column: S.optional( + GetEeDependenciesGraphDependentsRequestSortColumn.pipe( + T.Query("sort-column"), + ), + ), + sort_direction: S.optional( + GetEeDependenciesGraphDependentsRequestSortDirection.pipe( + T.Query("sort-direction"), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/dependencies/graph/dependents", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeDependenciesGraphDependentsRequest", +}) as any as S.Schema; + +export interface GetEeDependenciesGraphDependentsResponse {} +export const GetEeDependenciesGraphDependentsResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeDependenciesGraphDependentsResponse", +}) as any as S.Schema; + +export type GetEeDependenciesGraphUnreferencedRequestTypesCase1List = Array< + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes | (string & {}) +>; +export const GetEeDependenciesGraphUnreferencedRequestTypesCase1List = + /*@__PURE__*/ S.Array( + MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes, + ) as any as S.Schema; + +export type GetEeDependenciesGraphUnreferencedRequestTypes = + | MetabaseEnterpriseDependenciesDependencyTypesDependencyTypes + | GetEeDependenciesGraphUnreferencedRequestTypesCase1List; +export const GetEeDependenciesGraphUnreferencedRequestTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphUnreferencedRequestCardTypesCase0 = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphUnreferencedRequestCardTypesCase0 = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item = + | "question" + | "metric" + | "model"; +export const GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphUnreferencedRequestCardTypesCase1List = Array< + GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item | (string & {}) +>; +export const GetEeDependenciesGraphUnreferencedRequestCardTypesCase1List = + /*@__PURE__*/ S.Array( + GetEeDependenciesGraphUnreferencedRequestCardTypesCase1Item, + ) as any as S.Schema; + +export type GetEeDependenciesGraphUnreferencedRequestCardTypes = + | GetEeDependenciesGraphUnreferencedRequestCardTypesCase0 + | GetEeDependenciesGraphUnreferencedRequestCardTypesCase1List; +export const GetEeDependenciesGraphUnreferencedRequestCardTypes = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type GetEeDependenciesGraphUnreferencedRequestSortColumn = + | "dependents-with-errors" + | "dependents-errors" + | "name" + | "location"; +export const GetEeDependenciesGraphUnreferencedRequestSortColumn = + /*@__PURE__*/ S.String; + +export type GetEeDependenciesGraphUnreferencedRequestSortDirection = + | "desc" + | "asc"; +export const GetEeDependenciesGraphUnreferencedRequestSortDirection = + /*@__PURE__*/ S.String; + +export interface GetEeDependenciesGraphUnreferencedRequest { + types?: GetEeDependenciesGraphUnreferencedRequestTypes; + card_types?: GetEeDependenciesGraphUnreferencedRequestCardTypes; + query?: string; + include_personal_collections?: boolean; + sort_column?: + | GetEeDependenciesGraphUnreferencedRequestSortColumn + | (string & {}); + sort_direction?: + | GetEeDependenciesGraphUnreferencedRequestSortDirection + | (string & {}); +} +export const GetEeDependenciesGraphUnreferencedRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + types: S.optional( + GetEeDependenciesGraphUnreferencedRequestTypes.pipe(T.Query()), + ), + card_types: S.optional( + GetEeDependenciesGraphUnreferencedRequestCardTypes.pipe( + T.Query("card-types"), + ), + ), + query: S.optional(S.String.pipe(T.Query())), + include_personal_collections: S.optional( + S.Boolean.pipe(T.Query("include-personal-collections")), + ), + sort_column: S.optional( + GetEeDependenciesGraphUnreferencedRequestSortColumn.pipe( + T.Query("sort-column"), + ), + ), + sort_direction: S.optional( + GetEeDependenciesGraphUnreferencedRequestSortDirection.pipe( + T.Query("sort-direction"), + ), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/dependencies/graph/unreferenced", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeDependenciesGraphUnreferencedRequest", + }) as any as S.Schema; + +export interface GetEeDependenciesGraphUnreferencedResponse {} +export const GetEeDependenciesGraphUnreferencedResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeDependenciesGraphUnreferencedResponse", + }) as any as S.Schema; + +export interface GetEeEmbeddingHubChecklistRequest {} +export const GetEeEmbeddingHubChecklistRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/embedding-hub/checklist", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeEmbeddingHubChecklistRequest", +}) as any as S.Schema; + +export interface GetEeEmbeddingHubChecklistResponse {} +export const GetEeEmbeddingHubChecklistResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeEmbeddingHubChecklistResponse", +}) as any as S.Schema; + +export interface GetEeErdRequest {} +export const GetEeErdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/ee/erd", code: 200 })), +).annotate({ + identifier: "GetEeErdRequest", +}) as any as S.Schema; + +export interface GetEeErdResponse {} +export const GetEeErdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeErdResponse", +}) as any as S.Schema; + +export interface GetEeGsheetsConnectionRequest {} +export const GetEeGsheetsConnectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/gsheets/connection", code: 200 }), + ), +).annotate({ + identifier: "GetEeGsheetsConnectionRequest", +}) as any as S.Schema; + +export interface GetEeGsheetsConnectionResponse {} +export const GetEeGsheetsConnectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeGsheetsConnectionResponse", +}) as any as S.Schema; + +export interface GetEeGsheetsServiceAccountRequest {} +export const GetEeGsheetsServiceAccountRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/gsheets/service-account", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeGsheetsServiceAccountRequest", +}) as any as S.Schema; + +export interface GetEeGsheetsServiceAccountResponse {} +export const GetEeGsheetsServiceAccountResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeGsheetsServiceAccountResponse", +}) as any as S.Schema; + +export interface GetEeLibraryRequest {} +export const GetEeLibraryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/library", code: 200 }), + ), +).annotate({ + identifier: "GetEeLibraryRequest", +}) as any as S.Schema; + +export interface GetEeLibraryResponse {} +export const GetEeLibraryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeLibraryResponse", +}) as any as S.Schema; + +export interface GetEeLibraryTreeRequest {} +export const GetEeLibraryTreeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/library/tree", code: 200 }), + ), +).annotate({ + identifier: "GetEeLibraryTreeRequest", +}) as any as S.Schema; + +export interface GetEeLibraryTreeResponse {} +export const GetEeLibraryTreeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeLibraryTreeResponse", +}) as any as S.Schema; + +export interface GetEeLogsQueryExecutionRequest { + /** Must be a string like 2020-04 or 2222-11. */ + yyyy_mm: string; +} +export const GetEeLogsQueryExecutionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + yyyy_mm: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/logs/query_execution/{yyyy_mm}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeLogsQueryExecutionRequest", +}) as any as S.Schema; + +export interface GetEeLogsQueryExecutionResponse {} +export const GetEeLogsQueryExecutionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeLogsQueryExecutionResponse", +}) as any as S.Schema; + +export interface GetEeMetabotAnalyticsConversationRequest { + /** value must be a valid UUID. */ + id: string; +} +export const GetEeMetabotAnalyticsConversationRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/metabot-analytics/conversations/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeMetabotAnalyticsConversationRequest", +}) as any as S.Schema; + +export interface GetEeMetabotAnalyticsConversationResponse {} +export const GetEeMetabotAnalyticsConversationResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeMetabotAnalyticsConversationResponse", + }) as any as S.Schema; + +export type GetEeMetabotAnalyticsConversationsRequestSortBy = + | "created_at" + | "message_count" + | "total_tokens" + | "cache_read_tokens" + | "user" + | "profile_id" + | "ip_address"; +export const GetEeMetabotAnalyticsConversationsRequestSortBy = + /*@__PURE__*/ S.String; + +export type GetEeMetabotAnalyticsConversationsRequestSortDir = "asc" | "desc"; +export const GetEeMetabotAnalyticsConversationsRequestSortDir = + /*@__PURE__*/ S.String; + +export interface GetEeMetabotAnalyticsConversationsRequest { + sort_by?: GetEeMetabotAnalyticsConversationsRequestSortBy | (string & {}); + sort_dir?: GetEeMetabotAnalyticsConversationsRequestSortDir | (string & {}); + user_id?: number; + group_id?: number; + tenant_id?: number; + date?: string; +} +export const GetEeMetabotAnalyticsConversationsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + sort_by: S.optional( + GetEeMetabotAnalyticsConversationsRequestSortBy.pipe(T.Query()), + ), + sort_dir: S.optional( + GetEeMetabotAnalyticsConversationsRequestSortDir.pipe(T.Query()), + ), + user_id: S.optional(S.Number.pipe(T.Query())), + group_id: S.optional(S.Number.pipe(T.Query())), + tenant_id: S.optional(S.Number.pipe(T.Query())), + date: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/metabot-analytics/conversations", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEeMetabotAnalyticsConversationsRequest", + }) as any as S.Schema; + +export interface GetEeMetabotAnalyticsConversationsResponse {} +export const GetEeMetabotAnalyticsConversationsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEeMetabotAnalyticsConversationsResponse", + }) as any as S.Schema; + +export interface GetEeMetabotUsageRequest {} +export const GetEeMetabotUsageRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/metabot/usage", code: 200 }), + ), +).annotate({ + identifier: "GetEeMetabotUsageRequest", +}) as any as S.Schema; + +export interface GetEeMetabotUsageResponse {} +export const GetEeMetabotUsageResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeMetabotUsageResponse", +}) as any as S.Schema; + +export interface GetEeMfaAdminOverviewRequest {} +export const GetEeMfaAdminOverviewRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/mfa/admin/overview", code: 200 }), + ), +).annotate({ + identifier: "GetEeMfaAdminOverviewRequest", +}) as any as S.Schema; + +export interface GetEeMfaAdminOverviewResponse {} +export const GetEeMfaAdminOverviewResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeMfaAdminOverviewResponse", +}) as any as S.Schema; + +export interface GetEeMfaStatusRequest {} +export const GetEeMfaStatusRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/mfa/status", code: 200 }), + ), +).annotate({ + identifier: "GetEeMfaStatusRequest", +}) as any as S.Schema; + +export interface GetEeMfaStatusResponse {} +export const GetEeMfaStatusResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeMfaStatusResponse", +}) as any as S.Schema; + +export type GetEePermissionDebugRequestActionType = + | "card/read" + | "card/query" + | "card/download-data"; +export const GetEePermissionDebugRequestActionType = /*@__PURE__*/ S.String; + +export interface GetEePermissionDebugRequest { + user_id: number; + model_id: string; + action_type: GetEePermissionDebugRequestActionType | (string & {}); +} +export const GetEePermissionDebugRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + user_id: S.Number.pipe(T.Query()), + model_id: S.String.pipe(T.Query()), + action_type: GetEePermissionDebugRequestActionType.pipe(T.Query()), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/permission_debug", code: 200 }), + ), +).annotate({ + identifier: "GetEePermissionDebugRequest", +}) as any as S.Schema; + +export interface GetEePermissionDebugResponse {} +export const GetEePermissionDebugResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEePermissionDebugResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncBranchesRequest {} +export const GetEeRemoteSyncBranchesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/remote-sync/branches", code: 200 }), + ), +).annotate({ + identifier: "GetEeRemoteSyncBranchesRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncBranchesResponse {} +export const GetEeRemoteSyncBranchesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncBranchesResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncCurrentTaskRequest {} +export const GetEeRemoteSyncCurrentTaskRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/remote-sync/current-task", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeRemoteSyncCurrentTaskRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncCurrentTaskResponse {} +export const GetEeRemoteSyncCurrentTaskResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncCurrentTaskResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncDirtyRequest {} +export const GetEeRemoteSyncDirtyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/remote-sync/dirty", code: 200 }), + ), +).annotate({ + identifier: "GetEeRemoteSyncDirtyRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncDirtyResponse {} +export const GetEeRemoteSyncDirtyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncDirtyResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncExportPreflightRequest { + branch: string; +} +export const GetEeRemoteSyncExportPreflightRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + branch: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/remote-sync/export-preflight", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeRemoteSyncExportPreflightRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncExportPreflightResponse {} +export const GetEeRemoteSyncExportPreflightResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncExportPreflightResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncHasRemoteChangesRequest { + force_refresh?: boolean; +} +export const GetEeRemoteSyncHasRemoteChangesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + force_refresh: S.optional(S.Boolean.pipe(T.Query("force-refresh"))), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/remote-sync/has-remote-changes", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeRemoteSyncHasRemoteChangesRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncHasRemoteChangesResponse {} +export const GetEeRemoteSyncHasRemoteChangesResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncHasRemoteChangesResponse", +}) as any as S.Schema; + +export interface GetEeRemoteSyncIsDirtyRequest {} +export const GetEeRemoteSyncIsDirtyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/remote-sync/is-dirty", code: 200 }), + ), +).annotate({ + identifier: "GetEeRemoteSyncIsDirtyRequest", +}) as any as S.Schema; + +export interface GetEeRemoteSyncIsDirtyResponse {} +export const GetEeRemoteSyncIsDirtyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeRemoteSyncIsDirtyResponse", +}) as any as S.Schema; + +export interface GetEeReplacementRunRequest { + id: number; +} +export const GetEeReplacementRunRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/replacement/runs/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetEeReplacementRunRequest", +}) as any as S.Schema; + +export interface GetEeReplacementRunResponse {} +export const GetEeReplacementRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeReplacementRunResponse", +}) as any as S.Schema; + +export interface GetEeReplacementRunsRequest { + is_active?: boolean; +} +export const GetEeReplacementRunsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + is_active: S.optional(S.Boolean.pipe(T.Query("is-active"))), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/replacement/runs", code: 200 }), + ), +).annotate({ + identifier: "GetEeReplacementRunsRequest", +}) as any as S.Schema; + +export interface GetEeReplacementRunsResponse {} +export const GetEeReplacementRunsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeReplacementRunsResponse", +}) as any as S.Schema; + +export interface GetEeScimGroupRequest { + id: string; +} +export const GetEeScimGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/scim/v2/Groups/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetEeScimGroupRequest", +}) as any as S.Schema; + +export interface GetEeScimGroupResponse {} +export const GetEeScimGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeScimGroupResponse", +}) as any as S.Schema; + +export interface GetEeScimGroupsRequest { + startIndex?: number; + count?: number; + filter?: string; +} +export const GetEeScimGroupsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startIndex: S.optional(S.Number.pipe(T.Query())), + count: S.optional(S.Number.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/ee/scim/v2/Groups", code: 200 })), +).annotate({ + identifier: "GetEeScimGroupsRequest", +}) as any as S.Schema; + +export interface GetEeScimGroupsResponse {} +export const GetEeScimGroupsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeScimGroupsResponse", +}) as any as S.Schema; + +export interface GetEeScimKeyRequest {} +export const GetEeScimKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/scim/api_key", code: 200 }), + ), +).annotate({ + identifier: "GetEeScimKeyRequest", +}) as any as S.Schema; + +export interface GetEeScimKeyResponse {} +export const GetEeScimKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeScimKeyResponse", +}) as any as S.Schema; + +export interface GetEeScimUserRequest { + id: string; +} +export const GetEeScimUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/scim/v2/Users/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetEeScimUserRequest", +}) as any as S.Schema; + +export interface GetEeScimUserResponse {} +export const GetEeScimUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeScimUserResponse", +}) as any as S.Schema; + +export interface GetEeScimUsersRequest { + startIndex?: number; + count?: number; + filter?: string; +} +export const GetEeScimUsersRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + startIndex: S.optional(S.Number.pipe(T.Query())), + count: S.optional(S.Number.pipe(T.Query())), + filter: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/ee/scim/v2/Users", code: 200 })), +).annotate({ + identifier: "GetEeScimUsersRequest", +}) as any as S.Schema; + +export interface GetEeScimUsersResponse {} +export const GetEeScimUsersResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeScimUsersResponse", +}) as any as S.Schema; + +export interface GetEeSecurityCenterRequest {} +export const GetEeSecurityCenterRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/security-center", code: 200 }), + ), +).annotate({ + identifier: "GetEeSecurityCenterRequest", +}) as any as S.Schema; + +export interface GetEeSecurityCenterResponse {} +export const GetEeSecurityCenterResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeSecurityCenterResponse", +}) as any as S.Schema; + +export interface GetEeSemanticSearchStatusRequest {} +export const GetEeSemanticSearchStatusRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/ee/semantic-search/status", code: 200 }), + ), +).annotate({ + identifier: "GetEeSemanticSearchStatusRequest", +}) as any as S.Schema; + +export interface GetEeSemanticSearchStatusResponse {} +export const GetEeSemanticSearchStatusResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeSemanticSearchStatusResponse", +}) as any as S.Schema; + +export interface GetEeSerializationMetadataImportRequest { + /** value must be a valid UUID. */ + id: string; +} +export const GetEeSerializationMetadataImportRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/serialization/metadata/import/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeSerializationMetadataImportRequest", +}) as any as S.Schema; + +export interface GetEeSerializationMetadataImportResponse {} +export const GetEeSerializationMetadataImportResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeSerializationMetadataImportResponse", +}) as any as S.Schema; + +export type GetEeStaleRequestSortColumn = "name" | "last_used_at"; +export const GetEeStaleRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetEeStaleRequestSortDirection = "asc" | "desc"; +export const GetEeStaleRequestSortDirection = /*@__PURE__*/ S.String; + +export interface GetEeStaleRequest { + id: string; + before_date?: string; + is_recursive?: boolean; + sort_column?: GetEeStaleRequestSortColumn | (string & {}); + sort_direction?: GetEeStaleRequestSortDirection | (string & {}); +} +export const GetEeStaleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + before_date: S.optional(S.String.pipe(T.Query())), + is_recursive: S.optional(S.Boolean.pipe(T.Query())), + sort_column: S.optional(GetEeStaleRequestSortColumn.pipe(T.Query())), + sort_direction: S.optional(GetEeStaleRequestSortDirection.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/ee/stale/{id}", code: 200 })), +).annotate({ + identifier: "GetEeStaleRequest", +}) as any as S.Schema; + +export interface GetEeStaleResponse {} +export const GetEeStaleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeStaleResponse", +}) as any as S.Schema; + +export interface GetEeSupportAccessGrantRequest { + ticket_number?: string; + user_id?: number; + include_revoked?: boolean; +} +export const GetEeSupportAccessGrantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + ticket_number: S.optional(S.String.pipe(T.Query("ticket-number"))), + user_id: S.optional(S.Number.pipe(T.Query("user-id"))), + include_revoked: S.optional(S.Boolean.pipe(T.Query("include-revoked"))), + }).pipe( + T.Http({ method: "GET", uri: "/api/ee/support-access-grant", code: 200 }), + ), +).annotate({ + identifier: "GetEeSupportAccessGrantRequest", +}) as any as S.Schema; + +export interface GetEeSupportAccessGrantResponse {} +export const GetEeSupportAccessGrantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeSupportAccessGrantResponse", +}) as any as S.Schema; + +export interface GetEeSupportAccessGrantCurrentRequest {} +export const GetEeSupportAccessGrantCurrentRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/support-access-grant/current", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeSupportAccessGrantCurrentRequest", +}) as any as S.Schema; + +export interface GetEeSupportAccessGrantCurrentResponse {} +export const GetEeSupportAccessGrantCurrentResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeSupportAccessGrantCurrentResponse", +}) as any as S.Schema; + +export type GetEeTenantRequestStatus = "all" | "deactivated" | "active"; +export const GetEeTenantRequestStatus = /*@__PURE__*/ S.String; + +export interface GetEeTenantRequest { + status?: GetEeTenantRequestStatus | (string & {}); +} +export const GetEeTenantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(GetEeTenantRequestStatus.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/ee/tenant", code: 200 })), +).annotate({ + identifier: "GetEeTenantRequest", +}) as any as S.Schema; + +export interface GetEeTenantResponse {} +export const GetEeTenantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeTenantResponse", +}) as any as S.Schema; + +export interface GetEeTenantByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetEeTenantByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/ee/tenant/{id}", code: 200 })), +).annotate({ + identifier: "GetEeTenantByIdRequest", +}) as any as S.Schema; + +export interface GetEeTenantByIdResponse {} +export const GetEeTenantByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeTenantByIdResponse", +}) as any as S.Schema; + +export interface GetEeTransformInspectRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetEeTransformInspectRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/transforms/{id}/inspect", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeTransformInspectRequest", +}) as any as S.Schema; + +export interface GetEeTransformInspectResponse {} +export const GetEeTransformInspectResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeTransformInspectResponse", +}) as any as S.Schema; + +export interface GetEeTransformInspectByLensIdRequest { + /** value must be an integer greater than zero. */ + id: number; + lens_id: string; +} +export const GetEeTransformInspectByLensIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + lens_id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/transforms/{id}/inspect/{lens_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeTransformInspectByLensIdRequest", +}) as any as S.Schema; + +export interface GetEeTransformInspectByLensIdResponse {} +export const GetEeTransformInspectByLensIdResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeTransformInspectByLensIdResponse", +}) as any as S.Schema; + +export interface GetEeTransformsPythonLibraryRequest { + path: string; +} +export const GetEeTransformsPythonLibraryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + path: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/transforms-python/library/{path}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeTransformsPythonLibraryRequest", +}) as any as S.Schema; + +export interface GetEeTransformsPythonLibraryResponse {} +export const GetEeTransformsPythonLibraryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEeTransformsPythonLibraryResponse", +}) as any as S.Schema; + +export interface GetEeUploadManagementTablesRequest {} +export const GetEeUploadManagementTablesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/ee/upload-management/tables", + code: 200, + }), + ), +).annotate({ + identifier: "GetEeUploadManagementTablesRequest", +}) as any as S.Schema; + +export interface GetEeUploadManagementTablesResponse {} +export const GetEeUploadManagementTablesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEeUploadManagementTablesResponse", +}) as any as S.Schema; + +export interface GetEmbedCardRequest { + token: string; +} +export const GetEmbedCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/embed/card/{token}", code: 200 })), +).annotate({ + identifier: "GetEmbedCardRequest", +}) as any as S.Schema; + +export interface GetEmbedCardResponse {} +export const GetEmbedCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedCardResponse", +}) as any as S.Schema; + +export interface GetEmbedCardParamRemappingRequest { + token: string; + param_key: string; + value: string; +} +export const GetEmbedCardParamRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/card/{token}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedCardParamRemappingRequest", +}) as any as S.Schema; + +export interface GetEmbedCardParamRemappingResponse {} +export const GetEmbedCardParamRemappingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedCardParamRemappingResponse", +}) as any as S.Schema; + +export interface GetEmbedCardParamSearchRequest { + token: string; + param_key: string; + prefix: string; +} +export const GetEmbedCardParamSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/card/{token}/params/{param_key}/search/{prefix}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedCardParamSearchRequest", +}) as any as S.Schema; + +export interface GetEmbedCardParamSearchResponse {} +export const GetEmbedCardParamSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedCardParamSearchResponse", +}) as any as S.Schema; + +export interface GetEmbedCardParamValuesRequest { + token: string; + param_key: string; +} +export const GetEmbedCardParamValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/card/{token}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedCardParamValuesRequest", +}) as any as S.Schema; + +export interface GetEmbedCardParamValuesResponse {} +export const GetEmbedCardParamValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedCardParamValuesResponse", +}) as any as S.Schema; + +export interface GetEmbedCardQueryRequest { + token: string; +} +export const GetEmbedCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/embed/card/{token}/query", code: 200 }), + ), +).annotate({ + identifier: "GetEmbedCardQueryRequest", +}) as any as S.Schema; + +export interface GetEmbedCardQueryResponse {} +export const GetEmbedCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedCardQueryResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type GetEmbedCardQueryByExportFormatRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const GetEmbedCardQueryByExportFormatRequestExportFormat = + /*@__PURE__*/ S.String; + +export interface GetEmbedCardQueryByExportFormatRequest { + token: string; + export_format: + | GetEmbedCardQueryByExportFormatRequestExportFormat + | (string & {}); + format_rows?: boolean; + pivot_results?: boolean; +} +export const GetEmbedCardQueryByExportFormatRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + export_format: GetEmbedCardQueryByExportFormatRequestExportFormat.pipe( + T.Label(), + ), + format_rows: S.optional(S.Boolean.pipe(T.Query())), + pivot_results: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/card/{token}/query/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedCardQueryByExportFormatRequest", +}) as any as S.Schema; + +export interface GetEmbedCardQueryByExportFormatResponse {} +export const GetEmbedCardQueryByExportFormatResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEmbedCardQueryByExportFormatResponse", +}) as any as S.Schema; + +export interface GetEmbedDashboardRequest { + token: string; +} +export const GetEmbedDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/embed/dashboard/{token}", code: 200 }), + ), +).annotate({ + identifier: "GetEmbedDashboardRequest", +}) as any as S.Schema; + +export interface GetEmbedDashboardResponse {} +export const GetEmbedDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedDashboardResponse", +}) as any as S.Schema; + +export interface GetEmbedDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; +} +export const GetEmbedDashboardDashcardCardRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedDashboardDashcardCardRequest", +}) as any as S.Schema; + +export interface GetEmbedDashboardDashcardCardResponse {} +export const GetEmbedDashboardDashcardCardResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEmbedDashboardDashcardCardResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat = + /*@__PURE__*/ S.String; + +export interface GetEmbedDashboardDashcardCardByExportFormatRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + export_format: + | GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat + | (string & {}); + format_rows?: boolean; + pivot_results?: boolean; +} +export const GetEmbedDashboardDashcardCardByExportFormatRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + export_format: + GetEmbedDashboardDashcardCardByExportFormatRequestExportFormat.pipe( + T.Label(), + ), + format_rows: S.optional(S.Boolean.pipe(T.Query())), + pivot_results: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{export_format}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEmbedDashboardDashcardCardByExportFormatRequest", + }) as any as S.Schema; + +export interface GetEmbedDashboardDashcardCardByExportFormatResponse {} +export const GetEmbedDashboardDashcardCardByExportFormatResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEmbedDashboardDashcardCardByExportFormatResponse", + }) as any as S.Schema; + +export interface GetEmbedDashboardParamRemappingRequest { + token: string; + param_key: string; + value: string; +} +export const GetEmbedDashboardParamRemappingRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/dashboard/{token}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedDashboardParamRemappingRequest", +}) as any as S.Schema; + +export interface GetEmbedDashboardParamRemappingResponse {} +export const GetEmbedDashboardParamRemappingResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEmbedDashboardParamRemappingResponse", +}) as any as S.Schema; + +export interface GetEmbedDashboardParamSearchRequest { + token: string; + param_key: string; + prefix: string; +} +export const GetEmbedDashboardParamSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/dashboard/{token}/params/{param_key}/search/{prefix}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedDashboardParamSearchRequest", +}) as any as S.Schema; + +export interface GetEmbedDashboardParamSearchResponse {} +export const GetEmbedDashboardParamSearchResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEmbedDashboardParamSearchResponse", +}) as any as S.Schema; + +export interface GetEmbedDashboardParamValuesRequest { + token: string; + param_key: string; +} +export const GetEmbedDashboardParamValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/dashboard/{token}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedDashboardParamValuesRequest", +}) as any as S.Schema; + +export interface GetEmbedDashboardParamValuesResponse {} +export const GetEmbedDashboardParamValuesResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetEmbedDashboardParamValuesResponse", +}) as any as S.Schema; + +export interface GetEmbedPivotCardQueryRequest { + token: string; +} +export const GetEmbedPivotCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/pivot/card/{token}/query", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedPivotCardQueryRequest", +}) as any as S.Schema; + +export interface GetEmbedPivotCardQueryResponse {} +export const GetEmbedPivotCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedPivotCardQueryResponse", +}) as any as S.Schema; + +export interface GetEmbedPivotDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; +} +export const GetEmbedPivotDashboardDashcardCardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/pivot/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEmbedPivotDashboardDashcardCardRequest", + }) as any as S.Schema; + +export interface GetEmbedPivotDashboardDashcardCardResponse {} +export const GetEmbedPivotDashboardDashcardCardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEmbedPivotDashboardDashcardCardResponse", + }) as any as S.Schema; + +export interface GetEmbedThemeRequest {} +export const GetEmbedThemeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/embed-theme", code: 200 }), + ), +).annotate({ + identifier: "GetEmbedThemeRequest", +}) as any as S.Schema; + +export interface GetEmbedThemeResponse {} +export const GetEmbedThemeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedThemeResponse", +}) as any as S.Schema; + +export interface GetEmbedThemeByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetEmbedThemeByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/embed-theme/{id}", code: 200 })), +).annotate({ + identifier: "GetEmbedThemeByIdRequest", +}) as any as S.Schema; + +export interface GetEmbedThemeByIdResponse {} +export const GetEmbedThemeByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedThemeByIdResponse", +}) as any as S.Schema; + +export interface GetEmbedTilesCardRequest { + token: string; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetEmbedTilesCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/tiles/card/{token}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ + identifier: "GetEmbedTilesCardRequest", +}) as any as S.Schema; + +export interface GetEmbedTilesCardResponse {} +export const GetEmbedTilesCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetEmbedTilesCardResponse", +}) as any as S.Schema; + +export interface GetEmbedTilesDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetEmbedTilesDashboardDashcardCardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/embed/tiles/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetEmbedTilesDashboardDashcardCardRequest", + }) as any as S.Schema; + +export interface GetEmbedTilesDashboardDashcardCardResponse {} +export const GetEmbedTilesDashboardDashcardCardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetEmbedTilesDashboardDashcardCardResponse", + }) as any as S.Schema; + +export interface GetFieldRequest { + /** value must be an integer greater than zero. */ + id: number; + include_editable_data_model?: boolean; +} +export const GetFieldRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/field/{id}", code: 200 })), +).annotate({ + identifier: "GetFieldRequest", +}) as any as S.Schema; + +export interface GetFieldResponse {} +export const GetFieldResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldResponse", +}) as any as S.Schema; + +export interface GetFieldRelatedRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetFieldRelatedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/field/{id}/related", code: 200 })), +).annotate({ + identifier: "GetFieldRelatedRequest", +}) as any as S.Schema; + +export interface GetFieldRelatedResponse {} +export const GetFieldRelatedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldRelatedResponse", +}) as any as S.Schema; + +export interface GetFieldRemappingRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be an integer greater than zero. */ + remapped_id: number; + value: string; +} +export const GetFieldRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + remapped_id: S.Number.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/field/{id}/remapping/{remapped_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetFieldRemappingRequest", +}) as any as S.Schema; + +export interface GetFieldRemappingResponse {} +export const GetFieldRemappingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldRemappingResponse", +}) as any as S.Schema; + +export interface GetFieldSearchRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be an integer greater than zero. */ + search_id: number; + value?: string; +} +export const GetFieldSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + search_id: S.Number.pipe(T.Label()), + value: S.optional(S.String.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/field/{id}/search/{search_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetFieldSearchRequest", +}) as any as S.Schema; + +export interface GetFieldSearchResponse {} +export const GetFieldSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldSearchResponse", +}) as any as S.Schema; + +export interface GetFieldSummaryRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetFieldSummaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/field/{id}/summary", code: 200 })), +).annotate({ + identifier: "GetFieldSummaryRequest", +}) as any as S.Schema; + +export interface GetFieldSummaryResponse {} +export const GetFieldSummaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldSummaryResponse", +}) as any as S.Schema; + +export interface GetFieldValuesRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetFieldValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/field/{id}/values", code: 200 })), +).annotate({ + identifier: "GetFieldValuesRequest", +}) as any as S.Schema; + +export interface GetFieldValuesResponse {} +export const GetFieldValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetFieldValuesResponse", +}) as any as S.Schema; + +export interface GetGeojsonRequest { + url: string; +} +export const GetGeojsonRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.String.pipe(T.Query()), + }).pipe(T.Http({ method: "GET", uri: "/api/geojson", code: 200 })), +).annotate({ + identifier: "GetGeojsonRequest", +}) as any as S.Schema; + +export interface GetGeojsonResponse {} +export const GetGeojsonResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetGeojsonResponse", +}) as any as S.Schema; + +export interface GetGeojsonByKeyRequest { + key: string; +} +export const GetGeojsonByKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/geojson/{key}", code: 200 })), +).annotate({ + identifier: "GetGeojsonByKeyRequest", +}) as any as S.Schema; + +export interface GetGeojsonByKeyResponse {} +export const GetGeojsonByKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetGeojsonByKeyResponse", +}) as any as S.Schema; + +export interface GetGlossaryRequest {} +export const GetGlossaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/glossary", code: 200 })), +).annotate({ + identifier: "GetGlossaryRequest", +}) as any as S.Schema; + +export interface GetGlossaryResponse {} +export const GetGlossaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetGlossaryResponse", +}) as any as S.Schema; + +export interface GetHealthInspectorRequest {} +export const GetHealthInspectorRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/health-inspector", code: 200 }), + ), +).annotate({ + identifier: "GetHealthInspectorRequest", +}) as any as S.Schema; + +export interface GetHealthInspectorResponse {} +export const GetHealthInspectorResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetHealthInspectorResponse", +}) as any as S.Schema; + +export interface GetKeyRequest {} +export const GetKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/api-key", code: 200 })), +).annotate({ identifier: "GetKeyRequest" }) as any as S.Schema; + +export interface GetKeyResponse {} +export const GetKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ identifier: "GetKeyResponse" }) as any as S.Schema; + +export interface GetKeyCountRequest {} +export const GetKeyCountRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/api-key/count", code: 200 }), + ), +).annotate({ + identifier: "GetKeyCountRequest", +}) as any as S.Schema; + +export interface GetKeyCountResponse {} +export const GetKeyCountResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetKeyCountResponse", +}) as any as S.Schema; + +export interface GetLlmListModelsRequest {} +export const GetLlmListModelsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/llm/list-models", code: 200 }), + ), +).annotate({ + identifier: "GetLlmListModelsRequest", +}) as any as S.Schema; + +export interface GetLlmListModelsResponse {} +export const GetLlmListModelsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetLlmListModelsResponse", +}) as any as S.Schema; + +export interface GetLoggerLogsRequest {} +export const GetLoggerLogsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/logger/logs", code: 200 }), + ), +).annotate({ + identifier: "GetLoggerLogsRequest", +}) as any as S.Schema; + +export interface GetLoggerLogsResponse {} +export const GetLoggerLogsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetLoggerLogsResponse", +}) as any as S.Schema; + +export interface GetLoggerPresetsRequest {} +export const GetLoggerPresetsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/logger/presets", code: 200 }), + ), +).annotate({ + identifier: "GetLoggerPresetsRequest", +}) as any as S.Schema; + +export interface GetLoggerPresetsResponse {} +export const GetLoggerPresetsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetLoggerPresetsResponse", +}) as any as S.Schema; + +export interface GetLoginHistoryCurrentRequest {} +export const GetLoginHistoryCurrentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/login-history/current", code: 200 }), + ), +).annotate({ + identifier: "GetLoginHistoryCurrentRequest", +}) as any as S.Schema; + +export interface GetLoginHistoryCurrentResponse {} +export const GetLoginHistoryCurrentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetLoginHistoryCurrentResponse", +}) as any as S.Schema; + +export interface GetMeasureRequest {} +export const GetMeasureRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/measure", code: 200 })), +).annotate({ + identifier: "GetMeasureRequest", +}) as any as S.Schema; + +export interface GetMeasureResponse {} +export const GetMeasureResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMeasureResponse", +}) as any as S.Schema; + +export interface GetMeasureByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetMeasureByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/measure/{id}", code: 200 })), +).annotate({ + identifier: "GetMeasureByIdRequest", +}) as any as S.Schema; + +export interface GetMeasureByIdResponse {} +export const GetMeasureByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMeasureByIdResponse", +}) as any as S.Schema; + +export interface GetMeasureDimensionRemappingRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; + value: string; +} +export const GetMeasureDimensionRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/measure/{id}/dimension/{dimension_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetMeasureDimensionRemappingRequest", +}) as any as S.Schema; + +export interface GetMeasureDimensionRemappingResponse {} +export const GetMeasureDimensionRemappingResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetMeasureDimensionRemappingResponse", +}) as any as S.Schema; + +export interface GetMeasureDimensionSearchRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; + query: string; +} +export const GetMeasureDimensionSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/measure/{id}/dimension/{dimension_key}/search", + code: 200, + }), + ), +).annotate({ + identifier: "GetMeasureDimensionSearchRequest", +}) as any as S.Schema; + +export interface GetMeasureDimensionSearchResponse {} +export const GetMeasureDimensionSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMeasureDimensionSearchResponse", +}) as any as S.Schema; + +export interface GetMeasureDimensionValuesRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; +} +export const GetMeasureDimensionValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/measure/{id}/dimension/{dimension_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetMeasureDimensionValuesRequest", +}) as any as S.Schema; + +export interface GetMeasureDimensionValuesResponse {} +export const GetMeasureDimensionValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMeasureDimensionValuesResponse", +}) as any as S.Schema; + +export interface GetMetabotConversationRequest { + /** value must be a valid UUID. */ + id: string; +} +export const GetMetabotConversationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/metabot/conversations/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetMetabotConversationRequest", +}) as any as S.Schema; + +export interface GetMetabotConversationResponse {} +export const GetMetabotConversationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetabotConversationResponse", +}) as any as S.Schema; + +export interface GetMetabotConversationsRequest {} +export const GetMetabotConversationsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/metabot/conversations", code: 200 }), + ), +).annotate({ + identifier: "GetMetabotConversationsRequest", +}) as any as S.Schema; + +export interface GetMetabotConversationsResponse {} +export const GetMetabotConversationsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetabotConversationsResponse", +}) as any as S.Schema; + +export interface GetMetabotMetabotRequest {} +export const GetMetabotMetabotRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/metabot/metabot", code: 200 }), + ), +).annotate({ + identifier: "GetMetabotMetabotRequest", +}) as any as S.Schema; + +export interface GetMetabotMetabotResponse {} +export const GetMetabotMetabotResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetabotMetabotResponse", +}) as any as S.Schema; + +export interface GetMetabotMetabotByIdRequest { + id: number; +} +export const GetMetabotMetabotByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/metabot/metabot/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetMetabotMetabotByIdRequest", +}) as any as S.Schema; + +export interface GetMetabotMetabotByIdResponse {} +export const GetMetabotMetabotByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetabotMetabotByIdResponse", +}) as any as S.Schema; + +export type GetMetabotMetabotPromptSuggestionsRequestModel = "metric" | "model"; +export const GetMetabotMetabotPromptSuggestionsRequestModel = + /*@__PURE__*/ S.String; + +export interface GetMetabotMetabotPromptSuggestionsRequest { + id: number; + sample?: boolean; + model?: GetMetabotMetabotPromptSuggestionsRequestModel | (string & {}); + model_id?: number; +} +export const GetMetabotMetabotPromptSuggestionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + sample: S.optional(S.Boolean.pipe(T.Query())), + model: S.optional( + GetMetabotMetabotPromptSuggestionsRequestModel.pipe(T.Query()), + ), + model_id: S.optional(S.Number.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/metabot/metabot/{id}/prompt-suggestions", + code: 200, + }), + ), + ).annotate({ + identifier: "GetMetabotMetabotPromptSuggestionsRequest", + }) as any as S.Schema; + +export interface GetMetabotMetabotPromptSuggestionsResponse {} +export const GetMetabotMetabotPromptSuggestionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetMetabotMetabotPromptSuggestionsResponse", + }) as any as S.Schema; + +export interface GetMetabotPermissionsUserPermissionsRequest {} +export const GetMetabotPermissionsUserPermissionsRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/metabot/permissions/user-permissions", + code: 200, + }), + ), + ).annotate({ + identifier: "GetMetabotPermissionsUserPermissionsRequest", + }) as any as S.Schema; + +export interface GetMetabotPermissionsUserPermissionsResponse {} +export const GetMetabotPermissionsUserPermissionsResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetMetabotPermissionsUserPermissionsResponse", + }) as any as S.Schema; + +export type GetMetabotSettingsRequestProvider = + | "anthropic" + | "openai" + | "mistral" + | "azure" + | "bedrock" + | "zai" + | "metabase" + | "openrouter"; +export const GetMetabotSettingsRequestProvider = /*@__PURE__*/ S.String; + +export interface GetMetabotSettingsRequest { + provider?: GetMetabotSettingsRequestProvider | (string & {}); +} +export const GetMetabotSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + provider: S.optional(GetMetabotSettingsRequestProvider.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/metabot/settings", code: 200 })), +).annotate({ + identifier: "GetMetabotSettingsRequest", +}) as any as S.Schema; + +export interface GetMetabotSettingsResponse {} +export const GetMetabotSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetabotSettingsResponse", +}) as any as S.Schema; + +export interface GetMetricRequest {} +export const GetMetricRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/metric", code: 200 })), +).annotate({ + identifier: "GetMetricRequest", +}) as any as S.Schema; + +export interface GetMetricResponse {} +export const GetMetricResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricResponse", +}) as any as S.Schema; + +export interface GetMetricByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetMetricByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/metric/{id}", code: 200 })), +).annotate({ + identifier: "GetMetricByIdRequest", +}) as any as S.Schema; + +export interface GetMetricByIdResponse {} +export const GetMetricByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricByIdResponse", +}) as any as S.Schema; + +export interface GetMetricDimensionRemappingRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; + value: string; +} +export const GetMetricDimensionRemappingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/metric/{id}/dimension/{dimension_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetMetricDimensionRemappingRequest", +}) as any as S.Schema; + +export interface GetMetricDimensionRemappingResponse {} +export const GetMetricDimensionRemappingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricDimensionRemappingResponse", +}) as any as S.Schema; + +export interface GetMetricDimensionSearchRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; + query: string; +} +export const GetMetricDimensionSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + query: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/metric/{id}/dimension/{dimension_key}/search", + code: 200, + }), + ), +).annotate({ + identifier: "GetMetricDimensionSearchRequest", +}) as any as S.Schema; + +export interface GetMetricDimensionSearchResponse {} +export const GetMetricDimensionSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricDimensionSearchResponse", +}) as any as S.Schema; + +export interface GetMetricDimensionValuesRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be a valid UUID. */ + dimension_key: string; +} +export const GetMetricDimensionValuesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dimension_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/metric/{id}/dimension/{dimension_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetMetricDimensionValuesRequest", +}) as any as S.Schema; + +export interface GetMetricDimensionValuesResponse {} +export const GetMetricDimensionValuesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMetricDimensionValuesResponse", +}) as any as S.Schema; + +export interface GetModelIndexRequest { + /** value must be an integer greater than zero. */ + model_id: number; +} +export const GetModelIndexRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model_id: S.Number.pipe(T.Query()), + }).pipe(T.Http({ method: "GET", uri: "/api/model-index", code: 200 })), +).annotate({ + identifier: "GetModelIndexRequest", +}) as any as S.Schema; + +export interface GetModelIndexResponse {} +export const GetModelIndexResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetModelIndexResponse", +}) as any as S.Schema; + +export interface GetModelIndexByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetModelIndexByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/model-index/{id}", code: 200 })), +).annotate({ + identifier: "GetModelIndexByIdRequest", +}) as any as S.Schema; + +export interface GetModelIndexByIdResponse {} +export const GetModelIndexByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetModelIndexByIdResponse", +}) as any as S.Schema; + +export interface GetMtGtapRequest { + group_id?: number; + table_id?: number; +} +export const GetMtGtapRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.optional(S.Number.pipe(T.Query())), + table_id: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/mt/gtap", code: 200 })), +).annotate({ + identifier: "GetMtGtapRequest", +}) as any as S.Schema; + +export interface GetMtGtapResponse {} +export const GetMtGtapResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMtGtapResponse", +}) as any as S.Schema; + +export interface GetMtGtapByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetMtGtapByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/mt/gtap/{id}", code: 200 })), +).annotate({ + identifier: "GetMtGtapByIdRequest", +}) as any as S.Schema; + +export interface GetMtGtapByIdResponse {} +export const GetMtGtapByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMtGtapByIdResponse", +}) as any as S.Schema; + +export interface GetMtUserAttributesRequest {} +export const GetMtUserAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/mt/user/attributes", code: 200 }), + ), +).annotate({ + identifier: "GetMtUserAttributesRequest", +}) as any as S.Schema; + +export interface GetMtUserAttributesResponse {} +export const GetMtUserAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetMtUserAttributesResponse", +}) as any as S.Schema; + +export interface GetNativeQuerySnippetRequest { + archived?: boolean; +} +export const GetNativeQuerySnippetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + archived: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/native-query-snippet", code: 200 }), + ), +).annotate({ + identifier: "GetNativeQuerySnippetRequest", +}) as any as S.Schema; + +export interface GetNativeQuerySnippetResponse {} +export const GetNativeQuerySnippetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNativeQuerySnippetResponse", +}) as any as S.Schema; + +export interface GetNativeQuerySnippetByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetNativeQuerySnippetByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/native-query-snippet/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetNativeQuerySnippetByIdRequest", +}) as any as S.Schema; + +export interface GetNativeQuerySnippetByIdResponse {} +export const GetNativeQuerySnippetByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNativeQuerySnippetByIdResponse", +}) as any as S.Schema; + +export type GetNotificationRequestPayloadType = + | "notification/dashboard" + | "notification/system-event" + | "notification/testing" + | "notification/card"; +export const GetNotificationRequestPayloadType = /*@__PURE__*/ S.String; + +export interface GetNotificationRequest { + /** value must be an integer greater than zero. */ + creator_id?: number; + /** value must be an integer greater than zero. */ + recipient_id?: number; + /** value must be an integer greater than zero. */ + creator_or_recipient_id?: number; + /** value must be an integer greater than zero. */ + card_id?: number; + include_inactive?: boolean; + payload_type?: GetNotificationRequestPayloadType | (string & {}); +} +export const GetNotificationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + creator_id: S.optional(S.Number.pipe(T.Query())), + recipient_id: S.optional(S.Number.pipe(T.Query())), + creator_or_recipient_id: S.optional(S.Number.pipe(T.Query())), + card_id: S.optional(S.Number.pipe(T.Query())), + include_inactive: S.optional(S.Boolean.pipe(T.Query())), + payload_type: S.optional(GetNotificationRequestPayloadType.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/notification", code: 200 })), +).annotate({ + identifier: "GetNotificationRequest", +}) as any as S.Schema; + +export interface GetNotificationResponse {} +export const GetNotificationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNotificationResponse", +}) as any as S.Schema; + +export type GetNotificationAdminRequestChannelCase1List = Array; +export const GetNotificationAdminRequestChannelCase1List = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type GetNotificationAdminRequestChannel = + | string + | GetNotificationAdminRequestChannelCase1List; +export const GetNotificationAdminRequestChannel = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseNotificationApiAdminRunStatus = "failing" | "successful"; +export const MetabaseNotificationApiAdminRunStatus = /*@__PURE__*/ S.String; + +export type MetabaseNotificationApiAdminSortColumn = + | "id" + | "last_send" + | "last_check" + | "card_name" + | "creator_name" + | "updated_at"; +export const MetabaseNotificationApiAdminSortColumn = /*@__PURE__*/ S.String; + +export type MetabaseNotificationApiAdminSortDirection = "asc" | "desc"; +export const MetabaseNotificationApiAdminSortDirection = /*@__PURE__*/ S.String; + +export interface GetNotificationAdminRequest { + active?: boolean; + /** value must be an integer greater than zero. */ + creator_id?: number; + creator_active?: boolean; + creatorless?: boolean; + /** value must be an integer greater than zero. */ + card_id?: number; + recipient_email?: string; + channel?: GetNotificationAdminRequestChannel; + last_send_status?: MetabaseNotificationApiAdminRunStatus | (string & {}); + last_check_status?: MetabaseNotificationApiAdminRunStatus | (string & {}); + query?: string; + sort_column?: MetabaseNotificationApiAdminSortColumn | (string & {}); + sort_direction?: MetabaseNotificationApiAdminSortDirection | (string & {}); +} +export const GetNotificationAdminRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.Boolean.pipe(T.Query())), + creator_id: S.optional(S.Number.pipe(T.Query())), + creator_active: S.optional(S.Boolean.pipe(T.Query())), + creatorless: S.optional(S.Boolean.pipe(T.Query())), + card_id: S.optional(S.Number.pipe(T.Query())), + recipient_email: S.optional(S.String.pipe(T.Query())), + channel: S.optional(GetNotificationAdminRequestChannel.pipe(T.Query())), + last_send_status: S.optional( + MetabaseNotificationApiAdminRunStatus.pipe(T.Query()), + ), + last_check_status: S.optional( + MetabaseNotificationApiAdminRunStatus.pipe(T.Query()), + ), + query: S.optional(S.String.pipe(T.Query())), + sort_column: S.optional( + MetabaseNotificationApiAdminSortColumn.pipe(T.Query()), + ), + sort_direction: S.optional( + MetabaseNotificationApiAdminSortDirection.pipe(T.Query()), + ), + }).pipe(T.Http({ method: "GET", uri: "/api/notification/admin", code: 200 })), +).annotate({ + identifier: "GetNotificationAdminRequest", +}) as any as S.Schema; + +export interface GetNotificationAdminResponse {} +export const GetNotificationAdminResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNotificationAdminResponse", +}) as any as S.Schema; + +export interface GetNotificationAdminByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetNotificationAdminByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/notification/admin/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetNotificationAdminByIdRequest", +}) as any as S.Schema; + +export interface GetNotificationAdminByIdResponse {} +export const GetNotificationAdminByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNotificationAdminByIdResponse", +}) as any as S.Schema; + +export interface GetNotificationByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetNotificationByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/notification/{id}", code: 200 })), +).annotate({ + identifier: "GetNotificationByIdRequest", +}) as any as S.Schema; + +export interface GetNotificationByIdResponse {} +export const GetNotificationByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetNotificationByIdResponse", +}) as any as S.Schema; + +export type GetOauthAuthorizationsRequestEventType = + | "registered" + | "approved" + | "denied"; +export const GetOauthAuthorizationsRequestEventType = /*@__PURE__*/ S.String; + +export interface GetOauthAuthorizationsRequest { + client_id?: string; + event_type?: GetOauthAuthorizationsRequestEventType | (string & {}); +} +export const GetOauthAuthorizationsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + client_id: S.optional(S.String.pipe(T.Query("client-id"))), + event_type: S.optional( + GetOauthAuthorizationsRequestEventType.pipe(T.Query("event-type")), + ), + }).pipe( + T.Http({ method: "GET", uri: "/api/oauth/authorizations", code: 200 }), + ), +).annotate({ + identifier: "GetOauthAuthorizationsRequest", +}) as any as S.Schema; + +export interface GetOauthAuthorizationsResponse {} +export const GetOauthAuthorizationsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetOauthAuthorizationsResponse", +}) as any as S.Schema; + +export type GetOembedRequestFormat = "json"; +export const GetOembedRequestFormat = /*@__PURE__*/ S.String; + +export interface GetOembedRequest { + url: string; + /** The format param is not used by the API, but is required as part of the oEmbed spec: http://oembed.com/#section2 just return an error if `format` is specified and it's anything other than `json`. */ + format?: GetOembedRequestFormat | (string & {}); + maxheight?: number; + maxwidth?: number; +} +export const GetOembedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + url: S.String.pipe(T.Query()), + format: S.optional(GetOembedRequestFormat.pipe(T.Query())), + maxheight: S.optional(S.Number.pipe(T.Query())), + maxwidth: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/public/oembed", code: 200 })), +).annotate({ + identifier: "GetOembedRequest", +}) as any as S.Schema; + +export interface GetOembedResponse {} +export const GetOembedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetOembedResponse", +}) as any as S.Schema; + +export interface GetOsiAiContextRequest {} +export const GetOsiAiContextRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/osi/ai-context", code: 200 }), + ), +).annotate({ + identifier: "GetOsiAiContextRequest", +}) as any as S.Schema; + +export interface GetOsiAiContextResponse {} +export const GetOsiAiContextResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetOsiAiContextResponse", +}) as any as S.Schema; + +export interface GetOsiAiContextByEntityLocalIdRequest { + entity_type: string; + /** value must be an integer greater than zero. */ + entity_local_id: number; +} +export const GetOsiAiContextByEntityLocalIdRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + entity_type: S.String.pipe(T.Label()), + entity_local_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/osi/ai-context/{entity_type}/{entity_local_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetOsiAiContextByEntityLocalIdRequest", +}) as any as S.Schema; + +export interface GetOsiAiContextByEntityLocalIdResponse {} +export const GetOsiAiContextByEntityLocalIdResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetOsiAiContextByEntityLocalIdResponse", +}) as any as S.Schema; + +export interface GetPermissionsGraphRequest {} +export const GetPermissionsGraphRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/permissions/graph", code: 200 }), + ), +).annotate({ + identifier: "GetPermissionsGraphRequest", +}) as any as S.Schema; + +export interface GetPermissionsGraphResponse {} +export const GetPermissionsGraphResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsGraphResponse", +}) as any as S.Schema; + +export interface GetPermissionsGraphDbRequest { + /** value must be an integer greater than zero. */ + db_id: number; +} +export const GetPermissionsGraphDbRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + db_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/permissions/graph/db/{db_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPermissionsGraphDbRequest", +}) as any as S.Schema; + +export interface GetPermissionsGraphDbResponse {} +export const GetPermissionsGraphDbResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsGraphDbResponse", +}) as any as S.Schema; + +export interface GetPermissionsGraphGroupRequest { + /** value must be an integer greater than zero. */ + group_id: number; +} +export const GetPermissionsGraphGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/permissions/graph/group/{group_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPermissionsGraphGroupRequest", +}) as any as S.Schema; + +export interface GetPermissionsGraphGroupResponse {} +export const GetPermissionsGraphGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsGraphGroupResponse", +}) as any as S.Schema; + +export type GetPermissionsGroupRequestTenancy = "external" | "internal"; +export const GetPermissionsGroupRequestTenancy = /*@__PURE__*/ S.String; + +export interface GetPermissionsGroupRequest { + tenancy?: GetPermissionsGroupRequestTenancy | (string & {}); +} +export const GetPermissionsGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + tenancy: S.optional(GetPermissionsGroupRequestTenancy.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/permissions/group", code: 200 })), +).annotate({ + identifier: "GetPermissionsGroupRequest", +}) as any as S.Schema; + +export interface GetPermissionsGroupResponse {} +export const GetPermissionsGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsGroupResponse", +}) as any as S.Schema; + +export interface GetPermissionsGroupByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetPermissionsGroupByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/permissions/group/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetPermissionsGroupByIdRequest", +}) as any as S.Schema; + +export interface GetPermissionsGroupByIdResponse {} +export const GetPermissionsGroupByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsGroupByIdResponse", +}) as any as S.Schema; + +export interface GetPermissionsMembershipRequest {} +export const GetPermissionsMembershipRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/permissions/membership", code: 200 }), + ), +).annotate({ + identifier: "GetPermissionsMembershipRequest", +}) as any as S.Schema; + +export interface GetPermissionsMembershipResponse {} +export const GetPermissionsMembershipResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPermissionsMembershipResponse", +}) as any as S.Schema; + +export interface GetPersistRequest {} +export const GetPersistRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/persist", code: 200 })), +).annotate({ + identifier: "GetPersistRequest", +}) as any as S.Schema; + +export interface GetPersistResponse {} +export const GetPersistResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPersistResponse", +}) as any as S.Schema; + +export interface GetPersistByPersistedInfoIdRequest { + /** value must be an integer greater than zero. */ + persisted_info_id: number; +} +export const GetPersistByPersistedInfoIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + persisted_info_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/persist/{persisted_info_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPersistByPersistedInfoIdRequest", +}) as any as S.Schema; + +export interface GetPersistByPersistedInfoIdResponse {} +export const GetPersistByPersistedInfoIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPersistByPersistedInfoIdResponse", +}) as any as S.Schema; + +export interface GetPersistCardRequest { + /** value must be an integer greater than zero. */ + card_id: number; +} +export const GetPersistCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/persist/card/{card_id}", code: 200 }), + ), +).annotate({ + identifier: "GetPersistCardRequest", +}) as any as S.Schema; + +export interface GetPersistCardResponse {} +export const GetPersistCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPersistCardResponse", +}) as any as S.Schema; + +export interface GetPivotCardQueryRequest { + /** value must be a valid UUID. */ + uuid: string; + parameters?: MetabaseParametersSchemaParameterValues; + ignore_cache?: boolean; +} +export const GetPivotCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + ignore_cache: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/pivot/card/{uuid}/query", + code: 200, + }), + ), +).annotate({ + identifier: "GetPivotCardQueryRequest", +}) as any as S.Schema; + +export interface GetPivotCardQueryResponse {} +export const GetPivotCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPivotCardQueryResponse", +}) as any as S.Schema; + +export interface GetPivotDashboardDashcardCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + parameters?: MetabaseParametersSchemaParameterValues; + ignore_cache?: boolean; +} +export const GetPivotDashboardDashcardCardRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + ignore_cache: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/pivot/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPivotDashboardDashcardCardRequest", +}) as any as S.Schema; + +export interface GetPivotDashboardDashcardCardResponse {} +export const GetPivotDashboardDashcardCardResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetPivotDashboardDashcardCardResponse", +}) as any as S.Schema; + +export interface GetPremiumFeaturesTokenStatusRequest {} +export const GetPremiumFeaturesTokenStatusRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/premium-features/token/status", + code: 200, + }), + ), +).annotate({ + identifier: "GetPremiumFeaturesTokenStatusRequest", +}) as any as S.Schema; + +export interface GetPremiumFeaturesTokenStatusResponse {} +export const GetPremiumFeaturesTokenStatusResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetPremiumFeaturesTokenStatusResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardRequest { + token: string; +} +export const GetPreviewEmbedCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/card/{token}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedCardRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardResponse {} +export const GetPreviewEmbedCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedCardResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardParamRemappingRequest { + token: string; + param_key: string; + value: string; +} +export const GetPreviewEmbedCardParamRemappingRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + value: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/card/{token}/params/{param_key}/remapping", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedCardParamRemappingRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardParamRemappingResponse {} +export const GetPreviewEmbedCardParamRemappingResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedCardParamRemappingResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedCardParamValuesRequest { + token: string; + param_key: string; +} +export const GetPreviewEmbedCardParamValuesRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/card/{token}/params/{param_key}/values", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedCardParamValuesRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardParamValuesResponse {} +export const GetPreviewEmbedCardParamValuesResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedCardParamValuesResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardQueryRequest { + token: string; +} +export const GetPreviewEmbedCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/card/{token}/query", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedCardQueryRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedCardQueryResponse {} +export const GetPreviewEmbedCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedCardQueryResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedDashboardRequest { + token: string; +} +export const GetPreviewEmbedDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/dashboard/{token}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedDashboardRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedDashboardResponse {} +export const GetPreviewEmbedDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedDashboardResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; +} +export const GetPreviewEmbedDashboardDashcardCardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedDashboardDashcardCardRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardDashcardCardResponse {} +export const GetPreviewEmbedDashboardDashcardCardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedDashboardDashcardCardResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamRemappingRequest { + token: string; + param_key: string; +} +export const GetPreviewEmbedDashboardParamRemappingRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/dashboard/{token}/params/{param_key}/remapping", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedDashboardParamRemappingRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamRemappingResponse {} +export const GetPreviewEmbedDashboardParamRemappingResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedDashboardParamRemappingResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamSearchRequest { + token: string; + param_key: string; + prefix: string; +} +export const GetPreviewEmbedDashboardParamSearchRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + prefix: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/dashboard/{token}/params/{param_key}/search/{prefix}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedDashboardParamSearchRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamSearchResponse {} +export const GetPreviewEmbedDashboardParamSearchResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedDashboardParamSearchResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamValuesRequest { + token: string; + param_key: string; +} +export const GetPreviewEmbedDashboardParamValuesRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + param_key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/dashboard/{token}/params/{param_key}/values", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedDashboardParamValuesRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedDashboardParamValuesResponse {} +export const GetPreviewEmbedDashboardParamValuesResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedDashboardParamValuesResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedPivotCardQueryRequest { + token: string; +} +export const GetPreviewEmbedPivotCardQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/pivot/card/{token}/query", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedPivotCardQueryRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedPivotCardQueryResponse {} +export const GetPreviewEmbedPivotCardQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedPivotCardQueryResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedPivotDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; +} +export const GetPreviewEmbedPivotDashboardDashcardCardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedPivotDashboardDashcardCardRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedPivotDashboardDashcardCardResponse {} +export const GetPreviewEmbedPivotDashboardDashcardCardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedPivotDashboardDashcardCardResponse", + }) as any as S.Schema; + +export interface GetPreviewEmbedTilesCardRequest { + token: string; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetPreviewEmbedTilesCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/tiles/card/{token}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ + identifier: "GetPreviewEmbedTilesCardRequest", +}) as any as S.Schema; + +export interface GetPreviewEmbedTilesCardResponse {} +export const GetPreviewEmbedTilesCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPreviewEmbedTilesCardResponse", +}) as any as S.Schema; + +export interface GetPreviewEmbedTilesDashboardDashcardCardRequest { + token: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetPreviewEmbedTilesDashboardDashcardCardRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + token: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/preview_embed/tiles/dashboard/{token}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + code: 200, + }), + ), + ).annotate({ + identifier: "GetPreviewEmbedTilesDashboardDashcardCardRequest", + }) as any as S.Schema; + +export interface GetPreviewEmbedTilesDashboardDashcardCardResponse {} +export const GetPreviewEmbedTilesDashboardDashcardCardResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetPreviewEmbedTilesDashboardDashcardCardResponse", + }) as any as S.Schema; + +export interface GetPulseRequest { + archived?: boolean; + dashboard_id?: number; + creator_or_recipient?: boolean; +} +export const GetPulseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + archived: S.optional(S.Boolean.pipe(T.Query())), + dashboard_id: S.optional(S.Number.pipe(T.Query())), + creator_or_recipient: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/pulse", code: 200 })), +).annotate({ + identifier: "GetPulseRequest", +}) as any as S.Schema; + +export interface GetPulseResponse {} +export const GetPulseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPulseResponse", +}) as any as S.Schema; + +export interface GetPulseByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetPulseByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/pulse/{id}", code: 200 })), +).annotate({ + identifier: "GetPulseByIdRequest", +}) as any as S.Schema; + +export interface GetPulseByIdResponse {} +export const GetPulseByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPulseByIdResponse", +}) as any as S.Schema; + +export interface GetPulseFormInputRequest {} +export const GetPulseFormInputRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/pulse/form_input", code: 200 }), + ), +).annotate({ + identifier: "GetPulseFormInputRequest", +}) as any as S.Schema; + +export interface GetPulseFormInputResponse {} +export const GetPulseFormInputResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetPulseFormInputResponse", +}) as any as S.Schema; + +export type GetRevisionRequestEntity = + | "card" + | "dashboard" + | "document" + | "measure" + | "segment" + | "transform"; +export const GetRevisionRequestEntity = /*@__PURE__*/ S.String; + +export interface GetRevisionRequest { + /** value must be an integer greater than zero. */ + id: number; + entity: GetRevisionRequestEntity | (string & {}); +} +export const GetRevisionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Query()), + entity: GetRevisionRequestEntity.pipe(T.Query()), + }).pipe(T.Http({ method: "GET", uri: "/api/revision", code: 200 })), +).annotate({ + identifier: "GetRevisionRequest", +}) as any as S.Schema; + +export interface GetRevisionResponse {} +export const GetRevisionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetRevisionResponse", +}) as any as S.Schema; + +export type GetRevisionByIdRequestEntity = + | "card" + | "dashboard" + | "document" + | "measure" + | "segment" + | "transform"; +export const GetRevisionByIdRequestEntity = /*@__PURE__*/ S.String; + +export interface GetRevisionByIdRequest { + entity: GetRevisionByIdRequestEntity | (string & {}); + /** value must be an integer greater than zero. */ + id: number; +} +export const GetRevisionByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity: GetRevisionByIdRequestEntity.pipe(T.Label()), + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/revision/{entity}/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetRevisionByIdRequest", +}) as any as S.Schema; + +export interface GetRevisionByIdResponse {} +export const GetRevisionByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetRevisionByIdResponse", +}) as any as S.Schema; + +export type GetSearchRequestContext = + | "basic-actions" + | "browse" + | "command-palette" + | "data-picker" + | "dependencies" + | "document" + | "embedding-setup" + | "entity-picker" + | "library" + | "model-migration" + | "search-app" + | "search-bar" + | "type-filter" + | "api" + | "metabot"; +export const GetSearchRequestContext = /*@__PURE__*/ S.String; + +export type GetSearchRequestModelsItem = + | "dashboard" + | "table" + | "dataset" + | "segment" + | "collection" + | "measure" + | "transform" + | "document" + | "database" + | "action" + | "indexed-entity" + | "metric" + | "card"; +export const GetSearchRequestModelsItem = /*@__PURE__*/ S.String; + +export type GetSearchRequestModelsList = Array< + GetSearchRequestModelsItem | (string & {}) +>; +export const GetSearchRequestModelsList = /*@__PURE__*/ S.Array( + GetSearchRequestModelsItem, +) as any as S.Schema; + +export type GetSearchRequestFilterItemsInPersonalCollection = + | "all" + | "only" + | "only-mine" + | "exclude" + | "exclude-others"; +export const GetSearchRequestFilterItemsInPersonalCollection = + /*@__PURE__*/ S.String; + +export type GetSearchRequestCreatedByList = Array; +export const GetSearchRequestCreatedByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetSearchRequestDisplayTypeList = Array; +export const GetSearchRequestDisplayTypeList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetSearchRequestLastEditedByList = Array; +export const GetSearchRequestLastEditedByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetSearchRequestVectorSearchStrategy = + | "hnsw" + | "brute-force" + | "hnsw-iterative-relaxed" + | "hnsw-iterative-strict"; +export const GetSearchRequestVectorSearchStrategy = /*@__PURE__*/ S.String; + +export type GetSearchRequestIdsList = Array; +export const GetSearchRequestIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface GetSearchRequest { + q?: string; + context?: GetSearchRequestContext | (string & {}); + archived?: boolean; + collection?: number; + table_db_id?: number; + models?: GetSearchRequestModelsList; + filter_items_in_personal_collection?: + | GetSearchRequestFilterItemsInPersonalCollection + | (string & {}); + created_at?: string; + created_by?: GetSearchRequestCreatedByList; + display_type?: GetSearchRequestDisplayTypeList; + last_edited_at?: string; + last_edited_by?: GetSearchRequestLastEditedByList; + model_ancestors?: boolean; + search_engine?: string; + vector_search_strategy?: GetSearchRequestVectorSearchStrategy | (string & {}); + vector_search_ef_search?: number; + vector_search_max_scan_tuples?: number; + vector_search_explain?: boolean; + search_native_query?: boolean; + verified?: boolean; + ids?: GetSearchRequestIdsList; + calculate_available_models?: boolean; + include_dashboard_questions?: boolean; + include_metadata?: boolean; +} +export const GetSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + q: S.optional(S.String.pipe(T.Query())), + context: S.optional(GetSearchRequestContext.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + collection: S.optional(S.Number.pipe(T.Query())), + table_db_id: S.optional(S.Number.pipe(T.Query())), + models: S.optional(GetSearchRequestModelsList.pipe(T.Query())), + filter_items_in_personal_collection: S.optional( + GetSearchRequestFilterItemsInPersonalCollection.pipe(T.Query()), + ), + created_at: S.optional(S.String.pipe(T.Query())), + created_by: S.optional(GetSearchRequestCreatedByList.pipe(T.Query())), + display_type: S.optional(GetSearchRequestDisplayTypeList.pipe(T.Query())), + last_edited_at: S.optional(S.String.pipe(T.Query())), + last_edited_by: S.optional( + GetSearchRequestLastEditedByList.pipe(T.Query()), + ), + model_ancestors: S.optional(S.Boolean.pipe(T.Query())), + search_engine: S.optional(S.String.pipe(T.Query())), + vector_search_strategy: S.optional( + GetSearchRequestVectorSearchStrategy.pipe(T.Query()), + ), + vector_search_ef_search: S.optional(S.Number.pipe(T.Query())), + vector_search_max_scan_tuples: S.optional(S.Number.pipe(T.Query())), + vector_search_explain: S.optional(S.Boolean.pipe(T.Query())), + search_native_query: S.optional(S.Boolean.pipe(T.Query())), + verified: S.optional(S.Boolean.pipe(T.Query())), + ids: S.optional(GetSearchRequestIdsList.pipe(T.Query())), + calculate_available_models: S.optional(S.Boolean.pipe(T.Query())), + include_dashboard_questions: S.optional(S.Boolean.pipe(T.Query())), + include_metadata: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/search", code: 200 })), +).annotate({ + identifier: "GetSearchRequest", +}) as any as S.Schema; + +export interface GetSearchResponse {} +export const GetSearchResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSearchResponse", +}) as any as S.Schema; + +export type GetSearchDebugRequestContext = + | "basic-actions" + | "browse" + | "command-palette" + | "data-picker" + | "dependencies" + | "document" + | "embedding-setup" + | "entity-picker" + | "library" + | "model-migration" + | "search-app" + | "search-bar" + | "type-filter" + | "api" + | "metabot"; +export const GetSearchDebugRequestContext = /*@__PURE__*/ S.String; + +export type GetSearchDebugRequestModelsItem = + | "dashboard" + | "table" + | "dataset" + | "segment" + | "collection" + | "measure" + | "transform" + | "document" + | "database" + | "action" + | "indexed-entity" + | "metric" + | "card"; +export const GetSearchDebugRequestModelsItem = /*@__PURE__*/ S.String; + +export type GetSearchDebugRequestModelsList = Array< + GetSearchDebugRequestModelsItem | (string & {}) +>; +export const GetSearchDebugRequestModelsList = /*@__PURE__*/ S.Array( + GetSearchDebugRequestModelsItem, +) as any as S.Schema; + +export type GetSearchDebugRequestFilterItemsInPersonalCollection = + | "all" + | "only" + | "only-mine" + | "exclude" + | "exclude-others"; +export const GetSearchDebugRequestFilterItemsInPersonalCollection = + /*@__PURE__*/ S.String; + +export type GetSearchDebugRequestCreatedByList = Array; +export const GetSearchDebugRequestCreatedByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetSearchDebugRequestDisplayTypeList = Array; +export const GetSearchDebugRequestDisplayTypeList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export type GetSearchDebugRequestLastEditedByList = Array; +export const GetSearchDebugRequestLastEditedByList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetSearchDebugRequestVectorSearchStrategy = + | "hnsw" + | "brute-force" + | "hnsw-iterative-relaxed" + | "hnsw-iterative-strict"; +export const GetSearchDebugRequestVectorSearchStrategy = /*@__PURE__*/ S.String; + +export type GetSearchDebugRequestIdsList = Array; +export const GetSearchDebugRequestIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetSearchDebugRequestExpectedResultType = + | "dashboard" + | "table" + | "dataset" + | "segment" + | "collection" + | "measure" + | "transform" + | "document" + | "database" + | "action" + | "indexed-entity" + | "metric" + | "card"; +export const GetSearchDebugRequestExpectedResultType = /*@__PURE__*/ S.String; + +export interface GetSearchDebugRequest { + q?: string; + context?: GetSearchDebugRequestContext | (string & {}); + archived?: boolean; + collection?: number; + table_db_id?: number; + models?: GetSearchDebugRequestModelsList; + filter_items_in_personal_collection?: + | GetSearchDebugRequestFilterItemsInPersonalCollection + | (string & {}); + created_at?: string; + created_by?: GetSearchDebugRequestCreatedByList; + display_type?: GetSearchDebugRequestDisplayTypeList; + last_edited_at?: string; + last_edited_by?: GetSearchDebugRequestLastEditedByList; + model_ancestors?: boolean; + search_engine?: string; + vector_search_strategy?: + | GetSearchDebugRequestVectorSearchStrategy + | (string & {}); + vector_search_ef_search?: number; + vector_search_max_scan_tuples?: number; + vector_search_explain?: boolean; + search_native_query?: boolean; + verified?: boolean; + ids?: GetSearchDebugRequestIdsList; + calculate_available_models?: boolean; + include_dashboard_questions?: boolean; + include_metadata?: boolean; + expected_result_type: GetSearchDebugRequestExpectedResultType | (string & {}); + /** value must be an integer greater than zero. */ + expected_result_id: number; + for_user_id?: number; +} +export const GetSearchDebugRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + q: S.optional(S.String.pipe(T.Query())), + context: S.optional(GetSearchDebugRequestContext.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + collection: S.optional(S.Number.pipe(T.Query())), + table_db_id: S.optional(S.Number.pipe(T.Query())), + models: S.optional(GetSearchDebugRequestModelsList.pipe(T.Query())), + filter_items_in_personal_collection: S.optional( + GetSearchDebugRequestFilterItemsInPersonalCollection.pipe(T.Query()), + ), + created_at: S.optional(S.String.pipe(T.Query())), + created_by: S.optional(GetSearchDebugRequestCreatedByList.pipe(T.Query())), + display_type: S.optional( + GetSearchDebugRequestDisplayTypeList.pipe(T.Query()), + ), + last_edited_at: S.optional(S.String.pipe(T.Query())), + last_edited_by: S.optional( + GetSearchDebugRequestLastEditedByList.pipe(T.Query()), + ), + model_ancestors: S.optional(S.Boolean.pipe(T.Query())), + search_engine: S.optional(S.String.pipe(T.Query())), + vector_search_strategy: S.optional( + GetSearchDebugRequestVectorSearchStrategy.pipe(T.Query()), + ), + vector_search_ef_search: S.optional(S.Number.pipe(T.Query())), + vector_search_max_scan_tuples: S.optional(S.Number.pipe(T.Query())), + vector_search_explain: S.optional(S.Boolean.pipe(T.Query())), + search_native_query: S.optional(S.Boolean.pipe(T.Query())), + verified: S.optional(S.Boolean.pipe(T.Query())), + ids: S.optional(GetSearchDebugRequestIdsList.pipe(T.Query())), + calculate_available_models: S.optional(S.Boolean.pipe(T.Query())), + include_dashboard_questions: S.optional(S.Boolean.pipe(T.Query())), + include_metadata: S.optional(S.Boolean.pipe(T.Query())), + expected_result_type: GetSearchDebugRequestExpectedResultType.pipe( + T.Query(), + ), + expected_result_id: S.Number.pipe(T.Query()), + for_user_id: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/search/debug", code: 200 })), +).annotate({ + identifier: "GetSearchDebugRequest", +}) as any as S.Schema; + +export interface GetSearchDebugResponse {} +export const GetSearchDebugResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSearchDebugResponse", +}) as any as S.Schema; + +export interface GetSearchWeightsRequest { + context?: string; +} +export const GetSearchWeightsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/search/weights", code: 200 })), +).annotate({ + identifier: "GetSearchWeightsRequest", +}) as any as S.Schema; + +export interface GetSearchWeightsResponse {} +export const GetSearchWeightsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSearchWeightsResponse", +}) as any as S.Schema; + +export interface GetSegmentRequest {} +export const GetSegmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/segment", code: 200 })), +).annotate({ + identifier: "GetSegmentRequest", +}) as any as S.Schema; + +export interface GetSegmentResponse {} +export const GetSegmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSegmentResponse", +}) as any as S.Schema; + +export interface GetSegmentByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetSegmentByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/segment/{id}", code: 200 })), +).annotate({ + identifier: "GetSegmentByIdRequest", +}) as any as S.Schema; + +export interface GetSegmentByIdResponse {} +export const GetSegmentByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSegmentByIdResponse", +}) as any as S.Schema; + +export interface GetSegmentRelatedRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetSegmentRelatedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/segment/{id}/related", code: 200 }), + ), +).annotate({ + identifier: "GetSegmentRelatedRequest", +}) as any as S.Schema; + +export interface GetSegmentRelatedResponse {} +export const GetSegmentRelatedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSegmentRelatedResponse", +}) as any as S.Schema; + +export interface GetSessionPasswordResetTokenValidRequest { + token: string; +} +export const GetSessionPasswordResetTokenValidRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + token: S.String.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/session/password_reset_token_valid", + code: 200, + }), + ), +).annotate({ + identifier: "GetSessionPasswordResetTokenValidRequest", +}) as any as S.Schema; + +export interface GetSessionPasswordResetTokenValidResponse {} +export const GetSessionPasswordResetTokenValidResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "GetSessionPasswordResetTokenValidResponse", + }) as any as S.Schema; + +export interface GetSessionPropertiesRequest {} +export const GetSessionPropertiesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/session/properties", code: 200 }), + ), +).annotate({ + identifier: "GetSessionPropertiesRequest", +}) as any as S.Schema; + +export interface GetSessionPropertiesResponse {} +export const GetSessionPropertiesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSessionPropertiesResponse", +}) as any as S.Schema; + +export interface GetSettingRequest {} +export const GetSettingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/setting", code: 200 })), +).annotate({ + identifier: "GetSettingRequest", +}) as any as S.Schema; + +export interface GetSettingResponse {} +export const GetSettingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSettingResponse", +}) as any as S.Schema; + +export interface GetSettingByKeyRequest { + key: string; +} +export const GetSettingByKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/setting/{key}", code: 200 })), +).annotate({ + identifier: "GetSettingByKeyRequest", +}) as any as S.Schema; + +export interface GetSettingByKeyResponse {} +export const GetSettingByKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSettingByKeyResponse", +}) as any as S.Schema; + +export interface GetSlackAppInfoRequest {} +export const GetSlackAppInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/slack/app-info", code: 200 }), + ), +).annotate({ + identifier: "GetSlackAppInfoRequest", +}) as any as S.Schema; + +export interface GetSlackAppInfoResponse {} +export const GetSlackAppInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSlackAppInfoResponse", +}) as any as S.Schema; + +export interface GetSlackManifestRequest {} +export const GetSlackManifestRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/slack/manifest", code: 200 }), + ), +).annotate({ + identifier: "GetSlackManifestRequest", +}) as any as S.Schema; + +export interface GetSlackManifestResponse {} +export const GetSlackManifestResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetSlackManifestResponse", +}) as any as S.Schema; + +export type MetabaseWarehouseSchemaRestApiTableDataLayers = + | "final" + | "internal" + | "hidden"; +export const MetabaseWarehouseSchemaRestApiTableDataLayers = + /*@__PURE__*/ S.String; + +export type MetabaseWarehouseSchemaRestApiTableDataSources = + | "source-data" + | "transform" + | "unknown" + | "ingested" + | "metabase-transform" + | "upload"; +export const MetabaseWarehouseSchemaRestApiTableDataSources = + /*@__PURE__*/ S.String; + +export interface GetTableRequest { + term?: string; + visibility_type?: string; + data_layer?: MetabaseWarehouseSchemaRestApiTableDataLayers | (string & {}); + data_source?: MetabaseWarehouseSchemaRestApiTableDataSources | (string & {}); + owner_user_id?: number; + owner_email?: string; + orphan_only?: boolean; + unused_only?: boolean; + published_only?: boolean; + can_query?: boolean; + can_write?: boolean; + include_transform_targets?: boolean; +} +export const GetTableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + term: S.optional(S.String.pipe(T.Query())), + visibility_type: S.optional(S.String.pipe(T.Query("visibility-type"))), + data_layer: S.optional( + MetabaseWarehouseSchemaRestApiTableDataLayers.pipe(T.Query("data-layer")), + ), + data_source: S.optional( + MetabaseWarehouseSchemaRestApiTableDataSources.pipe( + T.Query("data-source"), + ), + ), + owner_user_id: S.optional(S.Number.pipe(T.Query("owner-user-id"))), + owner_email: S.optional(S.String.pipe(T.Query("owner-email"))), + orphan_only: S.optional(S.Boolean.pipe(T.Query("orphan-only"))), + unused_only: S.optional(S.Boolean.pipe(T.Query("unused-only"))), + published_only: S.optional(S.Boolean.pipe(T.Query("published-only"))), + can_query: S.optional(S.Boolean.pipe(T.Query("can-query"))), + can_write: S.optional(S.Boolean.pipe(T.Query("can-write"))), + include_transform_targets: S.optional( + S.Boolean.pipe(T.Query("include-transform-targets")), + ), + }).pipe(T.Http({ method: "GET", uri: "/api/table", code: 200 })), +).annotate({ + identifier: "GetTableRequest", +}) as any as S.Schema; + +export interface GetTableResponse {} +export const GetTableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableResponse", +}) as any as S.Schema; + +export interface GetTableByIdRequest { + /** value must be an integer greater than zero. */ + id: number; + include_editable_data_model?: boolean; +} +export const GetTableByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/table/{id}", code: 200 })), +).annotate({ + identifier: "GetTableByIdRequest", +}) as any as S.Schema; + +export interface GetTableByIdResponse {} +export const GetTableByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableByIdResponse", +}) as any as S.Schema; + +export interface GetTableCardIdFksRequest {} +export const GetTableCardIdFksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/table/card__:id/fks", code: 200 }), + ), +).annotate({ + identifier: "GetTableCardIdFksRequest", +}) as any as S.Schema; + +export interface GetTableCardIdFksResponse {} +export const GetTableCardIdFksResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableCardIdFksResponse", +}) as any as S.Schema; + +export interface GetTableCardIdQueryMetadataRequest {} +export const GetTableCardIdQueryMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ + method: "GET", + uri: "/api/table/card__:id/query_metadata", + code: 200, + }), + ), +).annotate({ + identifier: "GetTableCardIdQueryMetadataRequest", +}) as any as S.Schema; + +export interface GetTableCardIdQueryMetadataResponse {} +export const GetTableCardIdQueryMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableCardIdQueryMetadataResponse", +}) as any as S.Schema; + +export interface GetTableDataRequest { + /** value must be an integer greater than zero. */ + table_id: number; +} +export const GetTableDataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + table_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/table/{table_id}/data", code: 200 }), + ), +).annotate({ + identifier: "GetTableDataRequest", +}) as any as S.Schema; + +export interface GetTableDataResponse {} +export const GetTableDataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableDataResponse", +}) as any as S.Schema; + +export interface GetTableFksRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTableFksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/table/{id}/fks", code: 200 })), +).annotate({ + identifier: "GetTableFksRequest", +}) as any as S.Schema; + +export interface GetTableFksResponse {} +export const GetTableFksResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableFksResponse", +}) as any as S.Schema; + +export interface GetTableQueryMetadataRequest { + /** value must be an integer greater than zero. */ + id: number; + include_sensitive_fields?: boolean; + include_hidden_fields?: boolean; + include_editable_data_model?: boolean; +} +export const GetTableQueryMetadataRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include_sensitive_fields: S.optional(S.Boolean.pipe(T.Query())), + include_hidden_fields: S.optional(S.Boolean.pipe(T.Query())), + include_editable_data_model: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/table/{id}/query_metadata", code: 200 }), + ), +).annotate({ + identifier: "GetTableQueryMetadataRequest", +}) as any as S.Schema; + +export interface GetTableQueryMetadataResponse {} +export const GetTableQueryMetadataResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableQueryMetadataResponse", +}) as any as S.Schema; + +export interface GetTableRelatedRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTableRelatedRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/table/{id}/related", code: 200 })), +).annotate({ + identifier: "GetTableRelatedRequest", +}) as any as S.Schema; + +export interface GetTableRelatedResponse {} +export const GetTableRelatedResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTableRelatedResponse", +}) as any as S.Schema; + +export interface GetTaskRequest {} +export const GetTaskRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/task", code: 200 })), +).annotate({ identifier: "GetTaskRequest" }) as any as S.Schema; + +export interface GetTaskResponse {} +export const GetTaskResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskResponse", +}) as any as S.Schema; + +export interface GetTaskByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTaskByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/task/{id}", code: 200 })), +).annotate({ + identifier: "GetTaskByIdRequest", +}) as any as S.Schema; + +export interface GetTaskByIdResponse {} +export const GetTaskByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskByIdResponse", +}) as any as S.Schema; + +export interface GetTaskInfoRequest {} +export const GetTaskInfoRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/task/info", code: 200 }), + ), +).annotate({ + identifier: "GetTaskInfoRequest", +}) as any as S.Schema; + +export interface GetTaskInfoResponse {} +export const GetTaskInfoResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskInfoResponse", +}) as any as S.Schema; + +export interface GetTaskRunRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTaskRunRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/task/runs/{id}", code: 200 })), +).annotate({ + identifier: "GetTaskRunRequest", +}) as any as S.Schema; + +export interface GetTaskRunResponse {} +export const GetTaskRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskRunResponse", +}) as any as S.Schema; + +export interface GetTaskRunsRequest {} +export const GetTaskRunsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/task/runs", code: 200 }), + ), +).annotate({ + identifier: "GetTaskRunsRequest", +}) as any as S.Schema; + +export interface GetTaskRunsResponse {} +export const GetTaskRunsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskRunsResponse", +}) as any as S.Schema; + +export type GetTaskRunsEntitiesRequestRunType = + | "alert" + | "sync" + | "fingerprint" + | "subscription"; +export const GetTaskRunsEntitiesRequestRunType = /*@__PURE__*/ S.String; + +export interface GetTaskRunsEntitiesRequest { + run_type: GetTaskRunsEntitiesRequestRunType | (string & {}); + started_at: string; +} +export const GetTaskRunsEntitiesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + run_type: GetTaskRunsEntitiesRequestRunType.pipe(T.Query("run-type")), + started_at: S.String.pipe(T.Query("started-at")), + }).pipe(T.Http({ method: "GET", uri: "/api/task/runs/entities", code: 200 })), +).annotate({ + identifier: "GetTaskRunsEntitiesRequest", +}) as any as S.Schema; + +export interface GetTaskRunsEntitiesResponse {} +export const GetTaskRunsEntitiesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskRunsEntitiesResponse", +}) as any as S.Schema; + +export interface GetTaskUniqueTasksRequest {} +export const GetTaskUniqueTasksRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/task/unique-tasks", code: 200 }), + ), +).annotate({ + identifier: "GetTaskUniqueTasksRequest", +}) as any as S.Schema; + +export interface GetTaskUniqueTasksResponse {} +export const GetTaskUniqueTasksResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTaskUniqueTasksResponse", +}) as any as S.Schema; + +export interface GetTileRequest { + card_id: number; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetTileRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/tiles/{card_id}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ identifier: "GetTileRequest" }) as any as S.Schema; + +export interface GetTileResponse {} +export const GetTileResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTileResponse", +}) as any as S.Schema; + +export interface GetTileByYRequest { + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + query: MetabaseLibSchemaQuery; + latField: unknown; + lonField: unknown; +} +export const GetTileByYRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + query: MetabaseLibSchemaQuery.pipe(T.Query()), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ method: "GET", uri: "/api/tiles/{zoom}/{x}/{y}", code: 200 }), + ), +).annotate({ + identifier: "GetTileByYRequest", +}) as any as S.Schema; + +export interface GetTileByYResponse {} +export const GetTileByYResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTileByYResponse", +}) as any as S.Schema; + +export interface GetTileDashcardCardRequest { + dashboard_id: number; + dashcard_id: number; + card_id: number; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetTileDashcardCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/tiles/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ + identifier: "GetTileDashcardCardRequest", +}) as any as S.Schema; + +export interface GetTileDashcardCardResponse {} +export const GetTileDashcardCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTileDashcardCardResponse", +}) as any as S.Schema; + +export interface GetTilesCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetTilesCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/tiles/card/{uuid}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ + identifier: "GetTilesCardRequest", +}) as any as S.Schema; + +export interface GetTilesCardResponse {} +export const GetTilesCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTilesCardResponse", +}) as any as S.Schema; + +export interface GetTilesDashboardDashcardCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + /** value must be an integer. */ + zoom: number; + /** value must be an integer. */ + x: number; + /** value must be an integer. */ + y: number; + parameters?: MetabaseParametersSchemaParameterValues; + latField: unknown; + lonField: unknown; +} +export const GetTilesDashboardDashcardCardRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + zoom: S.Number.pipe(T.Label()), + x: S.Number.pipe(T.Label()), + y: S.Number.pipe(T.Label()), + parameters: S.optional( + MetabaseParametersSchemaParameterValues.pipe(T.Query()), + ), + latField: S.Unknown.pipe(T.Query()), + lonField: S.Unknown.pipe(T.Query()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/public/tiles/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}/{zoom}/{x}/{y}", + code: 200, + }), + ), +).annotate({ + identifier: "GetTilesDashboardDashcardCardRequest", +}) as any as S.Schema; + +export interface GetTilesDashboardDashcardCardResponse {} +export const GetTilesDashboardDashcardCardResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetTilesDashboardDashcardCardResponse", +}) as any as S.Schema; + +export type MetabaseTimelineApiTimelineInclude = "events"; +export const MetabaseTimelineApiTimelineInclude = /*@__PURE__*/ S.String; + +export interface GetTimelineRequest { + include?: MetabaseTimelineApiTimelineInclude | (string & {}); + archived?: boolean; +} +export const GetTimelineRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include: S.optional(MetabaseTimelineApiTimelineInclude.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/timeline", code: 200 })), +).annotate({ + identifier: "GetTimelineRequest", +}) as any as S.Schema; + +export interface GetTimelineResponse {} +export const GetTimelineResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTimelineResponse", +}) as any as S.Schema; + +export interface GetTimelineByIdRequest { + /** value must be an integer greater than zero. */ + id: number; + include?: MetabaseTimelineApiTimelineInclude | (string & {}); + archived?: boolean; + /** value must be a valid date string */ + start?: string; + /** value must be a valid date string */ + end?: string; +} +export const GetTimelineByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include: S.optional(MetabaseTimelineApiTimelineInclude.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + start: S.optional(S.String.pipe(T.Query())), + end: S.optional(S.String.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/timeline/{id}", code: 200 })), +).annotate({ + identifier: "GetTimelineByIdRequest", +}) as any as S.Schema; + +export interface GetTimelineByIdResponse {} +export const GetTimelineByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTimelineByIdResponse", +}) as any as S.Schema; + +export interface GetTimelineCollectionRequest { + /** value must be an integer greater than zero. */ + id: number; + include?: unknown; + archived?: boolean; +} +export const GetTimelineCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + include: S.optional(S.Unknown.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/timeline/collection/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetTimelineCollectionRequest", +}) as any as S.Schema; + +export interface GetTimelineCollectionResponse {} +export const GetTimelineCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTimelineCollectionResponse", +}) as any as S.Schema; + +export interface GetTimelineCollectionRootRequest { + include?: unknown; + archived?: boolean; +} +export const GetTimelineCollectionRootRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + include: S.optional(S.Unknown.pipe(T.Query())), + archived: S.optional(S.Boolean.pipe(T.Query())), + }).pipe( + T.Http({ method: "GET", uri: "/api/timeline/collection/root", code: 200 }), + ), +).annotate({ + identifier: "GetTimelineCollectionRootRequest", +}) as any as S.Schema; + +export interface GetTimelineCollectionRootResponse {} +export const GetTimelineCollectionRootResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTimelineCollectionRootResponse", +}) as any as S.Schema; + +export interface GetTimelineEventRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTimelineEventRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/timeline-event/{id}", code: 200 }), + ), +).annotate({ + identifier: "GetTimelineEventRequest", +}) as any as S.Schema; + +export interface GetTimelineEventResponse {} +export const GetTimelineEventResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTimelineEventResponse", +}) as any as S.Schema; + +export type GetTransformRequestLastRunStatusesItem = + | "started" + | "succeeded" + | "failed" + | "timeout"; +export const GetTransformRequestLastRunStatusesItem = /*@__PURE__*/ S.String; + +export type GetTransformRequestLastRunStatusesList = Array< + GetTransformRequestLastRunStatusesItem | (string & {}) +>; +export const GetTransformRequestLastRunStatusesList = /*@__PURE__*/ S.Array( + GetTransformRequestLastRunStatusesItem, +) as any as S.Schema; + +export type GetTransformRequestTagIdsList = Array; +export const GetTransformRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface GetTransformRequest { + last_run_start_time?: string; + last_run_statuses?: GetTransformRequestLastRunStatusesList; + tag_ids?: GetTransformRequestTagIdsList; + database_id?: number; +} +export const GetTransformRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + last_run_start_time: S.optional( + S.String.pipe(T.Query("last-run-start-time")), + ), + last_run_statuses: S.optional( + GetTransformRequestLastRunStatusesList.pipe(T.Query("last-run-statuses")), + ), + tag_ids: S.optional(GetTransformRequestTagIdsList.pipe(T.Query("tag-ids"))), + database_id: S.optional(S.Number.pipe(T.Query("database-id"))), + }).pipe(T.Http({ method: "GET", uri: "/api/transform", code: 200 })), +).annotate({ + identifier: "GetTransformRequest", +}) as any as S.Schema; + +export interface GetTransformResponse {} +export const GetTransformResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformResponse", +}) as any as S.Schema; + +export interface GetTransformByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTransformByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/transform/{id}", code: 200 })), +).annotate({ + identifier: "GetTransformByIdRequest", +}) as any as S.Schema; + +export interface GetTransformByIdResponse {} +export const GetTransformByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformByIdResponse", +}) as any as S.Schema; + +export interface GetTransformDependenciesRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetTransformDependenciesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/transform/{id}/dependencies", + code: 200, + }), + ), +).annotate({ + identifier: "GetTransformDependenciesRequest", +}) as any as S.Schema; + +export interface GetTransformDependenciesResponse {} +export const GetTransformDependenciesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformDependenciesResponse", +}) as any as S.Schema; + +export type GetTransformJobRequestLastRunStatusesItem = + | "started" + | "succeeded" + | "failed" + | "timeout"; +export const GetTransformJobRequestLastRunStatusesItem = /*@__PURE__*/ S.String; + +export type GetTransformJobRequestLastRunStatusesList = Array< + GetTransformJobRequestLastRunStatusesItem | (string & {}) +>; +export const GetTransformJobRequestLastRunStatusesList = /*@__PURE__*/ S.Array( + GetTransformJobRequestLastRunStatusesItem, +) as any as S.Schema; + +export type GetTransformJobRequestTagIdsList = Array; +export const GetTransformJobRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface GetTransformJobRequest { + last_run_start_time?: string; + next_run_start_time?: string; + last_run_statuses?: GetTransformJobRequestLastRunStatusesList; + tag_ids?: GetTransformJobRequestTagIdsList; +} +export const GetTransformJobRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + last_run_start_time: S.optional( + S.String.pipe(T.Query("last-run-start-time")), + ), + next_run_start_time: S.optional( + S.String.pipe(T.Query("next-run-start-time")), + ), + last_run_statuses: S.optional( + GetTransformJobRequestLastRunStatusesList.pipe( + T.Query("last-run-statuses"), + ), + ), + tag_ids: S.optional( + GetTransformJobRequestTagIdsList.pipe(T.Query("tag-ids")), + ), + }).pipe(T.Http({ method: "GET", uri: "/api/transform-job", code: 200 })), +).annotate({ + identifier: "GetTransformJobRequest", +}) as any as S.Schema; + +export interface GetTransformJobResponse {} +export const GetTransformJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformJobResponse", +}) as any as S.Schema; + +export interface GetTransformJobByJobIdRequest { + /** value must be an integer greater than zero. */ + job_id: number; +} +export const GetTransformJobByJobIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/transform-job/{job_id}", code: 200 }), + ), +).annotate({ + identifier: "GetTransformJobByJobIdRequest", +}) as any as S.Schema; + +export interface GetTransformJobByJobIdResponse {} +export const GetTransformJobByJobIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformJobByJobIdResponse", +}) as any as S.Schema; + +export type GetTransformJobRunsRequestStatus = + | "started" + | "succeeded" + | "failed" + | "timeout"; +export const GetTransformJobRunsRequestStatus = /*@__PURE__*/ S.String; + +export type GetTransformJobRunsRequestRunMethod = "manual" | "cron"; +export const GetTransformJobRunsRequestRunMethod = /*@__PURE__*/ S.String; + +export type GetTransformJobRunsRequestSortColumn = "start_time" | "end_time"; +export const GetTransformJobRunsRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetTransformJobRunsRequestSortDirection = "asc" | "desc"; +export const GetTransformJobRunsRequestSortDirection = /*@__PURE__*/ S.String; + +export interface GetTransformJobRunsRequest { + /** value must be an integer greater than zero. */ + job_id: number; + status?: GetTransformJobRunsRequestStatus | (string & {}); + run_method?: GetTransformJobRunsRequestRunMethod | (string & {}); + start_time?: string; + sort_column?: GetTransformJobRunsRequestSortColumn | (string & {}); + sort_direction?: GetTransformJobRunsRequestSortDirection | (string & {}); +} +export const GetTransformJobRunsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + status: S.optional(GetTransformJobRunsRequestStatus.pipe(T.Query())), + run_method: S.optional( + GetTransformJobRunsRequestRunMethod.pipe(T.Query("run-method")), + ), + start_time: S.optional(S.String.pipe(T.Query("start-time"))), + sort_column: S.optional( + GetTransformJobRunsRequestSortColumn.pipe(T.Query("sort-column")), + ), + sort_direction: S.optional( + GetTransformJobRunsRequestSortDirection.pipe(T.Query("sort-direction")), + ), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/transform-job/{job_id}/runs", + code: 200, + }), + ), +).annotate({ + identifier: "GetTransformJobRunsRequest", +}) as any as S.Schema; + +export interface GetTransformJobRunsResponse {} +export const GetTransformJobRunsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformJobRunsResponse", +}) as any as S.Schema; + +export interface GetTransformJobRunTransformRunsRequest { + /** value must be an integer greater than zero. */ + job_id: number; + /** value must be an integer greater than zero. */ + run_id: number; +} +export const GetTransformJobRunTransformRunsRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + run_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/transform-job/{job_id}/runs/{run_id}/transform-runs", + code: 200, + }), + ), +).annotate({ + identifier: "GetTransformJobRunTransformRunsRequest", +}) as any as S.Schema; + +export interface GetTransformJobRunTransformRunsResponse {} +export const GetTransformJobRunTransformRunsResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "GetTransformJobRunTransformRunsResponse", +}) as any as S.Schema; + +export interface GetTransformJobTransformsRequest { + /** value must be an integer greater than zero. */ + job_id: number; +} +export const GetTransformJobTransformsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/transform-job/{job_id}/transforms", + code: 200, + }), + ), +).annotate({ + identifier: "GetTransformJobTransformsRequest", +}) as any as S.Schema; + +export interface GetTransformJobTransformsResponse {} +export const GetTransformJobTransformsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformJobTransformsResponse", +}) as any as S.Schema; + +export type GetTransformRunRequestSortColumn = + | "transform-name" + | "start-time" + | "end-time" + | "status" + | "run-method" + | "transform-tags" + | "duration"; +export const GetTransformRunRequestSortColumn = /*@__PURE__*/ S.String; + +export type GetTransformRunRequestSortDirection = "asc" | "desc"; +export const GetTransformRunRequestSortDirection = /*@__PURE__*/ S.String; + +export type GetTransformRunRequestTransformIdsList = Array; +export const GetTransformRunRequestTransformIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetTransformRunRequestStatusesItem = + | "started" + | "succeeded" + | "failed" + | "timeout"; +export const GetTransformRunRequestStatusesItem = /*@__PURE__*/ S.String; + +export type GetTransformRunRequestStatusesList = Array< + GetTransformRunRequestStatusesItem | (string & {}) +>; +export const GetTransformRunRequestStatusesList = /*@__PURE__*/ S.Array( + GetTransformRunRequestStatusesItem, +) as any as S.Schema; + +export type GetTransformRunRequestTransformTagIdsList = Array; +export const GetTransformRunRequestTransformTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type GetTransformRunRequestRunMethodsItem = "manual" | "cron"; +export const GetTransformRunRequestRunMethodsItem = /*@__PURE__*/ S.String; + +export type GetTransformRunRequestRunMethodsList = Array< + GetTransformRunRequestRunMethodsItem | (string & {}) +>; +export const GetTransformRunRequestRunMethodsList = /*@__PURE__*/ S.Array( + GetTransformRunRequestRunMethodsItem, +) as any as S.Schema; + +export interface GetTransformRunRequest { + sort_column?: GetTransformRunRequestSortColumn | (string & {}); + sort_direction?: GetTransformRunRequestSortDirection | (string & {}); + transform_ids?: GetTransformRunRequestTransformIdsList; + statuses?: GetTransformRunRequestStatusesList; + transform_tag_ids?: GetTransformRunRequestTransformTagIdsList; + start_time?: string; + end_time?: string; + run_methods?: GetTransformRunRequestRunMethodsList; + user_id?: number; +} +export const GetTransformRunRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + sort_column: S.optional( + GetTransformRunRequestSortColumn.pipe(T.Query("sort-column")), + ), + sort_direction: S.optional( + GetTransformRunRequestSortDirection.pipe(T.Query("sort-direction")), + ), + transform_ids: S.optional( + GetTransformRunRequestTransformIdsList.pipe(T.Query("transform-ids")), + ), + statuses: S.optional(GetTransformRunRequestStatusesList.pipe(T.Query())), + transform_tag_ids: S.optional( + GetTransformRunRequestTransformTagIdsList.pipe( + T.Query("transform-tag-ids"), + ), + ), + start_time: S.optional(S.String.pipe(T.Query("start-time"))), + end_time: S.optional(S.String.pipe(T.Query("end-time"))), + run_methods: S.optional( + GetTransformRunRequestRunMethodsList.pipe(T.Query("run-methods")), + ), + user_id: S.optional(S.Number.pipe(T.Query("user-id"))), + }).pipe(T.Http({ method: "GET", uri: "/api/transform/run", code: 200 })), +).annotate({ + identifier: "GetTransformRunRequest", +}) as any as S.Schema; + +export interface GetTransformRunResponse {} +export const GetTransformRunResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformRunResponse", +}) as any as S.Schema; + +export interface GetTransformRunByRunIdRequest { + /** value must be an integer greater than zero. */ + run_id: number; +} +export const GetTransformRunByRunIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + run_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "GET", uri: "/api/transform/run/{run_id}", code: 200 }), + ), +).annotate({ + identifier: "GetTransformRunByRunIdRequest", +}) as any as S.Schema; + +export interface GetTransformRunByRunIdResponse {} +export const GetTransformRunByRunIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformRunByRunIdResponse", +}) as any as S.Schema; + +export interface GetTransformTagRequest {} +export const GetTransformTagRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/transform-tag", code: 200 }), + ), +).annotate({ + identifier: "GetTransformTagRequest", +}) as any as S.Schema; + +export interface GetTransformTagResponse {} +export const GetTransformTagResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetTransformTagResponse", +}) as any as S.Schema; + +export type GetUserRequestTenancy = "all" | "internal" | "external"; +export const GetUserRequestTenancy = /*@__PURE__*/ S.String; + +export interface GetUserRequest { + status?: string; + query?: string; + group_id?: number; + include_deactivated?: boolean; + is_data_analyst?: boolean; + can_access_data_studio?: boolean; + tenancy?: GetUserRequestTenancy | (string & {}); + tenant_id?: number; +} +export const GetUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + status: S.optional(S.String.pipe(T.Query())), + query: S.optional(S.String.pipe(T.Query())), + group_id: S.optional(S.Number.pipe(T.Query())), + include_deactivated: S.optional(S.Boolean.pipe(T.Query())), + is_data_analyst: S.optional(S.Boolean.pipe(T.Query())), + can_access_data_studio: S.optional(S.Boolean.pipe(T.Query())), + tenancy: S.optional(GetUserRequestTenancy.pipe(T.Query())), + tenant_id: S.optional(S.Number.pipe(T.Query())), + }).pipe(T.Http({ method: "GET", uri: "/api/user", code: 200 })), +).annotate({ identifier: "GetUserRequest" }) as any as S.Schema; + +export interface GetUserResponse {} +export const GetUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserResponse", +}) as any as S.Schema; + +export interface GetUserByIdRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const GetUserByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe(T.Http({ method: "GET", uri: "/api/user/{id}", code: 200 })), +).annotate({ + identifier: "GetUserByIdRequest", +}) as any as S.Schema; + +export interface GetUserByIdResponse {} +export const GetUserByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserByIdResponse", +}) as any as S.Schema; + +export interface GetUserCurrentRequest {} +export const GetUserCurrentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/user/current", code: 200 }), + ), +).annotate({ + identifier: "GetUserCurrentRequest", +}) as any as S.Schema; + +export interface GetUserCurrentResponse {} +export const GetUserCurrentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserCurrentResponse", +}) as any as S.Schema; + +export interface GetUserKeyValueNamespaceRequest { + namespace: string; +} +export const GetUserKeyValueNamespaceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/user-key-value/namespace/{namespace}", + code: 200, + }), + ), +).annotate({ + identifier: "GetUserKeyValueNamespaceRequest", +}) as any as S.Schema; + +export interface GetUserKeyValueNamespaceResponse {} +export const GetUserKeyValueNamespaceResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserKeyValueNamespaceResponse", +}) as any as S.Schema; + +export interface GetUserKeyValueNamespaceKeyRequest { + namespace: string; + key: string; +} +export const GetUserKeyValueNamespaceKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + key: S.String.pipe(T.Label()), + }).pipe( + T.Http({ + method: "GET", + uri: "/api/user-key-value/namespace/{namespace}/key/{key}", + code: 200, + }), + ), +).annotate({ + identifier: "GetUserKeyValueNamespaceKeyRequest", +}) as any as S.Schema; + +export interface GetUserKeyValueNamespaceKeyResponse {} +export const GetUserKeyValueNamespaceKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserKeyValueNamespaceKeyResponse", +}) as any as S.Schema; + +export interface GetUserRecipientsRequest {} +export const GetUserRecipientsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/user/recipients", code: 200 }), + ), +).annotate({ + identifier: "GetUserRecipientsRequest", +}) as any as S.Schema; + +export interface GetUserRecipientsResponse {} +export const GetUserRecipientsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUserRecipientsResponse", +}) as any as S.Schema; + +export interface GetUtilRandomTokenRequest {} +export const GetUtilRandomTokenRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "GET", uri: "/api/util/random_token", code: 200 }), + ), +).annotate({ + identifier: "GetUtilRandomTokenRequest", +}) as any as S.Schema; + +export interface GetUtilRandomTokenResponse {} +export const GetUtilRandomTokenResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "GetUtilRandomTokenResponse", +}) as any as S.Schema; + +export type PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList = + Array; +export const PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface PostApiEeReplacementReplaceModelWithTransformRequest { + card_id: number; + target_collection_id?: number | null; + transform_name: string; + transform_tag_ids?: PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList | null; + transform_target: MetabaseTransformsSchemaTransformTarget; +} +export const PostApiEeReplacementReplaceModelWithTransformRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number, + target_collection_id: S.optional(S.NullOr(S.Number)), + transform_name: S.String, + transform_tag_ids: S.optional( + S.NullOr( + PostApiEeReplacementReplaceModelWithTransformRequestTransformTagIdsList, + ), + ), + transform_target: MetabaseTransformsSchemaTransformTarget, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/replacement/replace-model-with-transform", + code: 200, + }), + ), + ).annotate({ + identifier: "PostApiEeReplacementReplaceModelWithTransformRequest", + }) as any as S.Schema; + +export interface PostApiEeReplacementReplaceModelWithTransformResponse {} +export const PostApiEeReplacementReplaceModelWithTransformResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "PostApiEeReplacementReplaceModelWithTransformResponse", + }) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForUpdateCase0 { + visualization_settings?: unknown | null; + response_handle?: string | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id?: number; + name?: string; + archived?: boolean; + type?: MetabaseActionsSchemaType | (string & {}); + template?: MetabaseActionsSchemaHttpActionTemplate | null; + error_handle?: string | null; + model_id?: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForUpdateCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + response_handle: S.optional(S.NullOr(S.String)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.optional(S.Number), + name: S.optional(S.String), + archived: S.optional(S.Boolean), + type: S.optional(MetabaseActionsSchemaType), + template: S.optional(S.NullOr(MetabaseActionsSchemaHttpActionTemplate)), + error_handle: S.optional(S.NullOr(S.String)), + model_id: S.optional(S.Number), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForUpdateCase0", + }) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForUpdateCase1 { + visualization_settings?: unknown | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id?: number; + name?: string; + archived?: boolean; + kind?: MetabaseActionsSchemaImplicitActionKind | (string & {}) | null; + type?: MetabaseActionsSchemaType | (string & {}); + model_id?: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForUpdateCase1 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.optional(S.Number), + name: S.optional(S.String), + archived: S.optional(S.Boolean), + kind: S.optional(S.NullOr(MetabaseActionsSchemaImplicitActionKind)), + type: S.optional(MetabaseActionsSchemaType), + model_id: S.optional(S.Number), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForUpdateCase1", + }) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForUpdateCase2 { + visualization_settings?: unknown | null; + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id?: number; + name?: string; + archived?: boolean; + database_id?: number | null; + type?: MetabaseActionsSchemaType | (string & {}); + model_id?: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForUpdateCase2 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.optional(S.Number), + name: S.optional(S.String), + archived: S.optional(S.Boolean), + database_id: S.optional(S.NullOr(S.Number)), + type: S.optional(MetabaseActionsSchemaType), + model_id: S.optional(S.Number), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForUpdateCase2", + }) as any as S.Schema; + +export interface MetabaseActionsSchemaActionForUpdateCase3 { + visualization_settings?: unknown | null; + response_handle?: string | null; + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id?: number; + name?: string; + archived?: boolean; + database_id?: number | null; + kind?: MetabaseActionsSchemaImplicitActionKind | (string & {}) | null; + type?: MetabaseActionsSchemaType | (string & {}); + template?: MetabaseActionsSchemaHttpActionTemplate | null; + error_handle?: string | null; + model_id?: number; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const MetabaseActionsSchemaActionForUpdateCase3 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + response_handle: S.optional(S.NullOr(S.String)), + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.optional(S.Number), + name: S.optional(S.String), + archived: S.optional(S.Boolean), + database_id: S.optional(S.NullOr(S.Number)), + kind: S.optional(S.NullOr(MetabaseActionsSchemaImplicitActionKind)), + type: S.optional(MetabaseActionsSchemaType), + template: S.optional(S.NullOr(MetabaseActionsSchemaHttpActionTemplate)), + error_handle: S.optional(S.NullOr(S.String)), + model_id: S.optional(S.Number), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), + ).annotate({ + identifier: "MetabaseActionsSchemaActionForUpdateCase3", + }) as any as S.Schema; + +/** Schema for updating an Action (REST API or internally). */ +export type MetabaseActionsSchemaActionForUpdate = + | MetabaseActionsSchemaActionForUpdateCase0 + | MetabaseActionsSchemaActionForUpdateCase1 + | MetabaseActionsSchemaActionForUpdateCase2 + | MetabaseActionsSchemaActionForUpdateCase3; +export const MetabaseActionsSchemaActionForUpdate = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutActionRequest { + id: number; + body?: MetabaseActionsSchemaActionForUpdate; +} +export const PutActionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + body: S.optional(MetabaseActionsSchemaActionForUpdate.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "PUT", uri: "/api/action/{id}", code: 200 })), +).annotate({ + identifier: "PutActionRequest", +}) as any as S.Schema; + +export interface PutActionResponse {} +export const PutActionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutActionResponse", +}) as any as S.Schema; + +export type MetabaseAgentApiApiDashcardMutationCase0DisplaySize = + | "wide" + | "tall" + | "full"; +export const MetabaseAgentApiApiDashcardMutationCase0DisplaySize = + /*@__PURE__*/ S.String; + +export interface MetabaseAgentApiApiDashcardMutationCase0 { + action: unknown; + /** value must be an integer greater than zero. */ + card_id: number; + display_size?: + | MetabaseAgentApiApiDashcardMutationCase0DisplaySize + | (string & {}) + | null; +} +export const MetabaseAgentApiApiDashcardMutationCase0 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + action: S.Unknown, + card_id: S.Number, + display_size: S.optional( + S.NullOr(MetabaseAgentApiApiDashcardMutationCase0DisplaySize), + ), + }), +).annotate({ + identifier: "MetabaseAgentApiApiDashcardMutationCase0", +}) as any as S.Schema; + +export interface MetabaseAgentApiApiDashcardMutationCase1 { + action: unknown; + /** value must be an integer greater than zero. */ + dashcard_id: number; +} +export const MetabaseAgentApiApiDashcardMutationCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + action: S.Unknown, + dashcard_id: S.Number, + }), +).annotate({ + identifier: "MetabaseAgentApiApiDashcardMutationCase1", +}) as any as S.Schema; + +export type MetabaseAgentApiApiDashcardMutationCase2Position = "top" | "bottom"; +export const MetabaseAgentApiApiDashcardMutationCase2Position = + /*@__PURE__*/ S.String; + +export interface MetabaseAgentApiApiDashcardMutationCase2 { + action: unknown; + /** value must be an integer greater than zero. */ + dashcard_id: number; + position: MetabaseAgentApiApiDashcardMutationCase2Position | (string & {}); +} +export const MetabaseAgentApiApiDashcardMutationCase2 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + action: S.Unknown, + dashcard_id: S.Number, + position: MetabaseAgentApiApiDashcardMutationCase2Position, + }), +).annotate({ + identifier: "MetabaseAgentApiApiDashcardMutationCase2", +}) as any as S.Schema; + +/** One dashcard mutation. Discriminated on `:action`: - `add` : requires `card_id`. Auto-positioned. Optional `display_size`("wide", "tall", or "full"). - `remove` : requires `dashcard_id`. - `move` : requires `dashcard_id` and `position` ("top" or "bottom"). */ +export type MetabaseAgentApiApiDashcardMutation = + | MetabaseAgentApiApiDashcardMutationCase0 + | MetabaseAgentApiApiDashcardMutationCase1 + | MetabaseAgentApiApiDashcardMutationCase2; +export const MetabaseAgentApiApiDashcardMutation = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type PutAgentDashboardRequestDashcardsList = + Array; +export const PutAgentDashboardRequestDashcardsList = /*@__PURE__*/ S.Array( + MetabaseAgentApiApiDashcardMutation, +) as any as S.Schema; + +export interface PutAgentDashboardRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + collection_id?: number | null; + dashcards?: PutAgentDashboardRequestDashcardsList | null; + description?: string | null; + name?: string | null; +} +export const PutAgentDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + dashcards: S.optional(S.NullOr(PutAgentDashboardRequestDashcardsList)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/agent/v1/dashboard/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutAgentDashboardRequest", +}) as any as S.Schema; + +export interface PutAgentDashboardResponse {} +export const PutAgentDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutAgentDashboardResponse", +}) as any as S.Schema; + +export interface PutAgentMetricRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + collection_id?: number | null; + description?: string | null; + display?: MetabaseAgentApiApiCardDisplay | (string & {}) | null; + name?: string | null; + query?: string | null; + visualization_settings?: unknown | null; +} +export const PutAgentMetricRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(MetabaseAgentApiApiCardDisplay)), + name: S.optional(S.NullOr(S.String)), + query: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/agent/v1/metric/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutAgentMetricRequest", +}) as any as S.Schema; + +export interface PutAgentMetricResponse {} +export const PutAgentMetricResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutAgentMetricResponse", +}) as any as S.Schema; + +export interface PutAgentQuestionRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + collection_id?: number | null; + description?: string | null; + display?: MetabaseAgentApiApiCardDisplay | (string & {}) | null; + name?: string | null; + query?: string | null; + visualization_settings?: unknown | null; +} +export const PutAgentQuestionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(MetabaseAgentApiApiCardDisplay)), + name: S.optional(S.NullOr(S.String)), + query: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/agent/v1/question/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutAgentQuestionRequest", +}) as any as S.Schema; + +export interface PutAgentQuestionResponse {} +export const PutAgentQuestionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutAgentQuestionResponse", +}) as any as S.Schema; + +export type PutBookmarkOrderingRequestOrderingsItemType = + | "card" + | "dashboard" + | "collection" + | "document"; +export const PutBookmarkOrderingRequestOrderingsItemType = + /*@__PURE__*/ S.String; + +export interface PutBookmarkOrderingRequestOrderingsItem { + /** value must be an integer greater than zero. */ + item_id: number; + type: PutBookmarkOrderingRequestOrderingsItemType | (string & {}); +} +export const PutBookmarkOrderingRequestOrderingsItem = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + item_id: S.Number, + type: PutBookmarkOrderingRequestOrderingsItemType, + }), +).annotate({ + identifier: "PutBookmarkOrderingRequestOrderingsItem", +}) as any as S.Schema; + +export type PutBookmarkOrderingRequestOrderingsList = + Array; +export const PutBookmarkOrderingRequestOrderingsList = /*@__PURE__*/ S.Array( + PutBookmarkOrderingRequestOrderingsItem, +) as any as S.Schema; + +export interface PutBookmarkOrderingRequest { + orderings: PutBookmarkOrderingRequestOrderingsList; +} +export const PutBookmarkOrderingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + orderings: PutBookmarkOrderingRequestOrderingsList, + }).pipe(T.Http({ method: "PUT", uri: "/api/bookmark/ordering", code: 200 })), +).annotate({ + identifier: "PutBookmarkOrderingRequest", +}) as any as S.Schema; + +export interface PutBookmarkOrderingResponse {} +export const PutBookmarkOrderingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutBookmarkOrderingResponse", +}) as any as S.Schema; + +export type PutCacheRequestModel = + | "root" + | "database" + | "dashboard" + | "question"; +export const PutCacheRequestModel = /*@__PURE__*/ S.String; + +export interface MetabaseCacheApiCacheStrategyNocache { + name?: string | null; + type: unknown; +} +export const MetabaseCacheApiCacheStrategyNocache = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + name: S.optional(S.NullOr(S.String)), + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseCacheApiCacheStrategyNocache", +}) as any as S.Schema; + +export interface MetabaseCacheApiCacheStrategyTtl { + /** value must be an integer greater or equal to than zero. */ + min_duration_ms: number; + /** value must be an integer greater than zero. */ + multiplier: number; + type: unknown; +} +export const MetabaseCacheApiCacheStrategyTtl = /*@__PURE__*/ S.suspend(() => + S.Struct({ + min_duration_ms: S.Number, + multiplier: S.Number, + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseCacheApiCacheStrategyTtl", +}) as any as S.Schema; + +export type MetabaseCacheApiCacheStrategyEeDurationUnit = + | "hours" + | "minutes" + | "seconds" + | "days"; +export const MetabaseCacheApiCacheStrategyEeDurationUnit = + /*@__PURE__*/ S.String; + +export interface MetabaseCacheApiCacheStrategyEeDuration { + /** value must be an integer greater than zero. */ + duration: number; + refresh_automatically?: boolean | null; + type: unknown; + unit: MetabaseCacheApiCacheStrategyEeDurationUnit | (string & {}); +} +export const MetabaseCacheApiCacheStrategyEeDuration = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + duration: S.Number, + refresh_automatically: S.optional(S.NullOr(S.Boolean)), + type: S.Unknown, + unit: MetabaseCacheApiCacheStrategyEeDurationUnit, + }), +).annotate({ + identifier: "MetabaseCacheApiCacheStrategyEeDuration", +}) as any as S.Schema; + +export interface MetabaseCacheApiCacheStrategyEeSchedule { + refresh_automatically?: boolean | null; + schedule: string; + type: unknown; +} +export const MetabaseCacheApiCacheStrategyEeSchedule = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + refresh_automatically: S.optional(S.NullOr(S.Boolean)), + schedule: S.String, + type: S.Unknown, + }), +).annotate({ + identifier: "MetabaseCacheApiCacheStrategyEeSchedule", +}) as any as S.Schema; + +/** cache strategy :type must be one of :nocache, :ttl, :duration, :schedule */ +export type MetabaseCacheApiCacheStrategyEe = + | MetabaseCacheApiCacheStrategyNocache + | MetabaseCacheApiCacheStrategyTtl + | MetabaseCacheApiCacheStrategyEeDuration + | MetabaseCacheApiCacheStrategyEeSchedule; +export const MetabaseCacheApiCacheStrategyEe = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** cache strategy :type must be one of :nocache, :ttl */ +export type MetabaseCacheApiCacheStrategyOss = + | MetabaseCacheApiCacheStrategyNocache + | MetabaseCacheApiCacheStrategyTtl; +export const MetabaseCacheApiCacheStrategyOss = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabaseCacheApiCacheStrategy = + | MetabaseCacheApiCacheStrategyEe + | MetabaseCacheApiCacheStrategyOss; +export const MetabaseCacheApiCacheStrategy = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutCacheRequest { + model: PutCacheRequestModel | (string & {}); + /** value must be an integer greater or equal to than zero. */ + model_id: number; + strategy: MetabaseCacheApiCacheStrategy; +} +export const PutCacheRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model: PutCacheRequestModel, + model_id: S.Number, + strategy: MetabaseCacheApiCacheStrategy, + }).pipe(T.Http({ method: "PUT", uri: "/api/cache", code: 200 })), +).annotate({ + identifier: "PutCacheRequest", +}) as any as S.Schema; + +export interface PutCacheResponse {} +export const PutCacheResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCacheResponse", +}) as any as S.Schema; + +export type PutCardRequestEmbeddingParamsValue = + | "disabled" + | "enabled" + | "locked"; +export const PutCardRequestEmbeddingParamsValue = /*@__PURE__*/ S.String; + +export type PutCardRequestEmbeddingParamsMap = { + [key: string]: PutCardRequestEmbeddingParamsValue | (string & {}) | undefined; +}; +export const PutCardRequestEmbeddingParamsMap = /*@__PURE__*/ S.Record( + S.String, + PutCardRequestEmbeddingParamsValue, +) as any as S.Schema; + +export interface PutCardRequest { + /** value must be an integer greater than zero. */ + id: number; + delete_old_dashcards?: boolean; + enable_embedding?: boolean | null; + visualization_settings?: unknown | null; + dashboard_tab_id?: number | null; + collection_preview?: boolean | null; + dataset_query?: MetabaseLibSchemaQuery | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + embedding_type?: string | null; + name?: string | null; + archived?: boolean | null; + collection_position?: number | null; + embedding_params?: PutCardRequestEmbeddingParamsMap | null; + result_metadata?: MetabaseLibSchemaMetadataCardResultMetadata | null; + collection_id?: number | null; + cache_ttl?: number | null; + type?: MetabaseLibSchemaMetadataCardType | (string & {}) | null; + display?: string | null; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; + dashboard_id?: number | null; +} +export const PutCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + delete_old_dashcards: S.optional(S.Boolean.pipe(T.Query())), + enable_embedding: S.optional(S.NullOr(S.Boolean)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + collection_preview: S.optional(S.NullOr(S.Boolean)), + dataset_query: S.optional(S.NullOr(MetabaseLibSchemaQuery)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + embedding_type: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + archived: S.optional(S.NullOr(S.Boolean)), + collection_position: S.optional(S.NullOr(S.Number)), + embedding_params: S.optional(S.NullOr(PutCardRequestEmbeddingParamsMap)), + result_metadata: S.optional( + S.NullOr(MetabaseLibSchemaMetadataCardResultMetadata), + ), + collection_id: S.optional(S.NullOr(S.Number)), + cache_ttl: S.optional(S.NullOr(S.Number)), + type: S.optional(S.NullOr(MetabaseLibSchemaMetadataCardType)), + display: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + dashboard_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "PUT", uri: "/api/card/{id}", code: 200 })), +).annotate({ identifier: "PutCardRequest" }) as any as S.Schema; + +export interface PutCardResponse {} +export const PutCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCardResponse", +}) as any as S.Schema; + +export type PutChannelRequestBodyCase0DetailsAuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const PutChannelRequestBodyCase0DetailsAuthMethod = + /*@__PURE__*/ S.String; + +export type PutChannelRequestBodyCase0DetailsFeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const PutChannelRequestBodyCase0DetailsFeFormType = + /*@__PURE__*/ S.String; + +export type PutChannelRequestBodyCase0DetailsMethod = "get" | "post" | "put"; +export const PutChannelRequestBodyCase0DetailsMethod = /*@__PURE__*/ S.String; + +export interface PutChannelRequestBodyCase0Details { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: PutChannelRequestBodyCase0DetailsAuthMethod | (string & {}); + fe_form_type?: PutChannelRequestBodyCase0DetailsFeFormType | (string & {}); + method?: PutChannelRequestBodyCase0DetailsMethod | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const PutChannelRequestBodyCase0Details = /*@__PURE__*/ S.suspend(() => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: PutChannelRequestBodyCase0DetailsAuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + PutChannelRequestBodyCase0DetailsFeFormType.pipe(T.Body("fe-form-type")), + ), + method: S.optional(PutChannelRequestBodyCase0DetailsMethod), + url: S.Unknown, + }), +).annotate({ + identifier: "PutChannelRequestBodyCase0Details", +}) as any as S.Schema; + +export interface PutChannelRequestBodyCase0 { + active?: boolean | null; + description?: string | null; + details?: PutChannelRequestBodyCase0Details | null; + name?: string | null; + type?: unknown | null; +} +export const PutChannelRequestBodyCase0 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(PutChannelRequestBodyCase0Details)), + name: S.optional(S.NullOr(S.String)), + type: S.optional(S.NullOr(S.Unknown)), + }), +).annotate({ + identifier: "PutChannelRequestBodyCase0", +}) as any as S.Schema; + +export interface PutChannelRequestBodyCase1 { + active?: boolean | null; + description?: string | null; + details?: unknown | null; + name?: string | null; + type?: unknown | null; +} +export const PutChannelRequestBodyCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(S.Unknown)), + name: S.optional(S.NullOr(S.String)), + type: S.optional(S.NullOr(S.Unknown)), + }), +).annotate({ + identifier: "PutChannelRequestBodyCase1", +}) as any as S.Schema; + +export type PutChannelRequestBodyCase2Details = + CreateChannelRequestBodyCase2Details; +export const PutChannelRequestBodyCase2Details = + CreateChannelRequestBodyCase2Details; + +export interface PutChannelRequestBodyCase2 { + active?: boolean | null; + description?: string | null; + details?: CreateChannelRequestBodyCase2Details | null; + name?: string | null; + type?: unknown | null; +} +export const PutChannelRequestBodyCase2 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(CreateChannelRequestBodyCase2Details)), + name: S.optional(S.NullOr(S.String)), + type: S.optional(S.NullOr(S.Unknown)), + }), +).annotate({ + identifier: "PutChannelRequestBodyCase2", +}) as any as S.Schema; + +export type PutChannelRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; +export const PutChannelRequestBodyCase3DetailsCase0 = + CreateChannelRequestBodyCase2Details; + +export type PutChannelRequestBodyCase3DetailsCase1AuthMethod = + | "none" + | "header" + | "query-param" + | "request-body"; +export const PutChannelRequestBodyCase3DetailsCase1AuthMethod = + /*@__PURE__*/ S.String; + +export type PutChannelRequestBodyCase3DetailsCase1FeFormType = + | "api-key" + | "bearer" + | "basic" + | "none"; +export const PutChannelRequestBodyCase3DetailsCase1FeFormType = + /*@__PURE__*/ S.String; + +export type PutChannelRequestBodyCase3DetailsCase1Method = + | "get" + | "post" + | "put"; +export const PutChannelRequestBodyCase3DetailsCase1Method = + /*@__PURE__*/ S.String; + +export interface PutChannelRequestBodyCase3DetailsCase1 { + /** Value must be a map. */ + auth_info?: unknown; + auth_method: PutChannelRequestBodyCase3DetailsCase1AuthMethod | (string & {}); + fe_form_type?: + | PutChannelRequestBodyCase3DetailsCase1FeFormType + | (string & {}); + method?: PutChannelRequestBodyCase3DetailsCase1Method | (string & {}); + /** value must be a valid URL. */ + url: unknown; +} +export const PutChannelRequestBodyCase3DetailsCase1 = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + auth_info: S.optional(S.Unknown.pipe(T.Body("auth-info"))), + auth_method: PutChannelRequestBodyCase3DetailsCase1AuthMethod.pipe( + T.Body("auth-method"), + ), + fe_form_type: S.optional( + PutChannelRequestBodyCase3DetailsCase1FeFormType.pipe( + T.Body("fe-form-type"), + ), + ), + method: S.optional(PutChannelRequestBodyCase3DetailsCase1Method), + url: S.Unknown, + }), +).annotate({ + identifier: "PutChannelRequestBodyCase3DetailsCase1", +}) as any as S.Schema; + +export type PutChannelRequestBodyCase3Details = + | CreateChannelRequestBodyCase2Details + | PutChannelRequestBodyCase3DetailsCase1 + | unknown; +export const PutChannelRequestBodyCase3Details = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutChannelRequestBodyCase3 { + active?: boolean | null; + description?: string | null; + details?: PutChannelRequestBodyCase3Details | null; + name?: string | null; + type?: unknown | null; +} +export const PutChannelRequestBodyCase3 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(PutChannelRequestBodyCase3Details)), + name: S.optional(S.NullOr(S.String)), + type: S.optional(S.NullOr(S.Unknown)), + }), +).annotate({ + identifier: "PutChannelRequestBodyCase3", +}) as any as S.Schema; + +export type PutChannelRequestBody = + | PutChannelRequestBodyCase0 + | PutChannelRequestBodyCase1 + | PutChannelRequestBodyCase2 + | PutChannelRequestBodyCase3; +export const PutChannelRequestBody = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutChannelRequest { + /** value must be an integer greater than zero. */ + id: number; + body?: PutChannelRequestBody; +} +export const PutChannelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + body: S.optional(PutChannelRequestBody.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "PUT", uri: "/api/channel/{id}", code: 200 })), +).annotate({ + identifier: "PutChannelRequest", +}) as any as S.Schema; + +export interface PutChannelResponse {} +export const PutChannelResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutChannelResponse", +}) as any as S.Schema; + +export interface PutCloudMigrationCancelRequest {} +export const PutCloudMigrationCancelRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({}).pipe( + T.Http({ method: "PUT", uri: "/api/cloud-migration/cancel", code: 200 }), + ), +).annotate({ + identifier: "PutCloudMigrationCancelRequest", +}) as any as S.Schema; + +export interface PutCloudMigrationCancelResponse {} +export const PutCloudMigrationCancelResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCloudMigrationCancelResponse", +}) as any as S.Schema; + +export type PutCollectionRequestAuthorityLevel = "official"; +export const PutCollectionRequestAuthorityLevel = /*@__PURE__*/ S.String; + +export interface PutCollectionRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + authority_level?: PutCollectionRequestAuthorityLevel | (string & {}) | null; + description?: string | null; + name?: string | null; + parent_id?: number | null; +} +export const PutCollectionRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + authority_level: S.optional(S.NullOr(PutCollectionRequestAuthorityLevel)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + parent_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "PUT", uri: "/api/collection/{id}", code: 200 })), +).annotate({ + identifier: "PutCollectionRequest", +}) as any as S.Schema; + +export interface PutCollectionResponse {} +export const PutCollectionResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCollectionResponse", +}) as any as S.Schema; + +export interface PutCollectionGraphRequest { + force?: boolean; + skip_graph?: boolean; + /** Value must be a map. */ + groups: unknown; + namespace?: string | null; + revision?: number | null; +} +export const PutCollectionGraphRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + force: S.optional(S.Boolean.pipe(T.Query())), + skip_graph: S.optional(S.Boolean.pipe(T.Query("skip-graph"))), + groups: S.Unknown, + namespace: S.optional(S.NullOr(S.String)), + revision: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "PUT", uri: "/api/collection/graph", code: 200 })), +).annotate({ + identifier: "PutCollectionGraphRequest", +}) as any as S.Schema; + +export interface PutCollectionGraphResponse {} +export const PutCollectionGraphResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCollectionGraphResponse", +}) as any as S.Schema; + +export interface PutCommentRequest { + /** value must be an integer greater than zero. */ + comment_id: number; + content?: unknown; + is_resolved?: boolean; +} +export const PutCommentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + comment_id: S.Number.pipe(T.Label()), + content: S.optional(S.Unknown), + is_resolved: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "PUT", uri: "/api/comment/{comment_id}", code: 200 }), + ), +).annotate({ + identifier: "PutCommentRequest", +}) as any as S.Schema; + +export interface PutCommentResponse {} +export const PutCommentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutCommentResponse", +}) as any as S.Schema; + +export type PutDashboardRequestWidth = "fixed" | "full"; +export const PutDashboardRequestWidth = /*@__PURE__*/ S.String; + +export type PutDashboardRequestEmbeddingParamsValue = + | "disabled" + | "enabled" + | "locked"; +export const PutDashboardRequestEmbeddingParamsValue = /*@__PURE__*/ S.String; + +export type PutDashboardRequestEmbeddingParamsMap = { + [key: string]: + | PutDashboardRequestEmbeddingParamsValue + | (string & {}) + | undefined; +}; +export const PutDashboardRequestEmbeddingParamsMap = /*@__PURE__*/ S.Record( + S.String, + PutDashboardRequestEmbeddingParamsValue, +) as any as S.Schema; + +export type PutDashboardRequestTabsItem = CreateDashboardSaveRequestTabsItem; +export const PutDashboardRequestTabsItem = CreateDashboardSaveRequestTabsItem; + +/** value must be seq of maps in which ids are unique */ +export type PutDashboardRequestTabsList = + Array; +export const PutDashboardRequestTabsList = /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestTabsItem, +) as any as S.Schema; + +export type PutDashboardRequestDashcardsItemInlineParametersList = + Array; +export const PutDashboardRequestDashcardsItemInlineParametersList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface PutDashboardRequestDashcardsItemSeriesItem { + /** value must be an integer greater than zero. */ + id: number; +} +export const PutDashboardRequestDashcardsItemSeriesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number, + }), + ).annotate({ + identifier: "PutDashboardRequestDashcardsItemSeriesItem", + }) as any as S.Schema; + +export type PutDashboardRequestDashcardsItemSeriesList = + Array; +export const PutDashboardRequestDashcardsItemSeriesList = /*@__PURE__*/ S.Array( + PutDashboardRequestDashcardsItemSeriesItem, +) as any as S.Schema; + +export interface PutDashboardRequestDashcardsItem { + inline_parameters?: PutDashboardRequestDashcardsItemInlineParametersList | null; + visualization_settings?: unknown | null; + dashboard_tab_id?: number | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id: number; + card_id?: number | null; + /** value must be an integer greater than zero. */ + size_x: number; + /** value must be an integer greater than zero. */ + size_y: number; + /** value must be an integer greater or equal to than zero. */ + col: number; + /** value must be an integer greater or equal to than zero. */ + row: number; + series?: PutDashboardRequestDashcardsItemSeriesList | null; + action_id?: number | null; +} +export const PutDashboardRequestDashcardsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + inline_parameters: S.optional( + S.NullOr(PutDashboardRequestDashcardsItemInlineParametersList), + ), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.Number, + card_id: S.optional(S.NullOr(S.Number)), + size_x: S.Number, + size_y: S.Number, + col: S.Number, + row: S.Number, + series: S.optional(S.NullOr(PutDashboardRequestDashcardsItemSeriesList)), + action_id: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "PutDashboardRequestDashcardsItem", +}) as any as S.Schema; + +/** value must be seq of maps in which ids are unique */ +export type PutDashboardRequestDashcardsList = + Array; +export const PutDashboardRequestDashcardsList = /*@__PURE__*/ S.Array( + PutDashboardRequestDashcardsItem, +) as any as S.Schema; + +export interface PutDashboardRequest { + /** value must be an integer greater than zero. */ + id: number; + points_of_interest?: string | null; + enable_embedding?: boolean | null; + auto_apply_filters?: boolean | null; + width?: PutDashboardRequestWidth | (string & {}); + embedding_type?: string | null; + show_in_getting_started?: boolean | null; + position?: number | null; + name?: string | null; + archived?: boolean | null; + collection_position?: number | null; + embedding_params?: PutDashboardRequestEmbeddingParamsMap | null; + tabs?: PutDashboardRequestTabsList | null; + collection_id?: number | null; + cache_ttl?: number | null; + caveats?: string | null; + parameters?: MetabaseParametersSchemaParameters | null; + dashcards?: PutDashboardRequestDashcardsList | null; + description?: string | null; +} +export const PutDashboardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + points_of_interest: S.optional(S.NullOr(S.String)), + enable_embedding: S.optional(S.NullOr(S.Boolean)), + auto_apply_filters: S.optional(S.NullOr(S.Boolean)), + width: S.optional(PutDashboardRequestWidth), + embedding_type: S.optional(S.NullOr(S.String)), + show_in_getting_started: S.optional(S.NullOr(S.Boolean)), + position: S.optional(S.NullOr(S.Number)), + name: S.optional(S.NullOr(S.String)), + archived: S.optional(S.NullOr(S.Boolean)), + collection_position: S.optional(S.NullOr(S.Number)), + embedding_params: S.optional( + S.NullOr(PutDashboardRequestEmbeddingParamsMap), + ), + tabs: S.optional(S.NullOr(PutDashboardRequestTabsList)), + collection_id: S.optional(S.NullOr(S.Number)), + cache_ttl: S.optional(S.NullOr(S.Number)), + caveats: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + dashcards: S.optional(S.NullOr(PutDashboardRequestDashcardsList)), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/dashboard/{id}", code: 200 })), +).annotate({ + identifier: "PutDashboardRequest", +}) as any as S.Schema; + +export interface PutDashboardResponse {} +export const PutDashboardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutDashboardResponse", +}) as any as S.Schema; + +export type PutDashboardCardsRequestCardsItemInlineParametersList = + Array; +export const PutDashboardCardsRequestCardsItemInlineParametersList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type PutDashboardCardsRequestCardsItemSeriesItem = + PutDashboardRequestDashcardsItemSeriesItem; +export const PutDashboardCardsRequestCardsItemSeriesItem = + PutDashboardRequestDashcardsItemSeriesItem; + +export type PutDashboardCardsRequestCardsItemSeriesList = + Array; +export const PutDashboardCardsRequestCardsItemSeriesList = + /*@__PURE__*/ S.Array( + PutDashboardRequestDashcardsItemSeriesItem, + ) as any as S.Schema; + +export interface PutDashboardCardsRequestCardsItem { + inline_parameters?: PutDashboardCardsRequestCardsItemInlineParametersList | null; + visualization_settings?: unknown | null; + dashboard_tab_id?: number | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + id: number; + card_id?: number | null; + /** value must be an integer greater than zero. */ + size_x: number; + /** value must be an integer greater than zero. */ + size_y: number; + /** value must be an integer greater or equal to than zero. */ + col: number; + /** value must be an integer greater or equal to than zero. */ + row: number; + series?: PutDashboardCardsRequestCardsItemSeriesList | null; + action_id?: number | null; +} +export const PutDashboardCardsRequestCardsItem = /*@__PURE__*/ S.suspend(() => + S.Struct({ + inline_parameters: S.optional( + S.NullOr(PutDashboardCardsRequestCardsItemInlineParametersList), + ), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + id: S.Number, + card_id: S.optional(S.NullOr(S.Number)), + size_x: S.Number, + size_y: S.Number, + col: S.Number, + row: S.Number, + series: S.optional(S.NullOr(PutDashboardCardsRequestCardsItemSeriesList)), + action_id: S.optional(S.NullOr(S.Number)), + }), +).annotate({ + identifier: "PutDashboardCardsRequestCardsItem", +}) as any as S.Schema; + +/** value must be seq of maps in which ids are unique */ +export type PutDashboardCardsRequestCardsList = + Array; +export const PutDashboardCardsRequestCardsList = /*@__PURE__*/ S.Array( + PutDashboardCardsRequestCardsItem, +) as any as S.Schema; + +export type PutDashboardCardsRequestTabsItem = + CreateDashboardSaveRequestTabsItem; +export const PutDashboardCardsRequestTabsItem = + CreateDashboardSaveRequestTabsItem; + +/** value must be seq of maps in which ids are unique */ +export type PutDashboardCardsRequestTabsList = + Array; +export const PutDashboardCardsRequestTabsList = /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestTabsItem, +) as any as S.Schema; + +export interface PutDashboardCardsRequest { + /** value must be an integer greater than zero. */ + id: number; + /** value must be seq of maps in which ids are unique */ + cards: PutDashboardCardsRequestCardsList; + tabs?: PutDashboardCardsRequestTabsList | null; +} +export const PutDashboardCardsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + cards: PutDashboardCardsRequestCardsList, + tabs: S.optional(S.NullOr(PutDashboardCardsRequestTabsList)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/dashboard/{id}/cards", code: 200 }), + ), +).annotate({ + identifier: "PutDashboardCardsRequest", +}) as any as S.Schema; + +export interface PutDashboardCardsResponse {} +export const PutDashboardCardsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutDashboardCardsResponse", +}) as any as S.Schema; + +export interface PutDatabaseRequest { + /** value must be an integer greater than zero. */ + id: number; + points_of_interest?: string | null; + provider_name?: string | null; + write_data_details?: unknown | null; + settings?: unknown | null; + name?: string | null; + is_on_demand?: boolean | null; + cache_ttl?: number | null; + engine?: string | null; + details?: unknown | null; + is_full_sync?: boolean | null; + auto_run_queries?: boolean | null; + caveats?: string | null; + is_stub?: boolean | null; + admin_details?: unknown | null; + refingerprint?: boolean | null; + schedules?: MetabaseSyncSchedulesExpandedSchedulesMap | null; + description?: string | null; +} +export const PutDatabaseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + points_of_interest: S.optional(S.NullOr(S.String)), + provider_name: S.optional(S.NullOr(S.String)), + write_data_details: S.optional(S.NullOr(S.Unknown)), + settings: S.optional(S.NullOr(S.Unknown)), + name: S.optional(S.NullOr(S.String)), + is_on_demand: S.optional(S.NullOr(S.Boolean)), + cache_ttl: S.optional(S.NullOr(S.Number)), + engine: S.optional(S.NullOr(S.String)), + details: S.optional(S.NullOr(S.Unknown)), + is_full_sync: S.optional(S.NullOr(S.Boolean)), + auto_run_queries: S.optional(S.NullOr(S.Boolean)), + caveats: S.optional(S.NullOr(S.String)), + is_stub: S.optional(S.NullOr(S.Boolean)), + admin_details: S.optional(S.NullOr(S.Unknown)), + refingerprint: S.optional(S.NullOr(S.Boolean)), + schedules: S.optional(S.NullOr(MetabaseSyncSchedulesExpandedSchedulesMap)), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/database/{id}", code: 200 })), +).annotate({ + identifier: "PutDatabaseRequest", +}) as any as S.Schema; + +export interface PutDatabaseResponse {} +export const PutDatabaseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutDatabaseResponse", +}) as any as S.Schema; + +export type PutDocumentRequestCardsValueParameterMappingsList = Array; +export const PutDocumentRequestCardsValueParameterMappingsList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export type PutDocumentRequestCardsValueResultMetadataList = Array; +export const PutDocumentRequestCardsValueResultMetadataList = + /*@__PURE__*/ S.Array( + S.Unknown, + ) as any as S.Schema; + +export interface PutDocumentRequestCardsValue { + /** Value must be a map. */ + visualization_settings: unknown; + entity_id?: string | null; + dataset_query: MetabaseLibSchemaQuery; + parameter_mappings?: PutDocumentRequestCardsValueParameterMappingsList | null; + name: string; + result_metadata?: PutDocumentRequestCardsValueResultMetadataList | null; + cache_ttl?: number | null; + display: string; + parameters?: MetabaseParametersSchemaParameters | null; + description?: string | null; +} +export const PutDocumentRequestCardsValue = /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.Unknown, + entity_id: S.optional(S.NullOr(S.String)), + dataset_query: MetabaseLibSchemaQuery, + parameter_mappings: S.optional( + S.NullOr(PutDocumentRequestCardsValueParameterMappingsList), + ), + name: S.String, + result_metadata: S.optional( + S.NullOr(PutDocumentRequestCardsValueResultMetadataList), + ), + cache_ttl: S.optional(S.NullOr(S.Number)), + display: S.String, + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + description: S.optional(S.NullOr(S.String)), + }), +).annotate({ + identifier: "PutDocumentRequestCardsValue", +}) as any as S.Schema; + +export type PutDocumentRequestCardsMap = { + [key: string]: PutDocumentRequestCardsValue | undefined; +}; +export const PutDocumentRequestCardsMap = /*@__PURE__*/ S.Record( + S.String, + PutDocumentRequestCardsValue, +) as any as S.Schema; + +export interface PutDocumentRequest { + /** value must be an integer greater than zero. */ + document_id: number; + archived?: boolean | null; + cards?: PutDocumentRequestCardsMap | null; + collection_id?: number | null; + collection_position?: number | null; + document?: MetabaseDocumentsProseMirrorAst | null; + name?: string; +} +export const PutDocumentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + cards: S.optional(S.NullOr(PutDocumentRequestCardsMap)), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + document: S.optional(S.NullOr(MetabaseDocumentsProseMirrorAst)), + name: S.optional(S.String), + }).pipe( + T.Http({ method: "PUT", uri: "/api/document/{document_id}", code: 200 }), + ), +).annotate({ + identifier: "PutDocumentRequest", +}) as any as S.Schema; + +export interface PutDocumentResponse {} +export const PutDocumentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutDocumentResponse", +}) as any as S.Schema; + +export type PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap = { + [key: string]: string | undefined; +}; +export const PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap = + /*@__PURE__*/ S.Record( + S.String, + S.String, + ) as any as S.Schema; + +export type PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap = { + [key: string]: + | PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap + | undefined; +}; +export const PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap = + /*@__PURE__*/ S.Record( + S.String, + PutEeAdvancedPermissionsApplicationGraphRequestGroupsValueMap, + ) as any as S.Schema; + +export interface PutEeAdvancedPermissionsApplicationGraphRequest { + skip_graph?: boolean; + force?: boolean; + groups: PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap; + revision?: number | null; +} +export const PutEeAdvancedPermissionsApplicationGraphRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + skip_graph: S.optional(S.Boolean.pipe(T.Query("skip-graph"))), + force: S.optional(S.Boolean.pipe(T.Query())), + groups: PutEeAdvancedPermissionsApplicationGraphRequestGroupsMap, + revision: S.optional(S.NullOr(S.Number)), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/advanced-permissions/application/graph", + code: 200, + }), + ), + ).annotate({ + identifier: "PutEeAdvancedPermissionsApplicationGraphRequest", + }) as any as S.Schema; + +export interface PutEeAdvancedPermissionsApplicationGraphResponse {} +export const PutEeAdvancedPermissionsApplicationGraphResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "PutEeAdvancedPermissionsApplicationGraphResponse", + }) as any as S.Schema; + +export type PutEeAiControlsPermissionsRequestPermissionsItemPermType = + | "permission/metabot-nlq" + | "permission/metabot-sql-generation" + | "permission/metabot-other-tools" + | "permission/metabot"; +export const PutEeAiControlsPermissionsRequestPermissionsItemPermType = + /*@__PURE__*/ S.String; + +export type PutEeAiControlsPermissionsRequestPermissionsItemPermValue = + | "yes" + | "no"; +export const PutEeAiControlsPermissionsRequestPermissionsItemPermValue = + /*@__PURE__*/ S.String; + +export interface PutEeAiControlsPermissionsRequestPermissionsItem { + group_id: number; + perm_type: + | PutEeAiControlsPermissionsRequestPermissionsItemPermType + | (string & {}); + perm_value: + | PutEeAiControlsPermissionsRequestPermissionsItemPermValue + | (string & {}); +} +export const PutEeAiControlsPermissionsRequestPermissionsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number, + perm_type: PutEeAiControlsPermissionsRequestPermissionsItemPermType, + perm_value: PutEeAiControlsPermissionsRequestPermissionsItemPermValue, + }), + ).annotate({ + identifier: "PutEeAiControlsPermissionsRequestPermissionsItem", + }) as any as S.Schema; + +export type PutEeAiControlsPermissionsRequestPermissionsList = + Array; +export const PutEeAiControlsPermissionsRequestPermissionsList = + /*@__PURE__*/ S.Array( + PutEeAiControlsPermissionsRequestPermissionsItem, + ) as any as S.Schema; + +export interface PutEeAiControlsPermissionsRequest { + permissions: PutEeAiControlsPermissionsRequestPermissionsList; +} +export const PutEeAiControlsPermissionsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + permissions: PutEeAiControlsPermissionsRequestPermissionsList, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/ai-controls/permissions", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeAiControlsPermissionsRequest", +}) as any as S.Schema; + +export interface PutEeAiControlsPermissionsResponse {} +export const PutEeAiControlsPermissionsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeAiControlsPermissionsResponse", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageGroupRequest { + group_id: number; + max_usage: number | null; +} +export const PutEeAiControlsUsageGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + max_usage: S.NullOr(S.Number), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/ai-controls/usage/group/{group_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeAiControlsUsageGroupRequest", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageGroupResponse {} +export const PutEeAiControlsUsageGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeAiControlsUsageGroupResponse", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageInstanceRequest { + max_usage: number | null; +} +export const PutEeAiControlsUsageInstanceRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + max_usage: S.NullOr(S.Number), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/ai-controls/usage/instance", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeAiControlsUsageInstanceRequest", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageInstanceResponse {} +export const PutEeAiControlsUsageInstanceResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "PutEeAiControlsUsageInstanceResponse", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageTenantRequest { + tenant_id: number; + max_usage: number | null; +} +export const PutEeAiControlsUsageTenantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + tenant_id: S.Number.pipe(T.Label()), + max_usage: S.NullOr(S.Number), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/ai-controls/usage/tenant/{tenant_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeAiControlsUsageTenantRequest", +}) as any as S.Schema; + +export interface PutEeAiControlsUsageTenantResponse {} +export const PutEeAiControlsUsageTenantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeAiControlsUsageTenantResponse", +}) as any as S.Schema; + +export interface PutEeCustomVizPluginRequest { + /** value must be an integer greater than zero. */ + id: number; + enabled?: boolean | null; +} +export const PutEeCustomVizPluginRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + enabled: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/ee/custom-viz-plugin/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutEeCustomVizPluginRequest", +}) as any as S.Schema; + +export interface PutEeCustomVizPluginResponse {} +export const PutEeCustomVizPluginResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeCustomVizPluginResponse", +}) as any as S.Schema; + +export type PutEeCustomVizPluginBundleRequestFile = + CreateEeCustomVizPluginRequestFile; +export const PutEeCustomVizPluginBundleRequestFile = + CreateEeCustomVizPluginRequestFile; + +export interface PutEeCustomVizPluginBundleRequest { + /** value must be an integer greater than zero. */ + id: number; + file: CreateEeCustomVizPluginRequestFile; +} +export const PutEeCustomVizPluginBundleRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + file: CreateEeCustomVizPluginRequestFile, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/custom-viz-plugin/{id}/bundle", + code: 200, + contentType: "multipart", + }), + ), +).annotate({ + identifier: "PutEeCustomVizPluginBundleRequest", +}) as any as S.Schema; + +export interface PutEeCustomVizPluginBundleResponse {} +export const PutEeCustomVizPluginBundleResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeCustomVizPluginBundleResponse", +}) as any as S.Schema; + +export interface PutEeCustomVizPluginDevUrlRequest { + /** value must be an integer greater than zero. */ + id: number; + dev_bundle_url: string | null; +} +export const PutEeCustomVizPluginDevUrlRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + dev_bundle_url: S.NullOr(S.String), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/custom-viz-plugin/{id}/dev-url", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeCustomVizPluginDevUrlRequest", +}) as any as S.Schema; + +export interface PutEeCustomVizPluginDevUrlResponse {} +export const PutEeCustomVizPluginDevUrlResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeCustomVizPluginDevUrlResponse", +}) as any as S.Schema; + +export interface PutEeDatabaseRoutingRouterDatabaseRequest { + /** value must be an integer greater than zero. */ + id: number; + user_attribute?: string | null; +} +export const PutEeDatabaseRoutingRouterDatabaseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + user_attribute: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/database-routing/router-database/{id}", + code: 200, + }), + ), + ).annotate({ + identifier: "PutEeDatabaseRoutingRouterDatabaseRequest", + }) as any as S.Schema; + +export interface PutEeDatabaseRoutingRouterDatabaseResponse {} +export const PutEeDatabaseRoutingRouterDatabaseResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "PutEeDatabaseRoutingRouterDatabaseResponse", + }) as any as S.Schema; + +export interface PutEeEmailOverrideRequest { + email_smtp_host_override?: string | null; + email_smtp_password_override?: string | null; + email_smtp_port_override?: number | null; + email_smtp_security_override?: string | null; + email_smtp_username_override?: string | null; +} +export const PutEeEmailOverrideRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email_smtp_host_override: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-host-override")), + ), + email_smtp_password_override: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-password-override")), + ), + email_smtp_port_override: S.optional( + S.NullOr(S.Number).pipe(T.Body("email-smtp-port-override")), + ), + email_smtp_security_override: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-security-override")), + ), + email_smtp_username_override: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-username-override")), + ), + }).pipe(T.Http({ method: "PUT", uri: "/api/ee/email/override", code: 200 })), +).annotate({ + identifier: "PutEeEmailOverrideRequest", +}) as any as S.Schema; + +export interface PutEeEmailOverrideResponse {} +export const PutEeEmailOverrideResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeEmailOverrideResponse", +}) as any as S.Schema; + +export type PutEeRemoteSyncSettingsRequestCollectionsMap = { + [key: string]: boolean | undefined; +}; +export const PutEeRemoteSyncSettingsRequestCollectionsMap = + /*@__PURE__*/ S.Record( + S.String, + S.Boolean, + ) as any as S.Schema; + +export type PutEeRemoteSyncSettingsRequestRemoteSyncType = + | "read-only" + | "read-write"; +export const PutEeRemoteSyncSettingsRequestRemoteSyncType = + /*@__PURE__*/ S.String; + +export interface PutEeRemoteSyncSettingsRequest { + collections?: PutEeRemoteSyncSettingsRequestCollectionsMap | null; + remote_sync_auto_import?: boolean | null; + remote_sync_branch?: string | null; + remote_sync_token?: string | null; + remote_sync_transforms?: boolean | null; + remote_sync_type?: + | PutEeRemoteSyncSettingsRequestRemoteSyncType + | (string & {}) + | null; + remote_sync_url?: string | null; +} +export const PutEeRemoteSyncSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + collections: S.optional( + S.NullOr(PutEeRemoteSyncSettingsRequestCollectionsMap), + ), + remote_sync_auto_import: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("remote-sync-auto-import")), + ), + remote_sync_branch: S.optional( + S.NullOr(S.String).pipe(T.Body("remote-sync-branch")), + ), + remote_sync_token: S.optional( + S.NullOr(S.String).pipe(T.Body("remote-sync-token")), + ), + remote_sync_transforms: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("remote-sync-transforms")), + ), + remote_sync_type: S.optional( + S.NullOr(PutEeRemoteSyncSettingsRequestRemoteSyncType).pipe( + T.Body("remote-sync-type"), + ), + ), + remote_sync_url: S.optional( + S.NullOr(S.String).pipe(T.Body("remote-sync-url")), + ), + }).pipe( + T.Http({ method: "PUT", uri: "/api/ee/remote-sync/settings", code: 200 }), + ), +).annotate({ + identifier: "PutEeRemoteSyncSettingsRequest", +}) as any as S.Schema; + +export interface PutEeRemoteSyncSettingsResponse {} +export const PutEeRemoteSyncSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeRemoteSyncSettingsResponse", +}) as any as S.Schema; + +export type PutEeScimGroupRequestMembersItem = + CreateEeScimGroupRequestMembersItem; +export const PutEeScimGroupRequestMembersItem = + CreateEeScimGroupRequestMembersItem; + +export type PutEeScimGroupRequestMembersList = + Array; +export const PutEeScimGroupRequestMembersList = /*@__PURE__*/ S.Array( + CreateEeScimGroupRequestMembersItem, +) as any as S.Schema; + +export type PutEeScimGroupRequestSchemasList = Array; +export const PutEeScimGroupRequestSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutEeScimGroupRequest { + id: string; + displayName: string; + members?: PutEeScimGroupRequestMembersList; + schemas: PutEeScimGroupRequestSchemasList; +} +export const PutEeScimGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + displayName: S.String, + members: S.optional(PutEeScimGroupRequestMembersList), + schemas: PutEeScimGroupRequestSchemasList, + }).pipe( + T.Http({ method: "PUT", uri: "/api/ee/scim/v2/Groups/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutEeScimGroupRequest", +}) as any as S.Schema; + +export interface PutEeScimGroupResponse {} +export const PutEeScimGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeScimGroupResponse", +}) as any as S.Schema; + +export type PutEeScimUserRequestEmailsItem = CreateEeScimUserRequestEmailsItem; +export const PutEeScimUserRequestEmailsItem = CreateEeScimUserRequestEmailsItem; + +export type PutEeScimUserRequestEmailsList = + Array; +export const PutEeScimUserRequestEmailsList = /*@__PURE__*/ S.Array( + CreateEeScimUserRequestEmailsItem, +) as any as S.Schema; + +export type PutEeScimUserRequestGroupsItem = CreateEeScimUserRequestGroupsItem; +export const PutEeScimUserRequestGroupsItem = CreateEeScimUserRequestGroupsItem; + +export type PutEeScimUserRequestGroupsList = + Array; +export const PutEeScimUserRequestGroupsList = /*@__PURE__*/ S.Array( + CreateEeScimUserRequestGroupsItem, +) as any as S.Schema; + +export type PutEeScimUserRequestName = CreateEeScimUserRequestName; +export const PutEeScimUserRequestName = CreateEeScimUserRequestName; + +export type PutEeScimUserRequestSchemasList = Array; +export const PutEeScimUserRequestSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutEeScimUserRequest { + id: string; + active?: boolean; + emails: PutEeScimUserRequestEmailsList; + groups?: PutEeScimUserRequestGroupsList; + locale?: string | null; + name: CreateEeScimUserRequestName; + schemas: PutEeScimUserRequestSchemasList; + userName: string; +} +export const PutEeScimUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + active: S.optional(S.Boolean), + emails: PutEeScimUserRequestEmailsList, + groups: S.optional(PutEeScimUserRequestGroupsList), + locale: S.optional(S.NullOr(S.String)), + name: CreateEeScimUserRequestName, + schemas: PutEeScimUserRequestSchemasList, + userName: S.String, + }).pipe( + T.Http({ method: "PUT", uri: "/api/ee/scim/v2/Users/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutEeScimUserRequest", +}) as any as S.Schema; + +export interface PutEeScimUserResponse {} +export const PutEeScimUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeScimUserResponse", +}) as any as S.Schema; + +export interface PutEeSupportAccessGrantRevokeRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const PutEeSupportAccessGrantRevokeRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/support-access-grant/{id}/revoke", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeSupportAccessGrantRevokeRequest", +}) as any as S.Schema; + +export interface PutEeSupportAccessGrantRevokeResponse {} +export const PutEeSupportAccessGrantRevokeResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "PutEeSupportAccessGrantRevokeResponse", +}) as any as S.Schema; + +export type PutEeTenantRequestAttributesMap = { + [key: string]: unknown | undefined; +}; +export const PutEeTenantRequestAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface PutEeTenantRequest { + /** value must be an integer greater than zero. */ + id: number; + attributes?: PutEeTenantRequestAttributesMap | null; + is_active?: boolean | null; + name?: string | null; +} +export const PutEeTenantRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + attributes: S.optional(S.NullOr(PutEeTenantRequestAttributesMap)), + is_active: S.optional(S.NullOr(S.Boolean)), + name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/ee/tenant/{id}", code: 200 })), +).annotate({ + identifier: "PutEeTenantRequest", +}) as any as S.Schema; + +export interface PutEeTenantResponse {} +export const PutEeTenantResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEeTenantResponse", +}) as any as S.Schema; + +export interface PutEeTransformsPythonLibraryRequest { + path: string; + source: string; +} +export const PutEeTransformsPythonLibraryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + path: S.String.pipe(T.Label()), + source: S.String, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/ee/transforms-python/library/{path}", + code: 200, + }), + ), +).annotate({ + identifier: "PutEeTransformsPythonLibraryRequest", +}) as any as S.Schema; + +export interface PutEeTransformsPythonLibraryResponse {} +export const PutEeTransformsPythonLibraryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "PutEeTransformsPythonLibraryResponse", +}) as any as S.Schema; + +export interface PutEmailRequest { + email_smtp_host?: string | null; + email_smtp_password?: string | null; + email_smtp_port?: number | null; + email_smtp_security?: string | null; + email_smtp_username?: string | null; +} +export const PutEmailRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + email_smtp_host: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-host")), + ), + email_smtp_password: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-password")), + ), + email_smtp_port: S.optional( + S.NullOr(S.Number).pipe(T.Body("email-smtp-port")), + ), + email_smtp_security: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-security")), + ), + email_smtp_username: S.optional( + S.NullOr(S.String).pipe(T.Body("email-smtp-username")), + ), + }).pipe(T.Http({ method: "PUT", uri: "/api/email", code: 200 })), +).annotate({ + identifier: "PutEmailRequest", +}) as any as S.Schema; + +export interface PutEmailResponse {} +export const PutEmailResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEmailResponse", +}) as any as S.Schema; + +export interface PutEmbedThemeRequest { + /** value must be an integer greater than zero. */ + id: number; + name?: string | null; + settings?: unknown | null; +} +export const PutEmbedThemeRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + name: S.optional(S.NullOr(S.String)), + settings: S.optional(S.NullOr(S.Unknown)), + }).pipe(T.Http({ method: "PUT", uri: "/api/embed-theme/{id}", code: 200 })), +).annotate({ + identifier: "PutEmbedThemeRequest", +}) as any as S.Schema; + +export interface PutEmbedThemeResponse {} +export const PutEmbedThemeResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutEmbedThemeResponse", +}) as any as S.Schema; + +export type PutFieldRequestVisibilityType = + | "retired" + | "sensitive" + | "normal" + | "hidden" + | "details-only"; +export const PutFieldRequestVisibilityType = /*@__PURE__*/ S.String; + +export type PutFieldRequestNfcPathList = Array; +export const PutFieldRequestNfcPathList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface PutFieldRequest { + /** value must be an integer greater than zero. */ + id: number; + points_of_interest?: string | null; + settings?: unknown | null; + visibility_type?: PutFieldRequestVisibilityType | (string & {}) | null; + coercion_strategy?: unknown | null; + json_unfolding?: boolean | null; + semantic_type?: unknown | null; + has_field_values?: + | MetabaseLibSchemaMetadataColumnHasFieldValues + | (string & {}) + | null; + display_name?: string | null; + nfc_path?: PutFieldRequestNfcPathList | null; + caveats?: string | null; + description?: string | null; + fk_target_field_id?: number | null; +} +export const PutFieldRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + points_of_interest: S.optional(S.NullOr(S.String)), + settings: S.optional(S.NullOr(S.Unknown)), + visibility_type: S.optional(S.NullOr(PutFieldRequestVisibilityType)), + coercion_strategy: S.optional(S.NullOr(S.Unknown)), + json_unfolding: S.optional(S.NullOr(S.Boolean)), + semantic_type: S.optional(S.NullOr(S.Unknown)), + has_field_values: S.optional( + S.NullOr(MetabaseLibSchemaMetadataColumnHasFieldValues), + ), + display_name: S.optional(S.NullOr(S.String)), + nfc_path: S.optional(S.NullOr(PutFieldRequestNfcPathList)), + caveats: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + fk_target_field_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "PUT", uri: "/api/field/{id}", code: 200 })), +).annotate({ + identifier: "PutFieldRequest", +}) as any as S.Schema; + +export interface PutFieldResponse {} +export const PutFieldResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutFieldResponse", +}) as any as S.Schema; + +export interface PutGlossaryRequest { + /** value must be an integer greater than zero. */ + id: number; + definition: string; + term: string; +} +export const PutGlossaryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + definition: S.String, + term: S.String, + }).pipe(T.Http({ method: "PUT", uri: "/api/glossary/{id}", code: 200 })), +).annotate({ + identifier: "PutGlossaryRequest", +}) as any as S.Schema; + +export interface PutGlossaryResponse {} +export const PutGlossaryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutGlossaryResponse", +}) as any as S.Schema; + +export interface PutGoogleSettingsRequest { + google_auth_auto_create_accounts_domain?: string | null; + google_auth_client_id?: string | null; + google_auth_enabled?: boolean | null; +} +export const PutGoogleSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + google_auth_auto_create_accounts_domain: S.optional( + S.NullOr(S.String).pipe( + T.Body("google-auth-auto-create-accounts-domain"), + ), + ), + google_auth_client_id: S.optional( + S.NullOr(S.String).pipe(T.Body("google-auth-client-id")), + ), + google_auth_enabled: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("google-auth-enabled")), + ), + }).pipe(T.Http({ method: "PUT", uri: "/api/google/settings", code: 200 })), +).annotate({ + identifier: "PutGoogleSettingsRequest", +}) as any as S.Schema; + +export interface PutGoogleSettingsResponse {} +export const PutGoogleSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutGoogleSettingsResponse", +}) as any as S.Schema; + +export interface PutKeyRequest { + /** value must be an integer greater than zero. */ + id: number; + group_id?: number | null; + name?: string | null; +} +export const PutKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + group_id: S.optional(S.NullOr(S.Number)), + name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/api-key/{id}", code: 200 })), +).annotate({ identifier: "PutKeyRequest" }) as any as S.Schema; + +export interface PutKeyResponse {} +export const PutKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ identifier: "PutKeyResponse" }) as any as S.Schema; + +export interface PutKeyRegenerateRequest { + id: number; +} +export const PutKeyRegenerateRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "PUT", uri: "/api/api-key/{id}/regenerate", code: 200 }), + ), +).annotate({ + identifier: "PutKeyRegenerateRequest", +}) as any as S.Schema; + +export interface PutKeyRegenerateResponse {} +export const PutKeyRegenerateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutKeyRegenerateResponse", +}) as any as S.Schema; + +export type PutLdapSettingsRequestLdapGroupMappingsValueList = Array; +export const PutLdapSettingsRequestLdapGroupMappingsValueList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export type PutLdapSettingsRequestLdapGroupMappingsMap = { + [key: string]: PutLdapSettingsRequestLdapGroupMappingsValueList | undefined; +}; +export const PutLdapSettingsRequestLdapGroupMappingsMap = + /*@__PURE__*/ S.Record( + S.String, + PutLdapSettingsRequestLdapGroupMappingsValueList, + ) as any as S.Schema; + +export type PutLdapSettingsRequestLdapSecurity = "none" | "ssl" | "starttls"; +export const PutLdapSettingsRequestLdapSecurity = /*@__PURE__*/ S.String; + +export interface PutLdapSettingsRequest { + ldap_host?: string | null; + ldap_attribute_email?: string | null; + ldap_password?: string | null; + ldap_port?: number | null; + ldap_bind_dn?: string | null; + ldap_group_membership_filter?: string | null; + ldap_group_sync?: boolean | null; + ldap_attribute_firstname?: string | null; + ldap_group_mappings?: PutLdapSettingsRequestLdapGroupMappingsMap | null; + ldap_user_base?: string | null; + ldap_security?: PutLdapSettingsRequestLdapSecurity | (string & {}) | null; + ldap_user_filter?: string | null; + ldap_attribute_lastname?: string | null; + ldap_group_base?: string | null; + ldap_enabled?: boolean | null; +} +export const PutLdapSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + ldap_host: S.optional(S.NullOr(S.String).pipe(T.Body("ldap-host"))), + ldap_attribute_email: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-attribute-email")), + ), + ldap_password: S.optional(S.NullOr(S.String).pipe(T.Body("ldap-password"))), + ldap_port: S.optional(S.NullOr(S.Number).pipe(T.Body("ldap-port"))), + ldap_bind_dn: S.optional(S.NullOr(S.String).pipe(T.Body("ldap-bind-dn"))), + ldap_group_membership_filter: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-group-membership-filter")), + ), + ldap_group_sync: S.optional( + S.NullOr(S.Boolean).pipe(T.Body("ldap-group-sync")), + ), + ldap_attribute_firstname: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-attribute-firstname")), + ), + ldap_group_mappings: S.optional( + S.NullOr(PutLdapSettingsRequestLdapGroupMappingsMap).pipe( + T.Body("ldap-group-mappings"), + ), + ), + ldap_user_base: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-user-base")), + ), + ldap_security: S.optional( + S.NullOr(PutLdapSettingsRequestLdapSecurity).pipe( + T.Body("ldap-security"), + ), + ), + ldap_user_filter: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-user-filter")), + ), + ldap_attribute_lastname: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-attribute-lastname")), + ), + ldap_group_base: S.optional( + S.NullOr(S.String).pipe(T.Body("ldap-group-base")), + ), + ldap_enabled: S.optional(S.NullOr(S.Boolean).pipe(T.Body("ldap-enabled"))), + }).pipe(T.Http({ method: "PUT", uri: "/api/ldap/settings", code: 200 })), +).annotate({ + identifier: "PutLdapSettingsRequest", +}) as any as S.Schema; + +export interface PutLdapSettingsResponse {} +export const PutLdapSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutLdapSettingsResponse", +}) as any as S.Schema; + +export interface PutMeasureRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + definition?: MetabaseLibSchemaQuery | null; + description?: string | null; + name?: string | null; + revision_message: string; +} +export const PutMeasureRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + definition: S.optional(S.NullOr(MetabaseLibSchemaQuery)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + revision_message: S.String, + }).pipe(T.Http({ method: "PUT", uri: "/api/measure/{id}", code: 200 })), +).annotate({ + identifier: "PutMeasureRequest", +}) as any as S.Schema; + +export interface PutMeasureResponse {} +export const PutMeasureResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMeasureResponse", +}) as any as S.Schema; + +export interface PutMetabotMetabotRequest { + id: number; + collection_id?: number | null; + use_verified_content?: boolean; +} +export const PutMetabotMetabotRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + collection_id: S.optional(S.NullOr(S.Number)), + use_verified_content: S.optional(S.Boolean), + }).pipe( + T.Http({ method: "PUT", uri: "/api/metabot/metabot/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutMetabotMetabotRequest", +}) as any as S.Schema; + +export interface PutMetabotMetabotResponse {} +export const PutMetabotMetabotResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMetabotMetabotResponse", +}) as any as S.Schema; + +export interface PutMetabotSettingsRequestCredentials { + access_key_id?: string | null; + api_key?: string | null; + base_url?: string | null; + region?: string | null; + secret_access_key?: string | null; + session_token?: string | null; +} +export const PutMetabotSettingsRequestCredentials = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + access_key_id: S.optional( + S.NullOr(S.String).pipe(T.Body("access-key-id")), + ), + api_key: S.optional(S.NullOr(S.String).pipe(T.Body("api-key"))), + base_url: S.optional(S.NullOr(S.String).pipe(T.Body("base-url"))), + region: S.optional(S.NullOr(S.String)), + secret_access_key: S.optional( + S.NullOr(S.String).pipe(T.Body("secret-access-key")), + ), + session_token: S.optional( + S.NullOr(S.String).pipe(T.Body("session-token")), + ), + }), +).annotate({ + identifier: "PutMetabotSettingsRequestCredentials", +}) as any as S.Schema; + +export type PutMetabotSettingsRequestProvider = + | "anthropic" + | "openai" + | "mistral" + | "azure" + | "bedrock" + | "zai" + | "metabase" + | "openrouter"; +export const PutMetabotSettingsRequestProvider = /*@__PURE__*/ S.String; + +export interface PutMetabotSettingsRequest { + api_key?: string | null; + credentials?: PutMetabotSettingsRequestCredentials | null; + model?: string | null; + provider: PutMetabotSettingsRequestProvider | (string & {}); +} +export const PutMetabotSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + api_key: S.optional(S.NullOr(S.String).pipe(T.Body("api-key"))), + credentials: S.optional(S.NullOr(PutMetabotSettingsRequestCredentials)), + model: S.optional(S.NullOr(S.String)), + provider: PutMetabotSettingsRequestProvider, + }).pipe(T.Http({ method: "PUT", uri: "/api/metabot/settings", code: 200 })), +).annotate({ + identifier: "PutMetabotSettingsRequest", +}) as any as S.Schema; + +export interface PutMetabotSettingsResponse {} +export const PutMetabotSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMetabotSettingsResponse", +}) as any as S.Schema; + +export interface PutMetabotSlackSettingsRequest { + metabot_slack_signing_secret: string | null; + slack_connect_client_id: string | null; + slack_connect_client_secret: string | null; +} +export const PutMetabotSlackSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + metabot_slack_signing_secret: S.NullOr(S.String).pipe( + T.Body("metabot-slack-signing-secret"), + ), + slack_connect_client_id: S.NullOr(S.String).pipe( + T.Body("slack-connect-client-id"), + ), + slack_connect_client_secret: S.NullOr(S.String).pipe( + T.Body("slack-connect-client-secret"), + ), + }).pipe( + T.Http({ method: "PUT", uri: "/api/metabot/slack/settings", code: 200 }), + ), +).annotate({ + identifier: "PutMetabotSlackSettingsRequest", +}) as any as S.Schema; + +export interface PutMetabotSlackSettingsResponse {} +export const PutMetabotSlackSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMetabotSlackSettingsResponse", +}) as any as S.Schema; + +export interface PutMtGtapRequest { + /** value must be an integer greater than zero. */ + id: number; + attribute_remappings?: MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap | null; + card_id?: number | null; +} +export const PutMtGtapRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + attribute_remappings: S.optional( + S.NullOr(MetabaseEnterpriseSandboxSchemaAttributeRemappingsMap), + ), + card_id: S.optional(S.NullOr(S.Number)), + }).pipe(T.Http({ method: "PUT", uri: "/api/mt/gtap/{id}", code: 200 })), +).annotate({ + identifier: "PutMtGtapRequest", +}) as any as S.Schema; + +export interface PutMtGtapResponse {} +export const PutMtGtapResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMtGtapResponse", +}) as any as S.Schema; + +/** value must be a valid user attributes map (name -> value) */ +export type PutMtUserAttributesRequestLoginAttributesMap = { + [key: string]: unknown | undefined; +}; +export const PutMtUserAttributesRequestLoginAttributesMap = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +export interface PutMtUserAttributesRequest { + /** value must be an integer greater than zero. */ + id: number; + login_attributes?: PutMtUserAttributesRequestLoginAttributesMap | null; +} +export const PutMtUserAttributesRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + login_attributes: S.optional( + S.NullOr(PutMtUserAttributesRequestLoginAttributesMap), + ), + }).pipe( + T.Http({ method: "PUT", uri: "/api/mt/user/{id}/attributes", code: 200 }), + ), +).annotate({ + identifier: "PutMtUserAttributesRequest", +}) as any as S.Schema; + +export interface PutMtUserAttributesResponse {} +export const PutMtUserAttributesResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutMtUserAttributesResponse", +}) as any as S.Schema; + +export interface PutNativeQuerySnippetRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + collection_id?: number | null; + content?: string | null; + description?: string | null; + name?: unknown | null; +} +export const PutNativeQuerySnippetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + content: S.optional(S.NullOr(S.String)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.Unknown)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/native-query-snippet/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutNativeQuerySnippetRequest", +}) as any as S.Schema; + +export interface PutNativeQuerySnippetResponse {} +export const PutNativeQuerySnippetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutNativeQuerySnippetResponse", +}) as any as S.Schema; + +export interface PutNotificationRequest { + /** value must be an integer greater than zero. */ + id: number; + body?: MetabaseNotificationApiNotificationNotificationApiInput; +} +export const PutNotificationRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + body: S.optional( + MetabaseNotificationApiNotificationNotificationApiInput.pipe( + T.HttpBody(), + ), + ), + }).pipe(T.Http({ method: "PUT", uri: "/api/notification/{id}", code: 200 })), +).annotate({ + identifier: "PutNotificationRequest", +}) as any as S.Schema; + +export interface PutNotificationResponse {} +export const PutNotificationResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutNotificationResponse", +}) as any as S.Schema; + +export type PutOsiAiContextRequestAiContextExamplesList = Array; +export const PutOsiAiContextRequestAiContextExamplesList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export type PutOsiAiContextRequestAiContextSynonymsList = Array; +export const PutOsiAiContextRequestAiContextSynonymsList = + /*@__PURE__*/ S.Array( + S.String, + ) as any as S.Schema; + +export interface PutOsiAiContextRequestAiContext { + examples?: PutOsiAiContextRequestAiContextExamplesList; + instructions?: string | null; + synonyms?: PutOsiAiContextRequestAiContextSynonymsList; +} +export const PutOsiAiContextRequestAiContext = /*@__PURE__*/ S.suspend(() => + S.Struct({ + examples: S.optional(PutOsiAiContextRequestAiContextExamplesList), + instructions: S.optional(S.NullOr(S.String)), + synonyms: S.optional(PutOsiAiContextRequestAiContextSynonymsList), + }), +).annotate({ + identifier: "PutOsiAiContextRequestAiContext", +}) as any as S.Schema; + +export interface PutOsiAiContextRequest { + entity_type: string; + /** value must be an integer greater than zero. */ + entity_local_id: number; + ai_context: PutOsiAiContextRequestAiContext; +} +export const PutOsiAiContextRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + entity_type: S.String.pipe(T.Label()), + entity_local_id: S.Number.pipe(T.Label()), + ai_context: PutOsiAiContextRequestAiContext, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/osi/ai-context/{entity_type}/{entity_local_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PutOsiAiContextRequest", +}) as any as S.Schema; + +export interface PutOsiAiContextResponse {} +export const PutOsiAiContextResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutOsiAiContextResponse", +}) as any as S.Schema; + +export type MetabasePermissionsRestSchemaTablePermsCase0Query = + | "all" + | "none" + | "segmented"; +export const MetabasePermissionsRestSchemaTablePermsCase0Query = + /*@__PURE__*/ S.String; + +export type MetabasePermissionsRestSchemaTablePermsCase0Read = "all" | "none"; +export const MetabasePermissionsRestSchemaTablePermsCase0Read = + /*@__PURE__*/ S.String; + +export interface MetabasePermissionsRestSchemaTablePermsCase0 { + query?: MetabasePermissionsRestSchemaTablePermsCase0Query | (string & {}); + read?: MetabasePermissionsRestSchemaTablePermsCase0Read | (string & {}); +} +export const MetabasePermissionsRestSchemaTablePermsCase0 = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.optional(MetabasePermissionsRestSchemaTablePermsCase0Query), + read: S.optional(MetabasePermissionsRestSchemaTablePermsCase0Read), + }), + ).annotate({ + identifier: "MetabasePermissionsRestSchemaTablePermsCase0", + }) as any as S.Schema; + +/** Perms that get reused for TablePerms and SchemaPerms */ +export type MetabasePermissionsRestSchemaPerms = + | "all" + | "blocked" + | "full" + | "legacy-no-self-service" + | "limited" + | "no" + | "none" + | "query-builder" + | "sandboxed" + | "segmented" + | "unrestricted"; +export const MetabasePermissionsRestSchemaPerms = /*@__PURE__*/ S.String; + +export type MetabasePermissionsRestSchemaTablePerms = + | MetabasePermissionsRestSchemaTablePermsCase0 + | MetabasePermissionsRestSchemaPerms; +export const MetabasePermissionsRestSchemaTablePerms = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemaPermsCase0Value = + | MetabasePermissionsRestSchemaTablePerms + | unknown; +export const MetabasePermissionsRestSchemaSchemaPermsCase0Value = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemaPermsCase0Map = { + [key: string]: MetabasePermissionsRestSchemaSchemaPermsCase0Value | undefined; +}; +export const MetabasePermissionsRestSchemaSchemaPermsCase0Map = + /*@__PURE__*/ S.Record( + S.String, + MetabasePermissionsRestSchemaSchemaPermsCase0Value, + ) as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemaPerms = + | MetabasePermissionsRestSchemaSchemaPermsCase0Map + | MetabasePermissionsRestSchemaPerms; +export const MetabasePermissionsRestSchemaSchemaPerms = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemaGraphValue = + | MetabasePermissionsRestSchemaSchemaPerms + | unknown; +export const MetabasePermissionsRestSchemaSchemaGraphValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemaGraph = { + [key: string]: MetabasePermissionsRestSchemaSchemaGraphValue | undefined; +}; +export const MetabasePermissionsRestSchemaSchemaGraph = /*@__PURE__*/ S.Record( + S.String, + MetabasePermissionsRestSchemaSchemaGraphValue, +) as any as S.Schema; + +export type MetabasePermissionsRestSchemaSchemasCase1 = + | "all" + | "segmented" + | "none" + | "block" + | "blocked" + | "full" + | "limited" + | "impersonated" + | "unrestricted" + | "sandboxed" + | "legacy-no-self-service" + | "query-builder-and-native" + | "query-builder" + | "no"; +export const MetabasePermissionsRestSchemaSchemasCase1 = /*@__PURE__*/ S.String; + +export type MetabasePermissionsRestSchemaSchemas = + | MetabasePermissionsRestSchemaSchemaGraph + | MetabasePermissionsRestSchemaSchemasCase1; +export const MetabasePermissionsRestSchemaSchemas = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaNative = + | "write" + | "none" + | "full" + | "limited"; +export const MetabasePermissionsRestSchemaNative = /*@__PURE__*/ S.String; + +export interface MetabasePermissionsRestSchemaDataPerms { + native?: MetabasePermissionsRestSchemaNative | (string & {}) | null; + schemas?: MetabasePermissionsRestSchemaSchemas; +} +export const MetabasePermissionsRestSchemaDataPerms = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + native: S.optional(S.NullOr(MetabasePermissionsRestSchemaNative)), + schemas: S.optional(MetabasePermissionsRestSchemaSchemas), + }), +).annotate({ + identifier: "MetabasePermissionsRestSchemaDataPerms", +}) as any as S.Schema; + +export type MetabasePermissionsRestSchemaDbPermsDetails = "yes" | "no"; +export const MetabasePermissionsRestSchemaDbPermsDetails = + /*@__PURE__*/ S.String; + +export type MetabasePermissionsRestSchemaDbPermsTransforms = "yes" | "no"; +export const MetabasePermissionsRestSchemaDbPermsTransforms = + /*@__PURE__*/ S.String; + +/** the permissions one group has on one database */ +export interface MetabasePermissionsRestSchemaDbPerms { + create_queries?: MetabasePermissionsRestSchemaSchemas; + data?: MetabasePermissionsRestSchemaDataPerms; + data_model?: MetabasePermissionsRestSchemaDataPerms; + details?: MetabasePermissionsRestSchemaDbPermsDetails | (string & {}); + download?: MetabasePermissionsRestSchemaDataPerms; + transforms?: MetabasePermissionsRestSchemaDbPermsTransforms | (string & {}); + view_data?: MetabasePermissionsRestSchemaSchemas; +} +export const MetabasePermissionsRestSchemaDbPerms = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + create_queries: S.optional( + MetabasePermissionsRestSchemaSchemas.pipe(T.Body("create-queries")), + ), + data: S.optional(MetabasePermissionsRestSchemaDataPerms), + data_model: S.optional( + MetabasePermissionsRestSchemaDataPerms.pipe(T.Body("data-model")), + ), + details: S.optional(MetabasePermissionsRestSchemaDbPermsDetails), + download: S.optional(MetabasePermissionsRestSchemaDataPerms), + transforms: S.optional(MetabasePermissionsRestSchemaDbPermsTransforms), + view_data: S.optional( + MetabasePermissionsRestSchemaSchemas.pipe(T.Body("view-data")), + ), + }), +).annotate({ + identifier: "MetabasePermissionsRestSchemaDbPerms", +}) as any as S.Schema; + +export type PutPermissionsGraphRequestGroupsCase0ValueCase0Value = + | MetabasePermissionsRestSchemaDbPerms + | unknown; +export const PutPermissionsGraphRequestGroupsCase0ValueCase0Value = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type PutPermissionsGraphRequestGroupsCase0ValueCase0Map = { + [key: string]: + | PutPermissionsGraphRequestGroupsCase0ValueCase0Value + | undefined; +}; +export const PutPermissionsGraphRequestGroupsCase0ValueCase0Map = + /*@__PURE__*/ S.Record( + S.String, + PutPermissionsGraphRequestGroupsCase0ValueCase0Value, + ) as any as S.Schema; + +export type PutPermissionsGraphRequestGroupsCase0Value = + | PutPermissionsGraphRequestGroupsCase0ValueCase0Map + | unknown; +export const PutPermissionsGraphRequestGroupsCase0Value = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type PutPermissionsGraphRequestGroupsCase0Map = { + [key: string]: PutPermissionsGraphRequestGroupsCase0Value | undefined; +}; +export const PutPermissionsGraphRequestGroupsCase0Map = /*@__PURE__*/ S.Record( + S.String, + PutPermissionsGraphRequestGroupsCase0Value, +) as any as S.Schema; + +export type PutPermissionsGraphRequestGroups = + | PutPermissionsGraphRequestGroupsCase0Map + | unknown; +export const PutPermissionsGraphRequestGroups = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** a connection impersonation policy to write alongside a permissions graph update */ +export interface MetabasePermissionsRestSchemaImpersonationUpdate { + attribute: string; + /** value must be an integer greater than zero. */ + db_id: number; + /** value must be an integer greater than zero. */ + group_id: number; +} +export const MetabasePermissionsRestSchemaImpersonationUpdate = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + attribute: S.String, + db_id: S.Number, + group_id: S.Number, + }), + ).annotate({ + identifier: "MetabasePermissionsRestSchemaImpersonationUpdate", + }) as any as S.Schema; + +export type PutPermissionsGraphRequestImpersonationsList = + Array; +export const PutPermissionsGraphRequestImpersonationsList = + /*@__PURE__*/ S.Array( + MetabasePermissionsRestSchemaImpersonationUpdate, + ) as any as S.Schema; + +/** a field name, a field id, or a parameter target */ +export type MetabasePermissionsRestSchemaAttributeRemapping = + | string + | number + | MetabaseLibSchemaParameterTarget; +export const MetabasePermissionsRestSchemaAttributeRemapping = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type MetabasePermissionsRestSchemaAttributeRemappingsValue = + | MetabasePermissionsRestSchemaAttributeRemapping + | unknown; +export const MetabasePermissionsRestSchemaAttributeRemappingsValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +/** a map of user attribute name -> the field or parameter target it is remapped onto */ +export type MetabasePermissionsRestSchemaAttributeRemappings = { + [key: string]: + | MetabasePermissionsRestSchemaAttributeRemappingsValue + | undefined; +}; +export const MetabasePermissionsRestSchemaAttributeRemappings = + /*@__PURE__*/ S.Record( + S.String, + MetabasePermissionsRestSchemaAttributeRemappingsValue, + ) as any as S.Schema; + +/** a sandbox to write alongside a permissions graph update */ +export interface MetabasePermissionsRestSchemaSandboxUpdate { + attribute_remappings?: MetabasePermissionsRestSchemaAttributeRemappings | null; + card_id?: number | null; + /** value must be an integer greater than zero. */ + group_id?: number; + /** value must be an integer greater than zero. */ + id?: number; + permission_id?: number | null; + /** value must be an integer greater than zero. */ + table_id?: number; +} +export const MetabasePermissionsRestSchemaSandboxUpdate = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + attribute_remappings: S.optional( + S.NullOr(MetabasePermissionsRestSchemaAttributeRemappings), + ), + card_id: S.optional(S.NullOr(S.Number)), + group_id: S.optional(S.Number), + id: S.optional(S.Number), + permission_id: S.optional(S.NullOr(S.Number)), + table_id: S.optional(S.Number), + }), + ).annotate({ + identifier: "MetabasePermissionsRestSchemaSandboxUpdate", + }) as any as S.Schema; + +export type PutPermissionsGraphRequestSandboxesList = + Array; +export const PutPermissionsGraphRequestSandboxesList = /*@__PURE__*/ S.Array( + MetabasePermissionsRestSchemaSandboxUpdate, +) as any as S.Schema; + +export interface PutPermissionsGraphRequest { + skip_graph?: boolean; + force?: boolean; + groups: PutPermissionsGraphRequestGroups; + impersonations?: PutPermissionsGraphRequestImpersonationsList | null; + revision?: number | null; + sandboxes?: PutPermissionsGraphRequestSandboxesList | null; +} +export const PutPermissionsGraphRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + skip_graph: S.optional(S.Boolean.pipe(T.Query("skip-graph"))), + force: S.optional(S.Boolean.pipe(T.Query())), + groups: PutPermissionsGraphRequestGroups, + impersonations: S.optional( + S.NullOr(PutPermissionsGraphRequestImpersonationsList), + ), + revision: S.optional(S.NullOr(S.Number)), + sandboxes: S.optional(S.NullOr(PutPermissionsGraphRequestSandboxesList)), + }).pipe(T.Http({ method: "PUT", uri: "/api/permissions/graph", code: 200 })), +).annotate({ + identifier: "PutPermissionsGraphRequest", +}) as any as S.Schema; + +export interface PutPermissionsGraphResponse {} +export const PutPermissionsGraphResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutPermissionsGraphResponse", +}) as any as S.Schema; + +export interface PutPermissionsGroupRequest { + /** value must be an integer greater than zero. */ + group_id: number; + name: string; +} +export const PutPermissionsGroupRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + name: S.String, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/permissions/group/{group_id}", + code: 200, + }), + ), +).annotate({ + identifier: "PutPermissionsGroupRequest", +}) as any as S.Schema; + +export interface PutPermissionsGroupResponse {} +export const PutPermissionsGroupResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutPermissionsGroupResponse", +}) as any as S.Schema; + +export interface PutPermissionsMembershipRequest { + /** value must be an integer greater than zero. */ + id: number; + is_group_manager: boolean; +} +export const PutPermissionsMembershipRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + is_group_manager: S.Boolean, + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/permissions/membership/{id}", + code: 200, + }), + ), +).annotate({ + identifier: "PutPermissionsMembershipRequest", +}) as any as S.Schema; + +export interface PutPermissionsMembershipResponse {} +export const PutPermissionsMembershipResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutPermissionsMembershipResponse", +}) as any as S.Schema; + +export interface PutPermissionsMembershipClearRequest { + /** value must be an integer greater than zero. */ + group_id: number; +} +export const PutPermissionsMembershipClearRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + group_id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/permissions/membership/{group_id}/clear", + code: 200, + }), + ), +).annotate({ + identifier: "PutPermissionsMembershipClearRequest", +}) as any as S.Schema; + +export interface PutPermissionsMembershipClearResponse {} +export const PutPermissionsMembershipClearResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "PutPermissionsMembershipClearResponse", +}) as any as S.Schema; + +export type PutPulseRequestParametersList = + Array; +export const PutPulseRequestParametersList = /*@__PURE__*/ S.Array( + MetabaseParametersSchemaParameter, +) as any as S.Schema; + +export interface PutPulseRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + cards?: unknown | null; + channels?: unknown | null; + collection_id?: number | null; + collection_position?: number | null; + name?: string | null; + parameters?: PutPulseRequestParametersList | null; + skip_if_empty?: boolean | null; +} +export const PutPulseRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + cards: S.optional(S.NullOr(S.Unknown)), + channels: S.optional(S.NullOr(S.Unknown)), + collection_id: S.optional(S.NullOr(S.Number)), + collection_position: S.optional(S.NullOr(S.Number)), + name: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(PutPulseRequestParametersList)), + skip_if_empty: S.optional(S.NullOr(S.Boolean)), + }).pipe(T.Http({ method: "PUT", uri: "/api/pulse/{id}", code: 200 })), +).annotate({ + identifier: "PutPulseRequest", +}) as any as S.Schema; + +export interface PutPulseResponse {} +export const PutPulseResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutPulseResponse", +}) as any as S.Schema; + +export interface PutSearchWeightsRequest { + context?: string; + search_engine?: unknown; +} +export const PutSearchWeightsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + context: S.optional(S.String.pipe(T.Query())), + search_engine: S.optional(S.Unknown.pipe(T.Query())), + }).pipe(T.Http({ method: "PUT", uri: "/api/search/weights", code: 200 })), +).annotate({ + identifier: "PutSearchWeightsRequest", +}) as any as S.Schema; + +export interface PutSearchWeightsResponse {} +export const PutSearchWeightsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutSearchWeightsResponse", +}) as any as S.Schema; + +export interface PutSegmentRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + caveats?: string | null; + definition?: MetabaseLibSchemaQuery | null; + description?: string | null; + name?: string | null; + points_of_interest?: string | null; + revision_message: string; + show_in_getting_started?: boolean | null; +} +export const PutSegmentRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + caveats: S.optional(S.NullOr(S.String)), + definition: S.optional(S.NullOr(MetabaseLibSchemaQuery)), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + points_of_interest: S.optional(S.NullOr(S.String)), + revision_message: S.String, + show_in_getting_started: S.optional(S.NullOr(S.Boolean)), + }).pipe(T.Http({ method: "PUT", uri: "/api/segment/{id}", code: 200 })), +).annotate({ + identifier: "PutSegmentRequest", +}) as any as S.Schema; + +export interface PutSegmentResponse {} +export const PutSegmentResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutSegmentResponse", +}) as any as S.Schema; + +export type PutSettingRequestBodyMap = { [key: string]: unknown | undefined }; +export const PutSettingRequestBodyMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export interface PutSettingRequest { + body?: PutSettingRequestBodyMap; +} +export const PutSettingRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + body: S.optional(PutSettingRequestBodyMap.pipe(T.HttpBody())), + }).pipe(T.Http({ method: "PUT", uri: "/api/setting", code: 200 })), +).annotate({ + identifier: "PutSettingRequest", +}) as any as S.Schema; + +export interface PutSettingResponse {} +export const PutSettingResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutSettingResponse", +}) as any as S.Schema; + +export interface PutSettingByKeyRequest { + key: string; + value: unknown; +} +export const PutSettingByKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + key: S.String.pipe(T.Label()), + value: S.Unknown, + }).pipe(T.Http({ method: "PUT", uri: "/api/setting/{key}", code: 200 })), +).annotate({ + identifier: "PutSettingByKeyRequest", +}) as any as S.Schema; + +export interface PutSettingByKeyResponse {} +export const PutSettingByKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutSettingByKeyResponse", +}) as any as S.Schema; + +export interface PutSlackSettingsRequest { + slack_app_token?: string | null; + slack_bug_report_channel?: string | null; +} +export const PutSlackSettingsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + slack_app_token: S.optional( + S.NullOr(S.String).pipe(T.Body("slack-app-token")), + ), + slack_bug_report_channel: S.optional( + S.NullOr(S.String).pipe(T.Body("slack-bug-report-channel")), + ), + }).pipe(T.Http({ method: "PUT", uri: "/api/slack/settings", code: 200 })), +).annotate({ + identifier: "PutSlackSettingsRequest", +}) as any as S.Schema; + +export interface PutSlackSettingsResponse {} +export const PutSlackSettingsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutSlackSettingsResponse", +}) as any as S.Schema; + +export type PutTableRequestVisibilityType = "technical" | "hidden" | "cruft"; +export const PutTableRequestVisibilityType = /*@__PURE__*/ S.String; + +/** Schema for writing a valid table data authority. */ +export type MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite = + | "computed" + | "authoritative" + | "unconfigured" + | "ingested"; +export const MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite = + /*@__PURE__*/ S.String; + +export type PutTableRequestIdsList = Array; +export const PutTableRequestIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface PutTableRequest { + points_of_interest?: string | null; + visibility_type?: PutTableRequestVisibilityType | (string & {}) | null; + data_authority?: + | MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite + | (string & {}) + | null; + data_layer?: string | null; + show_in_getting_started?: boolean | null; + owner_email?: string | null; + owner_user_id?: number | null; + ids: PutTableRequestIdsList; + display_name?: string | null; + data_source?: string | null; + caveats?: string | null; + entity_type?: unknown | null; + description?: string | null; +} +export const PutTableRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + points_of_interest: S.optional(S.NullOr(S.String)), + visibility_type: S.optional(S.NullOr(PutTableRequestVisibilityType)), + data_authority: S.optional( + S.NullOr(MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite), + ), + data_layer: S.optional(S.NullOr(S.String)), + show_in_getting_started: S.optional(S.NullOr(S.Boolean)), + owner_email: S.optional(S.NullOr(S.String)), + owner_user_id: S.optional(S.NullOr(S.Number)), + ids: PutTableRequestIdsList, + display_name: S.optional(S.NullOr(S.String)), + data_source: S.optional(S.NullOr(S.String)), + caveats: S.optional(S.NullOr(S.String)), + entity_type: S.optional(S.NullOr(S.Unknown)), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/table", code: 200 })), +).annotate({ + identifier: "PutTableRequest", +}) as any as S.Schema; + +export interface PutTableResponse {} +export const PutTableResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTableResponse", +}) as any as S.Schema; + +export type PutTableByIdRequestVisibilityType = + | "technical" + | "hidden" + | "cruft"; +export const PutTableByIdRequestVisibilityType = /*@__PURE__*/ S.String; + +export type PutTableByIdRequestFieldOrder = + | "alphabetical" + | "custom" + | "database" + | "smart"; +export const PutTableByIdRequestFieldOrder = /*@__PURE__*/ S.String; + +export interface PutTableByIdRequest { + /** value must be an integer greater than zero. */ + id: number; + points_of_interest?: string | null; + visibility_type?: PutTableByIdRequestVisibilityType | (string & {}) | null; + data_authority?: + | MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite + | (string & {}) + | null; + data_layer?: string | null; + show_in_getting_started?: boolean | null; + owner_email?: string | null; + owner_user_id?: number | null; + display_name?: string | null; + collection_id?: number | null; + data_source?: string | null; + caveats?: string | null; + entity_type?: unknown | null; + field_order?: PutTableByIdRequestFieldOrder | (string & {}) | null; + description?: string | null; +} +export const PutTableByIdRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + points_of_interest: S.optional(S.NullOr(S.String)), + visibility_type: S.optional(S.NullOr(PutTableByIdRequestVisibilityType)), + data_authority: S.optional( + S.NullOr(MetabaseWarehouseSchemaRestApiTableDataAuthorityWrite), + ), + data_layer: S.optional(S.NullOr(S.String)), + show_in_getting_started: S.optional(S.NullOr(S.Boolean)), + owner_email: S.optional(S.NullOr(S.String)), + owner_user_id: S.optional(S.NullOr(S.Number)), + display_name: S.optional(S.NullOr(S.String)), + collection_id: S.optional(S.NullOr(S.Number)), + data_source: S.optional(S.NullOr(S.String)), + caveats: S.optional(S.NullOr(S.String)), + entity_type: S.optional(S.NullOr(S.Unknown)), + field_order: S.optional(S.NullOr(PutTableByIdRequestFieldOrder)), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/table/{id}", code: 200 })), +).annotate({ + identifier: "PutTableByIdRequest", +}) as any as S.Schema; + +export interface PutTableByIdResponse {} +export const PutTableByIdResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTableByIdResponse", +}) as any as S.Schema; + +export type PutTableFieldsOrderRequestBodyCase0List = Array; +export const PutTableFieldsOrderRequestBodyCase0List = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type PutTableFieldsOrderRequestBodyCase1FieldOrderList = Array; +export const PutTableFieldsOrderRequestBodyCase1FieldOrderList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface PutTableFieldsOrderRequestBodyCase1 { + field_order: PutTableFieldsOrderRequestBodyCase1FieldOrderList; +} +export const PutTableFieldsOrderRequestBodyCase1 = /*@__PURE__*/ S.suspend(() => + S.Struct({ + field_order: PutTableFieldsOrderRequestBodyCase1FieldOrderList, + }), +).annotate({ + identifier: "PutTableFieldsOrderRequestBodyCase1", +}) as any as S.Schema; + +export type PutTableFieldsOrderRequestBody = + | PutTableFieldsOrderRequestBodyCase0List + | PutTableFieldsOrderRequestBodyCase1; +export const PutTableFieldsOrderRequestBody = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface PutTableFieldsOrderRequest { + /** value must be an integer greater than zero. */ + id: number; + body?: PutTableFieldsOrderRequestBody; +} +export const PutTableFieldsOrderRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + body: S.optional(PutTableFieldsOrderRequestBody.pipe(T.HttpBody())), + }).pipe( + T.Http({ method: "PUT", uri: "/api/table/{id}/fields/order", code: 200 }), + ), +).annotate({ + identifier: "PutTableFieldsOrderRequest", +}) as any as S.Schema; + +export interface PutTableFieldsOrderResponse {} +export const PutTableFieldsOrderResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTableFieldsOrderResponse", +}) as any as S.Schema; + +export type PutTimelineRequestIcon = + | "star" + | "cake" + | "mail" + | "warning" + | "bell" + | "cloud"; +export const PutTimelineRequestIcon = /*@__PURE__*/ S.String; + +export interface PutTimelineRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + collection_id?: number | null; + default?: boolean | null; + description?: string | null; + icon?: PutTimelineRequestIcon | (string & {}) | null; + name?: string | null; +} +export const PutTimelineRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + collection_id: S.optional(S.NullOr(S.Number)), + default: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + icon: S.optional(S.NullOr(PutTimelineRequestIcon)), + name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/timeline/{id}", code: 200 })), +).annotate({ + identifier: "PutTimelineRequest", +}) as any as S.Schema; + +export interface PutTimelineResponse {} +export const PutTimelineResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTimelineResponse", +}) as any as S.Schema; + +export type PutTimelineEventRequestIcon = + | "star" + | "cake" + | "mail" + | "warning" + | "bell" + | "cloud"; +export const PutTimelineEventRequestIcon = /*@__PURE__*/ S.String; + +export interface PutTimelineEventRequest { + /** value must be an integer greater than zero. */ + id: number; + archived?: boolean | null; + description?: string | null; + icon?: PutTimelineEventRequestIcon | (string & {}) | null; + name?: string | null; + time_matters?: boolean | null; + timeline_id?: number | null; + timestamp?: string | null; + timezone?: string | null; +} +export const PutTimelineEventRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + archived: S.optional(S.NullOr(S.Boolean)), + description: S.optional(S.NullOr(S.String)), + icon: S.optional(S.NullOr(PutTimelineEventRequestIcon)), + name: S.optional(S.NullOr(S.String)), + time_matters: S.optional(S.NullOr(S.Boolean)), + timeline_id: S.optional(S.NullOr(S.Number)), + timestamp: S.optional(S.NullOr(S.String)), + timezone: S.optional(S.NullOr(S.String)), + }).pipe( + T.Http({ method: "PUT", uri: "/api/timeline-event/{id}", code: 200 }), + ), +).annotate({ + identifier: "PutTimelineEventRequest", +}) as any as S.Schema; + +export interface PutTimelineEventResponse {} +export const PutTimelineEventResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTimelineEventResponse", +}) as any as S.Schema; + +export type PutTransformRequestTagIdsList = Array; +export const PutTransformRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export interface PutTransformRequest { + /** value must be an integer greater than zero. */ + id: number; + owner_email?: string | null; + owner_user_id?: number | null; + name?: string; + tag_ids?: PutTransformRequestTagIdsList; + collection_id?: number | null; + source?: MetabaseTransformsSchemaTransformSource; + target?: MetabaseTransformsSchemaTransformTarget; + run_trigger?: MetabaseTransformsRestApiTransformRunTrigger | (string & {}); + description?: string | null; +} +export const PutTransformRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + owner_email: S.optional(S.NullOr(S.String)), + owner_user_id: S.optional(S.NullOr(S.Number)), + name: S.optional(S.String), + tag_ids: S.optional(PutTransformRequestTagIdsList), + collection_id: S.optional(S.NullOr(S.Number)), + source: S.optional(MetabaseTransformsSchemaTransformSource), + target: S.optional(MetabaseTransformsSchemaTransformTarget), + run_trigger: S.optional(MetabaseTransformsRestApiTransformRunTrigger), + description: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/transform/{id}", code: 200 })), +).annotate({ + identifier: "PutTransformRequest", +}) as any as S.Schema; + +export interface PutTransformResponse {} +export const PutTransformResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTransformResponse", +}) as any as S.Schema; + +export type PutTransformJobRequestTagIdsList = Array; +export const PutTransformJobRequestTagIdsList = /*@__PURE__*/ S.Array( + S.Number, +) as any as S.Schema; + +export type PutTransformJobRequestUiDisplayType = "cron/raw" | "cron/builder"; +export const PutTransformJobRequestUiDisplayType = /*@__PURE__*/ S.String; + +export interface PutTransformJobRequest { + /** value must be an integer greater than zero. */ + job_id: number; + active?: boolean; + description?: string | null; + name?: string; + schedule?: string; + tag_ids?: PutTransformJobRequestTagIdsList; + ui_display_type?: PutTransformJobRequestUiDisplayType | (string & {}); +} +export const PutTransformJobRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + job_id: S.Number.pipe(T.Label()), + active: S.optional(S.Boolean), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.String), + schedule: S.optional(S.String), + tag_ids: S.optional(PutTransformJobRequestTagIdsList), + ui_display_type: S.optional(PutTransformJobRequestUiDisplayType), + }).pipe( + T.Http({ method: "PUT", uri: "/api/transform-job/{job_id}", code: 200 }), + ), +).annotate({ + identifier: "PutTransformJobRequest", +}) as any as S.Schema; + +export interface PutTransformJobResponse {} +export const PutTransformJobResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTransformJobResponse", +}) as any as S.Schema; + +export interface PutTransformJobActiveRequest { + active: boolean; +} +export const PutTransformJobActiveRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + active: S.Boolean, + }).pipe( + T.Http({ method: "PUT", uri: "/api/transform-job/active", code: 200 }), + ), +).annotate({ + identifier: "PutTransformJobActiveRequest", +}) as any as S.Schema; + +export interface PutTransformJobActiveResponse {} +export const PutTransformJobActiveResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTransformJobActiveResponse", +}) as any as S.Schema; + +export interface PutTransformTagRequest { + /** value must be an integer greater than zero. */ + tag_id: number; + name: string; +} +export const PutTransformTagRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + tag_id: S.Number.pipe(T.Label()), + name: S.String, + }).pipe( + T.Http({ method: "PUT", uri: "/api/transform-tag/{tag_id}", code: 200 }), + ), +).annotate({ + identifier: "PutTransformTagRequest", +}) as any as S.Schema; + +export interface PutTransformTagResponse {} +export const PutTransformTagResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutTransformTagResponse", +}) as any as S.Schema; + +export type PutUserRequestLoginAttributesMap = { + [key: string]: unknown | undefined; +}; +export const PutUserRequestLoginAttributesMap = /*@__PURE__*/ S.Record( + S.String, + S.Unknown, +) as any as S.Schema; + +export type PutUserRequestUserGroupMembershipsList = + Array; +export const PutUserRequestUserGroupMembershipsList = /*@__PURE__*/ S.Array( + MetabaseUsersSchemaUserGroupMembership, +) as any as S.Schema; + +export interface PutUserRequest { + /** value must be an integer greater than zero. */ + id: number; + login_attributes?: PutUserRequestLoginAttributesMap | null; + user_group_memberships?: PutUserRequestUserGroupMembershipsList | null; + email?: string | null; + is_data_analyst?: boolean | null; + locale?: string | null; + is_group_manager?: boolean | null; + is_superuser?: boolean | null; + tenant_id?: number | null; + last_name?: string | null; + first_name?: string | null; +} +export const PutUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + login_attributes: S.optional(S.NullOr(PutUserRequestLoginAttributesMap)), + user_group_memberships: S.optional( + S.NullOr(PutUserRequestUserGroupMembershipsList), + ), + email: S.optional(S.NullOr(S.String)), + is_data_analyst: S.optional(S.NullOr(S.Boolean)), + locale: S.optional(S.NullOr(S.String)), + is_group_manager: S.optional(S.NullOr(S.Boolean)), + is_superuser: S.optional(S.NullOr(S.Boolean)), + tenant_id: S.optional(S.NullOr(S.Number)), + last_name: S.optional(S.NullOr(S.String)), + first_name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "PUT", uri: "/api/user/{id}", code: 200 })), +).annotate({ identifier: "PutUserRequest" }) as any as S.Schema; + +export interface PutUserResponse {} +export const PutUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutUserResponse", +}) as any as S.Schema; + +export interface PutUserKeyValueNamespaceKeyRequest { + namespace: string; + key: string; + expires_at?: string | null; + value?: unknown; +} +export const PutUserKeyValueNamespaceKeyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + namespace: S.String.pipe(T.Label()), + key: S.String.pipe(T.Label()), + expires_at: S.optional(S.NullOr(S.String)), + value: S.optional(S.Unknown), + }).pipe( + T.Http({ + method: "PUT", + uri: "/api/user-key-value/namespace/{namespace}/key/{key}", + code: 200, + }), + ), +).annotate({ + identifier: "PutUserKeyValueNamespaceKeyRequest", +}) as any as S.Schema; + +export interface PutUserKeyValueNamespaceKeyResponse {} +export const PutUserKeyValueNamespaceKeyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutUserKeyValueNamespaceKeyResponse", +}) as any as S.Schema; + +export type PutUserModalRequestModal = "qbnewb" | "datasetnewb"; +export const PutUserModalRequestModal = /*@__PURE__*/ S.String; + +export interface PutUserModalRequest { + /** value must be an integer greater than zero. */ + id: number; + modal: PutUserModalRequestModal | (string & {}); +} +export const PutUserModalRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + modal: PutUserModalRequestModal.pipe(T.Label()), + }).pipe( + T.Http({ method: "PUT", uri: "/api/user/{id}/modal/{modal}", code: 200 }), + ), +).annotate({ + identifier: "PutUserModalRequest", +}) as any as S.Schema; + +export interface PutUserModalResponse {} +export const PutUserModalResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutUserModalResponse", +}) as any as S.Schema; + +export interface PutUserPasswordRequest { + /** value must be an integer greater than zero. */ + id: number; + old_password?: string | null; + /** password is too common. */ + password: string | Redacted.Redacted; +} +export const PutUserPasswordRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + old_password: S.optional(S.NullOr(S.String)), + password: S.String.pipe(T.SensitiveValue({})), + }).pipe(T.Http({ method: "PUT", uri: "/api/user/{id}/password", code: 200 })), +).annotate({ + identifier: "PutUserPasswordRequest", +}) as any as S.Schema; + +export interface PutUserPasswordResponse {} +export const PutUserPasswordResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutUserPasswordResponse", +}) as any as S.Schema; + +export interface PutUserReactivateRequest { + /** value must be an integer greater than zero. */ + id: number; +} +export const PutUserReactivateRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "PUT", uri: "/api/user/{id}/reactivate", code: 200 }), + ), +).annotate({ + identifier: "PutUserReactivateRequest", +}) as any as S.Schema; + +export interface PutUserReactivateResponse {} +export const PutUserReactivateResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "PutUserReactivateResponse", +}) as any as S.Schema; + +export type UpdateBookmarkRequestModel = + | "card" + | "dashboard" + | "collection" + | "document"; +export const UpdateBookmarkRequestModel = /*@__PURE__*/ S.String; + +export interface UpdateBookmarkRequest { + model: UpdateBookmarkRequestModel | (string & {}); + /** value must be an integer greater than zero. */ + id: number; +} +export const UpdateBookmarkRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + model: UpdateBookmarkRequestModel.pipe(T.Label()), + id: S.Number.pipe(T.Label()), + }).pipe( + T.Http({ method: "POST", uri: "/api/bookmark/{model}/{id}", code: 200 }), + ), +).annotate({ + identifier: "UpdateBookmarkRequest", +}) as any as S.Schema; + +export interface UpdateBookmarkResponse {} +export const UpdateBookmarkResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateBookmarkResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type UpdateCardQueryRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const UpdateCardQueryRequestExportFormat = /*@__PURE__*/ S.String; + +export interface UpdateCardQueryRequest { + /** value must be an integer greater than zero. */ + card_id: number; + export_format: UpdateCardQueryRequestExportFormat | (string & {}); + csv_include_bom?: boolean; + format_rows?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; + pivot_results?: boolean; +} +export const UpdateCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + card_id: S.Number.pipe(T.Label()), + export_format: UpdateCardQueryRequestExportFormat.pipe(T.Label()), + csv_include_bom: S.optional(S.Boolean), + format_rows: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + pivot_results: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/card/{card_id}/query/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateCardQueryRequest", +}) as any as S.Schema; + +export interface UpdateCardQueryResponse {} +export const UpdateCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateCardQueryResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type UpdateDashboardDashcardCardRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const UpdateDashboardDashcardCardRequestExportFormat = + /*@__PURE__*/ S.String; + +export interface UpdateDashboardDashcardCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + export_format: UpdateDashboardDashcardCardRequestExportFormat | (string & {}); + csv_include_bom?: boolean | null; + format_rows?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; + pivot_results?: boolean; +} +export const UpdateDashboardDashcardCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + export_format: UpdateDashboardDashcardCardRequestExportFormat.pipe( + T.Label(), + ), + csv_include_bom: S.optional(S.NullOr(S.Boolean)), + format_rows: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + pivot_results: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/public/dashboard/{uuid}/dashcard/{dashcard_id}/card/{card_id}/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDashboardDashcardCardRequest", +}) as any as S.Schema; + +export interface UpdateDashboardDashcardCardResponse {} +export const UpdateDashboardDashcardCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateDashboardDashcardCardResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type UpdateDashboardDashcardCardQueryRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const UpdateDashboardDashcardCardQueryRequestExportFormat = + /*@__PURE__*/ S.String; + +export interface UpdateDashboardDashcardCardQueryRequest { + /** value must be an integer greater than zero. */ + dashboard_id: number; + /** value must be an integer greater than zero. */ + dashcard_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + export_format: + | UpdateDashboardDashcardCardQueryRequestExportFormat + | (string & {}); + format_rows?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; + pivot_results?: boolean; +} +export const UpdateDashboardDashcardCardQueryRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + dashboard_id: S.Number.pipe(T.Label()), + dashcard_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + export_format: UpdateDashboardDashcardCardQueryRequestExportFormat.pipe( + T.Label(), + ), + format_rows: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + pivot_results: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/{dashboard_id}/dashcard/{dashcard_id}/card/{card_id}/query/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDashboardDashcardCardQueryRequest", +}) as any as S.Schema; + +export interface UpdateDashboardDashcardCardQueryResponse {} +export const UpdateDashboardDashcardCardQueryResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "UpdateDashboardDashcardCardQueryResponse", +}) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId = + | number + | string; +export const UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem { + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + description?: string | null; + display?: string | null; + id?: UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId | null; + name?: string | null; + visualization_settings?: unknown | null; +} +export const UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(S.String)), + id: S.optional( + S.NullOr(UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItemId), + ), + name: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }), + ).annotate({ + identifier: "UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem", + }) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList = + Array; +export const UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList = + /*@__PURE__*/ S.Array( + UpdateDashboardSaveCollectionRequestDashcardsItemSeriesItem, + ) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestDashcardsItemCardId = + | number + | string; +export const UpdateDashboardSaveCollectionRequestDashcardsItemCardId = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface UpdateDashboardSaveCollectionRequestDashcardsItemCard { + dataset_query?: MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery | null; + description?: string | null; + display?: string | null; + id?: UpdateDashboardSaveCollectionRequestDashcardsItemCardId | null; + name?: string | null; + visualization_settings?: unknown | null; +} +export const UpdateDashboardSaveCollectionRequestDashcardsItemCard = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + dataset_query: S.optional( + S.NullOr(MetabaseLibBeSchemaMaybeLegacyOrEmptyQuery), + ), + description: S.optional(S.NullOr(S.String)), + display: S.optional(S.NullOr(S.String)), + id: S.optional( + S.NullOr(UpdateDashboardSaveCollectionRequestDashcardsItemCardId), + ), + name: S.optional(S.NullOr(S.String)), + visualization_settings: S.optional(S.NullOr(S.Unknown)), + }), + ).annotate({ + identifier: "UpdateDashboardSaveCollectionRequestDashcardsItemCard", + }) as any as S.Schema; + +export interface UpdateDashboardSaveCollectionRequestDashcardsItem { + visualization_settings?: unknown | null; + dashboard_tab_id?: number | null; + parameter_mappings?: MetabaseParametersSchemaParameterMappings | null; + size_x?: number | null; + size_y?: number | null; + col?: number | null; + row?: number | null; + series?: UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList | null; + card?: UpdateDashboardSaveCollectionRequestDashcardsItemCard | null; +} +export const UpdateDashboardSaveCollectionRequestDashcardsItem = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + visualization_settings: S.optional(S.NullOr(S.Unknown)), + dashboard_tab_id: S.optional(S.NullOr(S.Number)), + parameter_mappings: S.optional( + S.NullOr(MetabaseParametersSchemaParameterMappings), + ), + size_x: S.optional(S.NullOr(S.Number)), + size_y: S.optional(S.NullOr(S.Number)), + col: S.optional(S.NullOr(S.Number)), + row: S.optional(S.NullOr(S.Number)), + series: S.optional( + S.NullOr(UpdateDashboardSaveCollectionRequestDashcardsItemSeriesList), + ), + card: S.optional( + S.NullOr(UpdateDashboardSaveCollectionRequestDashcardsItemCard), + ), + }), + ).annotate({ + identifier: "UpdateDashboardSaveCollectionRequestDashcardsItem", + }) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestDashcardsList = + Array; +export const UpdateDashboardSaveCollectionRequestDashcardsList = + /*@__PURE__*/ S.Array( + UpdateDashboardSaveCollectionRequestDashcardsItem, + ) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestTabsItem = + CreateDashboardSaveRequestTabsItem; +export const UpdateDashboardSaveCollectionRequestTabsItem = + CreateDashboardSaveRequestTabsItem; + +export type UpdateDashboardSaveCollectionRequestTabsList = + Array; +export const UpdateDashboardSaveCollectionRequestTabsList = + /*@__PURE__*/ S.Array( + CreateDashboardSaveRequestTabsItem, + ) as any as S.Schema; + +export type UpdateDashboardSaveCollectionRequestWidth = "fixed" | "full"; +export const UpdateDashboardSaveCollectionRequestWidth = /*@__PURE__*/ S.String; + +export interface UpdateDashboardSaveCollectionRequest { + /** value must be an integer greater than zero. */ + parent_collection_id: number; + auto_apply_filters?: boolean | null; + dashcards?: UpdateDashboardSaveCollectionRequestDashcardsList | null; + description?: string | null; + name?: string | null; + parameters?: MetabaseParametersSchemaParameters | null; + tabs?: UpdateDashboardSaveCollectionRequestTabsList | null; + width?: UpdateDashboardSaveCollectionRequestWidth | (string & {}) | null; +} +export const UpdateDashboardSaveCollectionRequest = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + parent_collection_id: S.Number.pipe(T.Label()), + auto_apply_filters: S.optional(S.NullOr(S.Boolean)), + dashcards: S.optional( + S.NullOr(UpdateDashboardSaveCollectionRequestDashcardsList), + ), + description: S.optional(S.NullOr(S.String)), + name: S.optional(S.NullOr(S.String)), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameters)), + tabs: S.optional(S.NullOr(UpdateDashboardSaveCollectionRequestTabsList)), + width: S.optional(S.NullOr(UpdateDashboardSaveCollectionRequestWidth)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dashboard/save/collection/{parent_collection_id}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDashboardSaveCollectionRequest", +}) as any as S.Schema; + +export interface UpdateDashboardSaveCollectionResponse {} +export const UpdateDashboardSaveCollectionResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "UpdateDashboardSaveCollectionResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type UpdateDatasetRequestExportFormat = "csv" | "api" | "xlsx" | "json"; +export const UpdateDatasetRequestExportFormat = /*@__PURE__*/ S.String; + +export interface UpdateDatasetRequest { + export_format: UpdateDatasetRequestExportFormat | (string & {}); + csv_include_bom?: boolean; + format_rows?: boolean; + pivot_results?: boolean; + query: MetabaseLibBeSchemaMaybeLegacyOrInternalQuery; + visualization_settings?: unknown; +} +export const UpdateDatasetRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + export_format: UpdateDatasetRequestExportFormat.pipe(T.Label()), + csv_include_bom: S.optional(S.Boolean), + format_rows: S.optional(S.Boolean), + pivot_results: S.optional(S.Boolean), + query: MetabaseLibBeSchemaMaybeLegacyOrInternalQuery, + visualization_settings: S.optional(S.Unknown), + }).pipe( + T.Http({ method: "POST", uri: "/api/dataset/{export_format}", code: 200 }), + ), +).annotate({ + identifier: "UpdateDatasetRequest", +}) as any as S.Schema; + +export interface UpdateDatasetResponse {} +export const UpdateDatasetResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateDatasetResponse", +}) as any as S.Schema; + +export type UpdateDatasetParameterSearchRequestFieldIdsList = Array; +export const UpdateDatasetParameterSearchRequestFieldIdsList = + /*@__PURE__*/ S.Array( + S.Number, + ) as any as S.Schema; + +export interface UpdateDatasetParameterSearchRequest { + query: string; + field_ids?: UpdateDatasetParameterSearchRequestFieldIdsList | null; + parameter: MetabaseParametersSchemaParameter; +} +export const UpdateDatasetParameterSearchRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + query: S.String.pipe(T.Label()), + field_ids: S.optional( + S.NullOr(UpdateDatasetParameterSearchRequestFieldIdsList), + ), + parameter: MetabaseParametersSchemaParameter, + }).pipe( + T.Http({ + method: "POST", + uri: "/api/dataset/parameter/search/{query}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDatasetParameterSearchRequest", +}) as any as S.Schema; + +export interface UpdateDatasetParameterSearchResponse {} +export const UpdateDatasetParameterSearchResponse = /*@__PURE__*/ S.suspend( + () => S.Struct({}), +).annotate({ + identifier: "UpdateDatasetParameterSearchResponse", +}) as any as S.Schema; + +/** Schema for valid export formats for downloading query results. */ +export type UpdateDocumentCardRequestExportFormat = + | "csv" + | "api" + | "xlsx" + | "json"; +export const UpdateDocumentCardRequestExportFormat = /*@__PURE__*/ S.String; + +export interface UpdateDocumentCardRequest { + /** value must be a valid UUID. */ + uuid: string; + /** value must be an integer greater than zero. */ + card_id: number; + export_format: UpdateDocumentCardRequestExportFormat | (string & {}); + csv_include_bom?: boolean | null; + format_rows?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; + pivot_results?: boolean; +} +export const UpdateDocumentCardRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + uuid: S.String.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + export_format: UpdateDocumentCardRequestExportFormat.pipe(T.Label()), + csv_include_bom: S.optional(S.NullOr(S.Boolean)), + format_rows: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + pivot_results: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/public/document/{uuid}/card/{card_id}/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDocumentCardRequest", +}) as any as S.Schema; + +export interface UpdateDocumentCardResponse {} +export const UpdateDocumentCardResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateDocumentCardResponse", +}) as any as S.Schema; + +export interface UpdateDocumentCardQueryRequest { + /** value must be an integer greater than zero. */ + document_id: number; + /** value must be an integer greater than zero. */ + card_id: number; + export_format: string; + format_rows?: boolean; + parameters?: MetabaseParametersSchemaParameterValues | null; + pivot_results?: boolean; +} +export const UpdateDocumentCardQueryRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + document_id: S.Number.pipe(T.Label()), + card_id: S.Number.pipe(T.Label()), + export_format: S.String.pipe(T.Label()), + format_rows: S.optional(S.Boolean), + parameters: S.optional(S.NullOr(MetabaseParametersSchemaParameterValues)), + pivot_results: S.optional(S.Boolean), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/document/{document_id}/card/{card_id}/query/{export_format}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateDocumentCardQueryRequest", +}) as any as S.Schema; + +export interface UpdateDocumentCardQueryResponse {} +export const UpdateDocumentCardQueryResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateDocumentCardQueryResponse", +}) as any as S.Schema; + +export type UpdateEeCloudAddOnsRequestProductType = + | "metabase-ai" + | "metabase-ai-tiered" + | "metabase-ai-managed" + | "python-execution" + | "transforms" + | "transforms-basic" + | "transforms-advanced" + | "transforms-basic-metered" + | "transforms-advanced-metered" + | "dwh-rent" + | "etl-connections"; +export const UpdateEeCloudAddOnsRequestProductType = /*@__PURE__*/ S.String; + +export interface UpdateEeCloudAddOnsRequest { + product_type: UpdateEeCloudAddOnsRequestProductType | (string & {}); + quantity?: number | null; + terms_of_service?: boolean | null; +} +export const UpdateEeCloudAddOnsRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + product_type: UpdateEeCloudAddOnsRequestProductType.pipe(T.Label()), + quantity: S.optional(S.NullOr(S.Number)), + terms_of_service: S.optional(S.NullOr(S.Boolean)), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/cloud-add-ons/{product_type}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateEeCloudAddOnsRequest", +}) as any as S.Schema; + +export interface UpdateEeCloudAddOnsResponse {} +export const UpdateEeCloudAddOnsResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateEeCloudAddOnsResponse", +}) as any as S.Schema; + +export interface UpdateEeCloudProxyRequestBody { + force_end_trial?: boolean; + new_plan_alias?: string; + plan_alias?: string; +} +export const UpdateEeCloudProxyRequestBody = /*@__PURE__*/ S.suspend(() => + S.Struct({ + force_end_trial: S.optional(S.Boolean.pipe(T.Body("force-end-trial"))), + new_plan_alias: S.optional(S.String.pipe(T.Body("new-plan-alias"))), + plan_alias: S.optional(S.String.pipe(T.Body("plan-alias"))), + }), +).annotate({ + identifier: "UpdateEeCloudProxyRequestBody", +}) as any as S.Schema; + +export interface UpdateEeCloudProxyRequest { + operation_id: string; + body?: UpdateEeCloudProxyRequestBody | null; +} +export const UpdateEeCloudProxyRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + operation_id: S.String.pipe(T.Label()), + body: S.optional( + S.NullOr(UpdateEeCloudProxyRequestBody).pipe(T.HttpBody()), + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/cloud-proxy/{operation_id}", + code: 200, + }), + ), +).annotate({ + identifier: "UpdateEeCloudProxyRequest", +}) as any as S.Schema; + +export interface UpdateEeCloudProxyResponse {} +export const UpdateEeCloudProxyResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateEeCloudProxyResponse", +}) as any as S.Schema; + +export type UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType = + | "inclusion" + | "exclusion" + | "all"; +export const UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType = + /*@__PURE__*/ S.String; + +export interface UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters { + schema_filters_patterns: string; + schema_filters_type: + | UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType + | (string & {}); +} +export const UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + schema_filters_patterns: S.String.pipe(T.Body("schema-filters-patterns")), + schema_filters_type: + UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFiltersSchemaFiltersType.pipe( + T.Body("schema-filters-type"), + ), + }), + ).annotate({ + identifier: + "UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters", + }) as any as S.Schema; + +export interface UpdateEeDatabaseReplicationConnectionDatabaseRequest { + /** value must be an integer greater than zero. */ + database_id: number; + replicationSchemaFilters?: UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters; +} +export const UpdateEeDatabaseReplicationConnectionDatabaseRequest = + /*@__PURE__*/ S.suspend(() => + S.Struct({ + database_id: S.Number.pipe(T.Label()), + replicationSchemaFilters: S.optional( + UpdateEeDatabaseReplicationConnectionDatabaseRequestReplicationSchemaFilters, + ), + }).pipe( + T.Http({ + method: "POST", + uri: "/api/ee/database-replication/connection/{database_id}", + code: 200, + }), + ), + ).annotate({ + identifier: "UpdateEeDatabaseReplicationConnectionDatabaseRequest", + }) as any as S.Schema; + +export interface UpdateEeDatabaseReplicationConnectionDatabaseResponse {} +export const UpdateEeDatabaseReplicationConnectionDatabaseResponse = + /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ + identifier: "UpdateEeDatabaseReplicationConnectionDatabaseResponse", + }) as any as S.Schema; + +export type UpdateEeScimUserRequestOperationsItemValueCase0Map = { + [key: string]: unknown | undefined; +}; +export const UpdateEeScimUserRequestOperationsItemValueCase0Map = + /*@__PURE__*/ S.Record( + S.String, + S.Unknown, + ) as any as S.Schema; + +/** A single attribute value in a PATCH operation. Deliberately *not* `ms/BooleanValue`: its decoder maps everything that isn't `true`/"true" onto `false`, so a blank or junk value would coerce into a deactivation rather than be rejected. The strings clients send for booleans are parsed by the handler instead. */ +export type MetabaseEnterpriseScimV2ApiPatchValue = string | boolean; +export const MetabaseEnterpriseScimV2ApiPatchValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export type UpdateEeScimUserRequestOperationsItemValue = + | UpdateEeScimUserRequestOperationsItemValueCase0Map + | MetabaseEnterpriseScimV2ApiPatchValue; +export const UpdateEeScimUserRequestOperationsItemValue = + /*@__PURE__*/ S.Unknown as any as S.Schema; + +export interface UpdateEeScimUserRequestOperationsItem { + op: string; + path?: string | null; + value: UpdateEeScimUserRequestOperationsItemValue; +} +export const UpdateEeScimUserRequestOperationsItem = /*@__PURE__*/ S.suspend( + () => + S.Struct({ + op: S.String, + path: S.optional(S.NullOr(S.String)), + value: UpdateEeScimUserRequestOperationsItemValue, + }), +).annotate({ + identifier: "UpdateEeScimUserRequestOperationsItem", +}) as any as S.Schema; + +export type UpdateEeScimUserRequestOperationsList = + Array; +export const UpdateEeScimUserRequestOperationsList = /*@__PURE__*/ S.Array( + UpdateEeScimUserRequestOperationsItem, +) as any as S.Schema; + +export type UpdateEeScimUserRequestSchemasList = Array; +export const UpdateEeScimUserRequestSchemasList = /*@__PURE__*/ S.Array( + S.String, +) as any as S.Schema; + +export interface UpdateEeScimUserRequest { + id: string; + Operations: UpdateEeScimUserRequestOperationsList; + schemas: UpdateEeScimUserRequestSchemasList; +} +export const UpdateEeScimUserRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.String.pipe(T.Label()), + Operations: UpdateEeScimUserRequestOperationsList, + schemas: UpdateEeScimUserRequestSchemasList, + }).pipe( + T.Http({ method: "PATCH", uri: "/api/ee/scim/v2/Users/{id}", code: 200 }), + ), +).annotate({ + identifier: "UpdateEeScimUserRequest", +}) as any as S.Schema; + +export interface UpdateEeScimUserResponse {} +export const UpdateEeScimUserResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateEeScimUserResponse", +}) as any as S.Schema; + +export type UpdateNotifyDbRequestScan = "full" | "schema"; +export const UpdateNotifyDbRequestScan = /*@__PURE__*/ S.String; + +export interface UpdateNotifyDbRequest { + /** value must be an integer greater than zero. */ + id: number; + scan?: UpdateNotifyDbRequestScan | (string & {}) | null; + synchronous_?: boolean | null; + table_id?: number | null; + table_name?: string | null; +} +export const UpdateNotifyDbRequest = /*@__PURE__*/ S.suspend(() => + S.Struct({ + id: S.Number.pipe(T.Label()), + scan: S.optional(S.NullOr(UpdateNotifyDbRequestScan)), + synchronous_: S.optional(S.NullOr(S.Boolean).pipe(T.Body("synchronous?"))), + table_id: S.optional(S.NullOr(S.Number)), + table_name: S.optional(S.NullOr(S.String)), + }).pipe(T.Http({ method: "POST", uri: "/api/notify/db/{id}", code: 200 })), +).annotate({ + identifier: "UpdateNotifyDbRequest", +}) as any as S.Schema; + +export interface UpdateNotifyDbResponse {} +export const UpdateNotifyDbResponse = /*@__PURE__*/ S.suspend(() => + S.Struct({}), +).annotate({ + identifier: "UpdateNotifyDbResponse", +}) as any as S.Schema; + +export type CreateActionError = MetabaseOpError; +/** POST /api/action Create a new action. */ +export const createAction: API.OperationMethod< + CreateActionRequest, + CreateActionResponse, + CreateActionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateActionRequest, + output: CreateActionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateActionExecuteError = MetabaseOpError; +/** POST /api/action/{id}/execute Execute the Action. `parameters` should be the mapped dashboard parameters with values. */ +export const createActionExecute: API.OperationMethod< + CreateActionExecuteRequest, + CreateActionExecuteResponse, + CreateActionExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateActionExecuteRequest, + output: CreateActionExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateActionExecute2Error = MetabaseOpError; +/** POST /api/public/action/{uuid}/execute Execute the Action. `parameters` should be the mapped dashboard parameters with values. */ +export const createActionExecute2: API.OperationMethod< + CreateActionExecuteRequest2, + CreateActionExecute2Response, + CreateActionExecute2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateActionExecuteRequest2, + output: CreateActionExecute2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateActionPublicLinkError = MetabaseOpError; +/** POST /api/action/{id}/public_link Generate publicly-accessible links for this Action. Returns UUID to be used in public links. (If this Action has already been shared, it will return the existing public link rather than creating a new one.) Public sharing must be enabled. */ +export const createActionPublicLink: API.OperationMethod< + CreateActionPublicLinkRequest, + CreateActionPublicLinkResponse, + CreateActionPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateActionPublicLinkRequest, + output: CreateActionPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateActivityRecentError = MetabaseOpError; +/** POST /api/activity/recents Adds a model to the list of recently selected items. */ +export const createActivityRecent: API.OperationMethod< + CreateActivityRecentRequest, + CreateActivityRecentResponse, + CreateActivityRecentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateActivityRecentRequest, + output: CreateActivityRecentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentCollectionError = MetabaseOpError; +/** POST /api/agent/v1/collection Create a new Collection. Pass `parent_collection_id` to nest under another collection; omit for a root-level collection. The caller must have write access to the parent (or root, if no parent given). */ +export const createAgentCollection: API.OperationMethod< + CreateAgentCollectionRequest, + CreateAgentCollectionResponse, + CreateAgentCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentCollectionRequest, + output: CreateAgentCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentConstructNativeQueryError = MetabaseOpError; +/** POST /api/agent/v1/construct-native-query Construct a native (raw SQL) query against a database. Wraps `sql` into a serialized native query and returns it base64-encoded — the same `{"query": }` shape as /v2/construct-query — so it can be saved as a question via /v1/question (the MCP layer swaps the base64 for a `query_handle`). This endpoint does NOT execute the SQL; to run native SQL ad hoc use /v1/execute-sql. The MBQL execution endpoints (/v1/execute, /v2/query) reject native queries by design, so a handle produced here is for saving, not for /v2/query execution. */ +export const createAgentConstructNativeQuery: API.OperationMethod< + CreateAgentConstructNativeQueryRequest, + CreateAgentConstructNativeQueryResponse, + CreateAgentConstructNativeQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentConstructNativeQueryRequest, + output: CreateAgentConstructNativeQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentConstructQueryError = MetabaseOpError; +/** POST /api/agent/v2/construct-query Construct an MBQL query from a portable MBQL 5 representations JSON payload. The body is `{"query": }` where `` is a JSON object matching `::lib.schema/external-query` — see the `construct_notebook_query` tool documentation for the format reference. Returns a base64-encoded MBQL query that can be executed via /v1/execute or paginated via /v2/query. */ +export const createAgentConstructQuery: API.OperationMethod< + CreateAgentConstructQueryRequest, + CreateAgentConstructQueryResponse, + CreateAgentConstructQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentConstructQueryRequest, + output: CreateAgentConstructQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentDashboardError = MetabaseOpError; +/** POST /api/agent/v1/dashboard Create a new dashboard, optionally populated with saved questions. Pass `question_ids` to add existing saved questions as cards on the dashboard. Cards are automatically positioned on the grid based on their display type. If `collection_id` is omitted the dashboard is saved to the caller's personal collection. Pass an explicit `null` to save it to the root collection. The response `collection_path` is the saved location. */ +export const createAgentDashboard: API.OperationMethod< + CreateAgentDashboardRequest, + CreateAgentDashboardResponse, + CreateAgentDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentDashboardRequest, + output: CreateAgentDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentExecuteError = MetabaseOpError; +/** POST /api/agent/v1/execute Execute an MBQL query and return results. Accepts a base64-encoded MBQL query (as returned by /v1/construct-query) and executes it, returning results with column metadata. Response format: - On success: {:data {:cols [...] :rows [...]} :row_count N :status :completed :running_time M} - On failure: {:status :failed :error "message" ...} Standard userspace query limits are enforced (2000 rows for simple queries, 10000 for aggregated). */ +export const createAgentExecute: API.OperationMethod< + CreateAgentExecuteRequest, + CreateAgentExecuteResponse, + CreateAgentExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentExecuteRequest, + output: CreateAgentExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentExecuteSqlError = MetabaseOpError; +/** POST /api/agent/v1/execute-sql Execute a raw SQL query against a database. Returns rows + column metadata. Requires the user to have native-query permission on the target database; the QP middleware enforces this. The instance-level `mcp-execute-sql-enabled` setting must also be on (it is by default). */ +export const createAgentExecuteSql: API.OperationMethod< + CreateAgentExecuteSqlRequest, + CreateAgentExecuteSqlResponse, + CreateAgentExecuteSqlError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentExecuteSqlRequest, + output: CreateAgentExecuteSqlResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentMetricError = MetabaseOpError; +/** POST /api/agent/v1/metric Save a previously constructed query as a named metric. A metric is a reusable aggregation (a `Card` of type `metric`): the underlying query must have exactly one aggregation and at most one date/datetime grouping. The `query` parameter accepts a `query_handle` (UUID) returned by `construct_query`, or a base64-encoded MBQL string. MCP callers should always use the handle. Optionally specify display type, description, collection, and visualization settings. If `collection_id` is omitted the metric is saved to the caller's personal collection. Pass an explicit `null` to save it to the root collection. The response `collection_path` is the saved location. */ +export const createAgentMetric: API.OperationMethod< + CreateAgentMetricRequest, + CreateAgentMetricResponse, + CreateAgentMetricError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentMetricRequest, + output: CreateAgentMetricResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentQueryError = MetabaseOpError; +/** POST /api/agent/v2/query Execute a portable MBQL 5 representations JSON query and stream the results, with continuation-token pagination. Accepts either a JSON body (same shape as /v2/construct-query) or a `continuation_token` from a previous response. Returns results with column metadata and an optional `continuation_token` for fetching the next page. */ +export const createAgentQuery: API.OperationMethod< + CreateAgentQueryRequest, + CreateAgentQueryResponse, + CreateAgentQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentQueryRequest, + output: CreateAgentQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentQuestionError = MetabaseOpError; +/** POST /api/agent/v1/question Save a previously constructed query as a named question (card). The `query` parameter accepts a `query_handle` (UUID) returned by `construct_query` (MBQL) or `construct_native_query` (native SQL), or a base64-encoded query string. MCP callers should always use the handle. Optionally specify display type, description, collection, and visualization settings. If `collection_id` is omitted the question is saved to the caller's personal collection. Pass an explicit `null` to save it to the root collection. The response `collection_path` is the saved location. Saving a native (raw SQL) query requires native-query permission on the target database. */ +export const createAgentQuestion: API.OperationMethod< + CreateAgentQuestionRequest, + CreateAgentQuestionResponse, + CreateAgentQuestionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentQuestionRequest, + output: CreateAgentQuestionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentQuestionQueryError = MetabaseOpError; +/** POST /api/agent/v1/question/{id}/query Run a saved question (card) and return its results. Executes the query stored on the card under the caller's permissions and returns rows + column metadata — the same response shape as /v1/execute. Parameterized questions are NOT supported: if the card declares parameters or input template tags (field filters / variables), this returns a 400. Run it in Metabase, or save a parameterless version. */ +export const createAgentQuestionQuery: API.OperationMethod< + CreateAgentQuestionQueryRequest, + CreateAgentQuestionQueryResponse, + CreateAgentQuestionQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentQuestionQueryRequest, + output: CreateAgentQuestionQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentReadResourceError = MetabaseOpError; +/** POST /api/agent/v1/read-resource Read one or more Metabase resources via metabase:// URI patterns. Dispatches into the shared URI resolver in `metabase.metabot.tools.resources`, which validates URIs, fetches entities with per-URI permission checks, and returns a map of `{:resources ... :output ...}`. Up to 5 URIs per call. */ +export const createAgentReadResource: API.OperationMethod< + CreateAgentReadResourceRequest, + CreateAgentReadResourceResponse, + CreateAgentReadResourceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentReadResourceRequest, + output: CreateAgentReadResourceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAgentSearchError = MetabaseOpError; +/** POST /api/agent/v1/search Search for tables, models, metrics, saved questions, dashboards, and collections. Supports both term-based and semantic search queries. Results are ranked using Reciprocal Rank Fusion when both query types are provided. */ +export const createAgentSearch: API.OperationMethod< + CreateAgentSearchRequest, + CreateAgentSearchResponse, + CreateAgentSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAgentSearchRequest, + output: CreateAgentSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAiEntityAnalysisAnalyzeChartError = MetabaseOpError; +/** POST /api/ai-entity-analysis/analyze-chart Analyze a chart image using an AI vision model. This function sends the image data to a separate external AI service for analysis. */ +export const createAiEntityAnalysisAnalyzeChart: API.OperationMethod< + CreateAiEntityAnalysisAnalyzeChartRequest, + CreateAiEntityAnalysisAnalyzeChartResponse, + CreateAiEntityAnalysisAnalyzeChartError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAiEntityAnalysisAnalyzeChartRequest, + output: CreateAiEntityAnalysisAnalyzeChartResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAnalyticsInternalError = MetabaseOpError; +/** POST /api/analytics/internal Receive a batch of internal analytics events from the frontend and record them as Prometheus metrics. */ +export const createAnalyticsInternal: API.OperationMethod< + CreateAnalyticsInternalRequest, + CreateAnalyticsInternalResponse, + CreateAnalyticsInternalError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAnalyticsInternalRequest, + output: CreateAnalyticsInternalResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateAnalyticsProxyError = MetabaseOpError; +/** POST /api/analytics-proxy Forward a Snowplow `tp2` payload to `sp.metabase.com` server-side, bypassing the customer page's `connect-src` CSP. */ +export const createAnalyticsProxy: API.OperationMethod< + CreateAnalyticsProxyRequest, + CreateAnalyticsProxyResponse, + CreateAnalyticsProxyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateAnalyticsProxyRequest, + output: CreateAnalyticsProxyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCacheInvalidateError = MetabaseOpError; +/** POST /api/cache/invalidate Invalidate cache entries. Use it like `/api/cache/invalidate?database=1&dashboard=15` (any number of database/dashboard/question can be supplied). `&include=overrides` controls whenever you want to invalidate cache for a specific cache configuration without touching all nested configurations, or you want your invalidation to trickle down to every card. */ +export const createCacheInvalidate: API.OperationMethod< + CreateCacheInvalidateRequest, + CreateCacheInvalidateResponse, + CreateCacheInvalidateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCacheInvalidateRequest, + output: CreateCacheInvalidateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardError = MetabaseOpError; +/** POST /api/card Create a new `Card`. Card `type` can be `question`, `metric`, or `model`. */ +export const createCard: API.OperationMethod< + CreateCardRequest, + CreateCardResponse, + CreateCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardRequest, + output: CreateCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardCollectionError = MetabaseOpError; +/** POST /api/card/collections Bulk update endpoint for Card Collections. Move a set of `Cards` with `card_ids` into a `Collection` with `collection_id`, or remove them from any Collections by passing a `null` `collection_id`. */ +export const createCardCollection: API.OperationMethod< + CreateCardCollectionRequest, + CreateCardCollectionResponse, + CreateCardCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardCollectionRequest, + output: CreateCardCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardCopyError = MetabaseOpError; +/** POST /api/card/{id}/copy Copy a `Card`, with the new name 'Copy of _name_' */ +export const createCardCopy: API.OperationMethod< + CreateCardCopyRequest, + CreateCardCopyResponse, + CreateCardCopyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardCopyRequest, + output: CreateCardCopyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardPivotCardQueryError = MetabaseOpError; +/** POST /api/card/pivot/{card-id}/query Run the query associated with a Card. */ +export const createCardPivotCardQuery: API.OperationMethod< + CreateCardPivotCardQueryRequest, + CreateCardPivotCardQueryResponse, + CreateCardPivotCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardPivotCardQueryRequest, + output: CreateCardPivotCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardPublicLinkError = MetabaseOpError; +/** POST /api/card/{card-id}/public_link Generate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has already been shared, it will return the existing public link rather than creating a new one.) Public sharing must be enabled. */ +export const createCardPublicLink: API.OperationMethod< + CreateCardPublicLinkRequest, + CreateCardPublicLinkResponse, + CreateCardPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardPublicLinkRequest, + output: CreateCardPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardQueryError = MetabaseOpError; +/** POST /api/card/{card-id}/query Run the query associated with a Card. */ +export const createCardQuery: API.OperationMethod< + CreateCardQueryRequest, + CreateCardQueryResponse, + CreateCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardQueryRequest, + output: CreateCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardsDashboardError = MetabaseOpError; +/** POST /api/cards/dashboards Get the dashboards that multiple cards appear in. The response is a sequence of maps, each of which has a `card_id` and `dashboards`. `dashboard` may include an `:error` key, either `:unreadable-dashboard` or `:unwritable-dashboard`. In the case of an `unreadable-dashboard` the dashboard details (name, ID) will NOT be present. */ +export const createCardsDashboard: API.OperationMethod< + CreateCardsDashboardRequest, + CreateCardsDashboardResponse, + CreateCardsDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardsDashboardRequest, + output: CreateCardsDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCardsMoveError = MetabaseOpError; +/** POST /api/cards/move Moves a number of Cards to a single collection or dashboard. For now, just either succeed or fail as a batch - we can think more about error handling later down the road. */ +export const createCardsMove: API.OperationMethod< + CreateCardsMoveRequest, + CreateCardsMoveResponse, + CreateCardsMoveError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCardsMoveRequest, + output: CreateCardsMoveResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateChannelError = MetabaseOpError; +/** POST /api/channel Create a channel */ +export const createChannel: API.OperationMethod< + CreateChannelRequest, + CreateChannelResponse, + CreateChannelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateChannelRequest, + output: CreateChannelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateChannelTestError = MetabaseOpError; +/** POST /api/channel/test Test a channel connection */ +export const createChannelTest: API.OperationMethod< + CreateChannelTestRequest, + CreateChannelTestResponse, + CreateChannelTestError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateChannelTestRequest, + output: CreateChannelTestResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCloudMigrationError = MetabaseOpError; +/** POST /api/cloud-migration Initiate a new cloud migration. */ +export const createCloudMigration: API.OperationMethod< + CreateCloudMigrationRequest, + CreateCloudMigrationResponse, + CreateCloudMigrationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCloudMigrationRequest, + output: CreateCloudMigrationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCollectionError = MetabaseOpError; +/** POST /api/collection Create a new Collection. */ +export const createCollection: API.OperationMethod< + CreateCollectionRequest, + CreateCollectionResponse, + CreateCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCollectionRequest, + output: CreateCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCollectionMoveDashboardQuestionCandidateError = + MetabaseOpError; +/** POST /api/collection/{id}/move-dashboard-question-candidates Move candidate cards to the dashboards they appear in. */ +export const createCollectionMoveDashboardQuestionCandidate: API.OperationMethod< + CreateCollectionMoveDashboardQuestionCandidateRequest, + CreateCollectionMoveDashboardQuestionCandidateResponse, + CreateCollectionMoveDashboardQuestionCandidateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCollectionMoveDashboardQuestionCandidateRequest, + output: CreateCollectionMoveDashboardQuestionCandidateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCollectionRootMoveDashboardQuestionCandidateError = + MetabaseOpError; +/** POST /api/collection/root/move-dashboard-question-candidates Move candidate cards to the dashboards they appear in (for the root collection) */ +export const createCollectionRootMoveDashboardQuestionCandidate: API.OperationMethod< + CreateCollectionRootMoveDashboardQuestionCandidateRequest, + CreateCollectionRootMoveDashboardQuestionCandidateResponse, + CreateCollectionRootMoveDashboardQuestionCandidateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCollectionRootMoveDashboardQuestionCandidateRequest, + output: CreateCollectionRootMoveDashboardQuestionCandidateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCommentError = MetabaseOpError; +/** POST /api/comment Create a new comment */ +export const createComment: API.OperationMethod< + CreateCommentRequest, + CreateCommentResponse, + CreateCommentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCommentRequest, + output: CreateCommentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateCommentReactionError = MetabaseOpError; +/** POST /api/comment/{comment-id}/reaction Toggle a reaction on a comment */ +export const createCommentReaction: API.OperationMethod< + CreateCommentReactionRequest, + CreateCommentReactionResponse, + CreateCommentReactionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateCommentReactionRequest, + output: CreateCommentReactionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardError = MetabaseOpError; +/** POST /api/dashboard Create a new Dashboard. */ +export const createDashboard: API.OperationMethod< + CreateDashboardRequest, + CreateDashboardResponse, + CreateDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardRequest, + output: CreateDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardCopyError = MetabaseOpError; +/** POST /api/dashboard/{from-dashboard-id}/copy Copy a Dashboard. */ +export const createDashboardCopy: API.OperationMethod< + CreateDashboardCopyRequest, + CreateDashboardCopyResponse, + CreateDashboardCopyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardCopyRequest, + output: CreateDashboardCopyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardDashcardCardQueryError = MetabaseOpError; +/** POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it. */ +export const createDashboardDashcardCardQuery: API.OperationMethod< + CreateDashboardDashcardCardQueryRequest, + CreateDashboardDashcardCardQueryResponse, + CreateDashboardDashcardCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardDashcardCardQueryRequest, + output: CreateDashboardDashcardCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardDashcardExecuteError = MetabaseOpError; +/** POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it. `parameters` should be the mapped dashboard parameters with values. `extra_parameters` should be the extra, user entered parameter values. */ +export const createDashboardDashcardExecute: API.OperationMethod< + CreateDashboardDashcardExecuteRequest, + CreateDashboardDashcardExecuteResponse, + CreateDashboardDashcardExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardDashcardExecuteRequest, + output: CreateDashboardDashcardExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardDashcardExecute2Error = MetabaseOpError; +/** POST /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute Execute the associated Action in the context of a `Dashboard` and `DashboardCard` that includes it. `parameters` should be the mapped dashboard parameters with values. */ +export const createDashboardDashcardExecute2: API.OperationMethod< + CreateDashboardDashcardExecuteRequest2, + CreateDashboardDashcardExecute2Response, + CreateDashboardDashcardExecute2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardDashcardExecuteRequest2, + output: CreateDashboardDashcardExecute2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardPdfError = MetabaseOpError; +/** POST /api/dashboard/{id}/pdf Render Dashboard with ID to a PDF (server-side, the same way dashboard subscriptions render charts) and stream it back as a file download. `parameters` are runtime parameter overrides -- the same shape the dashcard query endpoints accept: a sequence of `{:id ... :value ...}` maps, or a JSON-encoded string of that sequence (the string form lets an HTML `` action drive the download). Parameters left unspecified fall back to the dashboard's own defaults. `paper_size` is `"a4"` (default) or `"letter"`. */ +export const createDashboardPdf: API.OperationMethod< + CreateDashboardPdfRequest, + CreateDashboardPdfResponse, + CreateDashboardPdfError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardPdfRequest, + output: CreateDashboardPdfResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardPivotDashboardDashcardCardQueryError = + MetabaseOpError; +/** POST /api/dashboard/pivot/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query Run a pivot table query for a specific DashCard. */ +export const createDashboardPivotDashboardDashcardCardQuery: API.OperationMethod< + CreateDashboardPivotDashboardDashcardCardQueryRequest, + CreateDashboardPivotDashboardDashcardCardQueryResponse, + CreateDashboardPivotDashboardDashcardCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardPivotDashboardDashcardCardQueryRequest, + output: CreateDashboardPivotDashboardDashcardCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardPublicLinkError = MetabaseOpError; +/** POST /api/dashboard/{dashboard-id}/public_link Generate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public sharing must be enabled. */ +export const createDashboardPublicLink: API.OperationMethod< + CreateDashboardPublicLinkRequest, + CreateDashboardPublicLinkResponse, + CreateDashboardPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardPublicLinkRequest, + output: CreateDashboardPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDashboardSaveError = MetabaseOpError; +/** POST /api/dashboard/save Save a denormalized description of dashboard. */ +export const createDashboardSave: API.OperationMethod< + CreateDashboardSaveRequest, + CreateDashboardSaveResponse, + CreateDashboardSaveError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDashboardSaveRequest, + output: CreateDashboardSaveResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseError = MetabaseOpError; +/** POST /api/database Add a new `Database`. */ +export const createDatabase: API.OperationMethod< + CreateDatabaseRequest, + CreateDatabaseResponse, + CreateDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseRequest, + output: CreateDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseDiscardValueError = MetabaseOpError; +/** POST /api/database/{id}/discard_values Discards all saved field values for this `Database`. */ +export const createDatabaseDiscardValue: API.OperationMethod< + CreateDatabaseDiscardValueRequest, + CreateDatabaseDiscardValueResponse, + CreateDatabaseDiscardValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseDiscardValueRequest, + output: CreateDatabaseDiscardValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseDismissSpinnerError = MetabaseOpError; +/** POST /api/database/{id}/dismiss_spinner Manually set the initial sync status of the `Database` and corresponding tables to be `complete` (see #20863) */ +export const createDatabaseDismissSpinner: API.OperationMethod< + CreateDatabaseDismissSpinnerRequest, + CreateDatabaseDismissSpinnerResponse, + CreateDatabaseDismissSpinnerError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseDismissSpinnerRequest, + output: CreateDatabaseDismissSpinnerResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseRescanValueError = MetabaseOpError; +/** POST /api/database/{id}/rescan_values Trigger a manual scan of the field values for this `Database`. */ +export const createDatabaseRescanValue: API.OperationMethod< + CreateDatabaseRescanValueRequest, + CreateDatabaseRescanValueResponse, + CreateDatabaseRescanValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseRescanValueRequest, + output: CreateDatabaseRescanValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseSampleDatabaseError = MetabaseOpError; +/** POST /api/database/sample_database Add the sample database as a new `Database`. */ +export const createDatabaseSampleDatabase: API.OperationMethod< + CreateDatabaseSampleDatabaseRequest, + CreateDatabaseSampleDatabaseResponse, + CreateDatabaseSampleDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseSampleDatabaseRequest, + output: CreateDatabaseSampleDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseSyncSchemaError = MetabaseOpError; +/** POST /api/database/{id}/sync_schema Trigger a manual update of the schema metadata for this `Database`. */ +export const createDatabaseSyncSchema: API.OperationMethod< + CreateDatabaseSyncSchemaRequest, + CreateDatabaseSyncSchemaResponse, + CreateDatabaseSyncSchemaError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseSyncSchemaRequest, + output: CreateDatabaseSyncSchemaResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatabaseValidateError = MetabaseOpError; +/** POST /api/database/validate Validate that we can connect to a database given a set of details. */ +export const createDatabaseValidate: API.OperationMethod< + CreateDatabaseValidateRequest, + CreateDatabaseValidateResponse, + CreateDatabaseValidateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatabaseValidateRequest, + output: CreateDatabaseValidateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetError = MetabaseOpError; +/** POST /api/dataset Execute a query and retrieve the results in the usual format. The query will not use the cache. */ +export const createDataset: API.OperationMethod< + CreateDatasetRequest, + CreateDatasetResponse, + CreateDatasetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetRequest, + output: CreateDatasetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetNativeError = MetabaseOpError; +/** POST /api/dataset/native Fetch a native version of an MBQL query. Display path: workspace remapping is suppressed via [[ws.table-remapping/with-display-context]] so the user sees canonical-schema SQL in the 'Show me the SQL' panel. The query still executes against the workspace isolation schema at warehouse time (separate code path); this endpoint only affects what the user reads. */ +export const createDatasetNative: API.OperationMethod< + CreateDatasetNativeRequest, + CreateDatasetNativeResponse, + CreateDatasetNativeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetNativeRequest, + output: CreateDatasetNativeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetParameterRemappingError = MetabaseOpError; +/** POST /api/dataset/parameter/remapping Return the remapped parameter values for cards or dashboards that are being edited. */ +export const createDatasetParameterRemapping: API.OperationMethod< + CreateDatasetParameterRemappingRequest, + CreateDatasetParameterRemappingResponse, + CreateDatasetParameterRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetParameterRemappingRequest, + output: CreateDatasetParameterRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetParameterValueError = MetabaseOpError; +/** POST /api/dataset/parameter/values Return parameter values for cards or dashboards that are being edited. */ +export const createDatasetParameterValue: API.OperationMethod< + CreateDatasetParameterValueRequest, + CreateDatasetParameterValueResponse, + CreateDatasetParameterValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetParameterValueRequest, + output: CreateDatasetParameterValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetPivotError = MetabaseOpError; +/** POST /api/dataset/pivot Generate a pivoted dataset for an ad-hoc query */ +export const createDatasetPivot: API.OperationMethod< + CreateDatasetPivotRequest, + CreateDatasetPivotResponse, + CreateDatasetPivotError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetPivotRequest, + output: CreateDatasetPivotResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDatasetQueryMetadataError = MetabaseOpError; +/** POST /api/dataset/query_metadata Get all of the required query metadata for an ad-hoc query. You can pass `{:settings {:include-sensitive-fields true}}` in the query to include fields with visibility_type :sensitive in the response. */ +export const createDatasetQueryMetadata: API.OperationMethod< + CreateDatasetQueryMetadataRequest, + CreateDatasetQueryMetadataResponse, + CreateDatasetQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDatasetQueryMetadataRequest, + output: CreateDatasetQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDataStudioTableDiscardValueError = MetabaseOpError; +/** POST /api/data-studio/table/discard-values Batch version of /table/:id/discard_values. Takes an abstract table selection as /table/edit does. */ +export const createDataStudioTableDiscardValue: API.OperationMethod< + CreateDataStudioTableDiscardValueRequest, + CreateDataStudioTableDiscardValueResponse, + CreateDataStudioTableDiscardValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDataStudioTableDiscardValueRequest, + output: CreateDataStudioTableDiscardValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDataStudioTableEditError = MetabaseOpError; +/** POST /api/data-studio/table/edit Bulk updating tables. */ +export const createDataStudioTableEdit: API.OperationMethod< + CreateDataStudioTableEditRequest, + CreateDataStudioTableEditResponse, + CreateDataStudioTableEditError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDataStudioTableEditRequest, + output: CreateDataStudioTableEditResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDataStudioTableRescanValueError = MetabaseOpError; +/** POST /api/data-studio/table/rescan-values Batch version of /table/:id/rescan_values. Takes an abstract table selection as /table/edit does. */ +export const createDataStudioTableRescanValue: API.OperationMethod< + CreateDataStudioTableRescanValueRequest, + CreateDataStudioTableRescanValueResponse, + CreateDataStudioTableRescanValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDataStudioTableRescanValueRequest, + output: CreateDataStudioTableRescanValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDataStudioTableSelectionError = MetabaseOpError; +/** POST /api/data-studio/table/selection Gets information about selected tables */ +export const createDataStudioTableSelection: API.OperationMethod< + CreateDataStudioTableSelectionRequest, + CreateDataStudioTableSelectionResponse, + CreateDataStudioTableSelectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDataStudioTableSelectionRequest, + output: CreateDataStudioTableSelectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDataStudioTableSyncSchemaError = MetabaseOpError; +/** POST /api/data-studio/table/sync-schema Batch version of /table/:id/sync_schema. Takes an abstract table selection as /table/edit does. - Currently checks policy before returning (so you might receive a 4xx on e.g. AuthZ policy failure) - The sync itself is however, asynchronous. This call may return before all tables synced. */ +export const createDataStudioTableSyncSchema: API.OperationMethod< + CreateDataStudioTableSyncSchemaRequest, + CreateDataStudioTableSyncSchemaResponse, + CreateDataStudioTableSyncSchemaError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDataStudioTableSyncSchemaRequest, + output: CreateDataStudioTableSyncSchemaResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDocumentError = MetabaseOpError; +/** POST /api/document Create a new `Document`. */ +export const createDocument: API.OperationMethod< + CreateDocumentRequest, + CreateDocumentResponse, + CreateDocumentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDocumentRequest, + output: CreateDocumentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDocumentCopyError = MetabaseOpError; +/** POST /api/document/{from-document-id}/copy Copy a Document. */ +export const createDocumentCopy: API.OperationMethod< + CreateDocumentCopyRequest, + CreateDocumentCopyResponse, + CreateDocumentCopyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDocumentCopyRequest, + output: CreateDocumentCopyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateDocumentPublicLinkError = MetabaseOpError; +/** POST /api/document/{document-id}/public-link Generate a publicly-accessible UUID for a Document. Creates a public link that allows viewing the Document without authentication. If the Document already has a public UUID, returns the existing one rather than generating a new one. This enables sharing the Document via `GET /api/ee/public/document/:uuid`. Returns a map containing `:uuid` (the public UUID string). Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting. */ +export const createDocumentPublicLink: API.OperationMethod< + CreateDocumentPublicLinkRequest, + CreateDocumentPublicLinkResponse, + CreateDocumentPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateDocumentPublicLinkRequest, + output: CreateDocumentPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeActionV2ExecuteError = MetabaseOpError; +/** POST /api/ee/action-v2/execute Execute an action with a single input. Takes: - `action` - an identifier or an expression for what we want to execute. - `scope` - where the action is being invoked from. - `input` - a single map. currently these are typically a database table row pk, or query result. - `params` (optional) - a map of values for the parameters taken by the action's mapping. The `input` and `params` are used by the relevant mapping to calculate a map argument to the underlying action fn. If there is no mapping, `params` are simply used as overrides for `input`. Returns the outputs from the performed action. */ +export const createEeActionV2Execute: API.OperationMethod< + CreateEeActionV2ExecuteRequest, + CreateEeActionV2ExecuteResponse, + CreateEeActionV2ExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeActionV2ExecuteRequest, + output: CreateEeActionV2ExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeActionV2ExecuteBulkError = MetabaseOpError; +/** POST /api/ee/action-v2/execute-bulk Execute an action with multiple inputs. This is typically more efficient than calling execute with each input individually, for example by performing batch SQL operations. Takes: - `action` - an identifier or an expression for what we want to execute. - `scope` - where the action is being invoked from. - `inputs` - a list of maps. currently these are typically a database table row pk, or query result. - `params` (optional) - a map of values for the parameters taken by the action's mapping. The `inputs` and `params` are used by the relevant mapping to calculate a list of args for the underlying action fn. If there is no mapping, `params` are simply used as overrides for each map within `inputs`. Returns the outputs from the performed action. */ +export const createEeActionV2ExecuteBulk: API.OperationMethod< + CreateEeActionV2ExecuteBulkRequest, + CreateEeActionV2ExecuteBulkResponse, + CreateEeActionV2ExecuteBulkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeActionV2ExecuteBulkRequest, + output: CreateEeActionV2ExecuteBulkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeActionV2ExecuteFormError = MetabaseOpError; +/** POST /api/ee/action-v2/execute-form Temporary endpoint for describing an actions parameters such that they can be presented correctly in a modal ahead of execution. */ +export const createEeActionV2ExecuteForm: API.OperationMethod< + CreateEeActionV2ExecuteFormRequest, + CreateEeActionV2ExecuteFormResponse, + CreateEeActionV2ExecuteFormError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeActionV2ExecuteFormRequest, + output: CreateEeActionV2ExecuteFormResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeAiControlsPermissionsAdvancedError = MetabaseOpError; +/** POST /api/ee/ai-controls/permissions/advanced Switch to advanced group-level permissions. Removes any custom permissions from the All Users group. */ +export const createEeAiControlsPermissionsAdvanced: API.OperationMethod< + CreateEeAiControlsPermissionsAdvancedRequest, + CreateEeAiControlsPermissionsAdvancedResponse, + CreateEeAiControlsPermissionsAdvancedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeAiControlsPermissionsAdvancedRequest, + output: CreateEeAiControlsPermissionsAdvancedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeAuditAppAnalyticsDevExportError = MetabaseOpError; +/** POST /api/ee/audit-app/analytics-dev/export Export analytics content as a .tar.gz file for local development. Only available when MB_ANALYTICS_DEV_MODE=true. Returns a tarball containing the analytics YAMLs in canonical format, ready to commit to source control. Requires superuser permissions. */ +export const createEeAuditAppAnalyticsDevExport: API.OperationMethod< + CreateEeAuditAppAnalyticsDevExportRequest, + CreateEeAuditAppAnalyticsDevExportResponse, + CreateEeAuditAppAnalyticsDevExportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeAuditAppAnalyticsDevExportRequest, + output: CreateEeAuditAppAnalyticsDevExportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeContentTranslationUploadDictionaryError = MetabaseOpError; +/** POST /api/ee/content-translation/upload-dictionary Upload a CSV of content translations */ +export const createEeContentTranslationUploadDictionary: API.OperationMethod< + CreateEeContentTranslationUploadDictionaryRequest, + CreateEeContentTranslationUploadDictionaryResponse, + CreateEeContentTranslationUploadDictionaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeContentTranslationUploadDictionaryRequest, + output: CreateEeContentTranslationUploadDictionaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeCustomVizPluginError = MetabaseOpError; +/** POST /api/ee/custom-viz-plugin Register a new custom visualization plugin from an uploaded tar.gz bundle. The archive must contain `metabase-plugin.json` at the root and `dist/index.js` for the JS bundle. The only static asset served from the bundle is the manifest `icon` (under `dist/assets/`); plugins do not ship arbitrary assets. The plugin's `identifier` is taken from the manifest's `name` field. */ +export const createEeCustomVizPlugin: API.OperationMethod< + CreateEeCustomVizPluginRequest, + CreateEeCustomVizPluginResponse, + CreateEeCustomVizPluginError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeCustomVizPluginRequest, + output: CreateEeCustomVizPluginResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeCustomVizPluginDevError = MetabaseOpError; +/** POST /api/ee/custom-viz-plugin/dev Register a dev-only custom visualization plugin from a local dev server. No bundle upload is required — files are served from the dev server URL. Requires custom viz plugin dev mode to be enabled. */ +export const createEeCustomVizPluginDev: API.OperationMethod< + CreateEeCustomVizPluginDevRequest, + CreateEeCustomVizPluginDevResponse, + CreateEeCustomVizPluginDevError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeCustomVizPluginDevRequest, + output: CreateEeCustomVizPluginDevResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeCustomVizPluginRefreshError = MetabaseOpError; +/** POST /api/ee/custom-viz-plugin/{id}/refresh Re-fetch the manifest from the dev server for a dev-only plugin. For uploaded plugins this is a no-op — to update an upload-backed plugin, PUT a new bundle to `/:id/bundle`. */ +export const createEeCustomVizPluginRefresh: API.OperationMethod< + CreateEeCustomVizPluginRefreshRequest, + CreateEeCustomVizPluginRefreshResponse, + CreateEeCustomVizPluginRefreshError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeCustomVizPluginRefreshRequest, + output: CreateEeCustomVizPluginRefreshResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeDatabaseReplicationConnectionDatabasePreviewError = + MetabaseOpError; +/** POST /api/ee/database-replication/connection/{database-id}/preview Return info about pg-replication connection that is about to be created. */ +export const createEeDatabaseReplicationConnectionDatabasePreview: API.OperationMethod< + CreateEeDatabaseReplicationConnectionDatabasePreviewRequest, + CreateEeDatabaseReplicationConnectionDatabasePreviewResponse, + CreateEeDatabaseReplicationConnectionDatabasePreviewError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeDatabaseReplicationConnectionDatabasePreviewRequest, + output: CreateEeDatabaseReplicationConnectionDatabasePreviewResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeDatabaseRoutingDestinationDatabaseError = MetabaseOpError; +/** POST /api/ee/database-routing/destination-database Create new Destination Databases. Note that unlike the normal `POST /api/database` endpoint, this endpoint does not test that the database is actually reachable before adding it — destination details are not required to be valid at creation time, and an unreachable destination is fine. */ +export const createEeDatabaseRoutingDestinationDatabase: API.OperationMethod< + CreateEeDatabaseRoutingDestinationDatabaseRequest, + CreateEeDatabaseRoutingDestinationDatabaseResponse, + CreateEeDatabaseRoutingDestinationDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeDatabaseRoutingDestinationDatabaseRequest, + output: CreateEeDatabaseRoutingDestinationDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeDataStudioTablePublishTableError = MetabaseOpError; +/** POST /api/ee/data-studio/table/publish-tables Set collection for each of selected tables and all upstream dependencies recursively. */ +export const createEeDataStudioTablePublishTable: API.OperationMethod< + CreateEeDataStudioTablePublishTableRequest, + CreateEeDataStudioTablePublishTableResponse, + CreateEeDataStudioTablePublishTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeDataStudioTablePublishTableRequest, + output: CreateEeDataStudioTablePublishTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeDataStudioTableUnpublishTableError = MetabaseOpError; +/** POST /api/ee/data-studio/table/unpublish-tables Unset collection for each of selected tables and all downstream dependents recursively. */ +export const createEeDataStudioTableUnpublishTable: API.OperationMethod< + CreateEeDataStudioTableUnpublishTableRequest, + CreateEeDataStudioTableUnpublishTableResponse, + CreateEeDataStudioTableUnpublishTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeDataStudioTableUnpublishTableRequest, + output: CreateEeDataStudioTableUnpublishTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeGsheetsConnectionError = MetabaseOpError; +/** POST /api/ee/gsheets/connection Hook up a new google drive folder or sheet that will be watched and have its content ETL'd into Metabase. */ +export const createEeGsheetsConnection: API.OperationMethod< + CreateEeGsheetsConnectionRequest, + CreateEeGsheetsConnectionResponse, + CreateEeGsheetsConnectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeGsheetsConnectionRequest, + output: CreateEeGsheetsConnectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeGsheetsConnectionSyncError = MetabaseOpError; +/** POST /api/ee/gsheets/connection/sync Force a sync of the connection now. Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`. */ +export const createEeGsheetsConnectionSync: API.OperationMethod< + CreateEeGsheetsConnectionSyncRequest, + CreateEeGsheetsConnectionSyncResponse, + CreateEeGsheetsConnectionSyncError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeGsheetsConnectionSyncRequest, + output: CreateEeGsheetsConnectionSyncResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeLibraryError = MetabaseOpError; +/** POST /api/ee/library Creates the Library if it doesn't exist. Returns the created collection. Requires data analyst or superuser permissions. */ +export const createEeLibrary: API.OperationMethod< + CreateEeLibraryRequest, + CreateEeLibraryResponse, + CreateEeLibraryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeLibraryRequest, + output: CreateEeLibraryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeMfaAdminRemoveError = MetabaseOpError; +/** POST /api/ee/mfa/admin/remove Admin: remove a user's two-factor enrollment entirely — the lockout escape hatch for a lost authenticator with no recovery codes. Never feature-gated (a lapsed license must not make lockouts permanent). The affected user is notified by email. They re-enroll from scratch — there is nothing to "reset", the secret lives on their device. */ +export const createEeMfaAdminRemove: API.OperationMethod< + CreateEeMfaAdminRemoveRequest, + CreateEeMfaAdminRemoveResponse, + CreateEeMfaAdminRemoveError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeMfaAdminRemoveRequest, + output: CreateEeMfaAdminRemoveResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeMfaDisableError = MetabaseOpError; +/** POST /api/ee/mfa/disable Disable two-factor authentication for the current user. Re-auth is a fresh second factor — a TOTP code or an unused recovery code — never just the password. */ +export const createEeMfaDisable: API.OperationMethod< + CreateEeMfaDisableRequest, + CreateEeMfaDisableResponse, + CreateEeMfaDisableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeMfaDisableRequest, + output: CreateEeMfaDisableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeMfaEnrollError = MetabaseOpError; +/** POST /api/ee/mfa/enroll Start TOTP enrollment for the current user. Requires the account password (LDAP users re-bind against the directory) and the `:multi-factor-auth` feature. Returns the Base32 `secret` and an `otpauth_uri` for QR display; enrollment is not active until confirmed with a live code. */ +export const createEeMfaEnroll: API.OperationMethod< + CreateEeMfaEnrollRequest, + CreateEeMfaEnrollResponse, + CreateEeMfaEnrollError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeMfaEnrollRequest, + output: CreateEeMfaEnrollResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeMfaEnrollConfirmError = MetabaseOpError; +/** POST /api/ee/mfa/enroll/confirm Confirm TOTP enrollment by verifying a code from the authenticator app. Activates the second factor and returns the single-use recovery codes — the only time they exist in plaintext. */ +export const createEeMfaEnrollConfirm: API.OperationMethod< + CreateEeMfaEnrollConfirmRequest, + CreateEeMfaEnrollConfirmResponse, + CreateEeMfaEnrollConfirmError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeMfaEnrollConfirmRequest, + output: CreateEeMfaEnrollConfirmResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeMfaRecoveryCodeError = MetabaseOpError; +/** POST /api/ee/mfa/recovery-codes Regenerate the current user's recovery codes, invalidating the entire previous set. Re-auth is a fresh second factor — a TOTP code or an unused recovery code — so a stolen password alone can never rotate the codes. The plaintext codes are returned exactly once; only hashes are stored. */ +export const createEeMfaRecoveryCode: API.OperationMethod< + CreateEeMfaRecoveryCodeRequest, + CreateEeMfaRecoveryCodeResponse, + CreateEeMfaRecoveryCodeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeMfaRecoveryCodeRequest, + output: CreateEeMfaRecoveryCodeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncCreateBranchError = MetabaseOpError; +/** POST /api/ee/remote-sync/create-branch Create a new branch from the current remote-sync branch and switches the current remote-sync branch to it. Requires superuser permissions. */ +export const createEeRemoteSyncCreateBranch: API.OperationMethod< + CreateEeRemoteSyncCreateBranchRequest, + CreateEeRemoteSyncCreateBranchResponse, + CreateEeRemoteSyncCreateBranchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncCreateBranchRequest, + output: CreateEeRemoteSyncCreateBranchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncCurrentTaskCancelError = MetabaseOpError; +/** POST /api/ee/remote-sync/current-task/cancel Cancels the current task if one is running */ +export const createEeRemoteSyncCurrentTaskCancel: API.OperationMethod< + CreateEeRemoteSyncCurrentTaskCancelRequest, + CreateEeRemoteSyncCurrentTaskCancelResponse, + CreateEeRemoteSyncCurrentTaskCancelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncCurrentTaskCancelRequest, + output: CreateEeRemoteSyncCurrentTaskCancelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncExportError = MetabaseOpError; +/** POST /api/ee/remote-sync/export Export the current state of the Remote Sync collection to a Source. This endpoint will: - Fetch the latest changes from the source - Create a branch or subdirectory (depending on source support) If no branch is supplied, use the configured export branch - Export the Remote Sync collection via serialization to the branch or subdirectory - Commit the changes if possible - Sync to the source if possible Requires superuser permissions. */ +export const createEeRemoteSyncExport: API.OperationMethod< + CreateEeRemoteSyncExportRequest, + CreateEeRemoteSyncExportResponse, + CreateEeRemoteSyncExportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncExportRequest, + output: CreateEeRemoteSyncExportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncImportError = MetabaseOpError; +/** POST /api/ee/remote-sync/import Import Metabase content from configured Remote Sync source. This endpoint will: - Fetch the latest changes from the configured source - Load the updated content using the serialization/deserialization system If `force=false` (default) and there are unsaved changes in the Remote Sync collection, the import returns a 400 response. Requires superuser permissions. */ +export const createEeRemoteSyncImport: API.OperationMethod< + CreateEeRemoteSyncImportRequest, + CreateEeRemoteSyncImportResponse, + CreateEeRemoteSyncImportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncImportRequest, + output: CreateEeRemoteSyncImportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncStashError = MetabaseOpError; +/** POST /api/ee/remote-sync/stash Stashes changes to a new branch, and changes the current branch to it. Requires superuser permissions. */ +export const createEeRemoteSyncStash: API.OperationMethod< + CreateEeRemoteSyncStashRequest, + CreateEeRemoteSyncStashResponse, + CreateEeRemoteSyncStashError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncStashRequest, + output: CreateEeRemoteSyncStashResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeRemoteSyncTestConnectionError = MetabaseOpError; +/** POST /api/ee/remote-sync/test-connection Test whether the Remote Sync credentials can reach the git repository. When called with an empty body, validates the currently saved URL and token. When the body provides `remote-sync-url` or `remote-sync-token`, those override the saved values — useful for verifying a new Personal Access Token before saving. An obfuscated token (matching the existing token's masked representation) is treated as "unchanged" and the stored token value is used for the test. Only validates connection and authentication; branch existence is not checked here. Returns `{:status :success}` on success. On failure, returns a 400 with a user-friendly error message describing the connection problem. Requires superuser permissions. */ +export const createEeRemoteSyncTestConnection: API.OperationMethod< + CreateEeRemoteSyncTestConnectionRequest, + CreateEeRemoteSyncTestConnectionResponse, + CreateEeRemoteSyncTestConnectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeRemoteSyncTestConnectionRequest, + output: CreateEeRemoteSyncTestConnectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeReplacementCheckReplaceSourceError = MetabaseOpError; +/** POST /api/ee/replacement/check-replace-source Check whether a source entity can be replaced by a target entity. Returns compatibility errors describing column mismatches, type mismatches, primary key mismatches, and foreign key mismatches. */ +export const createEeReplacementCheckReplaceSource: API.OperationMethod< + CreateEeReplacementCheckReplaceSourceRequest, + CreateEeReplacementCheckReplaceSourceResponse, + CreateEeReplacementCheckReplaceSourceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeReplacementCheckReplaceSourceRequest, + output: CreateEeReplacementCheckReplaceSourceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeReplacementReplaceSourceError = MetabaseOpError; +/** POST /api/ee/replacement/replace-source Replace all usages of a source entity with a target entity asynchronously. Returns 202 with a run_id for polling. Returns 409 if a replacement is already running. */ +export const createEeReplacementReplaceSource: API.OperationMethod< + CreateEeReplacementReplaceSourceRequest, + CreateEeReplacementReplaceSourceResponse, + CreateEeReplacementReplaceSourceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeReplacementReplaceSourceRequest, + output: CreateEeReplacementReplaceSourceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeReplacementRunCancelError = MetabaseOpError; +/** POST /api/ee/replacement/runs/{id}/cancel Cancel a running source replacement. */ +export const createEeReplacementRunCancel: API.OperationMethod< + CreateEeReplacementRunCancelRequest, + CreateEeReplacementRunCancelResponse, + CreateEeReplacementRunCancelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeReplacementRunCancelRequest, + output: CreateEeReplacementRunCancelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeScimGroupError = MetabaseOpError; +/** POST /api/ee/scim/v2/Groups Create a single group, and populates it if necessary. */ +export const createEeScimGroup: API.OperationMethod< + CreateEeScimGroupRequest, + CreateEeScimGroupResponse, + CreateEeScimGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeScimGroupRequest, + output: CreateEeScimGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeScimKeyError = MetabaseOpError; +/** POST /api/ee/scim/api_key Create a new SCIM API key, or refresh one that already exists. When called for the first time, this is equivalent to enabling SCIM. */ +export const createEeScimKey: API.OperationMethod< + CreateEeScimKeyRequest, + CreateEeScimKeyResponse, + CreateEeScimKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeScimKeyRequest, + output: CreateEeScimKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeScimUserError = MetabaseOpError; +/** POST /api/ee/scim/v2/Users Create a single user. */ +export const createEeScimUser: API.OperationMethod< + CreateEeScimUserRequest, + CreateEeScimUserResponse, + CreateEeScimUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeScimUserRequest, + output: CreateEeScimUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSecurityCenterAcknowledgeError = MetabaseOpError; +/** POST /api/ee/security-center/acknowledge Acknowledge multiple security advisories. Skips already-acknowledged advisories. */ +export const createEeSecurityCenterAcknowledge: API.OperationMethod< + CreateEeSecurityCenterAcknowledgeRequest, + CreateEeSecurityCenterAcknowledgeResponse, + CreateEeSecurityCenterAcknowledgeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSecurityCenterAcknowledgeRequest, + output: CreateEeSecurityCenterAcknowledgeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSecurityCenterAcknowledge2Error = MetabaseOpError; +/** POST /api/ee/security-center/{advisory-id}/acknowledge Acknowledge a security advisory. Stops repeat notifications. */ +export const createEeSecurityCenterAcknowledge2: API.OperationMethod< + CreateEeSecurityCenterAcknowledgeRequest2, + CreateEeSecurityCenterAcknowledge2Response, + CreateEeSecurityCenterAcknowledge2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSecurityCenterAcknowledgeRequest2, + output: CreateEeSecurityCenterAcknowledge2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSecurityCenterSyncError = MetabaseOpError; +/** POST /api/ee/security-center/sync Trigger an async advisory sync + re-evaluation. Returns immediately. If a sync is already running, the request is a no-op. */ +export const createEeSecurityCenterSync: API.OperationMethod< + CreateEeSecurityCenterSyncRequest, + CreateEeSecurityCenterSyncResponse, + CreateEeSecurityCenterSyncError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSecurityCenterSyncRequest, + output: CreateEeSecurityCenterSyncResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSecurityCenterTestNotificationError = MetabaseOpError; +/** POST /api/ee/security-center/test-notification Send a test notification through the given Security Center channels. The request body lets callers pass the unsaved notification config from the dialog so the test reflects current form state, not the persisted settings. Both fields are optional; when omitted, the saved setting is used. */ +export const createEeSecurityCenterTestNotification: API.OperationMethod< + CreateEeSecurityCenterTestNotificationRequest, + CreateEeSecurityCenterTestNotificationResponse, + CreateEeSecurityCenterTestNotificationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSecurityCenterTestNotificationRequest, + output: CreateEeSecurityCenterTestNotificationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSerializationExportError = MetabaseOpError; +/** POST /api/ee/serialization/export Serialize and retrieve Metabase instance. Outputs `.tar.gz` file with serialization results and an `export.log` file. On error outputs serialization logs directly. */ +export const createEeSerializationExport: API.OperationMethod< + CreateEeSerializationExportRequest, + CreateEeSerializationExportResponse, + CreateEeSerializationExportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSerializationExportRequest, + output: CreateEeSerializationExportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSerializationImportError = MetabaseOpError; +/** POST /api/ee/serialization/import Deserialize Metabase instance from an archive generated by /export. Parameters: - `file`: archive encoded as `multipart/form-data` (required). Returns logs of deserialization. */ +export const createEeSerializationImport: API.OperationMethod< + CreateEeSerializationImportRequest, + CreateEeSerializationImportResponse, + CreateEeSerializationImportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSerializationImportRequest, + output: CreateEeSerializationImportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSerializationMetadataExportError = MetabaseOpError; +/** POST /api/ee/serialization/metadata/export Get warehouse metadata (databases, tables, and fields) for all databases visible to the current user. References between rows are emitted as raw numeric ids (`db_id`, `table_id`, `parent_id`, `fk_target_field_id`). Sections must be opted into with the `with-databases`, `with-tables`, and `with-fields` query parameters — they all default to `false`. The response is streamed for efficiency with large schemas. Requires `View data` → `Can view` and `Create queries` → `Query builder only` (or `Query builder and native`) permissions on each database and table. */ +export const createEeSerializationMetadataExport: API.OperationMethod< + CreateEeSerializationMetadataExportRequest, + CreateEeSerializationMetadataExportResponse, + CreateEeSerializationMetadataExportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSerializationMetadataExportRequest, + output: CreateEeSerializationMetadataExportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSerializationMetadataImportError = MetabaseOpError; +/** POST /api/ee/serialization/metadata/import Import warehouse metadata previously emitted by `POST /metadata/export`. The request body is the JSON document `{databases, tables, fields}`; sections are parsed incrementally so memory stays bounded regardless of payload size. To bypass the JSON-parsing request middleware, send with `Content-Type: application/octet-stream`. Restricted to superusers. Returns `202` immediately with an `:import-id`; the import runs asynchronously. Poll `GET /metadata/import/:id` for its outcome. */ +export const createEeSerializationMetadataImport: API.OperationMethod< + CreateEeSerializationMetadataImportRequest, + CreateEeSerializationMetadataImportResponse, + CreateEeSerializationMetadataImportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSerializationMetadataImportRequest, + output: CreateEeSerializationMetadataImportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeSupportAccessGrantError = MetabaseOpError; +/** POST /api/ee/support-access-grant Create a new support access grant. Requires superuser permissions. Only one active grant can exist at a time. */ +export const createEeSupportAccessGrant: API.OperationMethod< + CreateEeSupportAccessGrantRequest, + CreateEeSupportAccessGrantResponse, + CreateEeSupportAccessGrantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeSupportAccessGrantRequest, + output: CreateEeSupportAccessGrantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeTenantError = MetabaseOpError; +/** POST /api/ee/tenant Create a new Tenant */ +export const createEeTenant: API.OperationMethod< + CreateEeTenantRequest, + CreateEeTenantResponse, + CreateEeTenantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeTenantRequest, + output: CreateEeTenantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeTransformInspectQueryError = MetabaseOpError; +/** POST /api/ee/transforms/{id}/inspect/{lens-id}/query Execute a query in the context of a transform inspector lens. */ +export const createEeTransformInspectQuery: API.OperationMethod< + CreateEeTransformInspectQueryRequest, + CreateEeTransformInspectQueryResponse, + CreateEeTransformInspectQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeTransformInspectQueryRequest, + output: CreateEeTransformInspectQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEeTransformsPythonTestRunError = MetabaseOpError; +/** POST /api/ee/transforms-python/test-run Evaluate an ad-hoc python transform on a sample of input data. Intended for short runs for early feedback. Input/output/timeout limits apply. */ +export const createEeTransformsPythonTestRun: API.OperationMethod< + CreateEeTransformsPythonTestRunRequest, + CreateEeTransformsPythonTestRunResponse, + CreateEeTransformsPythonTestRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEeTransformsPythonTestRunRequest, + output: CreateEeTransformsPythonTestRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEidTranslationTranslateError = MetabaseOpError; +/** POST /api/eid-translation/translate Translate entity IDs to model IDs. */ +export const createEidTranslationTranslate: API.OperationMethod< + CreateEidTranslationTranslateRequest, + CreateEidTranslationTranslateResponse, + CreateEidTranslationTranslateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEidTranslationTranslateRequest, + output: CreateEidTranslationTranslateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmailTestError = MetabaseOpError; +/** POST /api/email/test Send a test email using the SMTP Settings. You must be a superuser or have `setting` permission to do this. Returns `{:ok true}` if we were able to send the message successfully, otherwise a standard 400 error response. */ +export const createEmailTest: API.OperationMethod< + CreateEmailTestRequest, + CreateEmailTestResponse, + CreateEmailTestError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmailTestRequest, + output: CreateEmailTestResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmbedMcpDrillError = MetabaseOpError; +/** POST /api/embed-mcp/drills Stash a base64-encoded MBQL query for the iframe's pending drill-through and return a handle UUID the iframe will thread into the agent message so the `render_drill_through` tool can fetch it. */ +export const createEmbedMcpDrill: API.OperationMethod< + CreateEmbedMcpDrillRequest, + CreateEmbedMcpDrillResponse, + CreateEmbedMcpDrillError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmbedMcpDrillRequest, + output: CreateEmbedMcpDrillResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmbedMcpFeedbackError = MetabaseOpError; +/** POST /api/embed-mcp/feedback Proxy MCP Apps visualization feedback to Harbormaster. */ +export const createEmbedMcpFeedback: API.OperationMethod< + CreateEmbedMcpFeedbackRequest, + CreateEmbedMcpFeedbackResponse, + CreateEmbedMcpFeedbackError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmbedMcpFeedbackRequest, + output: CreateEmbedMcpFeedbackResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmbedThemeError = MetabaseOpError; +/** POST /api/embed-theme Create a new embedding theme. */ +export const createEmbedTheme: API.OperationMethod< + CreateEmbedThemeRequest, + CreateEmbedThemeResponse, + CreateEmbedThemeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmbedThemeRequest, + output: CreateEmbedThemeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmbedThemeCopyError = MetabaseOpError; +/** POST /api/embed-theme/{id}/copy Copy an embedding theme. */ +export const createEmbedThemeCopy: API.OperationMethod< + CreateEmbedThemeCopyRequest, + CreateEmbedThemeCopyResponse, + CreateEmbedThemeCopyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmbedThemeCopyRequest, + output: CreateEmbedThemeCopyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateEmbedThemeSeedDefaultError = MetabaseOpError; +/** POST /api/embed-theme/seed-defaults Seed default embedding themes on first call, using the payloads built by the frontend from the `METABASE_LIGHT_THEME` / `METABASE_DARK_THEME` constants. Idempotent: guarded by the `default-embedding-themes-seeded` setting. Once flipped, subsequent calls are no-ops even if the admin has since deleted the seeded themes, so deletions are preserved. */ +export const createEmbedThemeSeedDefault: API.OperationMethod< + CreateEmbedThemeSeedDefaultRequest, + CreateEmbedThemeSeedDefaultResponse, + CreateEmbedThemeSeedDefaultError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateEmbedThemeSeedDefaultRequest, + output: CreateEmbedThemeSeedDefaultResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFieldDimensionError = MetabaseOpError; +/** POST /api/field/{id}/dimension Sets the dimension for the given field at ID */ +export const createFieldDimension: API.OperationMethod< + CreateFieldDimensionRequest, + CreateFieldDimensionResponse, + CreateFieldDimensionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFieldDimensionRequest, + output: CreateFieldDimensionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFieldDiscardValueError = MetabaseOpError; +/** POST /api/field/{id}/discard_values Discard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field's Database is set up to automatically sync FieldValues, they will be recreated during the next cycle. */ +export const createFieldDiscardValue: API.OperationMethod< + CreateFieldDiscardValueRequest, + CreateFieldDiscardValueResponse, + CreateFieldDiscardValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFieldDiscardValueRequest, + output: CreateFieldDiscardValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFieldRescanValueError = MetabaseOpError; +/** POST /api/field/{id}/rescan_values Manually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for FieldValues. */ +export const createFieldRescanValue: API.OperationMethod< + CreateFieldRescanValueRequest, + CreateFieldRescanValueResponse, + CreateFieldRescanValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFieldRescanValueRequest, + output: CreateFieldRescanValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFieldTableIdsError = MetabaseOpError; +/** POST /api/field/table-ids Get unique Table IDs for a list of Field IDs. */ +export const createFieldTableIds: API.OperationMethod< + CreateFieldTableIdsRequest, + CreateFieldTableIdsResponse, + CreateFieldTableIdsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFieldTableIdsRequest, + output: CreateFieldTableIdsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFieldValueError = MetabaseOpError; +/** POST /api/field/{id}/values Update the fields values and human-readable values for a `Field` whose semantic type is `category`/`city`/`state`/`country` or whose base type is `type/Boolean`. The human-readable values are optional. */ +export const createFieldValue: API.OperationMethod< + CreateFieldValueRequest, + CreateFieldValueResponse, + CreateFieldValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFieldValueRequest, + output: CreateFieldValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateFrontendErrorError = MetabaseOpError; +/** POST /api/frontend-errors Endpoint for the frontend to report errors. Increments a Prometheus counter with the given `type` label. */ +export const createFrontendError: API.OperationMethod< + CreateFrontendErrorRequest, + CreateFrontendErrorResponse, + CreateFrontendErrorError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateFrontendErrorRequest, + output: CreateFrontendErrorResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateGlossaryError = MetabaseOpError; +/** POST /api/glossary Create a new glossary entry. */ +export const createGlossary: API.OperationMethod< + CreateGlossaryRequest, + CreateGlossaryResponse, + CreateGlossaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateGlossaryRequest, + output: CreateGlossaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateKeyError = MetabaseOpError; +/** POST /api/api-key Create a new API key (and an associated `User`) with the provided name and group ID. */ +export const createKey: API.OperationMethod< + CreateKeyRequest, + CreateKeyResponse, + CreateKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateKeyRequest, + output: CreateKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateLlmExtractSourceError = MetabaseOpError; +/** POST /api/llm/extract-sources Parse native query sources and return referenced tables and cards/models. Uses Macaw to parse the SQL, resolves table names to IDs, and returns permission-filtered tables with column metadata. Card and model references are extracted from native query template tags. This is a lightweight endpoint that does not trigger fingerprinting or field value fetching. */ +export const createLlmExtractSource: API.OperationMethod< + CreateLlmExtractSourceRequest, + CreateLlmExtractSourceResponse, + CreateLlmExtractSourceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateLlmExtractSourceRequest, + output: CreateLlmExtractSourceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateLlmGenerateSqlError = MetabaseOpError; +/** POST /api/llm/generate-sql Generate SQL from a natural language prompt. Requires: - LLM to be configured (Anthropic API key set in admin settings) - At least one table reference (explicit @mention or implicit from source_sql) - A database_id parameter Returns generated SQL and the list of tables used for context. */ +export const createLlmGenerateSql: API.OperationMethod< + CreateLlmGenerateSqlRequest, + CreateLlmGenerateSqlResponse, + CreateLlmGenerateSqlError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateLlmGenerateSqlRequest, + output: CreateLlmGenerateSqlResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateLoggerAdjustmentError = MetabaseOpError; +/** POST /api/logger/adjustment Temporarily adjust the log levels. */ +export const createLoggerAdjustment: API.OperationMethod< + CreateLoggerAdjustmentRequest, + CreateLoggerAdjustmentResponse, + CreateLoggerAdjustmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateLoggerAdjustmentRequest, + output: CreateLoggerAdjustmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMeasureError = MetabaseOpError; +/** POST /api/measure Create a new `Measure`. */ +export const createMeasure: API.OperationMethod< + CreateMeasureRequest, + CreateMeasureResponse, + CreateMeasureError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMeasureRequest, + output: CreateMeasureResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotAgentStreamingError = MetabaseOpError; +/** POST /api/metabot/agent-streaming Send a chat message to the LLM via the AI Proxy. */ +export const createMetabotAgentStreaming: API.OperationMethod< + CreateMetabotAgentStreamingRequest, + CreateMetabotAgentStreamingResponse, + CreateMetabotAgentStreamingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotAgentStreamingRequest, + output: CreateMetabotAgentStreamingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotDocumentGenerateContentError = MetabaseOpError; +/** POST /api/metabot/document/generate-content Create a new piece of content to insert into the document. Kept for backwards compatibility; now uses the native Clojure agent. */ +export const createMetabotDocumentGenerateContent: API.OperationMethod< + CreateMetabotDocumentGenerateContentRequest, + CreateMetabotDocumentGenerateContentResponse, + CreateMetabotDocumentGenerateContentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotDocumentGenerateContentRequest, + output: CreateMetabotDocumentGenerateContentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotFeedbackError = MetabaseOpError; +/** POST /api/metabot/feedback Persist Metabot feedback. */ +export const createMetabotFeedback: API.OperationMethod< + CreateMetabotFeedbackRequest, + CreateMetabotFeedbackResponse, + CreateMetabotFeedbackError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotFeedbackRequest, + output: CreateMetabotFeedbackResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotMetabotPromptSuggestionsRegenerateError = + MetabaseOpError; +/** POST /api/metabot/metabot/{id}/prompt-suggestions/regenerate Remove any existing prompt suggestions for the Metabot with `id` and generate new ones. The response `:status` is `:generated` (with a `:prompt_count`) when prompts were created, `:no-library-content` when the Metabot has no models or metrics to summarize, or `:ai-produced-no-prompts` when generation produced nothing. Returns a 402 if the instance has reached its managed-AI usage limit. */ +export const createMetabotMetabotPromptSuggestionsRegenerate: API.OperationMethod< + CreateMetabotMetabotPromptSuggestionsRegenerateRequest, + CreateMetabotMetabotPromptSuggestionsRegenerateResponse, + CreateMetabotMetabotPromptSuggestionsRegenerateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotMetabotPromptSuggestionsRegenerateRequest, + output: CreateMetabotMetabotPromptSuggestionsRegenerateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotSlackEventError = MetabaseOpError; +/** POST /api/metabot/slack/events Respond to activities in Slack */ +export const createMetabotSlackEvent: API.OperationMethod< + CreateMetabotSlackEventRequest, + CreateMetabotSlackEventResponse, + CreateMetabotSlackEventError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotSlackEventRequest, + output: CreateMetabotSlackEventResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotSlackInteractiveError = MetabaseOpError; +/** POST /api/metabot/slack/interactive Handle interactive payloads from Slack (button clicks, modal submissions). */ +export const createMetabotSlackInteractive: API.OperationMethod< + CreateMetabotSlackInteractiveRequest, + CreateMetabotSlackInteractiveResponse, + CreateMetabotSlackInteractiveError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotSlackInteractiveRequest, + output: CreateMetabotSlackInteractiveResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetabotSourceFeedbackError = MetabaseOpError; +/** POST /api/metabot/source-feedback Persist Metabot source feedback. */ +export const createMetabotSourceFeedback: API.OperationMethod< + CreateMetabotSourceFeedbackRequest, + CreateMetabotSourceFeedbackResponse, + CreateMetabotSourceFeedbackError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetabotSourceFeedbackRequest, + output: CreateMetabotSourceFeedbackResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetricBreakoutValueError = MetabaseOpError; +/** POST /api/metric/breakout-values Fetch distinct breakout dimension values for a metric or measure definition. Accepts the same definition format as POST /dataset. Returns extracted values and column metadata for the breakout dimension. */ +export const createMetricBreakoutValue: API.OperationMethod< + CreateMetricBreakoutValueRequest, + CreateMetricBreakoutValueResponse, + CreateMetricBreakoutValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetricBreakoutValueRequest, + output: CreateMetricBreakoutValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMetricDatasetError = MetabaseOpError; +/** POST /api/metric/dataset Execute a metric or measure-based query and stream the results. Request body requires a `definition` object containing: - expression: A metric math expression tree (leaf reference or arithmetic) Examples: [:metric {:lib/uuid "a"} 42], [:- {} [:metric {:lib/uuid "a"} 1] [:metric {:lib/uuid "b"} 2]] - filters (optional): Per-instance filters keyed by :lib/uuid from the expression - projections (optional): Typed projections keyed by source type and ID */ +export const createMetricDataset: API.OperationMethod< + CreateMetricDatasetRequest, + CreateMetricDatasetResponse, + CreateMetricDatasetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMetricDatasetRequest, + output: CreateMetricDatasetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateModelIndexError = MetabaseOpError; +/** POST /api/model-index Create ModelIndex. */ +export const createModelIndex: API.OperationMethod< + CreateModelIndexRequest, + CreateModelIndexResponse, + CreateModelIndexError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateModelIndexRequest, + output: CreateModelIndexResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateModerationReviewError = MetabaseOpError; +/** POST /api/moderation-review Create a new `ModerationReview`. */ +export const createModerationReview: API.OperationMethod< + CreateModerationReviewRequest, + CreateModerationReviewResponse, + CreateModerationReviewError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateModerationReviewRequest, + output: CreateModerationReviewResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMtGtapError = MetabaseOpError; +/** POST /api/mt/gtap Create a new GTAP. */ +export const createMtGtap: API.OperationMethod< + CreateMtGtapRequest, + CreateMtGtapResponse, + CreateMtGtapError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMtGtapRequest, + output: CreateMtGtapResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateMtGtapValidateError = MetabaseOpError; +/** POST /api/mt/gtap/validate Validate a sandbox which may not have yet been saved. This runs the same validation that is performed when the sandbox is saved, but doesn't actually save the sandbox. */ +export const createMtGtapValidate: API.OperationMethod< + CreateMtGtapValidateRequest, + CreateMtGtapValidateResponse, + CreateMtGtapValidateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateMtGtapValidateRequest, + output: CreateMtGtapValidateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNativeQuerySnippetError = MetabaseOpError; +/** POST /api/native-query-snippet Create a new `NativeQuerySnippet`. */ +export const createNativeQuerySnippet: API.OperationMethod< + CreateNativeQuerySnippetRequest, + CreateNativeQuerySnippetResponse, + CreateNativeQuerySnippetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNativeQuerySnippetRequest, + output: CreateNativeQuerySnippetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationError = MetabaseOpError; +/** POST /api/notification Create a new notification, return the created notification. */ +export const createNotification: API.OperationMethod< + CreateNotificationRequest, + CreateNotificationResponse, + CreateNotificationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationRequest, + output: CreateNotificationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationAdminBulkError = MetabaseOpError; +/** POST /api/notification/admin/bulk Bulk-archive or -change-creator a set of notifications. The per-notification `:active` flip goes through `:model/Notification`'s `before-update` hook, which creates / tears down the Quartz triggers. Recipient emails and `:event/notification-update` audit events are published via the shared [[notification-api/publish-notification-update!]] helper so this endpoint's side-effect contract can't drift from `PUT /api/notification/:id`. */ +export const createNotificationAdminBulk: API.OperationMethod< + CreateNotificationAdminBulkRequest, + CreateNotificationAdminBulkResponse, + CreateNotificationAdminBulkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationAdminBulkRequest, + output: CreateNotificationAdminBulkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationSendError = MetabaseOpError; +/** POST /api/notification/send Send an unsaved notification. */ +export const createNotificationSend: API.OperationMethod< + CreateNotificationSendRequest, + CreateNotificationSendResponse, + CreateNotificationSendError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationSendRequest, + output: CreateNotificationSendResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationSend2Error = MetabaseOpError; +/** POST /api/notification/{id}/send Send a notification by id. */ +export const createNotificationSend2: API.OperationMethod< + CreateNotificationSendRequest2, + CreateNotificationSend2Response, + CreateNotificationSend2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationSendRequest2, + output: CreateNotificationSend2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationUnsubscribeError = MetabaseOpError; +/** POST /api/notification/unsubscribe Allow non-users to unsubscribe from notifications, with the hash given through email. */ +export const createNotificationUnsubscribe: API.OperationMethod< + CreateNotificationUnsubscribeRequest, + CreateNotificationUnsubscribeResponse, + CreateNotificationUnsubscribeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationUnsubscribeRequest, + output: CreateNotificationUnsubscribeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationUnsubscribe2Error = MetabaseOpError; +/** POST /api/notification/{id}/unsubscribe Unsubscribe current user from a notification. */ +export const createNotificationUnsubscribe2: API.OperationMethod< + CreateNotificationUnsubscribeRequest2, + CreateNotificationUnsubscribe2Response, + CreateNotificationUnsubscribe2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationUnsubscribeRequest2, + output: CreateNotificationUnsubscribe2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotificationUnsubscribeUndoError = MetabaseOpError; +/** POST /api/notification/unsubscribe/undo Allow non-users to undo an unsubscribe from notifications, with the hash given through email. */ +export const createNotificationUnsubscribeUndo: API.OperationMethod< + CreateNotificationUnsubscribeUndoRequest, + CreateNotificationUnsubscribeUndoResponse, + CreateNotificationUnsubscribeUndoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotificationUnsubscribeUndoRequest, + output: CreateNotificationUnsubscribeUndoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotifyDbAttachedDatawarehouseError = MetabaseOpError; +/** POST /api/notify/db/attached_datawarehouse Sync the attached datawarehouse. Can provide in the body: - table_name and schema_name: both strings. Will look for an existing table and sync it, otherwise will try to find a new table with that name and sync it. If it cannot find a table it will throw an error. If table_name is empty or blank, will sync the entire database. - synchronous?: is a boolean value to indicate if this should block on the result. */ +export const createNotifyDbAttachedDatawarehouse: API.OperationMethod< + CreateNotifyDbAttachedDatawarehouseRequest, + CreateNotifyDbAttachedDatawarehouseResponse, + CreateNotifyDbAttachedDatawarehouseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotifyDbAttachedDatawarehouseRequest, + output: CreateNotifyDbAttachedDatawarehouseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateNotifyDbNewTableError = MetabaseOpError; +/** POST /api/notify/db/{id}/new-table Sync a new table without running a full database sync. Requires `schema_name` and `table_name`. Will throw an error if the table already exists in Metabase or cannot be found. */ +export const createNotifyDbNewTable: API.OperationMethod< + CreateNotifyDbNewTableRequest, + CreateNotifyDbNewTableResponse, + CreateNotifyDbNewTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateNotifyDbNewTableRequest, + output: CreateNotifyDbNewTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateOsiAiContextReconcileError = MetabaseOpError; +/** POST /api/osi/ai-context/reconcile Force a reconcile of the library entity index against the application database, blocking until a reconcile covering this call finishes. Returns the index mutations (`index`) separately from execution timing (`execution`: how long the run waited to start, then how long it ran). This call never reuses a reconcile already in progress (it may have started before your latest change); it starts one if the index is idle, otherwise it queues a single follow-up that any other waiting calls share. Requires the library entity-retrieval feature; returns a 400 when the index is unavailable (the feature isn't licensed, or the pgvector store or embedding backend isn't configured). */ +export const createOsiAiContextReconcile: API.OperationMethod< + CreateOsiAiContextReconcileRequest, + CreateOsiAiContextReconcileResponse, + CreateOsiAiContextReconcileError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateOsiAiContextReconcileRequest, + output: CreateOsiAiContextReconcileResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePermissionsGroupError = MetabaseOpError; +/** POST /api/permissions/group Create a new `PermissionsGroup`. */ +export const createPermissionsGroup: API.OperationMethod< + CreatePermissionsGroupRequest, + CreatePermissionsGroupResponse, + CreatePermissionsGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePermissionsGroupRequest, + output: CreatePermissionsGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePermissionsMembershipError = MetabaseOpError; +/** POST /api/permissions/membership Add a `User` to a `PermissionsGroup`. Returns updated list of members belonging to the group. */ +export const createPermissionsMembership: API.OperationMethod< + CreatePermissionsMembershipRequest, + CreatePermissionsMembershipResponse, + CreatePermissionsMembershipError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePermissionsMembershipRequest, + output: CreatePermissionsMembershipResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistCardPersistError = MetabaseOpError; +/** POST /api/persist/card/{card-id}/persist Mark the model (card) as persisted. Runs the query and saves it to the database backing the card and hot swaps this query in place of the model's query. */ +export const createPersistCardPersist: API.OperationMethod< + CreatePersistCardPersistRequest, + CreatePersistCardPersistResponse, + CreatePersistCardPersistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistCardPersistRequest, + output: CreatePersistCardPersistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistCardRefreshError = MetabaseOpError; +/** POST /api/persist/card/{card-id}/refresh Refresh the persisted model caching `card-id`. */ +export const createPersistCardRefresh: API.OperationMethod< + CreatePersistCardRefreshRequest, + CreatePersistCardRefreshResponse, + CreatePersistCardRefreshError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistCardRefreshRequest, + output: CreatePersistCardRefreshResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistCardUnpersistError = MetabaseOpError; +/** POST /api/persist/card/{card-id}/unpersist Unpersist this model. Deletes the persisted table backing the model and all queries after this will use the card's query rather than the saved version of the query. */ +export const createPersistCardUnpersist: API.OperationMethod< + CreatePersistCardUnpersistRequest, + CreatePersistCardUnpersistResponse, + CreatePersistCardUnpersistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistCardUnpersistRequest, + output: CreatePersistCardUnpersistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistDatabasePersistError = MetabaseOpError; +/** POST /api/persist/database/{id}/persist Attempt to enable model persistence for a database. If already enabled returns a generic 204. */ +export const createPersistDatabasePersist: API.OperationMethod< + CreatePersistDatabasePersistRequest, + CreatePersistDatabasePersistResponse, + CreatePersistDatabasePersistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistDatabasePersistRequest, + output: CreatePersistDatabasePersistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistDatabaseUnpersistError = MetabaseOpError; +/** POST /api/persist/database/{id}/unpersist Attempt to disable model persistence for a database. If already not enabled, just returns a generic 204. */ +export const createPersistDatabaseUnpersist: API.OperationMethod< + CreatePersistDatabaseUnpersistRequest, + CreatePersistDatabaseUnpersistResponse, + CreatePersistDatabaseUnpersistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistDatabaseUnpersistRequest, + output: CreatePersistDatabaseUnpersistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistDisableError = MetabaseOpError; +/** POST /api/persist/disable Disable global setting to allow databases to persist models. This will remove all tasks to refresh tables, remove that option from databases which might have it enabled, and delete all cached tables. */ +export const createPersistDisable: API.OperationMethod< + CreatePersistDisableRequest, + CreatePersistDisableResponse, + CreatePersistDisableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistDisableRequest, + output: CreatePersistDisableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistEnableError = MetabaseOpError; +/** POST /api/persist/enable Enable global setting to allow databases to persist models. */ +export const createPersistEnable: API.OperationMethod< + CreatePersistEnableRequest, + CreatePersistEnableResponse, + CreatePersistEnableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistEnableRequest, + output: CreatePersistEnableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePersistSetRefreshScheduleError = MetabaseOpError; +/** POST /api/persist/set-refresh-schedule Set the cron schedule to refresh persisted models. Shape should be JSON like {cron: "0 30 1/8 * * ? *"}. */ +export const createPersistSetRefreshSchedule: API.OperationMethod< + CreatePersistSetRefreshScheduleRequest, + CreatePersistSetRefreshScheduleResponse, + CreatePersistSetRefreshScheduleError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePersistSetRefreshScheduleRequest, + output: CreatePersistSetRefreshScheduleResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePremiumFeaturesTokenRefreshError = MetabaseOpError; +/** POST /api/premium-features/token/refresh Clear all token caches and re-check the premium features token against the MetaStore. Returns the fresh token status. Useful for the frontend after a purchase so that new features are recognized without waiting for the cache TTL. */ +export const createPremiumFeaturesTokenRefresh: API.OperationMethod< + CreatePremiumFeaturesTokenRefreshRequest, + CreatePremiumFeaturesTokenRefreshResponse, + CreatePremiumFeaturesTokenRefreshError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePremiumFeaturesTokenRefreshRequest, + output: CreatePremiumFeaturesTokenRefreshResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateProductFeedbackError = MetabaseOpError; +/** POST /api/product-feedback Endpoint to provide feedback from the product */ +export const createProductFeedback: API.OperationMethod< + CreateProductFeedbackRequest, + CreateProductFeedbackResponse, + CreateProductFeedbackError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateProductFeedbackRequest, + output: CreateProductFeedbackResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePulseError = MetabaseOpError; +/** POST /api/pulse Create a new `Pulse`. */ +export const createPulse: API.OperationMethod< + CreatePulseRequest, + CreatePulseResponse, + CreatePulseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePulseRequest, + output: CreatePulseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePulseTestError = MetabaseOpError; +/** POST /api/pulse/test Test send an unsaved pulse. */ +export const createPulseTest: API.OperationMethod< + CreatePulseTestRequest, + CreatePulseTestResponse, + CreatePulseTestError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePulseTestRequest, + output: CreatePulseTestResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePulseUnsubscribeError = MetabaseOpError; +/** POST /api/pulse/unsubscribe Allow non-users to unsubscribe from pulses/subscriptions, with the hash given through email. */ +export const createPulseUnsubscribe: API.OperationMethod< + CreatePulseUnsubscribeRequest, + CreatePulseUnsubscribeResponse, + CreatePulseUnsubscribeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePulseUnsubscribeRequest, + output: CreatePulseUnsubscribeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreatePulseUnsubscribeUndoError = MetabaseOpError; +/** POST /api/pulse/unsubscribe/undo Allow non-users to undo an unsubscribe from pulses/subscriptions, with the hash given through email. */ +export const createPulseUnsubscribeUndo: API.OperationMethod< + CreatePulseUnsubscribeUndoRequest, + CreatePulseUnsubscribeUndoResponse, + CreatePulseUnsubscribeUndoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreatePulseUnsubscribeUndoRequest, + output: CreatePulseUnsubscribeUndoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateRevisionRevertError = MetabaseOpError; +/** POST /api/revision/revert Revert an object to a prior revision. */ +export const createRevisionRevert: API.OperationMethod< + CreateRevisionRevertRequest, + CreateRevisionRevertResponse, + CreateRevisionRevertError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateRevisionRevertRequest, + output: CreateRevisionRevertResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSearchForceReindexError = MetabaseOpError; +/** POST /api/search/force-reindex This will trigger an immediate reindexing, if we are using search index. */ +export const createSearchForceReindex: API.OperationMethod< + CreateSearchForceReindexRequest, + CreateSearchForceReindexResponse, + CreateSearchForceReindexError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSearchForceReindexRequest, + output: CreateSearchForceReindexResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSearchReInitError = MetabaseOpError; +/** POST /api/search/re-init This will blow away any search indexes, re-create, and re-populate them. */ +export const createSearchReInit: API.OperationMethod< + CreateSearchReInitRequest, + CreateSearchReInitResponse, + CreateSearchReInitError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSearchReInitRequest, + output: CreateSearchReInitResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSegmentError = MetabaseOpError; +/** POST /api/segment Create a new `Segment`. */ +export const createSegment: API.OperationMethod< + CreateSegmentRequest, + CreateSegmentResponse, + CreateSegmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSegmentRequest, + output: CreateSegmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionError = MetabaseOpError; +/** POST /api/session Login. */ +export const createSession: API.OperationMethod< + CreateSessionRequest, + CreateSessionResponse, + CreateSessionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionRequest, + output: CreateSessionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionForgotPasswordError = MetabaseOpError; +/** POST /api/session/forgot_password Send a reset email when user has forgotten their password. */ +export const createSessionForgotPassword: API.OperationMethod< + CreateSessionForgotPasswordRequest, + CreateSessionForgotPasswordResponse, + CreateSessionForgotPasswordError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionForgotPasswordRequest, + output: CreateSessionForgotPasswordResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionGoogleAuthError = MetabaseOpError; +/** POST /api/session/google_auth Login with Google Auth. */ +export const createSessionGoogleAuth: API.OperationMethod< + CreateSessionGoogleAuthRequest, + CreateSessionGoogleAuthResponse, + CreateSessionGoogleAuthError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionGoogleAuthRequest, + output: CreateSessionGoogleAuthResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionMfaSendEmailOtpError = MetabaseOpError; +/** POST /api/session/mfa/send-email-otp Email a one-time code as a fallback second factor (for a user who lost their authenticator but still has recovery codes disabled or unavailable). Requires a valid challenge token from `POST /api/session`; the code is single-use with a 10-minute expiry and is accepted by `POST /mfa/verify` like any other code. */ +export const createSessionMfaSendEmailOtp: API.OperationMethod< + CreateSessionMfaSendEmailOtpRequest, + CreateSessionMfaSendEmailOtpResponse, + CreateSessionMfaSendEmailOtpError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionMfaSendEmailOtpRequest, + output: CreateSessionMfaSendEmailOtpResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionMfaVerifyError = MetabaseOpError; +/** POST /api/session/mfa/verify Complete a two-step login by verifying a one-time code. Takes the `challenge_token` returned by `POST /api/session` and either the 6-digit `code` from the user's authenticator app, one of their single-use recovery codes, or an emailed one-time code; on success sets the session cookie. */ +export const createSessionMfaVerify: API.OperationMethod< + CreateSessionMfaVerifyRequest, + CreateSessionMfaVerifyResponse, + CreateSessionMfaVerifyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionMfaVerifyRequest, + output: CreateSessionMfaVerifyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionPasswordCheckError = MetabaseOpError; +/** POST /api/session/password-check Endpoint that checks if the supplied password meets the currently configured password complexity rules. */ +export const createSessionPasswordCheck: API.OperationMethod< + CreateSessionPasswordCheckRequest, + CreateSessionPasswordCheckResponse, + CreateSessionPasswordCheckError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionPasswordCheckRequest, + output: CreateSessionPasswordCheckResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSessionResetPasswordError = MetabaseOpError; +/** POST /api/session/reset_password Reset password with a reset token. */ +export const createSessionResetPassword: API.OperationMethod< + CreateSessionResetPasswordRequest, + CreateSessionResetPasswordResponse, + CreateSessionResetPasswordError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSessionResetPasswordRequest, + output: CreateSessionResetPasswordResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSetupError = MetabaseOpError; +/** POST /api/setup Special endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and returns a session ID. This endpoint can also be used to set specific settings from the setup flow. */ +export const createSetup: API.OperationMethod< + CreateSetupRequest, + CreateSetupResponse, + CreateSetupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSetupRequest, + output: CreateSetupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateSlackBugReportError = MetabaseOpError; +/** POST /api/slack/bug-report Send diagnostic information to the configured Slack channels. */ +export const createSlackBugReport: API.OperationMethod< + CreateSlackBugReportRequest, + CreateSlackBugReportResponse, + CreateSlackBugReportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateSlackBugReportRequest, + output: CreateSlackBugReportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTableAppendCsvError = MetabaseOpError; +/** POST /api/table/{id}/append-csv Inserts the rows of an uploaded CSV file into the table identified by `:id`. The table must have been created by uploading a CSV file. */ +export const createTableAppendCsv: API.OperationMethod< + CreateTableAppendCsvRequest, + CreateTableAppendCsvResponse, + CreateTableAppendCsvError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTableAppendCsvRequest, + output: CreateTableAppendCsvResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTableDiscardValueError = MetabaseOpError; +/** POST /api/table/{id}/discard_values Discard the FieldValues belonging to the Fields in this Table. Only applies to fields that have FieldValues. If this Table's Database is set up to automatically sync FieldValues, they will be recreated during the next cycle. */ +export const createTableDiscardValue: API.OperationMethod< + CreateTableDiscardValueRequest, + CreateTableDiscardValueResponse, + CreateTableDiscardValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTableDiscardValueRequest, + output: CreateTableDiscardValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTableReplaceCsvError = MetabaseOpError; +/** POST /api/table/{id}/replace-csv Replaces the contents of the table identified by `:id` with the rows of an uploaded CSV file. The table must have been created by uploading a CSV file. */ +export const createTableReplaceCsv: API.OperationMethod< + CreateTableReplaceCsvRequest, + CreateTableReplaceCsvResponse, + CreateTableReplaceCsvError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTableReplaceCsvRequest, + output: CreateTableReplaceCsvResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTableRescanValueError = MetabaseOpError; +/** POST /api/table/{id}/rescan_values Manually trigger an update for the FieldValues for the Fields belonging to this Table. Only applies to Fields that are eligible for FieldValues. */ +export const createTableRescanValue: API.OperationMethod< + CreateTableRescanValueRequest, + CreateTableRescanValueResponse, + CreateTableRescanValueError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTableRescanValueRequest, + output: CreateTableRescanValueResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTableSyncSchemaError = MetabaseOpError; +/** POST /api/table/{id}/sync_schema Trigger a manual update of the schema metadata for this `Table`. */ +export const createTableSyncSchema: API.OperationMethod< + CreateTableSyncSchemaRequest, + CreateTableSyncSchemaResponse, + CreateTableSyncSchemaError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTableSyncSchemaRequest, + output: CreateTableSyncSchemaResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTimelineError = MetabaseOpError; +/** POST /api/timeline Create a new [[Timeline]]. */ +export const createTimeline: API.OperationMethod< + CreateTimelineRequest, + CreateTimelineResponse, + CreateTimelineError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTimelineRequest, + output: CreateTimelineResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTimelineEventError = MetabaseOpError; +/** POST /api/timeline-event Create a new [[TimelineEvent]]. */ +export const createTimelineEvent: API.OperationMethod< + CreateTimelineEventRequest, + CreateTimelineEventResponse, + CreateTimelineEventError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTimelineEventRequest, + output: CreateTimelineEventResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformError = MetabaseOpError; +/** POST /api/transform Create a new transform. */ +export const createTransform: API.OperationMethod< + CreateTransformRequest, + CreateTransformResponse, + CreateTransformError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformRequest, + output: CreateTransformResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformCancelError = MetabaseOpError; +/** POST /api/transform/{id}/cancel Cancel the current run for a given transform. */ +export const createTransformCancel: API.OperationMethod< + CreateTransformCancelRequest, + CreateTransformCancelResponse, + CreateTransformCancelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformCancelRequest, + output: CreateTransformCancelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformJobError = MetabaseOpError; +/** POST /api/transform-job Create a new transform job. */ +export const createTransformJob: API.OperationMethod< + CreateTransformJobRequest, + CreateTransformJobResponse, + CreateTransformJobError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformJobRequest, + output: CreateTransformJobResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformJobRunError = MetabaseOpError; +/** POST /api/transform-job/{job-id}/run Run a transform job manually. By default, fresh pulled-in dependencies are skipped; pass `run_all` to force-refresh the whole plan. */ +export const createTransformJobRun: API.OperationMethod< + CreateTransformJobRunRequest, + CreateTransformJobRunResponse, + CreateTransformJobRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformJobRunRequest, + output: CreateTransformJobRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformResetCheckpointError = MetabaseOpError; +/** POST /api/transform/{id}/reset-checkpoint Reset the stored checkpoint for an incremental transform. */ +export const createTransformResetCheckpoint: API.OperationMethod< + CreateTransformResetCheckpointRequest, + CreateTransformResetCheckpointResponse, + CreateTransformResetCheckpointError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformResetCheckpointRequest, + output: CreateTransformResetCheckpointResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformRunError = MetabaseOpError; +/** POST /api/transform/{id}/run Run a transform. */ +export const createTransformRun: API.OperationMethod< + CreateTransformRunRequest, + CreateTransformRunResponse, + CreateTransformRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformRunRequest, + output: CreateTransformRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateTransformTagError = MetabaseOpError; +/** POST /api/transform-tag Create a new transform tag. */ +export const createTransformTag: API.OperationMethod< + CreateTransformTagRequest, + CreateTransformTagResponse, + CreateTransformTagError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateTransformTagRequest, + output: CreateTransformTagResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateUploadCsvError = MetabaseOpError; +/** POST /api/upload/csv Create a table and model populated with the values from the attached CSV. Returns the model ID if successful. */ +export const createUploadCsv: API.OperationMethod< + CreateUploadCsvRequest, + CreateUploadCsvResponse, + CreateUploadCsvError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateUploadCsvRequest, + output: CreateUploadCsvResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateUserError = MetabaseOpError; +/** POST /api/user Create a new `User`, return a 400 if the email address is already taken */ +export const createUser: API.OperationMethod< + CreateUserRequest, + CreateUserResponse, + CreateUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateUserRequest, + output: CreateUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type CreateUserPasswordResetUrlError = MetabaseOpError; +/** POST /api/user/{id}/password-reset-url Generate a password reset URL for a user. Admins can share this URL directly with the user. The link expires in 48 hours. */ +export const createUserPasswordResetUrl: API.OperationMethod< + CreateUserPasswordResetUrlRequest, + CreateUserPasswordResetUrlResponse, + CreateUserPasswordResetUrlError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: CreateUserPasswordResetUrlRequest, + output: CreateUserPasswordResetUrlResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteActionError = MetabaseOpError; +/** DELETE /api/action/{action-id} Delete an Action. */ +export const deleteAction: API.OperationMethod< + DeleteActionRequest, + DeleteActionResponse, + DeleteActionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteActionRequest, + output: DeleteActionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteActionPublicLinkError = MetabaseOpError; +/** DELETE /api/action/{id}/public_link Delete the publicly-accessible link to this Dashboard. */ +export const deleteActionPublicLink: API.OperationMethod< + DeleteActionPublicLinkRequest, + DeleteActionPublicLinkResponse, + DeleteActionPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteActionPublicLinkRequest, + output: DeleteActionPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteAlertSubscriptionError = MetabaseOpError; +/** DELETE /api/alert/{id}/subscription For users to unsubscribe themselves from the given alert. */ +export const deleteAlertSubscription: API.OperationMethod< + DeleteAlertSubscriptionRequest, + DeleteAlertSubscriptionResponse, + DeleteAlertSubscriptionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteAlertSubscriptionRequest, + output: DeleteAlertSubscriptionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteBookmarkError = MetabaseOpError; +/** DELETE /api/bookmark/{model}/{id} Delete a bookmark. Will delete a bookmark assigned to the user making the request by model and id. */ +export const deleteBookmark: API.OperationMethod< + DeleteBookmarkRequest, + DeleteBookmarkResponse, + DeleteBookmarkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteBookmarkRequest, + output: DeleteBookmarkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteCacheError = MetabaseOpError; +/** DELETE /api/cache Delete cache configurations. */ +export const deleteCache: API.OperationMethod< + DeleteCacheRequest, + DeleteCacheResponse, + DeleteCacheError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteCacheRequest, + output: DeleteCacheResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteCardError = MetabaseOpError; +/** DELETE /api/card/{id} Hard delete a Card. To soft delete, use `PUT /api/queries/:id` */ +export const deleteCard: API.OperationMethod< + DeleteCardRequest, + DeleteCardResponse, + DeleteCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteCardRequest, + output: DeleteCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteCardPublicLinkError = MetabaseOpError; +/** DELETE /api/card/{card-id}/public_link Delete the publicly-accessible link to this Card. */ +export const deleteCardPublicLink: API.OperationMethod< + DeleteCardPublicLinkRequest, + DeleteCardPublicLinkResponse, + DeleteCardPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteCardPublicLinkRequest, + output: DeleteCardPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteCollectionError = MetabaseOpError; +/** DELETE /api/collection/{id} Deletes a collection permanently */ +export const deleteCollection: API.OperationMethod< + DeleteCollectionRequest, + DeleteCollectionResponse, + DeleteCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteCollectionRequest, + output: DeleteCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteCommentError = MetabaseOpError; +/** DELETE /api/comment/{comment-id} Soft delete a comment */ +export const deleteComment: API.OperationMethod< + DeleteCommentRequest, + DeleteCommentResponse, + DeleteCommentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteCommentRequest, + output: DeleteCommentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteDashboardError = MetabaseOpError; +/** DELETE /api/dashboard/{id} Hard delete a Dashboard. To soft delete, use `PUT /api/dashboard/:id` This will remove also any questions/models/segments/metrics that use this database. */ +export const deleteDashboard: API.OperationMethod< + DeleteDashboardRequest, + DeleteDashboardResponse, + DeleteDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDashboardRequest, + output: DeleteDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteDashboardPublicLinkError = MetabaseOpError; +/** DELETE /api/dashboard/{dashboard-id}/public_link Delete the publicly-accessible link to this Dashboard. */ +export const deleteDashboardPublicLink: API.OperationMethod< + DeleteDashboardPublicLinkRequest, + DeleteDashboardPublicLinkResponse, + DeleteDashboardPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDashboardPublicLinkRequest, + output: DeleteDashboardPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteDatabaseError = MetabaseOpError; +/** DELETE /api/database/{id} Delete a `Database`. */ +export const deleteDatabase: API.OperationMethod< + DeleteDatabaseRequest, + DeleteDatabaseResponse, + DeleteDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDatabaseRequest, + output: DeleteDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteDocumentError = MetabaseOpError; +/** DELETE /api/document/{document-id} Permanently deletes an archived Document. */ +export const deleteDocument: API.OperationMethod< + DeleteDocumentRequest, + DeleteDocumentResponse, + DeleteDocumentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDocumentRequest, + output: DeleteDocumentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteDocumentPublicLinkError = MetabaseOpError; +/** DELETE /api/document/{document-id}/public-link Remove the public link for a Document. Deletes the public UUID from the Document, making it no longer accessible via the public sharing endpoint. This revokes public access to the Document - the existing public link will no longer work. Returns a 204 No Content response on success. Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting. Throws a 404 if the Document doesn't exist, is archived, or doesn't have a public link. */ +export const deleteDocumentPublicLink: API.OperationMethod< + DeleteDocumentPublicLinkRequest, + DeleteDocumentPublicLinkResponse, + DeleteDocumentPublicLinkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteDocumentPublicLinkRequest, + output: DeleteDocumentPublicLinkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeAdvancedPermissionsImpersonationError = MetabaseOpError; +/** DELETE /api/ee/advanced-permissions/impersonation/{id} Delete a Connection Impersonation entry. */ +export const deleteEeAdvancedPermissionsImpersonation: API.OperationMethod< + DeleteEeAdvancedPermissionsImpersonationRequest, + DeleteEeAdvancedPermissionsImpersonationResponse, + DeleteEeAdvancedPermissionsImpersonationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeAdvancedPermissionsImpersonationRequest, + output: DeleteEeAdvancedPermissionsImpersonationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeAiControlsPermissionsAdvancedError = MetabaseOpError; +/** DELETE /api/ee/ai-controls/permissions/advanced Switch back to simple permissions. Removes any custom permissions from all specific groups, keeping only Admins and All Users. */ +export const deleteEeAiControlsPermissionsAdvanced: API.OperationMethod< + DeleteEeAiControlsPermissionsAdvancedRequest, + DeleteEeAiControlsPermissionsAdvancedResponse, + DeleteEeAiControlsPermissionsAdvancedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeAiControlsPermissionsAdvancedRequest, + output: DeleteEeAiControlsPermissionsAdvancedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeAuditAppUserSubscriptionsError = MetabaseOpError; +/** DELETE /api/ee/audit-app/user/{id}/subscriptions Delete all Alert and DashboardSubscription subscriptions for a User (i.e., so they will no longer receive them). Archive all Alerts and DashboardSubscriptions created by the User. Only allowed for admins or for the current user. */ +export const deleteEeAuditAppUserSubscriptions: API.OperationMethod< + DeleteEeAuditAppUserSubscriptionsRequest, + DeleteEeAuditAppUserSubscriptionsResponse, + DeleteEeAuditAppUserSubscriptionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeAuditAppUserSubscriptionsRequest, + output: DeleteEeAuditAppUserSubscriptionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeCloudAddOnsError = MetabaseOpError; +/** DELETE /api/ee/cloud-add-ons/{product-type} Remove an add-on. */ +export const deleteEeCloudAddOns: API.OperationMethod< + DeleteEeCloudAddOnsRequest, + DeleteEeCloudAddOnsResponse, + DeleteEeCloudAddOnsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeCloudAddOnsRequest, + output: DeleteEeCloudAddOnsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeCustomVizPluginError = MetabaseOpError; +/** DELETE /api/ee/custom-viz-plugin/{id} Remove a custom visualization plugin and evict its on-disk cache. */ +export const deleteEeCustomVizPlugin: API.OperationMethod< + DeleteEeCustomVizPluginRequest, + DeleteEeCustomVizPluginResponse, + DeleteEeCustomVizPluginError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeCustomVizPluginRequest, + output: DeleteEeCustomVizPluginResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeDatabaseReplicationConnectionDatabaseError = + MetabaseOpError; +/** DELETE /api/ee/database-replication/connection/{database-id} Delete PG replication connection for the specified database. */ +export const deleteEeDatabaseReplicationConnectionDatabase: API.OperationMethod< + DeleteEeDatabaseReplicationConnectionDatabaseRequest, + DeleteEeDatabaseReplicationConnectionDatabaseResponse, + DeleteEeDatabaseReplicationConnectionDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeDatabaseReplicationConnectionDatabaseRequest, + output: DeleteEeDatabaseReplicationConnectionDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeEmailOverrideError = MetabaseOpError; +/** DELETE /api/ee/email/override Clear all cloud email related settings. You must be a superuser or have `setting` permission to do this. */ +export const deleteEeEmailOverride: API.OperationMethod< + DeleteEeEmailOverrideRequest, + DeleteEeEmailOverrideResponse, + DeleteEeEmailOverrideError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeEmailOverrideRequest, + output: DeleteEeEmailOverrideResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeGsheetsConnectionError = MetabaseOpError; +/** DELETE /api/ee/gsheets/connection Disconnect the google service account. There is only one (or zero) at the time of writing. */ +export const deleteEeGsheetsConnection: API.OperationMethod< + DeleteEeGsheetsConnectionRequest, + DeleteEeGsheetsConnectionResponse, + DeleteEeGsheetsConnectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeGsheetsConnectionRequest, + output: DeleteEeGsheetsConnectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeScimGroupError = MetabaseOpError; +/** DELETE /api/ee/scim/v2/Groups/{id} Delete a group. */ +export const deleteEeScimGroup: API.OperationMethod< + DeleteEeScimGroupRequest, + DeleteEeScimGroupResponse, + DeleteEeScimGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeScimGroupRequest, + output: DeleteEeScimGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEeUploadManagementTableError = MetabaseOpError; +/** DELETE /api/ee/upload-management/tables/{id} Delete the uploaded table from the database, optionally archiving cards for which it is the primary source. */ +export const deleteEeUploadManagementTable: API.OperationMethod< + DeleteEeUploadManagementTableRequest, + DeleteEeUploadManagementTableResponse, + DeleteEeUploadManagementTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEeUploadManagementTableRequest, + output: DeleteEeUploadManagementTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEmailError = MetabaseOpError; +/** DELETE /api/email Clear all email related settings. You must be a superuser or have `setting` permission to do this. */ +export const deleteEmail: API.OperationMethod< + DeleteEmailRequest, + DeleteEmailResponse, + DeleteEmailError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEmailRequest, + output: DeleteEmailResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteEmbedThemeError = MetabaseOpError; +/** DELETE /api/embed-theme/{id} Delete an embedding theme. */ +export const deleteEmbedTheme: API.OperationMethod< + DeleteEmbedThemeRequest, + DeleteEmbedThemeResponse, + DeleteEmbedThemeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteEmbedThemeRequest, + output: DeleteEmbedThemeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteFieldDimensionError = MetabaseOpError; +/** DELETE /api/field/{id}/dimension Remove the dimension associated to field at ID */ +export const deleteFieldDimension: API.OperationMethod< + DeleteFieldDimensionRequest, + DeleteFieldDimensionResponse, + DeleteFieldDimensionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteFieldDimensionRequest, + output: DeleteFieldDimensionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteGlossaryError = MetabaseOpError; +/** DELETE /api/glossary/{id} Delete a glossary entry. */ +export const deleteGlossary: API.OperationMethod< + DeleteGlossaryRequest, + DeleteGlossaryResponse, + DeleteGlossaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteGlossaryRequest, + output: DeleteGlossaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteKeyError = MetabaseOpError; +/** DELETE /api/api-key/{id} Delete an ApiKey */ +export const deleteKey: API.OperationMethod< + DeleteKeyRequest, + DeleteKeyResponse, + DeleteKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteKeyRequest, + output: DeleteKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteLoggerAdjustmentError = MetabaseOpError; +/** DELETE /api/logger/adjustment Undo any log level adjustments. */ +export const deleteLoggerAdjustment: API.OperationMethod< + DeleteLoggerAdjustmentRequest, + DeleteLoggerAdjustmentResponse, + DeleteLoggerAdjustmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteLoggerAdjustmentRequest, + output: DeleteLoggerAdjustmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteMetabotMetabotPromptSuggestionsError = MetabaseOpError; +/** DELETE /api/metabot/metabot/{id}/prompt-suggestions Delete all prompt suggestions for the metabot instance with `id`. */ +export const deleteMetabotMetabotPromptSuggestions: API.OperationMethod< + DeleteMetabotMetabotPromptSuggestionsRequest, + DeleteMetabotMetabotPromptSuggestionsResponse, + DeleteMetabotMetabotPromptSuggestionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteMetabotMetabotPromptSuggestionsRequest, + output: DeleteMetabotMetabotPromptSuggestionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteMetabotMetabotPromptSuggestionsPromptError = MetabaseOpError; +/** DELETE /api/metabot/metabot/{id}/prompt-suggestions/{prompt-id} Delete the prompt suggestion with ID `prompt-id` for the metabot instance with `id`. */ +export const deleteMetabotMetabotPromptSuggestionsPrompt: API.OperationMethod< + DeleteMetabotMetabotPromptSuggestionsPromptRequest, + DeleteMetabotMetabotPromptSuggestionsPromptResponse, + DeleteMetabotMetabotPromptSuggestionsPromptError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteMetabotMetabotPromptSuggestionsPromptRequest, + output: DeleteMetabotMetabotPromptSuggestionsPromptResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteModelIndexError = MetabaseOpError; +/** DELETE /api/model-index/{id} Delete ModelIndex. */ +export const deleteModelIndex: API.OperationMethod< + DeleteModelIndexRequest, + DeleteModelIndexResponse, + DeleteModelIndexError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteModelIndexRequest, + output: DeleteModelIndexResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteMtGtapError = MetabaseOpError; +/** DELETE /api/mt/gtap/{id} Delete a GTAP entry. */ +export const deleteMtGtap: API.OperationMethod< + DeleteMtGtapRequest, + DeleteMtGtapResponse, + DeleteMtGtapError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteMtGtapRequest, + output: DeleteMtGtapResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteOsiAiContextError = MetabaseOpError; +/** DELETE /api/osi/ai-context/{entity-type}/{entity-local-id} Delete the ai_context entry for an entity by its logical key. */ +export const deleteOsiAiContext: API.OperationMethod< + DeleteOsiAiContextRequest, + DeleteOsiAiContextResponse, + DeleteOsiAiContextError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteOsiAiContextRequest, + output: DeleteOsiAiContextResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeletePermissionsGroupError = MetabaseOpError; +/** DELETE /api/permissions/group/{group-id} Delete a specific `PermissionsGroup`. */ +export const deletePermissionsGroup: API.OperationMethod< + DeletePermissionsGroupRequest, + DeletePermissionsGroupResponse, + DeletePermissionsGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletePermissionsGroupRequest, + output: DeletePermissionsGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeletePermissionsMembershipError = MetabaseOpError; +/** DELETE /api/permissions/membership/{id} Remove a User from a PermissionsGroup (delete their membership). */ +export const deletePermissionsMembership: API.OperationMethod< + DeletePermissionsMembershipRequest, + DeletePermissionsMembershipResponse, + DeletePermissionsMembershipError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletePermissionsMembershipRequest, + output: DeletePermissionsMembershipResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeletePulseSubscriptionError = MetabaseOpError; +/** DELETE /api/pulse/{id}/subscription For users to unsubscribe themselves from a pulse subscription. */ +export const deletePulseSubscription: API.OperationMethod< + DeletePulseSubscriptionRequest, + DeletePulseSubscriptionResponse, + DeletePulseSubscriptionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeletePulseSubscriptionRequest, + output: DeletePulseSubscriptionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteSegmentError = MetabaseOpError; +/** DELETE /api/segment/{id} Archive a Segment. (DEPRECATED -- Just pass updated value of `:archived` to the `PUT` endpoint instead.) */ +export const deleteSegment: API.OperationMethod< + DeleteSegmentRequest, + DeleteSegmentResponse, + DeleteSegmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteSegmentRequest, + output: DeleteSegmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteSessionError = MetabaseOpError; +/** DELETE /api/session Logout. */ +export const deleteSession: API.OperationMethod< + DeleteSessionRequest, + DeleteSessionResponse, + DeleteSessionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteSessionRequest, + output: DeleteSessionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTimelineError = MetabaseOpError; +/** DELETE /api/timeline/{id} Delete a [[Timeline]]. Will cascade delete its events as well. */ +export const deleteTimeline: API.OperationMethod< + DeleteTimelineRequest, + DeleteTimelineResponse, + DeleteTimelineError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTimelineRequest, + output: DeleteTimelineResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTimelineEventError = MetabaseOpError; +/** DELETE /api/timeline-event/{id} Delete a [[TimelineEvent]]. */ +export const deleteTimelineEvent: API.OperationMethod< + DeleteTimelineEventRequest, + DeleteTimelineEventResponse, + DeleteTimelineEventError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTimelineEventRequest, + output: DeleteTimelineEventResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTransformError = MetabaseOpError; +/** DELETE /api/transform/{id} Delete a transform. */ +export const deleteTransform: API.OperationMethod< + DeleteTransformRequest, + DeleteTransformResponse, + DeleteTransformError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTransformRequest, + output: DeleteTransformResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTransformJobError = MetabaseOpError; +/** DELETE /api/transform-job/{job-id} Delete a transform job. */ +export const deleteTransformJob: API.OperationMethod< + DeleteTransformJobRequest, + DeleteTransformJobResponse, + DeleteTransformJobError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTransformJobRequest, + output: DeleteTransformJobResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTransformTableError = MetabaseOpError; +/** DELETE /api/transform/{id}/table Delete a transform's output table. */ +export const deleteTransformTable: API.OperationMethod< + DeleteTransformTableRequest, + DeleteTransformTableResponse, + DeleteTransformTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTransformTableRequest, + output: DeleteTransformTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteTransformTagError = MetabaseOpError; +/** DELETE /api/transform-tag/{tag-id} Delete a transform tag. Removes it from all transforms and jobs. */ +export const deleteTransformTag: API.OperationMethod< + DeleteTransformTagRequest, + DeleteTransformTagResponse, + DeleteTransformTagError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteTransformTagRequest, + output: DeleteTransformTagResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteUserError = MetabaseOpError; +/** DELETE /api/user/{id} Disable a `User`. This does not remove the `User` from the DB, but instead disables their account. */ +export const deleteUser: API.OperationMethod< + DeleteUserRequest, + DeleteUserResponse, + DeleteUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteUserRequest, + output: DeleteUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type DeleteUserKeyValueNamespaceKeyError = MetabaseOpError; +/** DELETE /api/user-key-value/namespace/{namespace}/key/{key} Deletes a KV-pair for the user */ +export const deleteUserKeyValueNamespaceKey: API.OperationMethod< + DeleteUserKeyValueNamespaceKeyRequest, + DeleteUserKeyValueNamespaceKeyResponse, + DeleteUserKeyValueNamespaceKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: DeleteUserKeyValueNamespaceKeyRequest, + output: DeleteUserKeyValueNamespaceKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActionError = MetabaseOpError; +/** GET /api/action Returns actions that can be used for QueryActions. By default lists all viewable actions. Pass optional `?model-id=` to limit to actions on a particular model. */ +export const getAction: API.OperationMethod< + GetActionRequest, + GetActionResponse, + GetActionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActionRequest, + output: GetActionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAction2Error = MetabaseOpError; +/** GET /api/action/public Fetch a list of Actions with public UUIDs. These actions are publicly-accessible *if* public sharing is enabled. */ +export const getAction2: API.OperationMethod< + GetAction2Request, + GetAction2Response, + GetAction2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAction2Request, + output: GetAction2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActionByActionIdError = MetabaseOpError; +/** GET /api/action/{action-id} Fetch an Action. */ +export const getActionByActionId: API.OperationMethod< + GetActionByActionIdRequest, + GetActionByActionIdResponse, + GetActionByActionIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActionByActionIdRequest, + output: GetActionByActionIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActionByUuidError = MetabaseOpError; +/** GET /api/public/action/{uuid} Fetch a publicly-accessible Action. Does not require auth credentials. Public sharing must be enabled. */ +export const getActionByUuid: API.OperationMethod< + GetActionByUuidRequest, + GetActionByUuidResponse, + GetActionByUuidError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActionByUuidRequest, + output: GetActionByUuidResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActionExecuteError = MetabaseOpError; +/** GET /api/action/{action-id}/execute Fetches the values for filling in execution parameters. Pass PK parameters and values to select. */ +export const getActionExecute: API.OperationMethod< + GetActionExecuteRequest, + GetActionExecuteResponse, + GetActionExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActionExecuteRequest, + output: GetActionExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActivityMostRecentlyViewedDashboardError = MetabaseOpError; +/** GET /api/activity/most_recently_viewed_dashboard Get the most recently viewed dashboard for the current user. Returns a 204 if the user has not viewed any dashboards in the last 24 hours. */ +export const getActivityMostRecentlyViewedDashboard: API.OperationMethod< + GetActivityMostRecentlyViewedDashboardRequest, + GetActivityMostRecentlyViewedDashboardResponse, + GetActivityMostRecentlyViewedDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActivityMostRecentlyViewedDashboardRequest, + output: GetActivityMostRecentlyViewedDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActivityPopularItemsError = MetabaseOpError; +/** GET /api/activity/popular_items Get the list of 5 popular things on the instance. Query takes 8 and limits to 5 so that if it finds anything archived, deleted, etc it can usually still get 5. */ +export const getActivityPopularItems: API.OperationMethod< + GetActivityPopularItemsRequest, + GetActivityPopularItemsResponse, + GetActivityPopularItemsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActivityPopularItemsRequest, + output: GetActivityPopularItemsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetActivityRecentsError = MetabaseOpError; +/** GET /api/activity/recents Get a list of recent items the current user has been viewing most recently under the `:recents` key. Allows for filtering by context: views or selections */ +export const getActivityRecents: API.OperationMethod< + GetActivityRecentsRequest, + GetActivityRecentsResponse, + GetActivityRecentsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetActivityRecentsRequest, + output: GetActivityRecentsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAgentPingError = MetabaseOpError; +/** GET /api/agent/v1/ping Health check endpoint for the Agent API. */ +export const getAgentPing: API.OperationMethod< + GetAgentPingRequest, + GetAgentPingResponse, + GetAgentPingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAgentPingRequest, + output: GetAgentPingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAlertError = MetabaseOpError; +/** GET /api/alert Fetch alerts which the current user has created or will receive, or all alerts if the user is an admin. The optional `user_id` will return alerts created by the corresponding user, but is ignored for non-admin users. */ +export const getAlert: API.OperationMethod< + GetAlertRequest, + GetAlertResponse, + GetAlertError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAlertRequest, + output: GetAlertResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAlertByIdError = MetabaseOpError; +/** GET /api/alert/{id} Fetch an alert by ID */ +export const getAlertById: API.OperationMethod< + GetAlertByIdRequest, + GetAlertByIdResponse, + GetAlertByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAlertByIdRequest, + output: GetAlertByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAnalyticsAnonymousStatsError = MetabaseOpError; +/** GET /api/analytics/anonymous-stats Anonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see what is being phoned home. */ +export const getAnalyticsAnonymousStats: API.OperationMethod< + GetAnalyticsAnonymousStatsRequest, + GetAnalyticsAnonymousStatsResponse, + GetAnalyticsAnonymousStatsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAnalyticsAnonymousStatsRequest, + output: GetAnalyticsAnonymousStatsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardError = MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query} Return an automagic dashboard for entity `entity` with id `id`. */ +export const getAutomagicDashboard: API.OperationMethod< + GetAutomagicDashboardRequest, + GetAutomagicDashboardResponse, + GetAutomagicDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardRequest, + output: GetAutomagicDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardCellError = MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query} Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity` defined by query `cell-query`. */ +export const getAutomagicDashboardCell: API.OperationMethod< + GetAutomagicDashboardCellRequest, + GetAutomagicDashboardCellResponse, + GetAutomagicDashboardCellError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardCellRequest, + output: GetAutomagicDashboardCellResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardCellCompareError = MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/compare/{comparison-entity}/{comparison-entity-id-or-query} Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity` with id `id` defined by query `cell-query`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`. */ +export const getAutomagicDashboardCellCompare: API.OperationMethod< + GetAutomagicDashboardCellCompareRequest, + GetAutomagicDashboardCellCompareResponse, + GetAutomagicDashboardCellCompareError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardCellCompareRequest, + output: GetAutomagicDashboardCellCompareResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardCellRuleDashboardTemplateError = + MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template} Return an automagic dashboard analyzing cell in question with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`. */ +export const getAutomagicDashboardCellRuleDashboardTemplate: API.OperationMethod< + GetAutomagicDashboardCellRuleDashboardTemplateRequest, + GetAutomagicDashboardCellRuleDashboardTemplateResponse, + GetAutomagicDashboardCellRuleDashboardTemplateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardCellRuleDashboardTemplateRequest, + output: GetAutomagicDashboardCellRuleDashboardTemplateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardCellRuleDashboardTemplateCompareError = + MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/cell/{cell-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query} Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity` with id `id` defined by query `cell-query` using dashboard-template `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`. */ +export const getAutomagicDashboardCellRuleDashboardTemplateCompare: API.OperationMethod< + GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest, + GetAutomagicDashboardCellRuleDashboardTemplateCompareResponse, + GetAutomagicDashboardCellRuleDashboardTemplateCompareError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardCellRuleDashboardTemplateCompareRequest, + output: GetAutomagicDashboardCellRuleDashboardTemplateCompareResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardCompareError = MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/compare/{comparison-entity}/{comparison-entity-id-or-query} Return an automagic comparison dashboard for entity `entity` with id `id` compared with entity `comparison-entity` with id `comparison-entity-id-or-query.` */ +export const getAutomagicDashboardCompare: API.OperationMethod< + GetAutomagicDashboardCompareRequest, + GetAutomagicDashboardCompareResponse, + GetAutomagicDashboardCompareError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardCompareRequest, + output: GetAutomagicDashboardCompareResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardEntityOrQueryQueryMetadataError = + MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/query_metadata Return all metadata for an automagic dashboard for entity `entity` with id `id`. */ +export const getAutomagicDashboardEntityOrQueryQueryMetadata: API.OperationMethod< + GetAutomagicDashboardEntityOrQueryQueryMetadataRequest, + GetAutomagicDashboardEntityOrQueryQueryMetadataResponse, + GetAutomagicDashboardEntityOrQueryQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardEntityOrQueryQueryMetadataRequest, + output: GetAutomagicDashboardEntityOrQueryQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardRuleDashboardTemplateError = MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template} Return an automagic dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`. */ +export const getAutomagicDashboardRuleDashboardTemplate: API.OperationMethod< + GetAutomagicDashboardRuleDashboardTemplateRequest, + GetAutomagicDashboardRuleDashboardTemplateResponse, + GetAutomagicDashboardRuleDashboardTemplateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardRuleDashboardTemplateRequest, + output: GetAutomagicDashboardRuleDashboardTemplateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardRuleDashboardTemplateCompareError = + MetabaseOpError; +/** GET /api/automagic-dashboards/{entity}/{entity-id-or-query}/rule/{prefix}/{dashboard-template}/compare/{comparison-entity}/{comparison-entity-id-or-query} Return an automagic comparison dashboard for entity `entity` with id `id` using dashboard-template `dashboard-template`; compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`. */ +export const getAutomagicDashboardRuleDashboardTemplateCompare: API.OperationMethod< + GetAutomagicDashboardRuleDashboardTemplateCompareRequest, + GetAutomagicDashboardRuleDashboardTemplateCompareResponse, + GetAutomagicDashboardRuleDashboardTemplateCompareError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardRuleDashboardTemplateCompareRequest, + output: GetAutomagicDashboardRuleDashboardTemplateCompareResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardsDatabaseCandidatesError = MetabaseOpError; +/** GET /api/automagic-dashboards/database/{id}/candidates Return a list of candidates for automagic dashboards ordered by interestingness. */ +export const getAutomagicDashboardsDatabaseCandidates: API.OperationMethod< + GetAutomagicDashboardsDatabaseCandidatesRequest, + GetAutomagicDashboardsDatabaseCandidatesResponse, + GetAutomagicDashboardsDatabaseCandidatesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardsDatabaseCandidatesRequest, + output: GetAutomagicDashboardsDatabaseCandidatesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetAutomagicDashboardsModelIndexPrimaryKeyError = MetabaseOpError; +/** GET /api/automagic-dashboards/model_index/{model-index-id}/primary_key/{pk-id} Return an automagic dashboard for an entity detail specified by `entity` with id `id` and a primary key of `indexed-value`. */ +export const getAutomagicDashboardsModelIndexPrimaryKey: API.OperationMethod< + GetAutomagicDashboardsModelIndexPrimaryKeyRequest, + GetAutomagicDashboardsModelIndexPrimaryKeyResponse, + GetAutomagicDashboardsModelIndexPrimaryKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetAutomagicDashboardsModelIndexPrimaryKeyRequest, + output: GetAutomagicDashboardsModelIndexPrimaryKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetBookmarkError = MetabaseOpError; +/** GET /api/bookmark Fetch all bookmarks for the user */ +export const getBookmark: API.OperationMethod< + GetBookmarkRequest, + GetBookmarkResponse, + GetBookmarkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBookmarkRequest, + output: GetBookmarkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetBugReportingConnectionPoolDetailsError = MetabaseOpError; +/** GET /api/bug-reporting/connection-pool-details Returns database connection pool info for the current Metabase instance. */ +export const getBugReportingConnectionPoolDetails: API.OperationMethod< + GetBugReportingConnectionPoolDetailsRequest, + GetBugReportingConnectionPoolDetailsResponse, + GetBugReportingConnectionPoolDetailsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBugReportingConnectionPoolDetailsRequest, + output: GetBugReportingConnectionPoolDetailsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetBugReportingDetailsError = MetabaseOpError; +/** GET /api/bug-reporting/details Returns version and system information relevant to filing a bug report against Metabase. */ +export const getBugReportingDetails: API.OperationMethod< + GetBugReportingDetailsRequest, + GetBugReportingDetailsResponse, + GetBugReportingDetailsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetBugReportingDetailsRequest, + output: GetBugReportingDetailsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCacheError = MetabaseOpError; +/** GET /api/cache Return cache configuration. Supports pagination via `limit` and `offset` query parameters, and sorting via `sort_column` and `sort_direction`. */ +export const getCache: API.OperationMethod< + GetCacheRequest, + GetCacheResponse, + GetCacheError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCacheRequest, + output: GetCacheResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardError = MetabaseOpError; +/** GET /api/card Get all the Cards. Option filter param `f` can be used to change the set of Cards that are returned; default is `all`, but other options include `mine`, `bookmarked`, `database`, `table`, `using_model`, `using_segment`, and `archived`. See corresponding implementation functions above for the specific behavior of each filter option. :card_index: */ +export const getCard: API.OperationMethod< + GetCardRequest, + GetCardResponse, + GetCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardRequest, + output: GetCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCard2Error = MetabaseOpError; +/** GET /api/card/public Fetch a list of Cards with public UUIDs. These cards are publicly-accessible *if* public sharing is enabled. */ +export const getCard2: API.OperationMethod< + GetCard2Request, + GetCard2Response, + GetCard2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCard2Request, + output: GetCard2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardByIdError = MetabaseOpError; +/** GET /api/card/{id} Get `Card` with ID. As of v57, returns the MBQL query (`dataset_query`) as MBQL 5; to return the query as MBQL 4 (aka legacy MBQL) instead, you can specify `?legacy-mbql=true`. */ +export const getCardById: API.OperationMethod< + GetCardByIdRequest, + GetCardByIdResponse, + GetCardByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardByIdRequest, + output: GetCardByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardByUuidError = MetabaseOpError; +/** GET /api/public/card/{uuid} Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth credentials. Public sharing must be enabled. */ +export const getCardByUuid: API.OperationMethod< + GetCardByUuidRequest, + GetCardByUuidResponse, + GetCardByUuidError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardByUuidRequest, + output: GetCardByUuidResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardDashboardsError = MetabaseOpError; +/** GET /api/card/{id}/dashboards Get a list of `{:name ... :id ...}` pairs for all the dashboards this card appears in. */ +export const getCardDashboards: API.OperationMethod< + GetCardDashboardsRequest, + GetCardDashboardsResponse, + GetCardDashboardsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardDashboardsRequest, + output: GetCardDashboardsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardEmbeddableError = MetabaseOpError; +/** GET /api/card/embeddable Fetch a list of Cards where `enable_embedding` is `true`. The cards can be embedded using the embedding endpoints and a signed JWT. */ +export const getCardEmbeddable: API.OperationMethod< + GetCardEmbeddableRequest, + GetCardEmbeddableResponse, + GetCardEmbeddableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardEmbeddableRequest, + output: GetCardEmbeddableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamRemappingError = MetabaseOpError; +/** GET /api/card/{id}/params/{param-key}/remapping Fetch the remapped value for a given value of the parameter with ID `:param-key`. ;; fetch the remapped value for Card 1 parameter 'abc' for value 100 GET /api/queries/1/params/abc/remapping?value=100 */ +export const getCardParamRemapping: API.OperationMethod< + GetCardParamRemappingRequest, + GetCardParamRemappingResponse, + GetCardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamRemappingRequest, + output: GetCardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamRemapping2Error = MetabaseOpError; +/** GET /api/public/card/{uuid}/params/{param-key}/remapping Fetch the remapped value for the given `value` of parameter with ID `:param-key` of card with UUID `uuid`. */ +export const getCardParamRemapping2: API.OperationMethod< + GetCardParamRemappingRequest2, + GetCardParamRemapping2Response, + GetCardParamRemapping2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamRemappingRequest2, + output: GetCardParamRemapping2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamSearchError = MetabaseOpError; +/** GET /api/card/{card-id}/params/{param-key}/search/{query} Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. ;; fetch values for Card 1 parameter 'abc' that contain 'Orange'; GET /api/queries/1/params/abc/search/Orange Currently limited to first 1000 results. */ +export const getCardParamSearch: API.OperationMethod< + GetCardParamSearchRequest, + GetCardParamSearchResponse, + GetCardParamSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamSearchRequest, + output: GetCardParamSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamSearchByQueryError = MetabaseOpError; +/** GET /api/public/card/{uuid}/params/{param-key}/search/{query} Fetch values for a parameter on a public card containing `query`. */ +export const getCardParamSearchByQuery: API.OperationMethod< + GetCardParamSearchByQueryRequest, + GetCardParamSearchByQueryResponse, + GetCardParamSearchByQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamSearchByQueryRequest, + output: GetCardParamSearchByQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamValuesError = MetabaseOpError; +/** GET /api/card/{card-id}/params/{param-key}/values Fetch possible values of the parameter whose ID is `:param-key`. ;; fetch values for Card 1 parameter 'abc' that are possible GET /api/queries/1/params/abc/values */ +export const getCardParamValues: API.OperationMethod< + GetCardParamValuesRequest, + GetCardParamValuesResponse, + GetCardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamValuesRequest, + output: GetCardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardParamValues2Error = MetabaseOpError; +/** GET /api/public/card/{uuid}/params/{param-key}/values Fetch values for a parameter on a public card. */ +export const getCardParamValues2: API.OperationMethod< + GetCardParamValuesRequest2, + GetCardParamValues2Response, + GetCardParamValues2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardParamValuesRequest2, + output: GetCardParamValues2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardQueryError = MetabaseOpError; +/** GET /api/public/card/{uuid}/query Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth credentials. Public sharing must be enabled. */ +export const getCardQuery: API.OperationMethod< + GetCardQueryRequest, + GetCardQueryResponse, + GetCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardQueryRequest, + output: GetCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardQueryByExportFormatError = MetabaseOpError; +/** GET /api/public/card/{uuid}/query/{export-format} Fetch a publicly-accessible Card and return query results in the specified format. Does not require auth credentials. Public sharing must be enabled. */ +export const getCardQueryByExportFormat: API.OperationMethod< + GetCardQueryByExportFormatRequest, + GetCardQueryByExportFormatResponse, + GetCardQueryByExportFormatError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardQueryByExportFormatRequest, + output: GetCardQueryByExportFormatResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardQueryMetadataError = MetabaseOpError; +/** GET /api/card/{id}/query_metadata Get all of the required query metadata for a card. */ +export const getCardQueryMetadata: API.OperationMethod< + GetCardQueryMetadataRequest, + GetCardQueryMetadataResponse, + GetCardQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardQueryMetadataRequest, + output: GetCardQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCardSeriesError = MetabaseOpError; +/** GET /api/card/{id}/series Fetches a list of compatible series with the card with id `card_id`. - `last_cursor` with value is the id of the last card from the previous page to fetch the next page. - `query` to search card by name. - `exclude_ids` to filter out a list of card ids */ +export const getCardSeries: API.OperationMethod< + GetCardSeriesRequest, + GetCardSeriesResponse, + GetCardSeriesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCardSeriesRequest, + output: GetCardSeriesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetChannelError = MetabaseOpError; +/** GET /api/channel Get all channels */ +export const getChannel: API.OperationMethod< + GetChannelRequest, + GetChannelResponse, + GetChannelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetChannelRequest, + output: GetChannelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetChannelByIdError = MetabaseOpError; +/** GET /api/channel/{id} Get a channel */ +export const getChannelById: API.OperationMethod< + GetChannelByIdRequest, + GetChannelByIdResponse, + GetChannelByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetChannelByIdRequest, + output: GetChannelByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCloudMigrationError = MetabaseOpError; +/** GET /api/cloud-migration Get the latest cloud migration, if any. */ +export const getCloudMigration: API.OperationMethod< + GetCloudMigrationRequest, + GetCloudMigrationResponse, + GetCloudMigrationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCloudMigrationRequest, + output: GetCloudMigrationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionError = MetabaseOpError; +/** GET /api/collection Fetch a list of all Collections that the current user has read permissions for (`:can_write` is returned as an additional property of each Collection so you can tell which of these you have write permissions for.) By default, this returns non-archived Collections, but instead you can show archived ones by passing `?archived=true`. By default, admin users will see all collections. To hide other user's collections pass in `?exclude-other-user-collections=true`. If personal-only is `true`, then return only personal collections where `personal_owner_id` is not `nil`. */ +export const getCollection: API.OperationMethod< + GetCollectionRequest, + GetCollectionResponse, + GetCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionRequest, + output: GetCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionByIdError = MetabaseOpError; +/** GET /api/collection/{id} Fetch a specific Collection with standard details added */ +export const getCollectionById: API.OperationMethod< + GetCollectionByIdRequest, + GetCollectionByIdResponse, + GetCollectionByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionByIdRequest, + output: GetCollectionByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionDashboardQuestionCandidatesError = MetabaseOpError; +/** GET /api/collection/{id}/dashboard-question-candidates Find cards in this collection that can be moved into dashboards in this collection. To be eligible, a card must only appear in one dashboard (which is also in this collection), and must not already be a dashboard question. */ +export const getCollectionDashboardQuestionCandidates: API.OperationMethod< + GetCollectionDashboardQuestionCandidatesRequest, + GetCollectionDashboardQuestionCandidatesResponse, + GetCollectionDashboardQuestionCandidatesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionDashboardQuestionCandidatesRequest, + output: GetCollectionDashboardQuestionCandidatesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionGraphError = MetabaseOpError; +/** GET /api/collection/graph Fetch a graph of all Collection Permissions. */ +export const getCollectionGraph: API.OperationMethod< + GetCollectionGraphRequest, + GetCollectionGraphResponse, + GetCollectionGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionGraphRequest, + output: GetCollectionGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionItemsError = MetabaseOpError; +/** GET /api/collection/{id}/items Fetch a specific Collection's items with the following options: * `models` - only include objects of a specific set of `models`. If unspecified, returns objects of all models * `archived` - when `true`, return archived objects *instead* of unarchived ones. Defaults to `false`. * `pinned_state` - when `is_pinned`, return pinned objects only. when `is_not_pinned`, return non pinned objects only. when `all`, return everything. By default returns everything. Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is changed, that should too. */ +export const getCollectionItems: API.OperationMethod< + GetCollectionItemsRequest, + GetCollectionItemsResponse, + GetCollectionItemsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionItemsRequest, + output: GetCollectionItemsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionRootError = MetabaseOpError; +/** GET /api/collection/root Return the 'Root' Collection object with standard details added */ +export const getCollectionRoot: API.OperationMethod< + GetCollectionRootRequest, + GetCollectionRootResponse, + GetCollectionRootError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionRootRequest, + output: GetCollectionRootResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionRootDashboardQuestionCandidatesError = MetabaseOpError; +/** GET /api/collection/root/dashboard-question-candidates Find cards in the root collection that can be moved into dashboards in the root collection. (Same as the above endpoint, but for the root collection) */ +export const getCollectionRootDashboardQuestionCandidates: API.OperationMethod< + GetCollectionRootDashboardQuestionCandidatesRequest, + GetCollectionRootDashboardQuestionCandidatesResponse, + GetCollectionRootDashboardQuestionCandidatesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionRootDashboardQuestionCandidatesRequest, + output: GetCollectionRootDashboardQuestionCandidatesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionRootItemsError = MetabaseOpError; +/** GET /api/collection/root/items Fetch objects that the current user should see at their root level. As mentioned elsewhere, the 'Root' Collection doesn't actually exist as a row in the application DB: it's simply a virtual Collection where things with no `collection_id` exist. It does, however, have its own set of Permissions. This endpoint will actually show objects with no `collection_id` for Users that have Root Collection permissions, but for people without Root Collection perms, we'll just show the objects that have an effective location of `/`. This endpoint is intended to power a 'Root Folder View' for the Current User, so regardless you'll see all the top-level objects you're allowed to access. By default, this will show the 'normal' Collections namespace; to view a different Collections namespace, such as `snippets`, you can pass the `?namespace=` parameter. By default, library collections are excluded from the results; to include them, pass `?include_library=true`. Note that this endpoint should return results in a similar shape to `/api/dashboard/:id/items`, so if this is changed, that should too. */ +export const getCollectionRootItems: API.OperationMethod< + GetCollectionRootItemsRequest, + GetCollectionRootItemsResponse, + GetCollectionRootItemsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionRootItemsRequest, + output: GetCollectionRootItemsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionTrashError = MetabaseOpError; +/** GET /api/collection/trash Fetch the trash collection, as in `/api/collection/:trash-id` */ +export const getCollectionTrash: API.OperationMethod< + GetCollectionTrashRequest, + GetCollectionTrashResponse, + GetCollectionTrashError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionTrashRequest, + output: GetCollectionTrashResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCollectionTreeError = MetabaseOpError; +/** GET /api/collection/tree Similar to `GET /`, but returns Collections in a tree structure, e.g. ``` [{:name "A" :below #{:card :dataset} :children [{:name "B"} {:name "C" :here #{:dataset :card} :below #{:dataset :card} :children [{:name "D" :here #{:dataset} :children [{:name "E"}]} {:name "F" :here #{:card} :children [{:name "G"}]}]}]} {:name "H"}] ``` The here and below keys indicate the types of items at this particular level of the tree (here) and in its subtree (below). TODO: for historical reasons this returns Saved Questions AS 'card' AND Models as 'dataset'; we should fix this at some point in the future. By default, looks at the `analytics` (if enabled) and regular (`nil`) namespaces. You can optionally pass a `namespace` argument, or one or many `namespaces`, to specify the particular collection namespaces you wish to look at. For example, `namespaces=analytics&namespaces=` would match the default behavior. When `shallow` is true, takes an optional `collection-id` and returns only the requested collection (or the root, if `collection-id` is `nil`). */ +export const getCollectionTree: API.OperationMethod< + GetCollectionTreeRequest, + GetCollectionTreeResponse, + GetCollectionTreeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCollectionTreeRequest, + output: GetCollectionTreeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCommentError = MetabaseOpError; +/** GET /api/comment Get comments for an entity */ +export const getComment: API.OperationMethod< + GetCommentRequest, + GetCommentResponse, + GetCommentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCommentRequest, + output: GetCommentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetCommentMentionsError = MetabaseOpError; +/** GET /api/comment/mentions Get a list of entities suitable for mentions. NOTE: only users for now. */ +export const getCommentMentions: API.OperationMethod< + GetCommentMentionsRequest, + GetCommentMentionsResponse, + GetCommentMentionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetCommentMentionsRequest, + output: GetCommentMentionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardError = MetabaseOpError; +/** GET /api/dashboard/public Fetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible *if* public sharing is enabled. */ +export const getDashboard: API.OperationMethod< + GetDashboardRequest, + GetDashboardResponse, + GetDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardRequest, + output: GetDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardByIdError = MetabaseOpError; +/** GET /api/dashboard/{id} Get Dashboard with ID. */ +export const getDashboardById: API.OperationMethod< + GetDashboardByIdRequest, + GetDashboardByIdResponse, + GetDashboardByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardByIdRequest, + output: GetDashboardByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardByUuidError = MetabaseOpError; +/** GET /api/public/dashboard/{uuid} Fetch a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled. */ +export const getDashboardByUuid: API.OperationMethod< + GetDashboardByUuidRequest, + GetDashboardByUuidResponse, + GetDashboardByUuidError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardByUuidRequest, + output: GetDashboardByUuidResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardDashcardCardError = MetabaseOpError; +/** GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id} Fetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled. */ +export const getDashboardDashcardCard: API.OperationMethod< + GetDashboardDashcardCardRequest, + GetDashboardDashcardCardResponse, + GetDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardDashcardCardRequest, + output: GetDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardDashcardExecuteError = MetabaseOpError; +/** GET /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/execute Fetches the values for filling in execution parameters. Pass PK parameters and values to select. */ +export const getDashboardDashcardExecute: API.OperationMethod< + GetDashboardDashcardExecuteRequest, + GetDashboardDashcardExecuteResponse, + GetDashboardDashcardExecuteError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardDashcardExecuteRequest, + output: GetDashboardDashcardExecuteResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardDashcardExecute2Error = MetabaseOpError; +/** GET /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/execute Fetches the values for filling in execution parameters. Pass PK parameters and values to select. */ +export const getDashboardDashcardExecute2: API.OperationMethod< + GetDashboardDashcardExecuteRequest2, + GetDashboardDashcardExecute2Response, + GetDashboardDashcardExecute2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardDashcardExecuteRequest2, + output: GetDashboardDashcardExecute2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardEmbeddableError = MetabaseOpError; +/** GET /api/dashboard/embeddable Fetch a list of Dashboards where `enable_embedding` is `true`. The dashboards can be embedded using the embedding endpoints and a signed JWT. */ +export const getDashboardEmbeddable: API.OperationMethod< + GetDashboardEmbeddableRequest, + GetDashboardEmbeddableResponse, + GetDashboardEmbeddableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardEmbeddableRequest, + output: GetDashboardEmbeddableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardItemsError = MetabaseOpError; +/** GET /api/dashboard/{id}/items Get Dashboard with ID. */ +export const getDashboardItems: API.OperationMethod< + GetDashboardItemsRequest, + GetDashboardItemsResponse, + GetDashboardItemsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardItemsRequest, + output: GetDashboardItemsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamRemappingError = MetabaseOpError; +/** GET /api/dashboard/{id}/params/{param-key}/remapping Fetch the remapped value for a given value of the parameter with ID `:param-key`. ;; fetch the remapped value for Dashboard 1 parameter 'abc' for value 100 GET /api/dashboard/1/params/abc/remapping?value=100 */ +export const getDashboardParamRemapping: API.OperationMethod< + GetDashboardParamRemappingRequest, + GetDashboardParamRemappingResponse, + GetDashboardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamRemappingRequest, + output: GetDashboardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamRemapping2Error = MetabaseOpError; +/** GET /api/public/dashboard/{uuid}/params/{param-key}/remapping Fetch the remapped value for the given `value` of parameter with ID `:param-key` of dashboard with UUID `uuid`. */ +export const getDashboardParamRemapping2: API.OperationMethod< + GetDashboardParamRemappingRequest2, + GetDashboardParamRemapping2Response, + GetDashboardParamRemapping2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamRemappingRequest2, + output: GetDashboardParamRemapping2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamSearchError = MetabaseOpError; +/** GET /api/dashboard/{id}/params/{param-key}/search/{query} Fetch possible values of the parameter whose ID is `:param-key` that contain `:query`. Optionally restrict these values by passing query parameters like `other-parameter=value` e.g. ;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set ;; to 100 GET /api/dashboard/1/params/abc/search/Cam?def=100 Currently limited to first 1000 results. */ +export const getDashboardParamSearch: API.OperationMethod< + GetDashboardParamSearchRequest, + GetDashboardParamSearchResponse, + GetDashboardParamSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamSearchRequest, + output: GetDashboardParamSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamSearchByQueryError = MetabaseOpError; +/** GET /api/public/dashboard/{uuid}/params/{param-key}/search/{query} Fetch filter values for dashboard parameter `param-key`, containing specified `query`. */ +export const getDashboardParamSearchByQuery: API.OperationMethod< + GetDashboardParamSearchByQueryRequest, + GetDashboardParamSearchByQueryResponse, + GetDashboardParamSearchByQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamSearchByQueryRequest, + output: GetDashboardParamSearchByQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamsValidFilterFieldsError = MetabaseOpError; +/** GET /api/dashboard/params/valid-filter-fields Utility endpoint for powering Dashboard UI. Given some set of `filtered` Field IDs (presumably Fields used in parameters) and a set of `filtering` Field IDs that will be used to restrict values of `filtered` Fields, for each `filtered` Field ID return the subset of `filtering` Field IDs that would actually be used in a chain filter query with these Fields. e.g. in a chain filter query like GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100 Assume `PARAM_1` maps to Field 1 and `PARAM_2` maps to Fields 2 and 3. The underlying MBQL query may or may not filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1 can be found. You can use this endpoint to determine which of those Fields is actually used: GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3 ;; -> {1 [2 3]} Results are returned as a map of `filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query */ +export const getDashboardParamsValidFilterFields: API.OperationMethod< + GetDashboardParamsValidFilterFieldsRequest, + GetDashboardParamsValidFilterFieldsResponse, + GetDashboardParamsValidFilterFieldsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamsValidFilterFieldsRequest, + output: GetDashboardParamsValidFilterFieldsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamValuesError = MetabaseOpError; +/** GET /api/dashboard/{id}/params/{param-key}/values Fetch possible values of the parameter whose ID is `:param-key`. If the values come directly from a query, optionally restrict these values by passing query parameters like `other-parameter=value` e.g. ;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100 GET /api/dashboard/1/params/abc/values?def=100 */ +export const getDashboardParamValues: API.OperationMethod< + GetDashboardParamValuesRequest, + GetDashboardParamValuesResponse, + GetDashboardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamValuesRequest, + output: GetDashboardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardParamValues2Error = MetabaseOpError; +/** GET /api/public/dashboard/{uuid}/params/{param-key}/values Fetch filter values for dashboard parameter `param-key`. */ +export const getDashboardParamValues2: API.OperationMethod< + GetDashboardParamValuesRequest2, + GetDashboardParamValues2Response, + GetDashboardParamValues2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardParamValuesRequest2, + output: GetDashboardParamValues2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardQueryMetadataError = MetabaseOpError; +/** GET /api/dashboard/{id}/query_metadata Get all of the required query metadata for the cards on dashboard. */ +export const getDashboardQueryMetadata: API.OperationMethod< + GetDashboardQueryMetadataRequest, + GetDashboardQueryMetadataResponse, + GetDashboardQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardQueryMetadataRequest, + output: GetDashboardQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDashboardRelatedError = MetabaseOpError; +/** GET /api/dashboard/{id}/related Return related entities. */ +export const getDashboardRelated: API.OperationMethod< + GetDashboardRelatedRequest, + GetDashboardRelatedResponse, + GetDashboardRelatedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDashboardRelatedRequest, + output: GetDashboardRelatedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseError = MetabaseOpError; +/** GET /api/database Fetch all `Databases`. * `include=tables` means we should hydrate the Tables belonging to each DB. Default: `false`. * `include=schemas` hydrates a `:schemas` list on each DB (only schemas with visible tables the current user can read), matching the per-DB `/api/database/:id/schemas` response. Lets clients avoid N round-trips when populating a database/schema picker. * `saved` means we should include the saved questions virtual database. Default: `false`. * `include_editable_data_model` will only include DBs for which the current user has data model editing permissions. (If `include=tables`, this also applies to the list of tables in each DB). Should only be used if Enterprise Edition code is available the advanced-permissions feature is enabled. * `exclude_uneditable_details` will only include DBs for which the current user can edit the DB details. Has no effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled. * `include_only_uploadable` will only include DBs into which Metabase can insert new data. * `can-query` will only include DBs for which the current user has query permissions. Default: `false`. * `can-write-metadata` will only include DBs for which the current user has data model editing permissions for at least one table in the database. Default: `false`. Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the database details. */ +export const getDatabase: API.OperationMethod< + GetDatabaseRequest, + GetDatabaseResponse, + GetDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseRequest, + output: GetDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseAutocompleteSuggestionsError = MetabaseOpError; +/** GET /api/database/{id}/autocomplete_suggestions Return a list of autocomplete suggestions for a given `prefix`, or `substring`. Should only specify one, but `substring` will have priority if both are present. This is intended for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching `Tables` and `Fields` in this `Database`. Tables are returned in the format `[table_name "Table"]`; When Fields have a semantic_type, they are returned in the format `[field_name "table_name base_type semantic_type"]` When Fields lack a semantic_type, they are returned in the format `[field_name "table_name base_type"]` */ +export const getDatabaseAutocompleteSuggestions: API.OperationMethod< + GetDatabaseAutocompleteSuggestionsRequest, + GetDatabaseAutocompleteSuggestionsResponse, + GetDatabaseAutocompleteSuggestionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseAutocompleteSuggestionsRequest, + output: GetDatabaseAutocompleteSuggestionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseByIdError = MetabaseOpError; +/** GET /api/database/{id} Get a single Database with `id`. Optionally pass `?include=tables` or `?include=tables.fields` to include the Tables belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the DB (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details). Passing include_editable_data_model will only return tables for which the current user has data model editing permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present. In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID and tables, with no additional metadata. Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for `:model/Database` in [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for `:model/Database` in [[metabase.warehouses.models.database]] to exclude the `details` field, if the requesting user lacks permission to change the database details. */ +export const getDatabaseById: API.OperationMethod< + GetDatabaseByIdRequest, + GetDatabaseByIdResponse, + GetDatabaseByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseByIdRequest, + output: GetDatabaseByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseCardAutocompleteSuggestionsError = MetabaseOpError; +/** GET /api/database/{id}/card_autocomplete_suggestions Return a list of `Card` autocomplete suggestions for a given `query` in a given `Database`. This is intended for use with the ACE Editor when the User is typing in a template tag for a `Card`, e.g. {{#...}}. */ +export const getDatabaseCardAutocompleteSuggestions: API.OperationMethod< + GetDatabaseCardAutocompleteSuggestionsRequest, + GetDatabaseCardAutocompleteSuggestionsResponse, + GetDatabaseCardAutocompleteSuggestionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseCardAutocompleteSuggestionsRequest, + output: GetDatabaseCardAutocompleteSuggestionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseDatasetError = MetabaseOpError; +/** GET /api/database/{virtual-db}/datasets/{schema} Returns a list of Tables for the datasets virtual database. */ +export const getDatabaseDataset: API.OperationMethod< + GetDatabaseDatasetRequest, + GetDatabaseDatasetResponse, + GetDatabaseDatasetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseDatasetRequest, + output: GetDatabaseDatasetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseDatasetsError = MetabaseOpError; +/** GET /api/database/{virtual-db}/datasets Returns a list of all the datasets found for the saved questions virtual database. */ +export const getDatabaseDatasets: API.OperationMethod< + GetDatabaseDatasetsRequest, + GetDatabaseDatasetsResponse, + GetDatabaseDatasetsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseDatasetsRequest, + output: GetDatabaseDatasetsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseFieldsError = MetabaseOpError; +/** GET /api/database/{id}/fields Get a list of all `Fields` in `Database`. */ +export const getDatabaseFields: API.OperationMethod< + GetDatabaseFieldsRequest, + GetDatabaseFieldsResponse, + GetDatabaseFieldsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseFieldsRequest, + output: GetDatabaseFieldsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseHealthcheckError = MetabaseOpError; +/** GET /api/database/{id}/healthcheck Reports whether the database can currently connect */ +export const getDatabaseHealthcheck: API.OperationMethod< + GetDatabaseHealthcheckRequest, + GetDatabaseHealthcheckResponse, + GetDatabaseHealthcheckError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseHealthcheckRequest, + output: GetDatabaseHealthcheckResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseIdfieldsError = MetabaseOpError; +/** GET /api/database/{id}/idfields Get a list of all primary key `Fields` for `Database`. */ +export const getDatabaseIdfields: API.OperationMethod< + GetDatabaseIdfieldsRequest, + GetDatabaseIdfieldsResponse, + GetDatabaseIdfieldsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseIdfieldsRequest, + output: GetDatabaseIdfieldsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseMetadataError = MetabaseOpError; +/** GET /api/database/{id}/metadata Get metadata about a `Database`, including all of its `Tables` and `Fields`. Returns DB, fields, and field values. By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them. Passing include_editable_data_model will only return tables for which the current user has data model editing permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present. In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID and tables, with no additional metadata. */ +export const getDatabaseMetadata: API.OperationMethod< + GetDatabaseMetadataRequest, + GetDatabaseMetadataResponse, + GetDatabaseMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseMetadataRequest, + output: GetDatabaseMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseMetadata2Error = MetabaseOpError; +/** GET /api/database/{virtual-db}/metadata Endpoint that provides metadata for the Saved Questions 'virtual' database. Used for fooling the frontend and allowing it to treat the Saved Questions virtual DB just like any other database. */ +export const getDatabaseMetadata2: API.OperationMethod< + GetDatabaseMetadataRequest2, + GetDatabaseMetadata2Response, + GetDatabaseMetadata2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseMetadataRequest2, + output: GetDatabaseMetadata2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSchemaError = MetabaseOpError; +/** GET /api/database/{id}/schema Return a list of Tables for a Database whose schema is the `schema` query parameter, or `nil` or an empty string when no `schema` is given. Unlike the `/:id/schema/:schema` route, the query parameter supports schema names containing slashes, which are rejected at the HTTP layer when percent-encoded in the URL path (#77353). Optional filters: - `can-query=true` - filter to only tables the user can query - `can-write-metadata=true` - filter to only tables the user can edit metadata for */ +export const getDatabaseSchema: API.OperationMethod< + GetDatabaseSchemaRequest, + GetDatabaseSchemaResponse, + GetDatabaseSchemaError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSchemaRequest, + output: GetDatabaseSchemaResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSchemaBySchemaError = MetabaseOpError; +/** GET /api/database/{id}/schema/{schema} Returns a list of Tables for the given Database `id` and `schema`. Schema names containing slashes, backslashes, or percent signs are rejected at the HTTP layer when percent-encoded in the URL path; pass those as the `schema` query parameter of `GET /:id/schema/` instead (#77353). Optional filters: - `can-query=true` - filter to only tables the user can query - `can-write-metadata=true` - filter to only tables the user can edit metadata for */ +export const getDatabaseSchemaBySchema: API.OperationMethod< + GetDatabaseSchemaBySchemaRequest, + GetDatabaseSchemaBySchemaResponse, + GetDatabaseSchemaBySchemaError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSchemaBySchemaRequest, + output: GetDatabaseSchemaBySchemaResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSchemaBySchema2Error = MetabaseOpError; +/** GET /api/database/{virtual-db}/schema/{schema} Returns a list of Tables for the saved questions virtual database. */ +export const getDatabaseSchemaBySchema2: API.OperationMethod< + GetDatabaseSchemaBySchemaRequest2, + GetDatabaseSchemaBySchema2Response, + GetDatabaseSchemaBySchema2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSchemaBySchemaRequest2, + output: GetDatabaseSchemaBySchema2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSchemasError = MetabaseOpError; +/** GET /api/database/{id}/schemas Returns a list of all the schemas with tables found for the database `id`. Excludes schemas with no tables. Optional filters: - `can-query=true` - filter to only schemas containing tables the user can query - `can-write-metadata=true` - filter to only schemas containing tables the user can edit metadata for */ +export const getDatabaseSchemas: API.OperationMethod< + GetDatabaseSchemasRequest, + GetDatabaseSchemasResponse, + GetDatabaseSchemasError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSchemasRequest, + output: GetDatabaseSchemasResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSchemas2Error = MetabaseOpError; +/** GET /api/database/{virtual-db}/schemas Returns a list of all the schemas found for the saved questions virtual database. */ +export const getDatabaseSchemas2: API.OperationMethod< + GetDatabaseSchemasRequest2, + GetDatabaseSchemas2Response, + GetDatabaseSchemas2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSchemasRequest2, + output: GetDatabaseSchemas2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSettingsAvailableError = MetabaseOpError; +/** GET /api/database/{id}/settings-available Get all database-local settings and their availability for the given database. */ +export const getDatabaseSettingsAvailable: API.OperationMethod< + GetDatabaseSettingsAvailableRequest, + GetDatabaseSettingsAvailableResponse, + GetDatabaseSettingsAvailableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSettingsAvailableRequest, + output: GetDatabaseSettingsAvailableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseSyncableSchemasError = MetabaseOpError; +/** GET /api/database/{id}/syncable_schemas Returns a list of all syncable schemas found for the database `id`. */ +export const getDatabaseSyncableSchemas: API.OperationMethod< + GetDatabaseSyncableSchemasRequest, + GetDatabaseSyncableSchemasResponse, + GetDatabaseSyncableSchemasError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseSyncableSchemasRequest, + output: GetDatabaseSyncableSchemasResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDatabaseUsageInfoError = MetabaseOpError; +/** GET /api/database/{id}/usage_info Get usage info for a database. Returns a map with keys are models and values are the number of entities that use this database. */ +export const getDatabaseUsageInfo: API.OperationMethod< + GetDatabaseUsageInfoRequest, + GetDatabaseUsageInfoResponse, + GetDatabaseUsageInfoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDatabaseUsageInfoRequest, + output: GetDatabaseUsageInfoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentError = MetabaseOpError; +/** GET /api/document Gets existing `Documents`. */ +export const getDocument: API.OperationMethod< + GetDocumentRequest, + GetDocumentResponse, + GetDocumentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentRequest, + output: GetDocumentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDocument2Error = MetabaseOpError; +/** GET /api/document/public List all Documents that have public links. Returns a sequence of Documents that have been publicly shared. Each Document includes its `:id`, `:name`, and `:public_uuid`. Documents are only actually accessible via the public endpoint if public sharing is currently enabled. Archived Documents are excluded from the results. This endpoint is used to populate the public links listing in the Admin settings UI. Requires superuser permissions. Public sharing must be enabled via the `enable-public-sharing` setting. */ +export const getDocument2: API.OperationMethod< + GetDocument2Request, + GetDocument2Response, + GetDocument2Error, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocument2Request, + output: GetDocument2Response, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentByDocumentIdError = MetabaseOpError; +/** GET /api/document/{document-id} Returns an existing Document by ID. */ +export const getDocumentByDocumentId: API.OperationMethod< + GetDocumentByDocumentIdRequest, + GetDocumentByDocumentIdResponse, + GetDocumentByDocumentIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentByDocumentIdRequest, + output: GetDocumentByDocumentIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentByUuidError = MetabaseOpError; +/** GET /api/public/document/{uuid} Fetch a publicly-accessible Document. Does not require auth credentials. Public sharing must be enabled. Returns a Document with sensitive fields removed (excludes collection_id, permissions, creator details, etc.). Includes all embedded Cards with their metadata hydrated so the frontend doesn't need to make separate requests for each card — just like public Dashboards do. */ +export const getDocumentByUuid: API.OperationMethod< + GetDocumentByUuidRequest, + GetDocumentByUuidResponse, + GetDocumentByUuidError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentByUuidRequest, + output: GetDocumentByUuidResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetDocumentCardError = MetabaseOpError; +/** GET /api/public/document/{uuid}/card/{card-id} Run a query for a Card that's embedded in a public Document. Doesn't require auth credentials. Public sharing must be enabled. */ +export const getDocumentCard: API.OperationMethod< + GetDocumentCardRequest, + GetDocumentCardResponse, + GetDocumentCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetDocumentCardRequest, + output: GetDocumentCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAdvancedPermissionsApplicationGraphError = MetabaseOpError; +/** GET /api/ee/advanced-permissions/application/graph Fetch a graph of Application Permissions. */ +export const getEeAdvancedPermissionsApplicationGraph: API.OperationMethod< + GetEeAdvancedPermissionsApplicationGraphRequest, + GetEeAdvancedPermissionsApplicationGraphResponse, + GetEeAdvancedPermissionsApplicationGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAdvancedPermissionsApplicationGraphRequest, + output: GetEeAdvancedPermissionsApplicationGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAdvancedPermissionsImpersonationError = MetabaseOpError; +/** GET /api/ee/advanced-permissions/impersonation Fetch a list of all Impersonation policies currently in effect, or a single policy if both `group_id` and `db_id` are provided. */ +export const getEeAdvancedPermissionsImpersonation: API.OperationMethod< + GetEeAdvancedPermissionsImpersonationRequest, + GetEeAdvancedPermissionsImpersonationResponse, + GetEeAdvancedPermissionsImpersonationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAdvancedPermissionsImpersonationRequest, + output: GetEeAdvancedPermissionsImpersonationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsPermissionsError = MetabaseOpError; +/** GET /api/ee/ai-controls/permissions List all metabot permissions for all groups, filling in defaults for missing entries. */ +export const getEeAiControlsPermissions: API.OperationMethod< + GetEeAiControlsPermissionsRequest, + GetEeAiControlsPermissionsResponse, + GetEeAiControlsPermissionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsPermissionsRequest, + output: GetEeAiControlsPermissionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsUsageGroupError = MetabaseOpError; +/** GET /api/ee/ai-controls/usage/group Get all group-level metabot usage limits. */ +export const getEeAiControlsUsageGroup: API.OperationMethod< + GetEeAiControlsUsageGroupRequest, + GetEeAiControlsUsageGroupResponse, + GetEeAiControlsUsageGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsUsageGroupRequest, + output: GetEeAiControlsUsageGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsUsageGroupByGroupIdError = MetabaseOpError; +/** GET /api/ee/ai-controls/usage/group/{group-id} Get the metabot usage limit for a specific group. Returns `max_usage: null` if no limit is set. */ +export const getEeAiControlsUsageGroupByGroupId: API.OperationMethod< + GetEeAiControlsUsageGroupByGroupIdRequest, + GetEeAiControlsUsageGroupByGroupIdResponse, + GetEeAiControlsUsageGroupByGroupIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsUsageGroupByGroupIdRequest, + output: GetEeAiControlsUsageGroupByGroupIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsUsageInstanceError = MetabaseOpError; +/** GET /api/ee/ai-controls/usage/instance Get the instance-wide metabot usage limit. Returns `max_usage: null` if no limit is set (unlimited). */ +export const getEeAiControlsUsageInstance: API.OperationMethod< + GetEeAiControlsUsageInstanceRequest, + GetEeAiControlsUsageInstanceResponse, + GetEeAiControlsUsageInstanceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsUsageInstanceRequest, + output: GetEeAiControlsUsageInstanceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsUsageTenantError = MetabaseOpError; +/** GET /api/ee/ai-controls/usage/tenant Get all tenant-level metabot usage limits. */ +export const getEeAiControlsUsageTenant: API.OperationMethod< + GetEeAiControlsUsageTenantRequest, + GetEeAiControlsUsageTenantResponse, + GetEeAiControlsUsageTenantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsUsageTenantRequest, + output: GetEeAiControlsUsageTenantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAiControlsUsageTenantByTenantIdError = MetabaseOpError; +/** GET /api/ee/ai-controls/usage/tenant/{tenant-id} Get the metabot usage limit for a specific tenant. Returns `max_usage: null` if no limit is set. */ +export const getEeAiControlsUsageTenantByTenantId: API.OperationMethod< + GetEeAiControlsUsageTenantByTenantIdRequest, + GetEeAiControlsUsageTenantByTenantIdResponse, + GetEeAiControlsUsageTenantByTenantIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAiControlsUsageTenantByTenantIdRequest, + output: GetEeAiControlsUsageTenantByTenantIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeAuditAppUserAuditInfoError = MetabaseOpError; +/** GET /api/ee/audit-app/user/audit-info Gets audit info for the current user if he has permissions to access the audit collection. Otherwise return an empty map. */ +export const getEeAuditAppUserAuditInfo: API.OperationMethod< + GetEeAuditAppUserAuditInfoRequest, + GetEeAuditAppUserAuditInfoResponse, + GetEeAuditAppUserAuditInfoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeAuditAppUserAuditInfoRequest, + output: GetEeAuditAppUserAuditInfoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeBillingError = MetabaseOpError; +/** GET /api/ee/billing Get billing information. This acts as a proxy between `metabase-billing-info-url` and the client, using the embedding token and signed in user's email to fetch the billing information. */ +export const getEeBilling: API.OperationMethod< + GetEeBillingRequest, + GetEeBillingResponse, + GetEeBillingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeBillingRequest, + output: GetEeBillingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCloudAddOnsAddonsError = MetabaseOpError; +/** GET /api/ee/cloud-add-ons/addons Get addons information from the Metabase Store API. */ +export const getEeCloudAddOnsAddons: API.OperationMethod< + GetEeCloudAddOnsAddonsRequest, + GetEeCloudAddOnsAddonsResponse, + GetEeCloudAddOnsAddonsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCloudAddOnsAddonsRequest, + output: GetEeCloudAddOnsAddonsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCloudAddOnsPlansError = MetabaseOpError; +/** GET /api/ee/cloud-add-ons/plans Get plans information from the Metabase Store API. */ +export const getEeCloudAddOnsPlans: API.OperationMethod< + GetEeCloudAddOnsPlansRequest, + GetEeCloudAddOnsPlansResponse, + GetEeCloudAddOnsPlansError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCloudAddOnsPlansRequest, + output: GetEeCloudAddOnsPlansResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeContentTranslationCsvError = MetabaseOpError; +/** GET /api/ee/content-translation/csv Provides content translation dictionary in CSV */ +export const getEeContentTranslationCsv: API.OperationMethod< + GetEeContentTranslationCsvRequest, + GetEeContentTranslationCsvResponse, + GetEeContentTranslationCsvError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeContentTranslationCsvRequest, + output: GetEeContentTranslationCsvResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeContentTranslationDictionaryError = MetabaseOpError; +/** GET /api/ee/content-translation/dictionary Fetch the content translation dictionary for authenticated users (auth-based embedding flows). */ +export const getEeContentTranslationDictionary: API.OperationMethod< + GetEeContentTranslationDictionaryRequest, + GetEeContentTranslationDictionaryResponse, + GetEeContentTranslationDictionaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeContentTranslationDictionaryRequest, + output: GetEeContentTranslationDictionaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeContentTranslationDictionaryByTokenError = MetabaseOpError; +/** GET /api/ee/content-translation/dictionary/{token} Fetch the content translation dictionary via a JSON Web Token signed with the `embedding-secret-key`. */ +export const getEeContentTranslationDictionaryByToken: API.OperationMethod< + GetEeContentTranslationDictionaryByTokenRequest, + GetEeContentTranslationDictionaryByTokenResponse, + GetEeContentTranslationDictionaryByTokenError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeContentTranslationDictionaryByTokenRequest, + output: GetEeContentTranslationDictionaryByTokenResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin List all registered custom visualization plugins. */ +export const getEeCustomVizPlugin: API.OperationMethod< + GetEeCustomVizPluginRequest, + GetEeCustomVizPluginResponse, + GetEeCustomVizPluginError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginRequest, + output: GetEeCustomVizPluginResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginAssetError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin/{id}/asset Serve the plugin's icon image from its bundle. The asset path is passed as a `path` query parameter (e.g. `?path=icon.svg`) and must match the manifest `icon`. Only the icon is served — plugins do not ship arbitrary assets. In dev mode, proxies from the dev base URL if set. */ +export const getEeCustomVizPluginAsset: API.OperationMethod< + GetEeCustomVizPluginAssetRequest, + GetEeCustomVizPluginAssetResponse, + GetEeCustomVizPluginAssetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginAssetRequest, + output: GetEeCustomVizPluginAssetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginBundleError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin/{id}/bundle Serve the JS bundle for a plugin from the on-disk cache. Returns application/javascript with ETag and Cache-Control headers. In dev mode, proxies from `dev_bundle_url` if set. */ +export const getEeCustomVizPluginBundle: API.OperationMethod< + GetEeCustomVizPluginBundleRequest, + GetEeCustomVizPluginBundleResponse, + GetEeCustomVizPluginBundleError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginBundleRequest, + output: GetEeCustomVizPluginBundleResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginDevSseError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin/{id}/dev-sse Proxy Server-Sent Events from the plugin's dev server. Connects to `{dev_bundle_url}/__sse` and forwards events to the browser. This avoids the need for a CSP exception for the dev server origin. Requires custom viz plugin dev mode to be enabled. */ +export const getEeCustomVizPluginDevSse: API.OperationMethod< + GetEeCustomVizPluginDevSseRequest, + GetEeCustomVizPluginDevSseResponse, + GetEeCustomVizPluginDevSseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginDevSseRequest, + output: GetEeCustomVizPluginDevSseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginListError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin/list List active and enabled custom visualization plugins. Available to any authenticated user. Plugins with incompatible Metabase version requirements are excluded. Dev-only plugins are excluded when dev mode is disabled. */ +export const getEeCustomVizPluginList: API.OperationMethod< + GetEeCustomVizPluginListRequest, + GetEeCustomVizPluginListResponse, + GetEeCustomVizPluginListError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginListRequest, + output: GetEeCustomVizPluginListResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeCustomVizPluginSandboxHostError = MetabaseOpError; +/** GET /api/ee/custom-viz-plugin/sandbox-host Serve a minimal HTML document used as the iframe `src` for the near-membrane custom-viz sandbox. The response carries a per-document `Content-Security-Policy` that permits `'unsafe-eval'` only inside this iframe, so the main Metabase document keeps its strict nonce-based CSP. */ +export const getEeCustomVizPluginSandboxHost: API.OperationMethod< + GetEeCustomVizPluginSandboxHostRequest, + GetEeCustomVizPluginSandboxHostResponse, + GetEeCustomVizPluginSandboxHostError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeCustomVizPluginSandboxHostRequest, + output: GetEeCustomVizPluginSandboxHostResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDataComplexityScoreComplexityError = MetabaseOpError; +/** GET /api/ee/data-complexity-score/complexity Return the most recently stored Data Complexity Score for this instance. Pass `force-recalculation=true` to recompute, persist, and return a fresh score. Superuser-only. */ +export const getEeDataComplexityScoreComplexity: API.OperationMethod< + GetEeDataComplexityScoreComplexityRequest, + GetEeDataComplexityScoreComplexityResponse, + GetEeDataComplexityScoreComplexityError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDataComplexityScoreComplexityRequest, + output: GetEeDataComplexityScoreComplexityResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesBackfillStatusError = MetabaseOpError; +/** GET /api/ee/dependencies/backfill-status Returns whether the dependency backfill has pending work. `complete` is true when there are no stale or outdated entities awaiting processing. */ +export const getEeDependenciesBackfillStatus: API.OperationMethod< + GetEeDependenciesBackfillStatusRequest, + GetEeDependenciesBackfillStatusResponse, + GetEeDependenciesBackfillStatusError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesBackfillStatusRequest, + output: GetEeDependenciesBackfillStatusResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesGraphError = MetabaseOpError; +/** GET /api/ee/dependencies/graph This endpoint takes an :id and a supported entity :type, and returns a graph of all its upstream dependencies. The graph is represented by a list of :nodes and a list of :edges. Each node has an :id, :type, :data (which depends on the node type), and a map of :dependent_counts per entity type. Each edge is a :model/Dependency. */ +export const getEeDependenciesGraph: API.OperationMethod< + GetEeDependenciesGraphRequest, + GetEeDependenciesGraphResponse, + GetEeDependenciesGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesGraphRequest, + output: GetEeDependenciesGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesGraphBreakingError = MetabaseOpError; +/** GET /api/ee/dependencies/graph/breaking Returns a list of entities that are breaking other entities (sources of errors). These are tables or cards that other entities depend on, where those dependents have validation errors traced back to this source entity. Accepts optional parameters for filtering: - `types`: List of source entity types - only `:card` or `:table` (default: both) - `card-types`: List of card types to include when filtering cards (e.g., `[:question :model :metric]`) - `query`: Search string to filter by name or location - `include-personal-collections`: Controls whether items in personal collections are included (default: false) - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`) - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`) - `offset`: Default 0 - `limit`: Default 50 Returns a map with: - `data`: List of breaking source entities - `total`: Total count of matched items - `offset`: Applied offset - `limit`: Applied limit */ +export const getEeDependenciesGraphBreaking: API.OperationMethod< + GetEeDependenciesGraphBreakingRequest, + GetEeDependenciesGraphBreakingResponse, + GetEeDependenciesGraphBreakingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesGraphBreakingRequest, + output: GetEeDependenciesGraphBreakingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesGraphBrokenError = MetabaseOpError; +/** GET /api/ee/dependencies/graph/broken Returns the broken dependents for a specific source entity. These are entities that have validation errors traced back to the specified source. Required parameters: - `id`: The ID of the source entity - `type`: The type of the source entity (card, table) Optional parameters: - `dependent-types`: Dependency types to filter by. Can be single value or array. - `dependent-card-types`: Card types to filter by when dependent-types includes :card. - `include-personal-collections`: Include items in personal collections (default: false) - `sort-column`: Column to sort by - name, location, or view-count (default: name) - `sort-direction`: Sort direction - asc or desc (default: asc) */ +export const getEeDependenciesGraphBroken: API.OperationMethod< + GetEeDependenciesGraphBrokenRequest, + GetEeDependenciesGraphBrokenResponse, + GetEeDependenciesGraphBrokenError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesGraphBrokenRequest, + output: GetEeDependenciesGraphBrokenResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesGraphDependentsError = MetabaseOpError; +/** GET /api/ee/dependencies/graph/dependents Returns a list of dependents for the specified entity. Required parameters: - `id`: The ID of the entity - `type`: The type of the entity (card, table, dashboard, etc.) Optional parameters: - `dependent-types`: Dependency types to filter by. Can be single value or array. If not provided, returns all types. Example: ?dependent-types=card&dependent-types=dashboard - `dependent-card-types`: Card types to filter by when dependent-types includes :card. Ignored if dependent-types doesn't include :card. Example: ?dependent-card-types=question&dependent-card-types=model - `broken`: Return only broken entities (default: false) - `query`: Search string to filter results by name or location (case-insensitive) - `include-personal-collections`: Include items in personal collections (default: false) - `sort-column`: Column to sort by - name, location, or view-count (default: name) - `sort-direction`: Sort direction - asc or desc (default: asc) */ +export const getEeDependenciesGraphDependents: API.OperationMethod< + GetEeDependenciesGraphDependentsRequest, + GetEeDependenciesGraphDependentsResponse, + GetEeDependenciesGraphDependentsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesGraphDependentsRequest, + output: GetEeDependenciesGraphDependentsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeDependenciesGraphUnreferencedError = MetabaseOpError; +/** GET /api/ee/dependencies/graph/unreferenced Returns a list of all unreferenced items in the instance. An unreferenced item is one that is not a dependency of any other item. Accepts optional parameters for filtering: - `types`: List of entity types to include (e.g., [:card :transform :snippet :dashboard]) - `card-types`: List of card types to include when filtering cards (e.g., [:question :model :metric]) - `query`: Search string to filter by name or location - `include-personal-collections`: Controls whether items in personal collections are included (default: false) - `sort-column`: Sort column - `:name`, `:location`, `:dependents-errors`, or `:dependents-with-errors` (default: `:name`) - `sort-direction`: Sort direction - `:asc` or `:desc` (default: `:asc`) - `offset`: Default 0 - `limit`: Default 50 Returns a map with: - `data`: List of unreferenced items, each with `:id`, `:type`, and `:data` fields - `total`: Total count of matched items - `offset`: Applied offset - `limit`: Applied limit */ +export const getEeDependenciesGraphUnreferenced: API.OperationMethod< + GetEeDependenciesGraphUnreferencedRequest, + GetEeDependenciesGraphUnreferencedResponse, + GetEeDependenciesGraphUnreferencedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeDependenciesGraphUnreferencedRequest, + output: GetEeDependenciesGraphUnreferencedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeEmbeddingHubChecklistError = MetabaseOpError; +/** GET /api/ee/embedding-hub/checklist Get the embedding hub checklist status, indicating which setup steps have been completed. */ +export const getEeEmbeddingHubChecklist: API.OperationMethod< + GetEeEmbeddingHubChecklistRequest, + GetEeEmbeddingHubChecklistResponse, + GetEeEmbeddingHubChecklistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeEmbeddingHubChecklistRequest, + output: GetEeEmbeddingHubChecklistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeErdError = MetabaseOpError; +/** GET /api/ee/erd Return an Entity Relationship Diagram (ERD) for tables and their FK relationships. When `table-ids` is provided, those tables are the focal points (and must belong to `database-id`). */ +export const getEeErd: API.OperationMethod< + GetEeErdRequest, + GetEeErdResponse, + GetEeErdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeErdRequest, + output: GetEeErdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeGsheetsConnectionError = MetabaseOpError; +/** GET /api/ee/gsheets/connection Check the status of a connection. This endpoint gets polled by FE to determine when to stop showing the setup widget. Returns the gsheets shape, with the attached datawarehouse db id at `:db_id`. */ +export const getEeGsheetsConnection: API.OperationMethod< + GetEeGsheetsConnectionRequest, + GetEeGsheetsConnectionResponse, + GetEeGsheetsConnectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeGsheetsConnectionRequest, + output: GetEeGsheetsConnectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeGsheetsServiceAccountError = MetabaseOpError; +/** GET /api/ee/gsheets/service-account Checks to see if service-account is setup or not, delegates to HM only if we haven't set it from a metabase cluster before. */ +export const getEeGsheetsServiceAccount: API.OperationMethod< + GetEeGsheetsServiceAccountRequest, + GetEeGsheetsServiceAccountResponse, + GetEeGsheetsServiceAccountError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeGsheetsServiceAccountRequest, + output: GetEeGsheetsServiceAccountResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeLibraryError = MetabaseOpError; +/** GET /api/ee/library Get the Library. If no library exists, it doesn't fail but returns an empty response */ +export const getEeLibrary: API.OperationMethod< + GetEeLibraryRequest, + GetEeLibraryResponse, + GetEeLibraryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeLibraryRequest, + output: GetEeLibraryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeLibraryTreeError = MetabaseOpError; +/** GET /api/ee/library/tree This matches /api/collection/tree but only returns the library collection. */ +export const getEeLibraryTree: API.OperationMethod< + GetEeLibraryTreeRequest, + GetEeLibraryTreeResponse, + GetEeLibraryTreeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeLibraryTreeRequest, + output: GetEeLibraryTreeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeLogsQueryExecutionError = MetabaseOpError; +/** GET /api/ee/logs/query_execution/{yyyy-mm} Fetch rows for the month specified by `:yyyy-mm` from the query_execution logs table. Must be a superuser. */ +export const getEeLogsQueryExecution: API.OperationMethod< + GetEeLogsQueryExecutionRequest, + GetEeLogsQueryExecutionResponse, + GetEeLogsQueryExecutionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeLogsQueryExecutionRequest, + output: GetEeLogsQueryExecutionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeMetabotAnalyticsConversationError = MetabaseOpError; +/** GET /api/ee/metabot-analytics/conversations/{id} Return full details for a specific conversation including all messages. */ +export const getEeMetabotAnalyticsConversation: API.OperationMethod< + GetEeMetabotAnalyticsConversationRequest, + GetEeMetabotAnalyticsConversationResponse, + GetEeMetabotAnalyticsConversationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeMetabotAnalyticsConversationRequest, + output: GetEeMetabotAnalyticsConversationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeMetabotAnalyticsConversationsError = MetabaseOpError; +/** GET /api/ee/metabot-analytics/conversations Return paginated list of AI conversations with summary statistics. */ +export const getEeMetabotAnalyticsConversations: API.OperationMethod< + GetEeMetabotAnalyticsConversationsRequest, + GetEeMetabotAnalyticsConversationsResponse, + GetEeMetabotAnalyticsConversationsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeMetabotAnalyticsConversationsRequest, + output: GetEeMetabotAnalyticsConversationsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeMetabotUsageError = MetabaseOpError; +/** GET /api/ee/metabot/usage Fetch current Metabot token usage for the current billing period. */ +export const getEeMetabotUsage: API.OperationMethod< + GetEeMetabotUsageRequest, + GetEeMetabotUsageResponse, + GetEeMetabotUsageError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeMetabotUsageRequest, + output: GetEeMetabotUsageResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeMfaAdminOverviewError = MetabaseOpError; +/** GET /api/ee/mfa/admin/overview Admin: enrollment overview — how many users have (and haven't) set up a second factor, and whether the instance encrypts secrets at rest. */ +export const getEeMfaAdminOverview: API.OperationMethod< + GetEeMfaAdminOverviewRequest, + GetEeMfaAdminOverviewResponse, + GetEeMfaAdminOverviewError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeMfaAdminOverviewRequest, + output: GetEeMfaAdminOverviewResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeMfaStatusError = MetabaseOpError; +/** GET /api/ee/mfa/status The current user's MFA status, for the account-settings UI. */ +export const getEeMfaStatus: API.OperationMethod< + GetEeMfaStatusRequest, + GetEeMfaStatusResponse, + GetEeMfaStatusError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeMfaStatusRequest, + output: GetEeMfaStatusResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEePermissionDebugError = MetabaseOpError; +/** GET /api/ee/permission_debug This endpoint expects a `user_id`, a `model_id` to debug permissions against, and `action_type`. The type of model we are debugging against is inferred by the `action_type`. It will return: - `decision`: The overall permission decision ("allow", "denied", or "limited") - `model-type`: The type of model being checked (e.g., "question") - `model-id`: The ID of the model being checked - `segment`: A set of segmentation types applied (e.g., "sandboxed", "impersonated", "routed") - `message`: A sequence of strings explaining the decision - `data`: A map containing details about permissions (table or collection names to group names) - `suggestions`: A map of group IDs to group names that could provide access Example requests: - Check if user can read a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/read` - Check if user can query a card: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/query` - Check if user can download data: `GET /api/ee/permission_debug?user_id=123&model_id=456&action_type=card/download-data` Example responses: - Allowed access: ```json { "decision": "allow", "model-type": "question", "model-id": "456", "segment": [], "message": ["User has permission to read this card"], "data": {}, "suggestions": {} } ``` - Denied access with blocked table: ```json { "decision": "denied", "model-type": "question", "model-id": "456", "segment": [], "message": ["User does not have permission to query this card"], "data": {"sample-db.PUBLIC.ORDERS": ["All Users"]}, "suggestions": {} } ``` - Limited access: ```json { "decision": "limited", "model-type": "question", "model-id": "456", "segment": [], "message": ["User has permission to download some data from this card"], "data": {}, "suggestions": {} } ``` */ +export const getEePermissionDebug: API.OperationMethod< + GetEePermissionDebugRequest, + GetEePermissionDebugResponse, + GetEePermissionDebugError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEePermissionDebugRequest, + output: GetEePermissionDebugResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncBranchesError = MetabaseOpError; +/** GET /api/ee/remote-sync/branches Get list of branches from the configured source. Returns a JSON object with branch names under the :items key. Requires superuser permissions. */ +export const getEeRemoteSyncBranches: API.OperationMethod< + GetEeRemoteSyncBranchesRequest, + GetEeRemoteSyncBranchesResponse, + GetEeRemoteSyncBranchesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncBranchesRequest, + output: GetEeRemoteSyncBranchesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncCurrentTaskError = MetabaseOpError; +/** GET /api/ee/remote-sync/current-task Get the current sync task */ +export const getEeRemoteSyncCurrentTask: API.OperationMethod< + GetEeRemoteSyncCurrentTaskRequest, + GetEeRemoteSyncCurrentTaskResponse, + GetEeRemoteSyncCurrentTaskError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncCurrentTaskRequest, + output: GetEeRemoteSyncCurrentTaskResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncDirtyError = MetabaseOpError; +/** GET /api/ee/remote-sync/dirty Return all models with changes that have not been pushed to the remote sync source in any remote-synced collection. */ +export const getEeRemoteSyncDirty: API.OperationMethod< + GetEeRemoteSyncDirtyRequest, + GetEeRemoteSyncDirtyResponse, + GetEeRemoteSyncDirtyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncDirtyRequest, + output: GetEeRemoteSyncDirtyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncExportPreflightError = MetabaseOpError; +/** GET /api/ee/remote-sync/export-preflight Dry-run preview of what pushing the current state would do given the live remote branch, without writing anything. Drives the UI's push decision (force / new branch / merge). Returns: - has_changes: whether the remote branch has advanced beyond the last synced version - clean: whether a 3-way merge would apply with no conflicts - conflicts: human-readable labels of the entities that conflict (empty when clean) - summary: counts of remote changes a merge would fold in - force_push_casualties: remote content a force push (rather than a merge) would discard, as `{:deleted [labels] :overwritten [labels]}` - reason: "history-rewritten" when the remote was force-pushed/rebased so no merge base exists Requires superuser permissions. */ +export const getEeRemoteSyncExportPreflight: API.OperationMethod< + GetEeRemoteSyncExportPreflightRequest, + GetEeRemoteSyncExportPreflightResponse, + GetEeRemoteSyncExportPreflightError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncExportPreflightRequest, + output: GetEeRemoteSyncExportPreflightResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncHasRemoteChangesError = MetabaseOpError; +/** GET /api/ee/remote-sync/has-remote-changes Check if there are new changes on the remote branch that can be pulled. Uses in-memory caching (configurable TTL via remote-sync-check-changes-cache-ttl-seconds setting). Returns: - has_changes: true if remote version differs from last imported version, or if never imported - remote_version: current Git SHA on remote branch - local_version: Git SHA of last successful import (nil if never imported) - cached: true if result was served from cache */ +export const getEeRemoteSyncHasRemoteChanges: API.OperationMethod< + GetEeRemoteSyncHasRemoteChangesRequest, + GetEeRemoteSyncHasRemoteChangesResponse, + GetEeRemoteSyncHasRemoteChangesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncHasRemoteChangesRequest, + output: GetEeRemoteSyncHasRemoteChangesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeRemoteSyncIsDirtyError = MetabaseOpError; +/** GET /api/ee/remote-sync/is-dirty Check if any remote-synced collection or collection item has local changes that have not been pushed to the remote sync source. */ +export const getEeRemoteSyncIsDirty: API.OperationMethod< + GetEeRemoteSyncIsDirtyRequest, + GetEeRemoteSyncIsDirtyResponse, + GetEeRemoteSyncIsDirtyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeRemoteSyncIsDirtyRequest, + output: GetEeRemoteSyncIsDirtyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeReplacementRunError = MetabaseOpError; +/** GET /api/ee/replacement/runs/{id} Get the status of a source replacement run. */ +export const getEeReplacementRun: API.OperationMethod< + GetEeReplacementRunRequest, + GetEeReplacementRunResponse, + GetEeReplacementRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeReplacementRunRequest, + output: GetEeReplacementRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeReplacementRunsError = MetabaseOpError; +/** GET /api/ee/replacement/runs List replacement runs, optionally filtered by is-active. */ +export const getEeReplacementRuns: API.OperationMethod< + GetEeReplacementRunsRequest, + GetEeReplacementRunsResponse, + GetEeReplacementRunsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeReplacementRunsRequest, + output: GetEeReplacementRunsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeScimGroupError = MetabaseOpError; +/** GET /api/ee/scim/v2/Groups/{id} Fetch a single group. */ +export const getEeScimGroup: API.OperationMethod< + GetEeScimGroupRequest, + GetEeScimGroupResponse, + GetEeScimGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeScimGroupRequest, + output: GetEeScimGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeScimGroupsError = MetabaseOpError; +/** GET /api/ee/scim/v2/Groups Fetch a list of groups. */ +export const getEeScimGroups: API.OperationMethod< + GetEeScimGroupsRequest, + GetEeScimGroupsResponse, + GetEeScimGroupsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeScimGroupsRequest, + output: GetEeScimGroupsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeScimKeyError = MetabaseOpError; +/** GET /api/ee/scim/api_key Fetch the SCIM API key if one exists. Does *not* return an unmasked key, since we don't have access to that after it is created. */ +export const getEeScimKey: API.OperationMethod< + GetEeScimKeyRequest, + GetEeScimKeyResponse, + GetEeScimKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeScimKeyRequest, + output: GetEeScimKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeScimUserError = MetabaseOpError; +/** GET /api/ee/scim/v2/Users/{id} Fetch a single user. */ +export const getEeScimUser: API.OperationMethod< + GetEeScimUserRequest, + GetEeScimUserResponse, + GetEeScimUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeScimUserRequest, + output: GetEeScimUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeScimUsersError = MetabaseOpError; +/** GET /api/ee/scim/v2/Users Fetch a list of users. */ +export const getEeScimUsers: API.OperationMethod< + GetEeScimUsersRequest, + GetEeScimUsersResponse, + GetEeScimUsersError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeScimUsersRequest, + output: GetEeScimUsersResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeSecurityCenterError = MetabaseOpError; +/** GET /api/ee/security-center List all security advisories with match status. */ +export const getEeSecurityCenter: API.OperationMethod< + GetEeSecurityCenterRequest, + GetEeSecurityCenterResponse, + GetEeSecurityCenterError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeSecurityCenterRequest, + output: GetEeSecurityCenterResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeSemanticSearchStatusError = MetabaseOpError; +/** GET /api/ee/semantic-search/status Fetch the indexing status of the currently active semantic search index table. Returns a map with keys: :indexed_count :total_est If no index is active, returns an empty map. */ +export const getEeSemanticSearchStatus: API.OperationMethod< + GetEeSemanticSearchStatusRequest, + GetEeSemanticSearchStatusResponse, + GetEeSemanticSearchStatusError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeSemanticSearchStatusRequest, + output: GetEeSemanticSearchStatusResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeSerializationMetadataImportError = MetabaseOpError; +/** GET /api/ee/serialization/metadata/import/{id} Status of a metadata import previously started by `POST /metadata/import`. Status is retained in-memory and is not durable across server restarts. Restricted to superusers. */ +export const getEeSerializationMetadataImport: API.OperationMethod< + GetEeSerializationMetadataImportRequest, + GetEeSerializationMetadataImportResponse, + GetEeSerializationMetadataImportError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeSerializationMetadataImportRequest, + output: GetEeSerializationMetadataImportResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeStaleError = MetabaseOpError; +/** GET /api/ee/stale/{id} A flexible endpoint that returns stale entities, in the same shape as collections/items, with the following options: - `before_date` - only return entities that were last edited before this date (default: 6 months ago) - `is_recursive` - if true, return entities from all children of the collection, not just the direct children (default: false) - `sort_column` - the column to sort by (default: name) - `sort_direction` - the direction to sort by (default: asc) */ +export const getEeStale: API.OperationMethod< + GetEeStaleRequest, + GetEeStaleResponse, + GetEeStaleError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeStaleRequest, + output: GetEeStaleResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeSupportAccessGrantError = MetabaseOpError; +/** GET /api/ee/support-access-grant List support access grants with optional filtering and pagination. Requires superuser permissions. Query parameters: - ticket-number: Filter by ticket number - user-id: Filter by user who created the grant - include-revoked: Include revoked grants (default false) */ +export const getEeSupportAccessGrant: API.OperationMethod< + GetEeSupportAccessGrantRequest, + GetEeSupportAccessGrantResponse, + GetEeSupportAccessGrantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeSupportAccessGrantRequest, + output: GetEeSupportAccessGrantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeSupportAccessGrantCurrentError = MetabaseOpError; +/** GET /api/ee/support-access-grant/current Get the currently active support access grant, if one exists. Requires superuser permissions. */ +export const getEeSupportAccessGrantCurrent: API.OperationMethod< + GetEeSupportAccessGrantCurrentRequest, + GetEeSupportAccessGrantCurrentResponse, + GetEeSupportAccessGrantCurrentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeSupportAccessGrantCurrentRequest, + output: GetEeSupportAccessGrantCurrentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeTenantError = MetabaseOpError; +/** GET /api/ee/tenant Get all tenants */ +export const getEeTenant: API.OperationMethod< + GetEeTenantRequest, + GetEeTenantResponse, + GetEeTenantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeTenantRequest, + output: GetEeTenantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeTenantByIdError = MetabaseOpError; +/** GET /api/ee/tenant/{id} Get info about a tenant */ +export const getEeTenantById: API.OperationMethod< + GetEeTenantByIdRequest, + GetEeTenantByIdResponse, + GetEeTenantByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeTenantByIdRequest, + output: GetEeTenantByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeTransformInspectError = MetabaseOpError; +/** GET /api/ee/transforms/{id}/inspect Phase 1: Discover available lenses for a transform. Returns structural metadata and available lens types. */ +export const getEeTransformInspect: API.OperationMethod< + GetEeTransformInspectRequest, + GetEeTransformInspectResponse, + GetEeTransformInspectError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeTransformInspectRequest, + output: GetEeTransformInspectResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeTransformInspectByLensIdError = MetabaseOpError; +/** GET /api/ee/transforms/{id}/inspect/{lens-id} Phase 2: Get full lens contents for a transform. Returns sections, cards with dataset_query, and trigger definitions. Accepts optional params for drill lenses as query params. */ +export const getEeTransformInspectByLensId: API.OperationMethod< + GetEeTransformInspectByLensIdRequest, + GetEeTransformInspectByLensIdResponse, + GetEeTransformInspectByLensIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeTransformInspectByLensIdRequest, + output: GetEeTransformInspectByLensIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeTransformsPythonLibraryError = MetabaseOpError; +/** GET /api/ee/transforms-python/library/{path} Get the Python library for user modules. */ +export const getEeTransformsPythonLibrary: API.OperationMethod< + GetEeTransformsPythonLibraryRequest, + GetEeTransformsPythonLibraryResponse, + GetEeTransformsPythonLibraryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeTransformsPythonLibraryRequest, + output: GetEeTransformsPythonLibraryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEeUploadManagementTablesError = MetabaseOpError; +/** GET /api/ee/upload-management/tables Get all `Tables` visible to the current user which were created by uploading a file. */ +export const getEeUploadManagementTables: API.OperationMethod< + GetEeUploadManagementTablesRequest, + GetEeUploadManagementTablesResponse, + GetEeUploadManagementTablesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEeUploadManagementTablesRequest, + output: GetEeUploadManagementTablesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardError = MetabaseOpError; +/** GET /api/embed/card/{token} Fetch a Card via a JSON Web Token signed with the `embedding-secret-key`. Token should have the following format: {:resource {:question }} */ +export const getEmbedCard: API.OperationMethod< + GetEmbedCardRequest, + GetEmbedCardResponse, + GetEmbedCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardRequest, + output: GetEmbedCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardParamRemappingError = MetabaseOpError; +/** GET /api/embed/card/{token}/params/{param-key}/remapping Embedded version of api.card filter values endpoint. */ +export const getEmbedCardParamRemapping: API.OperationMethod< + GetEmbedCardParamRemappingRequest, + GetEmbedCardParamRemappingResponse, + GetEmbedCardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardParamRemappingRequest, + output: GetEmbedCardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardParamSearchError = MetabaseOpError; +/** GET /api/embed/card/{token}/params/{param-key}/search/{prefix} Embedded version of chain filter search endpoint. */ +export const getEmbedCardParamSearch: API.OperationMethod< + GetEmbedCardParamSearchRequest, + GetEmbedCardParamSearchResponse, + GetEmbedCardParamSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardParamSearchRequest, + output: GetEmbedCardParamSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardParamValuesError = MetabaseOpError; +/** GET /api/embed/card/{token}/params/{param-key}/values Embedded version of api.card filter values endpoint. */ +export const getEmbedCardParamValues: API.OperationMethod< + GetEmbedCardParamValuesRequest, + GetEmbedCardParamValuesResponse, + GetEmbedCardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardParamValuesRequest, + output: GetEmbedCardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardQueryError = MetabaseOpError; +/** GET /api/embed/card/{token}/query Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`. Token should have the following format: {:resource {:question } :params } */ +export const getEmbedCardQuery: API.OperationMethod< + GetEmbedCardQueryRequest, + GetEmbedCardQueryResponse, + GetEmbedCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardQueryRequest, + output: GetEmbedCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedCardQueryByExportFormatError = MetabaseOpError; +/** GET /api/embed/card/{token}/query/{export-format} Like `GET /api/embed/card/query`, but returns the results as a file in the specified format. */ +export const getEmbedCardQueryByExportFormat: API.OperationMethod< + GetEmbedCardQueryByExportFormatRequest, + GetEmbedCardQueryByExportFormatResponse, + GetEmbedCardQueryByExportFormatError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedCardQueryByExportFormatRequest, + output: GetEmbedCardQueryByExportFormatResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardError = MetabaseOpError; +/** GET /api/embed/dashboard/{token} Fetch a Dashboard via a JSON Web Token signed with the `embedding-secret-key`. Token should have the following format: {:resource {:dashboard }} */ +export const getEmbedDashboard: API.OperationMethod< + GetEmbedDashboardRequest, + GetEmbedDashboardResponse, + GetEmbedDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardRequest, + output: GetEmbedDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardDashcardCardError = MetabaseOpError; +/** GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id} Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the `embedding-secret-key` */ +export const getEmbedDashboardDashcardCard: API.OperationMethod< + GetEmbedDashboardDashcardCardRequest, + GetEmbedDashboardDashcardCardResponse, + GetEmbedDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardDashcardCardRequest, + output: GetEmbedDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardDashcardCardByExportFormatError = MetabaseOpError; +/** GET /api/embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{export-format} Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the `embedding-secret-key` return the data in one of the export formats */ +export const getEmbedDashboardDashcardCardByExportFormat: API.OperationMethod< + GetEmbedDashboardDashcardCardByExportFormatRequest, + GetEmbedDashboardDashcardCardByExportFormatResponse, + GetEmbedDashboardDashcardCardByExportFormatError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardDashcardCardByExportFormatRequest, + output: GetEmbedDashboardDashcardCardByExportFormatResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardParamRemappingError = MetabaseOpError; +/** GET /api/embed/dashboard/{token}/params/{param-key}/remapping Embedded version of the remapped dashboard param value endpoint. */ +export const getEmbedDashboardParamRemapping: API.OperationMethod< + GetEmbedDashboardParamRemappingRequest, + GetEmbedDashboardParamRemappingResponse, + GetEmbedDashboardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardParamRemappingRequest, + output: GetEmbedDashboardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardParamSearchError = MetabaseOpError; +/** GET /api/embed/dashboard/{token}/params/{param-key}/search/{prefix} Embedded version of chain filter search endpoint. */ +export const getEmbedDashboardParamSearch: API.OperationMethod< + GetEmbedDashboardParamSearchRequest, + GetEmbedDashboardParamSearchResponse, + GetEmbedDashboardParamSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardParamSearchRequest, + output: GetEmbedDashboardParamSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedDashboardParamValuesError = MetabaseOpError; +/** GET /api/embed/dashboard/{token}/params/{param-key}/values Embedded version of chain filter values endpoint. */ +export const getEmbedDashboardParamValues: API.OperationMethod< + GetEmbedDashboardParamValuesRequest, + GetEmbedDashboardParamValuesResponse, + GetEmbedDashboardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedDashboardParamValuesRequest, + output: GetEmbedDashboardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedPivotCardQueryError = MetabaseOpError; +/** GET /api/embed/pivot/card/{token}/query Fetch the results of running a Card using a JSON Web Token signed with the `embedding-secret-key`. Token should have the following format: {:resource {:question } :params } */ +export const getEmbedPivotCardQuery: API.OperationMethod< + GetEmbedPivotCardQueryRequest, + GetEmbedPivotCardQueryResponse, + GetEmbedPivotCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedPivotCardQueryRequest, + output: GetEmbedPivotCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedPivotDashboardDashcardCardError = MetabaseOpError; +/** GET /api/embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id} Fetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the `embedding-secret-key` */ +export const getEmbedPivotDashboardDashcardCard: API.OperationMethod< + GetEmbedPivotDashboardDashcardCardRequest, + GetEmbedPivotDashboardDashcardCardResponse, + GetEmbedPivotDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedPivotDashboardDashcardCardRequest, + output: GetEmbedPivotDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedThemeError = MetabaseOpError; +/** GET /api/embed-theme Fetch a list of all embedding themes. */ +export const getEmbedTheme: API.OperationMethod< + GetEmbedThemeRequest, + GetEmbedThemeResponse, + GetEmbedThemeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedThemeRequest, + output: GetEmbedThemeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedThemeByIdError = MetabaseOpError; +/** GET /api/embed-theme/{id} Fetch a single embedding theme by ID. */ +export const getEmbedThemeById: API.OperationMethod< + GetEmbedThemeByIdRequest, + GetEmbedThemeByIdResponse, + GetEmbedThemeByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedThemeByIdRequest, + output: GetEmbedThemeByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedTilesCardError = MetabaseOpError; +/** GET /api/embed/tiles/card/{token}/{zoom}/{x}/{y} Generates a single tile image for an embedded Card using the map visualization. */ +export const getEmbedTilesCard: API.OperationMethod< + GetEmbedTilesCardRequest, + GetEmbedTilesCardResponse, + GetEmbedTilesCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedTilesCardRequest, + output: GetEmbedTilesCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetEmbedTilesDashboardDashcardCardError = MetabaseOpError; +/** GET /api/embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y} Generates a single tile image for a Card on an embedded Dashboard using the map visualization. */ +export const getEmbedTilesDashboardDashcardCard: API.OperationMethod< + GetEmbedTilesDashboardDashcardCardRequest, + GetEmbedTilesDashboardDashcardCardResponse, + GetEmbedTilesDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetEmbedTilesDashboardDashcardCardRequest, + output: GetEmbedTilesDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldError = MetabaseOpError; +/** GET /api/field/{id} Get `Field` with ID. */ +export const getField: API.OperationMethod< + GetFieldRequest, + GetFieldResponse, + GetFieldError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldRequest, + output: GetFieldResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldRelatedError = MetabaseOpError; +/** GET /api/field/{id}/related Return related entities. */ +export const getFieldRelated: API.OperationMethod< + GetFieldRelatedRequest, + GetFieldRelatedResponse, + GetFieldRelatedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldRelatedRequest, + output: GetFieldRelatedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldRemappingError = MetabaseOpError; +/** GET /api/field/{id}/remapping/{remapped-id} Fetch remapped Field values. */ +export const getFieldRemapping: API.OperationMethod< + GetFieldRemappingRequest, + GetFieldRemappingResponse, + GetFieldRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldRemappingRequest, + output: GetFieldRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldSearchError = MetabaseOpError; +/** GET /api/field/{id}/search/{search-id} Search for values of a Field with `search-id` that start with `value`. See docstring for [[metabase.parameters.field/search-values]] for a more detailed explanation. */ +export const getFieldSearch: API.OperationMethod< + GetFieldSearchRequest, + GetFieldSearchResponse, + GetFieldSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldSearchRequest, + output: GetFieldSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldSummaryError = MetabaseOpError; +/** GET /api/field/{id}/summary Get the count and distinct count of `Field` with ID. */ +export const getFieldSummary: API.OperationMethod< + GetFieldSummaryRequest, + GetFieldSummaryResponse, + GetFieldSummaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldSummaryRequest, + output: GetFieldSummaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetFieldValuesError = MetabaseOpError; +/** GET /api/field/{id}/values If a Field's value of `has_field_values` is `:list`, return a list of all the distinct values of the Field (or remapped Field), and (if defined by a User) a map of human-readable remapped values. If `has_field_values` is not `:list`, checks whether we should create FieldValues for this Field; if so, creates and returns them. */ +export const getFieldValues: API.OperationMethod< + GetFieldValuesRequest, + GetFieldValuesResponse, + GetFieldValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetFieldValuesRequest, + output: GetFieldValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetGeojsonError = MetabaseOpError; +/** GET /api/geojson Load a custom GeoJSON file based on a URL or file path provided as a query parameter. This behaves similarly to /api/geojson/:key but doesn't require the custom map to be saved to the DB first. */ +export const getGeojson: API.OperationMethod< + GetGeojsonRequest, + GetGeojsonResponse, + GetGeojsonError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetGeojsonRequest, + output: GetGeojsonResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetGeojsonByKeyError = MetabaseOpError; +/** GET /api/geojson/{key} Fetch a custom GeoJSON file as defined in the [[metabase.geojson.settings/custom-geojson]] setting. (This just acts as a simple proxy for the file specified for `key`). */ +export const getGeojsonByKey: API.OperationMethod< + GetGeojsonByKeyRequest, + GetGeojsonByKeyResponse, + GetGeojsonByKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetGeojsonByKeyRequest, + output: GetGeojsonByKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetGlossaryError = MetabaseOpError; +/** GET /api/glossary Fetch all glossary entries, optionally filtered by search term. */ +export const getGlossary: API.OperationMethod< + GetGlossaryRequest, + GetGlossaryResponse, + GetGlossaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetGlossaryRequest, + output: GetGlossaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetHealthInspectorError = MetabaseOpError; +/** GET /api/health-inspector Get a list of recent health check runs. */ +export const getHealthInspector: API.OperationMethod< + GetHealthInspectorRequest, + GetHealthInspectorResponse, + GetHealthInspectorError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetHealthInspectorRequest, + output: GetHealthInspectorResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetKeyError = MetabaseOpError; +/** GET /api/api-key Get a list of API keys with the default scope. Non-paginated. */ +export const getKey: API.OperationMethod< + GetKeyRequest, + GetKeyResponse, + GetKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetKeyRequest, + output: GetKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetKeyCountError = MetabaseOpError; +/** GET /api/api-key/count Get the count of API keys in the DB with the default scope. */ +export const getKeyCount: API.OperationMethod< + GetKeyCountRequest, + GetKeyCountResponse, + GetKeyCountError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetKeyCountRequest, + output: GetKeyCountResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetLlmListModelsError = MetabaseOpError; +/** GET /api/llm/list-models List available LLM models from the configured provider. Requires LLM to be configured for the selected provider in admin settings. */ +export const getLlmListModels: API.OperationMethod< + GetLlmListModelsRequest, + GetLlmListModelsResponse, + GetLlmListModelsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetLlmListModelsRequest, + output: GetLlmListModelsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetLoggerLogsError = MetabaseOpError; +/** GET /api/logger/logs Logs. */ +export const getLoggerLogs: API.OperationMethod< + GetLoggerLogsRequest, + GetLoggerLogsResponse, + GetLoggerLogsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetLoggerLogsRequest, + output: GetLoggerLogsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetLoggerPresetsError = MetabaseOpError; +/** GET /api/logger/presets Get all known presets. */ +export const getLoggerPresets: API.OperationMethod< + GetLoggerPresetsRequest, + GetLoggerPresetsResponse, + GetLoggerPresetsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetLoggerPresetsRequest, + output: GetLoggerPresetsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetLoginHistoryCurrentError = MetabaseOpError; +/** GET /api/login-history/current Fetch recent logins for the current user. */ +export const getLoginHistoryCurrent: API.OperationMethod< + GetLoginHistoryCurrentRequest, + GetLoginHistoryCurrentResponse, + GetLoginHistoryCurrentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetLoginHistoryCurrentRequest, + output: GetLoginHistoryCurrentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMeasureError = MetabaseOpError; +/** GET /api/measure Fetch *all* `Measures`. */ +export const getMeasure: API.OperationMethod< + GetMeasureRequest, + GetMeasureResponse, + GetMeasureError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMeasureRequest, + output: GetMeasureResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMeasureByIdError = MetabaseOpError; +/** GET /api/measure/{id} Fetch `Measure` with ID. */ +export const getMeasureById: API.OperationMethod< + GetMeasureByIdRequest, + GetMeasureByIdResponse, + GetMeasureByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMeasureByIdRequest, + output: GetMeasureByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMeasureDimensionRemappingError = MetabaseOpError; +/** GET /api/measure/{id}/dimension/{dimension-key}/remapping Fetch remapped value for a specific dimension value. Returns a pair [value, display-name] if remapping exists, or [value] otherwise. */ +export const getMeasureDimensionRemapping: API.OperationMethod< + GetMeasureDimensionRemappingRequest, + GetMeasureDimensionRemappingResponse, + GetMeasureDimensionRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMeasureDimensionRemappingRequest, + output: GetMeasureDimensionRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMeasureDimensionSearchError = MetabaseOpError; +/** GET /api/measure/{id}/dimension/{dimension-key}/search Search for values of a dimension that contain the query string. Returns field values matching the search query in the same format as the field values API. */ +export const getMeasureDimensionSearch: API.OperationMethod< + GetMeasureDimensionSearchRequest, + GetMeasureDimensionSearchResponse, + GetMeasureDimensionSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMeasureDimensionSearchRequest, + output: GetMeasureDimensionSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMeasureDimensionValuesError = MetabaseOpError; +/** GET /api/measure/{id}/dimension/{dimension-key}/values Fetch values for a dimension of a measure. Returns field values in the same format as the field values API: - values: list of [value] or [value, display-name] tuples - field_id: the underlying field ID - has_more_values: boolean indicating if there are more values */ +export const getMeasureDimensionValues: API.OperationMethod< + GetMeasureDimensionValuesRequest, + GetMeasureDimensionValuesResponse, + GetMeasureDimensionValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMeasureDimensionValuesRequest, + output: GetMeasureDimensionValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotConversationError = MetabaseOpError; +/** GET /api/metabot/conversations/{id} Return a single conversation with its flattened chat messages. Accessible to any participant in the conversation or to any superuser. */ +export const getMetabotConversation: API.OperationMethod< + GetMetabotConversationRequest, + GetMetabotConversationResponse, + GetMetabotConversationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotConversationRequest, + output: GetMetabotConversationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotConversationsError = MetabaseOpError; +/** GET /api/metabot/conversations List conversations visible in the current user's history, most-recent first. New conversations are participation-based (the user authored at least one message); legacy conversations created before message authors were stamped fall back to the conversation originator. */ +export const getMetabotConversations: API.OperationMethod< + GetMetabotConversationsRequest, + GetMetabotConversationsResponse, + GetMetabotConversationsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotConversationsRequest, + output: GetMetabotConversationsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotMetabotError = MetabaseOpError; +/** GET /api/metabot/metabot List configured metabot instances */ +export const getMetabotMetabot: API.OperationMethod< + GetMetabotMetabotRequest, + GetMetabotMetabotResponse, + GetMetabotMetabotError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotMetabotRequest, + output: GetMetabotMetabotResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotMetabotByIdError = MetabaseOpError; +/** GET /api/metabot/metabot/{id} Retrieve one metabot instance */ +export const getMetabotMetabotById: API.OperationMethod< + GetMetabotMetabotByIdRequest, + GetMetabotMetabotByIdResponse, + GetMetabotMetabotByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotMetabotByIdRequest, + output: GetMetabotMetabotByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotMetabotPromptSuggestionsError = MetabaseOpError; +/** GET /api/metabot/metabot/{id}/prompt-suggestions Return the prompt suggestions for the metabot instance with `id`. */ +export const getMetabotMetabotPromptSuggestions: API.OperationMethod< + GetMetabotMetabotPromptSuggestionsRequest, + GetMetabotMetabotPromptSuggestionsResponse, + GetMetabotMetabotPromptSuggestionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotMetabotPromptSuggestionsRequest, + output: GetMetabotMetabotPromptSuggestionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotPermissionsUserPermissionsError = MetabaseOpError; +/** GET /api/metabot/permissions/user-permissions Return the current user's resolved metabot permissions, taking the most permissive value across all their groups. */ +export const getMetabotPermissionsUserPermissions: API.OperationMethod< + GetMetabotPermissionsUserPermissionsRequest, + GetMetabotPermissionsUserPermissionsResponse, + GetMetabotPermissionsUserPermissionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotPermissionsUserPermissionsRequest, + output: GetMetabotPermissionsUserPermissionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetabotSettingsError = MetabaseOpError; +/** GET /api/metabot/settings Return available models for a provider using its configured credentials. */ +export const getMetabotSettings: API.OperationMethod< + GetMetabotSettingsRequest, + GetMetabotSettingsResponse, + GetMetabotSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetabotSettingsRequest, + output: GetMetabotSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetricError = MetabaseOpError; +/** GET /api/metric Get a list of metrics. Returns metrics (Cards with type='metric') that the current user has read access to, filtered by collection visibility permissions. */ +export const getMetric: API.OperationMethod< + GetMetricRequest, + GetMetricResponse, + GetMetricError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricRequest, + output: GetMetricResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetricByIdError = MetabaseOpError; +/** GET /api/metric/{id} Fetch a `Metric` with ID. Returns the metric with hydrated dimensions and dimension mappings. */ +export const getMetricById: API.OperationMethod< + GetMetricByIdRequest, + GetMetricByIdResponse, + GetMetricByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricByIdRequest, + output: GetMetricByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetricDimensionRemappingError = MetabaseOpError; +/** GET /api/metric/{id}/dimension/{dimension-key}/remapping Fetch remapped value for a specific dimension value. Returns a pair [value, display-name] if remapping exists, or [value] otherwise. */ +export const getMetricDimensionRemapping: API.OperationMethod< + GetMetricDimensionRemappingRequest, + GetMetricDimensionRemappingResponse, + GetMetricDimensionRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricDimensionRemappingRequest, + output: GetMetricDimensionRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetricDimensionSearchError = MetabaseOpError; +/** GET /api/metric/{id}/dimension/{dimension-key}/search Search for values of a dimension that contain the query string. Returns field values matching the search query in the same format as the field values API. */ +export const getMetricDimensionSearch: API.OperationMethod< + GetMetricDimensionSearchRequest, + GetMetricDimensionSearchResponse, + GetMetricDimensionSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricDimensionSearchRequest, + output: GetMetricDimensionSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMetricDimensionValuesError = MetabaseOpError; +/** GET /api/metric/{id}/dimension/{dimension-key}/values Fetch values for a dimension of a metric. Returns field values in the same format as the field values API: - values: list of [value] or [value, display-name] tuples - field_id: the underlying field ID - has_more_values: boolean indicating if there are more values */ +export const getMetricDimensionValues: API.OperationMethod< + GetMetricDimensionValuesRequest, + GetMetricDimensionValuesResponse, + GetMetricDimensionValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMetricDimensionValuesRequest, + output: GetMetricDimensionValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetModelIndexError = MetabaseOpError; +/** GET /api/model-index Retrieve list of ModelIndex. */ +export const getModelIndex: API.OperationMethod< + GetModelIndexRequest, + GetModelIndexResponse, + GetModelIndexError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetModelIndexRequest, + output: GetModelIndexResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetModelIndexByIdError = MetabaseOpError; +/** GET /api/model-index/{id} Retrieve ModelIndex. */ +export const getModelIndexById: API.OperationMethod< + GetModelIndexByIdRequest, + GetModelIndexByIdResponse, + GetModelIndexByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetModelIndexByIdRequest, + output: GetModelIndexByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMtGtapError = MetabaseOpError; +/** GET /api/mt/gtap Fetch a list of all GTAPs currently in use, or a single GTAP if both `group_id` and `table_id` are provided. */ +export const getMtGtap: API.OperationMethod< + GetMtGtapRequest, + GetMtGtapResponse, + GetMtGtapError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMtGtapRequest, + output: GetMtGtapResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMtGtapByIdError = MetabaseOpError; +/** GET /api/mt/gtap/{id} Fetch GTAP by `id` */ +export const getMtGtapById: API.OperationMethod< + GetMtGtapByIdRequest, + GetMtGtapByIdResponse, + GetMtGtapByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMtGtapByIdRequest, + output: GetMtGtapByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetMtUserAttributesError = MetabaseOpError; +/** GET /api/mt/user/attributes Fetch a list of possible keys for User `login_attributes`. This includes keys from tenant model attributes and keys that have already been set for existing Users. */ +export const getMtUserAttributes: API.OperationMethod< + GetMtUserAttributesRequest, + GetMtUserAttributesResponse, + GetMtUserAttributesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetMtUserAttributesRequest, + output: GetMtUserAttributesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNativeQuerySnippetError = MetabaseOpError; +/** GET /api/native-query-snippet Fetch all snippets */ +export const getNativeQuerySnippet: API.OperationMethod< + GetNativeQuerySnippetRequest, + GetNativeQuerySnippetResponse, + GetNativeQuerySnippetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNativeQuerySnippetRequest, + output: GetNativeQuerySnippetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNativeQuerySnippetByIdError = MetabaseOpError; +/** GET /api/native-query-snippet/{id} Fetch native query snippet with ID. */ +export const getNativeQuerySnippetById: API.OperationMethod< + GetNativeQuerySnippetByIdRequest, + GetNativeQuerySnippetByIdResponse, + GetNativeQuerySnippetByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNativeQuerySnippetByIdRequest, + output: GetNativeQuerySnippetByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNotificationError = MetabaseOpError; +/** GET /api/notification List notifications. - `creator_id`: if provided returns only notifications created by this user - `recipient_id`: if provided returns only notification that has recipient_id as a recipient - `creator_or_recipient_id`: if provided returns only notification that has user_id as creator or recipient - `card_id`: if provided returns only notification that has card_id as payload */ +export const getNotification: API.OperationMethod< + GetNotificationRequest, + GetNotificationResponse, + GetNotificationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNotificationRequest, + output: GetNotificationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNotificationAdminError = MetabaseOpError; +/** GET /api/notification/admin List card-type notifications (alerts) for admin management. Supports pagination (`limit` + `offset` query params — handled by the offset-paging middleware), filtering, and sorting. `last_send_status` filter operates on the latest channel-send task_history row for the notification (`successful` = latest channel-send succeeded; `failing` = latest channel-send failed). `last_check_status` filter operates on the latest terminal TaskRun for the notification — the whole-run rollup (`successful` = the run succeeded; `failing` = it failed or was abandoned). This is a superset of `last_send_status`: it also catches query failures and heartbeat-abandoned runs that never reached the send step. The Failing tab uses `?last_check_status=failing`. `creatorless=true` selects notifications with no creator or a deactivated creator (the Ownerless tab). `creatorless=false` selects the inverse. `channel` accepts a single string or a repeated query param for multi-select (OR logic). */ +export const getNotificationAdmin: API.OperationMethod< + GetNotificationAdminRequest, + GetNotificationAdminResponse, + GetNotificationAdminError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNotificationAdminRequest, + output: GetNotificationAdminResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNotificationAdminByIdError = MetabaseOpError; +/** GET /api/notification/admin/{id} Get a single card-type notification with last_check, last_send, check_history (up to 10 most-recent terminal alert-type TaskRuns) and send_history (up to 10 most-recent channel-send delivery attempts). 404 if the notification doesn't exist or isn't a card-type notification. */ +export const getNotificationAdminById: API.OperationMethod< + GetNotificationAdminByIdRequest, + GetNotificationAdminByIdResponse, + GetNotificationAdminByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNotificationAdminByIdRequest, + output: GetNotificationAdminByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetNotificationByIdError = MetabaseOpError; +/** GET /api/notification/{id} Get a notification by id. */ +export const getNotificationById: API.OperationMethod< + GetNotificationByIdRequest, + GetNotificationByIdResponse, + GetNotificationByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetNotificationByIdRequest, + output: GetNotificationByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetOauthAuthorizationsError = MetabaseOpError; +/** GET /api/oauth/authorizations List OAuth dynamic client registration events (registered, approved, or denied), newest first. Joins client info and, for decision events, the deciding user. Superuser only. */ +export const getOauthAuthorizations: API.OperationMethod< + GetOauthAuthorizationsRequest, + GetOauthAuthorizationsResponse, + GetOauthAuthorizationsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetOauthAuthorizationsRequest, + output: GetOauthAuthorizationsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetOembedError = MetabaseOpError; +/** GET /api/public/oembed oEmbed endpoint used to retrieve embed code and metadata for a (public) Metabase URL. */ +export const getOembed: API.OperationMethod< + GetOembedRequest, + GetOembedResponse, + GetOembedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetOembedRequest, + output: GetOembedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetOsiAiContextError = MetabaseOpError; +/** GET /api/osi/ai-context Get all ai_context entries, paginated. */ +export const getOsiAiContext: API.OperationMethod< + GetOsiAiContextRequest, + GetOsiAiContextResponse, + GetOsiAiContextError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetOsiAiContextRequest, + output: GetOsiAiContextResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetOsiAiContextByEntityLocalIdError = MetabaseOpError; +/** GET /api/osi/ai-context/{entity-type}/{entity-local-id} Get the ai_context entry for an entity by its logical `(entity_type, entity_local_id)` key. */ +export const getOsiAiContextByEntityLocalId: API.OperationMethod< + GetOsiAiContextByEntityLocalIdRequest, + GetOsiAiContextByEntityLocalIdResponse, + GetOsiAiContextByEntityLocalIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetOsiAiContextByEntityLocalIdRequest, + output: GetOsiAiContextByEntityLocalIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsGraphError = MetabaseOpError; +/** GET /api/permissions/graph Fetch a graph of all Permissions. */ +export const getPermissionsGraph: API.OperationMethod< + GetPermissionsGraphRequest, + GetPermissionsGraphResponse, + GetPermissionsGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsGraphRequest, + output: GetPermissionsGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsGraphDbError = MetabaseOpError; +/** GET /api/permissions/graph/db/{db-id} Fetch a graph of all Permissions for db-id `db-id`. */ +export const getPermissionsGraphDb: API.OperationMethod< + GetPermissionsGraphDbRequest, + GetPermissionsGraphDbResponse, + GetPermissionsGraphDbError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsGraphDbRequest, + output: GetPermissionsGraphDbResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsGraphGroupError = MetabaseOpError; +/** GET /api/permissions/graph/group/{group-id} Fetch a graph of all Permissions for group-id `group-id`. */ +export const getPermissionsGraphGroup: API.OperationMethod< + GetPermissionsGraphGroupRequest, + GetPermissionsGraphGroupResponse, + GetPermissionsGraphGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsGraphGroupRequest, + output: GetPermissionsGraphGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsGroupError = MetabaseOpError; +/** GET /api/permissions/group Fetch all `PermissionsGroups`, including a count of the number of `:members` in that group. This API requires superuser or group manager of more than one group. Group manager is only available if `advanced-permissions` is enabled and returns only groups that user is manager of. Optional query parameter `tenancy` can be used to filter groups: - `tenancy=external`: Returns only tenant groups (where `is_tenant_group = true`) - `tenancy=internal`: Returns only non-tenant groups (where `is_tenant_group = false`) - No `tenancy` parameter: Returns all groups (default behavior) */ +export const getPermissionsGroup: API.OperationMethod< + GetPermissionsGroupRequest, + GetPermissionsGroupResponse, + GetPermissionsGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsGroupRequest, + output: GetPermissionsGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsGroupByIdError = MetabaseOpError; +/** GET /api/permissions/group/{id} Fetch the details for a certain permissions group. */ +export const getPermissionsGroupById: API.OperationMethod< + GetPermissionsGroupByIdRequest, + GetPermissionsGroupByIdResponse, + GetPermissionsGroupByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsGroupByIdRequest, + output: GetPermissionsGroupByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPermissionsMembershipError = MetabaseOpError; +/** GET /api/permissions/membership Fetch a map describing the group memberships of various users. This map's format is: { [{:membership_id :group_id :is_group_manager boolean}]} */ +export const getPermissionsMembership: API.OperationMethod< + GetPermissionsMembershipRequest, + GetPermissionsMembershipResponse, + GetPermissionsMembershipError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPermissionsMembershipRequest, + output: GetPermissionsMembershipResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPersistError = MetabaseOpError; +/** GET /api/persist List the entries of [[PersistedInfo]] in order to show a status page. */ +export const getPersist: API.OperationMethod< + GetPersistRequest, + GetPersistResponse, + GetPersistError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPersistRequest, + output: GetPersistResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPersistByPersistedInfoIdError = MetabaseOpError; +/** GET /api/persist/{persisted-info-id} Fetch a particular [[PersistedInfo]] by id. */ +export const getPersistByPersistedInfoId: API.OperationMethod< + GetPersistByPersistedInfoIdRequest, + GetPersistByPersistedInfoIdResponse, + GetPersistByPersistedInfoIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPersistByPersistedInfoIdRequest, + output: GetPersistByPersistedInfoIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPersistCardError = MetabaseOpError; +/** GET /api/persist/card/{card-id} Fetch a particular [[PersistedInfo]] by card-id. */ +export const getPersistCard: API.OperationMethod< + GetPersistCardRequest, + GetPersistCardResponse, + GetPersistCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPersistCardRequest, + output: GetPersistCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPivotCardQueryError = MetabaseOpError; +/** GET /api/public/pivot/card/{uuid}/query Fetch a publicly-accessible Card an return query results as well as `:card` information. Does not require auth credentials. Public sharing must be enabled. */ +export const getPivotCardQuery: API.OperationMethod< + GetPivotCardQueryRequest, + GetPivotCardQueryResponse, + GetPivotCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPivotCardQueryRequest, + output: GetPivotCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPivotDashboardDashcardCardError = MetabaseOpError; +/** GET /api/public/pivot/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id} Fetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled. */ +export const getPivotDashboardDashcardCard: API.OperationMethod< + GetPivotDashboardDashcardCardRequest, + GetPivotDashboardDashcardCardResponse, + GetPivotDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPivotDashboardDashcardCardRequest, + output: GetPivotDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPremiumFeaturesTokenStatusError = MetabaseOpError; +/** GET /api/premium-features/token/status Fetch info about the current Premium-Features premium features token including whether it is `valid`, a `trial` token, its `features`, when it is `valid-thru`, and the `status` of the account. */ +export const getPremiumFeaturesTokenStatus: API.OperationMethod< + GetPremiumFeaturesTokenStatusRequest, + GetPremiumFeaturesTokenStatusResponse, + GetPremiumFeaturesTokenStatusError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPremiumFeaturesTokenStatusRequest, + output: GetPremiumFeaturesTokenStatusResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedCardError = MetabaseOpError; +/** GET /api/preview_embed/card/{token} Fetch a Card you're considering embedding by passing a JWT `token`. */ +export const getPreviewEmbedCard: API.OperationMethod< + GetPreviewEmbedCardRequest, + GetPreviewEmbedCardResponse, + GetPreviewEmbedCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedCardRequest, + output: GetPreviewEmbedCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedCardParamRemappingError = MetabaseOpError; +/** GET /api/preview_embed/card/{token}/params/{param-key}/remapping Embedded version of api.card filter values endpoint. */ +export const getPreviewEmbedCardParamRemapping: API.OperationMethod< + GetPreviewEmbedCardParamRemappingRequest, + GetPreviewEmbedCardParamRemappingResponse, + GetPreviewEmbedCardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedCardParamRemappingRequest, + output: GetPreviewEmbedCardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedCardParamValuesError = MetabaseOpError; +/** GET /api/preview_embed/card/{token}/params/{param-key}/values Embedded version of api.card filter values endpoint. */ +export const getPreviewEmbedCardParamValues: API.OperationMethod< + GetPreviewEmbedCardParamValuesRequest, + GetPreviewEmbedCardParamValuesResponse, + GetPreviewEmbedCardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedCardParamValuesRequest, + output: GetPreviewEmbedCardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedCardQueryError = MetabaseOpError; +/** GET /api/preview_embed/card/{token}/query Fetch the query results for a Card you're considering embedding by passing a JWT `token`. */ +export const getPreviewEmbedCardQuery: API.OperationMethod< + GetPreviewEmbedCardQueryRequest, + GetPreviewEmbedCardQueryResponse, + GetPreviewEmbedCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedCardQueryRequest, + output: GetPreviewEmbedCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedDashboardError = MetabaseOpError; +/** GET /api/preview_embed/dashboard/{token} Fetch a Dashboard you're considering embedding by passing a JWT `token`. */ +export const getPreviewEmbedDashboard: API.OperationMethod< + GetPreviewEmbedDashboardRequest, + GetPreviewEmbedDashboardResponse, + GetPreviewEmbedDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedDashboardRequest, + output: GetPreviewEmbedDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedDashboardDashcardCardError = MetabaseOpError; +/** GET /api/preview_embed/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id} Fetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`. */ +export const getPreviewEmbedDashboardDashcardCard: API.OperationMethod< + GetPreviewEmbedDashboardDashcardCardRequest, + GetPreviewEmbedDashboardDashcardCardResponse, + GetPreviewEmbedDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedDashboardDashcardCardRequest, + output: GetPreviewEmbedDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedDashboardParamRemappingError = MetabaseOpError; +/** GET /api/preview_embed/dashboard/{token}/params/{param-key}/remapping Embedded version of the remapped dashboard param value endpoint. */ +export const getPreviewEmbedDashboardParamRemapping: API.OperationMethod< + GetPreviewEmbedDashboardParamRemappingRequest, + GetPreviewEmbedDashboardParamRemappingResponse, + GetPreviewEmbedDashboardParamRemappingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedDashboardParamRemappingRequest, + output: GetPreviewEmbedDashboardParamRemappingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedDashboardParamSearchError = MetabaseOpError; +/** GET /api/preview_embed/dashboard/{token}/params/{param-key}/search/{prefix} Embedded version of chain filter search endpoint. */ +export const getPreviewEmbedDashboardParamSearch: API.OperationMethod< + GetPreviewEmbedDashboardParamSearchRequest, + GetPreviewEmbedDashboardParamSearchResponse, + GetPreviewEmbedDashboardParamSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedDashboardParamSearchRequest, + output: GetPreviewEmbedDashboardParamSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedDashboardParamValuesError = MetabaseOpError; +/** GET /api/preview_embed/dashboard/{token}/params/{param-key}/values Embedded version of chain filter values endpoint. */ +export const getPreviewEmbedDashboardParamValues: API.OperationMethod< + GetPreviewEmbedDashboardParamValuesRequest, + GetPreviewEmbedDashboardParamValuesResponse, + GetPreviewEmbedDashboardParamValuesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedDashboardParamValuesRequest, + output: GetPreviewEmbedDashboardParamValuesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedPivotCardQueryError = MetabaseOpError; +/** GET /api/preview_embed/pivot/card/{token}/query Fetch the query results for a Card you're considering embedding by passing a JWT `token`. */ +export const getPreviewEmbedPivotCardQuery: API.OperationMethod< + GetPreviewEmbedPivotCardQueryRequest, + GetPreviewEmbedPivotCardQueryResponse, + GetPreviewEmbedPivotCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedPivotCardQueryRequest, + output: GetPreviewEmbedPivotCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedPivotDashboardDashcardCardError = MetabaseOpError; +/** GET /api/preview_embed/pivot/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id} Fetch the results of running a Card belonging to a Dashboard you're considering embedding with JWT `token`. */ +export const getPreviewEmbedPivotDashboardDashcardCard: API.OperationMethod< + GetPreviewEmbedPivotDashboardDashcardCardRequest, + GetPreviewEmbedPivotDashboardDashcardCardResponse, + GetPreviewEmbedPivotDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedPivotDashboardDashcardCardRequest, + output: GetPreviewEmbedPivotDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedTilesCardError = MetabaseOpError; +/** GET /api/preview_embed/tiles/card/{token}/{zoom}/{x}/{y} Generates a single tile image for an embedded Card using the map visualization. */ +export const getPreviewEmbedTilesCard: API.OperationMethod< + GetPreviewEmbedTilesCardRequest, + GetPreviewEmbedTilesCardResponse, + GetPreviewEmbedTilesCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedTilesCardRequest, + output: GetPreviewEmbedTilesCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPreviewEmbedTilesDashboardDashcardCardError = MetabaseOpError; +/** GET /api/preview_embed/tiles/dashboard/{token}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y} Generates a single tile image for a Card on an embedded Dashboard using the map visualization. */ +export const getPreviewEmbedTilesDashboardDashcardCard: API.OperationMethod< + GetPreviewEmbedTilesDashboardDashcardCardRequest, + GetPreviewEmbedTilesDashboardDashcardCardResponse, + GetPreviewEmbedTilesDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPreviewEmbedTilesDashboardDashcardCardRequest, + output: GetPreviewEmbedTilesDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPulseError = MetabaseOpError; +/** GET /api/pulse Fetch all dashboard subscriptions. By default, returns only subscriptions for which the current user has write permissions. For admins, this is all subscriptions; for non-admins, it is only subscriptions that they created. If `dashboard_id` is specified, restricts results to subscriptions for that dashboard. If `created_or_receive` is `true`, it specifically returns all subscriptions for which the current user created *or* is a known recipient of. Note that this is a superset of the default items returned for non-admins, and a subset of the default items returned for admins. This is used to power the /account/notifications page. This may include subscriptions which the current user does not have collection permissions for, in which case some sensitive metadata (the list of cards and recipients) is stripped out. */ +export const getPulse: API.OperationMethod< + GetPulseRequest, + GetPulseResponse, + GetPulseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPulseRequest, + output: GetPulseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPulseByIdError = MetabaseOpError; +/** GET /api/pulse/{id} Fetch `Pulse` with ID. If the user is a recipient of the Pulse but does not have read permissions for its collection, we still return it but with some sensitive metadata removed. */ +export const getPulseById: API.OperationMethod< + GetPulseByIdRequest, + GetPulseByIdResponse, + GetPulseByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPulseByIdRequest, + output: GetPulseByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetPulseFormInputError = MetabaseOpError; +/** GET /api/pulse/form_input Provides relevant configuration information and user choices for creating/updating Pulses. */ +export const getPulseFormInput: API.OperationMethod< + GetPulseFormInputRequest, + GetPulseFormInputResponse, + GetPulseFormInputError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetPulseFormInputRequest, + output: GetPulseFormInputResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetRevisionError = MetabaseOpError; +/** GET /api/revision Get revisions of an object. */ +export const getRevision: API.OperationMethod< + GetRevisionRequest, + GetRevisionResponse, + GetRevisionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetRevisionRequest, + output: GetRevisionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetRevisionByIdError = MetabaseOpError; +/** GET /api/revision/{entity}/{id} Fetch `Revisions` for an object with ID. */ +export const getRevisionById: API.OperationMethod< + GetRevisionByIdRequest, + GetRevisionByIdResponse, + GetRevisionByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetRevisionByIdRequest, + output: GetRevisionByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSearchError = MetabaseOpError; +/** GET /api/search Search for items in Metabase. For the list of supported models, check [[metabase.search.config/all-models]]. `context` identifies the surface issuing the search; it selects the ranking weights and filter defaults. It defaults to `api`, the value for programmatic callers. Filters: - `archived`: set to true to search archived items only, default is false - `table_db_id`: search for tables, cards, and models of a certain DB - `models`: only search for items of specific models. If not provided, search for all models - `filter_items_in_personal_collection`: only search for items in personal collections - `created_at`: search for items created at a specific timestamp - `created_by`: search for items created by a specific user - `last_edited_at`: search for items last edited at a specific timestamp - `last_edited_by`: search for items last edited by a specific user - `search_native_query`: set to true to search the content of native queries - `vector_search_strategy`: for the semantic engine: `hnsw` (approximate index search, default), `brute-force` (exact filter-first search), or `hnsw-iterative-relaxed` / `hnsw-iterative-strict` (index-backed iterative scans with inline filters); ignored by other engines - `vector_search_ef_search`: override pgvector's `hnsw.ef_search` (1-1000) for the iterative strategies; (admin only) - `vector_search_max_scan_tuples`: override pgvector's `hnsw.max_scan_tuples` for the iterative strategies; (admin only) - `vector_search_explain`: set to true to record vector-scan instrumentation for this search (expensive); (admin only) - `verified`: set to true to search for verified items only (requires Content Management or Official Collections premium feature) - `ids`: search for items with those ids, works iff single value passed to `models` - `display_type`: search for cards/models with specific display types Note that not all item types support all filters, and the results will include only models that support the provided filters. For example: - The `created-by` filter supports dashboards, models, actions, and cards. - The `verified` filter supports models and cards. A search query that has both filters applied will only return models and cards. */ +export const getSearch: API.OperationMethod< + GetSearchRequest, + GetSearchResponse, + GetSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSearchRequest, + output: GetSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSearchDebugError = MetabaseOpError; +/** GET /api/search/debug Superuser-only. Explain why `expected_result_id` / `expected_result_type` does not appear in the results of the given search query. Accepts every `GET /api/search` parameter plus the two expected-result parameters, and returns `{:type ..., :details ...}` for the first stage that drops the item: `not-searchable`, `missing-from-index`, `not-permitted`, `filtered`, `not-matching`, or the terminal `matched` / `ranked-out`. - `for_user_id`: diagnose from another user's perspective (defaults to you). Permission and visibility checks run as that user, so a `not-permitted` result means *they* can't see the item. Not supported for `indexed-entity` (its id is compound). */ +export const getSearchDebug: API.OperationMethod< + GetSearchDebugRequest, + GetSearchDebugResponse, + GetSearchDebugError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSearchDebugRequest, + output: GetSearchDebugResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSearchWeightsError = MetabaseOpError; +/** GET /api/search/weights Return the current weights being used to rank the search results */ +export const getSearchWeights: API.OperationMethod< + GetSearchWeightsRequest, + GetSearchWeightsResponse, + GetSearchWeightsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSearchWeightsRequest, + output: GetSearchWeightsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSegmentError = MetabaseOpError; +/** GET /api/segment Fetch *all* `Segments`. */ +export const getSegment: API.OperationMethod< + GetSegmentRequest, + GetSegmentResponse, + GetSegmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSegmentRequest, + output: GetSegmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSegmentByIdError = MetabaseOpError; +/** GET /api/segment/{id} Fetch `Segment` with ID. */ +export const getSegmentById: API.OperationMethod< + GetSegmentByIdRequest, + GetSegmentByIdResponse, + GetSegmentByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSegmentByIdRequest, + output: GetSegmentByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSegmentRelatedError = MetabaseOpError; +/** GET /api/segment/{id}/related Return related entities. */ +export const getSegmentRelated: API.OperationMethod< + GetSegmentRelatedRequest, + GetSegmentRelatedResponse, + GetSegmentRelatedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSegmentRelatedRequest, + output: GetSegmentRelatedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSessionPasswordResetTokenValidError = MetabaseOpError; +/** GET /api/session/password_reset_token_valid Check if a password reset token is valid and isn't expired. */ +export const getSessionPasswordResetTokenValid: API.OperationMethod< + GetSessionPasswordResetTokenValidRequest, + GetSessionPasswordResetTokenValidResponse, + GetSessionPasswordResetTokenValidError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSessionPasswordResetTokenValidRequest, + output: GetSessionPasswordResetTokenValidResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSessionPropertiesError = MetabaseOpError; +/** GET /api/session/properties Get all properties and their values. These are the specific `Settings` that are readable by the current user, or are public if no user is logged in. */ +export const getSessionProperties: API.OperationMethod< + GetSessionPropertiesRequest, + GetSessionPropertiesResponse, + GetSessionPropertiesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSessionPropertiesRequest, + output: GetSessionPropertiesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSettingError = MetabaseOpError; +/** GET /api/setting Get all `Settings` and their values. You must be a superuser or have `setting` permission to do this. For non-superusers, a list of visible settings and values can be retrieved using the /api/session/properties endpoint. */ +export const getSetting: API.OperationMethod< + GetSettingRequest, + GetSettingResponse, + GetSettingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSettingRequest, + output: GetSettingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSettingByKeyError = MetabaseOpError; +/** GET /api/setting/{key} Fetch a single `Setting`. */ +export const getSettingByKey: API.OperationMethod< + GetSettingByKeyRequest, + GetSettingByKeyResponse, + GetSettingByKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSettingByKeyRequest, + output: GetSettingByKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSlackAppInfoError = MetabaseOpError; +/** GET /api/slack/app-info Returns the Slack app_id and team_id. Used by the frontend to construct direct links to the Slack app settings page. */ +export const getSlackAppInfo: API.OperationMethod< + GetSlackAppInfoRequest, + GetSlackAppInfoResponse, + GetSlackAppInfoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSlackAppInfoRequest, + output: GetSlackAppInfoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetSlackManifestError = MetabaseOpError; +/** GET /api/slack/manifest Returns the JSON manifest file that should be used to bootstrap new Slack apps */ +export const getSlackManifest: API.OperationMethod< + GetSlackManifestRequest, + GetSlackManifestResponse, + GetSlackManifestError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetSlackManifestRequest, + output: GetSlackManifestResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableError = MetabaseOpError; +/** GET /api/table Get all `Tables`. Optional filters: - `can-query=true` - filter to only tables the user can execute queries against - `can-write=true` - filter to only tables the user can edit metadata for */ +export const getTable: API.OperationMethod< + GetTableRequest, + GetTableResponse, + GetTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableRequest, + output: GetTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableByIdError = MetabaseOpError; +/** GET /api/table/{id} Get `Table` with ID. */ +export const getTableById: API.OperationMethod< + GetTableByIdRequest, + GetTableByIdResponse, + GetTableByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableByIdRequest, + output: GetTableByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableCardIdFksError = MetabaseOpError; +/** GET /api/table/card__:id/fks Return FK info for the 'virtual' table for a Card. This is always empty, so this endpoint serves mainly as a placeholder to avoid having to change anything on the frontend. */ +export const getTableCardIdFks: API.OperationMethod< + GetTableCardIdFksRequest, + GetTableCardIdFksResponse, + GetTableCardIdFksError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableCardIdFksRequest, + output: GetTableCardIdFksResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableCardIdQueryMetadataError = MetabaseOpError; +/** GET /api/table/card__:id/query_metadata Return metadata for the 'virtual' table for a Card. */ +export const getTableCardIdQueryMetadata: API.OperationMethod< + GetTableCardIdQueryMetadataRequest, + GetTableCardIdQueryMetadataResponse, + GetTableCardIdQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableCardIdQueryMetadataRequest, + output: GetTableCardIdQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableDataError = MetabaseOpError; +/** GET /api/table/{table-id}/data Get the data for the given table */ +export const getTableData: API.OperationMethod< + GetTableDataRequest, + GetTableDataResponse, + GetTableDataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableDataRequest, + output: GetTableDataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableFksError = MetabaseOpError; +/** GET /api/table/{id}/fks Get all foreign keys whose destination is a `Field` that belongs to this `Table`. */ +export const getTableFks: API.OperationMethod< + GetTableFksRequest, + GetTableFksResponse, + GetTableFksError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableFksRequest, + output: GetTableFksResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableQueryMetadataError = MetabaseOpError; +/** GET /api/table/{id}/query_metadata Get metadata about a `Table` useful for running queries. Returns DB, fields, field FKs, and field values. Passing `include_hidden_fields=true` will include any hidden `Fields` in the response. Defaults to `false` Passing `include_sensitive_fields=true` will include any sensitive `Fields` in the response. Defaults to `false`. Passing `include_editable_data_model=true` will check that the current user has write permissions for the table's data model, while `false` checks that they have data access perms for the table. Defaults to `false`. These options are provided for use in the Admin Edit Metadata page. */ +export const getTableQueryMetadata: API.OperationMethod< + GetTableQueryMetadataRequest, + GetTableQueryMetadataResponse, + GetTableQueryMetadataError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableQueryMetadataRequest, + output: GetTableQueryMetadataResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTableRelatedError = MetabaseOpError; +/** GET /api/table/{id}/related Return related entities. */ +export const getTableRelated: API.OperationMethod< + GetTableRelatedRequest, + GetTableRelatedResponse, + GetTableRelatedError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTableRelatedRequest, + output: GetTableRelatedResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskError = MetabaseOpError; +/** GET /api/task Fetch a list of recent tasks stored as Task History */ +export const getTask: API.OperationMethod< + GetTaskRequest, + GetTaskResponse, + GetTaskError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskRequest, + output: GetTaskResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskByIdError = MetabaseOpError; +/** GET /api/task/{id} Get `TaskHistory` entry with ID. */ +export const getTaskById: API.OperationMethod< + GetTaskByIdRequest, + GetTaskByIdResponse, + GetTaskByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskByIdRequest, + output: GetTaskByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskInfoError = MetabaseOpError; +/** GET /api/task/info Return raw data about all scheduled tasks (i.e., Quartz Jobs and Triggers). */ +export const getTaskInfo: API.OperationMethod< + GetTaskInfoRequest, + GetTaskInfoResponse, + GetTaskInfoError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskInfoRequest, + output: GetTaskInfoResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskRunError = MetabaseOpError; +/** GET /api/task/runs/{id} Get a single task run with all its child tasks. */ +export const getTaskRun: API.OperationMethod< + GetTaskRunRequest, + GetTaskRunResponse, + GetTaskRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskRunRequest, + output: GetTaskRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskRunsError = MetabaseOpError; +/** GET /api/task/runs List task runs with optional filters. Returns runs with hydrated entity names and task counts. */ +export const getTaskRuns: API.OperationMethod< + GetTaskRunsRequest, + GetTaskRunsResponse, + GetTaskRunsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskRunsRequest, + output: GetTaskRunsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskRunsEntitiesError = MetabaseOpError; +/** GET /api/task/runs/entities Get distinct entities that have task runs for a given run type. Used for populating entity filter picker. */ +export const getTaskRunsEntities: API.OperationMethod< + GetTaskRunsEntitiesRequest, + GetTaskRunsEntitiesResponse, + GetTaskRunsEntitiesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskRunsEntitiesRequest, + output: GetTaskRunsEntitiesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTaskUniqueTasksError = MetabaseOpError; +/** GET /api/task/unique-tasks Returns possibly empty vector of unique task names in alphabetical order. It is expected that number of unique tasks is small, hence no need for pagination. If that changes this endpoint and function that powers it should reflect that. */ +export const getTaskUniqueTasks: API.OperationMethod< + GetTaskUniqueTasksRequest, + GetTaskUniqueTasksResponse, + GetTaskUniqueTasksError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTaskUniqueTasksRequest, + output: GetTaskUniqueTasksResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTileError = MetabaseOpError; +/** GET /api/tiles/{card-id}/{zoom}/{x}/{y} Generates a single tile image for a saved Card. */ +export const getTile: API.OperationMethod< + GetTileRequest, + GetTileResponse, + GetTileError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTileRequest, + output: GetTileResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTileByYError = MetabaseOpError; +/** GET /api/tiles/{zoom}/{x}/{y} Generates a single tile image for an ad-hoc query. */ +export const getTileByY: API.OperationMethod< + GetTileByYRequest, + GetTileByYResponse, + GetTileByYError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTileByYRequest, + output: GetTileByYResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTileDashcardCardError = MetabaseOpError; +/** GET /api/tiles/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y} Generates a single tile image for a dashcard. */ +export const getTileDashcardCard: API.OperationMethod< + GetTileDashcardCardRequest, + GetTileDashcardCardResponse, + GetTileDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTileDashcardCardRequest, + output: GetTileDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTilesCardError = MetabaseOpError; +/** GET /api/public/tiles/card/{uuid}/{zoom}/{x}/{y} Generates a single tile image for a publicly-accessible Card using the map visualization. Does not require auth credentials. Public sharing must be enabled. */ +export const getTilesCard: API.OperationMethod< + GetTilesCardRequest, + GetTilesCardResponse, + GetTilesCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTilesCardRequest, + output: GetTilesCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTilesDashboardDashcardCardError = MetabaseOpError; +/** GET /api/public/tiles/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{zoom}/{x}/{y} Generates a single tile image for a Card using the map visualization in a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled. */ +export const getTilesDashboardDashcardCard: API.OperationMethod< + GetTilesDashboardDashcardCardRequest, + GetTilesDashboardDashcardCardResponse, + GetTilesDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTilesDashboardDashcardCardRequest, + output: GetTilesDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTimelineError = MetabaseOpError; +/** GET /api/timeline Fetch a list of `Timeline`s. Can include `archived=true` to return archived timelines. */ +export const getTimeline: API.OperationMethod< + GetTimelineRequest, + GetTimelineResponse, + GetTimelineError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTimelineRequest, + output: GetTimelineResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTimelineByIdError = MetabaseOpError; +/** GET /api/timeline/{id} Fetch the `Timeline` with `id`. Include `include=events` to unarchived events included on the timeline. Add `archived=true` to return all events on the timeline, both archived and unarchived. */ +export const getTimelineById: API.OperationMethod< + GetTimelineByIdRequest, + GetTimelineByIdResponse, + GetTimelineByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTimelineByIdRequest, + output: GetTimelineByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTimelineCollectionError = MetabaseOpError; +/** GET /api/timeline/collection/{id} Fetch a specific Collection's timelines. */ +export const getTimelineCollection: API.OperationMethod< + GetTimelineCollectionRequest, + GetTimelineCollectionResponse, + GetTimelineCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTimelineCollectionRequest, + output: GetTimelineCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTimelineCollectionRootError = MetabaseOpError; +/** GET /api/timeline/collection/root Fetch the root Collection's timelines. */ +export const getTimelineCollectionRoot: API.OperationMethod< + GetTimelineCollectionRootRequest, + GetTimelineCollectionRootResponse, + GetTimelineCollectionRootError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTimelineCollectionRootRequest, + output: GetTimelineCollectionRootResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTimelineEventError = MetabaseOpError; +/** GET /api/timeline-event/{id} Fetch the [[TimelineEvent]] with `id`. */ +export const getTimelineEvent: API.OperationMethod< + GetTimelineEventRequest, + GetTimelineEventResponse, + GetTimelineEventError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTimelineEventRequest, + output: GetTimelineEventResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformError = MetabaseOpError; +/** GET /api/transform Get a list of transforms. */ +export const getTransform: API.OperationMethod< + GetTransformRequest, + GetTransformResponse, + GetTransformError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformRequest, + output: GetTransformResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformByIdError = MetabaseOpError; +/** GET /api/transform/{id} Get a specific transform. */ +export const getTransformById: API.OperationMethod< + GetTransformByIdRequest, + GetTransformByIdResponse, + GetTransformByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformByIdRequest, + output: GetTransformByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformDependenciesError = MetabaseOpError; +/** GET /api/transform/{id}/dependencies Get the dependencies of a specific transform. */ +export const getTransformDependencies: API.OperationMethod< + GetTransformDependenciesRequest, + GetTransformDependenciesResponse, + GetTransformDependenciesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformDependenciesRequest, + output: GetTransformDependenciesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformJobError = MetabaseOpError; +/** GET /api/transform-job Get all transform jobs. */ +export const getTransformJob: API.OperationMethod< + GetTransformJobRequest, + GetTransformJobResponse, + GetTransformJobError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformJobRequest, + output: GetTransformJobResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformJobByJobIdError = MetabaseOpError; +/** GET /api/transform-job/{job-id} Get a transform job by ID. */ +export const getTransformJobByJobId: API.OperationMethod< + GetTransformJobByJobIdRequest, + GetTransformJobByJobIdResponse, + GetTransformJobByJobIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformJobByJobIdRequest, + output: GetTransformJobByJobIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformJobRunsError = MetabaseOpError; +/** GET /api/transform-job/{job-id}/runs Get paginated run history for a transform job. */ +export const getTransformJobRuns: API.OperationMethod< + GetTransformJobRunsRequest, + GetTransformJobRunsResponse, + GetTransformJobRunsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformJobRunsRequest, + output: GetTransformJobRunsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformJobRunTransformRunsError = MetabaseOpError; +/** GET /api/transform-job/{job-id}/runs/{run-id}/transform-runs Get the transform runs that made up a specific job run. */ +export const getTransformJobRunTransformRuns: API.OperationMethod< + GetTransformJobRunTransformRunsRequest, + GetTransformJobRunTransformRunsResponse, + GetTransformJobRunTransformRunsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformJobRunTransformRunsRequest, + output: GetTransformJobRunTransformRunsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformJobTransformsError = MetabaseOpError; +/** GET /api/transform-job/{job-id}/transforms Get the transforms of job specified by the job's ID. */ +export const getTransformJobTransforms: API.OperationMethod< + GetTransformJobTransformsRequest, + GetTransformJobTransformsResponse, + GetTransformJobTransformsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformJobTransformsRequest, + output: GetTransformJobTransformsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformRunError = MetabaseOpError; +/** GET /api/transform/run Get transform runs based on a set of filter params. */ +export const getTransformRun: API.OperationMethod< + GetTransformRunRequest, + GetTransformRunResponse, + GetTransformRunError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformRunRequest, + output: GetTransformRunResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformRunByRunIdError = MetabaseOpError; +/** GET /api/transform/run/{run-id} Get a transform run by ID. */ +export const getTransformRunByRunId: API.OperationMethod< + GetTransformRunByRunIdRequest, + GetTransformRunByRunIdResponse, + GetTransformRunByRunIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformRunByRunIdRequest, + output: GetTransformRunByRunIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetTransformTagError = MetabaseOpError; +/** GET /api/transform-tag Get a list of all transform tags. */ +export const getTransformTag: API.OperationMethod< + GetTransformTagRequest, + GetTransformTagResponse, + GetTransformTagError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetTransformTagRequest, + output: GetTransformTagResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserError = MetabaseOpError; +/** GET /api/user Fetch a list of `Users` for admins or group managers. By default returns only active users for admins/data-analysts and only active users within groups that the group manager is managing for group managers. - If `status` is `deactivated`, include deactivated users only. - If `status` is `all`, include all users (active and inactive). - Also supports `include_deactivated`, which if true, is equivalent to `status=all`; If is false, is equivalent to `status=active`. `status` and `include_deactivated` requires superuser permissions. - `include_deactivated` is a legacy alias for `status` and will be removed in a future release, users are advised to use `status` for better support and flexibility. If both params are passed, `status` takes precedence. - if a `tenant_id` is passed, only users with that tenant_id will be returned. For users with segmented permissions, return only themselves. Takes `limit`, `offset` for pagination. Takes `query` for filtering on first name, last name, email. Also takes `group_id`, which filters on group id. If the user is a sandboxed user, only return themselves regardless of the query parameters. */ +export const getUser: API.OperationMethod< + GetUserRequest, + GetUserResponse, + GetUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserRequest, + output: GetUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserByIdError = MetabaseOpError; +/** GET /api/user/{id} Fetch a `User`. You must be fetching yourself *or* be a superuser *or* a Group Manager. */ +export const getUserById: API.OperationMethod< + GetUserByIdRequest, + GetUserByIdResponse, + GetUserByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserByIdRequest, + output: GetUserByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserCurrentError = MetabaseOpError; +/** GET /api/user/current Fetch the current `User`. */ +export const getUserCurrent: API.OperationMethod< + GetUserCurrentRequest, + GetUserCurrentResponse, + GetUserCurrentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserCurrentRequest, + output: GetUserCurrentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserKeyValueNamespaceError = MetabaseOpError; +/** GET /api/user-key-value/namespace/{namespace} Returns all KV pairs in a given namespace for the current user */ +export const getUserKeyValueNamespace: API.OperationMethod< + GetUserKeyValueNamespaceRequest, + GetUserKeyValueNamespaceResponse, + GetUserKeyValueNamespaceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserKeyValueNamespaceRequest, + output: GetUserKeyValueNamespaceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserKeyValueNamespaceKeyError = MetabaseOpError; +/** GET /api/user-key-value/namespace/{namespace}/key/{key} Get a value for the user */ +export const getUserKeyValueNamespaceKey: API.OperationMethod< + GetUserKeyValueNamespaceKeyRequest, + GetUserKeyValueNamespaceKeyResponse, + GetUserKeyValueNamespaceKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserKeyValueNamespaceKeyRequest, + output: GetUserKeyValueNamespaceKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUserRecipientsError = MetabaseOpError; +/** GET /api/user/recipients Fetch a list of `Users`. Returns only active users. Meant for non-admins unlike GET /api/user. - If user-visibility is :all or the user is an admin, include all users. - If user-visibility is :group, include only users in the same group (excluding the all users group). - If user-visibility is :none or the user is sandboxed, include only themselves. */ +export const getUserRecipients: API.OperationMethod< + GetUserRecipientsRequest, + GetUserRecipientsResponse, + GetUserRecipientsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUserRecipientsRequest, + output: GetUserRecipientsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type GetUtilRandomTokenError = MetabaseOpError; +/** GET /api/util/random_token Return a cryptographically secure random 32-byte token, encoded as a hexadecimal string. Intended for use when creating a value for `embedding-secret-key`. */ +export const getUtilRandomToken: API.OperationMethod< + GetUtilRandomTokenRequest, + GetUtilRandomTokenResponse, + GetUtilRandomTokenError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: GetUtilRandomTokenRequest, + output: GetUtilRandomTokenResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PostApiEeReplacementReplaceModelWithTransformError = + MetabaseOpError; +/** POST /api/ee/replacement/replace-model-with-transform Create a transform from a model, execute it, and replace all usages of the model with the output table. Un-persists the model and converts it to a saved question. Returns 202 with a run_id for polling. If there is an error during the transform execution, no replacement will be performed and the model will remain unchanged. If there is an error during the source swap, the transform and the output table will be retained, and the model will remain unchanged. We cannot delete the transform or the output table because they can be used by other queries at this point. */ +export const postApiEeReplacementReplaceModelWithTransform: API.OperationMethod< + PostApiEeReplacementReplaceModelWithTransformRequest, + PostApiEeReplacementReplaceModelWithTransformResponse, + PostApiEeReplacementReplaceModelWithTransformError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PostApiEeReplacementReplaceModelWithTransformRequest, + output: PostApiEeReplacementReplaceModelWithTransformResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutActionError = MetabaseOpError; +/** PUT /api/action/{id} Update an Action. */ +export const putAction: API.OperationMethod< + PutActionRequest, + PutActionResponse, + PutActionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutActionRequest, + output: PutActionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutAgentDashboardError = MetabaseOpError; +/** PUT /api/agent/v1/dashboard/{id} Update a dashboard. Patch semantics - only fields you pass are changed. Metadata: `name`, `description`, `collection_id`, `archived`. Dashcard mutations are submitted under `dashcards` as a list of `{action: add|remove|move, ...}` entries applied in order. `add` requires `card_id`; `remove` and `move` require `dashcard_id`. */ +export const putAgentDashboard: API.OperationMethod< + PutAgentDashboardRequest, + PutAgentDashboardResponse, + PutAgentDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutAgentDashboardRequest, + output: PutAgentDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutAgentMetricError = MetabaseOpError; +/** PUT /api/agent/v1/metric/{id} Update a saved metric. Patch semantics - only fields that you pass are changed. Set `collection_id` to move the metric to a different collection. Set `archived: true` to archive. Pass `query` (a query_handle from construct_query, or a base64 MBQL string) to replace the underlying query; the replacement must still be a valid metric (exactly one aggregation, at most one date/datetime grouping). The target card must be a metric — use `update_question` for questions. */ +export const putAgentMetric: API.OperationMethod< + PutAgentMetricRequest, + PutAgentMetricResponse, + PutAgentMetricError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutAgentMetricRequest, + output: PutAgentMetricResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutAgentQuestionError = MetabaseOpError; +/** PUT /api/agent/v1/question/{id} Update a saved question (card). Patch semantics - only fields that you pass are changed. Set `collection_id` to move the card to a different collection. Set `archived: true` to archive. Pass `query` (a query_handle from construct_query or construct_native_query, or a base64 query string) to replace the underlying query. Replacing it with a native (raw SQL) query requires native-query permission on the target database. */ +export const putAgentQuestion: API.OperationMethod< + PutAgentQuestionRequest, + PutAgentQuestionResponse, + PutAgentQuestionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutAgentQuestionRequest, + output: PutAgentQuestionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutBookmarkOrderingError = MetabaseOpError; +/** PUT /api/bookmark/ordering Sets the order of bookmarks for user. */ +export const putBookmarkOrdering: API.OperationMethod< + PutBookmarkOrderingRequest, + PutBookmarkOrderingResponse, + PutBookmarkOrderingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutBookmarkOrderingRequest, + output: PutBookmarkOrderingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCacheError = MetabaseOpError; +/** PUT /api/cache Store cache configuration. */ +export const putCache: API.OperationMethod< + PutCacheRequest, + PutCacheResponse, + PutCacheError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCacheRequest, + output: PutCacheResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCardError = MetabaseOpError; +/** PUT /api/card/{id} Update a `Card`. */ +export const putCard: API.OperationMethod< + PutCardRequest, + PutCardResponse, + PutCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCardRequest, + output: PutCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutChannelError = MetabaseOpError; +/** PUT /api/channel/{id} Update a channel */ +export const putChannel: API.OperationMethod< + PutChannelRequest, + PutChannelResponse, + PutChannelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutChannelRequest, + output: PutChannelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCloudMigrationCancelError = MetabaseOpError; +/** PUT /api/cloud-migration/cancel Cancel any ongoing cloud migrations, if any. */ +export const putCloudMigrationCancel: API.OperationMethod< + PutCloudMigrationCancelRequest, + PutCloudMigrationCancelResponse, + PutCloudMigrationCancelError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCloudMigrationCancelRequest, + output: PutCloudMigrationCancelResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCollectionError = MetabaseOpError; +/** PUT /api/collection/{id} Modify an existing Collection, including archiving or unarchiving it, or moving it. */ +export const putCollection: API.OperationMethod< + PutCollectionRequest, + PutCollectionResponse, + PutCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCollectionRequest, + output: PutCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCollectionGraphError = MetabaseOpError; +/** PUT /api/collection/graph Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that are present in the request, and leave the rest unchanged. If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted as-is, and has the potential to clobber other writes that happened since the last read. If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions graph. */ +export const putCollectionGraph: API.OperationMethod< + PutCollectionGraphRequest, + PutCollectionGraphResponse, + PutCollectionGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCollectionGraphRequest, + output: PutCollectionGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutCommentError = MetabaseOpError; +/** PUT /api/comment/{comment-id} Update a comment */ +export const putComment: API.OperationMethod< + PutCommentRequest, + PutCommentResponse, + PutCommentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutCommentRequest, + output: PutCommentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutDashboardError = MetabaseOpError; +/** PUT /api/dashboard/{id} Update a Dashboard, and optionally the `dashcards` and `tabs` of a Dashboard. The request body should be a JSON object with the same structure as the response from `GET /api/dashboard/:id`. */ +export const putDashboard: API.OperationMethod< + PutDashboardRequest, + PutDashboardResponse, + PutDashboardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutDashboardRequest, + output: PutDashboardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutDashboardCardsError = MetabaseOpError; +/** PUT /api/dashboard/{id}/cards (DEPRECATED -- Use the `PUT /api/dashboard/:id` endpoint instead.) Update `Cards` and `Tabs` on a Dashboard. Request body should have the form: {:cards [{:id ... ; DashboardCard ID :size_x ... :size_y ... :row ... :col ... :parameter_mappings ... :series [{:id 123 ...}]} ...] :tabs [{:id ... ; DashboardTab ID :name ...}]} */ +export const putDashboardCards: API.OperationMethod< + PutDashboardCardsRequest, + PutDashboardCardsResponse, + PutDashboardCardsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutDashboardCardsRequest, + output: PutDashboardCardsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutDatabaseError = MetabaseOpError; +/** PUT /api/database/{id} Update a `Database`. */ +export const putDatabase: API.OperationMethod< + PutDatabaseRequest, + PutDatabaseResponse, + PutDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutDatabaseRequest, + output: PutDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutDocumentError = MetabaseOpError; +/** PUT /api/document/{document-id} Updates an existing `Document`. */ +export const putDocument: API.OperationMethod< + PutDocumentRequest, + PutDocumentResponse, + PutDocumentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutDocumentRequest, + output: PutDocumentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeAdvancedPermissionsApplicationGraphError = MetabaseOpError; +/** PUT /api/ee/advanced-permissions/application/graph Do a batch update of Application Permissions by passing a modified graph. */ +export const putEeAdvancedPermissionsApplicationGraph: API.OperationMethod< + PutEeAdvancedPermissionsApplicationGraphRequest, + PutEeAdvancedPermissionsApplicationGraphResponse, + PutEeAdvancedPermissionsApplicationGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeAdvancedPermissionsApplicationGraphRequest, + output: PutEeAdvancedPermissionsApplicationGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeAiControlsPermissionsError = MetabaseOpError; +/** PUT /api/ee/ai-controls/permissions Update metabot permissions for all groups. Upserts each permission entry and returns the full permissions list with defaults filled in. */ +export const putEeAiControlsPermissions: API.OperationMethod< + PutEeAiControlsPermissionsRequest, + PutEeAiControlsPermissionsResponse, + PutEeAiControlsPermissionsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeAiControlsPermissionsRequest, + output: PutEeAiControlsPermissionsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeAiControlsUsageGroupError = MetabaseOpError; +/** PUT /api/ee/ai-controls/usage/group/{group-id} Set or update the metabot usage limit for a specific group. Pass `max_usage: null` to remove the limit. */ +export const putEeAiControlsUsageGroup: API.OperationMethod< + PutEeAiControlsUsageGroupRequest, + PutEeAiControlsUsageGroupResponse, + PutEeAiControlsUsageGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeAiControlsUsageGroupRequest, + output: PutEeAiControlsUsageGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeAiControlsUsageInstanceError = MetabaseOpError; +/** PUT /api/ee/ai-controls/usage/instance Set or update the instance-wide metabot usage limit. Pass `max_usage: null` to remove the limit (unlimited). */ +export const putEeAiControlsUsageInstance: API.OperationMethod< + PutEeAiControlsUsageInstanceRequest, + PutEeAiControlsUsageInstanceResponse, + PutEeAiControlsUsageInstanceError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeAiControlsUsageInstanceRequest, + output: PutEeAiControlsUsageInstanceResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeAiControlsUsageTenantError = MetabaseOpError; +/** PUT /api/ee/ai-controls/usage/tenant/{tenant-id} Set or update the metabot usage limit for a specific tenant. Pass `max_usage: null` to remove the limit. */ +export const putEeAiControlsUsageTenant: API.OperationMethod< + PutEeAiControlsUsageTenantRequest, + PutEeAiControlsUsageTenantResponse, + PutEeAiControlsUsageTenantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeAiControlsUsageTenantRequest, + output: PutEeAiControlsUsageTenantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeCustomVizPluginError = MetabaseOpError; +/** PUT /api/ee/custom-viz-plugin/{id} Update a custom visualization plugin. Currently only `enabled` may be toggled. */ +export const putEeCustomVizPlugin: API.OperationMethod< + PutEeCustomVizPluginRequest, + PutEeCustomVizPluginResponse, + PutEeCustomVizPluginError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeCustomVizPluginRequest, + output: PutEeCustomVizPluginResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeCustomVizPluginBundleError = MetabaseOpError; +/** PUT /api/ee/custom-viz-plugin/{id}/bundle Replace the bundle for an existing plugin. Accepts a multipart tar.gz upload in the same format as the `POST /` endpoint. The manifest's `name` field must match the plugin's existing `identifier`. */ +export const putEeCustomVizPluginBundle: API.OperationMethod< + PutEeCustomVizPluginBundleRequest, + PutEeCustomVizPluginBundleResponse, + PutEeCustomVizPluginBundleError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeCustomVizPluginBundleRequest, + output: PutEeCustomVizPluginBundleResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeCustomVizPluginDevUrlError = MetabaseOpError; +/** PUT /api/ee/custom-viz-plugin/{id}/dev-url Set or clear the dev base URL for a plugin (e.g. `http://localhost:5174`). The bundle is fetched from `{base}/index.js` and assets from `{base}/assets/{name}`. Persisted to the database so it survives server restarts. Requires custom viz plugin dev mode to be enabled. */ +export const putEeCustomVizPluginDevUrl: API.OperationMethod< + PutEeCustomVizPluginDevUrlRequest, + PutEeCustomVizPluginDevUrlResponse, + PutEeCustomVizPluginDevUrlError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeCustomVizPluginDevUrlRequest, + output: PutEeCustomVizPluginDevUrlResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeDatabaseRoutingRouterDatabaseError = MetabaseOpError; +/** PUT /api/ee/database-routing/router-database/{id} Updates an existing Database with the `user_attribute` to route on. Will either: - turn an existing Database into a Router database - change the `user_attribute` used to route for an existing Router database, or - turn a Router database into a regular Database depending on the value of `user_attribute` */ +export const putEeDatabaseRoutingRouterDatabase: API.OperationMethod< + PutEeDatabaseRoutingRouterDatabaseRequest, + PutEeDatabaseRoutingRouterDatabaseResponse, + PutEeDatabaseRoutingRouterDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeDatabaseRoutingRouterDatabaseRequest, + output: PutEeDatabaseRoutingRouterDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeEmailOverrideError = MetabaseOpError; +/** PUT /api/ee/email/override Update multiple cloud email Settings. You must be a superuser or have `setting` permission to do this. Calling this automatically sets `cloud-smtp-enabled` to true if the settings are valid. */ +export const putEeEmailOverride: API.OperationMethod< + PutEeEmailOverrideRequest, + PutEeEmailOverrideResponse, + PutEeEmailOverrideError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeEmailOverrideRequest, + output: PutEeEmailOverrideResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeRemoteSyncSettingsError = MetabaseOpError; +/** PUT /api/ee/remote-sync/settings Update Remote Sync related settings. You must be a superuser to do this. */ +export const putEeRemoteSyncSettings: API.OperationMethod< + PutEeRemoteSyncSettingsRequest, + PutEeRemoteSyncSettingsResponse, + PutEeRemoteSyncSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeRemoteSyncSettingsRequest, + output: PutEeRemoteSyncSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeScimGroupError = MetabaseOpError; +/** PUT /api/ee/scim/v2/Groups/{id} Update a group. */ +export const putEeScimGroup: API.OperationMethod< + PutEeScimGroupRequest, + PutEeScimGroupResponse, + PutEeScimGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeScimGroupRequest, + output: PutEeScimGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeScimUserError = MetabaseOpError; +/** PUT /api/ee/scim/v2/Users/{id} Update a user. */ +export const putEeScimUser: API.OperationMethod< + PutEeScimUserRequest, + PutEeScimUserResponse, + PutEeScimUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeScimUserRequest, + output: PutEeScimUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeSupportAccessGrantRevokeError = MetabaseOpError; +/** PUT /api/ee/support-access-grant/{id}/revoke Revoke an existing support access grant. Requires superuser permissions. Any admin can revoke any grant. */ +export const putEeSupportAccessGrantRevoke: API.OperationMethod< + PutEeSupportAccessGrantRevokeRequest, + PutEeSupportAccessGrantRevokeResponse, + PutEeSupportAccessGrantRevokeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeSupportAccessGrantRevokeRequest, + output: PutEeSupportAccessGrantRevokeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeTenantError = MetabaseOpError; +/** PUT /api/ee/tenant/{id} Update a tenant, can set name, attributes, or whether this tenant is active. */ +export const putEeTenant: API.OperationMethod< + PutEeTenantRequest, + PutEeTenantResponse, + PutEeTenantError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeTenantRequest, + output: PutEeTenantResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEeTransformsPythonLibraryError = MetabaseOpError; +/** PUT /api/ee/transforms-python/library/{path} Update the Python library source code for user modules. */ +export const putEeTransformsPythonLibrary: API.OperationMethod< + PutEeTransformsPythonLibraryRequest, + PutEeTransformsPythonLibraryResponse, + PutEeTransformsPythonLibraryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEeTransformsPythonLibraryRequest, + output: PutEeTransformsPythonLibraryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEmailError = MetabaseOpError; +/** PUT /api/email Update multiple email Settings. You must be a superuser or have `setting` permission to do this. */ +export const putEmail: API.OperationMethod< + PutEmailRequest, + PutEmailResponse, + PutEmailError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEmailRequest, + output: PutEmailResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutEmbedThemeError = MetabaseOpError; +/** PUT /api/embed-theme/{id} Update an embedding theme. */ +export const putEmbedTheme: API.OperationMethod< + PutEmbedThemeRequest, + PutEmbedThemeResponse, + PutEmbedThemeError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutEmbedThemeRequest, + output: PutEmbedThemeResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutFieldError = MetabaseOpError; +/** PUT /api/field/{id} Update `Field` with ID. */ +export const putField: API.OperationMethod< + PutFieldRequest, + PutFieldResponse, + PutFieldError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutFieldRequest, + output: PutFieldResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutGlossaryError = MetabaseOpError; +/** PUT /api/glossary/{id} Update an existing glossary entry. */ +export const putGlossary: API.OperationMethod< + PutGlossaryRequest, + PutGlossaryResponse, + PutGlossaryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutGlossaryRequest, + output: PutGlossaryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutGoogleSettingsError = MetabaseOpError; +/** PUT /api/google/settings Update Google Sign-In related settings. You must be a superuser to do this. */ +export const putGoogleSettings: API.OperationMethod< + PutGoogleSettingsRequest, + PutGoogleSettingsResponse, + PutGoogleSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutGoogleSettingsRequest, + output: PutGoogleSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutKeyError = MetabaseOpError; +/** PUT /api/api-key/{id} Update an API key by changing its group and/or its name */ +export const putKey: API.OperationMethod< + PutKeyRequest, + PutKeyResponse, + PutKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutKeyRequest, + output: PutKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutKeyRegenerateError = MetabaseOpError; +/** PUT /api/api-key/{id}/regenerate Regenerate an API Key */ +export const putKeyRegenerate: API.OperationMethod< + PutKeyRegenerateRequest, + PutKeyRegenerateResponse, + PutKeyRegenerateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutKeyRegenerateRequest, + output: PutKeyRegenerateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutLdapSettingsError = MetabaseOpError; +/** PUT /api/ldap/settings Update LDAP related settings. You must be a superuser to do this. */ +export const putLdapSettings: API.OperationMethod< + PutLdapSettingsRequest, + PutLdapSettingsResponse, + PutLdapSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutLdapSettingsRequest, + output: PutLdapSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMeasureError = MetabaseOpError; +/** PUT /api/measure/{id} Update a `Measure` with ID. */ +export const putMeasure: API.OperationMethod< + PutMeasureRequest, + PutMeasureResponse, + PutMeasureError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMeasureRequest, + output: PutMeasureResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMetabotMetabotError = MetabaseOpError; +/** PUT /api/metabot/metabot/{id} Update a metabot instance */ +export const putMetabotMetabot: API.OperationMethod< + PutMetabotMetabotRequest, + PutMetabotMetabotResponse, + PutMetabotMetabotError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMetabotMetabotRequest, + output: PutMetabotMetabotResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMetabotSettingsError = MetabaseOpError; +/** PUT /api/metabot/settings Update the Metabot provider credentials and/or model setting and return the refreshed settings payload. */ +export const putMetabotSettings: API.OperationMethod< + PutMetabotSettingsRequest, + PutMetabotSettingsResponse, + PutMetabotSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMetabotSettingsRequest, + output: PutMetabotSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMetabotSlackSettingsError = MetabaseOpError; +/** PUT /api/metabot/slack/settings Update Metabot Slack settings atomically. All credential fields must be provided together. Setting values requires the metabot-v3 feature, but clearing values is always allowed. slack-connect-enabled is automatically set to true when credentials are provided, nil when cleared. */ +export const putMetabotSlackSettings: API.OperationMethod< + PutMetabotSlackSettingsRequest, + PutMetabotSlackSettingsResponse, + PutMetabotSlackSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMetabotSlackSettingsRequest, + output: PutMetabotSlackSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMtGtapError = MetabaseOpError; +/** PUT /api/mt/gtap/{id} Update a GTAP entry. The only things you're allowed to update for a GTAP are the Card being used (`card_id`) or the parameter mappings; changing `table_id` or `group_id` would effectively be deleting this entry and creating a new one. If that's what you want to do, do so explicitly with appropriate calls to the `DELETE` and `POST` endpoints. */ +export const putMtGtap: API.OperationMethod< + PutMtGtapRequest, + PutMtGtapResponse, + PutMtGtapError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMtGtapRequest, + output: PutMtGtapResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutMtUserAttributesError = MetabaseOpError; +/** PUT /api/mt/user/{id}/attributes Update the `login_attributes` for a User. */ +export const putMtUserAttributes: API.OperationMethod< + PutMtUserAttributesRequest, + PutMtUserAttributesResponse, + PutMtUserAttributesError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutMtUserAttributesRequest, + output: PutMtUserAttributesResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutNativeQuerySnippetError = MetabaseOpError; +/** PUT /api/native-query-snippet/{id} Update an existing `NativeQuerySnippet`. */ +export const putNativeQuerySnippet: API.OperationMethod< + PutNativeQuerySnippetRequest, + PutNativeQuerySnippetResponse, + PutNativeQuerySnippetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutNativeQuerySnippetRequest, + output: PutNativeQuerySnippetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutNotificationError = MetabaseOpError; +/** PUT /api/notification/{id} Update a notification, can also update its subscriptions, handlers. Return the updated notification. `creator_id` (owner) can be reassigned here only by superusers (e.g. the admin 'Edit alert' modal's owner picker). `mi/can-update?` rejects a non-superuser reassignment attempt with 403; the model's `before-update` hook is the backstop. Echoing back the unchanged value is fine. */ +export const putNotification: API.OperationMethod< + PutNotificationRequest, + PutNotificationResponse, + PutNotificationError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutNotificationRequest, + output: PutNotificationResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutOsiAiContextError = MetabaseOpError; +/** PUT /api/osi/ai-context/{entity-type}/{entity-local-id} Create or replace (upsert) the ai_context for an entity, addressed by its logical key. One row per entity: an existing row is updated in place rather than duplicated, and the compound primary key plus the upsert keep two concurrent writers from racing in a duplicate row. */ +export const putOsiAiContext: API.OperationMethod< + PutOsiAiContextRequest, + PutOsiAiContextResponse, + PutOsiAiContextError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutOsiAiContextRequest, + output: PutOsiAiContextResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutPermissionsGraphError = MetabaseOpError; +/** PUT /api/permissions/graph Do a batch update of Permissions by passing in a modified graph. This should return the same graph, in the same format, that you got from `GET /api/permissions/graph`, with any changes made in the wherever necessary. This modified graph must correspond to the `PermissionsGraph` schema. If successful, this endpoint returns the updated permissions graph; use this as a base for any further modifications. Revisions to the permissions graph are tracked. If you fetch the permissions graph and some other third-party modifies it before you can submit you revisions, the endpoint will instead make no changes and return a 409 (Conflict) response. In this case, you should fetch the updated graph and make desired changes to that. The optional `sandboxes` key contains a list of sandboxes that should be created or modified in conjunction with this permissions graph update. Since data sandboxing is an Enterprise Edition-only feature, a 402 (Payment Required) response will be returned if this key is present and the server is not running the Enterprise Edition, and/or the `:sandboxes` feature flag is not present. If the skip-graph query param is truthy, then the graph will not be returned. */ +export const putPermissionsGraph: API.OperationMethod< + PutPermissionsGraphRequest, + PutPermissionsGraphResponse, + PutPermissionsGraphError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutPermissionsGraphRequest, + output: PutPermissionsGraphResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutPermissionsGroupError = MetabaseOpError; +/** PUT /api/permissions/group/{group-id} Update the name of a `PermissionsGroup`. */ +export const putPermissionsGroup: API.OperationMethod< + PutPermissionsGroupRequest, + PutPermissionsGroupResponse, + PutPermissionsGroupError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutPermissionsGroupRequest, + output: PutPermissionsGroupResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutPermissionsMembershipError = MetabaseOpError; +/** PUT /api/permissions/membership/{id} Update a Permission Group membership. Returns the updated record. */ +export const putPermissionsMembership: API.OperationMethod< + PutPermissionsMembershipRequest, + PutPermissionsMembershipResponse, + PutPermissionsMembershipError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutPermissionsMembershipRequest, + output: PutPermissionsMembershipResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutPermissionsMembershipClearError = MetabaseOpError; +/** PUT /api/permissions/membership/{group-id}/clear Remove all members from a `PermissionsGroup`. Returns a 400 (Bad Request) if the group ID is for the admin group. */ +export const putPermissionsMembershipClear: API.OperationMethod< + PutPermissionsMembershipClearRequest, + PutPermissionsMembershipClearResponse, + PutPermissionsMembershipClearError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutPermissionsMembershipClearRequest, + output: PutPermissionsMembershipClearResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutPulseError = MetabaseOpError; +/** PUT /api/pulse/{id} Update a Pulse with `id`. */ +export const putPulse: API.OperationMethod< + PutPulseRequest, + PutPulseResponse, + PutPulseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutPulseRequest, + output: PutPulseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutSearchWeightsError = MetabaseOpError; +/** PUT /api/search/weights Update the current weights being used to rank the search results */ +export const putSearchWeights: API.OperationMethod< + PutSearchWeightsRequest, + PutSearchWeightsResponse, + PutSearchWeightsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutSearchWeightsRequest, + output: PutSearchWeightsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutSegmentError = MetabaseOpError; +/** PUT /api/segment/{id} Update a `Segment` with ID. */ +export const putSegment: API.OperationMethod< + PutSegmentRequest, + PutSegmentResponse, + PutSegmentError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutSegmentRequest, + output: PutSegmentResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutSettingError = MetabaseOpError; +/** PUT /api/setting Update multiple `Settings` values. If called by a non-superuser, only user-local settings can be updated. */ +export const putSetting: API.OperationMethod< + PutSettingRequest, + PutSettingResponse, + PutSettingError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutSettingRequest, + output: PutSettingResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutSettingByKeyError = MetabaseOpError; +/** PUT /api/setting/{key} Create/update a `Setting`. If called by a non-admin, only user-local settings can be updated. This endpoint can also be used to delete Settings by passing `nil` for `:value`. */ +export const putSettingByKey: API.OperationMethod< + PutSettingByKeyRequest, + PutSettingByKeyResponse, + PutSettingByKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutSettingByKeyRequest, + output: PutSettingByKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutSlackSettingsError = MetabaseOpError; +/** PUT /api/slack/settings Update Slack related settings. You must be a superuser to do this. Also updates the slack-cache. There are 3 cases where we alter the slack channel/user cache: 1. falsy token -> clear 2. invalid token -> clear 3. truthy, valid token -> refresh */ +export const putSlackSettings: API.OperationMethod< + PutSlackSettingsRequest, + PutSlackSettingsResponse, + PutSlackSettingsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutSlackSettingsRequest, + output: PutSlackSettingsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTableError = MetabaseOpError; +/** PUT /api/table Update all `Table` in `ids`. Deprecated, should use PUT /table/edit from now on. */ +export const putTable: API.OperationMethod< + PutTableRequest, + PutTableResponse, + PutTableError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTableRequest, + output: PutTableResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTableByIdError = MetabaseOpError; +/** PUT /api/table/{id} Update `Table` with ID. */ +export const putTableById: API.OperationMethod< + PutTableByIdRequest, + PutTableByIdResponse, + PutTableByIdError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTableByIdRequest, + output: PutTableByIdResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTableFieldsOrderError = MetabaseOpError; +/** PUT /api/table/{id}/fields/order Reorder fields */ +export const putTableFieldsOrder: API.OperationMethod< + PutTableFieldsOrderRequest, + PutTableFieldsOrderResponse, + PutTableFieldsOrderError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTableFieldsOrderRequest, + output: PutTableFieldsOrderResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTimelineError = MetabaseOpError; +/** PUT /api/timeline/{id} Update the [[Timeline]] with `id`. Returns the timeline without events. Archiving a timeline will archive all of the events in that timeline. */ +export const putTimeline: API.OperationMethod< + PutTimelineRequest, + PutTimelineResponse, + PutTimelineError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTimelineRequest, + output: PutTimelineResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTimelineEventError = MetabaseOpError; +/** PUT /api/timeline-event/{id} Update a [[TimelineEvent]]. */ +export const putTimelineEvent: API.OperationMethod< + PutTimelineEventRequest, + PutTimelineEventResponse, + PutTimelineEventError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTimelineEventRequest, + output: PutTimelineEventResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTransformError = MetabaseOpError; +/** PUT /api/transform/{id} Update a transform. */ +export const putTransform: API.OperationMethod< + PutTransformRequest, + PutTransformResponse, + PutTransformError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTransformRequest, + output: PutTransformResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTransformJobError = MetabaseOpError; +/** PUT /api/transform-job/{job-id} Update a transform job. */ +export const putTransformJob: API.OperationMethod< + PutTransformJobRequest, + PutTransformJobResponse, + PutTransformJobError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTransformJobRequest, + output: PutTransformJobResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTransformJobActiveError = MetabaseOpError; +/** PUT /api/transform-job/active Activate or deactivate every transform job. Inactive jobs do not run on schedule. Manual runs via `POST /api/transform-job/:job-id/run` ignore this flag. Reports per-job outcome counts: `:updated` (successfully flipped) and `:failed` (raised an error during the flip — the row update or Quartz write failed and was logged). */ +export const putTransformJobActive: API.OperationMethod< + PutTransformJobActiveRequest, + PutTransformJobActiveResponse, + PutTransformJobActiveError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTransformJobActiveRequest, + output: PutTransformJobActiveResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutTransformTagError = MetabaseOpError; +/** PUT /api/transform-tag/{tag-id} Update a transform tag. */ +export const putTransformTag: API.OperationMethod< + PutTransformTagRequest, + PutTransformTagResponse, + PutTransformTagError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutTransformTagRequest, + output: PutTransformTagResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutUserError = MetabaseOpError; +/** PUT /api/user/{id} Update an existing, active `User`. Self or superusers can update user info and groups. Group Managers can only add/remove users from groups they are manager of. */ +export const putUser: API.OperationMethod< + PutUserRequest, + PutUserResponse, + PutUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutUserRequest, + output: PutUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutUserKeyValueNamespaceKeyError = MetabaseOpError; +/** PUT /api/user-key-value/namespace/{namespace}/key/{key} Upsert a KV-pair for the user */ +export const putUserKeyValueNamespaceKey: API.OperationMethod< + PutUserKeyValueNamespaceKeyRequest, + PutUserKeyValueNamespaceKeyResponse, + PutUserKeyValueNamespaceKeyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutUserKeyValueNamespaceKeyRequest, + output: PutUserKeyValueNamespaceKeyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutUserModalError = MetabaseOpError; +/** PUT /api/user/{id}/modal/{modal} Indicate that a user has been informed about the vast intricacies of 'the' Query Builder. */ +export const putUserModal: API.OperationMethod< + PutUserModalRequest, + PutUserModalResponse, + PutUserModalError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutUserModalRequest, + output: PutUserModalResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutUserPasswordError = MetabaseOpError; +/** PUT /api/user/{id}/password Update a user's password. */ +export const putUserPassword: API.OperationMethod< + PutUserPasswordRequest, + PutUserPasswordResponse, + PutUserPasswordError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutUserPasswordRequest, + output: PutUserPasswordResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type PutUserReactivateError = MetabaseOpError; +/** PUT /api/user/{id}/reactivate Reactivate user at `:id` */ +export const putUserReactivate: API.OperationMethod< + PutUserReactivateRequest, + PutUserReactivateResponse, + PutUserReactivateError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: PutUserReactivateRequest, + output: PutUserReactivateResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateBookmarkError = MetabaseOpError; +/** POST /api/bookmark/{model}/{id} Create a new bookmark for user. */ +export const updateBookmark: API.OperationMethod< + UpdateBookmarkRequest, + UpdateBookmarkResponse, + UpdateBookmarkError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateBookmarkRequest, + output: UpdateBookmarkResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateCardQueryError = MetabaseOpError; +/** POST /api/card/{card-id}/query/{export-format} Run the query associated with a Card, and return its results as a file in the specified format. `csv_include_bom`, `parameters`, `pivot-results?` and `format-rows?` should be passed as application/x-www-form-urlencoded form content or json in the body. This is because this endpoint is normally used to power 'Download Results' buttons that use HTML `form` actions). */ +export const updateCardQuery: API.OperationMethod< + UpdateCardQueryRequest, + UpdateCardQueryResponse, + UpdateCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateCardQueryRequest, + output: UpdateCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDashboardDashcardCardError = MetabaseOpError; +/** POST /api/public/dashboard/{uuid}/dashcard/{dashcard-id}/card/{card-id}/{export-format} Fetch the results of running a publicly-accessible Card belonging to a Dashboard and return the data in one of the export formats. Does not require auth credentials. Public sharing must be enabled. */ +export const updateDashboardDashcardCard: API.OperationMethod< + UpdateDashboardDashcardCardRequest, + UpdateDashboardDashcardCardResponse, + UpdateDashboardDashcardCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDashboardDashcardCardRequest, + output: UpdateDashboardDashcardCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDashboardDashcardCardQueryError = MetabaseOpError; +/** POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format} Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it, and return its results as a file in the specified format. `parameters` should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint is normally used to power 'Download Results' buttons that use HTML `form` actions). */ +export const updateDashboardDashcardCardQuery: API.OperationMethod< + UpdateDashboardDashcardCardQueryRequest, + UpdateDashboardDashcardCardQueryResponse, + UpdateDashboardDashcardCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDashboardDashcardCardQueryRequest, + output: UpdateDashboardDashcardCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDashboardSaveCollectionError = MetabaseOpError; +/** POST /api/dashboard/save/collection/{parent-collection-id} Save a denormalized description of dashboard into collection with ID `:parent-collection-id`. */ +export const updateDashboardSaveCollection: API.OperationMethod< + UpdateDashboardSaveCollectionRequest, + UpdateDashboardSaveCollectionResponse, + UpdateDashboardSaveCollectionError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDashboardSaveCollectionRequest, + output: UpdateDashboardSaveCollectionResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDatasetError = MetabaseOpError; +/** POST /api/dataset/{export-format} Execute a query and download the result data as a file in the specified format. */ +export const updateDataset: API.OperationMethod< + UpdateDatasetRequest, + UpdateDatasetResponse, + UpdateDatasetError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDatasetRequest, + output: UpdateDatasetResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDatasetParameterSearchError = MetabaseOpError; +/** POST /api/dataset/parameter/search/{query} Return parameter values for cards or dashboards that are being edited. Expects a query string at `?query=foo`. */ +export const updateDatasetParameterSearch: API.OperationMethod< + UpdateDatasetParameterSearchRequest, + UpdateDatasetParameterSearchResponse, + UpdateDatasetParameterSearchError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDatasetParameterSearchRequest, + output: UpdateDatasetParameterSearchResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDocumentCardError = MetabaseOpError; +/** POST /api/public/document/{uuid}/card/{card-id}/{export-format} Fetch a Card embedded in a public Document and return query results in the specified format. Does not require auth credentials. Public sharing must be enabled. */ +export const updateDocumentCard: API.OperationMethod< + UpdateDocumentCardRequest, + UpdateDocumentCardResponse, + UpdateDocumentCardError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDocumentCardRequest, + output: UpdateDocumentCardResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateDocumentCardQueryError = MetabaseOpError; +/** POST /api/document/{document-id}/card/{card-id}/query/{export-format} Download query results for a Card embedded in a Document. Returns query results in the requested format. The user must have read access to the document to download results. If the card's query fails, standard query error responses are returned. Route parameters: - document-id: ID of the document containing the card - card-id: ID of the card to download results from - export-format: Output format (csv, xlsx, json) Body parameters (snake_case): - parameters: Optional query parameters (array of maps or JSON string) - format_rows: Whether to apply formatting to results (boolean, default false) - pivot_results: Whether to pivot results (boolean, default false) */ +export const updateDocumentCardQuery: API.OperationMethod< + UpdateDocumentCardQueryRequest, + UpdateDocumentCardQueryResponse, + UpdateDocumentCardQueryError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateDocumentCardQueryRequest, + output: UpdateDocumentCardQueryResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateEeCloudAddOnsError = MetabaseOpError; +/** POST /api/ee/cloud-add-ons/{product-type} Purchase an add-on. */ +export const updateEeCloudAddOns: API.OperationMethod< + UpdateEeCloudAddOnsRequest, + UpdateEeCloudAddOnsResponse, + UpdateEeCloudAddOnsError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateEeCloudAddOnsRequest, + output: UpdateEeCloudAddOnsResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateEeCloudProxyError = MetabaseOpError; +/** POST /api/ee/cloud-proxy/{operation-id} Proxy a call to the Metabase Store API via harbormaster client. This endpoint is used only for hosted instances, and calls Harbormaster Store using a OpenAPI client. :operation-id is the operation-id of the Harbormaster Store endpoint. All parameters for the operation are taken in the POST body. */ +export const updateEeCloudProxy: API.OperationMethod< + UpdateEeCloudProxyRequest, + UpdateEeCloudProxyResponse, + UpdateEeCloudProxyError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateEeCloudProxyRequest, + output: UpdateEeCloudProxyResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateEeDatabaseReplicationConnectionDatabaseError = + MetabaseOpError; +/** POST /api/ee/database-replication/connection/{database-id} Create a new PG replication connection for the specified database. */ +export const updateEeDatabaseReplicationConnectionDatabase: API.OperationMethod< + UpdateEeDatabaseReplicationConnectionDatabaseRequest, + UpdateEeDatabaseReplicationConnectionDatabaseResponse, + UpdateEeDatabaseReplicationConnectionDatabaseError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateEeDatabaseReplicationConnectionDatabaseRequest, + output: UpdateEeDatabaseReplicationConnectionDatabaseResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateEeScimUserError = MetabaseOpError; +/** PATCH /api/ee/scim/v2/Users/{id} Activate or deactivate a user. Supports specific replace operations, but not arbitrary patches. */ +export const updateEeScimUser: API.OperationMethod< + UpdateEeScimUserRequest, + UpdateEeScimUserResponse, + UpdateEeScimUserError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateEeScimUserRequest, + output: UpdateEeScimUserResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); + +export type UpdateNotifyDbError = MetabaseOpError; +/** POST /api/notify/db/{id} Notification about a potential schema change to one of our `Databases`. Caller can optionally specify a `:table_id` or `:table_name` in the body to limit updates to a single `Table`. Optional Parameter `:scan` can be `"full"` or `"schema"` for a full sync or a schema sync, available regardless if a `:table_id` or `:table_name` is passed. This endpoint is secured by an API key that needs to be passed as a `X-METABASE-APIKEY` header which needs to be defined in the `MB_API_KEY` [environment variable](https://www.metabase.com/docs/latest/configuring-metabase/environment-variables.html#mb_api_key) */ +export const updateNotifyDb: API.OperationMethod< + UpdateNotifyDbRequest, + UpdateNotifyDbResponse, + UpdateNotifyDbError, + MetabaseOpContext +> = /*@__PURE__*/ API.make(() => ({ + input: UpdateNotifyDbRequest, + output: UpdateNotifyDbResponse, + errors: [UnknownMetabaseError], + protocol: MetabaseProtocol, + retry: Retry.Retry, +})); diff --git a/packages/metabase/src/traits.ts b/packages/metabase/src/traits.ts new file mode 100644 index 000000000..cfd37aef7 --- /dev/null +++ b/packages/metabase/src/traits.ts @@ -0,0 +1,44 @@ +/** + * Metabase SDK trait surface — hand-written. + * + * Re-exports the generic protocol traits from core (so generated operations + * import everything from one place). Metabase 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/metabase/tsconfig.json b/packages/metabase/tsconfig.json new file mode 100644 index 000000000..56b16e575 --- /dev/null +++ b/packages/metabase/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/metabase/tsconfig.scripts.json b/packages/metabase/tsconfig.scripts.json new file mode 100644 index 000000000..be37c3474 --- /dev/null +++ b/packages/metabase/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 ee6301d80..7984fcd1b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -807,6 +807,25 @@ importers: specifier: catalog:tooling version: 26.4.1 + packages/metabase: + 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.1 + '@types/node': + specifier: catalog:tooling + version: 26.4.1 + packages/modal: dependencies: '@distilled.cloud/core': diff --git a/stacks/distilled-submodules/SpecRepos.ts b/stacks/distilled-submodules/SpecRepos.ts index c1806d7ce..275aeb63b 100644 --- a/stacks/distilled-submodules/SpecRepos.ts +++ b/stacks/distilled-submodules/SpecRepos.ts @@ -84,6 +84,7 @@ export const SPEC_REPOS: readonly SpecRepo[] = [ { package: "launchdarkly" }, { package: "meilisearch" }, { package: "mercury" }, + { package: "metabase" }, { package: "mongodb-atlas" }, { package: "modal" }, { package: "neon" }, diff --git a/stacks/distilled-submodules/spec-repos/metabase/fetch-specs.ts b/stacks/distilled-submodules/spec-repos/metabase/fetch-specs.ts new file mode 100644 index 000000000..09e7f7994 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/metabase/fetch-specs.ts @@ -0,0 +1,66 @@ +#!/usr/bin/env bun +/** + * Fetches the Metabase OpenAPI spec to ../specs/. + * + * Metabase publishes ONE OpenAPI 3.1 document at a stable docs URL — the + * same file its documentation site and Scalar UI render. There is no + * versioned URL, so the mirror simply snapshots it. + * + * Usage: + * bun run fetch-specs.ts + * + * The spec is saved to: + * ../specs/openapi.json + */ + +const OPENAPI_SPEC_URL = "https://www.metabase.com/docs/latest/api.json"; +const SPECS_DIR = "../specs"; +const OUTPUT_PATH = `${SPECS_DIR}/openapi.json`; + +import { existsSync, mkdirSync } from "fs"; + +// Ensure the specs directory exists +if (!existsSync(SPECS_DIR)) { + mkdirSync(SPECS_DIR, { recursive: true }); +} + +async function main() { + console.log(`Fetching OpenAPI spec from ${OPENAPI_SPEC_URL}...`); + + const response = await fetch(OPENAPI_SPEC_URL, { + headers: { + accept: "application/json", + "user-agent": "distilled.cloud-metabase-spec-mirror", + }, + }); + + if (!response.ok) { + throw new Error( + `Failed to fetch OpenAPI spec: ${response.status} ${response.statusText}`, + ); + } + + const spec = (await response.json()) as Record; + + // 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 ${OUTPUT_PATH}...`); + // 2-space indent + trailing newline so a whitespace-only change upstream + // produces no diff. + await Bun.write(OUTPUT_PATH, JSON.stringify(spec, null, 2) + "\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/metabase/package.json b/stacks/distilled-submodules/spec-repos/metabase/package.json new file mode 100644 index 000000000..3087c520c --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/metabase/package.json @@ -0,0 +1,27 @@ +{ + "name": "metabase-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/metabase/readme.md b/stacks/distilled-submodules/spec-repos/metabase/readme.md new file mode 100644 index 000000000..4e1aefe73 --- /dev/null +++ b/stacks/distilled-submodules/spec-repos/metabase/readme.md @@ -0,0 +1,26 @@ +# spec-mirror-metabase + +A git mirror of Metabase's [OpenAPI spec](https://www.metabase.com/docs/latest/api.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-metabase.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 cb51d746a..4df815f70 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -351,6 +351,12 @@ }, { "path": "./packages/mercury/tsconfig.scripts.json" + }, + { + "path": "./packages/metabase/tsconfig.json" + }, + { + "path": "./packages/metabase/tsconfig.scripts.json" } ] }