From 109839d2d4fae10e7aeab088378bba5e2b368019 Mon Sep 17 00:00:00 2001 From: "Dr. Strangelove" Date: Wed, 11 Sep 2024 14:31:54 -0400 Subject: [PATCH] feat: generate SDKs for Looker 24.16 (#1499) Release-As: 24.16.0 --- csharp/rtl/Constants.cs | 2 +- csharp/sdk/4.0/methods.cs | 38 ++- csharp/sdk/4.0/models.cs | 50 ++- go/sdk/v4/methods.go | 16 +- go/sdk/v4/models.go | 38 ++- kotlin/src/main/com/looker/sdk/4.0/methods.kt | 41 ++- kotlin/src/main/com/looker/sdk/4.0/models.kt | 51 ++- kotlin/src/main/com/looker/sdk/4.0/streams.kt | 41 ++- kotlin/src/main/com/looker/sdk/Constants.kt | 2 +- packages/sdk/src/4.0/funcs.ts | 42 ++- packages/sdk/src/4.0/methods.ts | 40 ++- packages/sdk/src/4.0/methodsInterface.ts | 23 +- packages/sdk/src/4.0/models.ts | 127 +++++++- packages/sdk/src/4.0/streams.ts | 40 ++- packages/sdk/src/constants.ts | 2 +- python/looker_sdk/sdk/api40/methods.py | 46 ++- python/looker_sdk/sdk/api40/models.py | 105 +++++- python/looker_sdk/sdk/constants.py | 2 +- spec/Looker.4.0.json | 256 ++++++++++++++- spec/Looker.4.0.oas.json | 298 +++++++++++++++++- swift/looker/rtl/constants.swift | 2 +- swift/looker/sdk/methods.swift | 46 ++- swift/looker/sdk/models.swift | 233 ++++++++++++-- swift/looker/sdk/streams.swift | 46 ++- 24 files changed, 1485 insertions(+), 102 deletions(-) diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index b7ee079a9..691f7898e 100644 --- a/csharp/rtl/Constants.cs +++ b/csharp/rtl/Constants.cs @@ -61,7 +61,7 @@ public struct Constants public const string DefaultApiVersion = "4.0"; public const string AgentPrefix = "CS-SDK"; - public const string LookerVersion = "24.14"; + public const string LookerVersion = "24.16"; 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 3852eae33..52963f276 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 465 API methods +/// 466 API methods #nullable enable using System; @@ -3381,6 +3381,42 @@ public async Task> search_content( { "per_page", per_page }},null,options); } + /// ### Get Content Summary + /// + /// Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + /// favorites and scheduled items. + /// + /// GET /content_summary -> ContentSummary[] + /// + /// ContentSummary[] Content Summary (application/json) + /// + /// Comma-delimited names of fields to return in responses. Omit for all fields + /// Number of results to return. (used with offset) + /// Number of results to skip before returning any. (used with limit) + /// Match group id + /// Match user id + /// Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + /// Fields to sort by + public async Task> content_summary( + string? fields = null, + long? limit = null, + long? offset = null, + string? target_group_id = null, + string? target_user_id = null, + string? target_content_type = null, + string? sorts = null, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Get, "/content_summary", new Values { + { "fields", fields }, + { "limit", limit }, + { "offset", offset }, + { "target_group_id", target_group_id }, + { "target_user_id", target_user_id }, + { "target_content_type", target_content_type }, + { "sorts", sorts }},null,options); + } + /// ### Get an image representing the contents of a dashboard or look. /// /// The returned thumbnail is an abstract representation of the contents of a dashboard or look and does not diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index 3d5fd4535..ec746bde0 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum +/// 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum #nullable enable using System; @@ -597,6 +597,46 @@ public class ContentSearch : SdkModel public string? preferred_viewer { get; set; } = null; } +public class ContentSummary : SdkModel +{ + /// Operations the current user is able to perform on this object (read-only) + public StringDictionary? can { get; set; } = null; + /// Unique id (read-only) + public string? id { get; set; } = null; + /// Content type (read-only) + public string? content_type { get; set; } = null; + /// Content id (read-only) + public string? content_id { get; set; } = null; + /// Content slug (read-only) + public string? content_slug { get; set; } = null; + /// Content title (read-only) + public string? title { get; set; } = null; + /// Content Description (read-only) + public string? description { get; set; } = null; + /// Last time viewed by current user (read-only) + public DateTime? last_viewed_at { get; set; } = null; + /// ID of user who created the content (read-only) + public string? user_id { get; set; } = null; + /// Full name of user who created the content (read-only) + public string? user_full_name { get; set; } = null; + /// If the content is scheduled by the current user (read-only) + public bool? is_scheduled { get; set; } = null; + /// Number of favorites (read-only) + public long? favorite_count { get; set; } = null; + /// Number of views (read-only) + public long? view_count { get; set; } = null; + /// Corresponding favorite id if item is favorited by current user (read-only) + public string? favorite_id { get; set; } = null; + /// (read-only) + public float? weighted_score { get; set; } = null; + /// (read-only) + public float? group_weighted_score { get; set; } = null; + /// (read-only) + public float? suggestion_score { get; set; } = null; + /// The preferred route for viewing this content (ie: dashboards or dashboards-next) (read-only) + public string? preferred_viewer { get; set; } = null; +} + public class ContentValidation : SdkModel { /// A list of content errors (read-only) @@ -4747,8 +4787,6 @@ public class ScheduledPlan : SdkModel public string? datagroup { get; set; } = null; /// Timezone for interpreting the specified crontab (default is Looker instance timezone) public string? timezone { get; set; } = null; - /// Query id - public string? query_id { get; set; } = null; /// Scheduled plan destinations public ScheduledPlanDestination[]? scheduled_plan_destination { get; set; } = null; /// Whether the plan in question should only be run once (usually for testing) @@ -4775,6 +4813,8 @@ public class ScheduledPlan : SdkModel public bool? long_tables { get; set; } = null; /// The pixel width at which we render the inline table visualizations public long? inline_table_width { get; set; } = null; + /// Query id + public string? query_id { get; set; } = null; /// Unique Id (read-only) public string? id { get; set; } = null; /// Date and time when ScheduledPlan was created (read-only) @@ -6928,8 +6968,6 @@ public class WriteScheduledPlan : SdkModel public string? datagroup { get; set; } = null; /// Timezone for interpreting the specified crontab (default is Looker instance timezone) public string? timezone { get; set; } = null; - /// Query id - public string? query_id { get; set; } = null; /// Scheduled plan destinations public ScheduledPlanDestination[]? scheduled_plan_destination { get; set; } = null; /// Whether the plan in question should only be run once (usually for testing) @@ -6956,6 +6994,8 @@ public class WriteScheduledPlan : SdkModel public bool? long_tables { get; set; } = null; /// The pixel width at which we render the inline table visualizations public long? inline_table_width { get; set; } = null; + /// Query id + public string? query_id { get; set; } = null; } /// Dynamic writeable type for SessionConfig removes: diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index a69ddb475..7cff06968 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -465 API methods +466 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -2829,6 +2829,20 @@ func (l *LookerSDK) SearchContent(request RequestSearchContent, } +// ### Get Content Summary +// +// Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, +// favorites and scheduled items. +// +// GET /content_summary -> []ContentSummary +func (l *LookerSDK) ContentSummary(request RequestContentSummary, + options *rtl.ApiSettings) ([]ContentSummary, error) { + var result []ContentSummary + err := l.session.Do(&result, "GET", "/4.0", "/content_summary", map[string]interface{}{"fields": request.Fields, "limit": request.Limit, "offset": request.Offset, "target_group_id": request.TargetGroupId, "target_user_id": request.TargetUserId, "target_content_type": request.TargetContentType, "sorts": request.Sorts}, nil, options) + return result, err + +} + // ### Get an image representing the contents of a dashboard or look. // // The returned thumbnail is an abstract representation of the contents of a dashboard or look and does not diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index a5aa3b965..108e5e6b4 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -408 API models: 259 Spec, 67 Request, 60 Write, 22 Enum +410 API models: 260 Spec, 68 Request, 60 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API v4 @@ -347,6 +347,27 @@ type ContentSearch struct { PreferredViewer *string `json:"preferred_viewer,omitempty"` // Preferred way of viewing the content (only applies to dashboards) } +type ContentSummary struct { + Can *map[string]bool `json:"can,omitempty"` // Operations the current user is able to perform on this object + Id *string `json:"id,omitempty"` // Unique id + ContentType *string `json:"content_type,omitempty"` // Content type + ContentId *string `json:"content_id,omitempty"` // Content id + ContentSlug *string `json:"content_slug,omitempty"` // Content slug + Title *string `json:"title,omitempty"` // Content title + Description *string `json:"description,omitempty"` // Content Description + LastViewedAt *time.Time `json:"last_viewed_at,omitempty"` // Last time viewed by current user + UserId *string `json:"user_id,omitempty"` // ID of user who created the content + UserFullName *string `json:"user_full_name,omitempty"` // Full name of user who created the content + IsScheduled *bool `json:"is_scheduled,omitempty"` // If the content is scheduled by the current user + FavoriteCount *int64 `json:"favorite_count,omitempty"` // Number of favorites + ViewCount *int64 `json:"view_count,omitempty"` // Number of views + FavoriteId *string `json:"favorite_id,omitempty"` // Corresponding favorite id if item is favorited by current user + WeightedScore *float32 `json:"weighted_score,omitempty"` + GroupWeightedScore *float32 `json:"group_weighted_score,omitempty"` + SuggestionScore *float32 `json:"suggestion_score,omitempty"` + PreferredViewer *string `json:"preferred_viewer,omitempty"` // The preferred route for viewing this content (ie: dashboards or dashboards-next) +} + type ContentValidation struct { ContentWithErrors *[]ContentValidatorError `json:"content_with_errors,omitempty"` // A list of content errors ComputationTime *float32 `json:"computation_time,omitempty"` // Duration of content validation in seconds @@ -2613,6 +2634,17 @@ type RequestConnectionTables struct { TableLimit *int64 `json:"table_limit,omitempty"` // Optional. Return tables up to the table_limit } +// Dynamically generated request type for content_summary +type RequestContentSummary struct { + Fields *string `json:"fields,omitempty"` // Comma-delimited names of fields to return in responses. Omit for all 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) + TargetGroupId *string `json:"target_group_id,omitempty"` // Match group id + TargetUserId *string `json:"target_user_id,omitempty"` // Match user id + TargetContentType *string `json:"target_content_type,omitempty"` // Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + Sorts *string `json:"sorts,omitempty"` // Fields to sort by +} + // Dynamically generated request type for content_thumbnail type RequestContentThumbnail struct { Type string `json:"type"` // Either dashboard or look @@ -3380,7 +3412,6 @@ type ScheduledPlan struct { Crontab *string `json:"crontab,omitempty"` // Vixie-Style crontab specification when to run Datagroup *string `json:"datagroup,omitempty"` // Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) Timezone *string `json:"timezone,omitempty"` // Timezone for interpreting the specified crontab (default is Looker instance timezone) - QueryId *string `json:"query_id,omitempty"` // Query id ScheduledPlanDestination *[]ScheduledPlanDestination `json:"scheduled_plan_destination,omitempty"` // Scheduled plan destinations RunOnce *bool `json:"run_once,omitempty"` // Whether the plan in question should only be run once (usually for testing) IncludeLinks *bool `json:"include_links,omitempty"` // Whether links back to Looker should be included in this ScheduledPlan @@ -3394,6 +3425,7 @@ type ScheduledPlan struct { ColorTheme *string `json:"color_theme,omitempty"` // Color scheme of the dashboard if applicable LongTables *bool `json:"long_tables,omitempty"` // Whether or not to expand table vis to full length InlineTableWidth *int64 `json:"inline_table_width,omitempty"` // The pixel width at which we render the inline table visualizations + QueryId *string `json:"query_id,omitempty"` // Query id Id *string `json:"id,omitempty"` // Unique Id CreatedAt *time.Time `json:"created_at,omitempty"` // Date and time when ScheduledPlan was created UpdatedAt *time.Time `json:"updated_at,omitempty"` // Date and time when ScheduledPlan was last updated @@ -4620,7 +4652,6 @@ type WriteScheduledPlan struct { Crontab *string `json:"crontab,omitempty"` // Vixie-Style crontab specification when to run Datagroup *string `json:"datagroup,omitempty"` // Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) Timezone *string `json:"timezone,omitempty"` // Timezone for interpreting the specified crontab (default is Looker instance timezone) - QueryId *string `json:"query_id,omitempty"` // Query id ScheduledPlanDestination *[]ScheduledPlanDestination `json:"scheduled_plan_destination,omitempty"` // Scheduled plan destinations RunOnce *bool `json:"run_once,omitempty"` // Whether the plan in question should only be run once (usually for testing) IncludeLinks *bool `json:"include_links,omitempty"` // Whether links back to Looker should be included in this ScheduledPlan @@ -4634,6 +4665,7 @@ type WriteScheduledPlan struct { ColorTheme *string `json:"color_theme,omitempty"` // Color scheme of the dashboard if applicable LongTables *bool `json:"long_tables,omitempty"` // Whether or not to expand table vis to full length InlineTableWidth *int64 `json:"inline_table_width,omitempty"` // The pixel width at which we render the inline table visualizations + QueryId *string `json:"query_id,omitempty"` // Query id } // Dynamic writeable type for SessionConfig removes: 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 3acfcbf5d..2941da884 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 @@ */ /** - * 465 API methods + * 466 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -3396,6 +3396,45 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { ) } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * @param {String} fields Comma-delimited names of fields to return in responses. Omit for all 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} target_group_id Match group id + * @param {String} target_user_id Match user id + * @param {String} target_content_type Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + * @param {String} sorts Fields to sort by + * + * GET /content_summary -> Array + */ + @JvmOverloads fun content_summary( + fields: String? = null, + limit: Long? = null, + offset: Long? = null, + target_group_id: String? = null, + target_user_id: String? = null, + target_content_type: String? = null, + sorts: String? = null, + ): SDKResponse { + return this.get>( + "/content_summary", + mapOf( + "fields" to fields, + "limit" to limit, + "offset" to offset, + "target_group_id" to target_group_id, + "target_user_id" to target_user_id, + "target_content_type" to target_content_type, + "sorts" to sorts, + ), + ) + } + /** * ### Get an image representing the contents of a dashboard or look. * 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 5a8122588..b6872f901 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 @@ */ /** - * 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum + * 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -613,6 +613,47 @@ data class ContentSearch( var preferred_viewer: String? = null, ) : Serializable +/** + * @property can Operations the current user is able to perform on this object (read-only) + * @property id Unique id (read-only) + * @property content_type Content type (read-only) + * @property content_id Content id (read-only) + * @property content_slug Content slug (read-only) + * @property title Content title (read-only) + * @property description Content Description (read-only) + * @property last_viewed_at Last time viewed by current user (read-only) + * @property user_id ID of user who created the content (read-only) + * @property user_full_name Full name of user who created the content (read-only) + * @property is_scheduled If the content is scheduled by the current user (read-only) + * @property favorite_count Number of favorites (read-only) + * @property view_count Number of views (read-only) + * @property favorite_id Corresponding favorite id if item is favorited by current user (read-only) + * @property weighted_score (read-only) + * @property group_weighted_score (read-only) + * @property suggestion_score (read-only) + * @property preferred_viewer The preferred route for viewing this content (ie: dashboards or dashboards-next) (read-only) + */ +data class ContentSummary( + var can: Map? = null, + var id: String? = null, + var content_type: String? = null, + var content_id: String? = null, + var content_slug: String? = null, + var title: String? = null, + var description: String? = null, + var last_viewed_at: Date? = null, + var user_id: String? = null, + var user_full_name: String? = null, + var is_scheduled: Boolean? = null, + var favorite_count: Long? = null, + var view_count: Long? = null, + var favorite_id: String? = null, + var weighted_score: Float? = null, + var group_weighted_score: Float? = null, + var suggestion_score: Float? = null, + var preferred_viewer: String? = null, +) : Serializable + /** * @property content_with_errors A list of content errors (read-only) * @property computation_time Duration of content validation in seconds (read-only) @@ -4958,7 +4999,6 @@ data class SamlUserAttributeWrite( * @property crontab Vixie-Style crontab specification when to run * @property datagroup Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) * @property timezone Timezone for interpreting the specified crontab (default is Looker instance timezone) - * @property query_id Query id * @property scheduled_plan_destination Scheduled plan destinations * @property run_once Whether the plan in question should only be run once (usually for testing) * @property include_links Whether links back to Looker should be included in this ScheduledPlan @@ -4972,6 +5012,7 @@ data class SamlUserAttributeWrite( * @property color_theme Color scheme of the dashboard if applicable * @property long_tables Whether or not to expand table vis to full length * @property inline_table_width The pixel width at which we render the inline table visualizations + * @property query_id Query id * @property id Unique Id (read-only) * @property created_at Date and time when ScheduledPlan was created (read-only) * @property updated_at Date and time when ScheduledPlan was last updated (read-only) @@ -4998,7 +5039,6 @@ data class ScheduledPlan( var crontab: String? = null, var datagroup: String? = null, var timezone: String? = null, - var query_id: String? = null, var scheduled_plan_destination: Array? = null, var run_once: Boolean? = null, var include_links: Boolean? = null, @@ -5012,6 +5052,7 @@ data class ScheduledPlan( var color_theme: String? = null, var long_tables: Boolean? = null, var inline_table_width: Long? = null, + var query_id: String? = null, var id: String? = null, var created_at: Date? = null, var updated_at: Date? = null, @@ -7236,7 +7277,6 @@ data class WriteSamlConfig( * @property crontab Vixie-Style crontab specification when to run * @property datagroup Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) * @property timezone Timezone for interpreting the specified crontab (default is Looker instance timezone) - * @property query_id Query id * @property scheduled_plan_destination Scheduled plan destinations * @property run_once Whether the plan in question should only be run once (usually for testing) * @property include_links Whether links back to Looker should be included in this ScheduledPlan @@ -7250,6 +7290,7 @@ data class WriteSamlConfig( * @property color_theme Color scheme of the dashboard if applicable * @property long_tables Whether or not to expand table vis to full length * @property inline_table_width The pixel width at which we render the inline table visualizations + * @property query_id Query id */ data class WriteScheduledPlan( var name: String? = null, @@ -7268,7 +7309,6 @@ data class WriteScheduledPlan( var crontab: String? = null, var datagroup: String? = null, var timezone: String? = null, - var query_id: String? = null, var scheduled_plan_destination: Array? = null, var run_once: Boolean? = null, var include_links: Boolean? = null, @@ -7282,6 +7322,7 @@ data class WriteScheduledPlan( var color_theme: String? = null, var long_tables: Boolean? = null, var inline_table_width: Long? = null, + var query_id: String? = null, ) : Serializable /** 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 05c9e2652..1431f5b25 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 @@ */ /** - * 465 API methods + * 466 API methods */ // NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -3394,6 +3394,45 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { ) } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * @param {String} fields Comma-delimited names of fields to return in responses. Omit for all 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} target_group_id Match group id + * @param {String} target_user_id Match user id + * @param {String} target_content_type Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + * @param {String} sorts Fields to sort by + * + * GET /content_summary -> ByteArray + */ + @JvmOverloads fun content_summary( + fields: String? = null, + limit: Long? = null, + offset: Long? = null, + target_group_id: String? = null, + target_user_id: String? = null, + target_content_type: String? = null, + sorts: String? = null, + ): SDKResponse { + return this.get( + "/content_summary", + mapOf( + "fields" to fields, + "limit" to limit, + "offset" to offset, + "target_group_id" to target_group_id, + "target_user_id" to target_user_id, + "target_content_type" to target_content_type, + "sorts" to sorts, + ), + ) + } + /** * ### Get an image representing the contents of a dashboard or look. * diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index 73b0b0bac..e0bd67653 100644 --- a/kotlin/src/main/com/looker/sdk/Constants.kt +++ b/kotlin/src/main/com/looker/sdk/Constants.kt @@ -28,7 +28,7 @@ package com.looker.sdk const val ENVIRONMENT_PREFIX = "LOOKERSDK" const val SDK_TAG = "KT-SDK" -const val LOOKER_VERSION = "24.14" +const val LOOKER_VERSION = "24.16" 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 9419d2849..68e4b24dd 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ import type { @@ -65,6 +65,7 @@ import type { IContentMeta, IContentMetaGroupUser, IContentSearch, + IContentSummary, IContentValidation, IContentView, ICostEstimate, @@ -181,6 +182,7 @@ import type { IRequestConnectionSchemas, IRequestConnectionSearchColumns, IRequestConnectionTables, + IRequestContentSummary, IRequestContentThumbnail, IRequestCreateDashboardElement, IRequestCreateDashboardRenderTask, @@ -4973,6 +4975,40 @@ export const search_content = async ( ); }; +/** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> IContentSummary[] + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestContentSummary" for complex method parameters + * @param options one-time API call overrides + * + */ +export const content_summary = async ( + sdk: IAPIMethods, + request: IRequestContentSummary, + options?: Partial +): Promise> => { + return sdk.get( + '/content_summary', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + target_group_id: request.target_group_id, + target_user_id: request.target_user_id, + target_content_type: request.target_content_type, + sorts: request.sorts, + }, + null, + options + ); +}; + /** * ### Get an image representing the contents of a dashboard or look. * @@ -6505,9 +6541,9 @@ export const delete_folder = async ( sdk: IAPIMethods, folder_id: string, options?: Partial -): Promise> => { +): Promise> => { folder_id = encodeParam(folder_id); - return sdk.delete( + return sdk.delete( `/folders/${folder_id}`, null, null, diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index da3eef2b5..51ce4f5b0 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ import type { @@ -63,6 +63,7 @@ import type { IContentMeta, IContentMetaGroupUser, IContentSearch, + IContentSummary, IContentValidation, IContentView, ICostEstimate, @@ -179,6 +180,7 @@ import type { IRequestConnectionSchemas, IRequestConnectionSearchColumns, IRequestConnectionTables, + IRequestContentSummary, IRequestContentThumbnail, IRequestCreateDashboardElement, IRequestCreateDashboardRenderTask, @@ -4669,6 +4671,38 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ); } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> IContentSummary[] + * + * @param request composed interface "IRequestContentSummary" for complex method parameters + * @param options one-time API call overrides + * + */ + async content_summary( + request: IRequestContentSummary, + options?: Partial + ): Promise> { + return this.get( + '/content_summary', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + target_group_id: request.target_group_id, + target_user_id: request.target_user_id, + target_content_type: request.target_content_type, + sorts: request.sorts, + }, + null, + options + ); + } + /** * ### Get an image representing the contents of a dashboard or look. * @@ -6099,9 +6133,9 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { async delete_folder( folder_id: string, options?: Partial - ): Promise> { + ): Promise> { folder_id = encodeParam(folder_id); - return this.delete( + return this.delete( `/folders/${folder_id}`, null, null, diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 0aa113166..f990efcf5 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ import type { @@ -60,6 +60,7 @@ import type { IContentMeta, IContentMetaGroupUser, IContentSearch, + IContentSummary, IContentValidation, IContentView, ICostEstimate, @@ -176,6 +177,7 @@ import type { IRequestConnectionSchemas, IRequestConnectionSearchColumns, IRequestConnectionTables, + IRequestContentSummary, IRequestContentThumbnail, IRequestCreateDashboardElement, IRequestCreateDashboardRenderTask, @@ -3409,6 +3411,23 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise>; + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> IContentSummary[] + * + * @param request composed interface "IRequestContentSummary" for complex method parameters + * @param options one-time API call overrides + * + */ + content_summary( + request: IRequestContentSummary, + options?: Partial + ): Promise>; + /** * ### Get an image representing the contents of a dashboard or look. * @@ -4385,7 +4404,7 @@ export interface ILooker40SDK extends IAPIMethods { delete_folder( folder_id: string, options?: Partial - ): Promise>; + ): Promise>; /** * ### Get information about all folders. diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index 27e38db76..77aaf5936 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 409 API models: 259 Spec, 67 Request, 61 Write, 22 Enum + * 411 API models: 260 Spec, 68 Request, 61 Write, 22 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl'; @@ -948,6 +948,81 @@ export interface IContentSearch { preferred_viewer?: string | null; } +export interface IContentSummary { + /** + * Operations the current user is able to perform on this object (read-only) + */ + can?: IDictionary; + /** + * Unique id (read-only) + */ + id?: string; + /** + * Content type (read-only) + */ + content_type?: string | null; + /** + * Content id (read-only) + */ + content_id?: string | null; + /** + * Content slug (read-only) + */ + content_slug?: string | null; + /** + * Content title (read-only) + */ + title?: string | null; + /** + * Content Description (read-only) + */ + description?: string | null; + /** + * Last time viewed by current user (read-only) + */ + last_viewed_at?: Date | null; + /** + * ID of user who created the content (read-only) + */ + user_id?: string | null; + /** + * Full name of user who created the content (read-only) + */ + user_full_name?: string | null; + /** + * If the content is scheduled by the current user (read-only) + */ + is_scheduled?: boolean; + /** + * Number of favorites (read-only) + */ + favorite_count?: number | null; + /** + * Number of views (read-only) + */ + view_count?: number | null; + /** + * Corresponding favorite id if item is favorited by current user (read-only) + */ + favorite_id?: string | null; + /** + * (read-only) + */ + weighted_score?: number | null; + /** + * (read-only) + */ + group_weighted_score?: number | null; + /** + * (read-only) + */ + suggestion_score?: number | null; + /** + * The preferred route for viewing this content (ie: dashboards or dashboards-next) (read-only) + */ + preferred_viewer?: string | null; +} + export interface IContentValidation { /** * A list of content errors (read-only) @@ -7928,6 +8003,40 @@ export interface IRequestConnectionTables { table_limit?: number | null; } +/** + * Dynamically generated request type for content_summary + */ +export interface IRequestContentSummary { + /** + * Comma-delimited names of fields to return in responses. Omit for all 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; + /** + * Match group id + */ + target_group_id?: string | null; + /** + * Match user id + */ + target_user_id?: string | null; + /** + * Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + */ + target_content_type?: string | null; + /** + * Fields to sort by + */ + sorts?: string | null; +} + /** * Dynamically generated request type for content_thumbnail */ @@ -10336,10 +10445,6 @@ export interface IScheduledPlan { * Timezone for interpreting the specified crontab (default is Looker instance timezone) */ timezone?: string | null; - /** - * Query id - */ - query_id?: string | null; /** * Scheduled plan destinations */ @@ -10392,6 +10497,10 @@ export interface IScheduledPlan { * The pixel width at which we render the inline table visualizations */ inline_table_width?: number | null; + /** + * Query id + */ + query_id?: string | null; /** * Unique Id (read-only) */ @@ -13963,10 +14072,6 @@ export interface IWriteScheduledPlan { * Timezone for interpreting the specified crontab (default is Looker instance timezone) */ timezone?: string | null; - /** - * Query id - */ - query_id?: string | null; /** * Scheduled plan destinations */ @@ -14019,6 +14124,10 @@ export interface IWriteScheduledPlan { * The pixel width at which we render the inline table visualizations */ inline_table_width?: number | null; + /** + * Query id + */ + query_id?: string | null; } /** diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index 923a98f10..e51aeafd2 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ import type { @@ -62,6 +62,7 @@ import type { IContentMeta, IContentMetaGroupUser, IContentSearch, + IContentSummary, IContentValidation, IContentView, ICostEstimate, @@ -177,6 +178,7 @@ import type { IRequestConnectionSchemas, IRequestConnectionSearchColumns, IRequestConnectionTables, + IRequestContentSummary, IRequestContentThumbnail, IRequestCreateDashboardElement, IRequestCreateDashboardRenderTask, @@ -5347,6 +5349,42 @@ export class Looker40SDKStream extends APIMethods { ); } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> IContentSummary[] + * + * @param callback streaming output function + * @param request composed interface "IRequestContentSummary" for complex method parameters + * @param options one-time API call overrides + * + */ + async content_summary( + callback: (response: Response) => Promise, + request: IRequestContentSummary, + options?: Partial + ) { + return this.authStream( + callback, + 'GET', + '/content_summary', + { + fields: request.fields, + limit: request.limit, + offset: request.offset, + target_group_id: request.target_group_id, + target_user_id: request.target_user_id, + target_content_type: request.target_content_type, + sorts: request.sorts, + }, + null, + options + ); + } + /** * ### Get an image representing the contents of a dashboard or look. * diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index eebd4058f..5c02a7c5b 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '24.14'; +export const sdkVersion = '24.16'; export const environmentPrefix = 'LOOKERSDK'; diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index 16aacbf3e..4733f2f90 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 465 API methods +# 466 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -4424,6 +4424,50 @@ def search_content( ) return response + # ### Get Content Summary + # + # Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + # favorites and scheduled items. + # + # GET /content_summary -> Sequence[mdls.ContentSummary] + def content_summary( + self, + # Comma-delimited names of fields to return in responses. Omit for all 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, + # Match group id + target_group_id: Optional[str] = None, + # Match user id + target_user_id: Optional[str] = None, + # Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + target_content_type: Optional[str] = None, + # Fields to sort by + sorts: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> Sequence[mdls.ContentSummary]: + """Search Content Summaries""" + response = cast( + Sequence[mdls.ContentSummary], + self.get( + path="/content_summary", + structure=Sequence[mdls.ContentSummary], + query_params={ + "fields": fields, + "limit": limit, + "offset": offset, + "target_group_id": target_group_id, + "target_user_id": target_user_id, + "target_content_type": target_content_type, + "sorts": sorts, + }, + transport_options=transport_options, + ), + ) + return response + # ### Get an image representing the contents of a dashboard or look. # # The returned thumbnail is an abstract representation of the contents of a dashboard or look and does not diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 7d4aca3d7..2b571da94 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum +# 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -1283,6 +1283,91 @@ def __init__( self.preferred_viewer = preferred_viewer +@attr.s(auto_attribs=True, init=False) +class ContentSummary(model.Model): + """ + Attributes: + can: Operations the current user is able to perform on this object + id: Unique id + content_type: Content type + content_id: Content id + content_slug: Content slug + title: Content title + description: Content Description + last_viewed_at: Last time viewed by current user + user_id: ID of user who created the content + user_full_name: Full name of user who created the content + is_scheduled: If the content is scheduled by the current user + favorite_count: Number of favorites + view_count: Number of views + favorite_id: Corresponding favorite id if item is favorited by current user + weighted_score: + group_weighted_score: + suggestion_score: + preferred_viewer: The preferred route for viewing this content (ie: dashboards or dashboards-next) + """ + + can: Optional[MutableMapping[str, bool]] = None + id: Optional[str] = None + content_type: Optional[str] = None + content_id: Optional[str] = None + content_slug: Optional[str] = None + title: Optional[str] = None + description: Optional[str] = None + last_viewed_at: Optional[datetime.datetime] = None + user_id: Optional[str] = None + user_full_name: Optional[str] = None + is_scheduled: Optional[bool] = None + favorite_count: Optional[int] = None + view_count: Optional[int] = None + favorite_id: Optional[str] = None + weighted_score: Optional[float] = None + group_weighted_score: Optional[float] = None + suggestion_score: Optional[float] = None + preferred_viewer: Optional[str] = None + + def __init__( + self, + *, + can: Optional[MutableMapping[str, bool]] = None, + id: Optional[str] = None, + content_type: Optional[str] = None, + content_id: Optional[str] = None, + content_slug: Optional[str] = None, + title: Optional[str] = None, + description: Optional[str] = None, + last_viewed_at: Optional[datetime.datetime] = None, + user_id: Optional[str] = None, + user_full_name: Optional[str] = None, + is_scheduled: Optional[bool] = None, + favorite_count: Optional[int] = None, + view_count: Optional[int] = None, + favorite_id: Optional[str] = None, + weighted_score: Optional[float] = None, + group_weighted_score: Optional[float] = None, + suggestion_score: Optional[float] = None, + preferred_viewer: Optional[str] = None + ): + self.can = can + self.id = id + self.content_type = content_type + self.content_id = content_id + self.content_slug = content_slug + self.title = title + self.description = description + self.last_viewed_at = last_viewed_at + self.user_id = user_id + self.user_full_name = user_full_name + self.is_scheduled = is_scheduled + self.favorite_count = favorite_count + self.view_count = view_count + self.favorite_id = favorite_id + self.weighted_score = weighted_score + self.group_weighted_score = group_weighted_score + self.suggestion_score = suggestion_score + self.preferred_viewer = preferred_viewer + + @attr.s(auto_attribs=True, init=False) class ContentValidation(model.Model): """ @@ -10404,7 +10489,6 @@ class ScheduledPlan(model.Model): crontab: Vixie-Style crontab specification when to run datagroup: Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) timezone: Timezone for interpreting the specified crontab (default is Looker instance timezone) - query_id: Query id scheduled_plan_destination: Scheduled plan destinations run_once: Whether the plan in question should only be run once (usually for testing) include_links: Whether links back to Looker should be included in this ScheduledPlan @@ -10418,6 +10502,7 @@ class ScheduledPlan(model.Model): color_theme: Color scheme of the dashboard if applicable long_tables: Whether or not to expand table vis to full length inline_table_width: The pixel width at which we render the inline table visualizations + query_id: Query id id: Unique Id created_at: Date and time when ScheduledPlan was created updated_at: Date and time when ScheduledPlan was last updated @@ -10444,7 +10529,6 @@ class ScheduledPlan(model.Model): crontab: Optional[str] = None datagroup: Optional[str] = None timezone: Optional[str] = None - query_id: Optional[str] = None scheduled_plan_destination: Optional[Sequence["ScheduledPlanDestination"]] = None run_once: Optional[bool] = None include_links: Optional[bool] = None @@ -10458,6 +10542,7 @@ class ScheduledPlan(model.Model): color_theme: Optional[str] = None long_tables: Optional[bool] = None inline_table_width: Optional[int] = None + query_id: Optional[str] = None id: Optional[str] = None created_at: Optional[datetime.datetime] = None updated_at: Optional[datetime.datetime] = None @@ -10486,7 +10571,6 @@ def __init__( crontab: Optional[str] = None, datagroup: Optional[str] = None, timezone: Optional[str] = None, - query_id: Optional[str] = None, scheduled_plan_destination: Optional[ Sequence["ScheduledPlanDestination"] ] = None, @@ -10502,6 +10586,7 @@ def __init__( color_theme: Optional[str] = None, long_tables: Optional[bool] = None, inline_table_width: Optional[int] = None, + query_id: Optional[str] = None, id: Optional[str] = None, created_at: Optional[datetime.datetime] = None, updated_at: Optional[datetime.datetime] = None, @@ -10527,7 +10612,6 @@ def __init__( self.crontab = crontab self.datagroup = datagroup self.timezone = timezone - self.query_id = query_id self.scheduled_plan_destination = scheduled_plan_destination self.run_once = run_once self.include_links = include_links @@ -10541,6 +10625,7 @@ def __init__( self.color_theme = color_theme self.long_tables = long_tables self.inline_table_width = inline_table_width + self.query_id = query_id self.id = id self.created_at = created_at self.updated_at = updated_at @@ -14993,7 +15078,6 @@ class WriteScheduledPlan(model.Model): crontab: Vixie-Style crontab specification when to run datagroup: Name of a datagroup; if specified will run when datagroup triggered (can't be used with cron string) timezone: Timezone for interpreting the specified crontab (default is Looker instance timezone) - query_id: Query id scheduled_plan_destination: Scheduled plan destinations run_once: Whether the plan in question should only be run once (usually for testing) include_links: Whether links back to Looker should be included in this ScheduledPlan @@ -15007,6 +15091,7 @@ class WriteScheduledPlan(model.Model): color_theme: Color scheme of the dashboard if applicable long_tables: Whether or not to expand table vis to full length inline_table_width: The pixel width at which we render the inline table visualizations + query_id: Query id """ name: Optional[str] = None @@ -15025,7 +15110,6 @@ class WriteScheduledPlan(model.Model): crontab: Optional[str] = None datagroup: Optional[str] = None timezone: Optional[str] = None - query_id: Optional[str] = None scheduled_plan_destination: Optional[Sequence["ScheduledPlanDestination"]] = None run_once: Optional[bool] = None include_links: Optional[bool] = None @@ -15039,6 +15123,7 @@ class WriteScheduledPlan(model.Model): color_theme: Optional[str] = None long_tables: Optional[bool] = None inline_table_width: Optional[int] = None + query_id: Optional[str] = None def __init__( self, @@ -15059,7 +15144,6 @@ def __init__( crontab: Optional[str] = None, datagroup: Optional[str] = None, timezone: Optional[str] = None, - query_id: Optional[str] = None, scheduled_plan_destination: Optional[ Sequence["ScheduledPlanDestination"] ] = None, @@ -15074,7 +15158,8 @@ def __init__( embed: Optional[bool] = None, color_theme: Optional[str] = None, long_tables: Optional[bool] = None, - inline_table_width: Optional[int] = None + inline_table_width: Optional[int] = None, + query_id: Optional[str] = None ): self.name = name self.user_id = user_id @@ -15092,7 +15177,6 @@ def __init__( self.crontab = crontab self.datagroup = datagroup self.timezone = timezone - self.query_id = query_id self.scheduled_plan_destination = scheduled_plan_destination self.run_once = run_once self.include_links = include_links @@ -15106,6 +15190,7 @@ def __init__( self.color_theme = color_theme self.long_tables = long_tables self.inline_table_width = inline_table_width + self.query_id = query_id @attr.s(auto_attribs=True, init=False) diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 77ff5a7b1..a4c9b3cfb 100644 --- a/python/looker_sdk/sdk/constants.py +++ b/python/looker_sdk/sdk/constants.py @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -sdk_version = "24.14" +sdk_version = "24.16" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 0713e4d34..4f2357470 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.24.14", - "x-looker-release-version": "24.14.10", + "version": "4.0.24.16", + "x-looker-release-version": "24.16.10", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\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 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed 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": { @@ -3793,6 +3793,107 @@ "x-looker-rate-limited": true } }, + "/content_summary": { + "get": { + "tags": [ + "Content" + ], + "operationId": "content_summary", + "summary": "Search Content Summaries", + "description": "### Get Content Summary\n\nRetrieves a collection of content items related to user activity and engagement, such as recently viewed content,\nfavorites and scheduled items.\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Comma-delimited names of fields to return in responses. Omit for all fields", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return. (used with offset)", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip before returning any. (used with limit)", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "target_group_id", + "in": "query", + "description": "Match group id", + "required": false, + "type": "string" + }, + { + "name": "target_user_id", + "in": "query", + "description": "Match user id", + "required": false, + "type": "string" + }, + { + "name": "target_content_type", + "in": "query", + "description": "Content type to match, options are: look, dashboard. Can be provided as a comma delimited list.", + "required": false, + "type": "string" + }, + { + "name": "sorts", + "in": "query", + "description": "Fields to sort by", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Content Summary", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentSummary" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "alpha", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, "/content_thumbnail/{type}/{resource_id}": { "get": { "tags": [ @@ -19041,6 +19142,12 @@ "$ref": "#/definitions/Error" } }, + "405": { + "description": "Resource Can't Be Modified", + "schema": { + "$ref": "#/definitions/Error" + } + }, "422": { "description": "Validation Error", "schema": { @@ -21026,6 +21133,12 @@ "$ref": "#/definitions/Error" } }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, "429": { "description": "Too Many Requests", "schema": { @@ -29585,6 +29698,125 @@ }, "x-looker-status": "beta" }, + "ContentSummary": { + "properties": { + "can": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "readOnly": true, + "description": "Operations the current user is able to perform on this object", + "x-looker-nullable": false + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Unique id", + "x-looker-nullable": false + }, + "content_type": { + "type": "string", + "readOnly": true, + "description": "Content type", + "x-looker-nullable": true + }, + "content_id": { + "type": "string", + "readOnly": true, + "description": "Content id", + "x-looker-nullable": true + }, + "content_slug": { + "type": "string", + "readOnly": true, + "description": "Content slug", + "x-looker-nullable": true + }, + "title": { + "type": "string", + "readOnly": true, + "description": "Content title", + "x-looker-nullable": true + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Content Description", + "x-looker-nullable": true + }, + "last_viewed_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last time viewed by current user", + "x-looker-nullable": true + }, + "user_id": { + "type": "string", + "readOnly": true, + "description": "ID of user who created the content", + "x-looker-nullable": true + }, + "user_full_name": { + "type": "string", + "readOnly": true, + "description": "Full name of user who created the content", + "x-looker-nullable": true + }, + "is_scheduled": { + "type": "boolean", + "readOnly": true, + "description": "If the content is scheduled by the current user", + "x-looker-nullable": false + }, + "favorite_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Number of favorites", + "x-looker-nullable": true + }, + "view_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Number of views", + "x-looker-nullable": true + }, + "favorite_id": { + "type": "string", + "readOnly": true, + "description": "Corresponding favorite id if item is favorited by current user", + "x-looker-nullable": true + }, + "weighted_score": { + "type": "number", + "format": "float", + "readOnly": true, + "x-looker-nullable": true + }, + "group_weighted_score": { + "type": "number", + "format": "float", + "readOnly": true, + "x-looker-nullable": true + }, + "suggestion_score": { + "type": "number", + "format": "float", + "readOnly": true, + "x-looker-nullable": true + }, + "preferred_viewer": { + "type": "string", + "readOnly": true, + "description": "The preferred route for viewing this content (ie: dashboards or dashboards-next)", + "x-looker-nullable": true + } + }, + "x-looker-status": "alpha" + }, "ContentValidation": { "properties": { "content_with_errors": { @@ -40407,11 +40639,6 @@ "description": "Timezone for interpreting the specified crontab (default is Looker instance timezone)", "x-looker-nullable": true }, - "query_id": { - "type": "string", - "description": "Query id", - "x-looker-nullable": true - }, "scheduled_plan_destination": { "type": "array", "items": { @@ -40480,6 +40707,11 @@ "format": "int64", "description": "The pixel width at which we render the inline table visualizations", "x-looker-nullable": true + }, + "query_id": { + "type": "string", + "description": "Query id", + "x-looker-nullable": true } }, "x-looker-status": "stable" @@ -40567,11 +40799,6 @@ "description": "Timezone for interpreting the specified crontab (default is Looker instance timezone)", "x-looker-nullable": true }, - "query_id": { - "type": "string", - "description": "Query id", - "x-looker-nullable": true - }, "scheduled_plan_destination": { "type": "array", "items": { @@ -40641,6 +40868,11 @@ "description": "The pixel width at which we render the inline table visualizations", "x-looker-nullable": true }, + "query_id": { + "type": "string", + "description": "Query id", + "x-looker-nullable": true + }, "id": { "type": "string", "readOnly": true, diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index d2b869c4b..29fa040df 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.24.14", - "x-looker-release-version": "24.14.10", + "version": "4.0.24.16", + "x-looker-release-version": "24.16.10", "title": "Looker API 4.0 Reference", "description": "\nAPI 4.0 is the current release of the Looker API. API 3.x has been removed.\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 is the only supported API version for Looker starting with release 23.18. API 3.0 and 3.1 have been removed.\n\nAPI 4.0 has better support for strongly typed 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": { @@ -5318,6 +5318,141 @@ "x-looker-rate-limited": true } }, + "/content_summary": { + "get": { + "tags": [ + "Content" + ], + "operationId": "content_summary", + "summary": "Search Content Summaries", + "description": "### Get Content Summary\n\nRetrieves a collection of content items related to user activity and engagement, such as recently viewed content,\nfavorites and scheduled items.\n", + "parameters": [ + { + "name": "fields", + "in": "query", + "description": "Comma-delimited names of fields to return in responses. Omit for all fields", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Number of results to return. (used with offset)", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip before returning any. (used with limit)", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "target_group_id", + "in": "query", + "description": "Match group id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "target_user_id", + "in": "query", + "description": "Match user id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "target_content_type", + "in": "query", + "description": "Content type to match, options are: look, dashboard. Can be provided as a comma delimited list.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sorts", + "in": "query", + "description": "Fields to sort by", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Content Summary", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentSummary" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "alpha", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, "/content_thumbnail/{type}/{resource_id}": { "get": { "tags": [ @@ -26327,6 +26462,16 @@ } } }, + "405": { + "description": "Resource Can't Be Modified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, "422": { "description": "Validation Error", "content": { @@ -29060,6 +29205,16 @@ } } }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, "429": { "description": "Too Many Requests", "content": { @@ -40182,6 +40337,125 @@ }, "x-looker-status": "beta" }, + "ContentSummary": { + "properties": { + "can": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "readOnly": true, + "description": "Operations the current user is able to perform on this object", + "nullable": false + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Unique id", + "nullable": false + }, + "content_type": { + "type": "string", + "readOnly": true, + "description": "Content type", + "nullable": true + }, + "content_id": { + "type": "string", + "readOnly": true, + "description": "Content id", + "nullable": true + }, + "content_slug": { + "type": "string", + "readOnly": true, + "description": "Content slug", + "nullable": true + }, + "title": { + "type": "string", + "readOnly": true, + "description": "Content title", + "nullable": true + }, + "description": { + "type": "string", + "readOnly": true, + "description": "Content Description", + "nullable": true + }, + "last_viewed_at": { + "type": "string", + "format": "date-time", + "readOnly": true, + "description": "Last time viewed by current user", + "nullable": true + }, + "user_id": { + "type": "string", + "readOnly": true, + "description": "ID of user who created the content", + "nullable": true + }, + "user_full_name": { + "type": "string", + "readOnly": true, + "description": "Full name of user who created the content", + "nullable": true + }, + "is_scheduled": { + "type": "boolean", + "readOnly": true, + "description": "If the content is scheduled by the current user", + "nullable": false + }, + "favorite_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Number of favorites", + "nullable": true + }, + "view_count": { + "type": "integer", + "format": "int64", + "readOnly": true, + "description": "Number of views", + "nullable": true + }, + "favorite_id": { + "type": "string", + "readOnly": true, + "description": "Corresponding favorite id if item is favorited by current user", + "nullable": true + }, + "weighted_score": { + "type": "number", + "format": "float", + "readOnly": true, + "nullable": true + }, + "group_weighted_score": { + "type": "number", + "format": "float", + "readOnly": true, + "nullable": true + }, + "suggestion_score": { + "type": "number", + "format": "float", + "readOnly": true, + "nullable": true + }, + "preferred_viewer": { + "type": "string", + "readOnly": true, + "description": "The preferred route for viewing this content (ie: dashboards or dashboards-next)", + "nullable": true + } + }, + "x-looker-status": "alpha" + }, "ContentValidation": { "properties": { "content_with_errors": { @@ -50866,11 +51140,6 @@ "description": "Timezone for interpreting the specified crontab (default is Looker instance timezone)", "nullable": true }, - "query_id": { - "type": "string", - "description": "Query id", - "nullable": true - }, "scheduled_plan_destination": { "type": "array", "items": { @@ -50939,6 +51208,11 @@ "format": "int64", "description": "The pixel width at which we render the inline table visualizations", "nullable": true + }, + "query_id": { + "type": "string", + "description": "Query id", + "nullable": true } }, "x-looker-status": "stable" @@ -51026,11 +51300,6 @@ "description": "Timezone for interpreting the specified crontab (default is Looker instance timezone)", "nullable": true }, - "query_id": { - "type": "string", - "description": "Query id", - "nullable": true - }, "scheduled_plan_destination": { "type": "array", "items": { @@ -51100,6 +51369,11 @@ "description": "The pixel width at which we render the inline table visualizations", "nullable": true }, + "query_id": { + "type": "string", + "description": "Query id", + "nullable": true + }, "id": { "type": "string", "readOnly": true, diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 525553896..0c30c42b0 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -51,7 +51,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "24.14" + public static let lookerVersion = "24.16" 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 cc5326905..55d03ae21 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ @@ -3886,6 +3886,50 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> [ContentSummary] + */ + public func content_summary( + /** + * @param {String} fields Comma-delimited names of fields to return in responses. Omit for all 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} target_group_id Match group id + */ + target_group_id: String? = nil, + /** + * @param {String} target_user_id Match user id + */ + target_user_id: String? = nil, + /** + * @param {String} target_content_type Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + */ + target_content_type: String? = nil, + /** + * @param {String} sorts Fields to sort by + */ + sorts: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse<[ContentSummary], SDKError> { + let result: SDKResponse<[ContentSummary], SDKError> = self.get("/content_summary", + ["fields": fields, "limit": limit, "offset": offset, "target_group_id": target_group_id, "target_user_id": target_user_id, "target_content_type": target_content_type, "sorts": sorts], nil, options) + return result + } + /** * ### Get an image representing the contents of a dashboard or look. * diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 25d5a971b..1434d3dc2 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 342 API models: 259 Spec, 0 Request, 61 Write, 22 Enum + * 343 API models: 260 Spec, 0 Request, 61 Write, 22 Enum */ @@ -2293,6 +2293,189 @@ public struct ContentSearch: SDKModel { } +public struct ContentSummary: SDKModel { + + private enum CodingKeys : String, CodingKey { + case can + case _id = "id" + case _content_type = "content_type" + case _content_id = "content_id" + case _content_slug = "content_slug" + case _title = "title" + case _description = "description" + case last_viewed_at + case _user_id = "user_id" + case _user_full_name = "user_full_name" + case is_scheduled + case _favorite_count = "favorite_count" + case _view_count = "view_count" + case _favorite_id = "favorite_id" + case weighted_score + case group_weighted_score + case suggestion_score + case _preferred_viewer = "preferred_viewer" + } + /** + * Operations the current user is able to perform on this object (read-only) + */ + public var can: StringDictionary? + + private var _id: AnyString? + /** + * Unique id (read-only) + */ + public var id: String? { + get { _id?.value } + set { _id = newValue.map(AnyString.init) } + } + + private var _content_type: AnyString? + /** + * Content type (read-only) + */ + public var content_type: String? { + get { _content_type?.value } + set { _content_type = newValue.map(AnyString.init) } + } + + private var _content_id: AnyString? + /** + * Content id (read-only) + */ + public var content_id: String? { + get { _content_id?.value } + set { _content_id = newValue.map(AnyString.init) } + } + + private var _content_slug: AnyString? + /** + * Content slug (read-only) + */ + public var content_slug: String? { + get { _content_slug?.value } + set { _content_slug = newValue.map(AnyString.init) } + } + + private var _title: AnyString? + /** + * Content title (read-only) + */ + public var title: String? { + get { _title?.value } + set { _title = newValue.map(AnyString.init) } + } + + private var _description: AnyString? + /** + * Content Description (read-only) + */ + public var description: String? { + get { _description?.value } + set { _description = newValue.map(AnyString.init) } + } + + /** + * Last time viewed by current user (read-only) + */ + public var last_viewed_at: Date? + + private var _user_id: AnyString? + /** + * ID of user who created the content (read-only) + */ + public var user_id: String? { + get { _user_id?.value } + set { _user_id = newValue.map(AnyString.init) } + } + + private var _user_full_name: AnyString? + /** + * Full name of user who created the content (read-only) + */ + public var user_full_name: String? { + get { _user_full_name?.value } + set { _user_full_name = newValue.map(AnyString.init) } + } + + /** + * If the content is scheduled by the current user (read-only) + */ + public var is_scheduled: Bool? + + private var _favorite_count: AnyInt? + /** + * Number of favorites (read-only) + */ + public var favorite_count: Int64? { + get { _favorite_count?.value } + set { _favorite_count = newValue.map(AnyInt.init) } + } + + private var _view_count: AnyInt? + /** + * Number of views (read-only) + */ + public var view_count: Int64? { + get { _view_count?.value } + set { _view_count = newValue.map(AnyInt.init) } + } + + private var _favorite_id: AnyString? + /** + * Corresponding favorite id if item is favorited by current user (read-only) + */ + public var favorite_id: String? { + get { _favorite_id?.value } + set { _favorite_id = newValue.map(AnyString.init) } + } + + /** + * (read-only) + */ + public var weighted_score: Float? + + /** + * (read-only) + */ + public var group_weighted_score: Float? + + /** + * (read-only) + */ + public var suggestion_score: Float? + + private var _preferred_viewer: AnyString? + /** + * The preferred route for viewing this content (ie: dashboards or dashboards-next) (read-only) + */ + public var preferred_viewer: String? { + get { _preferred_viewer?.value } + set { _preferred_viewer = newValue.map(AnyString.init) } + } + + public init(can: StringDictionary? = nil, id: String? = nil, content_type: String? = nil, content_id: String? = nil, content_slug: String? = nil, title: String? = nil, description: String? = nil, last_viewed_at: Date? = nil, user_id: String? = nil, user_full_name: String? = nil, is_scheduled: Bool? = nil, favorite_count: Int64? = nil, view_count: Int64? = nil, favorite_id: String? = nil, weighted_score: Float? = nil, group_weighted_score: Float? = nil, suggestion_score: Float? = nil, preferred_viewer: String? = nil) { + self.can = can + self._id = id.map(AnyString.init) + self._content_type = content_type.map(AnyString.init) + self._content_id = content_id.map(AnyString.init) + self._content_slug = content_slug.map(AnyString.init) + self._title = title.map(AnyString.init) + self._description = description.map(AnyString.init) + self.last_viewed_at = last_viewed_at + self._user_id = user_id.map(AnyString.init) + self._user_full_name = user_full_name.map(AnyString.init) + self.is_scheduled = is_scheduled + self._favorite_count = favorite_count.map(AnyInt.init) + self._view_count = view_count.map(AnyInt.init) + self._favorite_id = favorite_id.map(AnyString.init) + self.weighted_score = weighted_score + self.group_weighted_score = group_weighted_score + self.suggestion_score = suggestion_score + self._preferred_viewer = preferred_viewer.map(AnyString.init) + } + +} + public struct ContentValidation: SDKModel { private enum CodingKeys : String, CodingKey { @@ -19643,7 +19826,6 @@ public struct ScheduledPlan: SDKModel { case _crontab = "crontab" case _datagroup = "datagroup" case _timezone = "timezone" - case _query_id = "query_id" case scheduled_plan_destination case run_once case include_links @@ -19657,6 +19839,7 @@ public struct ScheduledPlan: SDKModel { case _color_theme = "color_theme" case long_tables case _inline_table_width = "inline_table_width" + case _query_id = "query_id" case _id = "id" case created_at case updated_at @@ -19786,15 +19969,6 @@ public struct ScheduledPlan: SDKModel { set { _timezone = newValue.map(AnyString.init) } } - private var _query_id: AnyString? - /** - * Query id - */ - public var query_id: String? { - get { _query_id?.value } - set { _query_id = newValue.map(AnyString.init) } - } - /** * Scheduled plan destinations */ @@ -19884,6 +20058,15 @@ public struct ScheduledPlan: SDKModel { set { _inline_table_width = newValue.map(AnyInt.init) } } + private var _query_id: AnyString? + /** + * Query id + */ + public var query_id: String? { + get { _query_id?.value } + set { _query_id = newValue.map(AnyString.init) } + } + private var _id: AnyString? /** * Unique Id (read-only) @@ -19929,7 +20112,7 @@ public struct ScheduledPlan: SDKModel { */ public var can: StringDictionary? - public init(name: String? = nil, user_id: String? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, custom_url_base: String? = nil, custom_url_params: String? = nil, custom_url_label: String? = nil, show_custom_url: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil, id: String? = nil, created_at: Date? = nil, updated_at: Date? = nil, title: String? = nil, user: UserPublic? = nil, next_run_at: Date? = nil, last_run_at: Date? = nil, can: StringDictionary? = nil) { + public init(name: String? = nil, user_id: String? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, custom_url_base: String? = nil, custom_url_params: String? = nil, custom_url_label: String? = nil, show_custom_url: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil, query_id: String? = nil, id: String? = nil, created_at: Date? = nil, updated_at: Date? = nil, title: String? = nil, user: UserPublic? = nil, next_run_at: Date? = nil, last_run_at: Date? = nil, can: StringDictionary? = nil) { self._name = name.map(AnyString.init) self._user_id = user_id.map(AnyString.init) self.run_as_recipient = run_as_recipient @@ -19946,7 +20129,6 @@ public struct ScheduledPlan: SDKModel { self._crontab = crontab.map(AnyString.init) self._datagroup = datagroup.map(AnyString.init) self._timezone = timezone.map(AnyString.init) - self._query_id = query_id.map(AnyString.init) self.scheduled_plan_destination = scheduled_plan_destination self.run_once = run_once self.include_links = include_links @@ -19960,6 +20142,7 @@ public struct ScheduledPlan: SDKModel { self._color_theme = color_theme.map(AnyString.init) self.long_tables = long_tables self._inline_table_width = inline_table_width.map(AnyInt.init) + self._query_id = query_id.map(AnyString.init) self._id = id.map(AnyString.init) self.created_at = created_at self.updated_at = updated_at @@ -28142,7 +28325,6 @@ public struct WriteScheduledPlan: SDKModel { case _crontab = "crontab" case _datagroup = "datagroup" case _timezone = "timezone" - case _query_id = "query_id" case scheduled_plan_destination case run_once case include_links @@ -28156,6 +28338,7 @@ public struct WriteScheduledPlan: SDKModel { case _color_theme = "color_theme" case long_tables case _inline_table_width = "inline_table_width" + case _query_id = "query_id" } private var _name: AnyString? /** @@ -28277,15 +28460,6 @@ public struct WriteScheduledPlan: SDKModel { set { _timezone = newValue.map(AnyString.init) } } - private var _query_id: AnyString? - /** - * Query id - */ - public var query_id: String? { - get { _query_id?.value } - set { _query_id = newValue.map(AnyString.init) } - } - /** * Scheduled plan destinations */ @@ -28375,7 +28549,16 @@ public struct WriteScheduledPlan: SDKModel { set { _inline_table_width = newValue.map(AnyInt.init) } } - public init(name: String? = nil, user_id: String? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, query_id: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, custom_url_base: String? = nil, custom_url_params: String? = nil, custom_url_label: String? = nil, show_custom_url: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil) { + private var _query_id: AnyString? + /** + * Query id + */ + public var query_id: String? { + get { _query_id?.value } + set { _query_id = newValue.map(AnyString.init) } + } + + public init(name: String? = nil, user_id: String? = nil, run_as_recipient: Bool? = nil, enabled: Bool? = nil, look_id: String? = nil, dashboard_id: String? = nil, lookml_dashboard_id: String? = nil, filters_string: String? = nil, dashboard_filters: String? = nil, require_results: Bool? = nil, require_no_results: Bool? = nil, require_change: Bool? = nil, send_all_results: Bool? = nil, crontab: String? = nil, datagroup: String? = nil, timezone: String? = nil, scheduled_plan_destination: [ScheduledPlanDestination]? = nil, run_once: Bool? = nil, include_links: Bool? = nil, custom_url_base: String? = nil, custom_url_params: String? = nil, custom_url_label: String? = nil, show_custom_url: Bool? = nil, pdf_paper_size: String? = nil, pdf_landscape: Bool? = nil, embed: Bool? = nil, color_theme: String? = nil, long_tables: Bool? = nil, inline_table_width: Int64? = nil, query_id: String? = nil) { self._name = name.map(AnyString.init) self._user_id = user_id.map(AnyString.init) self.run_as_recipient = run_as_recipient @@ -28392,7 +28575,6 @@ public struct WriteScheduledPlan: SDKModel { self._crontab = crontab.map(AnyString.init) self._datagroup = datagroup.map(AnyString.init) self._timezone = timezone.map(AnyString.init) - self._query_id = query_id.map(AnyString.init) self.scheduled_plan_destination = scheduled_plan_destination self.run_once = run_once self.include_links = include_links @@ -28406,6 +28588,7 @@ public struct WriteScheduledPlan: SDKModel { self._color_theme = color_theme.map(AnyString.init) self.long_tables = long_tables self._inline_table_width = inline_table_width.map(AnyInt.init) + self._query_id = query_id.map(AnyString.init) } } diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index 9754450d8..e5e843bbf 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 465 API methods + * 466 API methods */ @@ -3884,6 +3884,50 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Get Content Summary + * + * Retrieves a collection of content items related to user activity and engagement, such as recently viewed content, + * favorites and scheduled items. + * + * GET /content_summary -> [ContentSummary] + */ + public func content_summary( + /** + * @param {String} fields Comma-delimited names of fields to return in responses. Omit for all 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} target_group_id Match group id + */ + target_group_id: String? = nil, + /** + * @param {String} target_user_id Match user id + */ + target_user_id: String? = nil, + /** + * @param {String} target_content_type Content type to match, options are: look, dashboard. Can be provided as a comma delimited list. + */ + target_content_type: String? = nil, + /** + * @param {String} sorts Fields to sort by + */ + sorts: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.get("/content_summary", + ["fields": fields, "limit": limit, "offset": offset, "target_group_id": target_group_id, "target_user_id": target_user_id, "target_content_type": target_content_type, "sorts": sorts], nil, options) + return result + } + /** * ### Get an image representing the contents of a dashboard or look. *