From 5d7b1ff26b56e9324a179cce20b2a5c11a0051c8 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 04:39:29 +0000 Subject: [PATCH] Update SDK to b6a1c30cc3858325b43ac3626ffd108215a952ee --- packages/dataclassification/src/v1/model.ts | 7 +- packages/genie/src/v1/client.ts | 38 ++++++ packages/genie/src/v1/index.ts | 3 + packages/genie/src/v1/model.ts | 56 +++++++- packages/genie/src/v1/utils.ts | 35 +++++ packages/modelserving/src/v1/index.ts | 2 + packages/modelserving/src/v1/model.ts | 66 +++++++++ packages/postgres/src/v1/client.ts | 6 + packages/postgres/src/v1/index.ts | 1 + packages/postgres/src/v1/model.ts | 140 ++++++++++++++++++++ 10 files changed, 351 insertions(+), 3 deletions(-) mode change 100644 => 100755 packages/dataclassification/src/v1/model.ts mode change 100644 => 100755 packages/genie/src/v1/client.ts diff --git a/packages/dataclassification/src/v1/model.ts b/packages/dataclassification/src/v1/model.ts old mode 100644 new mode 100755 index 5bee64e0..135b34d7 --- a/packages/dataclassification/src/v1/model.ts +++ b/packages/dataclassification/src/v1/model.ts @@ -43,8 +43,10 @@ export interface CatalogConfig { | { $case: 'includedSchemas'; /** - * Schemas to include in the scan. Empty list is not supported as it results in a no-op - * scan. If `included_schemas` is not set, all schemas are scanned. + * Schemas to include in the scan, each named relative to the parent catalog. + * If specified, only listed schemas will be scanned. + * Mutually exclusive with `excluded_schemas`: only one may be set per request. + * If neither `included_schemas` nor `excluded_schemas` is set, all schemas are scanned. */ includedSchemas: CatalogConfig_SchemaNames; } @@ -59,6 +61,7 @@ export interface CatalogConfig { /** Wrapper message for a list of schema names. */ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name. export interface CatalogConfig_SchemaNames { + /** Schema names, each relative to the parent catalog. Must not be empty. */ names?: string[] | undefined; } diff --git a/packages/genie/src/v1/client.ts b/packages/genie/src/v1/client.ts old mode 100644 new mode 100755 index ecc41095..56332132 --- a/packages/genie/src/v1/client.ts +++ b/packages/genie/src/v1/client.ts @@ -13,6 +13,7 @@ import { buildHttpRequest, executeCall, executeHttpCall, + sendAndCheckError, marshalRequest, parseResponse, executeWait, @@ -20,6 +21,8 @@ import { } from './utils'; import pkgJson from '../../package.json' with {type: 'json'}; import type { + DownloadMessageAttachmentVisualizationRequest, + DownloadMessageAttachmentVisualizationResponse, GenieCreateConversationMessageRequest, GenieCreateEvalRunRequest, GenieCreateMessageCommentRequest, @@ -158,6 +161,41 @@ export class GenieClient { return resp; } + /** + * Download a rendered image of a message visualization attachment. + * The response body is the raw PNG image, not a JSON payload. + * This is only available if the attachment is a visualization and the message status is `COMPLETED`. + */ + async downloadMessageAttachmentVisualization( + req: DownloadMessageAttachmentVisualizationRequest, + options?: CallOptions + ): Promise { + const {host, workspaceId, httpClient} = await this.resolveConfig(); + const url = `${host}/api/2.0/genie/${req.name ?? ''}/download-visualization`; + let resp: DownloadMessageAttachmentVisualizationResponse | undefined; + const call = async (callSignal?: AbortSignal): Promise => { + const headers = new Headers(); + if (workspaceId !== undefined) { + headers.set('X-Databricks-Workspace-Id', workspaceId); + } + headers.set('User-Agent', this.userAgent); + const httpReq = buildHttpRequest('GET', url, headers, callSignal); + const httpResp = await sendAndCheckError({ + request: httpReq, + httpClient, + logger: this.logger, + }); + resp = { + contents: httpResp.body ?? undefined, + }; + }; + await executeCall(call, options); + if (resp === undefined) { + throw new Error('operation completed without a result.'); + } + return resp; + } + /** * Create new message in a [conversation](:method:genie/startconversation). * The AI response uses all previously created messages in the conversation to respond. diff --git a/packages/genie/src/v1/index.ts b/packages/genie/src/v1/index.ts index 888fa72b..c16041d5 100755 --- a/packages/genie/src/v1/index.ts +++ b/packages/genie/src/v1/index.ts @@ -32,6 +32,8 @@ export type { ColumnInfo, ColumnMask, DatabricksServiceExceptionProto, + DownloadMessageAttachmentVisualizationRequest, + DownloadMessageAttachmentVisualizationResponse, ExternalLink, GenieAttachment, GenieConversation, @@ -86,6 +88,7 @@ export type { GenieSuggestedQuestionsAttachment, GenieTrashSpaceRequest, GenieUpdateSpaceRequest, + GenieVizAttachment, ListValue, MapStringValueEntry, MessageError, diff --git a/packages/genie/src/v1/model.ts b/packages/genie/src/v1/model.ts index 3e196369..d3771e8b 100755 --- a/packages/genie/src/v1/model.ts +++ b/packages/genie/src/v1/model.ts @@ -919,6 +919,22 @@ export interface DatabricksServiceExceptionProto { stackTrace?: string | undefined; } +export interface DownloadMessageAttachmentVisualizationRequest { + /** + * The resource name of the attachment to render, in the format + * `spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}`. + */ + name?: string | undefined; +} + +export interface DownloadMessageAttachmentVisualizationResponse { + /** + * The rendered visualization as a PNG image. Returned as the raw HTTP + * response body rather than a JSON field. + */ + contents?: ReadableStream | undefined; +} + export interface ExternalLink { /** * A URL pointing to a @@ -986,6 +1002,11 @@ export interface GenieAttachment { /** Follow-up questions suggested by Genie */ suggestedQuestions: GenieSuggestedQuestionsAttachment; } + | { + $case: 'viz'; + /** Visualization generated by Genie, if requested via `enable_visualization` */ + viz: GenieVizAttachment; + } | undefined; /** Attachment ID */ attachmentId?: string | undefined; @@ -1024,6 +1045,8 @@ export interface GenieCreateConversationMessageRequest { conversationId?: string | undefined; /** User message content. */ content?: string | undefined; + /** Enable visualization generation. */ + enableVisualization?: boolean | undefined; } export interface GenieCreateEvalRunRequest { @@ -1567,6 +1590,8 @@ export interface GenieStartConversationRequest { spaceId?: string | undefined; /** The text of the message that starts the conversation. */ content?: string | undefined; + /** Enable visualization generation. */ + enableVisualization?: boolean | undefined; } export interface GenieStartConversationResponse { @@ -1613,6 +1638,17 @@ export interface GenieUpdateSpaceRequest { parentPath?: string | undefined; } +/** + * Visualization generated by Genie for a query result. Use the attachment ID + * with the download visualization API to retrieve the rendered image. + */ +export interface GenieVizAttachment { + /** Name of the visualization */ + title?: string | undefined; + /** The ID of the query attachment the visualization was generated from */ + queryAttachmentId?: string | undefined; +} + /** * copied from proto3 / Google Well Known Types, source: * https://github.com/protocolbuffers/protobuf/blob/450d24ca820750c5db5112a6f0b0c2efb9758021/src/google/protobuf/struct.proto @@ -1986,6 +2022,7 @@ export const unmarshalGenieAttachmentSchema: z.ZodType = z suggested_questions: z .lazy(() => unmarshalGenieSuggestedQuestionsAttachmentSchema) .optional(), + viz: z.lazy(() => unmarshalGenieVizAttachmentSchema).optional(), attachment_id: z.string().optional(), }) .transform(d => ({ @@ -1999,7 +2036,9 @@ export const unmarshalGenieAttachmentSchema: z.ZodType = z $case: 'suggestedQuestions' as const, suggestedQuestions: d.suggested_questions, } - : undefined, + : d.viz !== undefined + ? {$case: 'viz' as const, viz: d.viz} + : undefined, attachmentId: d.attachment_id, })); @@ -2450,6 +2489,17 @@ export const unmarshalGenieSuggestedQuestionsAttachmentSchema: z.ZodType = + z + .object({ + title: z.string().optional(), + query_attachment_id: z.string().optional(), + }) + .transform(d => ({ + title: d.title, + queryAttachmentId: d.query_attachment_id, + })); + export const unmarshalListValueSchema: z.ZodType = z .object({ values: z.array(z.lazy(() => unmarshalValueSchema)).optional(), @@ -2684,11 +2734,13 @@ export const marshalGenieCreateConversationMessageRequestSchema: z.ZodType = z spaceId: z.string().optional(), conversationId: z.string().optional(), content: z.string().optional(), + enableVisualization: z.boolean().optional(), }) .transform(d => ({ space_id: d.spaceId, conversation_id: d.conversationId, content: d.content, + enable_visualization: d.enableVisualization, })); export const marshalGenieCreateEvalRunRequestSchema: z.ZodType = z @@ -2793,10 +2845,12 @@ export const marshalGenieStartConversationRequestSchema: z.ZodType = z .object({ spaceId: z.string().optional(), content: z.string().optional(), + enableVisualization: z.boolean().optional(), }) .transform(d => ({ space_id: d.spaceId, content: d.content, + enable_visualization: d.enableVisualization, })); export const marshalGenieUpdateSpaceRequestSchema: z.ZodType = z diff --git a/packages/genie/src/v1/utils.ts b/packages/genie/src/v1/utils.ts index 5e8d4841..a56d896d 100755 --- a/packages/genie/src/v1/utils.ts +++ b/packages/genie/src/v1/utils.ts @@ -179,3 +179,38 @@ export function flattenQueryParams( throw new Error(`Unsupported query parameter type: ${typeof value}`); } } + +/** + * Sends an HTTP request and checks for API errors. On non-2xx responses the + * body is buffered and parsed into an ApiError. On 2xx the raw HttpResponse + * is returned with the body stream untouched. + */ +export async function sendAndCheckError( + opts: HttpCallOptions +): Promise { + opts.logger.debug('HTTP request', { + method: opts.request.method, + url: opts.request.url, + }); + + let resp: HttpResponse; + try { + resp = await opts.httpClient.send(opts.request); + } catch (e: unknown) { + opts.logger.debug('HTTP request failed'); + throw e; + } + + opts.logger.debug('HTTP response', {statusCode: resp.statusCode}); + + if (resp.statusCode < 200 || resp.statusCode >= 300) { + const body = await readAll(resp.body); + const apiErr = ApiError.fromHttpError(resp.statusCode, resp.headers, body); + if (apiErr !== undefined) { + throw apiErr; + } + throw new Error(`unexpected HTTP status ${String(resp.statusCode)}`); + } + + return resp; +} diff --git a/packages/modelserving/src/v1/index.ts b/packages/modelserving/src/v1/index.ts index 3575da6b..6236bea3 100755 --- a/packages/modelserving/src/v1/index.ts +++ b/packages/modelserving/src/v1/index.ts @@ -88,6 +88,8 @@ export type { ServedModel, ServedModelLite, ServedModelState, + TelemetryConfig, + TelemetryInferenceTableConfig, TrafficConfig, UpdateInferenceEndpointNotificationsRequest, UpdateInferenceEndpointNotificationsResponse, diff --git a/packages/modelserving/src/v1/model.ts b/packages/modelserving/src/v1/model.ts index 9fe6cb6f..264deddb 100755 --- a/packages/modelserving/src/v1/model.ts +++ b/packages/modelserving/src/v1/model.ts @@ -311,6 +311,8 @@ export interface CreateInferenceEndpointRequest { /** Email notification settings. */ emailNotifications?: EmailNotifications | undefined; description?: string | undefined; + /** Configuration for persisting endpoint telemetry (logs, traces, and metrics) to Unity Catalog tables. */ + telemetryConfig?: TelemetryConfig | undefined; } export interface CreatePtEndpointRequest { @@ -668,6 +670,8 @@ export interface InferenceEndpoint { description?: string | undefined; /** The usage policy associated with serving endpoint. */ usagePolicyId?: string | undefined; + /** Telemetry configuration for the endpoint, including inference-table payload logging. */ + telemetryConfig?: TelemetryConfig | undefined; } export interface InferenceEndpointDetailed { @@ -707,6 +711,8 @@ export interface InferenceEndpointDetailed { emailNotifications?: EmailNotifications | undefined; /** Description of the serving model */ description?: string | undefined; + /** Telemetry configuration for the endpoint, including inference-table payload logging. */ + telemetryConfig?: TelemetryConfig | undefined; } export interface InferenceEndpointState { @@ -1074,6 +1080,19 @@ export interface ServedModelState { deploymentStateMessage?: string | undefined; } +export interface TelemetryConfig { + /** Configuration for inference table payload logging, including sampling. */ + inferenceTableConfig?: TelemetryInferenceTableConfig | undefined; +} + +/** Inference table payload logging configuration */ +export interface TelemetryInferenceTableConfig { + /** Fraction of requests sampled for payload logging, in the range [0.0, 1.0], where 1.0 logs all requests. */ + samplingFraction?: number | undefined; + /** The full name of the inference table created for this endpoint. */ + name?: string | undefined; +} + export interface TrafficConfig { /** The list of routes that define traffic to each served entity. */ routes?: Route[] | undefined; @@ -1515,6 +1534,7 @@ export const unmarshalInferenceEndpointSchema: z.ZodType = z budget_policy_id: z.string().optional(), description: z.string().optional(), usage_policy_id: z.string().optional(), + telemetry_config: z.lazy(() => unmarshalTelemetryConfigSchema).optional(), }) .transform(d => ({ name: d.name, @@ -1530,6 +1550,7 @@ export const unmarshalInferenceEndpointSchema: z.ZodType = z budgetPolicyId: d.budget_policy_id, description: d.description, usagePolicyId: d.usage_policy_id, + telemetryConfig: d.telemetry_config, })); export const unmarshalInferenceEndpointDetailedSchema: z.ZodType = @@ -1563,6 +1584,7 @@ export const unmarshalInferenceEndpointDetailedSchema: z.ZodType unmarshalEmailNotificationsSchema) .optional(), description: z.string().optional(), + telemetry_config: z.lazy(() => unmarshalTelemetryConfigSchema).optional(), }) .transform(d => ({ name: d.name, @@ -1583,6 +1605,7 @@ export const unmarshalInferenceEndpointDetailedSchema: z.ZodType = @@ -1865,6 +1888,27 @@ export const unmarshalServedModelStateSchema: z.ZodType = z deploymentStateMessage: d.deployment_state_message, })); +export const unmarshalTelemetryConfigSchema: z.ZodType = z + .object({ + inference_table_config: z + .lazy(() => unmarshalTelemetryInferenceTableConfigSchema) + .optional(), + }) + .transform(d => ({ + inferenceTableConfig: d.inference_table_config, + })); + +export const unmarshalTelemetryInferenceTableConfigSchema: z.ZodType = + z + .object({ + sampling_fraction: z.number().optional(), + name: z.string().optional(), + }) + .transform(d => ({ + samplingFraction: d.sampling_fraction, + name: d.name, + })); + export const unmarshalTrafficConfigSchema: z.ZodType = z .object({ routes: z.array(z.lazy(() => unmarshalRouteSchema)).optional(), @@ -2068,6 +2112,7 @@ export const marshalCreateInferenceEndpointRequestSchema: z.ZodType = z .lazy(() => marshalEmailNotificationsSchema) .optional(), description: z.string().optional(), + telemetryConfig: z.lazy(() => marshalTelemetryConfigSchema).optional(), }) .transform(d => ({ name: d.name, @@ -2079,6 +2124,7 @@ export const marshalCreateInferenceEndpointRequestSchema: z.ZodType = z budget_policy_id: d.budgetPolicyId, email_notifications: d.emailNotifications, description: d.description, + telemetry_config: d.telemetryConfig, })); export const marshalCreatePtEndpointRequestSchema: z.ZodType = z @@ -2549,6 +2595,26 @@ export const marshalServedModelStateSchema: z.ZodType = z deployment_state_message: d.deploymentStateMessage, })); +export const marshalTelemetryConfigSchema: z.ZodType = z + .object({ + inferenceTableConfig: z + .lazy(() => marshalTelemetryInferenceTableConfigSchema) + .optional(), + }) + .transform(d => ({ + inference_table_config: d.inferenceTableConfig, + })); + +export const marshalTelemetryInferenceTableConfigSchema: z.ZodType = z + .object({ + samplingFraction: z.number().optional(), + name: z.string().optional(), + }) + .transform(d => ({ + sampling_fraction: d.samplingFraction, + name: d.name, + })); + export const marshalTrafficConfigSchema: z.ZodType = z .object({ routes: z.array(z.lazy(() => marshalRouteSchema)).optional(), diff --git a/packages/postgres/src/v1/client.ts b/packages/postgres/src/v1/client.ts index 6d9e6ccc..5f37e4eb 100755 --- a/packages/postgres/src/v1/client.ts +++ b/packages/postgres/src/v1/client.ts @@ -319,6 +319,9 @@ export class PostgresClient { if (req.databaseId !== undefined) { params.append('database_id', req.databaseId); } + if (req.replaceExisting !== undefined) { + params.append('replace_existing', String(req.replaceExisting)); + } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; const body = marshalRequest(req.database, marshalDatabaseSchema); @@ -485,6 +488,9 @@ export class PostgresClient { if (req.roleId !== undefined) { params.append('role_id', req.roleId); } + if (req.replaceExisting !== undefined) { + params.append('replace_existing', String(req.replaceExisting)); + } const query = params.toString(); const fullUrl = query !== '' ? `${url}?${query}` : url; const body = marshalRequest(req.role, marshalRoleSchema); diff --git a/packages/postgres/src/v1/index.ts b/packages/postgres/src/v1/index.ts index ad6e14bf..3445f575 100755 --- a/packages/postgres/src/v1/index.ts +++ b/packages/postgres/src/v1/index.ts @@ -103,6 +103,7 @@ export type { GetProjectRequest, GetRoleRequest, GetSyncedTableRequest, + InitialBranchSpec, InitialEndpointSpec, ListBranchesRequest, ListBranchesResponse, diff --git a/packages/postgres/src/v1/model.ts b/packages/postgres/src/v1/model.ts index b1fbf274..ed458bfe 100755 --- a/packages/postgres/src/v1/model.ts +++ b/packages/postgres/src/v1/model.ts @@ -1030,6 +1030,11 @@ export interface CreateDatabaseRequest { databaseId?: string | undefined; /** The desired specification of a Database. */ database?: Database | undefined; + /** + * If true, update the database if it already exists instead of returning an + * error. + */ + replaceExisting?: boolean | undefined; } export interface CreateEndpointRequest { @@ -1080,6 +1085,17 @@ export interface CreateRoleRequest { roleId?: string | undefined; /** The desired specification of a Role. */ role?: Role | undefined; + /** + * If true, update the role if it already exists instead of returning an + * error. + * + * When the role already exists, the provided `role` spec fully replaces the + * existing one: `membership_roles` is overwritten, not merged. Leaving + * `membership_roles` empty clears all of the role's existing memberships, + * including `DATABRICKS_SUPERUSER`. Always send the complete desired list of + * memberships when using this field. + */ + replaceExisting?: boolean | undefined; } /** Establish a synchronisation to the Postgres database for Reverse ETL for the source table selected from the Unity Catalog. */ @@ -1601,10 +1617,40 @@ export interface GetSyncedTableRequest { name?: string | undefined; } +/** Configuration for the initial default branch created during project creation. */ +export interface InitialBranchSpec { + /** Whether the initial default branch should be protected from deletion. */ + isProtected?: boolean | undefined; +} + /** Configuration for the initial Read/Write endpoint created during project creation. */ export interface InitialEndpointSpec { /** Settings for HA configuration of the endpoint. */ group?: EndpointGroupSpec | undefined; + /** The minimum number of Compute Units for the initial endpoint. */ + autoscalingLimitMinCu?: number | undefined; + /** The maximum number of Compute Units for the initial endpoint. */ + autoscalingLimitMaxCu?: number | undefined; + suspension?: + | { + $case: 'suspendTimeoutDuration'; + /** + * Duration of inactivity after which the initial endpoint is automatically suspended. + * If specified, should be between 60s and 604800s (1 minute to 1 week). + * Mutually exclusive with `no_suspension`. + */ + suspendTimeoutDuration: Temporal.Duration; + } + | { + $case: 'noSuspension'; + /** + * When set to true, explicitly disables automatic suspension (never suspend). + * Should be set to true when provided. + * Mutually exclusive with `suspend_timeout_duration`. + */ + noSuspension: boolean; + } + | undefined; } export interface ListBranchesRequest { @@ -1801,6 +1847,12 @@ export interface Project { * Empty if the project is not deleted, otherwise set to a timestamp in the future. */ purgeTime?: Temporal.Instant | undefined; + /** + * Configuration for the initial default branch created as part of project creation. + * Allows overriding branch protection. These settings only apply at creation time + * and do not affect resources created after project creation. + */ + initialBranchSpec?: InitialBranchSpec | undefined; /** The part of the name, chosen by the user when the resource was created. */ projectId?: string | undefined; } @@ -1887,6 +1939,8 @@ export interface ProjectStatus { branchLogicalSizeLimitBytes?: bigint | undefined; /** The current space occupied by the project in storage. */ syntheticStorageSizeBytes?: bigint | undefined; + /** The most recent time when any endpoint of this project was active. */ + computeLastActiveTime?: Temporal.Instant | undefined; /** The budget policy that is applied to the project. */ budgetPolicyId?: string | undefined; /** The effective custom tags associated with the project. */ @@ -2795,13 +2849,39 @@ export const unmarshalEndpointStatusSchema: z.ZodType = z endpointId: d.endpoint_id, })); +export const unmarshalInitialBranchSpecSchema: z.ZodType = z + .object({ + is_protected: z.boolean().optional(), + }) + .transform(d => ({ + isProtected: d.is_protected, + })); + export const unmarshalInitialEndpointSpecSchema: z.ZodType = z .object({ group: z.lazy(() => unmarshalEndpointGroupSpecSchema).optional(), + autoscaling_limit_min_cu: z.number().optional(), + autoscaling_limit_max_cu: z.number().optional(), + suspend_timeout_duration: z + .string() + .transform(s => Temporal.Duration.from('PT' + s.toUpperCase())) + .optional(), + no_suspension: z.boolean().optional(), }) .transform(d => ({ group: d.group, + autoscalingLimitMinCu: d.autoscaling_limit_min_cu, + autoscalingLimitMaxCu: d.autoscaling_limit_max_cu, + suspension: + d.suspend_timeout_duration !== undefined + ? { + $case: 'suspendTimeoutDuration' as const, + suspendTimeoutDuration: d.suspend_timeout_duration, + } + : d.no_suspension !== undefined + ? {$case: 'noSuspension' as const, noSuspension: d.no_suspension} + : undefined, })); export const unmarshalListBranchesResponseSchema: z.ZodType = @@ -2915,6 +2995,9 @@ export const unmarshalProjectSchema: z.ZodType = z .string() .transform(s => Temporal.Instant.from(s)) .optional(), + initial_branch_spec: z + .lazy(() => unmarshalInitialBranchSpecSchema) + .optional(), project_id: z.string().optional(), }) .transform(d => ({ @@ -2927,6 +3010,7 @@ export const unmarshalProjectSchema: z.ZodType = z initialEndpointSpec: d.initial_endpoint_spec, deleteTime: d.delete_time, purgeTime: d.purge_time, + initialBranchSpec: d.initial_branch_spec, projectId: d.project_id, })); @@ -3018,6 +3102,10 @@ export const unmarshalProjectStatusSchema: z.ZodType = z .union([z.number(), z.bigint()]) .transform(v => BigInt(v)) .optional(), + compute_last_active_time: z + .string() + .transform(s => Temporal.Instant.from(s)) + .optional(), budget_policy_id: z.string().optional(), custom_tags: z .array(z.lazy(() => unmarshalProjectCustomTagSchema)) @@ -3034,6 +3122,7 @@ export const unmarshalProjectStatusSchema: z.ZodType = z defaultEndpointSettings: d.default_endpoint_settings, branchLogicalSizeLimitBytes: d.branch_logical_size_limit_bytes, syntheticStorageSizeBytes: d.synthetic_storage_size_bytes, + computeLastActiveTime: d.compute_last_active_time, budgetPolicyId: d.budget_policy_id, customTags: d.custom_tags, owner: d.owner, @@ -3748,12 +3837,43 @@ export const marshalGenerateDatabaseCredentialRequestSchema: z.ZodType = z endpoint: d.endpoint, })); +export const marshalInitialBranchSpecSchema: z.ZodType = z + .object({ + isProtected: z.boolean().optional(), + }) + .transform(d => ({ + is_protected: d.isProtected, + })); + export const marshalInitialEndpointSpecSchema: z.ZodType = z .object({ group: z.lazy(() => marshalEndpointGroupSpecSchema).optional(), + autoscalingLimitMinCu: z.number().optional(), + autoscalingLimitMaxCu: z.number().optional(), + suspension: z + .discriminatedUnion('$case', [ + z.object({ + $case: z.literal('suspendTimeoutDuration'), + suspendTimeoutDuration: z + .any() + .transform((d: Temporal.Duration) => + d.toString().slice(2).toLowerCase() + ), + }), + z.object({$case: z.literal('noSuspension'), noSuspension: z.boolean()}), + ]) + .optional(), }) .transform(d => ({ group: d.group, + autoscaling_limit_min_cu: d.autoscalingLimitMinCu, + autoscaling_limit_max_cu: d.autoscalingLimitMaxCu, + ...(d.suspension?.$case === 'suspendTimeoutDuration' && { + suspend_timeout_duration: d.suspension.suspendTimeoutDuration, + }), + ...(d.suspension?.$case === 'noSuspension' && { + no_suspension: d.suspension.noSuspension, + }), })); export const marshalNewPipelineSpecSchema: z.ZodType = z @@ -3793,6 +3913,7 @@ export const marshalProjectSchema: z.ZodType = z .any() .transform((d: Temporal.Instant) => d.toString()) .optional(), + initialBranchSpec: z.lazy(() => marshalInitialBranchSpecSchema).optional(), projectId: z.string().optional(), }) .transform(d => ({ @@ -3805,6 +3926,7 @@ export const marshalProjectSchema: z.ZodType = z initial_endpoint_spec: d.initialEndpointSpec, delete_time: d.deleteTime, purge_time: d.purgeTime, + initial_branch_spec: d.initialBranchSpec, project_id: d.projectId, })); @@ -3889,6 +4011,10 @@ export const marshalProjectStatusSchema: z.ZodType = z .optional(), branchLogicalSizeLimitBytes: z.bigint().optional(), syntheticStorageSizeBytes: z.bigint().optional(), + computeLastActiveTime: z + .any() + .transform((d: Temporal.Instant) => d.toString()) + .optional(), budgetPolicyId: z.string().optional(), customTags: z.array(z.lazy(() => marshalProjectCustomTagSchema)).optional(), owner: z.string().optional(), @@ -3903,6 +4029,7 @@ export const marshalProjectStatusSchema: z.ZodType = z default_endpoint_settings: d.defaultEndpointSettings, branch_logical_size_limit_bytes: d.branchLogicalSizeLimitBytes, synthetic_storage_size_bytes: d.syntheticStorageSizeBytes, + compute_last_active_time: d.computeLastActiveTime, budget_policy_id: d.budgetPolicyId, custom_tags: d.customTags, owner: d.owner, @@ -4345,13 +4472,25 @@ const endpointStatusFieldMaskSchema: FieldMaskSchema = { suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, }; +const initialBranchSpecFieldMaskSchema: FieldMaskSchema = { + isProtected: {wire: 'is_protected'}, +}; + const initialEndpointSpecFieldMaskSchema: FieldMaskSchema = { + autoscalingLimitMaxCu: {wire: 'autoscaling_limit_max_cu'}, + autoscalingLimitMinCu: {wire: 'autoscaling_limit_min_cu'}, group: {wire: 'group', children: () => endpointGroupSpecFieldMaskSchema}, + noSuspension: {wire: 'no_suspension'}, + suspendTimeoutDuration: {wire: 'suspend_timeout_duration'}, }; const projectFieldMaskSchema: FieldMaskSchema = { createTime: {wire: 'create_time'}, deleteTime: {wire: 'delete_time'}, + initialBranchSpec: { + wire: 'initial_branch_spec', + children: () => initialBranchSpecFieldMaskSchema, + }, initialEndpointSpec: { wire: 'initial_endpoint_spec', children: () => initialEndpointSpecFieldMaskSchema, @@ -4394,6 +4533,7 @@ const projectSpecFieldMaskSchema: FieldMaskSchema = { const projectStatusFieldMaskSchema: FieldMaskSchema = { branchLogicalSizeLimitBytes: {wire: 'branch_logical_size_limit_bytes'}, budgetPolicyId: {wire: 'budget_policy_id'}, + computeLastActiveTime: {wire: 'compute_last_active_time'}, customTags: {wire: 'custom_tags'}, defaultBranch: {wire: 'default_branch'}, defaultEndpointSettings: {