diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index cdbdd7b9d..86365df2a 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 = "21.10"; + public const string LookerVersion = "21.12"; 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 d88747f55..692fa644f 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 413 API methods +/// 415 API methods #nullable enable using System; @@ -1696,6 +1696,24 @@ public async Task> mobile_settings( return await AuthRequest(HttpMethod.Get, "/mobile/settings", null,null,options); } + /// ### Configure Looker Settings + /// + /// Available settings are: + /// - extension_framework_enabled + /// - marketplace_auto_install_enabled + /// - marketplace_enabled + /// + /// PATCH /setting -> Setting + /// + /// Setting Looker Settings (application/json) + /// + public async Task> set_setting( + Setting body, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Patch, "/setting", null,body,options); + } + /// ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). /// /// GET /timezones -> Timezone[] @@ -4636,12 +4654,18 @@ public async Task> graph_derived_tables_ /// LookmlModel[] LookML Model (application/json) /// /// Requested fields. + /// Number of results to return. (can be used with offset) + /// Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) public async Task> all_lookml_models( string? fields = null, + long? limit = null, + long? offset = null, ITransportSettings? options = null) { return await AuthRequest(HttpMethod.Get, "/lookml_models", new Values { - { "fields", fields }},null,options); + { "fields", fields }, + { "limit", limit }, + { "offset", offset }},null,options); } /// ### Create a lookml model using the specified configuration. @@ -7817,6 +7841,65 @@ public async Task> delete_theme( #region User: Manage Users + /// ### Search email credentials + /// + /// Returns all credentials_email records that match the given search criteria. + /// + /// If multiple search params are given and `filter_or` is FALSE or not specified, + /// search params are combined in a logical AND operation. + /// Only rows that match *all* search param criteria will be returned. + /// + /// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + /// Results will include rows that match **any** of the search criteria. + /// + /// String search params use case-insensitive matching. + /// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + /// example="dan%" will match "danger" and "Danzig" but not "David" + /// example="D_m%" will match "Damage" and "dump" + /// + /// Integer search params can accept a single value or a comma separated list of values. The multiple + /// values will be combined under a logical OR operation - results will match at least one of + /// the given values. + /// + /// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + /// or exclude (respectively) rows where the column is null. + /// + /// Boolean search params accept only "true" and "false" as values. + /// + /// GET /credentials_email/search -> CredentialsEmailSearch[] + /// + /// CredentialsEmailSearch[] Credentials Email (application/json) + /// + /// Requested fields. + /// Number of results to return (used with `offset`). + /// Number of results to skip before returning any (used with `limit`). + /// Fields to sort by. + /// Match credentials_email id. + /// Match credentials_email email. + /// Find credentials_email that match given emails. + /// Combine given search criteria in a boolean OR expression. + public async Task> search_credentials_email( + string? fields = null, + long? limit = null, + long? offset = null, + string? sorts = null, + long? id = null, + string? email = null, + string? emails = null, + bool? filter_or = null, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Get, "/credentials_email/search", new Values { + { "fields", fields }, + { "limit", limit }, + { "offset", offset }, + { "sorts", sorts }, + { "id", id }, + { "email", email }, + { "emails", emails }, + { "filter_or", filter_or }},null,options); + } + /// ### Get information about the current user; i.e. the user account currently calling the API. /// /// GET /user -> User diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index 97d556b95..922c63239 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 284 API models: 211 Spec, 0 Request, 56 Write, 17 Enum +/// 286 API models: 213 Spec, 0 Request, 56 Write, 17 Enum #nullable enable using System; @@ -735,6 +735,30 @@ public class CredentialsEmail : SdkModel public string? user_url { get; set; } = null; } +public class CredentialsEmailSearch : SdkModel +{ + /// Operations the current user is able to perform on this object (read-only) + public StringDictionary? can { get; set; } = null; + /// Timestamp for the creation of this credential (read-only) + public string? created_at { get; set; } = null; + /// EMail address used for user login + public string? email { get; set; } = null; + /// Force the user to change their password upon their next login + public bool? forced_password_reset_at_next_login { get; set; } = null; + /// Has this credential been disabled? (read-only) + public bool? is_disabled { get; set; } = null; + /// Timestamp for most recent login using credential (read-only) + public string? logged_in_at { get; set; } = null; + /// Url with one-time use secret token that the user can use to reset password (read-only) + public string? password_reset_url { get; set; } = null; + /// Short name for the type of this kind of credential (read-only) + public string? type { get; set; } = null; + /// Link to get this item (read-only) + public string? url { get; set; } = null; + /// Link to get this user (read-only) + public string? user_url { get; set; } = null; +} + public class CredentialsEmbed : SdkModel { /// Operations the current user is able to perform on this object (read-only) @@ -4151,6 +4175,17 @@ public class SessionConfig : SdkModel public bool? track_session_location { get; set; } = null; } +/// WARNING: no writeable properties found for POST, PUT, or PATCH +public class Setting : SdkModel +{ + /// Toggle extension framework on or off (read-only) + public bool? extension_framework_enabled { get; set; } = null; + /// Toggle marketplace auto install on or off (read-only) + public bool? marketplace_auto_install_enabled { get; set; } = null; + /// Toggle marketplace on or off (read-only) + public bool? marketplace_enabled { get; set; } = null; +} + public class Snippet : SdkModel { /// Name of the snippet (read-only) diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index 0f27e9207..b0a319c54 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -413 API methods +415 API methods */ @@ -1444,6 +1444,23 @@ func (l *LookerSDK) MobileSettings( } +// ### Configure Looker Settings +// +// Available settings are: +// - extension_framework_enabled +// - marketplace_auto_install_enabled +// - marketplace_enabled +// +// PATCH /setting -> Setting +func (l *LookerSDK) SetSetting( + body Setting, + options *rtl.ApiSettings) (Setting, error) { + var result Setting + err := l.session.Do(&result, "PATCH", "/4.0", "/setting", nil, body, options) + return result, err + +} + // ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). // // GET /timezones -> []Timezone @@ -3563,11 +3580,10 @@ func (l *LookerSDK) GraphDerivedTablesForModel(request RequestGraphDerivedTables // ### Get information about all lookml models. // // GET /lookml_models -> []LookmlModel -func (l *LookerSDK) AllLookmlModels( - fields string, +func (l *LookerSDK) AllLookmlModels(request RequestAllLookmlModels, options *rtl.ApiSettings) ([]LookmlModel, error) { var result []LookmlModel - err := l.session.Do(&result, "GET", "/4.0", "/lookml_models", map[string]interface{}{"fields": fields}, nil, options) + err := l.session.Do(&result, "GET", "/4.0", "/lookml_models", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset}, nil, options) return result, err } @@ -5972,6 +5988,40 @@ func (l *LookerSDK) DeleteTheme( // region User: Manage Users +// ### Search email credentials +// +// Returns all credentials_email records that match the given search criteria. +// +// If multiple search params are given and `filter_or` is FALSE or not specified, +// search params are combined in a logical AND operation. +// Only rows that match *all* search param criteria will be returned. +// +// If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. +// Results will include rows that match **any** of the search criteria. +// +// String search params use case-insensitive matching. +// String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. +// example="dan%" will match "danger" and "Danzig" but not "David" +// example="D_m%" will match "Damage" and "dump" +// +// Integer search params can accept a single value or a comma separated list of values. The multiple +// values will be combined under a logical OR operation - results will match at least one of +// the given values. +// +// Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match +// or exclude (respectively) rows where the column is null. +// +// Boolean search params accept only "true" and "false" as values. +// +// GET /credentials_email/search -> []CredentialsEmailSearch +func (l *LookerSDK) SearchCredentialsEmail(request RequestSearchCredentialsEmail, + options *rtl.ApiSettings) ([]CredentialsEmailSearch, error) { + var result []CredentialsEmailSearch + err := l.session.Do(&result, "GET", "/4.0", "/credentials_email/search", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "sorts": request.Sorts, "id": request.Id, "email": request.Email, "emails": request.Emails, "filter_or": request.FilterOr}, nil, options) + return result, err + +} + // ### Get information about the current user; i.e. the user account currently calling the API. // // GET /user -> User diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index ada40d892..94c81fe30 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -335 API models: 211 Spec, 51 Request, 56 Write, 17 Enum +339 API models: 213 Spec, 53 Request, 56 Write, 17 Enum */ @@ -478,6 +478,20 @@ type CredentialsEmail struct { } +type CredentialsEmailSearch struct { + Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object + CreatedAt *string `json:"created_at,omitempty"` // Timestamp for the creation of this credential + Email *string `json:"email,omitempty"` // EMail address used for user login + ForcedPasswordResetAtNextLogin *bool `json:"forced_password_reset_at_next_login,omitempty"` // Force the user to change their password upon their next login + IsDisabled *bool `json:"is_disabled,omitempty"` // Has this credential been disabled? + LoggedInAt *string `json:"logged_in_at,omitempty"` // Timestamp for most recent login using credential + PasswordResetUrl *string `json:"password_reset_url,omitempty"` // Url with one-time use secret token that the user can use to reset password + Type *string `json:"type,omitempty"` // Short name for the type of this kind of credential + Url *string `json:"url,omitempty"` // Link to get this item + UserUrl *string `json:"user_url,omitempty"` // Link to get this user +} + + type CredentialsEmbed struct { Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object CreatedAt *string `json:"created_at,omitempty"` // Timestamp for the creation of this credential @@ -2252,6 +2266,13 @@ 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. @@ -2560,6 +2581,18 @@ type RequestSearchContentViews struct { FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression } +// Dynamically generated request type for search_credentials_email +type RequestSearchCredentialsEmail 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 *int64 `json:"id,omitempty"` // Match credentials_email id. + Email *string `json:"email,omitempty"` // Match credentials_email email. + Emails *string `json:"emails,omitempty"` // Find credentials_email that match given emails. + FilterOr *bool `json:"filter_or,omitempty"` // Combine given search criteria in a boolean OR expression. +} + // Dynamically generated request type for search_dashboard_elements type RequestSearchDashboardElements struct { DashboardId *int64 `json:"dashboard_id,omitempty"` // Select elements that refer to a given dashboard id @@ -3055,6 +3088,13 @@ type SessionConfig struct { TrackSessionLocation *bool `json:"track_session_location,omitempty"` // Track location of session when user logs in. } +// WARNING: no writeable properties found for POST, PUT, or PATCH +type Setting struct { + ExtensionFrameworkEnabled *bool `json:"extension_framework_enabled,omitempty"` // Toggle extension framework on or off + MarketplaceAutoInstallEnabled *bool `json:"marketplace_auto_install_enabled,omitempty"` // Toggle marketplace auto install on or off + MarketplaceEnabled *bool `json:"marketplace_enabled,omitempty"` // Toggle marketplace on or off +} + type Snippet struct { Name *string `json:"name,omitempty"` // Name of the snippet 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 cf7faecf1..46be58dac 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/methods.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/methods.kt @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ @@ -1742,6 +1742,25 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * @param {Setting} body + * + * PATCH /setting -> Setting + */ + fun set_setting( + body: Setting + ) : SDKResponse { + return this.patch("/setting", mapOf(), body) + } + + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -4744,14 +4763,20 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { * ### Get information about all lookml models. * * @param {String} fields Requested fields. + * @param {Long} limit Number of results to return. (can be used with offset) + * @param {Long} offset Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) * * GET /lookml_models -> Array */ @JvmOverloads fun all_lookml_models( - fields: String? = null + fields: String? = null, + limit: Long? = null, + offset: Long? = null ) : SDKResponse { return this.get>("/lookml_models", - mapOf("fields" to fields)) + mapOf("fields" to fields, + "limit" to limit, + "offset" to offset)) } @@ -7932,6 +7957,65 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { //region User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * @param {String} fields Requested fields. + * @param {Long} limit Number of results to return (used with `offset`). + * @param {Long} offset Number of results to skip before returning any (used with `limit`). + * @param {String} sorts Fields to sort by. + * @param {Long} id Match credentials_email id. + * @param {String} email Match credentials_email email. + * @param {String} emails Find credentials_email that match given emails. + * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression. + * + * GET /credentials_email/search -> Array + */ + @JvmOverloads fun search_credentials_email( + fields: String? = null, + limit: Long? = null, + offset: Long? = null, + sorts: String? = null, + id: Long? = null, + email: String? = null, + emails: String? = null, + filter_or: Boolean? = null + ) : SDKResponse { + return this.get>("/credentials_email/search", + mapOf("fields" to fields, + "limit" to limit, + "offset" to offset, + "sorts" to sorts, + "id" to id, + "email" to email, + "emails" to emails, + "filter_or" to filter_or)) + } + + /** * ### Get information about the current user; i.e. the user account currently calling the API. * 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 f110e6b67..a81314097 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 @@ */ /** - * 284 API models: 211 Spec, 0 Request, 56 Write, 17 Enum + * 286 API models: 213 Spec, 0 Request, 56 Write, 17 Enum */ @@ -795,6 +795,33 @@ data class CredentialsEmail ( var user_url: String? = null ) : Serializable +/** + * @property can Operations the current user is able to perform on this object (read-only) + * @property created_at Timestamp for the creation of this credential (read-only) + * @property email EMail address used for user login + * @property forced_password_reset_at_next_login Force the user to change their password upon their next login + * @property is_disabled Has this credential been disabled? (read-only) + * @property logged_in_at Timestamp for most recent login using credential (read-only) + * @property password_reset_url Url with one-time use secret token that the user can use to reset password (read-only) + * @property type Short name for the type of this kind of credential (read-only) + * @property url Link to get this item (read-only) + * @property user_url Link to get this user (read-only) + */ +data class CredentialsEmailSearch ( + var can: Map? = null, + var created_at: String? = null, + var email: String? = null, + var forced_password_reset_at_next_login: Boolean? = null, + @get:JsonProperty("is_disabled") + @param:JsonProperty("is_disabled") + var is_disabled: Boolean? = null, + var logged_in_at: String? = null, + var password_reset_url: String? = null, + var type: String? = null, + var url: String? = null, + var user_url: String? = null +) : Serializable + /** * @property can Operations the current user is able to perform on this object (read-only) * @property created_at Timestamp for the creation of this credential (read-only) @@ -4455,6 +4482,19 @@ data class SessionConfig ( var track_session_location: Boolean? = null ) : Serializable +/** + * WARNING: no writeable properties found for POST, PUT, or PATCH + * + * @property extension_framework_enabled Toggle extension framework on or off (read-only) + * @property marketplace_auto_install_enabled Toggle marketplace auto install on or off (read-only) + * @property marketplace_enabled Toggle marketplace on or off (read-only) + */ +data class Setting ( + var extension_framework_enabled: Boolean? = null, + var marketplace_auto_install_enabled: Boolean? = null, + var marketplace_enabled: Boolean? = null +) : Serializable + /** * @property name Name of the snippet (read-only) * @property label Label of the snippet (read-only) 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 42bc95f6d..94e8b23ef 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/streams.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/streams.kt @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ @@ -1741,6 +1741,25 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * @param {Setting} body + * + * PATCH /setting -> ByteArray + */ + fun set_setting( + body: Setting + ) : SDKResponse { + return this.patch("/setting", mapOf(), body) + } + + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -4743,14 +4762,20 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { * ### Get information about all lookml models. * * @param {String} fields Requested fields. + * @param {Long} limit Number of results to return. (can be used with offset) + * @param {Long} offset Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) * * GET /lookml_models -> ByteArray */ @JvmOverloads fun all_lookml_models( - fields: String? = null + fields: String? = null, + limit: Long? = null, + offset: Long? = null ) : SDKResponse { return this.get("/lookml_models", - mapOf("fields" to fields)) + mapOf("fields" to fields, + "limit" to limit, + "offset" to offset)) } @@ -7931,6 +7956,65 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { //region User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * @param {String} fields Requested fields. + * @param {Long} limit Number of results to return (used with `offset`). + * @param {Long} offset Number of results to skip before returning any (used with `limit`). + * @param {String} sorts Fields to sort by. + * @param {Long} id Match credentials_email id. + * @param {String} email Match credentials_email email. + * @param {String} emails Find credentials_email that match given emails. + * @param {Boolean} filter_or Combine given search criteria in a boolean OR expression. + * + * GET /credentials_email/search -> ByteArray + */ + @JvmOverloads fun search_credentials_email( + fields: String? = null, + limit: Long? = null, + offset: Long? = null, + sorts: String? = null, + id: Long? = null, + email: String? = null, + emails: String? = null, + filter_or: Boolean? = null + ) : SDKResponse { + return this.get("/credentials_email/search", + mapOf("fields" to fields, + "limit" to limit, + "offset" to offset, + "sorts" to sorts, + "id" to id, + "email" to email, + "emails" to emails, + "filter_or" to filter_or)) + } + + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index 24475ad2e..02f7bc47d 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 = "21.10" +const val LOOKER_VERSION = "21.12" 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 9020c3fe2..d184675c4 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ import type { @@ -69,6 +69,7 @@ import type { ICreateOAuthApplicationUserStateResponse, ICredentialsApi3, ICredentialsEmail, + ICredentialsEmailSearch, ICredentialsEmbed, ICredentialsGoogle, ICredentialsLDAP, @@ -152,6 +153,7 @@ import type { IRequestAllGroups, IRequestAllGroupUsers, IRequestAllIntegrations, + IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, IRequestAllUsers, @@ -182,6 +184,7 @@ import type { IRequestSearchBoards, IRequestSearchContentFavorites, IRequestSearchContentViews, + IRequestSearchCredentialsEmail, IRequestSearchDashboardElements, IRequestSearchDashboards, IRequestSearchFolders, @@ -207,6 +210,7 @@ import type { ISchemaTables, ISession, ISessionConfig, + ISetting, ISqlQuery, ISqlQueryCreate, ISshPublicKey, @@ -2625,6 +2629,34 @@ export const mobile_settings = async ( ) } +/** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> ISetting + * + * @param sdk IAPIMethods implementation + * @param body WARNING: no writeable properties found for POST, PUT, or PATCH + * @param options one-time API call overrides + * + */ +export const set_setting = async ( + sdk: IAPIMethods, + body: Partial, + options?: Partial +): Promise> => { + return sdk.patch( + '/setting', + null, + body, + options + ) +} + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -6416,18 +6448,18 @@ export const graph_derived_tables_for_model = async ( * GET /lookml_models -> ILookmlModel[] * * @param sdk IAPIMethods implementation - * @param fields Requested fields. + * @param request composed interface "IRequestAllLookmlModels" for complex method parameters * @param options one-time API call overrides * */ export const all_lookml_models = async ( sdk: IAPIMethods, - fields?: string, + request: IRequestAllLookmlModels, options?: Partial ): Promise> => { return sdk.get( '/lookml_models', - { fields }, + { fields: request.fields, limit: request.limit, offset: request.offset }, null, options ) @@ -10265,6 +10297,61 @@ export const delete_theme = async ( //#region User: Manage Users +/** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> ICredentialsEmailSearch[] + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestSearchCredentialsEmail" for complex method parameters + * @param options one-time API call overrides + * + */ +export const search_credentials_email = async ( + sdk: IAPIMethods, + request: IRequestSearchCredentialsEmail, + options?: Partial +): Promise> => { + return sdk.get( + '/credentials_email/search', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + id: request.id, + email: request.email, + emails: request.emails, + filter_or: request.filter_or, + }, + null, + options + ) +} + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 23bf76118..9084b0bce 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ import type { @@ -67,6 +67,7 @@ import type { ICreateOAuthApplicationUserStateResponse, ICredentialsApi3, ICredentialsEmail, + ICredentialsEmailSearch, ICredentialsEmbed, ICredentialsGoogle, ICredentialsLDAP, @@ -150,6 +151,7 @@ import type { IRequestAllGroups, IRequestAllGroupUsers, IRequestAllIntegrations, + IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, IRequestAllUsers, @@ -180,6 +182,7 @@ import type { IRequestSearchBoards, IRequestSearchContentFavorites, IRequestSearchContentViews, + IRequestSearchCredentialsEmail, IRequestSearchDashboardElements, IRequestSearchDashboards, IRequestSearchFolders, @@ -205,6 +208,7 @@ import type { ISchemaTables, ISession, ISessionConfig, + ISetting, ISqlQuery, ISqlQueryCreate, ISshPublicKey, @@ -2466,6 +2470,32 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ) } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> ISetting + * + * @param body WARNING: no writeable properties found for POST, PUT, or PATCH + * @param options one-time API call overrides + * + */ + async set_setting( + body: Partial, + options?: Partial + ): Promise> { + return this.patch( + '/setting', + null, + body, + options + ) + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -6003,17 +6033,17 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { * * GET /lookml_models -> ILookmlModel[] * - * @param fields Requested fields. + * @param request composed interface "IRequestAllLookmlModels" for complex method parameters * @param options one-time API call overrides * */ async all_lookml_models( - fields?: string, + request: IRequestAllLookmlModels, options?: Partial ): Promise> { return this.get( '/lookml_models', - { fields }, + { fields: request.fields, limit: request.limit, offset: request.offset }, null, options ) @@ -9642,6 +9672,59 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { //#region User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> ICredentialsEmailSearch[] + * + * @param request composed interface "IRequestSearchCredentialsEmail" for complex method parameters + * @param options one-time API call overrides + * + */ + async search_credentials_email( + request: IRequestSearchCredentialsEmail, + options?: Partial + ): Promise> { + return this.get( + '/credentials_email/search', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + id: request.id, + email: request.email, + emails: request.emails, + filter_or: request.filter_or, + }, + null, + options + ) + } + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 49f6888a7..96e58ee80 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ import type { @@ -63,6 +63,7 @@ import type { ICreateOAuthApplicationUserStateResponse, ICredentialsApi3, ICredentialsEmail, + ICredentialsEmailSearch, ICredentialsEmbed, ICredentialsGoogle, ICredentialsLDAP, @@ -146,6 +147,7 @@ import type { IRequestAllGroups, IRequestAllGroupUsers, IRequestAllIntegrations, + IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, IRequestAllUsers, @@ -176,6 +178,7 @@ import type { IRequestSearchBoards, IRequestSearchContentFavorites, IRequestSearchContentViews, + IRequestSearchCredentialsEmail, IRequestSearchDashboardElements, IRequestSearchDashboards, IRequestSearchFolders, @@ -201,6 +204,7 @@ import type { ISchemaTables, ISession, ISessionConfig, + ISetting, ISqlQuery, ISqlQueryCreate, ISshPublicKey, @@ -1838,6 +1842,25 @@ export interface ILooker40SDK { options?: Partial ): Promise> + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> ISetting + * + * @param body WARNING: no writeable properties found for POST, PUT, or PATCH + * @param options one-time API call overrides + * + */ + set_setting( + body: Partial, + options?: Partial + ): Promise> + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -4265,12 +4288,12 @@ export interface ILooker40SDK { * * GET /lookml_models -> ILookmlModel[] * - * @param fields Requested fields. + * @param request composed interface "IRequestAllLookmlModels" for complex method parameters * @param options one-time API call overrides * */ all_lookml_models( - fields?: string, + request: IRequestAllLookmlModels, options?: Partial ): Promise> @@ -6919,6 +6942,43 @@ export interface ILooker40SDK { //#region User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> ICredentialsEmailSearch[] + * + * @param request composed interface "IRequestSearchCredentialsEmail" for complex method parameters + * @param options one-time API call overrides + * + */ + search_credentials_email( + request: IRequestSearchCredentialsEmail, + options?: Partial + ): Promise> + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index 4d5c19934..c99785251 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 335 API models: 211 Spec, 51 Request, 56 Write, 17 Enum + * 339 API models: 213 Spec, 53 Request, 56 Write, 17 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl' @@ -1172,6 +1172,49 @@ export interface ICredentialsEmail { user_url?: string } +export interface ICredentialsEmailSearch { + /** + * Operations the current user is able to perform on this object (read-only) + */ + can?: IDictionary + /** + * Timestamp for the creation of this credential (read-only) + */ + created_at?: string + /** + * EMail address used for user login + */ + email?: string + /** + * Force the user to change their password upon their next login + */ + forced_password_reset_at_next_login?: boolean + /** + * Has this credential been disabled? (read-only) + */ + is_disabled?: boolean + /** + * Timestamp for most recent login using credential (read-only) + */ + logged_in_at?: string + /** + * Url with one-time use secret token that the user can use to reset password (read-only) + */ + password_reset_url?: string + /** + * Short name for the type of this kind of credential (read-only) + */ + type?: string + /** + * Link to get this item (read-only) + */ + url?: string + /** + * Link to get this user (read-only) + */ + user_url?: string +} + export interface ICredentialsEmbed { /** * Operations the current user is able to perform on this object (read-only) @@ -6347,6 +6390,24 @@ export interface IRequestAllIntegrations { integration_hub_id?: string } +/** + * Dynamically generated request type for all_lookml_models + */ +export interface IRequestAllLookmlModels { + /** + * Requested fields. + */ + fields?: string + /** + * Number of results to return. (can be used with offset) + */ + limit?: number + /** + * Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) + */ + offset?: number +} + /** * Dynamically generated request type for all_roles */ @@ -7279,6 +7340,44 @@ export interface IRequestSearchContentViews { filter_or?: boolean } +/** + * Dynamically generated request type for search_credentials_email + */ +export interface IRequestSearchCredentialsEmail { + /** + * Requested fields. + */ + fields?: string + /** + * Number of results to return (used with `offset`). + */ + limit?: number + /** + * Number of results to skip before returning any (used with `limit`). + */ + offset?: number + /** + * Fields to sort by. + */ + sorts?: string + /** + * Match credentials_email id. + */ + id?: number + /** + * Match credentials_email email. + */ + email?: string + /** + * Find credentials_email that match given emails. + */ + emails?: string + /** + * Combine given search criteria in a boolean OR expression. + */ + filter_or?: boolean +} + /** * Dynamically generated request type for search_dashboard_elements */ @@ -8780,6 +8879,24 @@ export interface ISessionConfig { track_session_location?: boolean } +/** + * WARNING: no writeable properties found for POST, PUT, or PATCH + */ +export interface ISetting { + /** + * Toggle extension framework on or off (read-only) + */ + extension_framework_enabled?: boolean + /** + * Toggle marketplace auto install on or off (read-only) + */ + marketplace_auto_install_enabled?: boolean + /** + * Toggle marketplace on or off (read-only) + */ + marketplace_enabled?: boolean +} + export interface ISnippet { /** * Name of the snippet (read-only) diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index 78aa6d571..cfa7221ae 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ import { Readable } from 'readable-stream' @@ -67,6 +67,7 @@ import type { ICreateOAuthApplicationUserStateResponse, ICredentialsApi3, ICredentialsEmail, + ICredentialsEmailSearch, ICredentialsEmbed, ICredentialsGoogle, ICredentialsLDAP, @@ -149,6 +150,7 @@ import type { IRequestAllGroups, IRequestAllGroupUsers, IRequestAllIntegrations, + IRequestAllLookmlModels, IRequestAllRoles, IRequestAllScheduledPlans, IRequestAllUsers, @@ -179,6 +181,7 @@ import type { IRequestSearchBoards, IRequestSearchContentFavorites, IRequestSearchContentViews, + IRequestSearchCredentialsEmail, IRequestSearchDashboardElements, IRequestSearchDashboards, IRequestSearchFolders, @@ -204,6 +207,7 @@ import type { ISchemaTables, ISession, ISessionConfig, + ISetting, ISqlQuery, ISqlQueryCreate, ISshPublicKey, @@ -2833,6 +2837,36 @@ export class Looker40SDKStream extends APIMethods { ) } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> ISetting + * + * @param callback streaming output function + * @param body WARNING: no writeable properties found for POST, PUT, or PATCH + * @param options one-time API call overrides + * + */ + async set_setting( + callback: (readable: Readable) => Promise, + body: Partial, + options?: Partial + ) { + return this.authStream( + callback, + 'PATCH', + '/setting', + null, + body, + options + ) + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -6918,20 +6952,20 @@ export class Looker40SDKStream extends APIMethods { * GET /lookml_models -> ILookmlModel[] * * @param callback streaming output function - * @param fields Requested fields. + * @param request composed interface "IRequestAllLookmlModels" for complex method parameters * @param options one-time API call overrides * */ async all_lookml_models( callback: (readable: Readable) => Promise, - fields?: string, + request: IRequestAllLookmlModels, options?: Partial ) { return this.authStream( callback, 'GET', '/lookml_models', - { fields }, + { fields: request.fields, limit: request.limit, offset: request.offset }, null, options ) @@ -11055,6 +11089,63 @@ export class Looker40SDKStream extends APIMethods { //#region User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> ICredentialsEmailSearch[] + * + * @param callback streaming output function + * @param request composed interface "IRequestSearchCredentialsEmail" for complex method parameters + * @param options one-time API call overrides + * + */ + async search_credentials_email( + callback: (readable: Readable) => Promise, + request: IRequestSearchCredentialsEmail, + options?: Partial + ) { + return this.authStream( + callback, + 'GET', + '/credentials_email/search', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + sorts: request.sorts, + id: request.id, + email: request.email, + emails: request.emails, + filter_or: request.filter_or, + }, + null, + options + ) + } + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index 48c9c06da..fbeda05fe 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '21.10' +export const sdkVersion = '21.12' export const environmentPrefix = 'LOOKERSDK' diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index 59519f1e8..d1538cec1 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 413 API methods +# 415 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -2220,6 +2220,31 @@ def mobile_settings( ) return response + # ### Configure Looker Settings + # + # Available settings are: + # - extension_framework_enabled + # - marketplace_auto_install_enabled + # - marketplace_enabled + # + # PATCH /setting -> models.Setting + def set_setting( + self, + body: models.Setting, + transport_options: Optional[transport.TransportOptions] = None, + ) -> models.Setting: + """Set Setting""" + response = cast( + models.Setting, + self.patch( + path="/setting", + structure=models.Setting, + body=body, + transport_options=transport_options, + ), + ) + return response + # ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). # # GET /timezones -> Sequence[models.Timezone] @@ -6005,6 +6030,10 @@ def all_lookml_models( self, # Requested fields. fields: Optional[str] = None, + # Number of results to return. (can be used with offset) + limit: Optional[int] = None, + # Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) + offset: Optional[int] = None, transport_options: Optional[transport.TransportOptions] = None, ) -> Sequence[models.LookmlModel]: """Get All LookML Models""" @@ -6013,7 +6042,7 @@ def all_lookml_models( self.get( path="/lookml_models", structure=Sequence[models.LookmlModel], - query_params={"fields": fields}, + query_params={"fields": fields, "limit": limit, "offset": offset}, transport_options=transport_options, ), ) @@ -9867,6 +9896,73 @@ def delete_theme( # region User: Manage Users + # ### Search email credentials + # + # Returns all credentials_email records that match the given search criteria. + # + # If multiple search params are given and `filter_or` is FALSE or not specified, + # search params are combined in a logical AND operation. + # Only rows that match *all* search param criteria will be returned. + # + # If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + # Results will include rows that match **any** of the search criteria. + # + # String search params use case-insensitive matching. + # String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + # example="dan%" will match "danger" and "Danzig" but not "David" + # example="D_m%" will match "Damage" and "dump" + # + # Integer search params can accept a single value or a comma separated list of values. The multiple + # values will be combined under a logical OR operation - results will match at least one of + # the given values. + # + # Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + # or exclude (respectively) rows where the column is null. + # + # Boolean search params accept only "true" and "false" as values. + # + # GET /credentials_email/search -> Sequence[models.CredentialsEmailSearch] + def search_credentials_email( + self, + # Requested fields. + fields: Optional[str] = None, + # Number of results to return (used with `offset`). + limit: Optional[int] = None, + # Number of results to skip before returning any (used with `limit`). + offset: Optional[int] = None, + # Fields to sort by. + sorts: Optional[str] = None, + # Match credentials_email id. + id: Optional[int] = None, + # Match credentials_email email. + email: Optional[str] = None, + # Find credentials_email that match given emails. + emails: Optional[str] = None, + # Combine given search criteria in a boolean OR expression. + filter_or: Optional[bool] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> Sequence[models.CredentialsEmailSearch]: + """Search CredentialsEmail""" + response = cast( + Sequence[models.CredentialsEmailSearch], + self.get( + path="/credentials_email/search", + structure=Sequence[models.CredentialsEmailSearch], + query_params={ + "fields": fields, + "limit": limit, + "offset": offset, + "sorts": sorts, + "id": id, + "email": email, + "emails": emails, + "filter_or": filter_or, + }, + transport_options=transport_options, + ), + ) + return response + # ### Get information about the current user; i.e. the user account currently calling the API. # # GET /user -> models.User diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 8d11d5adb..64cef3f83 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 284 API models: 211 Spec, 0 Request, 56 Write, 17 Enum +# 286 API models: 213 Spec, 0 Request, 56 Write, 17 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -1642,6 +1642,59 @@ def __init__( self.user_url = user_url +@attr.s(auto_attribs=True, init=False) +class CredentialsEmailSearch(model.Model): + """ + Attributes: + can: Operations the current user is able to perform on this object + created_at: Timestamp for the creation of this credential + email: EMail address used for user login + forced_password_reset_at_next_login: Force the user to change their password upon their next login + is_disabled: Has this credential been disabled? + logged_in_at: Timestamp for most recent login using credential + password_reset_url: Url with one-time use secret token that the user can use to reset password + type: Short name for the type of this kind of credential + url: Link to get this item + user_url: Link to get this user + """ + + can: Optional[MutableMapping[str, bool]] = None + created_at: Optional[str] = None + email: Optional[str] = None + forced_password_reset_at_next_login: Optional[bool] = None + is_disabled: Optional[bool] = None + logged_in_at: Optional[str] = None + password_reset_url: Optional[str] = None + type: Optional[str] = None + url: Optional[str] = None + user_url: Optional[str] = None + + def __init__( + self, + *, + can: Optional[MutableMapping[str, bool]] = None, + created_at: Optional[str] = None, + email: Optional[str] = None, + forced_password_reset_at_next_login: Optional[bool] = None, + is_disabled: Optional[bool] = None, + logged_in_at: Optional[str] = None, + password_reset_url: Optional[str] = None, + type: Optional[str] = None, + url: Optional[str] = None, + user_url: Optional[str] = None + ): + self.can = can + self.created_at = created_at + self.email = email + self.forced_password_reset_at_next_login = forced_password_reset_at_next_login + self.is_disabled = is_disabled + self.logged_in_at = logged_in_at + self.password_reset_url = password_reset_url + self.type = type + self.url = url + self.user_url = user_url + + @attr.s(auto_attribs=True, init=False) class CredentialsEmbed(model.Model): """ @@ -9125,6 +9178,33 @@ def __init__( self.track_session_location = track_session_location +@attr.s(auto_attribs=True, init=False) +class Setting(model.Model): + """ + WARNING: no writeable properties found for POST, PUT, or PATCH + + Attributes: + extension_framework_enabled: Toggle extension framework on or off + marketplace_auto_install_enabled: Toggle marketplace auto install on or off + marketplace_enabled: Toggle marketplace on or off + """ + + extension_framework_enabled: Optional[bool] = None + marketplace_auto_install_enabled: Optional[bool] = None + marketplace_enabled: Optional[bool] = None + + def __init__( + self, + *, + extension_framework_enabled: Optional[bool] = None, + marketplace_auto_install_enabled: Optional[bool] = None, + marketplace_enabled: Optional[bool] = None + ): + self.extension_framework_enabled = extension_framework_enabled + self.marketplace_auto_install_enabled = marketplace_auto_install_enabled + self.marketplace_enabled = marketplace_enabled + + @attr.s(auto_attribs=True, init=False) class Snippet(model.Model): """ @@ -13000,6 +13080,10 @@ def __init__( ForwardRef("CredentialsEmail"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("CredentialsEmailSearch"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("CredentialsEmbed"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -13628,6 +13712,10 @@ def __init__( ForwardRef("SessionConfig"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("Setting"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("Snippet"), # type: ignore forward_ref_structure_hook, # type:ignore diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index dab4b97f6..c14d0fe2d 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 = "21.10" +sdk_version = "21.12" environment_prefix = "LOOKERSDK" diff --git a/release-please-config.json b/release-please-config.json index 56b74cb6c..b9c5e0b46 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,6 +2,7 @@ "plugins": ["node-workspace"], "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, + "release-as": "21.12.0", "packages": { ".": { "release-as": "" }, "packages/api-explorer": { "release-as": "" }, diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 88d0c638d..464e4a61a 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -49,7 +49,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "21.10" + public static let lookerVersion = "21.12" 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 65a47b22e..6b11a7cd3 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ @@ -1956,6 +1956,27 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> Setting + */ + public func set_setting( + /** + * @param {Setting} body + */ + _ body: Setting, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.patch("/setting", nil, try! self.encode(body), options) + return result + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -5522,10 +5543,18 @@ open class LookerSDK: APIMethods { * @param {String} fields Requested fields. */ fields: String? = nil, + /** + * @param {Int64} limit Number of results to return. (can be used with offset) + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) + */ + offset: Int64? = nil, options: ITransportSettings? = nil ) -> SDKResponse<[LookmlModel], SDKError> { let result: SDKResponse<[LookmlModel], SDKError> = self.get("/lookml_models", - ["fields": fields], nil, options) + ["fields": fields, "limit": limit, "offset": offset], nil, options) return result } @@ -9202,6 +9231,74 @@ open class LookerSDK: APIMethods { // MARK User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> [CredentialsEmailSearch] + */ + public func search_credentials_email( + /** + * @param {String} fields Requested fields. + */ + fields: String? = nil, + /** + * @param {Int64} limit Number of results to return (used with `offset`). + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any (used with `limit`). + */ + offset: Int64? = nil, + /** + * @param {String} sorts Fields to sort by. + */ + sorts: String? = nil, + /** + * @param {Int64} id Match credentials_email id. + */ + id: Int64? = nil, + /** + * @param {String} email Match credentials_email email. + */ + email: String? = nil, + /** + * @param {String} emails Find credentials_email that match given emails. + */ + emails: String? = nil, + /** + * @param {Bool} filter_or Combine given search criteria in a boolean OR expression. + */ + filter_or: Bool? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse<[CredentialsEmailSearch], SDKError> { + let result: SDKResponse<[CredentialsEmailSearch], SDKError> = self.get("/credentials_email/search", + ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "email": email, "emails": emails, "filter_or": filter_or as Any?], nil, options) + return result + } + /** * ### Get information about the current user; i.e. the user account currently calling the API. * diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 367a68f1d..6f944ae55 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 284 API models: 211 Spec, 0 Request, 56 Write, 17 Enum + * 286 API models: 213 Spec, 0 Request, 56 Write, 17 Enum */ @@ -1625,6 +1625,63 @@ public struct CredentialsEmail: SDKModel { } +public struct CredentialsEmailSearch: SDKModel { + /** + * Operations the current user is able to perform on this object (read-only) + */ + public var can: StringDictionary? + /** + * Timestamp for the creation of this credential (read-only) + */ + public var created_at: String? + /** + * EMail address used for user login + */ + public var email: String? + /** + * Force the user to change their password upon their next login + */ + public var forced_password_reset_at_next_login: Bool? + /** + * Has this credential been disabled? (read-only) + */ + public var is_disabled: Bool? + /** + * Timestamp for most recent login using credential (read-only) + */ + public var logged_in_at: String? + /** + * Url with one-time use secret token that the user can use to reset password (read-only) + */ + public var password_reset_url: String? + /** + * Short name for the type of this kind of credential (read-only) + */ + public var type: String? + /** + * Link to get this item (read-only) + */ + public var url: String? + /** + * Link to get this user (read-only) + */ + public var user_url: String? + + public init(can: StringDictionary? = nil, created_at: String? = nil, email: String? = nil, forced_password_reset_at_next_login: Bool? = nil, is_disabled: Bool? = nil, logged_in_at: String? = nil, password_reset_url: String? = nil, type: String? = nil, url: String? = nil, user_url: String? = nil) { + self.can = can + self.created_at = created_at + self.email = email + self.forced_password_reset_at_next_login = forced_password_reset_at_next_login + self.is_disabled = is_disabled + self.logged_in_at = logged_in_at + self.password_reset_url = password_reset_url + self.type = type + self.url = url + self.user_url = user_url + } + +} + public struct CredentialsEmbed: SDKModel { /** * Operations the current user is able to perform on this object (read-only) @@ -9510,6 +9567,31 @@ public struct SessionConfig: SDKModel { } +/** + * WARNING: no writeable properties found for POST, PUT, or PATCH + */ +public struct Setting: SDKModel { + /** + * Toggle extension framework on or off (read-only) + */ + public var extension_framework_enabled: Bool? + /** + * Toggle marketplace auto install on or off (read-only) + */ + public var marketplace_auto_install_enabled: Bool? + /** + * Toggle marketplace on or off (read-only) + */ + public var marketplace_enabled: Bool? + + public init(extension_framework_enabled: Bool? = nil, marketplace_auto_install_enabled: Bool? = nil, marketplace_enabled: Bool? = nil) { + self.extension_framework_enabled = extension_framework_enabled + self.marketplace_auto_install_enabled = marketplace_auto_install_enabled + self.marketplace_enabled = marketplace_enabled + } + +} + public struct Snippet: SDKModel { /** * Name of the snippet (read-only) diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index 0ee09bc47..9214a8fc1 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 413 API methods + * 415 API methods */ @@ -1954,6 +1954,27 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Configure Looker Settings + * + * Available settings are: + * - extension_framework_enabled + * - marketplace_auto_install_enabled + * - marketplace_enabled + * + * PATCH /setting -> Setting + */ + public func set_setting( + /** + * @param {Setting} body + */ + _ body: Setting, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.patch("/setting", nil, try! self.encode(body), options) + return result + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -5520,10 +5541,18 @@ open class LookerSDKStream: APIMethods { * @param {String} fields Requested fields. */ fields: String? = nil, + /** + * @param {Int64} limit Number of results to return. (can be used with offset) + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any. (Defaults to 0 if not set when limit is used) + */ + offset: Int64? = nil, options: ITransportSettings? = nil ) -> SDKResponse { let result: SDKResponse = self.get("/lookml_models", - ["fields": fields], nil, options) + ["fields": fields, "limit": limit, "offset": offset], nil, options) return result } @@ -9200,6 +9229,74 @@ open class LookerSDKStream: APIMethods { // MARK User: Manage Users + /** + * ### Search email credentials + * + * Returns all credentials_email records that match the given search criteria. + * + * If multiple search params are given and `filter_or` is FALSE or not specified, + * search params are combined in a logical AND operation. + * Only rows that match *all* search param criteria will be returned. + * + * If `filter_or` is TRUE, multiple search params are combined in a logical OR operation. + * Results will include rows that match **any** of the search criteria. + * + * String search params use case-insensitive matching. + * String search params can contain `%` and '_' as SQL LIKE pattern match wildcard expressions. + * example="dan%" will match "danger" and "Danzig" but not "David" + * example="D_m%" will match "Damage" and "dump" + * + * Integer search params can accept a single value or a comma separated list of values. The multiple + * values will be combined under a logical OR operation - results will match at least one of + * the given values. + * + * Most search params can accept "IS NULL" and "NOT NULL" as special expressions to match + * or exclude (respectively) rows where the column is null. + * + * Boolean search params accept only "true" and "false" as values. + * + * GET /credentials_email/search -> [CredentialsEmailSearch] + */ + public func search_credentials_email( + /** + * @param {String} fields Requested fields. + */ + fields: String? = nil, + /** + * @param {Int64} limit Number of results to return (used with `offset`). + */ + limit: Int64? = nil, + /** + * @param {Int64} offset Number of results to skip before returning any (used with `limit`). + */ + offset: Int64? = nil, + /** + * @param {String} sorts Fields to sort by. + */ + sorts: String? = nil, + /** + * @param {Int64} id Match credentials_email id. + */ + id: Int64? = nil, + /** + * @param {String} email Match credentials_email email. + */ + email: String? = nil, + /** + * @param {String} emails Find credentials_email that match given emails. + */ + emails: String? = nil, + /** + * @param {Bool} filter_or Combine given search criteria in a boolean OR expression. + */ + filter_or: Bool? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.get("/credentials_email/search", + ["fields": fields, "limit": limit, "offset": offset, "sorts": sorts, "id": id, "email": email, "emails": emails, "filter_or": filter_or as Any?], nil, options) + return result + } + /** * ### Get information about the current user; i.e. the user account currently calling the API. *