From cc8ed970d9909ede3a26e3ee8c6322e75551f31f Mon Sep 17 00:00:00 2001 From: "Dr. Strangelove" Date: Tue, 12 Mar 2024 18:30:44 -0400 Subject: [PATCH] Revert "feat: generate SDKs for Looker 24.4 (#1442)" This reverts commit a05b8df7167c9e52cc8cd9efc432dfd405a354a2. --- csharp/rtl/Constants.cs | 2 +- csharp/sdk/4.0/models.cs | 41 ++--- go/sdk/v4/models.go | 26 ++- kotlin/src/main/com/looker/sdk/4.0/models.kt | 49 +++--- kotlin/src/main/com/looker/sdk/Constants.kt | 2 +- packages/sdk/src/4.0/models.ts | 68 ++++---- packages/sdk/src/constants.ts | 2 +- python/looker_sdk/sdk/api40/models.py | 126 ++++++-------- python/looker_sdk/sdk/constants.py | 2 +- spec/Looker.4.0.json | 40 ++--- spec/Looker.4.0.oas.json | 37 ++-- swift/looker/rtl/constants.swift | 2 +- swift/looker/sdk/models.swift | 173 +++++++++---------- yarn.lock | 96 +--------- 14 files changed, 251 insertions(+), 415 deletions(-) diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index ef20454c3..cee065ba5 100644 --- a/csharp/rtl/Constants.cs +++ b/csharp/rtl/Constants.cs @@ -61,7 +61,7 @@ public struct Constants public const string DefaultApiVersion = "4.0"; public const string AgentPrefix = "CS-SDK"; - public const string LookerVersion = "24.4"; + public const string LookerVersion = "24.2"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index c3a6daa93..ce9a92123 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 340 API models: 257 Spec, 0 Request, 61 Write, 22 Enum +/// 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum #nullable enable using System; @@ -2608,9 +2608,24 @@ public enum InvestigativeContentType public class JsonBi : SdkModel { - public JsonBiMetadata metadata { get; set; } = null; + public JsonBiBigQueryMetadata big_query_metadata { get; set; } = null; + public JsonBiFields fields { get; set; } = null; + /// Pivots (read-only) + public JsonBiPivots[] pivots { get; set; } = null; + /// If the query has subtotals (read-only) + public bool has_subtotals { get; set; } + /// If the query has totals (read-only) + public bool has_totals { get; set; } + /// If the query results hit the maximum column limit and additional columns were truncated (read-only) + public string columns_truncated { get; set; } = ""; + /// Filter expression applied to the query results (read-only) + public string filter_expression { get; set; } = ""; + /// Filters applied to the query results (read-only) + public StringDictionary filters { get; set; } = null; + /// Raw sql query. Null if user does not have permission to view sql (read-only) + public string sql { get; set; } = ""; /// Json query results (read-only) - public string[] rows { get; set; } = null; + public string[] data { get; set; } = null; } public class JsonBiBigQueryMetadata : SdkModel @@ -2659,26 +2674,6 @@ public class JsonBiFields : SdkModel public JsonBiField[] pivots { get; set; } = null; } -public class JsonBiMetadata : SdkModel -{ - public JsonBiBigQueryMetadata big_query_metadata { get; set; } = null; - public JsonBiFields fields { get; set; } = null; - /// Pivots (read-only) - public JsonBiPivots[] pivots { get; set; } = null; - /// If the query has subtotals (read-only) - public bool has_subtotals { get; set; } - /// If the query has totals (read-only) - public bool has_totals { get; set; } - /// If the query results hit the maximum column limit and additional columns were truncated (read-only) - public string columns_truncated { get; set; } = ""; - /// Filter expression applied to the query results (read-only) - public string filter_expression { get; set; } = ""; - /// Filters applied to the query results (read-only) - public StringDictionary filters { get; set; } = null; - /// Raw sql query. Null if user does not have permission to view sql (read-only) - public string sql { get; set; } = ""; -} - public class JsonBiPivots : SdkModel { /// Pivot Column Value (read-only) diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index e90bee439..806e58692 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -406 API models: 257 Spec, 67 Request, 60 Write, 22 Enum +405 API models: 256 Spec, 67 Request, 60 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -1468,8 +1468,16 @@ type InvestigativeContentType string const InvestigativeContentType_Dashboard InvestigativeContentType = "dashboard" type JsonBi struct { - Metadata JsonBiMetadata `json:"metadata"` - Rows []string `json:"rows"` // Json query results + BigQueryMetadata JsonBiBigQueryMetadata `json:"big_query_metadata"` + Fields JsonBiFields `json:"fields"` + Pivots []JsonBiPivots `json:"pivots"` // Pivots + HasSubtotals bool `json:"has_subtotals"` // If the query has subtotals + HasTotals bool `json:"has_totals"` // If the query has totals + ColumnsTruncated string `json:"columns_truncated"` // If the query results hit the maximum column limit and additional columns were truncated + FilterExpression string `json:"filter_expression"` // Filter expression applied to the query results + Filters map[string]interface{} `json:"filters"` // Filters applied to the query results + Sql string `json:"sql"` // Raw sql query. Null if user does not have permission to view sql + Data []string `json:"data"` // Json query results } type JsonBiBigQueryMetadata struct { @@ -1498,18 +1506,6 @@ type JsonBiFields struct { Pivots []JsonBiField `json:"pivots"` // Pivots } -type JsonBiMetadata struct { - BigQueryMetadata JsonBiBigQueryMetadata `json:"big_query_metadata"` - Fields JsonBiFields `json:"fields"` - Pivots []JsonBiPivots `json:"pivots"` // Pivots - HasSubtotals bool `json:"has_subtotals"` // If the query has subtotals - HasTotals bool `json:"has_totals"` // If the query has totals - ColumnsTruncated string `json:"columns_truncated"` // If the query results hit the maximum column limit and additional columns were truncated - FilterExpression string `json:"filter_expression"` // Filter expression applied to the query results - Filters map[string]interface{} `json:"filters"` // Filters applied to the query results - Sql string `json:"sql"` // Raw sql query. Null if user does not have permission to view sql -} - type JsonBiPivots struct { Key string `json:"key"` // Pivot Column Value Data map[string]interface{} `json:"data"` // Pivot Data diff --git a/kotlin/src/main/com/looker/sdk/4.0/models.kt b/kotlin/src/main/com/looker/sdk/4.0/models.kt index 753ee4aa2..b7af30bdc 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/models.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/models.kt @@ -25,7 +25,7 @@ */ /** - * 340 API models: 257 Spec, 0 Request, 61 Write, 22 Enum + * 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -2745,12 +2745,28 @@ enum class InvestigativeContentType : Serializable { } /** - * @property metadata - * @property rows Json query results (read-only) + * @property big_query_metadata + * @property fields + * @property pivots Pivots (read-only) + * @property has_subtotals If the query has subtotals (read-only) + * @property has_totals If the query has totals (read-only) + * @property columns_truncated If the query results hit the maximum column limit and additional columns were truncated (read-only) + * @property filter_expression Filter expression applied to the query results (read-only) + * @property filters Filters applied to the query results (read-only) + * @property sql Raw sql query. Null if user does not have permission to view sql (read-only) + * @property data Json query results (read-only) */ data class JsonBi( - var metadata: JsonBiMetadata, - var rows: Array, + var big_query_metadata: JsonBiBigQueryMetadata, + var fields: JsonBiFields, + var pivots: Array, + var has_subtotals: Boolean, + var has_totals: Boolean, + var columns_truncated: String, + var filter_expression: String, + var filters: Map, + var sql: String, + var data: Array, ) : Serializable /** @@ -2802,29 +2818,6 @@ data class JsonBiFields( var pivots: Array, ) : Serializable -/** - * @property big_query_metadata - * @property fields - * @property pivots Pivots (read-only) - * @property has_subtotals If the query has subtotals (read-only) - * @property has_totals If the query has totals (read-only) - * @property columns_truncated If the query results hit the maximum column limit and additional columns were truncated (read-only) - * @property filter_expression Filter expression applied to the query results (read-only) - * @property filters Filters applied to the query results (read-only) - * @property sql Raw sql query. Null if user does not have permission to view sql (read-only) - */ -data class JsonBiMetadata( - var big_query_metadata: JsonBiBigQueryMetadata, - var fields: JsonBiFields, - var pivots: Array, - var has_subtotals: Boolean, - var has_totals: Boolean, - var columns_truncated: String, - var filter_expression: String, - var filters: Map, - var sql: String, -) : Serializable - /** * @property key Pivot Column Value (read-only) * @property data Pivot Data (read-only) diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index b8aab2244..8df7a73bc 100644 --- a/kotlin/src/main/com/looker/sdk/Constants.kt +++ b/kotlin/src/main/com/looker/sdk/Constants.kt @@ -28,7 +28,7 @@ package com.looker.sdk const val ENVIRONMENT_PREFIX = "LOOKERSDK" const val SDK_TAG = "KT-SDK" -const val LOOKER_VERSION = "24.4" +const val LOOKER_VERSION = "24.2" const val API_VERSION = "4.0" const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION" const val LOOKER_APPID = "x-looker-appid" diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index 9e89508dc..78348bf12 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 407 API models: 257 Spec, 67 Request, 61 Write, 22 Enum + * 406 API models: 256 Spec, 67 Request, 61 Write, 22 Enum */ import type { DelimArray, IDictionary } from '@looker/sdk-rtl'; @@ -4393,11 +4393,40 @@ export enum InvestigativeContentType { } export interface IJsonBi { - metadata: IJsonBiMetadata; + big_query_metadata: IJsonBiBigQueryMetadata; + fields: IJsonBiFields; + /** + * Pivots (read-only) + */ + pivots: IJsonBiPivots[]; + /** + * If the query has subtotals (read-only) + */ + has_subtotals: boolean; + /** + * If the query has totals (read-only) + */ + has_totals: boolean; + /** + * If the query results hit the maximum column limit and additional columns were truncated (read-only) + */ + columns_truncated: string; + /** + * Filter expression applied to the query results (read-only) + */ + filter_expression: string | null; + /** + * Filters applied to the query results (read-only) + */ + filters: IDictionary; + /** + * Raw sql query. Null if user does not have permission to view sql (read-only) + */ + sql: string | null; /** * Json query results (read-only) */ - rows: string[]; + data: string[]; } export interface IJsonBiBigQueryMetadata { @@ -4477,39 +4506,6 @@ export interface IJsonBiFields { pivots: IJsonBiField[]; } -export interface IJsonBiMetadata { - big_query_metadata: IJsonBiBigQueryMetadata; - fields: IJsonBiFields; - /** - * Pivots (read-only) - */ - pivots: IJsonBiPivots[]; - /** - * If the query has subtotals (read-only) - */ - has_subtotals: boolean; - /** - * If the query has totals (read-only) - */ - has_totals: boolean; - /** - * If the query results hit the maximum column limit and additional columns were truncated (read-only) - */ - columns_truncated: string; - /** - * Filter expression applied to the query results (read-only) - */ - filter_expression: string | null; - /** - * Filters applied to the query results (read-only) - */ - filters: IDictionary; - /** - * Raw sql query. Null if user does not have permission to view sql (read-only) - */ - sql: string | null; -} - export interface IJsonBiPivots { /** * Pivot Column Value (read-only) diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index 52bc678e1..f4bb6bd3a 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '24.4'; +export const sdkVersion = '24.2'; export const environmentPrefix = 'LOOKERSDK'; diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index e224d581d..b2ea27740 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 340 API models: 257 Spec, 0 Request, 61 Write, 22 Enum +# 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -5778,17 +5778,65 @@ class InvestigativeContentType(enum.Enum): class JsonBi(model.Model): """ Attributes: - metadata: - rows: Json query results + big_query_metadata: + fields: + pivots: Pivots + has_subtotals: If the query has subtotals + has_totals: If the query has totals + columns_truncated: If the query results hit the maximum column limit and additional columns were truncated + filter_expression: Filter expression applied to the query results + filters: Filters applied to the query results + sql: Raw sql query. Null if user does not have permission to view sql + data: Json query results """ - metadata: "JsonBiMetadata" - rows: Sequence[str] - __annotations__ = {"metadata": ForwardRef("JsonBiMetadata"), "rows": Sequence[str]} + big_query_metadata: "JsonBiBigQueryMetadata" + fields: "JsonBiFields" + pivots: Sequence["JsonBiPivots"] + has_subtotals: bool + has_totals: bool + columns_truncated: str + filter_expression: str + filters: MutableMapping[str, Any] + sql: str + data: Sequence[str] + __annotations__ = { + "big_query_metadata": ForwardRef("JsonBiBigQueryMetadata"), + "fields": ForwardRef("JsonBiFields"), + "pivots": Sequence["JsonBiPivots"], + "has_subtotals": bool, + "has_totals": bool, + "columns_truncated": str, + "filter_expression": str, + "filters": MutableMapping[str, Any], + "sql": str, + "data": Sequence[str], + } - def __init__(self, *, metadata: "JsonBiMetadata", rows: Sequence[str]): - self.metadata = metadata - self.rows = rows + def __init__( + self, + *, + big_query_metadata: "JsonBiBigQueryMetadata", + fields: "JsonBiFields", + pivots: Sequence["JsonBiPivots"], + has_subtotals: bool, + has_totals: bool, + columns_truncated: str, + filter_expression: str, + filters: MutableMapping[str, Any], + sql: str, + data: Sequence[str] + ): + self.big_query_metadata = big_query_metadata + self.fields = fields + self.pivots = pivots + self.has_subtotals = has_subtotals + self.has_totals = has_totals + self.columns_truncated = columns_truncated + self.filter_expression = filter_expression + self.filters = filters + self.sql = sql + self.data = data @attr.s(auto_attribs=True, init=False) @@ -5893,66 +5941,6 @@ def __init__( self.pivots = pivots -@attr.s(auto_attribs=True, init=False) -class JsonBiMetadata(model.Model): - """ - Attributes: - big_query_metadata: - fields: - pivots: Pivots - has_subtotals: If the query has subtotals - has_totals: If the query has totals - columns_truncated: If the query results hit the maximum column limit and additional columns were truncated - filter_expression: Filter expression applied to the query results - filters: Filters applied to the query results - sql: Raw sql query. Null if user does not have permission to view sql - """ - - big_query_metadata: "JsonBiBigQueryMetadata" - fields: "JsonBiFields" - pivots: Sequence["JsonBiPivots"] - has_subtotals: bool - has_totals: bool - columns_truncated: str - filter_expression: str - filters: MutableMapping[str, Any] - sql: str - __annotations__ = { - "big_query_metadata": ForwardRef("JsonBiBigQueryMetadata"), - "fields": ForwardRef("JsonBiFields"), - "pivots": Sequence["JsonBiPivots"], - "has_subtotals": bool, - "has_totals": bool, - "columns_truncated": str, - "filter_expression": str, - "filters": MutableMapping[str, Any], - "sql": str, - } - - def __init__( - self, - *, - big_query_metadata: "JsonBiBigQueryMetadata", - fields: "JsonBiFields", - pivots: Sequence["JsonBiPivots"], - has_subtotals: bool, - has_totals: bool, - columns_truncated: str, - filter_expression: str, - filters: MutableMapping[str, Any], - sql: str - ): - self.big_query_metadata = big_query_metadata - self.fields = fields - self.pivots = pivots - self.has_subtotals = has_subtotals - self.has_totals = has_totals - self.columns_truncated = columns_truncated - self.filter_expression = filter_expression - self.filters = filters - self.sql = sql - - @attr.s(auto_attribs=True, init=False) class JsonBiPivots(model.Model): """ diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 43b2a4c6a..b47800cbd 100644 --- a/python/looker_sdk/sdk/constants.py +++ b/python/looker_sdk/sdk/constants.py @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -sdk_version = "24.4" +sdk_version = "24.2" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index de03d2698..6d775cb65 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.24.4", - "x-looker-release-version": "24.4.3", + "version": "4.0.24.2", + "x-looker-release-version": "24.2.18", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.1 is deprecated.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced to make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to the previous API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -32601,30 +32601,6 @@ "x-looker-status": "stable" }, "JsonBi": { - "properties": { - "metadata": { - "$ref": "#/definitions/JsonBiMetadata", - "readOnly": true, - "description": "Metadata about the query", - "x-looker-nullable": false - }, - "rows": { - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true, - "description": "Json query results", - "x-looker-nullable": false - } - }, - "x-looker-status": "stable", - "required": [ - "metadata", - "rows" - ] - }, - "JsonBiMetadata": { "properties": { "big_query_metadata": { "$ref": "#/definitions/JsonBiBigQueryMetadata", @@ -32685,6 +32661,15 @@ "readOnly": true, "description": "Raw sql query. Null if user does not have permission to view sql", "x-looker-nullable": true + }, + "data": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Json query results", + "x-looker-nullable": false } }, "x-looker-status": "stable", @@ -32697,7 +32682,8 @@ "columns_truncated", "filter_expression", "filters", - "sql" + "sql", + "data" ] }, "JsonBiFields": { diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index d50844e69..3f4044ade 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.24.4", - "x-looker-release-version": "24.4.3", + "version": "4.0.24.2", + "x-looker-release-version": "24.2.18", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.1 is deprecated.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API** credentials for authorization and access control.\nLooker admins can create API credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://cloud.google.com/looker/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\n\nFor details, see the [API Explorer documentation](https://cloud.google.com/looker/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://cloud.google.com/looker/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://cloud.google.com/looker/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced to make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to the previous API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nSee the [API 4.0 GA announcement](https://developers.looker.com/api/advanced-usage/version-4-ga) for more information\nabout API 4.0.\n\nThe API Explorer can be used to [interactively compare](https://cloud.google.com/looker/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://cloud.google.com/looker/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -42147,27 +42147,6 @@ "x-looker-status": "stable" }, "JsonBi": { - "properties": { - "metadata": { - "$ref": "#/components/schemas/JsonBiMetadata" - }, - "rows": { - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true, - "description": "Json query results", - "nullable": false - } - }, - "x-looker-status": "stable", - "required": [ - "metadata", - "rows" - ] - }, - "JsonBiMetadata": { "properties": { "big_query_metadata": { "$ref": "#/components/schemas/JsonBiBigQueryMetadata" @@ -42222,6 +42201,15 @@ "readOnly": true, "description": "Raw sql query. Null if user does not have permission to view sql", "nullable": true + }, + "data": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Json query results", + "nullable": false } }, "x-looker-status": "stable", @@ -42234,7 +42222,8 @@ "columns_truncated", "filter_expression", "filters", - "sql" + "sql", + "data" ] }, "JsonBiFields": { diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 0b775de5a..07e665ca5 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -51,7 +51,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "24.4" + public static let lookerVersion = "24.2" public static let apiVersion = "4.0" public static let defaultApiVersion = "4.0" // Swift requires API 4.0 public static let sdkVersion = #"\#(apiVersion).\#(lookerVersion)"# diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 0aacbbb17..6d0952ec9 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 340 API models: 257 Spec, 0 Request, 61 Write, 22 Enum + * 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum */ @@ -10828,27 +10828,92 @@ public enum InvestigativeContentType: String, Codable { public struct JsonBi: SDKModel { private enum CodingKeys : String, CodingKey { - case metadata - case _rows = "rows" + case big_query_metadata + case fields + case pivots + case has_subtotals + case has_totals + case _columns_truncated = "columns_truncated" + case _filter_expression = "filter_expression" + case filters + case _sql = "sql" + case _data = "data" + } + public var big_query_metadata: JsonBiBigQueryMetadata + + public var fields: JsonBiFields + + /** + * Pivots (read-only) + */ + public var pivots: [JsonBiPivots] + + /** + * If the query has subtotals (read-only) + */ + public var has_subtotals: Bool + + /** + * If the query has totals (read-only) + */ + public var has_totals: Bool + + private var _columns_truncated: AnyString + /** + * If the query results hit the maximum column limit and additional columns were truncated (read-only) + */ + public var columns_truncated: String { + get { _columns_truncated.value } + set { _columns_truncated = AnyString.init(newValue) } + } + + private var _filter_expression: AnyString + /** + * Filter expression applied to the query results (read-only) + */ + public var filter_expression: String { + get { _filter_expression.value } + set { _filter_expression = AnyString.init(newValue) } } - public var metadata: JsonBiMetadata - private var _rows: [AnyString] + /** + * Filters applied to the query results (read-only) + */ + public var filters: StringDictionary + + private var _sql: AnyString + /** + * Raw sql query. Null if user does not have permission to view sql (read-only) + */ + public var sql: String { + get { _sql.value } + set { _sql = AnyString.init(newValue) } + } + + private var _data: [AnyString] /** * Json query results (read-only) */ - public var rows: [String] { - get { _rows.map { $0.value } } - set { _rows = newValue.map { AnyString.init($0) } } + public var data: [String] { + get { _data.map { $0.value } } + set { _data = newValue.map { AnyString.init($0) } } } - public init(metadata: JsonBiMetadata, rows: [String]) { - self.metadata = metadata - self._rows = rows.map { AnyString.init($0) } + public init(big_query_metadata: JsonBiBigQueryMetadata, fields: JsonBiFields, pivots: [JsonBiPivots], has_subtotals: Bool, has_totals: Bool, columns_truncated: String, filter_expression: String, filters: StringDictionary, sql: String, data: [String]) { + self.big_query_metadata = big_query_metadata + self.fields = fields + self.pivots = pivots + self.has_subtotals = has_subtotals + self.has_totals = has_totals + self._columns_truncated = AnyString.init(columns_truncated) + self._filter_expression = AnyString.init(filter_expression) + self.filters = filters + self._sql = AnyString.init(sql) + self._data = data.map { AnyString.init($0) } } - public init(_ metadata: JsonBiMetadata, _ rows: [String]) { - self.init(metadata: metadata, rows: rows) + public init(_ big_query_metadata: JsonBiBigQueryMetadata, _ fields: JsonBiFields, _ pivots: [JsonBiPivots], _ has_subtotals: Bool, _ has_totals: Bool, _ columns_truncated: String, _ filter_expression: String, _ filters: StringDictionary, _ sql: String, _ data: [String]) { + self.init(big_query_metadata: big_query_metadata, fields: fields, pivots: pivots, has_subtotals: has_subtotals, has_totals: has_totals, columns_truncated: columns_truncated, filter_expression: filter_expression, filters: filters, sql: sql, data: data) } } @@ -11053,88 +11118,6 @@ public struct JsonBiFields: SDKModel { } -public struct JsonBiMetadata: SDKModel { - - private enum CodingKeys : String, CodingKey { - case big_query_metadata - case fields - case pivots - case has_subtotals - case has_totals - case _columns_truncated = "columns_truncated" - case _filter_expression = "filter_expression" - case filters - case _sql = "sql" - } - public var big_query_metadata: JsonBiBigQueryMetadata - - public var fields: JsonBiFields - - /** - * Pivots (read-only) - */ - public var pivots: [JsonBiPivots] - - /** - * If the query has subtotals (read-only) - */ - public var has_subtotals: Bool - - /** - * If the query has totals (read-only) - */ - public var has_totals: Bool - - private var _columns_truncated: AnyString - /** - * If the query results hit the maximum column limit and additional columns were truncated (read-only) - */ - public var columns_truncated: String { - get { _columns_truncated.value } - set { _columns_truncated = AnyString.init(newValue) } - } - - private var _filter_expression: AnyString - /** - * Filter expression applied to the query results (read-only) - */ - public var filter_expression: String { - get { _filter_expression.value } - set { _filter_expression = AnyString.init(newValue) } - } - - /** - * Filters applied to the query results (read-only) - */ - public var filters: StringDictionary - - private var _sql: AnyString - /** - * Raw sql query. Null if user does not have permission to view sql (read-only) - */ - public var sql: String { - get { _sql.value } - set { _sql = AnyString.init(newValue) } - } - - public init(big_query_metadata: JsonBiBigQueryMetadata, fields: JsonBiFields, pivots: [JsonBiPivots], has_subtotals: Bool, has_totals: Bool, columns_truncated: String, filter_expression: String, filters: StringDictionary, sql: String) { - self.big_query_metadata = big_query_metadata - self.fields = fields - self.pivots = pivots - self.has_subtotals = has_subtotals - self.has_totals = has_totals - self._columns_truncated = AnyString.init(columns_truncated) - self._filter_expression = AnyString.init(filter_expression) - self.filters = filters - self._sql = AnyString.init(sql) - } - - public init(_ big_query_metadata: JsonBiBigQueryMetadata, _ fields: JsonBiFields, _ pivots: [JsonBiPivots], _ has_subtotals: Bool, _ has_totals: Bool, _ columns_truncated: String, _ filter_expression: String, _ filters: StringDictionary, _ sql: String) { - self.init(big_query_metadata: big_query_metadata, fields: fields, pivots: pivots, has_subtotals: has_subtotals, has_totals: has_totals, columns_truncated: columns_truncated, filter_expression: filter_expression, filters: filters, sql: sql) - } - -} - public struct JsonBiPivots: SDKModel { private enum CodingKeys : String, CodingKey { diff --git a/yarn.lock b/yarn.lock index 15091c36d..efcacc770 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2436,7 +2436,7 @@ resolved "https://registry.yarnpkg.com/@looker/components-test-utils/-/components-test-utils-1.5.27.tgz#e008243385d825020b62e4f3c8f19e3a3a275435" integrity sha512-OnPdRB4YBXdKsfFygoNaz9zvlB6EIZTEnxRsvxyOI8zVD4RyHEYPpw7yQlPx+4cEOroTIIwFIFmuyHrK3Zs7Fw== -"@looker/components@^4.1.1", "@looker/components@^4.1.3": +"@looker/components@^4.1.3": version "4.1.3" resolved "https://registry.yarnpkg.com/@looker/components/-/components-4.1.3.tgz#c13f0c641ad39564810ef79211da70a92171044c" integrity sha512-CJLvg7CJI16PegYrSbT4zm8id1vg5zPviYJYOx8VcBg2/AnZszhKroYPoJhZRq4Kh/7+rnzeBhZLP1r972wnwA== @@ -2467,31 +2467,6 @@ polished "^4.1.3" styled-system "*" -"@looker/embed-components@23.20.1": - version "23.20.1" - resolved "https://registry.yarnpkg.com/@looker/embed-components/-/embed-components-23.20.1.tgz#40a85665f3faeceaf52132ae3a521418c179db9e" - integrity sha512-fiuAWINDctdXHaPLRTB35I6v6EmTGIfDPY3L93BzqibE1m90NpCT4NpLaqok6csGHpFdoauSdmAz1ST+apb2gg== - dependencies: - "@looker/components" "^4.1.3" - "@looker/embed-services" "23.20.1" - "@looker/redux" "^0.0.1" - "@looker/sdk" "23.20.1" - "@looker/sdk-rtl" "21.6.1" - "@reduxjs/toolkit" "^1.9.3" - "@styled-icons/material-outlined" "^10.47.0" - react "16.14.0" - react-dom "16.14.0" - styled-components "^5.3.1" - typed-redux-saga "^1.5.0" - -"@looker/embed-services@23.20.1": - version "23.20.1" - resolved "https://registry.yarnpkg.com/@looker/embed-services/-/embed-services-23.20.1.tgz#651d7e9c84425bc105b1eea90f1ed17537d9e8b6" - integrity sha512-HdVsCwZh1bxek/TCMBReIP7vCq5E9gkO3DNnrBvvmo5mCy1trnp0vAV/CQboevKNVz7ExCd0pkN8YybLPib/1w== - dependencies: - "@looker/sdk" "^23.20.1" - "@looker/sdk-rtl" "^21.6.1" - "@looker/eslint-config-oss@*", "@looker/eslint-config-oss@1.7.21": version "1.7.21" resolved "https://registry.yarnpkg.com/@looker/eslint-config-oss/-/eslint-config-oss-1.7.21.tgz#e99866f0c696a087c5a31cad0b128182ad9ce790" @@ -2558,50 +2533,6 @@ "@manypkg/get-packages" "1.1.3" jsonc-eslint-parser "2.1.0" -"@looker/extension-sdk-react@^23.20.1": - version "23.20.1" - resolved "https://registry.yarnpkg.com/@looker/extension-sdk-react/-/extension-sdk-react-23.20.1.tgz#942aa58e12e67cca7dcec9e2cb84cb5bdab63aa5" - integrity sha512-soBis2FPeR+Dejqyz25AaqQABLv2K2CYjRhLYtJj4nJtQ/97r8Z8tWat8dVMbP0VckgS18K5ChgG3pg7/Kf5IQ== - dependencies: - "@looker/extension-sdk" "^23.20.1" - "@looker/sdk" "^23.20.1" - "@looker/sdk-rtl" "^21.6.1" - history "^4.9.0" - lodash "^4.17.20" - -"@looker/extension-sdk@^23.20.1": - version "23.20.1" - resolved "https://registry.yarnpkg.com/@looker/extension-sdk/-/extension-sdk-23.20.1.tgz#120ece8239fecc97abf831fd6d1afe2c948c7c04" - integrity sha512-11uhKxM+bXyfek7QIDlWW1YeUO2Wi82UknkWSualCzJPxBPl9QCXZQeP7H9A0t7hIuLl9nG4LFVRVjBjj0gWDQ== - dependencies: - "@looker/chatty" "2.3.9" - "@looker/sdk" "^23.20.1" - "@looker/sdk-rtl" "^21.6.1" - deepmerge "^4.2.2" - readable-stream "^3.4.0" - request "^2.88.0" - request-promise-native "^1.0.8" - semver "^7.3.4" - -"@looker/extension-utils@0.1.32": - version "0.1.32" - resolved "https://registry.yarnpkg.com/@looker/extension-utils/-/extension-utils-0.1.32.tgz#9b2693b3a08e44e2f30072e0d4b87ee76325a7c1" - integrity sha512-p+cjWkd9inpWMMnIT3SdYrk6NT/yhI4uV7VAE+hKwhlsjelN2yiaxEzTHG1FiEgV8iXpQZ+6piEP6LjhwG4lgA== - dependencies: - "@looker/code-editor" "^0.1.30" - "@looker/components" "^4.1.1" - "@looker/extension-sdk" "^23.20.1" - "@looker/extension-sdk-react" "^23.20.1" - "@looker/redux" "^0.0.1" - "@looker/sdk" "^23.20.1" - "@looker/sdk-rtl" "^21.6.1" - "@reduxjs/toolkit" "^1.9.3" - "@styled-icons/material" "^10.47.0" - react "^16.14.0" - react-redux "^7.2.3" - react-router-dom "^5.3.4" - typed-redux-saga "^1.5.0" - "@looker/i18n@1.0.0", "@looker/i18n@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@looker/i18n/-/i18n-1.0.0.tgz#9b76a2b73b7c277b9f9fae89a14b715953964c95" @@ -2623,17 +2554,6 @@ resolved "https://registry.yarnpkg.com/@looker/redux/-/redux-0.0.1.tgz#4decc5a78e207c1c63e5c114be2ecca4b3d09d44" integrity sha512-+gMHsg321OD9Cp0sMNkgcOIp1HtKs8kxNQMQD4XGFb2S8yfXtLRe7vnwghKCHfCiYkXEHLMUcFmBCEvSk7HlrA== -"@looker/sdk@23.20.1", "@looker/sdk@^23.20.1": - version "23.20.1" - resolved "https://registry.yarnpkg.com/@looker/sdk/-/sdk-23.20.1.tgz#f4f5870989c7d2f1a39ca01164d9b5bb603d34c8" - integrity sha512-hdgUnqrbSwPsM4kJABoFhCCuc4K3D6uCb9L4fYq/9P6X2/2byLGNwFtpR93J4Cpw19tVVuL6CwYRAPL2OWTDdw== - dependencies: - "@looker/sdk-rtl" "^21.6.1" - ini "^1.3.8" - readable-stream "^3.4.0" - request "^2.88.0" - request-promise-native "^1.0.8" - "@manypkg/find-root@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f" @@ -14095,16 +14015,6 @@ react-diff-viewer@3.1.1: memoize-one "^5.0.4" prop-types "^15.6.2" -react-dom@16.14.0: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" - integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - react-dom@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" @@ -14210,7 +14120,7 @@ react-markdown@^6.0.2: unist-util-visit "^2.0.0" vfile "^4.0.0" -react-redux@^7.2.3, react-redux@^7.2.9: +react-redux@^7.2.9: version "7.2.9" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== @@ -14283,7 +14193,7 @@ react-test-renderer@^17.0.2: react-shallow-renderer "^16.13.1" scheduler "^0.20.2" -react@16.14.0, react@^16.14.0, react@^17.0.2: +react@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==