From 8c42be7cede8594626f2f453ca937801a609efe4 Mon Sep 17 00:00:00 2001 From: "Dr. Strangelove" Date: Thu, 1 Feb 2024 17:11:18 -0500 Subject: [PATCH] feat: generate SDKs for Looker 24.0 (#1426) I disabled the pre-commit hook in order to get this to build. Please look at diffs closely to see if it looks good. Release-As: 24.0.0 --- csharp/rtl/Constants.cs | 2 +- csharp/sdk/4.0/methods.cs | 7 +- csharp/sdk/4.0/models.cs | 26 +- go/sdk/v4/methods.go | 25 +- go/sdk/v4/models.go | 89 ++---- kotlin/src/main/com/looker/sdk/4.0/methods.kt | 9 +- kotlin/src/main/com/looker/sdk/4.0/models.kt | 26 +- kotlin/src/main/com/looker/sdk/4.0/streams.kt | 9 +- kotlin/src/main/com/looker/sdk/Constants.kt | 2 +- packages/sdk/src/4.0/funcs.ts | 52 ++-- packages/sdk/src/4.0/methods.ts | 52 ++-- packages/sdk/src/4.0/methodsInterface.ts | 41 ++- packages/sdk/src/4.0/models.ts | 264 ++++-------------- packages/sdk/src/4.0/streams.ts | 52 ++-- packages/sdk/src/constants.ts | 2 +- python/looker_sdk/sdk/api40/methods.py | 13 +- python/looker_sdk/sdk/api40/models.py | 49 +++- python/looker_sdk/sdk/constants.py | 2 +- spec/Looker.4.0.json | 74 ++++- spec/Looker.4.0.oas.json | 76 ++++- swift/looker/rtl/constants.swift | 2 +- swift/looker/sdk/methods.swift | 8 +- swift/looker/sdk/models.swift | 93 +++++- swift/looker/sdk/streams.swift | 8 +- test/data.yml.json | 18 +- yarn.lock | 2 +- 26 files changed, 549 insertions(+), 454 deletions(-) diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index bb3f233e1..efc0441f9 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 = "23.20"; + public const string LookerVersion = "24.0"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/4.0/methods.cs b/csharp/sdk/4.0/methods.cs index 37daddeb6..477935975 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -3753,7 +3753,7 @@ public async Task> dashboard( /// You can use this function to change the string and integer properties of /// a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components /// cannot be modified by this function - use the update functions for the respective - /// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + /// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) /// to modify nested objects referenced by a dashboard. /// /// If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -5859,16 +5859,19 @@ public async Task> delete_lookml_model( /// Name of lookml model. /// Name of explore. /// Requested fields. + /// Whether response should include drill field metadata. public async Task> lookml_model_explore( string lookml_model_name, string explore_name, string? fields = null, + bool? add_drills_metadata = null, ITransportSettings? options = null) { lookml_model_name = SdkUtils.EncodeParam(lookml_model_name); explore_name = SdkUtils.EncodeParam(explore_name); return await AuthRequest(HttpMethod.Get, $"/lookml_models/{lookml_model_name}/explores/{explore_name}", new Values { - { "fields", fields }},null,options); + { "fields", fields }, + { "add_drills_metadata", add_drills_metadata }},null,options); } #endregion LookmlModel: Manage LookML Models diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index 864648422..b2152bf86 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 338 API models: 255 Spec, 0 Request, 61 Write, 22 Enum +/// 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum #nullable enable using System; @@ -2487,7 +2487,7 @@ public class Integration : SdkModel public bool? enabled { get; set; } = null; /// Array of params for the integration. public IntegrationParam[]? @params { get; set; } = null; - /// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) + /// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) public SupportedFormats[]? supported_formats { get; set; } = null; /// A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". (read-only) public SupportedActionTypes[]? supported_action_types { get; set; } = null; @@ -2622,6 +2622,8 @@ public class JsonBi : SdkModel 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[] data { get; set; } = null; } @@ -3003,6 +3005,16 @@ public class LookBasic : SdkModel public string? user_id { get; set; } = null; } +public class LookmlFieldLink : SdkModel +{ + /// The name of the link as it would appear to users. (read-only) + public string? label { get; set; } = null; + /// URL the link will go to. (read-only) + public string? url { get; set; } = null; + /// A URL containing an image file to display with a link. (read-only) + public string? icon_url { get; set; } = null; +} + public class LookmlModel : SdkModel { /// Operations the current user is able to perform on this object (read-only) @@ -3164,6 +3176,8 @@ public class LookmlModelExploreField : SdkModel public string? description { get; set; } = null; /// Dimension group if this field is part of a dimension group. If not, this will be null. (read-only) public string? dimension_group { get; set; } = null; + /// Drill fields declared for this field in LookML or default drills for certain types. (read-only) + public string[]? drill_fields { get; set; } = null; /// An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only) public LookmlModelExploreFieldEnumeration[]? enumerations { get; set; } = null; /// An error message indicating a problem with the definition of this field. If there are no errors, this will be null. (read-only) @@ -3179,6 +3193,8 @@ public class LookmlModelExploreField : SdkModel public long? fiscal_month_offset { get; set; } = null; /// Whether this field has a set of allowed_values specified in LookML. (read-only) public bool? has_allowed_values { get; set; } = null; + /// Whether this field has links or drill fields defined. (read-only) + public bool? has_drills_metadata { get; set; } = null; /// Whether this field should be hidden from the user interface. (read-only) public bool? hidden { get; set; } = null; /// Whether this field is a filter. (read-only) @@ -3200,6 +3216,8 @@ public class LookmlModelExploreField : SdkModel public string? label_short { get; set; } = null; /// A URL linking to the definition of this field in the LookML IDE. (read-only) public string? lookml_link { get; set; } = null; + /// Links associated with this field. (read-only) + public LookmlFieldLink[]? links { get; set; } = null; public LookmlModelExploreFieldMapLayer? map_layer { get; set; } /// Whether this field is a measure. (read-only) public bool? measure { get; set; } = null; @@ -5148,7 +5166,7 @@ public enum SupportedDownloadSettings url } -/// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) +/// A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) public enum SupportedFormats { [EnumMember(Value = "txt")] @@ -5165,6 +5183,8 @@ public enum SupportedFormats json_detail, [EnumMember(Value = "json_detail_lite_stream")] json_detail_lite_stream, + [EnumMember(Value = "json_bi")] + json_bi, [EnumMember(Value = "xlsx")] xlsx, [EnumMember(Value = "html")] diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index 53d3c79df..19ba1be84 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -3050,7 +3050,7 @@ func (l *LookerSDK) Dashboard( // You can use this function to change the string and integer properties of // a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components // cannot be modified by this function - use the update functions for the respective -// nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) +// nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) // to modify nested objects referenced by a dashboard. // // If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -3872,7 +3872,7 @@ func (l *LookerSDK) SearchGroups(request RequestSearchGroups, // Boolean search params accept only "true" and "false" as values. // // GET /groups/search/with_roles -> []GroupSearch -func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles, +func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroups, options *rtl.ApiSettings) ([]GroupSearch, error) { var result []GroupSearch err := l.session.Do(&result, "GET", "/4.0", "/groups/search/with_roles", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "filter_or": request.FilterOr, "id": request.Id, "name": request.Name, "external_group_id": request.ExternalGroupId, "externally_managed": request.ExternallyManaged, "externally_orphaned": request.ExternallyOrphaned}, nil, options) @@ -3907,7 +3907,7 @@ func (l *LookerSDK) SearchGroupsWithRoles(request RequestSearchGroupsWithRoles, // Boolean search params accept only "true" and "false" as values. // // GET /groups/search/with_hierarchy -> []GroupHierarchy -func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroupsWithHierarchy, +func (l *LookerSDK) SearchGroupsWithHierarchy(request RequestSearchGroups, options *rtl.ApiSettings) ([]GroupHierarchy, error) { var result []GroupHierarchy err := l.session.Do(&result, "GET", "/4.0", "/groups/search/with_hierarchy", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "filter_or": request.FilterOr, "id": request.Id, "name": request.Name, "external_group_id": request.ExternalGroupId, "externally_managed": request.ExternallyManaged, "externally_orphaned": request.ExternallyOrphaned}, nil, options) @@ -4467,7 +4467,7 @@ func (l *LookerSDK) MoveLook( // ### Get information about all lookml models. // // GET /lookml_models -> []LookmlModel -func (l *LookerSDK) AllLookmlModels(request RequestAllLookmlModels, +func (l *LookerSDK) AllLookmlModels(request RequestArtifactNamespaces, options *rtl.ApiSettings) ([]LookmlModel, error) { var result []LookmlModel err := l.session.Do(&result, "GET", "/4.0", "/lookml_models", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset}, nil, options) @@ -4531,15 +4531,12 @@ func (l *LookerSDK) DeleteLookmlModel( // ### Get information about a lookml model explore. // // GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore -func (l *LookerSDK) LookmlModelExplore( - lookmlModelName string, - exploreName string, - fields string, +func (l *LookerSDK) LookmlModelExplore(request RequestLookmlModelExplore, options *rtl.ApiSettings) (LookmlModelExplore, error) { - lookmlModelName = url.PathEscape(lookmlModelName) - exploreName = url.PathEscape(exploreName) + request.LookmlModelName = url.PathEscape(request.LookmlModelName) + request.ExploreName = url.PathEscape(request.ExploreName) var result LookmlModelExplore - err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/lookml_models/%v/explores/%v", lookmlModelName, exploreName), map[string]interface{}{"fields": fields}, nil, options) + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/lookml_models/%v/explores/%v", request.LookmlModelName, request.ExploreName), map[string]interface{}{"fields": request.Fields, "add_drills_metadata": request.AddDrillsMetadata}, nil, options) return result, err } @@ -6019,7 +6016,7 @@ func (l *LookerSDK) AllPermissions( // Boolean search params accept only "true" and "false" as values. // // GET /permission_sets/search -> []PermissionSet -func (l *LookerSDK) SearchPermissionSets(request RequestSearchPermissionSets, +func (l *LookerSDK) SearchPermissionSets(request RequestSearchModelSets, options *rtl.ApiSettings) ([]PermissionSet, error) { var result []PermissionSet err := l.session.Do(&result, "GET", "/4.0", "/permission_sets/search", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "name": request.Name, "all_access": request.AllAccess, "built_in": request.BuiltIn, "filter_or": request.FilterOr}, nil, options) @@ -6176,7 +6173,7 @@ func (l *LookerSDK) SearchRoles(request RequestSearchRoles, // Boolean search params accept only "true" and "false" as values. // // GET /roles/search/with_user_count -> []RoleSearch -func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRolesWithUserCount, +func (l *LookerSDK) SearchRolesWithUserCount(request RequestSearchRoles, options *rtl.ApiSettings) ([]RoleSearch, error) { var result []RoleSearch err := l.session.Do(&result, "GET", "/4.0", "/roles/search/with_user_count", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "name": request.Name, "built_in": request.BuiltIn, "filter_or": request.FilterOr}, nil, options) @@ -7838,7 +7835,7 @@ func (l *LookerSDK) CreateEmbedUser( // ### Get information about all user attributes. // // GET /user_attributes -> []UserAttribute -func (l *LookerSDK) AllUserAttributes(request RequestAllUserAttributes, +func (l *LookerSDK) AllUserAttributes(request RequestAllBoardSections, options *rtl.ApiSettings) ([]UserAttribute, error) { var result []UserAttribute err := l.session.Do(&result, "GET", "/4.0", "/user_attributes", map[string]interface{}{"fields": request.Fields, "sorts": request.Sorts}, nil, options) diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index 5efac3cae..4a4d04a9e 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -403 API models: 255 Spec, 66 Request, 60 Write, 22 Enum +400 API models: 256 Spec, 61 Request, 61 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -1400,7 +1400,7 @@ type Integration struct { Description *string `json:"description,omitempty"` // Description of the integration. Enabled *bool `json:"enabled,omitempty"` // Whether the integration is available to users. Params *[]IntegrationParam `json:"params,omitempty"` // Array of params for the integration. - SupportedFormats *[]SupportedFormats `json:"supported_formats,omitempty"` // A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". + SupportedFormats *[]SupportedFormats `json:"supported_formats,omitempty"` // A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". SupportedActionTypes *[]SupportedActionTypes `json:"supported_action_types,omitempty"` // A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". SupportedFormattings *[]SupportedFormattings `json:"supported_formattings,omitempty"` // A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "formatted", "unformatted". SupportedVisualizationFormattings *[]SupportedVisualizationFormattings `json:"supported_visualization_formattings,omitempty"` // A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "apply", "noapply". @@ -1476,6 +1476,7 @@ type JsonBi struct { 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 } @@ -1686,6 +1687,12 @@ type LookBasic struct { UserId *string `json:"user_id,omitempty"` // User Id } +type LookmlFieldLink struct { + Label *string `json:"label,omitempty"` // The name of the link as it would appear to users. + Url *string `json:"url,omitempty"` // URL the link will go to. + IconUrl *string `json:"icon_url,omitempty"` // A URL containing an image file to display with a link. +} + type LookmlModel struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object AllowedDbConnectionNames *[]string `json:"allowed_db_connection_names,omitempty"` // Array of names of connections this model is allowed to use @@ -1773,6 +1780,7 @@ type LookmlModelExploreField struct { DefaultFilterValue *string `json:"default_filter_value,omitempty"` // The default value that this field uses when filtering. Null if there is no default value. Description *string `json:"description,omitempty"` // Description DimensionGroup *string `json:"dimension_group,omitempty"` // Dimension group if this field is part of a dimension group. If not, this will be null. + DrillFields *[]string `json:"drill_fields,omitempty"` // Drill fields declared for this field in LookML or default drills for certain types. Enumerations *[]LookmlModelExploreFieldEnumeration `json:"enumerations,omitempty"` // An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. Error *string `json:"error,omitempty"` // An error message indicating a problem with the definition of this field. If there are no errors, this will be null. FieldGroupLabel *string `json:"field_group_label,omitempty"` // A label creating a grouping of fields. All fields with this label should be presented together when displayed in a UI. @@ -1780,6 +1788,7 @@ type LookmlModelExploreField struct { FillStyle *FillStyle `json:"fill_style,omitempty"` // The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range". FiscalMonthOffset *int64 `json:"fiscal_month_offset,omitempty"` // An offset (in months) from the calendar start month to the fiscal start month defined in the LookML model this field belongs to. HasAllowedValues *bool `json:"has_allowed_values,omitempty"` // Whether this field has a set of allowed_values specified in LookML. + HasDrillsMetadata *bool `json:"has_drills_metadata,omitempty"` // Whether this field has links or drill fields defined. Hidden *bool `json:"hidden,omitempty"` // Whether this field should be hidden from the user interface. IsFilter *bool `json:"is_filter,omitempty"` // Whether this field is a filter. IsFiscal *bool `json:"is_fiscal,omitempty"` // Whether this field represents a fiscal time value. @@ -1791,6 +1800,7 @@ type LookmlModelExploreField struct { LabelFromParameter *string `json:"label_from_parameter,omitempty"` // The name of the parameter that will provide a parameterized label for this field, if available in the current context. LabelShort *string `json:"label_short,omitempty"` // The human-readable label of the field, without the view label. LookmlLink *string `json:"lookml_link,omitempty"` // A URL linking to the definition of this field in the LookML IDE. + Links *[]LookmlFieldLink `json:"links,omitempty"` // Links associated with this field. MapLayer *LookmlModelExploreFieldMapLayer `json:"map_layer,omitempty"` Measure *bool `json:"measure,omitempty"` // Whether this field is a measure. Name *string `json:"name,omitempty"` // Fully-qualified name of the field. @@ -2477,13 +2487,6 @@ type RequestAllIntegrations struct { IntegrationHubId *string `json:"integration_hub_id,omitempty"` // Filter to a specific provider } -// Dynamically generated request type for all_lookml_models -type RequestAllLookmlModels struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return. (can be used with offset) - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) -} - // Dynamically generated request type for all_roles type RequestAllRoles struct { Fields *string `json:"fields,omitempty"` // Requested fields. @@ -2497,12 +2500,6 @@ type RequestAllScheduledPlans struct { AllUsers *bool `json:"all_users,omitempty"` // Return scheduled plans belonging to all users (caller needs see_schedules permission) } -// Dynamically generated request type for all_user_attributes -type RequestAllUserAttributes struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Sorts *string `json:"sorts,omitempty"` // Fields to order the results by. Sortable fields include: name, label -} - // Dynamically generated request type for all_users type RequestAllUsers struct { Fields *string `json:"fields,omitempty"` // Requested fields. @@ -2668,6 +2665,14 @@ type RequestLogin struct { ClientSecret *string `json:"client_secret,omitempty"` // client_secret part of API Key. } +// Dynamically generated request type for lookml_model_explore +type RequestLookmlModelExplore struct { + LookmlModelName string `json:"lookml_model_name"` // Name of lookml model. + ExploreName string `json:"explore_name"` // Name of explore. + Fields *string `json:"fields,omitempty"` // Requested fields. + AddDrillsMetadata *bool `json:"add_drills_metadata,omitempty"` // Whether response should include drill field metadata. +} + // Dynamically generated request type for model_fieldname_suggestions type RequestModelFieldnameSuggestions struct { ModelName string `json:"model_name"` // Name of model @@ -2944,34 +2949,6 @@ type RequestSearchGroups struct { ExternallyOrphaned *bool `json:"externally_orphaned,omitempty"` // Match group externally_orphaned. } -// Dynamically generated request type for search_groups_with_hierarchy -type RequestSearchGroupsWithHierarchy struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). - Sorts *string `json:"sorts,omitempty"` // Fields to sort by. - FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression - Id *string `json:"id,omitempty"` // Match group id. - Name *string `json:"name,omitempty"` // Match group name. - ExternalGroupId *string `json:"external_group_id,omitempty"` // Match group external_group_id. - ExternallyManaged *bool `json:"externally_managed,omitempty"` // Match group externally_managed. - ExternallyOrphaned *bool `json:"externally_orphaned,omitempty"` // Match group externally_orphaned. -} - -// Dynamically generated request type for search_groups_with_roles -type RequestSearchGroupsWithRoles struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). - Sorts *string `json:"sorts,omitempty"` // Fields to sort by. - FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression - Id *string `json:"id,omitempty"` // Match group id. - Name *string `json:"name,omitempty"` // Match group name. - ExternalGroupId *string `json:"external_group_id,omitempty"` // Match group external_group_id. - ExternallyManaged *bool `json:"externally_managed,omitempty"` // Match group externally_managed. - ExternallyOrphaned *bool `json:"externally_orphaned,omitempty"` // Match group externally_orphaned. -} - // Dynamically generated request type for search_looks type RequestSearchLooks struct { Id *string `json:"id,omitempty"` // Match look id. @@ -3007,19 +2984,6 @@ type RequestSearchModelSets struct { FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. } -// Dynamically generated request type for search_permission_sets -type RequestSearchPermissionSets struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). - Sorts *string `json:"sorts,omitempty"` // Fields to sort by. - Id *string `json:"id,omitempty"` // Match permission set id. - Name *string `json:"name,omitempty"` // Match permission set name. - AllAccess *bool `json:"all_access,omitempty"` // Match permission sets by all_access status. - BuiltIn *bool `json:"built_in,omitempty"` // Match permission sets by built_in status. - FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. -} - // Dynamically generated request type for search_roles type RequestSearchRoles struct { Fields *string `json:"fields,omitempty"` // Requested fields. @@ -3032,18 +2996,6 @@ type RequestSearchRoles struct { FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. } -// Dynamically generated request type for search_roles_with_user_count -type RequestSearchRolesWithUserCount struct { - Fields *string `json:"fields,omitempty"` // Requested fields. - Limit *int64 `json:"limit,omitempty"` // Number of results to return (used with `offset`). - Offset *int64 `json:"offset,omitempty"` // Number of results to skip before returning any (used with `limit`). - Sorts *string `json:"sorts,omitempty"` // Fields to sort by. - Id *string `json:"id,omitempty"` // Match role id. - Name *string `json:"name,omitempty"` // Match role name. - BuiltIn *bool `json:"built_in,omitempty"` // Match roles by built_in status. - FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. -} - // Dynamically generated request type for search_themes type RequestSearchThemes struct { Id *string `json:"id,omitempty"` // Match theme id. @@ -3608,6 +3560,7 @@ const SupportedFormats_Json SupportedFormats = "json" const SupportedFormats_JsonLabel SupportedFormats = "json_label" const SupportedFormats_JsonDetail SupportedFormats = "json_detail" const SupportedFormats_JsonDetailLiteStream SupportedFormats = "json_detail_lite_stream" +const SupportedFormats_JsonBi SupportedFormats = "json_bi" const SupportedFormats_Xlsx SupportedFormats = "xlsx" const SupportedFormats_Html SupportedFormats = "html" const SupportedFormats_WysiwygPdf SupportedFormats = "wysiwyg_pdf" diff --git a/kotlin/src/main/com/looker/sdk/4.0/methods.kt b/kotlin/src/main/com/looker/sdk/4.0/methods.kt index d541803e5..9db7901db 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/methods.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/methods.kt @@ -3786,7 +3786,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -5982,6 +5982,7 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * @param {String} lookml_model_name Name of lookml model. * @param {String} explore_name Name of explore. * @param {String} fields Requested fields. + * @param {Boolean} add_drills_metadata Whether response should include drill field metadata. * * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> LookmlModelExplore */ @@ -5989,12 +5990,16 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { lookml_model_name: String, explore_name: String, fields: String? = null, + add_drills_metadata: Boolean? = null, ): SDKResponse { val path_lookml_model_name = encodeParam(lookml_model_name) val path_explore_name = encodeParam(explore_name) return this.get( "/lookml_models/${path_lookml_model_name}/explores/${path_explore_name}", - mapOf("fields" to fields), + mapOf( + "fields" to fields, + "add_drills_metadata" to add_drills_metadata, + ), ) } 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 555db528f..0c835eee5 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 @@ */ /** - * 338 API models: 255 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 @@ -2610,7 +2610,7 @@ data class ImportedProject( * @property description Description of the integration. (read-only) * @property enabled Whether the integration is available to users. * @property params Array of params for the integration. - * @property supported_formats A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) + * @property supported_formats A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) * @property supported_action_types A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". (read-only) * @property supported_formattings A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "formatted", "unformatted". (read-only) * @property supported_visualization_formattings A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "apply", "noapply". (read-only) @@ -2753,6 +2753,7 @@ enum class InvestigativeContentType : Serializable { * @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( @@ -2764,6 +2765,7 @@ data class JsonBi( var columns_truncated: String, var filter_expression: String, var filters: Map, + var sql: String, var data: Array, ) : Serializable @@ -3164,6 +3166,17 @@ data class LookBasic( var user_id: String? = null, ) : Serializable +/** + * @property label The name of the link as it would appear to users. (read-only) + * @property url URL the link will go to. (read-only) + * @property icon_url A URL containing an image file to display with a link. (read-only) + */ +data class LookmlFieldLink( + var label: String? = null, + var url: String? = null, + var icon_url: String? = null, +) : Serializable + /** * @property can Operations the current user is able to perform on this object (read-only) * @property allowed_db_connection_names Array of names of connections this model is allowed to use @@ -3324,6 +3337,7 @@ data class LookmlModelExploreError( * @property default_filter_value The default value that this field uses when filtering. Null if there is no default value. (read-only) * @property description Description (read-only) * @property dimension_group Dimension group if this field is part of a dimension group. If not, this will be null. (read-only) + * @property drill_fields Drill fields declared for this field in LookML or default drills for certain types. (read-only) * @property enumerations An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only) * @property error An error message indicating a problem with the definition of this field. If there are no errors, this will be null. (read-only) * @property field_group_label A label creating a grouping of fields. All fields with this label should be presented together when displayed in a UI. (read-only) @@ -3331,6 +3345,7 @@ data class LookmlModelExploreError( * @property fill_style The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range". (read-only) * @property fiscal_month_offset An offset (in months) from the calendar start month to the fiscal start month defined in the LookML model this field belongs to. (read-only) * @property has_allowed_values Whether this field has a set of allowed_values specified in LookML. (read-only) + * @property has_drills_metadata Whether this field has links or drill fields defined. (read-only) * @property hidden Whether this field should be hidden from the user interface. (read-only) * @property is_filter Whether this field is a filter. (read-only) * @property is_fiscal Whether this field represents a fiscal time value. (read-only) @@ -3342,6 +3357,7 @@ data class LookmlModelExploreError( * @property label_from_parameter The name of the parameter that will provide a parameterized label for this field, if available in the current context. (read-only) * @property label_short The human-readable label of the field, without the view label. (read-only) * @property lookml_link A URL linking to the definition of this field in the LookML IDE. (read-only) + * @property links Links associated with this field. (read-only) * @property map_layer * @property measure Whether this field is a measure. (read-only) * @property name Fully-qualified name of the field. (read-only) @@ -3380,6 +3396,7 @@ data class LookmlModelExploreField( var default_filter_value: String? = null, var description: String? = null, var dimension_group: String? = null, + var drill_fields: Array? = null, var enumerations: Array? = null, var error: String? = null, var field_group_label: String? = null, @@ -3387,6 +3404,7 @@ data class LookmlModelExploreField( var fill_style: FillStyle? = null, var fiscal_month_offset: Long? = null, var has_allowed_values: Boolean? = null, + var has_drills_metadata: Boolean? = null, var hidden: Boolean? = null, var is_filter: Boolean? = null, var is_fiscal: Boolean? = null, @@ -3398,6 +3416,7 @@ data class LookmlModelExploreField( var label_from_parameter: String? = null, var label_short: String? = null, var lookml_link: String? = null, + var links: Array? = null, var map_layer: LookmlModelExploreFieldMapLayer? = null, var measure: Boolean? = null, var name: String? = null, @@ -5397,7 +5416,7 @@ enum class SupportedDownloadSettings : Serializable { } /** - * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) + * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) */ enum class SupportedFormats : Serializable { txt, @@ -5407,6 +5426,7 @@ enum class SupportedFormats : Serializable { json_label, json_detail, json_detail_lite_stream, + json_bi, xlsx, html, wysiwyg_pdf, diff --git a/kotlin/src/main/com/looker/sdk/4.0/streams.kt b/kotlin/src/main/com/looker/sdk/4.0/streams.kt index 66352163f..940c6b550 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/streams.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/streams.kt @@ -3784,7 +3784,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -5980,6 +5980,7 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * @param {String} lookml_model_name Name of lookml model. * @param {String} explore_name Name of explore. * @param {String} fields Requested fields. + * @param {Boolean} add_drills_metadata Whether response should include drill field metadata. * * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> ByteArray */ @@ -5987,12 +5988,16 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { lookml_model_name: String, explore_name: String, fields: String? = null, + add_drills_metadata: Boolean? = null, ): SDKResponse { val path_lookml_model_name = encodeParam(lookml_model_name) val path_explore_name = encodeParam(explore_name) return this.get( "/lookml_models/${path_lookml_model_name}/explores/${path_explore_name}", - mapOf("fields" to fields), + mapOf( + "fields" to fields, + "add_drills_metadata" to add_drills_metadata, + ), ) } diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index aa6ce6f25..cdf12e1df 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 = "23.20" +const val LOOKER_VERSION = "24.0" 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/funcs.ts b/packages/sdk/src/4.0/funcs.ts index fe87e8703..6785f9e26 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -170,10 +170,8 @@ import type { IRequestAllGroupUsers, IRequestAllGroups, IRequestAllIntegrations, - IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, - IRequestAllUserAttributes, IRequestAllUsers, IRequestArtifact, IRequestArtifactNamespaces, @@ -192,6 +190,7 @@ import type { IRequestGraphDerivedTablesForModel, IRequestGraphDerivedTablesForView, IRequestLogin, + IRequestLookmlModelExplore, IRequestModelFieldnameSuggestions, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -213,13 +212,9 @@ import type { IRequestSearchDashboards, IRequestSearchFolders, IRequestSearchGroups, - IRequestSearchGroupsWithHierarchy, - IRequestSearchGroupsWithRoles, IRequestSearchLooks, IRequestSearchModelSets, - IRequestSearchPermissionSets, IRequestSearchRoles, - IRequestSearchRolesWithUserCount, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -5348,7 +5343,7 @@ export const dashboard = async ( * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -6829,13 +6824,13 @@ export const search_groups = async ( * GET /groups/search/with_roles -> IGroupSearch[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestSearchGroupsWithRoles" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ export const search_groups_with_roles = async ( sdk: IAPIMethods, - request: IRequestSearchGroupsWithRoles, + request: IRequestSearchGroups, options?: Partial ): Promise> => { return sdk.get( @@ -6887,13 +6882,13 @@ export const search_groups_with_roles = async ( * GET /groups/search/with_hierarchy -> IGroupHierarchy[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestSearchGroupsWithHierarchy" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ export const search_groups_with_hierarchy = async ( sdk: IAPIMethods, - request: IRequestSearchGroupsWithHierarchy, + request: IRequestSearchGroups, options?: Partial ): Promise> => { return sdk.get( @@ -7882,13 +7877,13 @@ export const move_look = async ( * GET /lookml_models -> ILookmlModel[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestAllLookmlModels" for complex method parameters + * @param request composed interface "IRequestArtifactNamespaces" for complex method parameters * @param options one-time API call overrides * */ export const all_lookml_models = async ( sdk: IAPIMethods, - request: IRequestAllLookmlModels, + request: IRequestArtifactNamespaces, options?: Partial ): Promise> => { return sdk.get( @@ -8004,24 +7999,23 @@ export const delete_lookml_model = async ( * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> ILookmlModelExplore * * @param sdk IAPIMethods implementation - * @param lookml_model_name Name of lookml model. - * @param explore_name Name of explore. - * @param fields Requested fields. + * @param request composed interface "IRequestLookmlModelExplore" for complex method parameters * @param options one-time API call overrides * */ export const lookml_model_explore = async ( sdk: IAPIMethods, - lookml_model_name: string, - explore_name: string, - fields?: string, + request: IRequestLookmlModelExplore, options?: Partial ): Promise> => { - lookml_model_name = encodeParam(lookml_model_name); - explore_name = encodeParam(explore_name); + request.lookml_model_name = encodeParam(request.lookml_model_name); + request.explore_name = encodeParam(request.explore_name); return sdk.get( - `/lookml_models/${lookml_model_name}/explores/${explore_name}`, - { fields }, + `/lookml_models/${request.lookml_model_name}/explores/${request.explore_name}`, + { + fields: request.fields, + add_drills_metadata: request.add_drills_metadata, + }, null, options ); @@ -10392,13 +10386,13 @@ export const all_permissions = async ( * GET /permission_sets/search -> IPermissionSet[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestSearchPermissionSets" for complex method parameters + * @param request composed interface "IRequestSearchModelSets" for complex method parameters * @param options one-time API call overrides * */ export const search_permission_sets = async ( sdk: IAPIMethods, - request: IRequestSearchPermissionSets, + request: IRequestSearchModelSets, options?: Partial ): Promise> => { return sdk.get( @@ -10672,13 +10666,13 @@ export const search_roles = async ( * GET /roles/search/with_user_count -> IRoleSearch[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestSearchRolesWithUserCount" for complex method parameters + * @param request composed interface "IRequestSearchRoles" for complex method parameters * @param options one-time API call overrides * */ export const search_roles_with_user_count = async ( sdk: IAPIMethods, - request: IRequestSearchRolesWithUserCount, + request: IRequestSearchRoles, options?: Partial ): Promise> => { return sdk.get( @@ -13357,13 +13351,13 @@ export const create_embed_user = async ( * GET /user_attributes -> IUserAttribute[] * * @param sdk IAPIMethods implementation - * @param request composed interface "IRequestAllUserAttributes" for complex method parameters + * @param request composed interface "IRequestAllBoardSections" for complex method parameters * @param options one-time API call overrides * */ export const all_user_attributes = async ( sdk: IAPIMethods, - request: IRequestAllUserAttributes, + request: IRequestAllBoardSections, options?: Partial ): Promise> => { return sdk.get( diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 8fdc97c16..9728c8f5c 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -168,10 +168,8 @@ import type { IRequestAllGroupUsers, IRequestAllGroups, IRequestAllIntegrations, - IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, - IRequestAllUserAttributes, IRequestAllUsers, IRequestArtifact, IRequestArtifactNamespaces, @@ -190,6 +188,7 @@ import type { IRequestGraphDerivedTablesForModel, IRequestGraphDerivedTablesForView, IRequestLogin, + IRequestLookmlModelExplore, IRequestModelFieldnameSuggestions, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -211,13 +210,9 @@ import type { IRequestSearchDashboards, IRequestSearchFolders, IRequestSearchGroups, - IRequestSearchGroupsWithHierarchy, - IRequestSearchGroupsWithRoles, IRequestSearchLooks, IRequestSearchModelSets, - IRequestSearchPermissionSets, IRequestSearchRoles, - IRequestSearchRolesWithUserCount, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -5026,7 +5021,7 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -6402,12 +6397,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /groups/search/with_roles -> IGroupSearch[] * - * @param request composed interface "IRequestSearchGroupsWithRoles" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ async search_groups_with_roles( - request: IRequestSearchGroupsWithRoles, + request: IRequestSearchGroups, options?: Partial ): Promise> { return this.get( @@ -6458,12 +6453,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /groups/search/with_hierarchy -> IGroupHierarchy[] * - * @param request composed interface "IRequestSearchGroupsWithHierarchy" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ async search_groups_with_hierarchy( - request: IRequestSearchGroupsWithHierarchy, + request: IRequestSearchGroups, options?: Partial ): Promise> { return this.get( @@ -7398,12 +7393,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /lookml_models -> ILookmlModel[] * - * @param request composed interface "IRequestAllLookmlModels" for complex method parameters + * @param request composed interface "IRequestArtifactNamespaces" for complex method parameters * @param options one-time API call overrides * */ async all_lookml_models( - request: IRequestAllLookmlModels, + request: IRequestArtifactNamespaces, options?: Partial ): Promise> { return this.get( @@ -7510,23 +7505,22 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> ILookmlModelExplore * - * @param lookml_model_name Name of lookml model. - * @param explore_name Name of explore. - * @param fields Requested fields. + * @param request composed interface "IRequestLookmlModelExplore" for complex method parameters * @param options one-time API call overrides * */ async lookml_model_explore( - lookml_model_name: string, - explore_name: string, - fields?: string, + request: IRequestLookmlModelExplore, options?: Partial ): Promise> { - lookml_model_name = encodeParam(lookml_model_name); - explore_name = encodeParam(explore_name); + request.lookml_model_name = encodeParam(request.lookml_model_name); + request.explore_name = encodeParam(request.explore_name); return this.get( - `/lookml_models/${lookml_model_name}/explores/${explore_name}`, - { fields }, + `/lookml_models/${request.lookml_model_name}/explores/${request.explore_name}`, + { + fields: request.fields, + add_drills_metadata: request.add_drills_metadata, + }, null, options ); @@ -9767,12 +9761,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /permission_sets/search -> IPermissionSet[] * - * @param request composed interface "IRequestSearchPermissionSets" for complex method parameters + * @param request composed interface "IRequestSearchModelSets" for complex method parameters * @param options one-time API call overrides * */ async search_permission_sets( - request: IRequestSearchPermissionSets, + request: IRequestSearchModelSets, options?: Partial ): Promise> { return this.get( @@ -10029,12 +10023,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /roles/search/with_user_count -> IRoleSearch[] * - * @param request composed interface "IRequestSearchRolesWithUserCount" for complex method parameters + * @param request composed interface "IRequestSearchRoles" for complex method parameters * @param options one-time API call overrides * */ async search_roles_with_user_count( - request: IRequestSearchRolesWithUserCount, + request: IRequestSearchRoles, options?: Partial ): Promise> { return this.get( @@ -12572,12 +12566,12 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /user_attributes -> IUserAttribute[] * - * @param request composed interface "IRequestAllUserAttributes" for complex method parameters + * @param request composed interface "IRequestAllBoardSections" for complex method parameters * @param options one-time API call overrides * */ async all_user_attributes( - request: IRequestAllUserAttributes, + request: IRequestAllBoardSections, options?: Partial ): Promise> { return this.get( diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 243ddc005..20ffc4e4a 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -165,10 +165,8 @@ import type { IRequestAllGroupUsers, IRequestAllGroups, IRequestAllIntegrations, - IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, - IRequestAllUserAttributes, IRequestAllUsers, IRequestArtifact, IRequestArtifactNamespaces, @@ -187,6 +185,7 @@ import type { IRequestGraphDerivedTablesForModel, IRequestGraphDerivedTablesForView, IRequestLogin, + IRequestLookmlModelExplore, IRequestModelFieldnameSuggestions, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -208,13 +207,9 @@ import type { IRequestSearchDashboards, IRequestSearchFolders, IRequestSearchGroups, - IRequestSearchGroupsWithHierarchy, - IRequestSearchGroupsWithRoles, IRequestSearchLooks, IRequestSearchModelSets, - IRequestSearchPermissionSets, IRequestSearchRoles, - IRequestSearchRolesWithUserCount, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -3657,7 +3652,7 @@ export interface ILooker40SDK extends IAPIMethods { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -4584,12 +4579,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /groups/search/with_roles -> IGroupSearch[] * - * @param request composed interface "IRequestSearchGroupsWithRoles" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ search_groups_with_roles( - request: IRequestSearchGroupsWithRoles, + request: IRequestSearchGroups, options?: Partial ): Promise>; @@ -4622,12 +4617,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /groups/search/with_hierarchy -> IGroupHierarchy[] * - * @param request composed interface "IRequestSearchGroupsWithHierarchy" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ search_groups_with_hierarchy( - request: IRequestSearchGroupsWithHierarchy, + request: IRequestSearchGroups, options?: Partial ): Promise>; @@ -5253,12 +5248,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /lookml_models -> ILookmlModel[] * - * @param request composed interface "IRequestAllLookmlModels" for complex method parameters + * @param request composed interface "IRequestArtifactNamespaces" for complex method parameters * @param options one-time API call overrides * */ all_lookml_models( - request: IRequestAllLookmlModels, + request: IRequestArtifactNamespaces, options?: Partial ): Promise>; @@ -5327,16 +5322,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> ILookmlModelExplore * - * @param lookml_model_name Name of lookml model. - * @param explore_name Name of explore. - * @param fields Requested fields. + * @param request composed interface "IRequestLookmlModelExplore" for complex method parameters * @param options one-time API call overrides * */ lookml_model_explore( - lookml_model_name: string, - explore_name: string, - fields?: string, + request: IRequestLookmlModelExplore, options?: Partial ): Promise>; @@ -6940,12 +6931,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /permission_sets/search -> IPermissionSet[] * - * @param request composed interface "IRequestSearchPermissionSets" for complex method parameters + * @param request composed interface "IRequestSearchModelSets" for complex method parameters * @param options one-time API call overrides * */ search_permission_sets( - request: IRequestSearchPermissionSets, + request: IRequestSearchModelSets, options?: Partial ): Promise>; @@ -7117,12 +7108,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /roles/search/with_user_count -> IRoleSearch[] * - * @param request composed interface "IRequestSearchRolesWithUserCount" for complex method parameters + * @param request composed interface "IRequestSearchRoles" for complex method parameters * @param options one-time API call overrides * */ search_roles_with_user_count( - request: IRequestSearchRolesWithUserCount, + request: IRequestSearchRoles, options?: Partial ): Promise>; @@ -8957,12 +8948,12 @@ export interface ILooker40SDK extends IAPIMethods { * * GET /user_attributes -> IUserAttribute[] * - * @param request composed interface "IRequestAllUserAttributes" for complex method parameters + * @param request composed interface "IRequestAllBoardSections" for complex method parameters * @param options one-time API call overrides * */ all_user_attributes( - request: IRequestAllUserAttributes, + request: IRequestAllBoardSections, options?: Partial ): Promise>; diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index e07b38d60..93a78f012 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 404 API models: 255 Spec, 66 Request, 61 Write, 22 Enum + * 400 API models: 256 Spec, 61 Request, 61 Write, 22 Enum */ import type { DelimArray, IDictionary } from '@looker/sdk-rtl'; @@ -4194,7 +4194,7 @@ export interface IIntegration { */ params?: IIntegrationParam[]; /** - * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) + * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) */ supported_formats?: SupportedFormats[]; /** @@ -4419,6 +4419,10 @@ export interface IJsonBi { * 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) */ @@ -5091,6 +5095,21 @@ export interface ILookBasic { user_id?: string | null; } +export interface ILookmlFieldLink { + /** + * The name of the link as it would appear to users. (read-only) + */ + label?: string; + /** + * URL the link will go to. (read-only) + */ + url?: string; + /** + * A URL containing an image file to display with a link. (read-only) + */ + icon_url?: string | null; +} + export interface ILookmlModel { /** * Operations the current user is able to perform on this object (read-only) @@ -5370,6 +5389,10 @@ export interface ILookmlModelExploreField { * Dimension group if this field is part of a dimension group. If not, this will be null. (read-only) */ dimension_group?: string | null; + /** + * Drill fields declared for this field in LookML or default drills for certain types. (read-only) + */ + drill_fields?: string[] | null; /** * An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only) */ @@ -5398,6 +5421,10 @@ export interface ILookmlModelExploreField { * Whether this field has a set of allowed_values specified in LookML. (read-only) */ has_allowed_values?: boolean; + /** + * Whether this field has links or drill fields defined. (read-only) + */ + has_drills_metadata?: boolean; /** * Whether this field should be hidden from the user interface. (read-only) */ @@ -5439,6 +5466,10 @@ export interface ILookmlModelExploreField { * A URL linking to the definition of this field in the LookML IDE. (read-only) */ lookml_link?: string | null; + /** + * Links associated with this field. (read-only) + */ + links?: ILookmlFieldLink[] | null; map_layer?: ILookmlModelExploreFieldMapLayer; /** * Whether this field is a measure. (read-only) @@ -7533,24 +7564,6 @@ export interface IRequestAllIntegrations { integration_hub_id?: string | null; } -/** - * Dynamically generated request type for all_lookml_models - */ -export interface IRequestAllLookmlModels { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Number of results to return. (can be used with offset) - */ - limit?: number | null; - /** - * Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) - */ - offset?: number | null; -} - /** * Dynamically generated request type for all_roles */ @@ -7583,20 +7596,6 @@ export interface IRequestAllScheduledPlans { all_users?: boolean | null; } -/** - * Dynamically generated request type for all_user_attributes - */ -export interface IRequestAllUserAttributes { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Fields to order the results by. Sortable fields include: name, label - */ - sorts?: string | null; -} - /** * Dynamically generated request type for all_users */ @@ -8077,6 +8076,28 @@ export interface IRequestLogin { client_secret?: string | null; } +/** + * Dynamically generated request type for lookml_model_explore + */ +export interface IRequestLookmlModelExplore { + /** + * Name of lookml model. + */ + lookml_model_name: string; + /** + * Name of explore. + */ + explore_name: string; + /** + * Requested fields. + */ + fields?: string | null; + /** + * Whether response should include drill field metadata. + */ + add_drills_metadata?: boolean | null; +} + /** * Dynamically generated request type for model_fieldname_suggestions */ @@ -8971,98 +8992,6 @@ export interface IRequestSearchGroups { externally_orphaned?: boolean | null; } -/** - * Dynamically generated request type for search_groups_with_hierarchy - */ -export interface IRequestSearchGroupsWithHierarchy { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Number of results to return (used with `offset`). - */ - limit?: number | null; - /** - * Number of results to skip before returning any (used with `limit`). - */ - offset?: number | null; - /** - * Fields to sort by. - */ - sorts?: string | null; - /** - * Combine given search criteria in a boolean OR expression - */ - filter_or?: boolean | null; - /** - * Match group id. - */ - id?: string | null; - /** - * Match group name. - */ - name?: string | null; - /** - * Match group external_group_id. - */ - external_group_id?: string | null; - /** - * Match group externally_managed. - */ - externally_managed?: boolean | null; - /** - * Match group externally_orphaned. - */ - externally_orphaned?: boolean | null; -} - -/** - * Dynamically generated request type for search_groups_with_roles - */ -export interface IRequestSearchGroupsWithRoles { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Number of results to return (used with `offset`). - */ - limit?: number | null; - /** - * Number of results to skip before returning any (used with `limit`). - */ - offset?: number | null; - /** - * Fields to sort by. - */ - sorts?: string | null; - /** - * Combine given search criteria in a boolean OR expression - */ - filter_or?: boolean | null; - /** - * Match group id. - */ - id?: string | null; - /** - * Match group name. - */ - name?: string | null; - /** - * Match group external_group_id. - */ - external_group_id?: string | null; - /** - * Match group externally_managed. - */ - externally_managed?: boolean | null; - /** - * Match group externally_orphaned. - */ - externally_orphaned?: boolean | null; -} - /** * Dynamically generated request type for search_looks */ @@ -9183,48 +9112,6 @@ export interface IRequestSearchModelSets { filter_or?: boolean | null; } -/** - * Dynamically generated request type for search_permission_sets - */ -export interface IRequestSearchPermissionSets { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Number of results to return (used with `offset`). - */ - limit?: number | null; - /** - * Number of results to skip before returning any (used with `limit`). - */ - offset?: number | null; - /** - * Fields to sort by. - */ - sorts?: string | null; - /** - * Match permission set id. - */ - id?: string | null; - /** - * Match permission set name. - */ - name?: string | null; - /** - * Match permission sets by all_access status. - */ - all_access?: boolean | null; - /** - * Match permission sets by built_in status. - */ - built_in?: boolean | null; - /** - * Combine given search criteria in a boolean OR expression. - */ - filter_or?: boolean | null; -} - /** * Dynamically generated request type for search_roles */ @@ -9263,44 +9150,6 @@ export interface IRequestSearchRoles { filter_or?: boolean | null; } -/** - * Dynamically generated request type for search_roles_with_user_count - */ -export interface IRequestSearchRolesWithUserCount { - /** - * Requested fields. - */ - fields?: string | null; - /** - * Number of results to return (used with `offset`). - */ - limit?: number | null; - /** - * Number of results to skip before returning any (used with `limit`). - */ - offset?: number | null; - /** - * Fields to sort by. - */ - sorts?: string | null; - /** - * Match role id. - */ - id?: string | null; - /** - * Match role name. - */ - name?: string | null; - /** - * Match roles by built_in status. - */ - built_in?: boolean | null; - /** - * Combine given search criteria in a boolean OR expression. - */ - filter_or?: boolean | null; -} - /** * Dynamically generated request type for search_themes */ @@ -10953,7 +10802,7 @@ export enum SupportedDownloadSettings { } /** - * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) + * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) */ export enum SupportedFormats { txt = 'txt', @@ -10963,6 +10812,7 @@ export enum SupportedFormats { json_label = 'json_label', json_detail = 'json_detail', json_detail_lite_stream = 'json_detail_lite_stream', + json_bi = 'json_bi', xlsx = 'xlsx', html = 'html', wysiwyg_pdf = 'wysiwyg_pdf', diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index add48c25e..86e166cde 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -167,10 +167,8 @@ import type { IRequestAllGroupUsers, IRequestAllGroups, IRequestAllIntegrations, - IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, - IRequestAllUserAttributes, IRequestAllUsers, IRequestArtifact, IRequestArtifactNamespaces, @@ -189,6 +187,7 @@ import type { IRequestGraphDerivedTablesForModel, IRequestGraphDerivedTablesForView, IRequestLogin, + IRequestLookmlModelExplore, IRequestModelFieldnameSuggestions, IRequestRoleUsers, IRequestRunGitConnectionTest, @@ -210,13 +209,9 @@ import type { IRequestSearchDashboards, IRequestSearchFolders, IRequestSearchGroups, - IRequestSearchGroupsWithHierarchy, - IRequestSearchGroupsWithRoles, IRequestSearchLooks, IRequestSearchModelSets, - IRequestSearchPermissionSets, IRequestSearchRoles, - IRequestSearchRolesWithUserCount, IRequestSearchThemes, IRequestSearchUserLoginLockouts, IRequestSearchUsers, @@ -5742,7 +5737,7 @@ export class Looker40SDKStream extends APIMethods { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -7335,13 +7330,13 @@ export class Looker40SDKStream extends APIMethods { * GET /groups/search/with_roles -> IGroupSearch[] * * @param callback streaming output function - * @param request composed interface "IRequestSearchGroupsWithRoles" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ async search_groups_with_roles( callback: (readable: Readable) => Promise, - request: IRequestSearchGroupsWithRoles, + request: IRequestSearchGroups, options?: Partial ) { return this.authStream( @@ -7395,13 +7390,13 @@ export class Looker40SDKStream extends APIMethods { * GET /groups/search/with_hierarchy -> IGroupHierarchy[] * * @param callback streaming output function - * @param request composed interface "IRequestSearchGroupsWithHierarchy" for complex method parameters + * @param request composed interface "IRequestSearchGroups" for complex method parameters * @param options one-time API call overrides * */ async search_groups_with_hierarchy( callback: (readable: Readable) => Promise, - request: IRequestSearchGroupsWithHierarchy, + request: IRequestSearchGroups, options?: Partial ) { return this.authStream( @@ -8472,13 +8467,13 @@ export class Looker40SDKStream extends APIMethods { * GET /lookml_models -> ILookmlModel[] * * @param callback streaming output function - * @param request composed interface "IRequestAllLookmlModels" for complex method parameters + * @param request composed interface "IRequestArtifactNamespaces" for complex method parameters * @param options one-time API call overrides * */ async all_lookml_models( callback: (readable: Readable) => Promise, - request: IRequestAllLookmlModels, + request: IRequestArtifactNamespaces, options?: Partial ) { return this.authStream( @@ -8604,26 +8599,25 @@ export class Looker40SDKStream extends APIMethods { * GET /lookml_models/{lookml_model_name}/explores/{explore_name} -> ILookmlModelExplore * * @param callback streaming output function - * @param lookml_model_name Name of lookml model. - * @param explore_name Name of explore. - * @param fields Requested fields. + * @param request composed interface "IRequestLookmlModelExplore" for complex method parameters * @param options one-time API call overrides * */ async lookml_model_explore( callback: (readable: Readable) => Promise, - lookml_model_name: string, - explore_name: string, - fields?: string, + request: IRequestLookmlModelExplore, options?: Partial ) { - lookml_model_name = encodeParam(lookml_model_name); - explore_name = encodeParam(explore_name); + request.lookml_model_name = encodeParam(request.lookml_model_name); + request.explore_name = encodeParam(request.explore_name); return this.authStream( callback, 'GET', - `/lookml_models/${lookml_model_name}/explores/${explore_name}`, - { fields }, + `/lookml_models/${request.lookml_model_name}/explores/${request.explore_name}`, + { + fields: request.fields, + add_drills_metadata: request.add_drills_metadata, + }, null, options ); @@ -11155,13 +11149,13 @@ export class Looker40SDKStream extends APIMethods { * GET /permission_sets/search -> IPermissionSet[] * * @param callback streaming output function - * @param request composed interface "IRequestSearchPermissionSets" for complex method parameters + * @param request composed interface "IRequestSearchModelSets" for complex method parameters * @param options one-time API call overrides * */ async search_permission_sets( callback: (readable: Readable) => Promise, - request: IRequestSearchPermissionSets, + request: IRequestSearchModelSets, options?: Partial ) { return this.authStream( @@ -11453,13 +11447,13 @@ export class Looker40SDKStream extends APIMethods { * GET /roles/search/with_user_count -> IRoleSearch[] * * @param callback streaming output function - * @param request composed interface "IRequestSearchRolesWithUserCount" for complex method parameters + * @param request composed interface "IRequestSearchRoles" for complex method parameters * @param options one-time API call overrides * */ async search_roles_with_user_count( callback: (readable: Readable) => Promise, - request: IRequestSearchRolesWithUserCount, + request: IRequestSearchRoles, options?: Partial ) { return this.authStream( @@ -14345,13 +14339,13 @@ export class Looker40SDKStream extends APIMethods { * GET /user_attributes -> IUserAttribute[] * * @param callback streaming output function - * @param request composed interface "IRequestAllUserAttributes" for complex method parameters + * @param request composed interface "IRequestAllBoardSections" for complex method parameters * @param options one-time API call overrides * */ async all_user_attributes( callback: (readable: Readable) => Promise, - request: IRequestAllUserAttributes, + request: IRequestAllBoardSections, options?: Partial ) { return this.authStream( diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index cd35959fb..69c36cc97 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '23.20'; +export const sdkVersion = '24.0'; export const environmentPrefix = 'LOOKERSDK'; diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index d7cfc0f09..6de2af2b8 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -35,6 +35,7 @@ class Looker40SDK(api_methods.APIMethods): + # region Alert: Alert # Follow an alert. @@ -4851,7 +4852,7 @@ def dashboard( # You can use this function to change the string and integer properties of # a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components # cannot be modified by this function - use the update functions for the respective - # nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + # nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) # to modify nested objects referenced by a dashboard. # # If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -7550,6 +7551,8 @@ def lookml_model_explore( explore_name: str, # Requested fields. fields: Optional[str] = None, + # Whether response should include drill field metadata. + add_drills_metadata: Optional[bool] = None, transport_options: Optional[transport.TransportOptions] = None, ) -> mdls.LookmlModelExplore: """Get LookML Model Explore""" @@ -7560,7 +7563,10 @@ def lookml_model_explore( self.get( path=f"/lookml_models/{lookml_model_name}/explores/{explore_name}", structure=mdls.LookmlModelExplore, - query_params={"fields": fields}, + query_params={ + "fields": fields, + "add_drills_metadata": add_drills_metadata, + }, transport_options=transport_options, ), ) @@ -13193,6 +13199,3 @@ def workspace( return response # endregion - - -LookerSDK = Looker40SDK diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 036342b75..f694325fc 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 338 API models: 255 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 @@ -5474,7 +5474,7 @@ class Integration(model.Model): description: Description of the integration. enabled: Whether the integration is available to users. params: Array of params for the integration. - supported_formats: A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". + supported_formats: A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". supported_action_types: A list of action types the integration supports. Valid values are: "cell", "query", "dashboard", "none". supported_formattings: A list of formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "formatted", "unformatted". supported_visualization_formattings: A list of visualization formatting options the integration supports. If unspecified, defaults to all formats. Valid values are: "apply", "noapply". @@ -5786,6 +5786,7 @@ class JsonBi(model.Model): 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 """ @@ -5797,6 +5798,7 @@ class JsonBi(model.Model): columns_truncated: str filter_expression: str filters: MutableMapping[str, Any] + sql: str data: Sequence[str] __annotations__ = { "big_query_metadata": ForwardRef("JsonBiBigQueryMetadata"), @@ -5807,6 +5809,7 @@ class JsonBi(model.Model): "columns_truncated": str, "filter_expression": str, "filters": MutableMapping[str, Any], + "sql": str, "data": Sequence[str], } @@ -5821,6 +5824,7 @@ def __init__( columns_truncated: str, filter_expression: str, filters: MutableMapping[str, Any], + sql: str, data: Sequence[str] ): self.big_query_metadata = big_query_metadata @@ -5831,6 +5835,7 @@ def __init__( self.columns_truncated = columns_truncated self.filter_expression = filter_expression self.filters = filters + self.sql = sql self.data = data @@ -6671,6 +6676,31 @@ def __init__( self.user_id = user_id +@attr.s(auto_attribs=True, init=False) +class LookmlFieldLink(model.Model): + """ + Attributes: + label: The name of the link as it would appear to users. + url: URL the link will go to. + icon_url: A URL containing an image file to display with a link. + """ + + label: Optional[str] = None + url: Optional[str] = None + icon_url: Optional[str] = None + + def __init__( + self, + *, + label: Optional[str] = None, + url: Optional[str] = None, + icon_url: Optional[str] = None + ): + self.label = label + self.url = url + self.icon_url = icon_url + + @attr.s(auto_attribs=True, init=False) class LookmlModel(model.Model): """ @@ -6998,6 +7028,7 @@ class LookmlModelExploreField(model.Model): default_filter_value: The default value that this field uses when filtering. Null if there is no default value. description: Description dimension_group: Dimension group if this field is part of a dimension group. If not, this will be null. + drill_fields: Drill fields declared for this field in LookML or default drills for certain types. enumerations: An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. error: An error message indicating a problem with the definition of this field. If there are no errors, this will be null. field_group_label: A label creating a grouping of fields. All fields with this label should be presented together when displayed in a UI. @@ -7005,6 +7036,7 @@ class LookmlModelExploreField(model.Model): fill_style: The style of dimension fill that is possible for this field. Null if no dimension fill is possible. Valid values are: "enumeration", "range". fiscal_month_offset: An offset (in months) from the calendar start month to the fiscal start month defined in the LookML model this field belongs to. has_allowed_values: Whether this field has a set of allowed_values specified in LookML. + has_drills_metadata: Whether this field has links or drill fields defined. hidden: Whether this field should be hidden from the user interface. is_filter: Whether this field is a filter. is_fiscal: Whether this field represents a fiscal time value. @@ -7016,6 +7048,7 @@ class LookmlModelExploreField(model.Model): label_from_parameter: The name of the parameter that will provide a parameterized label for this field, if available in the current context. label_short: The human-readable label of the field, without the view label. lookml_link: A URL linking to the definition of this field in the LookML IDE. + links: Links associated with this field. map_layer: measure: Whether this field is a measure. name: Fully-qualified name of the field. @@ -7054,6 +7087,7 @@ class LookmlModelExploreField(model.Model): default_filter_value: Optional[str] = None description: Optional[str] = None dimension_group: Optional[str] = None + drill_fields: Optional[Sequence[str]] = None enumerations: Optional[Sequence["LookmlModelExploreFieldEnumeration"]] = None error: Optional[str] = None field_group_label: Optional[str] = None @@ -7061,6 +7095,7 @@ class LookmlModelExploreField(model.Model): fill_style: Optional["FillStyle"] = None fiscal_month_offset: Optional[int] = None has_allowed_values: Optional[bool] = None + has_drills_metadata: Optional[bool] = None hidden: Optional[bool] = None is_filter: Optional[bool] = None is_fiscal: Optional[bool] = None @@ -7072,6 +7107,7 @@ class LookmlModelExploreField(model.Model): label_from_parameter: Optional[str] = None label_short: Optional[str] = None lookml_link: Optional[str] = None + links: Optional[Sequence["LookmlFieldLink"]] = None map_layer: Optional["LookmlModelExploreFieldMapLayer"] = None measure: Optional[bool] = None name: Optional[str] = None @@ -7112,6 +7148,7 @@ def __init__( default_filter_value: Optional[str] = None, description: Optional[str] = None, dimension_group: Optional[str] = None, + drill_fields: Optional[Sequence[str]] = None, enumerations: Optional[Sequence["LookmlModelExploreFieldEnumeration"]] = None, error: Optional[str] = None, field_group_label: Optional[str] = None, @@ -7119,6 +7156,7 @@ def __init__( fill_style: Optional["FillStyle"] = None, fiscal_month_offset: Optional[int] = None, has_allowed_values: Optional[bool] = None, + has_drills_metadata: Optional[bool] = None, hidden: Optional[bool] = None, is_filter: Optional[bool] = None, is_fiscal: Optional[bool] = None, @@ -7130,6 +7168,7 @@ def __init__( label_from_parameter: Optional[str] = None, label_short: Optional[str] = None, lookml_link: Optional[str] = None, + links: Optional[Sequence["LookmlFieldLink"]] = None, map_layer: Optional["LookmlModelExploreFieldMapLayer"] = None, measure: Optional[bool] = None, name: Optional[str] = None, @@ -7169,6 +7208,7 @@ def __init__( self.default_filter_value = default_filter_value self.description = description self.dimension_group = dimension_group + self.drill_fields = drill_fields self.enumerations = enumerations self.error = error self.field_group_label = field_group_label @@ -7176,6 +7216,7 @@ def __init__( self.fill_style = fill_style self.fiscal_month_offset = fiscal_month_offset self.has_allowed_values = has_allowed_values + self.has_drills_metadata = has_drills_metadata self.hidden = hidden self.is_filter = is_filter self.is_fiscal = is_fiscal @@ -7187,6 +7228,7 @@ def __init__( self.label_from_parameter = label_from_parameter self.label_short = label_short self.lookml_link = lookml_link + self.links = links self.map_layer = map_layer self.measure = measure self.name = name @@ -11343,7 +11385,7 @@ class SupportedDownloadSettings(enum.Enum): class SupportedFormats(enum.Enum): """ - A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) + A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) """ @@ -11354,6 +11396,7 @@ class SupportedFormats(enum.Enum): json_label = "json_label" json_detail = "json_detail" json_detail_lite_stream = "json_detail_lite_stream" + json_bi = "json_bi" xlsx = "xlsx" html = "html" wysiwyg_pdf = "wysiwyg_pdf" diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 374eb9a96..050420546 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 = "23.20" +sdk_version = "24.0" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 1156e9fd6..c11d6a863 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.23.21", - "x-looker-release-version": "23.21.112", + "version": "4.0.24.0", + "x-looker-release-version": "24.0.17", "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": { @@ -11,7 +11,7 @@ }, "license": { "name": "EULA", - "url": "https://gcplmaster.dev.looker.com/eula" + "url": "https://localhost:10000/eula" } }, "basePath": "/api/4.0", @@ -21,7 +21,7 @@ "produces": [ "application/json" ], - "host": "gcplmaster.dev.looker.com:443", + "host": "localhost:20000", "schemes": [ "https" ], @@ -4628,7 +4628,7 @@ ], "operationId": "update_dashboard", "summary": "Update Dashboard", - "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", + "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", "parameters": [ { "name": "dashboard_id", @@ -12804,6 +12804,13 @@ "description": "Requested fields.", "required": false, "type": "string" + }, + { + "name": "add_drills_metadata", + "in": "query", + "description": "Whether response should include drill field metadata.", + "required": false, + "type": "boolean" } ], "responses": { @@ -32324,6 +32331,7 @@ "json_label", "json_detail", "json_detail_lite_stream", + "json_bi", "xlsx", "html", "wysiwyg_pdf", @@ -32331,7 +32339,7 @@ "wysiwyg_png", "csv_zip" ], - "description": "A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: \"txt\", \"csv\", \"inline_json\", \"json\", \"json_label\", \"json_detail\", \"json_detail_lite_stream\", \"xlsx\", \"html\", \"wysiwyg_pdf\", \"assembled_pdf\", \"wysiwyg_png\", \"csv_zip\".", + "description": "A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: \"txt\", \"csv\", \"inline_json\", \"json\", \"json_label\", \"json_detail\", \"json_detail_lite_stream\", \"json_bi\", \"xlsx\", \"html\", \"wysiwyg_pdf\", \"assembled_pdf\", \"wysiwyg_png\", \"csv_zip\".", "x-looker-nullable": false }, "supported_action_types": { @@ -32648,6 +32656,12 @@ "description": "Filters applied to the query results", "x-looker-nullable": false }, + "sql": { + "type": "string", + "readOnly": true, + "description": "Raw sql query. Null if user does not have permission to view sql", + "x-looker-nullable": true + }, "data": { "type": "array", "items": { @@ -32668,6 +32682,7 @@ "columns_truncated", "filter_expression", "filters", + "sql", "data" ] }, @@ -34724,6 +34739,15 @@ "description": "Dimension group if this field is part of a dimension group. If not, this will be null.", "x-looker-nullable": true }, + "drill_fields": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Drill fields declared for this field in LookML or default drills for certain types.", + "x-looker-nullable": true + }, "enumerations": { "type": "array", "items": { @@ -34774,6 +34798,12 @@ "description": "Whether this field has a set of allowed_values specified in LookML.", "x-looker-nullable": false }, + "has_drills_metadata": { + "type": "boolean", + "readOnly": true, + "description": "Whether this field has links or drill fields defined.", + "x-looker-nullable": false + }, "hidden": { "type": "boolean", "readOnly": true, @@ -34840,6 +34870,15 @@ "description": "A URL linking to the definition of this field in the LookML IDE.", "x-looker-nullable": true }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LookmlFieldLink" + }, + "readOnly": true, + "description": "Links associated with this field.", + "x-looker-nullable": true + }, "map_layer": { "$ref": "#/definitions/LookmlModelExploreFieldMapLayer", "readOnly": true, @@ -35221,6 +35260,29 @@ }, "x-looker-status": "stable" }, + "LookmlFieldLink": { + "properties": { + "label": { + "type": "string", + "readOnly": true, + "description": "The name of the link as it would appear to users.", + "x-looker-nullable": false + }, + "url": { + "type": "string", + "readOnly": true, + "description": "URL the link will go to.", + "x-looker-nullable": false + }, + "icon_url": { + "type": "string", + "readOnly": true, + "description": "A URL containing an image file to display with a link.", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "LookmlModelExploreJoins": { "properties": { "name": { diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index 537544baf..368931a93 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.23.21", - "x-looker-release-version": "23.21.112", + "version": "4.0.24.0", + "x-looker-release-version": "24.0.17", "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": { @@ -11,7 +11,7 @@ }, "license": { "name": "EULA", - "url": "https://gcplmaster.dev.looker.com/eula" + "url": "https://localhost:10000/eula" } }, "tags": [ @@ -6416,7 +6416,7 @@ ], "operationId": "update_dashboard", "summary": "Update Dashboard", - "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", + "description": "### Update a dashboard\n\nYou can use this function to change the string and integer properties of\na dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components\ncannot be modified by this function - use the update functions for the respective\nnested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter)\nto modify nested objects referenced by a dashboard.\n\nIf you receive a 422 error response when updating a dashboard, be sure to look at the\nresponse body for information about exactly which fields are missing or contain invalid data.\n", "parameters": [ { "name": "dashboard_id", @@ -17624,6 +17624,15 @@ "schema": { "type": "string" } + }, + { + "name": "add_drills_metadata", + "in": "query", + "description": "Whether response should include drill field metadata.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -35467,7 +35476,7 @@ }, "servers": [ { - "url": "https://gcplmaster.dev.looker.com:443/api/4.0" + "url": "https://localhost:20000/api/4.0" } ], "components": { @@ -41868,6 +41877,7 @@ "json_label", "json_detail", "json_detail_lite_stream", + "json_bi", "xlsx", "html", "wysiwyg_pdf", @@ -41875,7 +41885,7 @@ "wysiwyg_png", "csv_zip" ], - "description": "A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: \"txt\", \"csv\", \"inline_json\", \"json\", \"json_label\", \"json_detail\", \"json_detail_lite_stream\", \"xlsx\", \"html\", \"wysiwyg_pdf\", \"assembled_pdf\", \"wysiwyg_png\", \"csv_zip\".", + "description": "A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: \"txt\", \"csv\", \"inline_json\", \"json\", \"json_label\", \"json_detail\", \"json_detail_lite_stream\", \"json_bi\", \"xlsx\", \"html\", \"wysiwyg_pdf\", \"assembled_pdf\", \"wysiwyg_png\", \"csv_zip\".", "nullable": false }, "supported_action_types": { @@ -42186,6 +42196,12 @@ "description": "Filters applied to the query results", "nullable": false }, + "sql": { + "type": "string", + "readOnly": true, + "description": "Raw sql query. Null if user does not have permission to view sql", + "nullable": true + }, "data": { "type": "array", "items": { @@ -42206,6 +42222,7 @@ "columns_truncated", "filter_expression", "filters", + "sql", "data" ] }, @@ -44235,6 +44252,15 @@ "description": "Dimension group if this field is part of a dimension group. If not, this will be null.", "nullable": true }, + "drill_fields": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Drill fields declared for this field in LookML or default drills for certain types.", + "nullable": true + }, "enumerations": { "type": "array", "items": { @@ -44285,6 +44311,12 @@ "description": "Whether this field has a set of allowed_values specified in LookML.", "nullable": false }, + "has_drills_metadata": { + "type": "boolean", + "readOnly": true, + "description": "Whether this field has links or drill fields defined.", + "nullable": false + }, "hidden": { "type": "boolean", "readOnly": true, @@ -44348,6 +44380,15 @@ "description": "A URL linking to the definition of this field in the LookML IDE.", "nullable": true }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LookmlFieldLink" + }, + "readOnly": true, + "description": "Links associated with this field.", + "nullable": true + }, "map_layer": { "$ref": "#/components/schemas/LookmlModelExploreFieldMapLayer" }, @@ -44726,6 +44767,29 @@ }, "x-looker-status": "stable" }, + "LookmlFieldLink": { + "properties": { + "label": { + "type": "string", + "readOnly": true, + "description": "The name of the link as it would appear to users.", + "nullable": false + }, + "url": { + "type": "string", + "readOnly": true, + "description": "URL the link will go to.", + "nullable": false + }, + "icon_url": { + "type": "string", + "readOnly": true, + "description": "A URL containing an image file to display with a link.", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "LookmlModelExploreJoins": { "properties": { "name": { diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 66e6dc1a0..a48fae4d3 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 = "23.20" + public static let lookerVersion = "24.0" 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/methods.swift b/swift/looker/sdk/methods.swift index dcb2dd051..f9d763539 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -4329,7 +4329,7 @@ open class LookerSDK: APIMethods { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -6882,12 +6882,16 @@ open class LookerSDK: APIMethods { * @param {String} fields Requested fields. */ fields: String? = nil, + /** + * @param {Bool} add_drills_metadata Whether response should include drill field metadata. + */ + add_drills_metadata: Bool? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let path_lookml_model_name = encodeParam(lookml_model_name) let path_explore_name = encodeParam(explore_name) let result: SDKResponse = self.get("/lookml_models/\(path_lookml_model_name)/explores/\(path_explore_name)", - ["fields": fields], nil, options) + ["fields": fields, "add_drills_metadata": add_drills_metadata as Any?], nil, options) return result } diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index ca1289912..debfb12c7 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 338 API models: 255 Spec, 0 Request, 61 Write, 22 Enum + * 339 API models: 256 Spec, 0 Request, 61 Write, 22 Enum */ @@ -10384,7 +10384,7 @@ public struct Integration: SDKModel { public var params: [IntegrationParam]? /** - * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) + * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (read-only) */ public var supported_formats: [SupportedFormats]? @@ -10836,6 +10836,7 @@ public struct JsonBi: SDKModel { case _columns_truncated = "columns_truncated" case _filter_expression = "filter_expression" case filters + case _sql = "sql" case _data = "data" } public var big_query_metadata: JsonBiBigQueryMetadata @@ -10880,6 +10881,15 @@ public struct JsonBi: SDKModel { */ 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) @@ -10889,7 +10899,7 @@ public struct JsonBi: SDKModel { set { _data = newValue.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, data: [String]) { + 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 @@ -10898,11 +10908,12 @@ public struct JsonBi: SDKModel { 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(_ big_query_metadata: JsonBiBigQueryMetadata, _ fields: JsonBiFields, _ pivots: [JsonBiPivots], _ has_subtotals: Bool, _ has_totals: Bool, _ columns_truncated: String, _ filter_expression: String, _ filters: StringDictionary, _ 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, data: data) + 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) } } @@ -12569,6 +12580,48 @@ public struct LookBasic: SDKModel { } +public struct LookmlFieldLink: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _label = "label" + case _url = "url" + case _icon_url = "icon_url" + } + private var _label: AnyString? + /** + * The name of the link as it would appear to users. (read-only) + */ + public var label: String? { + get { _label?.value } + set { _label = newValue.map(AnyString.init) } + } + + private var _url: AnyString? + /** + * URL the link will go to. (read-only) + */ + public var url: String? { + get { _url?.value } + set { _url = newValue.map(AnyString.init) } + } + + private var _icon_url: AnyString? + /** + * A URL containing an image file to display with a link. (read-only) + */ + public var icon_url: String? { + get { _icon_url?.value } + set { _icon_url = newValue.map(AnyString.init) } + } + + public init(label: String? = nil, url: String? = nil, icon_url: String? = nil) { + self._label = label.map(AnyString.init) + self._url = url.map(AnyString.init) + self._icon_url = icon_url.map(AnyString.init) + } + +} + public struct LookmlModel: SDKModel { private enum CodingKeys : String, CodingKey { @@ -13187,6 +13240,7 @@ public struct LookmlModelExploreField: SDKModel { case _default_filter_value = "default_filter_value" case _description = "description" case _dimension_group = "dimension_group" + case _drill_fields = "drill_fields" case enumerations case _error = "error" case _field_group_label = "field_group_label" @@ -13194,6 +13248,7 @@ public struct LookmlModelExploreField: SDKModel { case fill_style case _fiscal_month_offset = "fiscal_month_offset" case has_allowed_values + case has_drills_metadata case hidden case is_filter case is_fiscal @@ -13205,6 +13260,7 @@ public struct LookmlModelExploreField: SDKModel { case _label_from_parameter = "label_from_parameter" case _label_short = "label_short" case _lookml_link = "lookml_link" + case links case map_layer case measure case _name = "name" @@ -13278,6 +13334,15 @@ public struct LookmlModelExploreField: SDKModel { set { _dimension_group = newValue.map(AnyString.init) } } + private var _drill_fields: [AnyString]? + /** + * Drill fields declared for this field in LookML or default drills for certain types. (read-only) + */ + public var drill_fields: [String]? { + get { if let v = _drill_fields { return v.map { $0.value } } else { return nil } } + set { if let v = newValue { _drill_fields = v.map { AnyString.init($0) } } else { _drill_fields = nil } } + } + /** * An array enumerating all the possible values that this field can contain. When null, there is no limit to the set of possible values this field can contain. (read-only) */ @@ -13329,6 +13394,11 @@ public struct LookmlModelExploreField: SDKModel { */ public var has_allowed_values: Bool? + /** + * Whether this field has links or drill fields defined. (read-only) + */ + public var has_drills_metadata: Bool? + /** * Whether this field should be hidden from the user interface. (read-only) */ @@ -13397,6 +13467,11 @@ public struct LookmlModelExploreField: SDKModel { set { _lookml_link = newValue.map(AnyString.init) } } + /** + * Links associated with this field. (read-only) + */ + public var links: [LookmlFieldLink]? + public var map_layer: LookmlModelExploreFieldMapLayer? /** @@ -13608,13 +13683,14 @@ public struct LookmlModelExploreField: SDKModel { set { _original_view = newValue.map(AnyString.init) } } - public init(align: Align? = nil, can_filter: Bool? = nil, category: Category? = nil, default_filter_value: String? = nil, description: String? = nil, dimension_group: String? = nil, enumerations: [LookmlModelExploreFieldEnumeration]? = nil, error: String? = nil, field_group_label: String? = nil, field_group_variant: String? = nil, fill_style: FillStyle? = nil, fiscal_month_offset: Int64? = nil, has_allowed_values: Bool? = nil, hidden: Bool? = nil, is_filter: Bool? = nil, is_fiscal: Bool? = nil, is_numeric: Bool? = nil, is_timeframe: Bool? = nil, can_time_filter: Bool? = nil, time_interval: LookmlModelExploreFieldTimeInterval? = nil, label: String? = nil, label_from_parameter: String? = nil, label_short: String? = nil, lookml_link: String? = nil, map_layer: LookmlModelExploreFieldMapLayer? = nil, measure: Bool? = nil, name: String? = nil, strict_value_format: Bool? = nil, parameter: Bool? = nil, permanent: Bool? = nil, primary_key: Bool? = nil, project_name: String? = nil, requires_refresh_on_sort: Bool? = nil, scope: String? = nil, sortable: Bool? = nil, source_file: String? = nil, source_file_path: String? = nil, sql: String? = nil, sql_case: [LookmlModelExploreFieldSqlCase]? = nil, filters: [LookmlModelExploreFieldMeasureFilters]? = nil, suggest_dimension: String? = nil, suggest_explore: String? = nil, suggestable: Bool? = nil, suggestions: [String]? = nil, tags: [String]? = nil, type: String? = nil, user_attribute_filter_types: [UserAttributeFilterTypes]? = nil, value_format: String? = nil, view: String? = nil, view_label: String? = nil, `dynamic`: Bool? = nil, week_start_day: WeekStartDay? = nil, times_used: Int64? = nil, original_view: String? = nil) { + public init(align: Align? = nil, can_filter: Bool? = nil, category: Category? = nil, default_filter_value: String? = nil, description: String? = nil, dimension_group: String? = nil, drill_fields: [String]? = nil, enumerations: [LookmlModelExploreFieldEnumeration]? = nil, error: String? = nil, field_group_label: String? = nil, field_group_variant: String? = nil, fill_style: FillStyle? = nil, fiscal_month_offset: Int64? = nil, has_allowed_values: Bool? = nil, has_drills_metadata: Bool? = nil, hidden: Bool? = nil, is_filter: Bool? = nil, is_fiscal: Bool? = nil, is_numeric: Bool? = nil, is_timeframe: Bool? = nil, can_time_filter: Bool? = nil, time_interval: LookmlModelExploreFieldTimeInterval? = nil, label: String? = nil, label_from_parameter: String? = nil, label_short: String? = nil, lookml_link: String? = nil, links: [LookmlFieldLink]? = nil, map_layer: LookmlModelExploreFieldMapLayer? = nil, measure: Bool? = nil, name: String? = nil, strict_value_format: Bool? = nil, parameter: Bool? = nil, permanent: Bool? = nil, primary_key: Bool? = nil, project_name: String? = nil, requires_refresh_on_sort: Bool? = nil, scope: String? = nil, sortable: Bool? = nil, source_file: String? = nil, source_file_path: String? = nil, sql: String? = nil, sql_case: [LookmlModelExploreFieldSqlCase]? = nil, filters: [LookmlModelExploreFieldMeasureFilters]? = nil, suggest_dimension: String? = nil, suggest_explore: String? = nil, suggestable: Bool? = nil, suggestions: [String]? = nil, tags: [String]? = nil, type: String? = nil, user_attribute_filter_types: [UserAttributeFilterTypes]? = nil, value_format: String? = nil, view: String? = nil, view_label: String? = nil, `dynamic`: Bool? = nil, week_start_day: WeekStartDay? = nil, times_used: Int64? = nil, original_view: String? = nil) { self.align = align self.can_filter = can_filter self.category = category self._default_filter_value = default_filter_value.map(AnyString.init) self._description = description.map(AnyString.init) self._dimension_group = dimension_group.map(AnyString.init) + if let v = drill_fields { _drill_fields = v.map { AnyString.init($0) } } else { _drill_fields = nil } self.enumerations = enumerations self._error = error.map(AnyString.init) self._field_group_label = field_group_label.map(AnyString.init) @@ -13622,6 +13698,7 @@ public struct LookmlModelExploreField: SDKModel { self.fill_style = fill_style self._fiscal_month_offset = fiscal_month_offset.map(AnyInt.init) self.has_allowed_values = has_allowed_values + self.has_drills_metadata = has_drills_metadata self.hidden = hidden self.is_filter = is_filter self.is_fiscal = is_fiscal @@ -13633,6 +13710,7 @@ public struct LookmlModelExploreField: SDKModel { self._label_from_parameter = label_from_parameter.map(AnyString.init) self._label_short = label_short.map(AnyString.init) self._lookml_link = lookml_link.map(AnyString.init) + self.links = links self.map_layer = map_layer self.measure = measure self._name = name.map(AnyString.init) @@ -21339,7 +21417,7 @@ public enum SupportedDownloadSettings: String, Codable { } /** - * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) + * A list of data formats the integration supports. If unspecified, the default is all data formats. Valid values are: "txt", "csv", "inline_json", "json", "json_label", "json_detail", "json_detail_lite_stream", "json_bi", "xlsx", "html", "wysiwyg_pdf", "assembled_pdf", "wysiwyg_png", "csv_zip". (Enum defined in Integration) */ public enum SupportedFormats: String, Codable { case txt = "txt" @@ -21349,6 +21427,7 @@ public enum SupportedFormats: String, Codable { case json_label = "json_label" case json_detail = "json_detail" case json_detail_lite_stream = "json_detail_lite_stream" + case json_bi = "json_bi" case xlsx = "xlsx" case html = "html" case wysiwyg_pdf = "wysiwyg_pdf" diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index 8cce855e8..4024ee5f4 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -4327,7 +4327,7 @@ open class LookerSDKStream: APIMethods { * You can use this function to change the string and integer properties of * a dashboard. Nested objects such as filters, dashboard elements, or dashboard layout components * cannot be modified by this function - use the update functions for the respective - * nested object types (like [update_dashboard_filter()](#!/3.1/Dashboard/update_dashboard_filter) to change a filter) + * nested object types (like [update_dashboard_filter()](#!/Dashboard/update_dashboard_filter) to change a filter) * to modify nested objects referenced by a dashboard. * * If you receive a 422 error response when updating a dashboard, be sure to look at the @@ -6880,12 +6880,16 @@ open class LookerSDKStream: APIMethods { * @param {String} fields Requested fields. */ fields: String? = nil, + /** + * @param {Bool} add_drills_metadata Whether response should include drill field metadata. + */ + add_drills_metadata: Bool? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let path_lookml_model_name = encodeParam(lookml_model_name) let path_explore_name = encodeParam(explore_name) let result: SDKResponse = self.get("/lookml_models/\(path_lookml_model_name)/explores/\(path_explore_name)", - ["fields": fields], nil, options) + ["fields": fields, "add_drills_metadata": add_drills_metadata as Any?], nil, options) return result } diff --git a/test/data.yml.json b/test/data.yml.json index bc4ce51b6..52c09a8eb 100644 --- a/test/data.yml.json +++ b/test/data.yml.json @@ -47,7 +47,10 @@ "id": "#brand_query", "model": "thelook", "view": "products", - "fields": ["products.brand", "products.count"], + "fields": [ + "products.brand", + "products.count" + ], "vis_config": { "type": "looker_column" }, @@ -59,7 +62,11 @@ "id": "#dashboard_query_system_activity", "model": "system__activity", "view": "dashboard", - "fields": ["dashboard.id", "dashboard.title", "dashboard.count"], + "fields": [ + "dashboard.id", + "dashboard.title", + "dashboard.count" + ], "vis_config": { "type": "looker_column" }, @@ -167,7 +174,10 @@ "id": "#dashboard_query_system_activity", "model": "system__activity", "view": "dashboard", - "fields": ["dashboard.count", "dashboard.id"], + "fields": [ + "dashboard.count", + "dashboard.id" + ], "limit": 100 } ] @@ -213,4 +223,4 @@ "image/" ] } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8dbd9ac61..efcacc770 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3863,7 +3863,7 @@ "@types/react" "*" "@types/react-router" "*" -"@types/react-router@*", "@types/react-router@^5.1.20": +"@types/react-router@*", "@types/react-router@5.1.20", "@types/react-router@^5.1.20": version "5.1.20" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.20.tgz#88eccaa122a82405ef3efbcaaa5dcdd9f021387c" integrity sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==